From c347c17c22468585a9dd8c62499f2b84137b8856 Mon Sep 17 00:00:00 2001 From: Charles Xie Date: Thu, 28 Nov 2024 11:04:11 -0500 Subject: [PATCH] Updates --- assets/{index-BCn-GXX3.js => index-CAAEmoNT.js} | 14 +++++++------- index.html | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) rename assets/{index-BCn-GXX3.js => index-CAAEmoNT.js} (92%) diff --git a/assets/index-BCn-GXX3.js b/assets/index-CAAEmoNT.js similarity index 92% rename from assets/index-BCn-GXX3.js rename to assets/index-CAAEmoNT.js index 664ad206..45dd6c96 100644 --- a/assets/index-BCn-GXX3.js +++ b/assets/index-CAAEmoNT.js @@ -68,11 +68,11 @@ License: MIT `&&F!=="\r"&&F!==`\r `&&(F=` `);var D=0,L=!1;this.parse=function(j,B,O){if(typeof j!="string")throw new Error("Input must be a string");var V=j.length,G=H.length,Q=F.length,$=E.length,ie=x(N),q=[],se=[],Z=[],ee=D=0;if(!j)return Ne();if(b.header&&!B){var te=j.split(F)[0].split(H),oe=[],de={},he=!1;for(var pe in te){var me=te[pe];x(b.transformHeader)&&(me=b.transformHeader(me,pe));var le=me,Te=de[me]||0;for(0=U)return Ne(!0)}else for(fe=D,D++;;){if((fe=j.indexOf(R,fe+1))===-1)return O||se.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:q.length,index:D}),Me();if(fe===V-1)return Me(j.substring(D,fe).replace(ue,R));if(R!==k||j[fe+1]!==k){if(R===k||fe===0||j[fe-1]!==k){De!==-1&&De=U)return Ne(!0);break}se.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:q.length,index:D}),fe++}}else fe++}return Me();function Pe(Ue){q.push(Ue),ee=D}function Ie(Ue){var nt=0;if(Ue!==-1){var We=j.substring(fe+1,Ue);We&&We.trim()===""&&(nt=We.length)}return nt}function Me(Ue){return O||(Ue===void 0&&(Ue=j.substring(D)),Z.push(Ue),D=V,Pe(Z),ie&&Je()),Ne()}function ze(Ue){D=Ue,Pe(Z),Z=[],Ae=j.indexOf(F,D)}function Ne(Ue){return{data:q,errors:se,meta:{delimiter:H,linebreak:F,aborted:L,truncated:!!Ue,cursor:ee+(B||0)}}}function Je(){N(Ne()),q=[],se=[]}},this.abort=function(){L=!0},this.getCharIndex=function(){return D}}function C(b){var R=b.data,H=a[R.workerId],F=!1;if(R.error)H.userError(R.error,R.file);else if(R.results&&R.results.data){var E={abort:function(){F=!0,P(R.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:v,resume:v};if(x(H.userStep)){for(var N=0;N1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||cht,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),o=0;o{this.observers[o]||(this.observers[o]=new Map);const r=this.observers[o].get(n)||0;this.observers[o].set(n,r+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r{let[l,s]=a;for(let c=0;c{let[l,s]=a;for(let c=0;c{t=o,e=r});return n.resolve=t,n.reject=e,n}function JAe(t){return t==null?"":""+t}function dht(t,e,n){t.forEach(o=>{e[o]&&(n[o]=e[o])})}const fht=/###/g;function fE(t,e,n){function o(l){return l&&l.indexOf("###")>-1?l.replace(fht,"."):l}function r(){return!t||typeof t=="string"}const i=typeof e!="string"?e:e.split(".");let a=0;for(;a":">",'"':""","'":"'","/":"/"};function mht(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>ght[e]):t}class yht{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const o=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,o),this.regExpQueue.push(e),o}}const Aht=[" ",",","?","!",";"],wht=new yht(20);function vht(t,e,n){e=e||"",n=n||"";const o=Aht.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(o.length===0)return!0;const r=wht.getRegExp(`(${o.map(a=>a==="?"?"\\?":a).join("|")})`);let i=!r.test(t);if(!i){const a=t.indexOf(n);a>0&&!r.test(t.substring(0,a))&&(i=!0)}return i}function Lse(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const o=e.split(n);let r=t;for(let i=0;i-1&&s0?t.replace("_","-"):t}class qAe extends tq{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,o){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,a=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.indexOf(".")>-1?l=e.split("."):(l=[e,n],o&&(Array.isArray(o)?l.push(...o):typeof o=="string"&&i?l.push(...o.split(i)):l.push(o)));const s=J_(this.data,l);return!s&&!n&&!o&&e.indexOf(".")>-1&&(e=l[0],n=l[1],o=l.slice(2).join(".")),s||!a||typeof o!="string"?s:Lse(this.data&&this.data[e]&&this.data[e][n],o,i)}addResource(e,n,o,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let l=[e,n];o&&(l=l.concat(a?o.split(a):o)),e.indexOf(".")>-1&&(l=e.split("."),r=n,n=l[1]),this.addNamespaces(n),KAe(this.data,l,r),i.silent||this.emit("added",e,n,o,r)}addResources(e,n,o){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in o)(typeof o[i]=="string"||Object.prototype.toString.apply(o[i])==="[object Array]")&&this.addResource(e,n,i,o[i],{silent:!0});r.silent||this.emit("added",e,n,o)}addResourceBundle(e,n,o,r,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[e,n];e.indexOf(".")>-1&&(l=e.split("."),r=o,o=n,n=l[1]),this.addNamespaces(n);let s=J_(this.data,l)||{};a.skipCopy||(o=JSON.parse(JSON.stringify(o))),r?gWe(s,o,i):s={...s,...o},KAe(this.data,l,s),a.silent||this.emit("added",e,n,o)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(r=>n[r]&&Object.keys(n[r]).length>0)}toJSON(){return this.data}}var mWe={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,o,r){return t.forEach(i=>{this.processors[i]&&(e=this.processors[i].process(e,n,o,r))}),e}};const $Ae={};class q_ extends tq{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),dht(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=p9.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const o=this.resolve(e,n);return o&&o.res!==void 0}extractFromKey(e,n){let o=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");const r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const a=o&&e.indexOf(o)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!vht(e,o,r);if(a&&!l){const s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:i};const c=e.split(o);(o!==r||o===r&&this.options.ns.indexOf(c[0])>-1)&&(i=c.shift()),e=c.join(r)}return typeof i=="string"&&(i=[i]),{key:e,namespaces:i}}translate(e,n,o){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const r=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(e[e.length-1],n),s=l[l.length-1],c=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const v=n.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${v}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(n)}:`${s}${v}${a}`}return r?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(n)}:a}const d=this.resolve(e,n);let f=d&&d.res;const p=d&&d.usedKey||a,g=d&&d.exactUsedKey||a,A=Object.prototype.toString.apply(f),y=["[object Number]","[object Function]","[object RegExp]"],S=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,C=!this.i18nFormat||this.i18nFormat.handleAsObject;if(C&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&y.indexOf(A)<0&&!(typeof S=="string"&&A==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const v=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,f,{...n,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return r?(d.res=v,d.usedParams=this.getUsedParamsDetails(n),d):v}if(i){const v=A==="[object Array]",T=v?[]:{},w=v?g:p;for(const x in f)if(Object.prototype.hasOwnProperty.call(f,x)){const b=`${w}${i}${x}`;T[x]=this.translate(b,{...n,joinArrays:!1,ns:l}),T[x]===b&&(T[x]=f[x])}f=T}}else if(C&&typeof S=="string"&&A==="[object Array]")f=f.join(S),f&&(f=this.extendTranslation(f,e,n,o));else{let v=!1,T=!1;const w=n.count!==void 0&&typeof n.count!="string",x=q_.hasDefaultValue(n),b=w?this.pluralResolver.getSuffix(c,n.count,n):"",R=n.ordinal&&w?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",H=w&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),F=H&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${b}`]||n[`defaultValue${R}`]||n.defaultValue;!this.isValidLookup(f)&&x&&(v=!0,f=F),this.isValidLookup(f)||(T=!0,f=a);const N=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&T?void 0:f,U=x&&F!==f&&this.options.updateMissing;if(T||v||U){if(this.logger.log(U?"updateKey":"missingKey",c,s,a,U?F:f),i){const L=this.resolve(a,{...n,keySeparator:!1});L&&L.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let W=[];const k=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&k&&k[0])for(let L=0;L{const O=x&&B!==f?B:N;this.options.missingKeyHandler?this.options.missingKeyHandler(L,s,j,O,U,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(L,s,j,O,U,n),this.emit("missingKey",L,s,j,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?W.forEach(L=>{const j=this.pluralResolver.getSuffixes(L,n);H&&n[`defaultValue${this.options.pluralSeparator}zero`]&&j.indexOf(`${this.options.pluralSeparator}zero`)<0&&j.push(`${this.options.pluralSeparator}zero`),j.forEach(B=>{D([L],a+B,n[`defaultValue${B}`]||F)})}):D(W,a,F))}f=this.extendTranslation(f,e,n,d,o),T&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${s}:${a}`),(T||v)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${a}`:a,v?f:void 0):f=this.options.parseMissingKeyHandler(f))}return r?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(e,n,o,r,i){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...o},o.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init({...o,interpolation:{...this.options.interpolation,...o.interpolation}});const c=typeof e=="string"&&(o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const f=e.match(this.interpolator.nestingRegexp);u=f&&f.length}let d=o.replace&&typeof o.replace!="string"?o.replace:o;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,o.lng||this.language,o),c){const f=e.match(this.interpolator.nestingRegexp),p=f&&f.length;u1&&arguments[1]!==void 0?arguments[1]:{},o,r,i,a,l;return typeof e=="string"&&(e=[e]),e.forEach(s=>{if(this.isValidLookup(o))return;const c=this.extractFromKey(s,n),u=c.key;r=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&typeof n.count!="string",p=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),g=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",A=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(y=>{this.isValidLookup(o)||(l=y,!$Ae[`${A[0]}-${y}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&($Ae[`${A[0]}-${y}`]=!0,this.logger.warn(`key "${r}" for languages "${A.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),A.forEach(S=>{if(this.isValidLookup(o))return;a=S;const C=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(C,u,S,y,n);else{let v;f&&(v=this.pluralResolver.getSuffix(S,n.count,n));const T=`${this.options.pluralSeparator}zero`,w=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(C.push(u+v),n.ordinal&&v.indexOf(w)===0&&C.push(u+v.replace(w,this.options.pluralSeparator)),p&&C.push(u+T)),g){const x=`${u}${this.options.contextSeparator}${n.context}`;C.push(x),f&&(C.push(x+v),n.ordinal&&v.indexOf(w)===0&&C.push(x+v.replace(w,this.options.pluralSeparator)),p&&C.push(x+T))}}let P;for(;P=C.pop();)this.isValidLookup(o)||(i=P,o=this.getResource(S,y,P,n))}))})}),{res:o,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,o){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,o,r):this.resourceStore.getResource(e,n,o,r)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],o=e.replace&&typeof e.replace!="string";let r=o?e.replace:e;if(o&&typeof e.count<"u"&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!o){r={...r};for(const i of n)delete r[i]}return r}static hasDefaultValue(e){const n="defaultValue";for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&n===o.substring(0,n.length)&&e[o]!==void 0)return!0;return!1}}function Toe(t){return t.charAt(0).toUpperCase()+t.slice(1)}class QAe{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=p9.create("languageUtils")}getScriptPartFromCode(e){if(e=K_(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=K_(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let o=e.split("-");return this.options.lowerCaseLng?o=o.map(r=>r.toLowerCase()):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),n.indexOf(o[1].toLowerCase())>-1&&(o[1]=Toe(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),n.indexOf(o[1].toLowerCase())>-1&&(o[1]=Toe(o[1].toLowerCase())),n.indexOf(o[2].toLowerCase())>-1&&(o[2]=Toe(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(o=>{if(n)return;const r=this.formatLanguageCode(o);(!this.options.supportedLngs||this.isSupportedCode(r))&&(n=r)}),!n&&this.options.supportedLngs&&e.forEach(o=>{if(n)return;const r=this.getLanguagePartFromCode(o);if(this.isSupportedCode(r))return n=r;n=this.options.supportedLngs.find(i=>{if(i===r)return i;if(!(i.indexOf("-")<0&&r.indexOf("-")<0)&&(i.indexOf("-")>0&&r.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===r||i.indexOf(r)===0&&r.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!n)return e.default||[];let o=e[n];return o||(o=e[this.getScriptPartFromCode(n)]),o||(o=e[this.formatLanguageCode(n)]),o||(o=e[this.getLanguagePartFromCode(n)]),o||(o=e.default),o||[]}toResolveHierarchy(e,n){const o=this.getFallbackCodes(n||this.options.fallbackLng||[],e),r=[],i=a=>{a&&(this.isSupportedCode(a)?r.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):typeof e=="string"&&i(this.formatLanguageCode(e)),o.forEach(a=>{r.indexOf(a)<0&&i(this.formatLanguageCode(a))}),r}}let xht=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],bht={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const Sht=["v1","v2","v3"],Tht=["v4"],ZAe={zero:0,one:1,two:2,few:3,many:4,other:5};function Pht(){const t={};return xht.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:bht[e.fc]}})}),t}class Cht{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=p9.create("pluralResolver"),(!this.options.compatibilityJSON||Tht.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Pht()}addRule(e,n){this.rules[e]=n}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(K_(e==="dev"?"en":e),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=this.getRule(e,n);return this.shouldUseIntlApi()?o&&o.resolvedOptions().pluralCategories.length>1:o&&o.numbers.length>1}getPluralFormsOfKey(e,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,o).map(r=>`${n}${r}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=this.getRule(e,n);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort((r,i)=>ZAe[r]-ZAe[i]).map(r=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r}`):o.numbers.map(r=>this.getSuffix(e,r,n)):[]}getSuffix(e,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=this.getRule(e,o);return r?this.shouldUseIntlApi()?`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${r.select(n)}`:this.getSuffixRetroCompatible(r,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const o=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let r=e.numbers[o];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(r===2?r="plural":r===1&&(r=""));const i=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return this.options.compatibilityJSON==="v1"?r===1?"":typeof r=="number"?`_plural_${r.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?i():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}shouldUseIntlApi(){return!Sht.includes(this.options.compatibilityJSON)}}function e4e(t,e,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=pht(t,e,n);return!i&&r&&typeof n=="string"&&(i=Lse(t,n,o),i===void 0&&(i=Lse(e,n,o))),i}class Rht{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=p9.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const n=e.interpolation;this.escape=n.escape!==void 0?n.escape:mht,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?rT(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?rT(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?rT(n.nestingPrefix):n.nestingPrefixEscaped||rT("$t("),this.nestingSuffix=n.nestingSuffix?rT(n.nestingSuffix):n.nestingSuffixEscaped||rT(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,o)=>n&&n.source===o?(n.lastIndex=0,n):new RegExp(o,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,o,r){let i,a,l;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(g){return g.replace(/\$/g,"$$$$")}const u=g=>{if(g.indexOf(this.formatSeparator)<0){const C=e4e(n,s,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(C,void 0,o,{...r,...n,interpolationkey:g}):C}const A=g.split(this.formatSeparator),y=A.shift().trim(),S=A.join(this.formatSeparator).trim();return this.format(e4e(n,s,y,this.options.keySeparator,this.options.ignoreJSONStructure),S,o,{...r,...n,interpolationkey:y})};this.resetRegExp();const d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>c(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?c(this.escape(g)):c(g)}].forEach(g=>{for(l=0;i=g.regex.exec(e);){const A=i[1].trim();if(a=u(A),a===void 0)if(typeof d=="function"){const S=d(e,i,r);a=typeof S=="string"?S:""}else if(r&&Object.prototype.hasOwnProperty.call(r,A))a="";else if(f){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${A} for interpolating ${e}`),a="";else typeof a!="string"&&!this.useRawValueToEscape&&(a=JAe(a));const y=g.safeValue(a);if(e=e.replace(i[0],y),f?(g.regex.lastIndex+=a.length,g.regex.lastIndex-=i[0].length):g.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,a;function l(s,c){const u=this.nestingOptionsSeparator;if(s.indexOf(u)<0)return s;const d=s.split(new RegExp(`${u}[ ]*{`));let f=`{${d[1]}`;s=d[0],f=this.interpolate(f,a);const p=f.match(/'/g),g=f.match(/"/g);(p&&p.length%2===0&&!g||g.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),c&&(a={...c,...a})}catch(A){return this.logger.warn(`failed parsing options string in nesting for key ${s}`,A),`${s}${u}${f}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,s}for(;r=this.nestingRegexp.exec(e);){let s=[];a={...o},a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=!1;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){const u=r[1].split(this.formatSeparator).map(d=>d.trim());r[1]=u.shift(),s=u,c=!0}if(i=n(l.call(this,r[1].trim(),a),a),i&&r[0]===e&&typeof i!="string")return i;typeof i!="string"&&(i=JAe(i)),i||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),i=""),c&&(i=s.reduce((u,d)=>this.format(u,d,o.lng,{...o,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}}function Hht(t){let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const o=t.split("(");e=o[0].toLowerCase().trim();const r=o[1].substring(0,o[1].length-1);e==="currency"&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):e==="relativetime"&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(a=>{if(!a)return;const[l,...s]=a.split(":"),c=s.join(":").trim().replace(/^'+|'+$/g,"");n[l.trim()]||(n[l.trim()]=c),c==="false"&&(n[l.trim()]=!1),c==="true"&&(n[l.trim()]=!0),isNaN(c)||(n[l.trim()]=parseInt(c,10))})}return{formatName:e,formatOptions:n}}function iT(t){const e={};return function(o,r,i){const a=r+JSON.stringify(i);let l=e[a];return l||(l=t(K_(r),i),e[a]=l),l(o)}}class Mht{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=p9.create("formatter"),this.options=e,this.formats={number:iT((n,o)=>{const r=new Intl.NumberFormat(n,{...o});return i=>r.format(i)}),currency:iT((n,o)=>{const r=new Intl.NumberFormat(n,{...o,style:"currency"});return i=>r.format(i)}),datetime:iT((n,o)=>{const r=new Intl.DateTimeFormat(n,{...o});return i=>r.format(i)}),relativetime:iT((n,o)=>{const r=new Intl.RelativeTimeFormat(n,{...o});return i=>r.format(i,o.range||"day")}),list:iT((n,o)=>{const r=new Intl.ListFormat(n,{...o});return i=>r.format(i)})},this.init(e)}init(e){const o=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=iT(n)}format(e,n,o){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((l,s)=>{const{formatName:c,formatOptions:u}=Hht(s);if(this.formats[c]){let d=l;try{const f=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},p=f.locale||f.lng||r.locale||r.lng||o;d=this.formats[c](l,p,{...u,...r,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${c}`);return l},e)}}function Iht(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}class zht extends tq{constructor(e,n,o){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=o,this.languageUtils=o.languageUtils,this.options=r,this.logger=p9.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(o,r.backend,r)}queueLoad(e,n,o,r){const i={},a={},l={},s={};return e.forEach(c=>{let u=!0;n.forEach(d=>{const f=`${c}|${d}`;!o.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,u=!1,a[f]===void 0&&(a[f]=!0),i[f]===void 0&&(i[f]=!0),s[d]===void 0&&(s[d]=!0)))}),u||(l[c]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(s)}}loaded(e,n,o){const r=e.split("|"),i=r[0],a=r[1];n&&this.emit("failedLoading",i,a,n),o&&this.store.addResourceBundle(i,a,o,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2;const l={};this.queue.forEach(s=>{hht(s.loaded,[i],a),Iht(s,e),n&&s.errors.push(n),s.pendingCount===0&&!s.done&&(Object.keys(s.loaded).forEach(c=>{l[c]||(l[c]={});const u=s.loaded[c];u.length&&u.forEach(d=>{l[c][d]===void 0&&(l[c][d]=!0)})}),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(s=>!s.done)}read(e,n,o){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:o,tried:r,wait:i,callback:a});return}this.readingCalls++;const l=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&r{this.read.call(this,e,n,o,r+1,i*2,a)},i);return}a(c,u)},s=this.backend[o].bind(this.backend);if(s.length===2){try{const c=s(e,n);c&&typeof c.then=="function"?c.then(u=>l(null,u)).catch(l):l(null,c)}catch(c){l(c)}return}return s(e,n,l)}prepareLoading(e,n){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const i=this.queueLoad(e,n,o,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(a=>{this.loadOne(a)})}load(e,n,o){this.prepareLoading(e,n,{},o)}reload(e,n,o){this.prepareLoading(e,n,{reload:!0},o)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const o=e.split("|"),r=o[0],i=o[1];this.read(r,i,"read",void 0,void 0,(a,l)=>{a&&this.logger.warn(`${n}loading namespace ${i} for language ${r} failed`,a),!a&&l&&this.logger.log(`${n}loaded namespace ${i} for language ${r}`,l),this.loaded(e,a,l)})}saveMissing(e,n,o,r,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${o}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(o==null||o==="")){if(this.backend&&this.backend.create){const s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(e,n,o,r,s):u=c(e,n,o,r),u&&typeof u.then=="function"?u.then(d=>l(null,d)).catch(l):l(null,u)}catch(u){l(u)}else c(e,n,o,r,l,s)}!e||!e[0]||this.store.addResource(e[0],n,o,r)}}}function t4e(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let n={};if(typeof e[1]=="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const o=e[3]||e[2];Object.keys(o).forEach(r=>{n[r]=o[r]})}return n},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function n4e(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function pB(){}function Dht(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}class bF extends tq{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=n4e(e),this.services={},this.logger=p9,this.modules={external:[]},Dht(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(o=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const r=t4e();this.options={...r,...this.options,...n4e(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function i(u){return u?typeof u=="function"?new u:u:null}if(!this.options.isClone){this.modules.logger?p9.init(i(this.modules.logger),this.options):p9.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=Mht);const d=new QAe(this.options);this.store=new qAe(this.options.resources,this.options);const f=this.services;f.logger=p9,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new Cht(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=i(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Rht(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new zht(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(p){for(var g=arguments.length,A=new Array(g>1?g-1:0),y=1;y1?g-1:0),y=1;y{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,o||(o=pB),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return e.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return e.store[u](...arguments),e}});const s=pz(),c=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(f),o(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),s}loadResources(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pB;const r=typeof e=="string"?e:this.language;if(typeof e=="function"&&(o=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&r.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return o();const i=[],a=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(c=>{c!=="cimode"&&i.indexOf(c)<0&&i.push(c)})};r?a(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(s=>a(s)),this.options.preload&&this.options.preload.forEach(l=>a(l)),this.services.backendConnector.load(i,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(l)})}else o(null)}reloadResources(e,n,o){const r=pz();return e||(e=this.languages),n||(n=this.options.ns),o||(o=pB),this.services.backendConnector.reload(e,n,i=>{r.resolve(),o(i)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&mWe.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}}changeLanguage(e,n){var o=this;this.isLanguageChangingTo=e;const r=pz();this.emit("languageChanging",e);const i=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},a=(s,c)=>{c?(i(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,r.resolve(function(){return o.t(...arguments)}),n&&n(s,function(){return o.t(...arguments)})},l=s=>{!e&&!s&&this.services.languageDetector&&(s=[]);const c=typeof s=="string"?s:this.services.languageUtils.getBestMatchFromCodes(s);c&&(this.language||i(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{a(u,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e),r}getFixedT(e,n,o){var r=this;const i=function(a,l){let s;if(typeof l!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d`${s.keyPrefix}${f}${g}`):p=s.keyPrefix?`${s.keyPrefix}${f}${a}`:a,r.t(p,s)};return typeof e=="string"?i.lng=e:i.lngs=e,i.ns=n,i.keyPrefix=o,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const o=n.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const a=(l,s)=>{const c=this.services.backendConnector.state[`${l}|${s}`];return c===-1||c===2};if(n.precheck){const l=n.precheck(this,a);if(l!==void 0)return l}return!!(this.hasResourceBundle(o,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(o,e)&&(!r||a(i,e)))}loadNamespaces(e,n){const o=pz();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{o.resolve(),n&&n(r)}),o):(n&&n(),Promise.resolve())}loadLanguages(e,n){const o=pz();typeof e=="string"&&(e=[e]);const r=this.options.preload||[],i=e.filter(a=>r.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=r.concat(i),this.loadResources(a=>{o.resolve(),n&&n(a)}),o):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],o=this.services&&this.services.languageUtils||new QAe(t4e());return n.indexOf(o.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new bF(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pB;const o=e.forkResourceStore;o&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new bF(r);return(e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(l=>{i[l]=this[l]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},o&&(i.store=new qAe(this.store.data,r),i.services.resourceStore=i.store),i.translator=new q_(i.services,r),i.translator.on("*",function(l){for(var s=arguments.length,c=new Array(s>1?s-1:0),u=1;u()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}};function r4e(t,e,n){t.loadNamespaces(e,yWe(t,n))}function i4e(t,e,n,o){typeof n=="string"&&(n=[n]),n.forEach(r=>{t.options.ns.indexOf(r)<0&&t.options.ns.push(r)}),t.loadLanguages(e,yWe(t,o))}function Fht(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=e.languages[0],r=e.options?e.options.fallbackLng:!1,i=e.languages[e.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const a=(l,s)=>{const c=e.services.backendConnector.state[`${l}|${s}`];return c===-1||c===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!a(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(o,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||a(o,t)&&(!r||a(i,t)))}function kht(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(Wse("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(t,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,t))return!1}}):Fht(t,e,n)}const Lht=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Wht={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Nht=t=>Wht[t],Uht=t=>t.replace(Lht,Nht);let Nse={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Uht};function jht(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Nse={...Nse,...t}}function Bht(){return Nse}let AWe;function Yht(t){AWe=t}function Oht(){return AWe}const Vht={type:"3rdParty",init(t){jht(t.options.react),Yht(t)}},_ht=m.createContext();class Ght{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Xht=(t,e)=>{const n=m.useRef();return m.useEffect(()=>{n.current=t},[t,e]),n.current};function Xl(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=e,{i18n:o,defaultNS:r}=m.useContext(_ht)||{},i=n||o||Oht();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new Ght),!i){Wse("You will need to pass in an i18next instance by using initReactI18next");const P=(T,w)=>typeof w=="string"?w:w&&typeof w=="object"&&typeof w.defaultValue=="string"?w.defaultValue:Array.isArray(T)?T[T.length-1]:T,v=[P,{},!1];return v.t=P,v.i18n={},v.ready=!1,v}i.options.react&&i.options.react.wait!==void 0&&Wse("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...Bht(),...i.options.react,...e},{useSuspense:l,keyPrefix:s}=a;let c=r||i.options&&i.options.defaultNS;c=typeof c=="string"?[c]:c||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(c);const u=(i.isInitialized||i.initializedStoreOnce)&&c.every(P=>kht(P,i,a));function d(){return i.getFixedT(e.lng||null,a.nsMode==="fallback"?c:c[0],s)}const[f,p]=m.useState(d);let g=c.join();e.lng&&(g=`${e.lng}${g}`);const A=Xht(g),y=m.useRef(!0);m.useEffect(()=>{const{bindI18n:P,bindI18nStore:v}=a;y.current=!0,!u&&!l&&(e.lng?i4e(i,e.lng,c,()=>{y.current&&p(d)}):r4e(i,c,()=>{y.current&&p(d)})),u&&A&&A!==g&&y.current&&p(d);function T(){y.current&&p(d)}return P&&i&&i.on(P,T),v&&i&&i.store.on(v,T),()=>{y.current=!1,P&&i&&P.split(" ").forEach(w=>i.off(w,T)),v&&i&&v.split(" ").forEach(w=>i.store.off(w,T))}},[i,g]);const S=m.useRef(!0);m.useEffect(()=>{y.current&&!S.current&&p(d),S.current=!1},[i,s]);const C=[f,i,u];if(C.t=f,C.i18n=i,C.ready=u,u||!u&&!l)return C;throw new Promise(P=>{e.lng?i4e(i,e.lng,c,()=>P()):r4e(i,c,()=>P())})}function Jht(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function SF(t){"@babel/helpers - typeof";return SF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},SF(t)}function Kht(t,e){if(SF(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var o=n.call(t,e);if(SF(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function qht(t){var e=Kht(t,"string");return SF(e)==="symbol"?e:String(e)}function $ht(t,e){for(var n=0;n0){var l=r.maxAge-0;if(Number.isNaN(l))throw new Error("maxAge should be a Number");a+="; Max-Age=".concat(Math.floor(l))}if(r.domain){if(!a4e.test(r.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(r.domain)}if(r.path){if(!a4e.test(r.path))throw new TypeError("option path is invalid");a+="; Path=".concat(r.path)}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.sameSite){var s=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(s){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a},l4e={create:function(e,n,o,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};o&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+o*60*1e3)),r&&(i.domain=r),document.cookie=npt(e,encodeURIComponent(n),i)},read:function(e){for(var n="".concat(e,"="),o=document.cookie.split(";"),r=0;r-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=o.substring(1),i=r.split("&"),a=0;a0){var s=i[a].substring(0,l);s===e.lookupQuerystring&&(n=i[a].substring(l+1))}}}return n}},gz=null,s4e=function(){if(gz!==null)return gz;try{gz=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{gz=!1}return gz},ipt={name:"localStorage",lookup:function(e){var n;if(e.lookupLocalStorage&&s4e()){var o=window.localStorage.getItem(e.lookupLocalStorage);o&&(n=o)}return n},cacheUserLanguage:function(e,n){n.lookupLocalStorage&&s4e()&&window.localStorage.setItem(n.lookupLocalStorage,e)}},mz=null,c4e=function(){if(mz!==null)return mz;try{mz=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{mz=!1}return mz},apt={name:"sessionStorage",lookup:function(e){var n;if(e.lookupSessionStorage&&c4e()){var o=window.sessionStorage.getItem(e.lookupSessionStorage);o&&(n=o)}return n},cacheUserLanguage:function(e,n){n.lookupSessionStorage&&c4e()&&window.sessionStorage.setItem(n.lookupSessionStorage,e)}},lpt={name:"navigator",lookup:function(e){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var o=0;o0?n:void 0}},spt={name:"htmlTag",lookup:function(e){var n,o=e.htmlTag||(typeof document<"u"?document.documentElement:null);return o&&typeof o.getAttribute=="function"&&(n=o.getAttribute("lang")),n}},cpt={name:"path",lookup:function(e){var n;if(typeof window<"u"){var o=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(o instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof o[e.lookupFromPathIndex]!="string")return;n=o[e.lookupFromPathIndex].replace("/","")}else n=o[0].replace("/","")}return n}},upt={name:"subdomain",lookup:function(e){var n=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,o=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(o)return o[n]}};function dpt(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}}var vWe=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Jht(this,t),this.type="languageDetector",this.detectors={},this.init(e,n)}return Qht(t,[{key:"init",value:function(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n||{languageUtils:{}},this.options=tpt(o,this.options||{},dpt()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(i){return i.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(opt),this.addDetector(rpt),this.addDetector(ipt),this.addDetector(apt),this.addDetector(lpt),this.addDetector(spt),this.addDetector(cpt),this.addDetector(upt)}},{key:"addDetector",value:function(n){this.detectors[n.name]=n}},{key:"detect",value:function(n){var o=this;n||(n=this.options.order);var r=[];return n.forEach(function(i){if(o.detectors[i]){var a=o.detectors[i].lookup(o.options);a&&typeof a=="string"&&(a=[a]),a&&(r=r.concat(a))}}),r=r.map(function(i){return o.options.convertDetectedLanguage(i)}),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}},{key:"cacheUserLanguage",value:function(n,o){var r=this;o||(o=this.options.caches),o&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||o.forEach(function(i){r.detectors[i]&&r.detectors[i].cacheUserLanguage(n,r.options)}))}}]),t}();vWe.type="languageDetector";const fpt={translation:{name:{IFI:"Institute for Future Intelligence",Aladdin:"Aladdin",Tagline:"Aladdin: Reimagining Design with Explainable AI — Institute for Future Intelligence"},cookie:{Statement:"By clicking Accept, you agree to our use of cookies to improve your experience with Aladdin.",Accept:"Accept"},aboutUs:{ProductBroughtToYouBy:"This product is brought to you by",TermsOfService:"Terms of Service",PrivacyPolicy:"Privacy Policy",Software:"Software",Content:"Content",Research:"Research",Support:"Support",Acknowledgment:"Acknowledgment",FundingInformation:"The National Science Foundation (NSF) generously provided funding for the research and development of this product through grants #2105695, #2131097, and #2301164. Any opinions, findings, and conclusions or recommendations expressed in this product, however, are those of the authors and do not necessarily reflect the views of NSF.",Contact:"For more information, please contact Charles Xie (charles@intofuture.org).",Translators:"Translators"},word:{BrandName:"Brand Name",Name:"Name",Refresh:"Refresh",LastUpdate:"Last Update",Small:"Small",Medium:"Medium",Large:"Large",Design:"Design",Information:"Information",Type:"Type",Text:"Text",FontSize:"Font Size",FontColor:"Font Color",Model:"Model",Models:"Models",Upload:"Upload",ClickCount:"Click Count",Share:"Share",AlreadyLike:"Already like",Like:"Like",MustLogInToLike:"Must log in to like",AllRightsReserved:"All Rights Reserved",MeterAbbreviation:"m",VoltAbbreviation:"V",AmpereAbbreviation:"A",WattAbbreviation:"W",Version:"Version",VersionInitial:"V",Options:"Options",Maximum:"Maximum",Minimum:"Minimum",MaximumNumber:"Maximum Number",MinimumNumber:"Minimum Number",MaximumValue:"Maximum Value",MinimumValue:"Minimum Value",Or:"Or",None:"None",High:"High",Partial:"Partial",Teacher:"Teacher",Class:"Class",Total:"Total",Leaderboard:"Leaderboard",Latest:"Latest",Range:"Range",SIUnit:"SI Unit",USUnit:"US Unit",ThermalTransmittance:"Thermal Transmittance",ThermalResistance:"Thermal Resistance",UValue:"U-Value",RValue:"R-Value",VolumetricHeatCapacity:"Volumetric Heat Capacity",BuildingHVACSystem:"Building HVAC System",ThermostatSetpoint:"Thermostat Setpoint",TemperatureToleranceThreshold:"Tolerance Threshold",TemperatureToleranceThresholdExplanation:`Heater will not run if the lowest outside temperature of the day is higher than the setpoint minus this threshold. -AC will not run if the highest outside temperature of the day is lower than the setpoint plus this threshold.`,Press:"Press",Open:"Open",Save:"Save",SaveAsImage:"Save as Image",SaveAsCsv:"Save as CSV",Update:"Update",Paste:"Paste",Copy:"Copy",Cut:"Cut",Delete:"Delete",Add:"Add",Lock:"Lock",Translucent:"Translucent",Transparency:"Transparency",Color:"Color",Pattern:"Pattern",Texture:"Texture",Size:"Size",Thickness:"Thickness",Yes:"Yes",No:"No",OK:"OK",Cancel:"Cancel",Apply:"Apply",Close:"Close",ApplyTo:"Apply to",Run:"Run",Pause:"Pause",Resume:"Resume",Clear:"Clear",Warning:"Warning",Caution:"Caution",Reminder:"Reminder",Length:"Length",Width:"Width",Height:"Height",Radius:"Radius",Angle:"Angle",Azimuth:"Azimuth",Coordinates:"Coordinates",Weather:"Weather",Show:"Show",Animate:"Animate",Date:"Date",Time:"Time",Title:"Title",Owner:"Owner",Action:"Action",Rename:"Rename",Location:"Location",Latitude:"Latitude",Month:"Month",Day:"Day",Hour:"Hour",Daylight:"Daylight",Radiation:"Radiation",Temperature:"Temperature",kWh:"kWh",dollar:"dollar",MeterPerSecond:"m/s",NorthInitial:"N",SouthInitial:"S",EastInitial:"E",WestInitial:"W",Fixed:"Fixed",Elements:"Elements",Energy:"Energy",Unknown:"Unknown",Label:"Label",Description:"Description",NoDescription:"No description",MaximumCharacters:"Maximum characters",Author:"Author",Publisher:"Publisher",Building:"Building",ResidentialBuilding:"Residential Building",CommercialBuilding:"Commercial Building",SchoolBuilding:"School Building",TouristAttraction:"Tourist Attraction",UnderConstruction:"Under Construction",Photovoltaic:"Photovoltaic",WindPower:"Wind Power",ColocationProjects:"Colocation Projects",Anonymous:"Anonymous",Nickname:"Nickname",Pin:"Pin",Unpin:"Unpin"},shared:{NoTexture:"No Texture",FoundationElement:"Foundation",CuboidElement:"Cuboid",PolygonElement:"Polygon",SensorElement:"Sensor",SolarPanelElement:"Solar Panel",SolarWaterHeaterElement:"Solar Water Heater",ParabolicDishElement:"Parabolic Dish",ParabolicTroughElement:"Parabolic Trough",FresnelReflectorElement:"Fresnel Reflector",HeliostatElement:"Heliostat",WindTurbineElement:"Wind Turbine",LightElement:"Light",ElementLocked:"Locked",ModelType:"Model Type",OutputBreakdown:"Breakdown",MoreResults:"More Results"},message:{NewVersionAvailable:"A new version is available",CalculationMayBeSlowDoYouWantToContinue:"Calculation may be slow. Do you want to continue?",IncreaseSolarRadiationHeatmapGridCellSizeToSpeedUp:"Increase solar radiation heatmap grid cell size to speed up",ModelNotFound:"Model not found",CannotSignIn:"Cannot sign in",CannotSignOut:"Cannot sign out",YourAccountWasCreated:"Your account was created.",CannotCreateAccount:"Cannot create an account",YourAccountSettingsWereSaved:"Your account settings were saved.",CannotSaveYourAccountSettings:"Cannot save your account settings",CannotSaveYourFileToCloud:"Cannot save your file to the cloud",CannotCreateNewProject:"Cannot create a new project",CannotCreateNewProjectWithoutTitle:"Cannot create a new project without a title",CannotOpenYourProjects:"Cannot open your projects",CannotOpenProject:"Cannot open the project",CannotDeleteProject:"Cannot delete the project",CannotRenameProject:"Cannot rename the project",CannotAddDesignToProject:"Cannot add this design to the project",CannotAddDesignToProjectOwnedByOthers:"Cannot add this design to a project owned by others",DesignRemovedFromProject:"The design was successfully removed from the project",CannotRemoveDesignFromProject:"Cannot remove this design from the project",CannotUpdateProject:"Cannot update the project",CannotFetchProjectData:"Cannot fetch project data",TitleUsedChooseDifferentOne:"This title has been used. Choose a different one",CloudFileWithTitleExistsDoYouWantToOverwrite:"A cloud file with the title exists. Do you want to overwrite it?",CloudFileNotFound:"The cloud file was not found",CannotLoadModelsOnMap:"Cannot load models on map",CannotLoadLeaderboard:"Cannot load leaderboard",CannotPublishModelOnMap:"Cannot publish model on map",CannotLikeModelFromMap:"Cannot like model from map",CannotDeleteModelFromMap:"Cannot delete model from map",ModelDeletedFromMap:"Model is deleted from map",DoYouWantToDeleteModelFromMap:"Do you want to delete the model from map?",CannotOpenCloudFile:"Cannot open the cloud file",CannotReadCloudFile:"Cannot read the cloud file",CannotWriteCloudFile:"Cannot write the cloud file",CloudFileCopied:"Cloud file copied",CannotOpenCloudFolder:"Cannot open your cloud folder",CannotDeleteCloudFile:"Cannot delete the cloud file",CannotRenameCloudFile:"Cannot rename the cloud file",DoYouWantToSaveChanges:"Do you want to save changes?",NotApplicableToSelectedAction:"Not Applicable to Selected Action",ThisElementIsLocked:"This element is locked.",ThisCannotBeUndone:"This cannot be undone.",AzimuthOfNorthIsZero:"Azimuth of north is 0°",CounterclockwiseAzimuthIsPositive:"Counter-clockwise is positive",SouthFacingIsZero:"South-facing is 0°",ClockwiseRotationIsPositive:"Clockwise is positive",MoveCancelledBecauseOfOverlap:"Move cancelled because of overlap.",MoveOutsideBoundaryCancelled:"Move outside the boundary cancelled.",RotationCancelledBecauseOfOverlap:"Rotation cancelled because of overlap.",RotationOutsideBoundaryCancelled:"Rotation outside the boundary cancelled.",ResizingCancelledBecauseOfOverlap:"Resizing cancelled because of overlap.",ResizingOutsideBoundaryCancelled:"Resizing outside the boundary cancelled.",CannotPasteOutsideBoundary:"Cannot paste outside the boundary.",CannotPasteBecauseOfOverlap:"Cannot paste because of overlap.",CannotMoveObjectTooFar:"Cannot move object too far.",ExistingSolarPanelsWillBeRemovedBeforeApplyingNewLayout:"Existing solar panels will be removed before applying the new layout.",DoYouWantToContinue:"Do you want to continue?",SolarPanelsCannotIntersectWithGround:"Solar panels cannot intersect with the ground.",SolarPanelsCannotOverlapWithOneAnother:"Solar panels cannot overlap with one another.",ScreenshotSaved:"A screenshot was saved.",CsvFileSaved:"A CSV file was saved.",SimulationStarted:"Simulation started.",SimulationCompleted:"Simulation completed.",SimulationAborted:"Simulation aborted.",SimulationPaused:"Simulation paused.",CancelSimulation:"Cancel simulation",PauseSimulation:"Pause simulation",ResumeSimulation:"Resume simulation",SimulationWillNotStartDueToErrors:"Simulation will not start due to errors",SimulationWillStartDespiteWarnings:"Simulation will start despite warnings.",EvolutionStarted:"Evolution started.",EvolutionCompleted:"Evolution completed.",EvolutionAborted:"Evolution aborted.",EvolutionPaused:"Evolution paused.",EncounterEvolutionError:"Encountered an evolution error.",CancelEvolution:"Cancel evolution",PauseEvolution:"Pause evolution",ResumeEvolution:"Resume evolution",ConvergenceThresholdHasBeenReached:"The convergence threshold has been reached.",MaximumNumberOfGenerationsHasBeenReached:"The maximum number of generations has been reached.",MaximumNumberOfStepsHasBeenReached:"The maximum number of steps has been reached.",ObjectiveFunctionTypeError:"The current objective function is not supported by this operation. Please start from the menu.",WallsAreNotAtSameHeight:"Walls are not at the same height.",WallsAreNotPerpendicular:"Walls are not perpendicular.",WallsAreNotConnected:"Walls are not connected.",WallsNumberNeedToBeFour:"The number of walls needs to be four.",BuildingContainsEmptyWall:"Building contains one or more empty wall.",BuildingRoofMissing:"Building has a missing roof.",UnknownErrors:"Unknown errors.",SigningOutAnonymousAccount:"Are you sure you want to sign out? This anonymous account will be lost."},menu:{AnalysisOptions:"Analysis Options",option:{GridCellSize:"Grid Cell Size",SamplingFrequency:"Sampling Frequency",TimesPerHour:"Times per Hour",DaysPerYear:"Days per Year"},mainMenu:"Main Menu",cloudMenu:"Cloud Menu",projectSubMenu:"Project",project:{CreateNewProject:"Create New Project",OpenProject:"Open Project",SaveProject:"Save Project",SaveProjectAs:"Save Project As",YouMustLogInToCreateProject:"You must log in to create a new project",YouMustLogInToOpenProject:"You must log in to open a project"},fileSubMenu:"File",file:{CreateNewFile:"Create New File",OpenLocalFile:"Open Local File",SaveAsLocalFile:"Save as Local File",SavingAbortedMustHaveValidFileName:"Saving aborted! You must have a valid file name",OpenCloudFile:"Open Cloud File",SaveCloudFile:"Save Cloud File",SaveAsCloudFile:"Save as Cloud File",SavingAbortedMustHaveValidTitle:"Saving aborted! You must have a valid title for a cloud file",ToSaveYourWorkPleaseSignIn:"To save your work, please sign in.",TakeScreenshot:"Take Screenshot",UseCloudFileName:"Use Cloud File Name",PublishOnModelsMap:"Publish on Models Map",PublishedOnModelsMap:"Your model has been published on the Models Map",UpdatedOnModelsMap:"Your model has been updated on the Models Map",YouMustLogInToPublishYourModel:"You must log in to publish your model",YouCannotPublishAModelThatYouDoNotOwn:"You cannot publish a model that you do not own",YouMustSaveModelOnCloudBeforePublishingIt:"You must save the model on the cloud before publishing it"},editSubMenu:"Edit",edit:{Undo:"Undo",Redo:"Redo"},viewSubMenu:"View",view:{NavigationView:"Navigation View",TwoDimensionalView:"2D View",ResetView:"Reset",ZoomIn:"Zoom In",ZoomOut:"Zoom Out",AutoRotate:"Auto Rotate",ShowShadow:"Show Shadow",ShowSurfaceShininess:"Show Surface Shininess",TranslucentFloatingWindows:"Translucent Floating Windows",accessoriesSubMenu:"Accessories",accessories:{SiteInformation:"Site Information",DesignInformation:"Design Information",Instruction:"Instruction",StickyNote:"Sticky Note",Note:"Note"}},settingsSubMenu:"Settings",settings:{WeatherData:"Weather Data",DiurnalTemperature:"Diurnal Temperature",Heliodon:"Heliodon",SunAndTime:"Sun & Time",CustomSolarPanels:"Custom Solar Panels",CustomizeSolarPanel:"Customize Solar Panel"},benchmarksSubMenu:"Benchmarks",benchmarks:{SolarRadiationPredictionVsMeasurement:"Solar Radiation Prediction vs. Measurement",BESTESTCase600:"Building Energy Simulation Test: BESTEST Case 600",BESTESTCase610:"Building Energy Simulation Test: BESTEST Case 610",BESTESTCase620:"Building Energy Simulation Test: BESTEST Case 620",BESTESTCase630:"Building Energy Simulation Test: BESTEST Case 630"},graph:{LineWidth:"Line Width",SymbolSize:"Symbol Size",BarCategoryGap:"Bar Category Gap",ShowHorizontalGridLines:"Show Horizontal Grid Lines",ShowVerticalGridLines:"Show Vertical Grid Lines"},analysisSubMenu:"Analysis",physicsSubMenu:"Physics",physics:{DailySolarRadiationHeatmap:"Daily Solar Radiation Heatmap",SolarRadiationHeatmapOptions:"Solar Radiation Heatmap Options",SolarRadiationHeatmapGridCellSize:"Solar Radiation Heatmap Grid Cell Size",SolarRadiationHeatmapMaxValue:"Solar Radiation Heatmap Maximum Value",SolarRadiationHeatmapNoAnimation:"No Animation for Static Model",ReflectionHeatmap:"Reflection Heatmap"},sensorSubMenu:"Sensor",sensor:{CollectDailyData:"Collect Daily Data",CollectYearlyData:"Collect Yearly Data",SensorSimulationNoAnimation:"No Animation for Collecting Sensor Data"},buildingSubMenu:"Building",building:{AnalyzeDailyBuildingEnergy:"Analyze Daily Building Energy",AnalyzeYearlyBuildingEnergy:"Analyze Yearly Building Energy",EnergyAnalysisOptions:"Energy Analysis Options",EnergyGridCellSize:"Energy Grid Cell Size",BuildingEnergySimulationNoAnimation:"No Animation for Building Energy Simulation"},solarPanelSubMenu:"Solar Panel",solarPanel:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield",AnalyzeVisibility:"Analyze Visibility",PanelDiscretization:"Panel Discretization",Exact:"Exact",Approximate:"Approximate",EnergyGridCellSize:"Energy Grid Cell Size",VisibilityGridCellSize:"View Factor Grid Cell Size",EnergyAnalysisOptions:"Energy Analysis Options",VisibilityAnalysisOptions:"Visibility Analysis Options",SolarPanelSimulationNoAnimation:"No Animation for Solar Panel Simulation"},parabolicTroughSubMenu:"Parabolic Trough",parabolicTrough:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield"},parabolicDishSubMenu:"Parabolic Dish",parabolicDish:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield"},fresnelReflectorSubMenu:"Fresnel Reflector",fresnelReflector:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield"},heliostatSubMenu:"Heliostat",heliostat:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield"},solarUpdraftTowerSubMenu:"Solar Updraft Tower",solarUpdraftTower:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield",SolarUpdraftTowerSimulationNoAnimation:"No Animation for Solar Updraft Tower Simulation"},tutorialsSubMenu:"Tutorials",solarEnergyScienceSubMenu:"Solar Science",solarEnergyScienceTutorials:{SunAngles:"Sun Angles Relative to an Observer on the Ground",InsolationAndClimate:"Insolation and Climate",SolarRadiationToBox:"Solar Radiation to a Box"},buildingScienceSubMenu:"Building Science",buildingScienceTutorials:{ThermalEnvelopeVsBuildingEnvelope:"Thermal Envelope vs. Building Envelope",EffectOfSizeOnBuildingEnergy:"Effect of Size on Building Energy",EffectOfOrientationOnBuildingEnergy:"Effect of Orientation on Building Energy",EffectOfInsulationOnBuildingEnergy:"Effect of Insulation on Building Energy",EffectOfRoofColorOnBuildingEnergy:"Effect of Roof Color on Building Energy",EffectOfEavesOverhangLengthOnBuildingEnergy:"Effect of Eaves Overhang Length on Building Energy",EffectOfWindowSHGCOnBuildingEnergy:"Effect of Window Solar Heat Gain on Building Energy",EffectOfThermostatSetpointOnBuildingEnergy:"Effect of Thermostat Setpoint on Building Energy",EffectOfSolarPanelsOnBuildingEnergy:"Effect of Solar Panels on Building Energy",EffectOfGroundTemperatureOnBuildingEnergy:"Effect of Ground Temperature on Building Energy",EffectOfTreesOnBuildingEnergy:"Effect of Trees on Building Energy"},buildingDesignSubMenu:"Building Design",buildingDesignTutorials:{CapeCodStyleHouseWithShedDormer:"Cape Cod Style House with Shed Dormer",MansardRoofWithDormers:"Mansard Roof with Dormers",GableRoofVsHipRoof:"Gable Roof vs. Hip Roof",ColonialVsSaltbox:"Colonial vs. Saltbox",GambrelRoofVsMansardRoof:"Gambrel Roof vs. Mansard Roof",CombinationRoofVsBonnetRoof:"Combination Roof vs. Bonnet Roof",DutchGableRoof:"Dutch Gable Roof",GableAndValleyRoof:"Gable and Valley Roof",ClerestoryRoof:"Clerestory Roof",MonitorRoof:"Monitor Roof",AFrameHouse:"A-Frame House",HalfTimberedHouse:"Half-Timbered House",AllBasicRoofTypes:"All Basic Roof Types"},photovoltaicSolarPowerSubMenu:"Photovoltaic Solar Power",photovoltaicSolarPowerTutorials:{EffectOfTiltAngleOfSolarPanel:"Effect of Tilt Angle of a Solar Panel",EffectOfAzimuthOfSolarPanel:"Effect of Azimuth of a Solar Panel",SolarPanelTypes:"Solar Panel Types",DefineYourOwnSolarPanels:"Define Your Own Solar Panels",VerticalBifacialSolarPanels:"Vertical Bifacial Solar Panels",CompareMonofacialAndBifacialSolarPanels:"Monofacial vs. Bifacial Solar Panels",SolarTrackers:"Solar Trackers",CoveringGroundWithSolarPanels:"Why Just Covering the Ground with Solar Panels is not a Good Idea",InterRowSpacingOfSolarPanelArray:"Effect of Inter-Row Spacing in a Solar Panel Array",EffectOfOrientationOfSolarPanels:"Effect of Orientation of Solar Panels",SolarPanelArrayAutomaticLayout:"Solar Panel Array Automatic Layout"},concentratedSolarPowerSubMenu:"Concentrated Solar Power",concentratedSolarPowerTutorials:{EffectOfAzimuthOfParabolicTrough:"Effect of Azimuth of a Parabolic Trough",EffectOfLatusRectumOfParabolicTrough:"Effect of Latus Rectum of a Parabolic Trough",FocusSunlightWithParabolicDish:"Focus Sunlight with a Parabolic Dish",LinearFresnelReflectors:"Linear Fresnel Reflectors",EffectOfAbsorberPipeHeightForLinearFresnelReflectors:"Effect of Absorber Pipe Height for Linear Fresnel Reflectors",EffectOfAzimuthOfLinearFresnelReflectors:"Effect of Azimuth of Linear Fresnel Reflectors",LinearFresnelReflectorsWithTwoAbsorbers:"Linear Fresnel Reflectors with Two Absorbers",CosineEfficiencyOfHeliostats:"Cosine Efficiency of Heliostats",ShadowingAndBlockingOfHeliostats:"Shadowing and Blocking of Heliostats",EffectSolarPowerTowerHeight:"Effect of Solar Power Tower Height",SolarPowerTower:"Solar Power Tower"},otherTypesOfSolarPowerSubMenu:"Other Types of Solar Power",otherTypesOfSolarPowerTutorials:{SolarWaterHeaters:"Solar Water Heaters",SolarUpdraftTower:"Solar Updraft Tower"},windPowerSubMenu:"Wind Power",windPowerTutorials:{EffectOfBladeNumberOfWindTurbine:"Effect of Blade Number of Wind Turbine",EffectOfPitchAngleOfWindTurbineBlades:"Effect of Pitch Angle of Wind Turbine Blades",BirdSafeBladeDesign:"Bird-Safe Blade Design",OffshoreWindFarm:"Offshore Wind Farm"},colocationSubMenu:"Colocation",colocationTutorials:{AgricultureSolarWindColocation:"Agriculture-Solar-Wind Colocation"},generativeDesignSubMenu:"Generative Design",generativeDesignTutorials:{MonofacialSolarPanelArrayTiltAngle:"The Tilt Angle of a Monofacial Solar Panel Array",BifacialSolarPanelArrayTiltAngle:"The Tilt Angle of a Bifacial Solar Panel Array",OutputOfSolarPanelArrayInDifferentPlaces:"The Output of a Solar Panel Array in Different Places",SimpleSolarFarmParetoFront:"The Pareto Front for Designing a Simple Solar Farm"},examplesSubMenu:"Examples",solarEnergySubMenu:"Solar Energy",solarEnergyExamples:{SunBeamAndHeliodon:"Sun Beam and Heliodon",RooftopSolarPanels:"Rooftop Solar Panels",NevadaSolarOneParabolicTroughArray:"Nevada Solar One Parabolic Trough Array",TooeleParabolicDishArray:"Tooele Parabolic Dish Array",PS10SolarPowerTower:"PS10 Solar Power Tower",TucsonLinearFresnelReflectors:"Tucson Linear Fresnel Reflectors",SolarCanopyFormFactors:"Solar Canopy Form Factors",SolarCanopyOverBleachers:"Solar Canopy Over Bleachers",SolarCanopyOverGarage:"Solar Canopy Over Garage",SolarBusStop:"Solar Bus Stop",SolarFacadeTesla:"Tesla Solar Façade",BuildingIntegratedPhotovoltaics:"Building-Integrated Photovoltaics",Floatovoltaics:"Floatovoltaics",Agrivoltaics:"Agrivoltaics",VegetativeBuffer:"Vegetative Buffer",RainbowSwashSolarFarmBostonMA:"Rainbow Swash Solar Farm in Boston, MA",MickeyMouseSolarFarmOrlandoFL:"Mickey Mouse Solar Farm in Orlando, FL",SolarPanelsOverCanalBakersfieldCA:"Hypothetical Solar Panels Over Canal in Bakersfield, CA",SolarNoiseBarrierLexingtonMA:"Hypothetical Solar Noise Barrier in Lexington, MA",HSATSolarTrackersRaleighNC:"Horizontal Single Axis Trackers (HSAT) in Raleigh, NC",AADATSolarTrackersLancasterCA:"Azimuth–Altitude Dual Axis Trackers (AADAT) in Lancaster, CA",SolarUpdraftTowerInCity:"Solar Updraft Tower in City"},builtEnvironmentSubMenu:"Built Environment",residentialBuildingsSubMenu:"Residential Buildings",residentialBuildingExamples:{ColonialHouse:"Colonial House",DutchColonialHouse:"Dutch Colonial House",TShapedHouse:"T-Shaped House",CapeCodHouseWithGarage:"Cape Cod House with Garage",Solarium:"Solarium",Church1:"Church 1",Cathedral1:"Cathedral 1",Cathedral2:"Cathedral 2",Mosque1:"Mosque 1",AdobeTaosHouse:"Adobe Taos House",RanchHouse:"Ranch House",BonnetHouse:"Bonnet House",BarnStyleHouse:"Barn Style House",ModernHouse:"Modern House",ButterflyRoofHouse:"Butterfly Roof House"},commercialBuildingsSubMenu:"Commercial Buildings",commercialBuildingExamples:{WhiteHouse:"White House",HaroldWashingtonCollege:"Harold Washington College",BilimMersinTurkiye:"BILIM, Mersin, Turkiye",SpanishStyleHotel:"Spanish Style Hotel",ApartmentBuilding:"Apartment Building",OfficeBuilding:"Office Building",Hotel:"Hotel"},buildingComplexesSubMenu:"Building Complexes",buildingComplexExamples:{SouthBurlingtonHighSchoolVermont:"South Burlington High School, VT",MescaleroApacheSchoolNewMexico:"Mescalero Apache School, NM"},urbanPlanningSubMenu:"Urban Planning",urbanPlanningExamples:{CityBlockHeatmap:"City Block Heatmap",ChicagoSkyline:"Chicago Skyline"},otherBuildingsSubMenu:"Other Buildings",otherBuildingExamples:{Greenhouse:"Greenhouse",Pavilion:"Pavilion in a Park",OctagonalPagoda:"Octagonal Pagoda",OceanFront:"Ocean Front",EgyptianPyramids:"Egyptian Pyramids",MayanPyramid:"Mayan Pyramid",SiOSePol:"Si-o-se-pol",StackedCuboids:"Stacked Cuboids"},artificialIntelligenceSubMenu:"Artificial Intelligence",artificialIntelligenceExamples:{OptimizingTiltAngleOfOneSolarPanelRow:"Optimizing the Tilt Angle of a Solar Panel Row",OptimizingTiltAnglesOfMultipleSolarPanelRows:"Optimizing the Tilt Angles of Multiple Solar Panel Rows",SolarFarmGenerativeDesign:"Solar Farm Generative Design",SolarFarmGenerativeDesignWithBlock:"Solar Farm Generative Design in the Presence of a Block",FitchburgSolarFarmGenerativeDesign:"Fitchburg Solar Farm Generative Design"},languageSubMenu:"Language",publicSubMenu:"Public",ModelsGallery:"Models Gallery",ModelsMap:"Models Map",AboutUs:"About Us"},avatarMenu:{AccountSettings:"Account Settings",PrivacyStatementTitle:"User Privacy Protection Statement",PrivacyStatement:"When you sign in, your Google ID is used to create and access your Aladdin account. Only a random alphanumeric string is stored in our database as a reference. No personally identifiable data such as your name or email is ever gathered. For more information, see our ",SignIn:"Sign In",SignInAsMe:"Sign in as me",SignInAnonymously:"Sign in anonymously",SignOut:"Sign Out",IfYouAreAStudent:"If you are a student"},skyMenu:{Axes:"Axes",Theme:"Theme",ThemeDefault:"Default",ThemeDesert:"Desert",ThemeDune:"Dune",ThemeForest:"Forest",ThemeGrassland:"Grassland",ThemeHill:"Hill",ThemeLake:"Lake",ThemeMountain:"Mountain",ThemeRural:"Rural",SunlightAttenuationCoefficientInAir:"Sunlight Attenuation Coefficient in Air",ConvectiveCoefficientOfAir:"Convective Coefficient of Air",HighestTemperatureTimeInMinutes:"Highest Temperature Time (Minutes)",SelectSunAnglesToShow:"Select Sun Angles to Show",ShowAzimuthAngle:"Show Azimuth Angle",ShowElevationAngle:"Show Elevation Angle",ShowZenithAngle:"Show Zenith Angle",DirectLightBrightnessAtNoon:"Direct Light Brightness at Noon",AmbientLightBrightnessAtNoon:"Ambient Light Brightness at Noon"},groundMenu:{MonthlyIrradianceLoss:"Monthly Irradiance Loss",Vegetation:"Vegetation",LeafOutDay:"Leaf-Out Day",LeafOffDay:"Leaf-Off Day",Albedo:"Albedo",ImageOnGround:"Image on Ground",WaterSurface:"Water Surface",RemoveAllUnlockedTrees:"Remove All Unlocked Trees",RemoveAllUnlockedFlowers:"Remove All Unlocked Flowers",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",RemoveAllUnlockedPeople:"Remove All Unlocked People",RemoveAllUnlockedFoundations:"Remove All Unlocked Foundations",RemoveAllUnlockedCuboids:"Remove All Unlocked Cuboids",DoYouReallyWantToRemoveAllPeople:"Do you really want to remove all the people who are not locked",DoYouReallyWantToRemoveAllTrees:"Do you really want to remove all the trees that are not locked",DoYouReallyWantToRemoveAllFlowers:"Do you really want to remove all the flowers that are not locked",DoYouReallyWantToRemoveAllSolarPanels:"Do you really want to remove all the solar panels that are not locked",DoYouReallyWantToRemoveAllFoundations:"Do you really want to remove all the foundations that are not locked",DoYouReallyWantToRemoveAllCuboids:"Do you really want to remove all the cuboids that are not locked",LockAllUnlockedElements:"Lock All Unlocked Elements",UnlockAllLockedElements:"Unlock All Locked Elements"},labelSubMenu:{Label:"Label",LabelText:"Label Text",LabelHeight:"Label Height",LabelSize:"Label Size",LabelFontSize:"Font Size",LabelColor:"Label Color",KeepShowingLabel:"Keep Showing Label"},foundationMenu:{RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",RemoveAllUnlockedParabolicTroughs:"Remove All Unlocked Parabolic Troughs",RemoveAllUnlockedParabolicDishes:"Remove All Unlocked Parabolic Dishes",RemoveAllUnlockedFresnelReflectors:"Remove All Unlocked Fresnel Reflectors",RemoveAllUnlockedHeliostats:"Remove All Unlocked Heliostats",RemoveAllUnlockedWindTurbines:"Remove All Unlocked Wind Turbines",RemoveAllUnlockedSensors:"Remove All Unlocked Sensors",RemoveAllUnlockedLights:"Remove All Unlocked Lights",RemoveAllUnlockedWalls:"Remove All Unlocked Walls",RemoveAllUnlockedWindows:"Remove All Unlocked Windows",RemoveAllUnlockedDoors:"Remove All Unlocked Doors",RemoveAllUnlockedPolygons:"Remove All Unlocked Polygons",RemoveAllUnlockedHumans:"Remove All Unlocked Humans",RemoveAllUnlockedTrees:"Remove All Unlocked Trees",RemoveAllUnlockedFlowers:"Remove All Unlocked Flowers",Racks:"Racks",Texture01:"Texture 1",Texture02:"Texture 2",Texture03:"Texture 3",Texture04:"Texture 4",Texture05:"Texture 5",Texture06:"Texture 6",Texture07:"Texture 7",Texture08:"Texture 8",Texture09:"Texture 9",Texture10:"Texture 10",SolarPanels:"Solar Panels",SolarPanelArray:"Solar Panel Array",DoYouReallyWantToRemoveAllSolarPanelsOnFoundation:"Do you really want to remove all the solar panels on this foundation that are not locked",ParabolicTroughs:"Parabolic Troughs",DoYouReallyWantToRemoveAllParabolicTroughsOnFoundation:"Do you really want to remove all the parabolic troughs on this foundation that are not locked",ParabolicDishes:"Parabolic Dishes",DoYouReallyWantToRemoveAllParabolicDishesOnFoundation:"Do you really want to remove all the parabolic dishes on this foundation that are not locked",FresnelReflectors:"Fresnel Reflectors",DoYouReallyWantToRemoveAllFresnelReflectorsOnFoundation:"Do you really want to remove all the Fresnel reflectors on this foundation that are not locked",Heliostats:"Heliostats",DoYouReallyWantToRemoveAllHeliostatsOnFoundation:"Do you really want to remove all the heliostats on this foundation that are not locked",WindTurbines:"Wind Turbines",DoYouReallyWantToRemoveAllWindTurbinesOnFoundation:"Do you really want to remove all the wind turbines on this foundation that are not locked",Sensors:"Sensors",DoYouReallyWantToRemoveAllSensorsOnFoundation:"Do you really want to remove all the sensors on this foundation that are not locked",Lights:"Lights",DoYouReallyWantToRemoveAllLightsOnFoundation:"Do you really want to remove all the lights on this foundation that are not locked",Walls:"Walls",DoYouReallyWantToRemoveAllWallsOnFoundation:"Do you really want to remove all the walls on this foundation that are not locked",Windows:"Windows",DoYouReallyWantToRemoveAllWindowsOnFoundation:"Do you really want to remove all the windows on this foundation that are not locked",Doors:"Doors",DoYouReallyWantToRemoveAllDoorsOnFoundation:"Do you really want to remove all the doors on this foundation that are not locked",Polygons:"Polygons",DoYouReallyWantToRemoveAllPolygonsOnFoundation:"Do you really want to remove all the polygons on this foundation that are not locked",Humans:"Humans",DoYouReallyWantToRemoveAllHumansOnFoundation:"Do you really want to remove all the humans on this foundation who are not locked",Trees:"Trees",DoYouReallyWantToRemoveAllTreesOnFoundation:"Do you really want to remove all the trees on this foundation that are not locked",Flowers:"Flowers",DoYouReallyWantToRemoveAllFlowersOnFoundation:"Do you really want to remove all the flowers on this foundation that are not locked",OnlyThisFoundation:"Only This Foundation",AllConnectedFoundations:"All Connected Foundations",AllSelectedFoundations:"All Selected Foundations",AllFoundations:"All Foundations",AddPolygon:"Add Polygon",SolarStructure:"Solar Structure",GroupMaster:"Group Master",LockAllUnlockedElementsOnThisFoundation:"Lock All Unlocked Elements on This Foundation",UnlockAllLockedElementsOnThisFoundation:"Unlock All Locked Elements on This Foundation",GroundFloorRValue:"Ground Floor R-Value",OnlyThisGroundFloor:"Only This Ground Floor",AllGroundFloors:"All Ground Floors"},solarPowerTowerMenu:{ReceiverTowerForHeliostats:"Receiver Tower for Heliostats",ReceiverTowerPhysicalProperties:"Physical Properties of Receiver Tower",ReceiverTowerHeight:"Height of Receiver Tower",ReceiverTowerRadius:"Radius of Receiver Tower",ReceiverAbsorptance:"Absorptance of Receiver",ReceiverOpticalEfficiency:"Optical Efficiency of Receiver",ReceiverThermalEfficiency:"Thermal Efficiency of Receiver"},solarAbsorberPipeMenu:{AbsorberPipeForFresnelReflectors:"Absorber Pipe for Fresnel Reflectors",AbsorberPipePhysicalProperties:"Physical Properties of Absorber Pipe",AbsorberHeight:"Height of Absorber Pipe",AbsorberApertureWidth:"Aperture Width of Absorber Pipe",AbsorberPipePoleNumber:"Pole Number for Absorber Pipe",AbsorberAbsorptance:"Absorptance of Absorber",AbsorberOpticalEfficiency:"Optical Efficiency of Absorber",AbsorberThermalEfficiency:"Thermal Efficiency of Absorber"},solarUpdraftTowerMenu:{SolarUpdraftTower:"Solar Updraft Tower",SolarUpdraftTowerPhysicalProperties:"Physical Properties of Solar Updraft Tower",SolarUpdraftTowerChimneyHeight:"Solar Updraft Tower Chimney Height",SolarUpdraftTowerChimneyRadius:"Solar Updraft Tower Chimney Radius",SolarUpdraftTowerCollectorHeight:"Solar Updraft Tower Collector Height",SolarUpdraftTowerCollectorRadius:"Solar Updraft Tower Collector Radius",SolarUpdraftTowerCollectorTransmissivity:"Solar Updraft Tower Collector Transmissivity",SolarUpdraftTowerCollectorEmissivity:"Solar Updraft Tower Collector Emissivity",SolarUpdraftTowerDischargeCoefficient:"Solar Updraft Tower Discharge Coefficient",SolarUpdraftTowerTurbineEfficiency:"Solar Updraft Tower Turbine Efficiency"},cuboidMenu:{Texture01:"Texture 1",Texture02:"Texture 2",Texture03:"Texture 3",Texture04:"Texture 4",Texture05:"Texture 5",Texture06:"Texture 6",Texture07:"Texture 7",Texture08:"Texture 8",Texture09:"Texture 9",Texture10:"Texture 10",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",RemoveAllUnlockedSensors:"Remove All Unlocked Sensors",RemoveAllUnlockedPolygons:"Remove All Unlocked Polygons",RemoveAllUnlockedHumans:"Remove All Unlocked Humans",RemoveAllUnlockedTrees:"Remove All Unlocked Trees",RemoveAllUnlockedFlowers:"Remove All Unlocked Flowers",RemoveAllUnlockedLights:"Remove All Unlocked Lights",Racks:"Racks",SolarPanels:"Solar Panels",DoYouReallyWantToRemoveAllSolarPanelsOnCuboid:"Do you really want to remove all the solar panels on this cuboid that are not locked",Lights:"Lights",DoYouReallyWantToRemoveAllLightsOnCuboid:"Do you really want to remove all the lights on this cuboid that are not locked",Sensors:"Sensors",DoYouReallyWantToRemoveAllSensorsOnCuboid:"Do you really want to remove all the sensors on this cuboid that are not locked",Polygons:"Polygons",DoYouReallyWantToRemoveAllPolygonsOnCuboid:"Do you really want to remove all the polygons on this cuboid that are not locked",Humans:"Humans",DoYouReallyWantToRemoveAllHumansOnCuboid:"Do you really want to remove all the humans on this cuboid who are not locked",Trees:"Trees",DoYouReallyWantToRemoveAllTreesOnCuboid:"Do you really want to remove all the trees on this cuboid that are not locked",Flowers:"Flowers",DoYouReallyWantToRemoveAllFlowersOnCuboid:"Do you really want to remove all the flowers on this cuboid that are not locked",OnlyThisCuboid:"Only This Cuboid",AllCuboidsOnSameSurface:"All Cuboids on Same Surface",AllCuboidsAboveSameBase:"All Cuboids Above Same Base",AllSelectedCuboids:"All Selected Cuboids",AllCuboids:"All Cuboids",OnlyThisSide:"Only This Side",AllSidesOfThisCuboid:"All Sides of This Cuboid",AllSidesOfSelectedCuboids:"All Sides of Selected Cuboids",AllSidesOfAllCuboids:"All Sides of All Cuboids",AddPolygon:"Add Polygon",Stackable:"Stackable",GroupMaster:"Group Master"},polygonMenu:{Texture01:"Texture 1",Texture02:"Texture 2",Texture03:"Texture 3",Texture04:"Texture 4",Texture05:"Texture 5",Texture06:"Texture 6",Texture07:"Texture 7",Texture08:"Texture 8",Texture09:"Texture 9",Texture10:"Texture 10",TextBox:"Text Box",FontOutlineColor:"Font Outline Color",FontOutlineWidth:"Font Outline Width",FontStrokeColor:"Font Stroke Color",FontStrokeWidth:"Font Stroke Width",NoOutline:"No Outline",Shiny:"Shiny",Filled:"Filled",FillTexture:"Fill Texture",FillColor:"Fill Color",Opacity:"Opacity",LineColor:"Line Color",LineWidth:"Line Width",LineStyle:"Line Style",SolidLine:"Solid Line",DashedLine:"Dashed Line",DottedLine:"Dotted Line",InsertVertexBeforeIndex:"Insert Vertex Before Index",InsertVertexAfterIndex:"Insert Vertex After Index",DeleteVertex:"Delete Vertex",OnlyThisPolygon:"Only This Polygon",AllPolygonsOnSurface:"All Polygons on the Same Surface",AllPolygonsAboveFoundation:"All Polygons Above Foundation",AllSelectedPolygons:"All Selected Polygons",AllPolygons:"All Polygons",Layout:"Layout",SolarPanelArrayLayout:"Solar Panel Array Layout",SolarPanelArrayLayoutParametricDesign:"Solar Panel Array Layout: Parametric Design",SolarPanelArrayLayoutGenerativeDesign:"Solar Panel Array Layout: Generative Design",SolarPanelArrayModel:"Solar Panel Model",SolarPanelArrayOrientation:"Orientation",SolarPanelArrayTiltAngle:"Tilt Angle",SolarPanelArrayRowWidth:"Row Width",SolarPanelArrayInterRowSpacing:"Inter-Row Spacing",SolarPanelArrayRowSpacing:"Row Spacing",SolarPanelArrayRowAxis:"Row Axis",SolarPanelArrayLeftRightRowAxis:"Left-Right (Relative)",SolarPanelArrayUpDownRowAxis:"Up-Down (Relative)",SolarPanelArrayEastWestRowAxis:"East-West (Absolute)",SolarPanelArrayNorthSouthRowAxis:"North-South (Absolute)",SolarPanelArrayMargin:"Margin",SolarPanelArrayPoleHeight:"Pole Height",SolarPanelArrayPoleSpacing:"Pole Spacing",SolarPanelArrayTotalYearlyCost:"Total Cost",SolarPanelArrayTotalYearlyRevenue:"Total Revenue",SolarPanelArrayTotalYearlyYield:"Total Yield",SolarPanelArrayMeanYearlyYield:"Mean Yield",SolarPanelArrayYearlyProfit:"Profit",LayoutNotAcceptedCheckYourParameters:"This layout is not accepted. Please check your parameters."},optimizationMenu:{Optimization:"Optimization",Parameters:"Parameters",Variables:"Variables",Constants:"Constants",GeneticAlgorithm:"Genetic Algorithm",GeneticAlgorithmSettings:"Genetic Algorithm Settings",ParticleSwarmOptimization:"Particle Swarm Optimization",ParticleSwarmOptimizationSettings:"Particle Swarm Optimization Settings",SolarPanelTiltAngleOptimization:"Solar Panel Tilt Angle Optimization",SolarPanelArrayLayout:"Solar Panel Array Layout",Generation:"Generation",Gene:"Gene",NormalizedVariables:"Normalized Variables",Objective:"Objective",ObjectiveFunctionDailyTotalYield:"Daily Total Yield",ObjectiveFunctionYearlyTotalYield:"Yearly Total Yield",ObjectiveFunctionDailyMeanYield:"Daily Mean Yield",ObjectiveFunctionYearlyMeanYield:"Yearly Mean Yield",ObjectiveFunctionDailyProfit:"Daily Profit",ObjectiveFunctionYearlyProfit:"Yearly Profit",GeneticAlgorithmSelectionMethod:"Genetic Algorithm Selection Method",RouletteWheel:"Roulette Wheel",Tournament:"Tournament",SearchMethod:"Search Method",GlobalSearchUniformSelection:"Global Search Uniform Selection",LocalSearchRandomOptimization:"Local Search Random Optimization",PopulationSize:"Population Size",MaximumGenerations:"Maximum Generations",SelectionRate:"Selection Rate",CrossoverRate:"Crossover Rate",MutationRate:"Mutation Rate",Step:"Step",SwarmSize:"Swarm Size",MaximumSteps:"Maximum Steps",MaximumVelocity:"Maximum Velocity",InertiaWeight:"Inertia Weight",CognitiveCoefficient:"Cognitive Coefficient",SocialCoefficient:"Social Coefficient",ConvergenceThreshold:"Convergence Threshold for Termination",LocalSearchRadius:"Local Search Radius",RowsPerRackRange:"Range for Rows per Rack",TiltAngleRange:"Range for Tilt Angle",InterRowSpacingRange:"Range for Inter-Row Spacing",ClickTargetPolygonToActivate:"Click Target Polygon to Activate",ClickTargetFoundationToActivate:"Click Target Foundation to Activate"},treeMenu:{ShowModel:"Show Model",Flip:"Flip",Type:"Type",Spread:"Spread"},flowerMenu:{Flip:"Flip",Type:"Type",Spread:"Spread"},peopleMenu:{ChangePerson:"Change Person",Flip:"Flip",Observer:"Observer",ViewFromThisPerson:"View from This Person"},lightMenu:{Color:"Color",Intensity:"Intensity",Decay:"Decay",MaximumDistance:"Distance",Inside:"Inside"},solarCollectorMenu:{Coordinates:"Coordinates",RelativeXCoordinateOfCenter:"Relative X Coordinate of Center",RelativeYCoordinateOfCenter:"Relative Y Coordinate of Center",RelativeAzimuth:"Relative Azimuth",Pole:"Pole",PoleHeight:"Pole Height",PoleRadius:"Pole Radius",ExtraPoleHeight:"Extra Pole Height",ExtraPoleHeightInAdditionToHalfWidth:"Extra Pole Height in Addition to Half Width",DrawSunBeam:"Draw Sun Beam"},concentratedSolarPowerCollectorMenu:{ReflectorReflectance:"Reflector Reflectance",ReceiverAbsorptance:"Receiver Absorptance",ReflectorOpticalEfficiency:"Reflector Optical Efficiency",ReceiverThermalEfficiency:"Receiver Thermal Efficiency"},solarPanelMenu:{ElectricalProperties:"Electrical Properties",InverterEfficiency:"Inverter Efficiency",InverterEfficiencyExplained:"The efficiency for converting direct current (DC) to alternating current (AC).",DcToAcSizeRatio:"DC-to-AC Size Ratio",DcToAcSizeRatioExplained:"The ratio of the solar panels' DC-rated size to the inverter's AC-rated size.",ChangePvModel:"Change PV Model",Orientation:"Orientation",Portrait:"Portrait",Landscape:"Landscape",FrameColor:"Frame Color",Panels:"panels",PanelsWide:"panels wide",PanelsLong:"panels long",TiltAngle:"Tilt Angle",SouthFacingIsPositive:"South facing is positive",Tracker:"Tracker",SolarTrackerFollowsSun:"A tracker follows the sun to increase solar panel outputs.",PoleSpacing:"Pole Spacing",NoTracker:"No Tracker",HorizontalSingleAxisTracker:"Horizontal Single Axis Tracker",VerticalSingleAxisTracker:"Vertical Single Axis Tracker",AltazimuthDualAxisTracker:"Altazimuth Dual Axis Tracker",OnlyThisSolarPanel:"Only This Solar Panel",AllSolarPanelsOnSurface:"All Solar Panels on the Same Surface",AllSolarPanelsAboveFoundation:"All Solar Panels Above the Same Foundation",AllSelectedSolarPanels:"All Selected Solar Panels",AllSolarPanels:"All Solar Panels"},solarWaterHeaterMenu:{OnlyThisSolarWaterHeater:"Only This Solar Water Heater",AllSolarWaterHeatersOnSurface:"All Solar Water Heaters on the Same Surface",AllSolarWaterHeatersAboveFoundation:"All Solar Water Heaters Above the Same Foundation",AllSelectedSolarWaterHeaters:"All Selected Solar Water Heaters",AllSolarWaterHeaters:"All Solar Water Heaters"},pvModelPanel:{SolarPanelSpecs:"Solar Panel Specs",General:"General",Electrical:"Electrical",CellCountInXDirection:"Cell Count in X Direction",CellCountInYDirection:"Cell Count in Y Direction",Weight:"Weight",Kilogram:"kg",RatedVoltage:"Rated Voltage",RatedCurrent:"Rated Current",OpenCircuitVoltage:"Open-Circuit Voltage",ShortCircuitCurrent:"Short-Circuit Current",MaximumRatedPower:"Maximum Rated Power",Model:"Model",PanelSize:"Panel Size",Cells:"Cells",CellType:"Cell Type",Monocrystalline:"Monocrystalline",Polycrystalline:"Polycrystalline",ThinFilm:"Thin Film",Bifacial:"Bifacial",BifacialityFactor:"Bifaciality Factor",Black:"Black",Blue:"Blue",ShadeTolerance:"Shade Tolerance",SolarCellEfficiency:"Solar Cell Efficiency",NominalOperatingCellTemperature:"Nominal Operating Cell Temperature",TemperatureCoefficientOfPmax:"Temperature Coefficient of Pmax",AddedCustomSolarPanels:"Added",DisplayThisCustomSolarPanel:"Display this custom solar panel",ExportThisCustomSolarPanel:"Export this custom solar panel",ImportCustomSolarPanelFromClipboard:"Import custom solar panel from clipboard",CustomSolarPanelExportedToClipboard:"Custom solar panel exported to Clipboard",DoYouReallyWantToRemoveThisCustomSolarPanel:"Do you really want to remove this custom solar panel",MakeSureThisCustomSolarPanelIsNotUsed:"Make sure this custom solar panel is not used in the current model",ThisCustomSolarPanelIsUsed:"This custom solar panel is used in the current model",DoYouReallyWantToImportCustomSolarPanel:"Do you really want to import a custom solar panel",ExistingSettingsWillBeOverwritten:"The existing settings will be overwritten",CannotAddCustomSolarPanel:"Cannot add custom solar panel",CustomSolarPanelMustHaveModelName:"A custom solar panel must have a model name",CustomSolarPanelExists:"A custom solar panel with this name already exists",FailInImportingDataFromClipboard:"Failed in importing data from the clipboard"},parabolicTroughMenu:{ModuleLength:"Module Length",Modules:"modules",ModulesLong:"modules long",LatusRectum:"Latus Rectum",OnlyThisParabolicTrough:"Only This Parabolic Trough",AllParabolicTroughsAboveFoundation:"All Parabolic Troughs Above the Same Foundation",AllSelectedParabolicTroughs:"All Selected Parabolic Troughs",AllParabolicTroughs:"All Parabolic Troughs"},fresnelReflectorMenu:{AbsorberPipe:"Absorber Pipe",SelectAbsorberToReflectSunlightTo:"Select Absorber to Reflect Sunlight to",ModuleLength:"Module Length",Modules:"modules",ModulesLong:"modules long",OnlyThisFresnelReflector:"Only This Fresnel Reflector",AllFresnelReflectorsAboveFoundation:"All Fresnel Reflectors Above the Same Foundation",AllSelectedFresnelReflectors:"All Selected Fresnel Reflectors",AllFresnelReflectors:"All Fresnel Reflectors"},heliostatMenu:{Tower:"Tower",SelectTowerToReflectSunlightTo:"Select Tower to Reflect Sunlight to",OnlyThisHeliostat:"Only This Heliostat",AllHeliostatsAboveFoundation:"All Heliostats Above the Same Foundation",AllSelectedHeliostats:"All Selected Heliostats",AllHeliostats:"All Heliostats"},parabolicDishMenu:{ReceiverStructure:"Receiver Structure",CentralPole:"Central Pole",CentralPoleWithTripod:"Central Pole with Tripod",Quadrupod:"Quadrupod",RimDiameter:"Rim Diameter",LatusRectum:"Latus Rectum",ExtraPoleHeightInAdditionToRadius:"Extra Pole Height in Addition to Radius",OnlyThisParabolicDish:"Only This Parabolic Dish",AllParabolicDishesAboveFoundation:"All Parabolic Dishes Above the Same Foundation",AllSelectedParabolicDishes:"All Selected Parabolic Dishes",AllParabolicDishes:"All Parabolic Dishes"},windTurbineMenu:{BirdSafeDesign:"Bird-Safe Design",BirdSafeNone:"None",BirdSafeBicolor:"Bicolor",BirdSafeStriped:"Striped",Rotor:"Rotor",BladeNumber:"Blade Number",RotorInitialAngle:"Rotor Initial Angle",RotorBladeDesign:"Rotor Blade Design",RotorBladeRadius:"Rotor Blade Radius",RotorBladePitchAngle:"Rotor Blade Pitch Angle",RelativeYawAngle:"Relative Yaw Angle",MaximumChordLength:"Maximum Chord Length",Tower:"Tower",TowerHeight:"Tower Height",TowerRadius:"Tower Radius",HubDesign:"Hub Design",HubRadius:"Hub Radius",HubLength:"Hub Length",OnlyThisWindTurbine:"Only This Wind Turbine",AllWindTurbinesAboveFoundation:"All Wind Turbines Above the Same Foundation",AllSelectedWindTurbines:"All Selected Wind Turbines",AllWindTurbines:"All Wind Turbines"},wallMenu:{TextureDefault:"Default",Texture01:"Texture 1",Texture02:"Texture 2",Texture03:"Texture 3",Texture04:"Texture 4",Texture05:"Texture 5",Texture06:"Texture 6",Texture07:"Texture 7",Texture08:"Texture 8",Texture09:"Texture 9",Texture10:"Texture 10",SizeOfWall:"Size of Wall",OnlyThisWall:"Only This Wall",AllConnectedWalls:"All Connected Walls",AllWallsAboveFoundation:"All Walls Above the Same Foundation",AllSelectedWalls:"All Selected Walls",AllWalls:"All Walls",Windows:"Windows",LockAllUnlockedWindows:"Lock All Unlocked Windows",UnlockAllLockedWindows:"Unlock All Locked Windows",RemoveAllUnlockedWindows:"Remove All Unlocked Windows",DoYouReallyWantToRemoveAllWindowsOnThisWall:"Do you really want to remove all the windows on this wall",Doors:"Doors",LockAllUnlockedDoors:"Lock All Unlocked Doors",UnlockAllLockedDoors:"Unlock All Locked Doors",RemoveAllUnlockedDoors:"Remove All Unlocked Doors",DoYouReallyWantToRemoveAllDoorsOnThisWall:"Do you really want to remove all the doors on this wall",SolarPanels:"Solar Panels",LockAllUnlockedSolarPanels:"Lock All Unlocked Solar Panels",UnlockAllLockedSolarPanels:"Unlock All Locked Solar Panels",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",DoYouReallyWantToRemoveAllSolarPanelsOnThisWall:"Do you really want to remove all the solar panels on this wall",Sensors:"Sensors",LockAllUnlockedSensors:"Lock All Unlocked Sensors",UnlockAllLockedSensors:"Unlock All Locked Sensors",RemoveAllUnlockedSensors:"Remove All Unlocked Sensors",DoYouReallyWantToRemoveAllSensorsOnThisWall:"Do you really want to remove all the sensors on this wall",Lights:"Lights",LockAllUnlockedLights:"Lock All Unlocked Lights",UnlockAllLockedLights:"Unlock All Locked Lights",RemoveAllUnlockedLights:"Remove All Unlocked Lights",DoYouReallyWantToRemoveAllLightsOnThisWall:"Do you really want to remove all the lights on this wall",Polygons:"Polygons",LockAllUnlockedPolygons:"Lock All Unlocked Polygons",UnlockAllLockedPolygons:"Unlock All Locked Polygons",RemoveAllUnlockedPolygons:"Remove All Unlocked Polygons",DoYouReallyWantToRemoveAllPolygonsOnThisWall:"Do you really want to remove all the polygons on this wall",WallStructure:"Wall Structure",DefaultStructure:"Default",StudStructure:"Stud",PillarStructure:"Pillar",Opacity:"Opacity",StructureSpacing:"Structure Spacing",StructureWidth:"Structure Width",StructureThickness:"Structure Thickness",StructureColor:"Structure Color",Color:"Wall Color",Height:"Height",Thickness:"Thickness",Texture:"Texture",AllLightsOnWallInside:"All Lights on Wall Inside",AllLightsOnWallOutside:"All Lights on Wall Outside",Fill:"Fill",Full:"Full",Partial:"Partial",Empty:"Empty",OpenToOutside:"Open to Outside",EavesLength:"Eaves Overhang Length",Parapet:"Parapet",ParapetColor:"Parapet Color",ParapetTexture:"Parapet Texture",ParapetHeight:"Parapet Height",CopingsHeight:"Copings Height",CopingsWidth:"Copings Width"},windowMenu:{OnlyThisWindow:"Only This Window",AllWindowsOnSurface:"All Windows on the Same Surface",AllWindowsAboveFoundation:"All Windows Above the Same Foundation",AllSelectedWindows:"All Selected Windows",AllWindows:"All Windows",Width:"Width",Height:"Height",Setback:"Setback from Exterior Surface",RelativeToWallThickness:"Relative to wall thickness",Mullion:"Mullion",HorizontalMullion:"Horizontal Mullion",VerticalMullion:"Vertical Mullion",MullionWidth:"Mullion Width",HorizontalMullionSpacing:"Horizontal Mullion Spacing",VerticalMullionSpacing:"Vertical Mullion Spacing",MullionColor:"Mullion Color",Tint:"Tint",Opacity:"Opacity",SolarHeatGainCoefficient:"Solar heat gain coefficient (SHGC) = 1 - opacity",Shutter:"Shutter",LeftShutter:"Left Shutter",RightShutter:"Right Shutter",BothShutters:"Both Shutters",ShutterWidth:"Relative Width",ShutterColor:"Shutter Color",Frame:"Frame",FrameWidth:"Frame Width",SillWidth:"Sill Width",Color:"Frame Color",WindowType:"Window Type",Default:"Default",Arched:"Arched",Polygonal:"Polygonal",Interior:"Interior",Empty:"Empty"},roofMenu:{TextureDefault:"Default",Texture01:"Texture 1",Texture02:"Texture 2",Texture03:"Texture 3",Texture04:"Texture 4",Texture05:"Texture 5",Texture06:"Texture 6",Texture07:"Texture 7",OnlyThisRoof:"Only This Roof",AllRoofsAboveFoundation:"All Roofs Above the Same Foundation",AllSelectedRoofs:"All Selected Roofs",AllRoofs:"All Roofs",OnlyThisCeiling:"Only This Ceiling",AllCeilingsAboveFoundation:"All Ceilings Above the Same Foundation",AllCeilings:"All Ceilings",EavesOverhangLength:"Eaves Overhang Length",RafterSpacing:"Rafter Spacing",RafterWidth:"Rafter Width",RafterThickness:"Rafter Thickness",RafterColor:"Rafter Color",RoofColor:"Roof Color",RoofSideColor:"Roof Side Color",GlassTint:"Glass Tint",Opacity:"Opacity",RoofStructure:"Roof Structure",DefaultStructure:"Default",RafterStructure:"Rafter",GlassStructure:"Glass",SolarPanels:"Solar Panels",LockAllUnlockedSolarPanels:"Lock All Unlocked Solar Panels",UnlockAllLockedSolarPanels:"Unlock All Locked Solar Panels",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",DoYouReallyWantToRemoveAllSolarPanelsOnThisRoof:"Do you really want to remove all the solar panels on this roof",Windows:"Windows",LockAllUnlockedWindows:"Lock All Unlocked Windows",UnlockAllLockedWindows:"Unlock All Locked Windows",RemoveAllUnlockedWindows:"Remove All Unlocked Windows",DoYouReallyWantToRemoveAllWindowsOnThisRoof:"Do you really want to remove all the windows on this roof",Sensors:"Sensors",LockAllUnlockedSensors:"Lock All Unlocked Sensors",UnlockAllLockedSensors:"Unlock All Locked Sensors",RemoveAllUnlockedSensors:"Remove All Unlocked Sensors",DoYouReallyWantToRemoveAllSensorsOnThisRoof:"Do you really want to remove all the sensors on this roof",Lights:"Lights",RemoveAllUnlockedLights:"Remove All Unlocked Lights",DoYouReallyWantToRemoveAllLightsOnThisRoof:"Do you really want to remove all the lights on this roof",AllLightsOnRoofInside:"All Lights on Roof Inside",AllLightsOnRoofOutside:"All Lights on Roof Outside",Rise:"Rise",Ceiling:"Ceiling",RoofRValue:"Roof R-Value",CeilingRValue:"Ceiling R-Value"},doorMenu:{TextureDefault:"Default",Texture01:"Texture 1",Texture02:"Texture 2",Texture03:"Texture 3",Texture04:"Texture 4",Texture05:"Texture 5",Texture06:"Texture 6",Texture07:"Texture 7",Texture08:"Texture 8",Texture09:"Texture 9",Texture10:"Texture 10",Texture11:"Texture 11",Texture12:"Texture 12",Texture13:"Texture 13",Texture14:"Texture 14",Texture15:"Texture 15",Texture16:"Texture 16",Texture17:"Texture 17",OnlyThisDoor:"Only This Door",AllDoorsOnWall:"All Doors on the Same Wall",AllDoorsAboveFoundation:"All Doors Above the Same Foundation",AllSelectedDoors:"All Selected Doors",AllDoors:"All Doors",DoorType:"Door Type",Default:"Default",Arched:"Arched",Filled:"Filled",FrameColor:"Frame Color",Interior:"Interior"},siteInfoPanel:{High:"High",Low:"Low"},designInfoPanel:{NumberOfSelectedHeliostats:"Number of selected heliostats",NumberOfSelectedSolarPanels:"Number of selected solar panels",ElectricityGeneratedDailyBySolarPanels:"Electricity generated daily by these solar panels",SceneDiameter:"Scene diameter",BuildingArea:"Building area"},visualizationControlPanel:{ColorContrast:"Color Contrast",FluxScale:"Flux Scale",ClickUpOrDownArrowButtonsToChange:"Click up or down arrow buttons to change"},instructionPanel:{Rotate:"Rotate",DragMouse:"Drag mouse",Zoom:"Zoom",MouseWheelOrKeys:"Rotate mouse wheel or press Ctrl+[ or Ctrl+]",MouseWheelOrKeysMac:"Rotate mouse wheel or press ⌘+[ or ⌘+]",Pan:"Pan",HoldCtrlDragMouse:"Hold Ctrl and drag mouse",HoldMetaDragMouse:"Hold ⌘ and drag mouse",Enter2DMode:"Enter 2D mode",Exit2DMode:"Exit 2D mode",NavigationMode:"Navigation mode",EnableNavigation:"Enable navigation",DisableNavigation:"Disable navigation",MoveForwardBack:"Move forward/back",MoveForwardBackInstruction:"Press W/S",MoveLeftRight:"Move left/right",MoveLeftRightInstruction:"Press A/D",MoveUpDown:"Move up/down",MoveUpDownInstruction:"Press Z/X",Turn:"Turn",TurnInstruction:"Press arrow keys",ResetView:"Reset",AutoRotate:"Auto rotate",StartOrStop:"Press F4 to start or stop"},mapPanel:{ImageOnGround:"Image on Ground",HideAddress:"Hide Address",WeatherStations:"Weather Stations",WeatherStationsNote:"Turn this off to speed up",Coordinates:"Coordinates",Zoom:"Zoom"},visibilityPanel:{SolarPanelVisibility:"Solar Panel Visibility",Observer:"Observer",VantagePoint:"Vantage Point",ItemizedVisibilityByFields:"Itemized by Fields",TotalVisibility:"Total"},sensorPanel:{LightSensor:"Light Sensor",WeatherDataFrom:"Weather Data from"},buildingEnergyPanel:{DailyBuildingEnergy:"Daily Building Energy",YearlyBuildingEnergy:"Yearly Building Energy",Heater:"Heater",AC:"AC",SolarPanel:"Solar Panel",Net:"Net"},solarPanelYieldPanel:{SolarPanelDailyYield:"Solar Panel Daily Yield",SolarPanelYearlyYield:"Solar Panel Yearly Yield",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualSolarPanels:"Show outputs of individual solar panels",Profit:"Profit",TotalCost:"Total Cost",TotalRevenue:"Total Revenue",TotalYield:"Total Yield",MeanYield:"Mean Yield",ModuleCount:"Module Count"},parabolicTroughYieldPanel:{ParabolicTroughDailyYield:"Parabolic Trough Daily Yield",ParabolicTroughYearlyYield:"Parabolic Trough Yearly Yield",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualParabolicTroughs:"Show outputs of individual parabolic troughs"},parabolicDishYieldPanel:{ParabolicDishDailyYield:"Parabolic Dish Daily Yield",ParabolicDishYearlyYield:"Parabolic Dish Yearly Yield",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualParabolicDishes:"Show outputs of individual parabolic dishes"},fresnelReflectorYieldPanel:{FresnelReflectorDailyYield:"Fresnel Reflector Daily Yield",FresnelReflectorYearlyYield:"Fresnel Reflector Yearly Yield",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualFresnelReflectors:"Show outputs of individual Fresnel feflectors"},heliostatYieldPanel:{HeliostatDailyYield:"Heliostat Daily Yield",HeliostatYearlyYield:"Heliostat Yearly Yield",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualHeliostats:"Show outputs of individual heliostats"},updraftTowerYieldPanel:{UpdraftTowerDailyYield:"Solar Updraft Tower Daily Yield",UpdraftTowerYearlyYield:"Solar Updraft Tower Yearly Yield",ChimneyAirTemperature:"Chimney Air Temperature",ChimneyWindSpeed:"Chimney Wind Speed",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualUpdraftTowers:"Show outputs of individual updraft towers"},heliodonPanel:{SunAndTimeSettings:"Sun & Time Settings",SunAngles:"Angles",TwentyFourHours:"24 Hours"},cloudFilePanel:{CopyTitle:"Copy Title",TitleCopiedToClipBoard:"The title was copied to the clip board",SearchByTitle:"Search by title",MyLikes:"My Likes",MyCloudFiles:"My Cloud Files",GenerateLink:"Generate Link",LinkGeneratedInClipBoard:"A link was generated in the clip board",DoYouReallyWantToDelete:"Do you really want to delete",IfSharedOrPublishedRenamingFileBreaksExistingLinks:"If this file has been shared or published, renaming it breaks existing links"},projectListPanel:{CopyTitle:"Copy Title",TitleCopiedToClipBoard:"The title was copied to the clip board",SearchByTitle:"Search by title",MyProjects:"My Projects",GenerateProjectLink:"Generate Project Link",ProjectLinkGeneratedInClipBoard:"A link to the project was generated in the clip board",DoYouReallyWantToDeleteProject:"Do you really want to delete Project",IfSharedOrPublishedRenamingProjectBreaksExistingLinks:"If this project has been shared or published, renaming it breaks existing links"},projectPanel:{ProjectSettings:"Project Settings",ThumbnailImageSize:"Thumbnail Image Size",ProjectByOtherPeople:"Project by Other People",Project:"Project",ProjectType:"Type",ProjectDescription:"Description",MakeDescriptionEditable:"Make this description editable",MakeDescriptionNonEditable:"Make this description non-editable",DoubleClickToMakeDescriptionEditable:"Double-click to make this description editable",SolarPanelArray:"Solar Panel Array",CurateCurrentDesign:"Curate current design",UpdateSelectedDesign:"Update selected design",RemoveSelectedDesign:"Remove selected design",ClickToFlipSortingOrder:"Click to flip the sorting order",DesignNotShownInSolutionSpaceClickToShow:"This design is not shown in solution space; click to show",DesignShownInSolutionSpaceClickToHide:"This design is shown in solution space; click to hide",SolutionSpace:"Solution Space",ChooseSolutionSpace:"Choose solution space",ChooseDataColoring:"Choose data coloring",SameColorForAllDesigns:"Same color for all designs",OneColorForEachDesign:"One color for each design",SolutionSpaceScreenshot:"Take a screenshot of the solution space",ScatterPlotScreenshot:"Take a screenshot of the scatter plot",SingleClickToSelectDoubleClickToOpen:"Single-click to select, double-click to open.",SingleClickToDeselectDoubleClickToOpen:"Single-click to deselect, double-click to open.",GenerateScatterPlot:"Generate Scatter Plot",SelectXAxis:"Select X Axis",SelectYAxis:"Select Y Axis"},accountSettingsPanel:{MyAccountSettings:"My Account Settings",MyID:"My 🆔",ClickToCopyMyID:"Click to copy my ID",IDInClipBoard:"Your ID was copied and is ready to paste.",StoreMyNameInMyFilesWhenSaving:"Store my name in my files when saving",DoYouReallyWantToShowYourNameInYourFiles:"Do you really want to show your display name in your files?",SignFileDisclaimer:"If yes, your display name may be seen by anyone who can access your files.",Likes:"Likes",AllPublished:"All Published",PublishedUnderAliases:"Aliases",UserCount:"User Count",SchoolID:"School ID",ClassID:"Class ID"},weatherPanel:{SunshineHours:"Sunshine"},diurnalTemperaturePanel:{SelectAirTemperatureModel:"Select Air Temperature Model",Sinusoidal:"Sinusoidal"},economicsPanel:{EconomicsParameters:"Economics Parameters",ElectricitySellingPrice:"Electricity Selling Price",OperationalCostPerUnit:"Operational Cost per Unit",SellingPrice:"Selling Price",UnitCost:"Unit Cost"},navigationPanel:{NavigationParameters:"Navigation Parameters",MinimumMoveSpeed:"Minimum Move Speed",MinimumTurnSpeed:"Minimum Turn Speed"},shadowSettingsPanel:{ShadowSettings:"Shadow Settings",ShadowCameraFarDistance:"Shadow Camera Far Distance",ShadowMapSize:"Shadow Map Size",Notes:"Notes",RefreshPageNote:"Refresh the page for the new settings to take effect.",MapSizeWarning:"A large shadow map size may cause Aladdin to crash on some computers."},yearlyLightSensorPanel:{SkyClearness:"Clearness",ShowDaylightResults:"Show daylight results",ShowSkyClearnessResults:"Show sky clearness results",ShowAverageDailySolarRadiation:"Show average daily solar radiation"},analysisManager:{NoSensorForCollectingData:"There is no sensor for collecting data.",NoSolarPanelForAnalysis:"There is no solar panel for analysis.",NoObserverForVisibilityAnalysis:"There is no observer for visibility analysis.",NoSolarWaterHeaterForAnalysis:"There is no solar water heater for analysis.",NoParabolicDishForAnalysis:"There is no parabolic dish for analysis.",NoParabolicTroughForAnalysis:"There is no parabolic trough for analysis.",NoFresnelReflectorForAnalysis:"There is no Fresnel reflector for analysis.",NoHeliostatForAnalysis:"There is no heliostat for analysis.",NoSolarUpdraftTowerForAnalysis:"There is no solar updraft tower for analysis.",NoBuildingForAnalysis:"There is no building for analysis."},toolbar:{CloudFile:"Cloud file",Select:"Select",AddFoundation:"Add Foundation",AddWall:"Add Wall",AddWindow:"Add Window",AddDoor:"Add Door",AddPyramidRoof:"Add Pyramid Roof",AddGableRoof:"Add Gable Roof",AddHipRoof:"Add Hip Roof",AddGambrelRoof:"Add Gambrel Roof",AddMansardRoof:"Add Mansard Roof",AddCuboid:"Add Cuboid",AddSensor:"Add Sensor",AddSolarPanel:"Add Solar Panel",AddSolarWaterHeater:"Add Solar Water Heater",AddBatteryStorage:"Add Battery Storage",AddParabolicDish:"Add Parabolic Dish",AddParabolicTrough:"Add Parabolic Trough",AddFresnelReflector:"Add Fresnel Reflector",AddHeliostat:"Add Heliostat",AddWindTurbine:"Add Horizontal Axis Wind Turbine",AddVerticalAxisWindTurbine:"Add Vertical Axis Wind Turbine",AddLight:"Add Light",AddTree:"Add Tree",AddFlower:"Add Flower",AddPeople:"Add People",DoubleClickToLockThisModeForNextAction:"Double-click to lock this mode for next action",ClickToUnlockThisModeForNextAction:"Click to unlock this mode for next action",ManipulateGroup:"Manipulate a group",ClearScene:"Clear scene",ShowSunAndTimeSettings:"Show sun and time settings",SpatialAnalysisOfEnergy:"Spatial analysis of energy",DoYouReallyWantToClearContent:"Do you really want to clear the content",ClickForMoreButtons:"Click for more buttons"},tooltip:{gotoIFI:"Go to Institute for Future Intelligence",visitAladdinHomePage:"Visit Aladdin Homepage",clickToOpenMenu:"Click to open main menu",clickToAccessAccountSettings:"Click to access account settings"},tree:{Apple:"Apple",Birch:"Birch",Coconut:"Coconut",Dogwood:"Dogwood",Elm:"Elm",FanPalm:"Fan Palm",Linden:"Linden",Magnolia:"Magnolia",Maple:"Maple",Oak:"Oak",Pine:"Pine",Spruce:"Spruce"},flower:{Bellflower:"Bellflower",Boxwood:"Boxwood",CactusCombo1:"Cactus Combo 1",CactusCombo2:"Cactus Combo 2",CactusCombo3:"Cactus Combo 3",CactusCombo4:"Cactus Combo 4",Hibiscus:"Hibiscus",Hosta:"Hosta",Hydrangea:"Hydrangea",Peony:"Peony",RedRose:"Red Rose",Spirea:"Spirea",Sunflower:"Sunflower",TallBush:"Tall Bush",Tulip:"Tulip",WhiteFlower:"White Flower",YellowFlower:"Yellow Flower"},people:{Jaah:"Jaah",Jack:"Jack",Jacob:"Jacob",Jacqueline:"Jacqueline",Jade:"Jade",Jamelia:"Jamelia",James:"James",Jane:"Jane",Jaya:"Jaya",Jaye:"Jaye",Jeanette:"Jeanette",Jedi:"Jedi",Jeff:"Jeff",Jena:"Jena",Jennifer:"Jennifer",Jess:"Jess",Jett:"Jett",Jill:"Jill",Jiya:"Jiya",Joan:"Joan",Jocelyn:"Jocelyn",Joel:"Joel",Joey:"Joey",John:"John",Jonathon:"Jonathon",Jose:"Jose",Joseph:"Joseph",Joshua:"Joshua",Judd:"Judd",Judy:"Judy",Julia:"Julia",Julio:"Julio",Jumapili:"Jumapili",June:"June",Juro:"Juro",Justin:"Justin"},compass:{N:"N",S:"S",W:"W",E:"E"},month:{January:"Jan",February:"Feb",March:"Mar",April:"Apr",May:"May",June:"Jun",July:"Jul",August:"Aug",September:"Sep",October:"Oct",November:"Nov",December:"Dec"},modelsMap:{AllTime:"All Time",SearchByPublisher:"Search by publisher",SearchByLabel:"Search by label",MyPublishedModels:"My Published Models",TotalNumberOfUserPublishedModelsInSelectedPeriod:"Total number of user-published models in the selected period",AllTimeTotal:"All-time total",SortFromOldestToNewest:"Sort from oldest to newest",SortFromNewestToOldest:"Sort from newest to oldest",SitesFound:"sites found",ModelsFoundOnThisSite:"models found on this site",ShowModelsPublishedByThisAuthor:"Show the models published by this author"}}},hpt={translation:{name:{IFI:"未来智能研究所",Aladdin:"阿拉丁",Tagline:"阿拉丁: 探索人工智能时代的设计软件 — 未来智能研究所研发"},cookie:{Statement:"声明:为了改善您的用户体验,阿拉丁采用cookie储存少量数据。",Accept:"同意"},aboutUs:{ProductBroughtToYouBy:"未来智能研究所荣誉出品",TermsOfService:"服务条款",PrivacyPolicy:"隐私政策",Software:"软件",Content:"课件",Research:"研究",Support:"服务",Acknowledgment:"鸣谢",FundingInformation:"本产品的研发承蒙美国国家科学基金会慷慨资助(项目号#2105695,#2131097,#2301164)。本产品的任何观点或结论仅代表创作者个人意见。",Contact:"如您需要更多信息,请联系 Charles Xie (charles@intofuture.org)。我们会尽快回复。",Translators:"翻译"},word:{BrandName:"品牌",Name:"名字",Refresh:"刷新",LastUpdate:"上一次更新",Small:"小",Medium:"中",Large:"大",Design:"设计",Information:"信息",Type:"类别",Text:"文字",FontSize:"字体大小",FontColor:"字体颜色",Model:"模型",Models:"模型",Upload:"上传",ClickCount:"点击数",Share:"分享",AlreadyLike:"已点赞",Like:"点赞",MustLogInToLike:"必须登录才能点赞",AllRightsReserved:"版权所有",MeterAbbreviation:"米",VoltAbbreviation:"伏",AmpereAbbreviation:"安",WattAbbreviation:"瓦",Version:"版本",VersionInitial:"版本",Options:"选项",Maximum:"最大",Minimum:"最小",MaximumNumber:"最多",MinimumNumber:"最少",MaximumValue:"最大值",MinimumValue:"最小值",Or:"或",None:"无",High:"高",Partial:"部分",Teacher:"老师",Class:"班级",Total:"总数",Leaderboard:"用戶排行榜",Latest:"最新",Range:"范围",SIUnit:"国际单位制",USUnit:"美国单位制",ThermalTransmittance:"热透过率",ThermalResistance:"热阻",UValue:"U值",RValue:"R值",VolumetricHeatCapacity:"容积热容",BuildingHVACSystem:"建筑物暖通空调系统",ThermostatSetpoint:"恒温器设定值",TemperatureToleranceThreshold:"温度忍耐阈值",TemperatureToleranceThresholdExplanation:`当日最低外面温度高于恒温器设定值减去此阈值,暖气不开。 -当日最高外面温度低于恒温器设定值加上此阈值,空调不开。`,Press:"按",Open:"打开",Save:"保存",SaveAsImage:"保存为图像",SaveAsCsv:"保存为CSV",Update:"刷新",Paste:"粘贴",Copy:"复制",Cut:"剪切",Delete:"删除",Add:"添加",Lock:"固定",Translucent:"半透明",Transparency:"透明度",Color:"颜色",Pattern:"图案",Texture:"材质",Thickness:"厚度",Size:"尺寸",Yes:"是",No:"不",OK:"确定",Cancel:"取消",Apply:"应用",Close:"关闭",ApplyTo:"适用于",Run:"运行",Pause:"暂停",Resume:"继续",Clear:"清空",Warning:"警告",Caution:"小心",Reminder:"提醒",Length:"长度",Width:"宽度",Height:"高度",Radius:"半径",Angle:"角度",Azimuth:"方位角",Coordinates:"坐标",Weather:"天气",Show:"显示",Animate:"动画",Date:"日期",Time:"时间",Title:"标题",Owner:"所有者",Action:"操作",Rename:"改名",Location:"位置",Latitude:"纬度",Month:"月份",Day:"天",Hour:"小时",Daylight:"白天长度",Radiation:"辐射",Temperature:"温度",kWh:"千瓦时",dollar:"元",MeterPerSecond:"米/秒",NorthInitial:"北",SouthInitial:"南",EastInitial:"东",WestInitial:"西",Fixed:"固定",Elements:"部件",Energy:"能量",Unknown:"未知",Label:"标签",Description:"描述",NoDescription:"无描述",MaximumCharacters:"最多字符数",Author:"作者",Publisher:"发布者",Building:"建筑",ResidentialBuilding:"住宅建筑",CommercialBuilding:"商用建筑",SchoolBuilding:"学校建筑",TouristAttraction:"旅游景点",UnderConstruction:"在建",Photovoltaic:"光伏",WindPower:"风能",ColocationProjects:"共用空间项目",Anonymous:"无名氏",Nickname:"别名",Pin:"置顶",Unpin:"解除置顶"},shared:{NoTexture:"无材质",FoundationElement:"地基",CuboidElement:"长方体",PolygonElement:"多边形",SensorElement:"传感器",SolarPanelElement:"光伏板",SolarWaterHeaterElement:"太阳能热水器",ParabolicDishElement:"抛物线碟",ParabolicTroughElement:"抛物线槽",FresnelReflectorElement:"菲涅耳反射镜",HeliostatElement:"定日镜",WindTurbineElement:"风力涡轮机",LightElement:"电灯",ElementLocked:"固定",ModelType:"模型类别",OutputBreakdown:"分列发电量",MoreResults:"更多结果"},message:{NewVersionAvailable:"有新版本",CalculationMayBeSlowDoYouWantToContinue:"计算可能会很慢。您想继续吗?",IncreaseSolarRadiationHeatmapGridCellSizeToSpeedUp:"加大太阳辐射热图网格的尺寸可加速",ModelNotFound:"没有找到模型",CannotSignIn:"登录失败",CannotSignOut:"退出失败",YourAccountWasCreated:"成功建立您的账号。",CannotCreateAccount:"无法创建账号",YourAccountSettingsWereSaved:"您的账号设定已保存。",CannotSaveYourAccountSettings:"您的账号设定无法保存",CannotSaveYourFileToCloud:"无法保存您的文件到云端",CannotCreateNewProject:"无法创建新项目",CannotCreateNewProjectWithoutTitle:"没有标题, 无法创建新项目",CannotOpenYourProjects:"无法打开您的项目列表",CannotOpenProject:"无法打开项目",CannotDeleteProject:"无法删除项目",CannotRenameProject:"无法给项目改名",CannotAddDesignToProject:"无法把此设计加到项目里",CannotAddDesignToProjectOwnedByOthers:"不能把此设计加到别人的项目里",DesignRemovedFromProject:"设计被成功地从项目里删除",CannotRemoveDesignFromProject:"无法把此设计从项目里删除",CannotUpdateProject:"无法更新项目",CannotFetchProjectData:"无法取得项目数据",TitleUsedChooseDifferentOne:"此标题已经被使用, 请采用不同的标题",CloudFileWithTitleExistsDoYouWantToOverwrite:"使用此标题的云文件已经存在,您确定要覆盖它吗?",CloudFileNotFound:"找不到此云端文件",CannotLoadModelsOnMap:"无法下载地图上的模型",CannotLoadLeaderboard:"无法下载排行榜",CannotPublishModelOnMap:"模型无法发布到地图上",CannotLikeModelFromMap:"无法点赞地图上的模型",CannotDeleteModelFromMap:"无法删除地图上的模型",ModelDeletedFromMap:"模型已从地图上删除",DoYouWantToDeleteModelFromMap:"您要删除地图上的这个模型吗?",CannotOpenCloudFile:"此云端文件无法打开",CannotReadCloudFile:"无法读取此云端文件",CannotWriteCloudFile:"无法存储此云端文件",CloudFileCopied:"拷贝云端文件",CannotOpenCloudFolder:"您的云端文件夹无法打开",CannotDeleteCloudFile:"无法删除此云端文件",CannotRenameCloudFile:"此云端文件的名字无法更改",DoYouWantToSaveChanges:"您要保存当前文件吗?",NotApplicableToSelectedAction:"此值不适用于当前选择范围",ThisElementIsLocked:"这个部件被锁定。",ThisCannotBeUndone:"这个操作一旦执行就不能撤销。",AzimuthOfNorthIsZero:"正北的方位角为零度",CounterclockwiseAzimuthIsPositive:"逆时针为正",SouthFacingIsZero:"朝南为零度",ClockwiseRotationIsPositive:"顺时针为正",MoveCancelledBecauseOfOverlap:"位置重叠,移动取消。",MoveOutsideBoundaryCancelled:"位置出界,移动取消。",RotationCancelledBecauseOfOverlap:"位置重叠,旋转取消。",RotationOutsideBoundaryCancelled:"位置出界,旋转取消。",ResizingCancelledBecauseOfOverlap:"位置重叠,尺寸调整取消。",ResizingOutsideBoundaryCancelled:"位置出界,尺寸调整取消。",CannotPasteOutsideBoundary:"位置出界,不能复制。",CannotPasteBecauseOfOverlap:"位置重叠,不能复制。",CannotMoveObjectTooFar:"位置太远,移动取消。",ExistingSolarPanelsWillBeRemovedBeforeApplyingNewLayout:"采用新布局之前必须移除现有的光伏板。",DoYouWantToContinue:"您想继续吗?",SolarPanelsCannotIntersectWithGround:"光伏板不能和地面接触。",SolarPanelsCannotOverlapWithOneAnother:"光伏板不能重叠。",ScreenshotSaved:"截屏图片保存在下载文件夹里。",CsvFileSaved:"CSV保存在下载文件夹里。",SimulationStarted:"模拟开始。",SimulationCompleted:"模拟结束。",SimulationAborted:"模拟取消。",SimulationPaused:"模拟暂停。",CancelSimulation:"取消模拟",PauseSimulation:"暂停模拟",ResumeSimulation:"继续模拟",SimulationWillNotStartDueToErrors:"由于错误模拟无法运行",SimulationWillStartDespiteWarnings:"发现问题,但模拟仍然将运行。",EvolutionStarted:"演化开始。",EvolutionCompleted:"演化结束。",EvolutionAborted:"演化取消。",EvolutionPaused:"演化暂停。",EncounterEvolutionError:"演化出错。",CancelEvolution:"取消演化",PauseEvolution:"暂停演化",ResumeEvolution:"继续演化",ConvergenceThresholdHasBeenReached:"收敛阈值已达到。",MaximumNumberOfGenerationsHasBeenReached:"最大世代数已达到。",MaximumNumberOfStepsHasBeenReached:"最大步数已达到。",ObjectiveFunctionTypeError:"此操作不支持当前的目标函数。请从菜单启动此功能。",WallsAreNotAtSameHeight:"墙体高度不同。",WallsAreNotPerpendicular:"墙体不垂直。",WallsAreNotConnected:"墙体不相连。",WallsNumberNeedToBeFour:"墙体数量必须为四个。",BuildingContainsEmptyWall:"建筑物有空墙。",BuildingRoofMissing:"建筑物没有屋顶。",UnknownErrors:"未知错误。",SigningOutAnonymousAccount:"你确定退出吗?一旦退出,此匿名账号将不可恢复。"},menu:{AnalysisOptions:"分析选项",option:{GridCellSize:"计算网格的尺寸",SamplingFrequency:"采样频率",TimesPerHour:"每小时采样次数",DaysPerYear:"每一年采样天数"},mainMenu:"主菜单",cloudMenu:"云菜单",projectSubMenu:"项目",project:{CreateNewProject:"创建新项目",OpenProject:"打开项目",SaveProject:"保存项目",SaveProjectAs:"另存项目为",YouMustLogInToCreateProject:"您必须登录才能创建项目",YouMustLogInToOpenProject:"您必须登录才能打开项目"},fileSubMenu:"文件",file:{CreateNewFile:"创建新文件",OpenLocalFile:"打开本地文件",SaveAsLocalFile:"保存为本地文件",SavingAbortedMustHaveValidFileName:"文件名无效,保存失败",OpenCloudFile:"打开云端文件",SaveCloudFile:"保存云端文件",SaveAsCloudFile:"另存云端文件为",SavingAbortedMustHaveValidTitle:"云端文件名无效,保存失败",ToSaveYourWorkPleaseSignIn:"为了保存您的云端文件,请先登录。",TakeScreenshot:"截屏",UseCloudFileName:"采用云端文件名",PublishOnModelsMap:"发布到地图上",PublishedOnModelsMap:"您的模型成功发布到地图上",UpdatedOnModelsMap:"您的模型更新成功",YouMustLogInToPublishYourModel:"您必须登录才能发布模型",YouCannotPublishAModelThatYouDoNotOwn:"您不能发布他人的模型",YouMustSaveModelOnCloudBeforePublishingIt:"您必须先把此模型保存在云端才能发布它"},editSubMenu:"编辑",edit:{Undo:"撤销",Redo:"重做"},viewSubMenu:"视界",view:{NavigationView:"导航模式",TwoDimensionalView:"二维模式",ResetView:"重置视角",ZoomIn:"放大",ZoomOut:"缩小",AutoRotate:"自动旋转",ShowShadow:"显示阴影",ShowSurfaceShininess:"显示表面光泽",TranslucentFloatingWindows:"透明浮动窗口",accessoriesSubMenu:"配件",accessories:{SiteInformation:"位置信息",DesignInformation:"设计信息",Instruction:"操作说明",StickyNote:"便签",Note:"便签"}},settingsSubMenu:"设置",settings:{WeatherData:"气象数据",DiurnalTemperature:"昼夜温度",Heliodon:"日影仪",SunAndTime:"太阳和时间",CustomSolarPanels:"定制的光伏板",CustomizeSolarPanel:"定制光伏板"},benchmarksSubMenu:"基准",benchmarks:{SolarRadiationPredictionVsMeasurement:"太阳能辐射模型预测和实际测量的对比",BESTESTCase600:"建筑物能耗模拟测试:BESTEST案例600",BESTESTCase610:"建筑物能耗模拟测试:BESTEST案例610",BESTESTCase620:"建筑物能耗模拟测试:BESTEST案例620",BESTESTCase630:"建筑物能耗模拟测试:BESTEST案例630"},graph:{LineWidth:"线条宽度",SymbolSize:"符号大小",BarCategoryGap:"直条间隙",ShowHorizontalGridLines:"显示格子的水平线条",ShowVerticalGridLines:"显示格子的竖直线条"},analysisSubMenu:"分析",physicsSubMenu:"物理",physics:{DailySolarRadiationHeatmap:"当日太阳辐射总量分布热图",SolarRadiationHeatmapOptions:"太阳辐射热图选项",SolarRadiationHeatmapGridCellSize:"太阳辐射热图网格的尺寸",SolarRadiationHeatmapMaxValue:"太阳辐射热图最大值",SolarRadiationHeatmapNoAnimation:"若无移动部件则省略动画",ReflectionHeatmap:"反射热图"},sensorSubMenu:"传感器",sensor:{CollectDailyData:"收集当天数据",CollectYearlyData:"收集全年数据",SensorSimulationNoAnimation:"若无移动部件则省略动画"},buildingSubMenu:"建筑物",building:{AnalyzeDailyBuildingEnergy:"建筑物当天能耗分析",AnalyzeYearlyBuildingEnergy:"建筑物全年能耗分析",EnergyAnalysisOptions:"能耗分析选项",EnergyGridCellSize:"计算网格的尺寸",BuildingEnergySimulationNoAnimation:"若无移动部件则省略动画"},solarPanelSubMenu:"太阳能光伏板",solarPanel:{AnalyzeDailyYield:"分析当天产出",AnalyzeYearlyYield:"分析全年产出",AnalyzeVisibility:"分析可见度",PanelDiscretization:"光伏板离散化方法",Exact:"准确",Approximate:"近似",EnergyGridCellSize:"计算网格的尺寸",VisibilityGridCellSize:"视界因子计算网格的尺寸",EnergyAnalysisOptions:"能量分析选项",VisibilityAnalysisOptions:"可见度分析选项",SolarPanelSimulationNoAnimation:"若无移动部件则省略动画"},parabolicTroughSubMenu:"抛物线槽",parabolicTrough:{AnalyzeDailyYield:"分析当天产出",AnalyzeYearlyYield:"分析全年产出"},parabolicDishSubMenu:"抛物线碟",parabolicDish:{AnalyzeDailyYield:"分析当天产出",AnalyzeYearlyYield:"分析全年产出"},fresnelReflectorSubMenu:"菲涅尔反射镜",fresnelReflector:{AnalyzeDailyYield:"分析当天产出",AnalyzeYearlyYield:"分析全年产出"},heliostatSubMenu:"定日镜",heliostat:{AnalyzeDailyYield:"分析当天产出",AnalyzeYearlyYield:"分析全年产出"},solarUpdraftTowerSubMenu:"太阳能上升气流塔",solarUpdraftTower:{AnalyzeDailyYield:"分析当天产出",AnalyzeYearlyYield:"分析全年产出",SolarUpdraftTowerSimulationNoAnimation:"若无移动部件则省略动画"},tutorialsSubMenu:"教程",solarEnergyScienceSubMenu:"太阳能科学",solarEnergyScienceTutorials:{SunAngles:"太阳相对于地面观察者的角度",InsolationAndClimate:"太阳辐射和气候的关系",SolarRadiationToBox:"一个长方体受到的太阳能辐射分析"},buildingScienceSubMenu:"建筑科学",buildingScienceTutorials:{ThermalEnvelopeVsBuildingEnvelope:"房屋的热学封套和围护封套",EffectOfSizeOnBuildingEnergy:"房屋大小对能耗的影响",EffectOfOrientationOnBuildingEnergy:"房屋方位对能耗的影响",EffectOfInsulationOnBuildingEnergy:"房屋隔热对能耗的影响",EffectOfRoofColorOnBuildingEnergy:"屋顶颜色对建筑物能耗的影响",EffectOfEavesOverhangLengthOnBuildingEnergy:"屋檐延伸长度对建筑物能耗的影响",EffectOfWindowSHGCOnBuildingEnergy:"窗户太阳能输入对房屋能耗的影响",EffectOfThermostatSetpointOnBuildingEnergy:"恒温器设定值对房屋能耗的影响",EffectOfSolarPanelsOnBuildingEnergy:"光伏板对房屋能耗的影响",EffectOfGroundTemperatureOnBuildingEnergy:"地表温度对房屋能耗的影响",EffectOfTreesOnBuildingEnergy:"树荫对房屋能耗的影响"},buildingDesignSubMenu:"建筑设计",buildingDesignTutorials:{CapeCodStyleHouseWithShedDormer:"有棚顶窗的科德角风格的住宅",MansardRoofWithDormers:"有天窗的折线屋顶",GableRoofVsHipRoof:"双坡屋顶和四坡屋顶的对比",ColonialVsSaltbox:"殖民地风格和盐盒风格的对比",GambrelRoofVsMansardRoof:"复斜屋顶和折线屋顶的对比",CombinationRoofVsBonnetRoof:"组合屋顶和帽檐屋顶的对比",DutchGableRoof:"荷兰双坡屋顶",GableAndValleyRoof:"坡谷屋顶",ClerestoryRoof:"天窗屋顶",MonitorRoof:"采光屋顶",AFrameHouse:"A字形房子",HalfTimberedHouse:"半木骨架房子",AllBasicRoofTypes:"所有的基本屋顶类型"},photovoltaicSolarPowerSubMenu:"光伏发电",photovoltaicSolarPowerTutorials:{EffectOfTiltAngleOfSolarPanel:"光伏板倾斜角对发电量的影响",EffectOfAzimuthOfSolarPanel:"光伏板方位角对发电量的影响",SolarPanelTypes:"光伏板类型",DefineYourOwnSolarPanels:"定义自己的光伏板",VerticalBifacialSolarPanels:"竖直的双面光伏板",CompareMonofacialAndBifacialSolarPanels:"单面光伏板和双面光伏板的对比",SolarTrackers:"自动追日器",CoveringGroundWithSolarPanels:"为什么我们不简单地用光伏板覆盖地面",InterRowSpacingOfSolarPanelArray:"光伏板阵列行间距对发电量的影响",EffectOfOrientationOfSolarPanels:"光伏板排列方向对发电量的影响",SolarPanelArrayAutomaticLayout:"光伏板自动排列"},concentratedSolarPowerSubMenu:"光热发电",concentratedSolarPowerTutorials:{EffectOfAzimuthOfParabolicTrough:"抛物线槽方位角对发电量的影响",EffectOfLatusRectumOfParabolicTrough:"抛物线槽通径对发电量的影响",FocusSunlightWithParabolicDish:"用抛物线碟聚焦陽光",LinearFresnelReflectors:"用直线式菲涅尔反射镜聚焦陽光",EffectOfAbsorberPipeHeightForLinearFresnelReflectors:"吸热管的安装高度对直线式菲涅尔反射镜发电量的影响",EffectOfAzimuthOfLinearFresnelReflectors:"直线式菲涅尔反射镜方位角对发电量的影响",LinearFresnelReflectorsWithTwoAbsorbers:"配备两个吸收管的直线式菲涅尔反射镜阵列",CosineEfficiencyOfHeliostats:"定日镜的余弦效率",ShadowingAndBlockingOfHeliostats:"定日镜的阴影和遮挡",EffectSolarPowerTowerHeight:"吸收塔高度对发电量的影响",SolarPowerTower:"塔式光热发电站"},otherTypesOfSolarPowerSubMenu:"其它类型的太阳能发电",otherTypesOfSolarPowerTutorials:{SolarWaterHeaters:"太阳能热水器",SolarUpdraftTower:"太阳能上升气流塔"},windPowerSubMenu:"风力发电",windPowerTutorials:{EffectOfBladeNumberOfWindTurbine:"转子叶片的数目对风力涡轮机输出的影响",EffectOfPitchAngleOfWindTurbineBlades:"转子叶片的俯仰角对风力涡轮机输出的影响",BirdSafeBladeDesign:"对鸟类安全的叶片设计",OffshoreWindFarm:"海上风电场"},colocationSubMenu:"共用空间项目",colocationTutorials:{AgricultureSolarWindColocation:"农业光伏风力共用空间"},generativeDesignSubMenu:"生成式设计",generativeDesignTutorials:{MonofacialSolarPanelArrayTiltAngle:"单面光伏板阵列的倾斜角",BifacialSolarPanelArrayTiltAngle:"双面光伏板阵列的倾斜角",OutputOfSolarPanelArrayInDifferentPlaces:"一个光伏板阵列在不同地区的产出",SimpleSolarFarmParetoFront:"简单太阳能农场设计的帕累托前沿"},examplesSubMenu:"例子",solarEnergySubMenu:"太阳能",solarEnergyExamples:{SunBeamAndHeliodon:"太阳光束和日影仪",RooftopSolarPanels:"屋顶光伏板",NevadaSolarOneParabolicTroughArray:"内华达州太阳能一号的抛物线槽阵列",TooeleParabolicDishArray:"犹他州图埃勒的抛物线碟阵列",PS10SolarPowerTower:"西班牙塞维利亚的PS10太阳能发电塔",TucsonLinearFresnelReflectors:"亚利桑那州图森的直线式菲涅尔反射镜阵列",SolarCanopyFormFactors:"太阳能天篷外形设计",SolarCanopyOverBleachers:"看台太阳能天篷",SolarCanopyOverGarage:"车库太阳能天篷",SolarBusStop:"太阳能候车亭",SolarFacadeTesla:"特斯拉光伏墙",BuildingIntegratedPhotovoltaics:"建筑整合光伏",Floatovoltaics:"浮动光伏",Agrivoltaics:"农业光伏",VegetativeBuffer:"太阳能农场绿化带",RainbowSwashSolarFarmBostonMA:"马萨诸塞州波士顿彩虹激流旁边的光伏板阵列",MickeyMouseSolarFarmOrlandoFL:"佛罗里达州奥兰多的米老鼠形状光伏板阵列",SolarPanelsOverCanalBakersfieldCA:"加利福尼亚州贝克斯菲尔德灌溉渠上假想的光伏板阵列",SolarNoiseBarrierLexingtonMA:"马萨诸塞州列克星敦高速公路噪音墙上假想的光伏板",HSATSolarTrackersRaleighNC:"北卡罗来纳州罗利的一个水平方向单轴旋转追日光伏板阵列(HSAT)",AADATSolarTrackersLancasterCA:"加利福尼亚州兰开斯特的一个双轴旋转追日光伏板阵列(AADAT)",SolarUpdraftTowerInCity:"太阳能上升气流塔在城市中的应用"},builtEnvironmentSubMenu:"建造环境",residentialBuildingsSubMenu:"住宅建筑",residentialBuildingExamples:{ColonialHouse:"殖民地风格的住宅",DutchColonialHouse:"荷兰殖民地风格的住宅",TShapedHouse:"T字型房子",CapeCodHouseWithGarage:"有车库的科德角风格的住宅",Solarium:"有日光浴室的房子",Church1:"教堂例一",Cathedral1:"主教座堂例一",Cathedral2:"主教座堂例二",Mosque1:"清真寺例一",AdobeTaosHouse:"陶斯土坯房",RanchHouse:"牧场风格的住宅",BonnetHouse:"有帽檐屋顶的住宅",BarnStyleHouse:"谷仓式风格的住宅",ModernHouse:"现代风格的住宅",ButterflyRoofHouse:"蝴蝶型屋顶的住宅"},commercialBuildingsSubMenu:"商用建筑",commercialBuildingExamples:{WhiteHouse:"白宫",HaroldWashingtonCollege:"哈罗德华盛顿学院",BilimMersinTurkiye:"土耳其梅尔辛科学教育中心",SpanishStyleHotel:"西班牙风格旅馆",ApartmentBuilding:"公寓楼",OfficeBuilding:"办公楼",Hotel:"旅馆"},buildingComplexesSubMenu:"建筑群",buildingComplexExamples:{SouthBurlingtonHighSchoolVermont:"佛蒙特州南伯灵顿高中",MescaleroApacheSchoolNewMexico:"新墨西哥州梅斯卡勒罗阿帕奇学校"},urbanPlanningSubMenu:"城市规划",urbanPlanningExamples:{CityBlockHeatmap:"城市街区热图",ChicagoSkyline:"芝加哥天际线"},otherBuildingsSubMenu:"其它建筑",otherBuildingExamples:{Greenhouse:"温室",Pavilion:"公园的亭子",OctagonalPagoda:"八角塔",OceanFront:"海边",EgyptianPyramids:"埃及金字塔",MayanPyramid:"玛雅金字塔",SiOSePol:"三十三孔桥",StackedCuboids:"堆砌长方体"},artificialIntelligenceSubMenu:"人工智能",artificialIntelligenceExamples:{OptimizingTiltAngleOfOneSolarPanelRow:"优化单排光伏板的倾斜角",OptimizingTiltAnglesOfMultipleSolarPanelRows:"优化多排光伏板的倾斜角",SolarFarmGenerativeDesign:"生成式设计太阳能农场",SolarFarmGenerativeDesignWithBlock:"生成式设计太阳能农场:周边有建筑物的情况",FitchburgSolarFarmGenerativeDesign:"生成式设计太阳能农场:真实世界案例"},languageSubMenu:"语言",publicSubMenu:"公共",ModelsGallery:"模型画廊",ModelsMap:"模型地图",AboutUs:"关于我们"},avatarMenu:{AccountSettings:"账号设定",PrivacyStatementTitle:"用户隐私保护声明",PrivacyStatement:"登录需要采用您的谷歌ID建立或进入您的阿拉丁账户。 我们只储存一个随机的字符串作为您的ID。 任何关于您的可辨识的个人信息都没有被收集。 详情请参考我们的",SignIn:"登录",SignInAsMe:"实名登录",SignInAnonymously:"匿名登录",SignOut:"退出账号",IfYouAreAStudent:"如果您是一个学生"},skyMenu:{Axes:"显示坐标轴",Theme:"环境主题",ThemeDefault:"默认",ThemeDesert:"沙漠",ThemeDune:"沙丘",ThemeForest:"森林",ThemeGrassland:"草原",ThemeHill:"丘陵",ThemeLake:"湖泊",ThemeMountain:"山脉",ThemeRural:"田园",SunlightAttenuationCoefficientInAir:"阳光在空气中传播的衰减系数",ConvectiveCoefficientOfAir:"空气对流传热系数",HighestTemperatureTimeInMinutes:"最高气温时间(分钟)",SelectSunAnglesToShow:"选择太阳角度显示",ShowAzimuthAngle:"显示方位角",ShowElevationAngle:"显示高度角",ShowZenithAngle:"显示天顶角",DirectLightBrightnessAtNoon:"正午直射光照度",AmbientLightBrightnessAtNoon:"正午环境光照度"},groundMenu:{MonthlyIrradianceLoss:"月份辐射度损失比",Vegetation:"植被",LeafOutDay:"树叶长出的日子",LeafOffDay:"树叶脱落的日子",Albedo:"反照率",ImageOnGround:"地面显示图像",WaterSurface:"水面",RemoveAllUnlockedTrees:"删除所有非固定的树木",RemoveAllUnlockedFlowers:"删除所有非固定的花草",RemoveAllUnlockedSolarPanels:"删除所有非固定的光伏板",RemoveAllUnlockedPeople:"删除所有非固定的人物",RemoveAllUnlockedFoundations:"删除所有非固定的地基",RemoveAllUnlockedCuboids:"删除所有非固定的长方体",DoYouReallyWantToRemoveAllPeople:"你确定删除所有非固定的人物吗",DoYouReallyWantToRemoveAllTrees:"你确定删除所有非固定的树木吗",DoYouReallyWantToRemoveAllFlowers:"你确定删除所有非固定的花草吗",DoYouReallyWantToRemoveAllSolarPanels:"你确定删除所有非固定的光伏板吗",DoYouReallyWantToRemoveAllFoundations:"你确定删除所有非固定的地基吗",DoYouReallyWantToRemoveAllCuboids:"你确定删除所有非固定的长方体吗",LockAllUnlockedElements:"固定所有非固定的部件",UnlockAllLockedElements:"解除所有的固定"},labelSubMenu:{Label:"标签",LabelText:"标签的内容",LabelHeight:"标签的高度",LabelSize:"标签的大小",LabelFontSize:"字体的大小",LabelColor:"标签的颜色",KeepShowingLabel:"显示标签"},foundationMenu:{RemoveAllUnlockedSolarPanels:"删除此地基上所有非固定的光伏板",RemoveAllUnlockedParabolicTroughs:"删除此地基上所有非固定的抛物线槽",RemoveAllUnlockedParabolicDishes:"删除此地基上所有非固定的抛物线碟",RemoveAllUnlockedFresnelReflectors:"删除此地基上所有非固定的菲涅耳反射镜",RemoveAllUnlockedHeliostats:"删除此地基上所有非固定的定日镜",RemoveAllUnlockedWindTurbines:"删除此地基上所有非固定的风力涡轮机",RemoveAllUnlockedSensors:"删除此地基上所有非固定的传感器",RemoveAllUnlockedLights:"删除此地基上所有非固定的电灯",RemoveAllUnlockedWalls:"删除此地基上所有非固定的墙",RemoveAllUnlockedWindows:"删除此地基上所有非固定的窗户",RemoveAllUnlockedDoors:"删除此地基上所有非固定的门",RemoveAllUnlockedPolygons:"删除此地基上所有非固定的多边形",RemoveAllUnlockedHumans:"删除此地基上所有非固定的人物",RemoveAllUnlockedTrees:"删除此地基上所有非固定的树木",RemoveAllUnlockedFlowers:"删除此地基上所有非固定的花草",Racks:"支架",Texture01:"一号材质",Texture02:"二号材质",Texture03:"三号材质",Texture04:"四号材质",Texture05:"五号材质",Texture06:"六号材质",Texture07:"七号材质",Texture08:"八号材质",Texture09:"九号材质",Texture10:"十号材质",SolarPanels:"光伏板",SolarPanelArray:"光伏板阵列",DoYouReallyWantToRemoveAllSolarPanelsOnFoundation:"你确定删除此地基上所有非固定的光伏板吗",ParabolicTroughs:"抛物线槽",DoYouReallyWantToRemoveAllParabolicTroughsOnFoundation:"你确定删除此地基上所有非固定的抛物线槽吗",ParabolicDishes:"抛物线碟",DoYouReallyWantToRemoveAllParabolicDishesOnFoundation:"你确定删除此地基上所有非固定的抛物线碟吗",FresnelReflectors:"菲涅耳反射镜",DoYouReallyWantToRemoveAllFresnelReflectorsOnFoundation:"你确定删除此地基上所有非固定的菲涅耳反射镜吗",Heliostats:"定日镜",DoYouReallyWantToRemoveAllHeliostatsOnFoundation:"你确定删除此地基上所有非固定的定日镜吗",WindTurbines:"风力涡轮机",DoYouReallyWantToRemoveAllWindTurbinesOnFoundation:"你确定删除此地基上所有非固定的风力涡轮机吗",Sensors:"传感器",DoYouReallyWantToRemoveAllSensorsOnFoundation:"你确定删除此地基上所有非固定的传感器吗",Lights:"电灯",DoYouReallyWantToRemoveAllLightsOnFoundation:"你确定删除此地基上所有非固定的电灯吗",Walls:"墙",DoYouReallyWantToRemoveAllWallsOnFoundation:"你确定删除此地基上所有非固定的墙吗",Windows:"窗户",DoYouReallyWantToRemoveAllWindowsOnFoundation:"你确定删除此地基上所有非固定的窗户吗",Doors:"门",DoYouReallyWantToRemoveAllDoorsOnFoundation:"你确定删除此地基上所有非固定的门吗",Polygons:"多边形",DoYouReallyWantToRemoveAllPolygonsOnFoundation:"你确定删除此地基上所有非固定的多边形吗",Humans:"人物",DoYouReallyWantToRemoveAllHumansOnFoundation:"你确定删除此地基上所有非固定的人物吗",Trees:"树木",DoYouReallyWantToRemoveAllTreesOnFoundation:"你确定删除此地基上所有非固定的树木吗",Flowers:"花草",DoYouReallyWantToRemoveAllFlowersOnFoundation:"你确定删除此地基上所有非固定的花草吗",OnlyThisFoundation:"只这块地基",AllSelectedFoundations:"所有选中的地基",AllConnectedFoundations:"所有相连的地基",AllFoundations:"所有的地基",AddPolygon:"添加多边形",SolarStructure:"太阳能构型",GroupMaster:"主地基",LockAllUnlockedElementsOnThisFoundation:"固定此地基上所有非固定的部件",UnlockAllLockedElementsOnThisFoundation:"解除此地基上所有的固定",GroundFloorRValue:"建筑物地板的R值",OnlyThisGroundFloor:"只这个建筑物的地板",AllGroundFloors:"所有建筑物的地板"},solarPowerTowerMenu:{ReceiverTowerForHeliostats:"和定日镜配套的吸收塔",ReceiverTowerPhysicalProperties:"太阳能吸收塔的物理性质",ReceiverTowerHeight:"太阳能吸收塔的高度",ReceiverTowerRadius:"太阳能吸收塔的半径",ReceiverAbsorptance:"太阳能吸收器的吸收率",ReceiverOpticalEfficiency:"太阳能吸收器的光效率",ReceiverThermalEfficiency:"太阳能吸收器的热效率"},solarAbsorberPipeMenu:{AbsorberPipeForFresnelReflectors:"和菲涅尔反射镜配套的吸收管",AbsorberPipePhysicalProperties:"太阳能吸收管的物理性质",AbsorberHeight:"太阳能吸收管的安装高度",AbsorberApertureWidth:"太阳能吸收管的孔径",AbsorberPipePoleNumber:"太阳能吸收管的支柱数量",AbsorberAbsorptance:"太阳能吸收管的吸收率",AbsorberOpticalEfficiency:"太阳能吸收管的光效率",AbsorberThermalEfficiency:"太阳能吸收管的热效率"},solarUpdraftTowerMenu:{SolarUpdraftTower:"太阳能上升气流塔",SolarUpdraftTowerPhysicalProperties:"太阳能上升气流塔的物理性质",SolarUpdraftTowerChimneyHeight:"太阳能上升气流塔烟囱的高度",SolarUpdraftTowerChimneyRadius:"太阳能上升气流塔烟囱的半径",SolarUpdraftTowerCollectorHeight:"太阳能上升气流塔集热棚的高度",SolarUpdraftTowerCollectorRadius:"太阳能上升气流塔集热棚的半径",SolarUpdraftTowerCollectorTransmissivity:"太阳能上升气流塔集热棚的透射率",SolarUpdraftTowerCollectorEmissivity:"太阳能上升气流塔集热棚的发射率",SolarUpdraftTowerDischargeCoefficient:"太阳能上升气流塔的流量系数",SolarUpdraftTowerTurbineEfficiency:"太阳能上升气流塔的涡轮机效率"},cuboidMenu:{Texture01:"一号材质",Texture02:"二号材质",Texture03:"三号材质",Texture04:"四号材质",Texture05:"五号材质",Texture06:"六号材质",Texture07:"七号材质",Texture08:"八号材质",Texture09:"九号材质",Texture10:"十号材质",RemoveAllUnlockedSolarPanels:"删除此长方体表面上所有非固定的光伏板",RemoveAllUnlockedSensors:"删除此长方体表面上所有非固定的传感器",RemoveAllUnlockedPolygons:"删除此长方体表面上所有非固定的多边形",RemoveAllUnlockedHumans:"删除此长方体表面上所有非固定的人物",RemoveAllUnlockedTrees:"删除此长方体表面上所有非固定的树木",RemoveAllUnlockedFlowers:"删除此长方体表面上所有非固定的花草",RemoveAllUnlockedLights:"删除此长方体表面上所有非固定的电灯",Racks:"支架",SolarPanels:"光伏板",Lights:"电灯",DoYouReallyWantToRemoveAllLightsOnCuboid:"你确定删除此长方体表面上所有非固定的电灯吗",DoYouReallyWantToRemoveAllSolarPanelsOnCuboid:"你确定删除此长方体表面上所有非固定的光伏板吗",Sensors:"传感器",DoYouReallyWantToRemoveAllSensorsOnCuboid:"你确定删除此长方体表面上所有非固定的传感器吗",Polygons:"多边形",DoYouReallyWantToRemoveAllPolygonsOnCuboid:"你确定删除此长方体表面上所有非固定的多边形吗",Humans:"人物",DoYouReallyWantToRemoveAllHumansOnCuboid:"你确定删除此长方体表面上所有非固定的人物吗",Trees:"树木",DoYouReallyWantToRemoveAllTreesOnCuboid:"你确定删除此长方体表面上所有非固定的树木吗",Flowers:"花草",DoYouReallyWantToRemoveAllFlowersOnCuboid:"你确定删除此长方体表面上所有非固定的花草吗",OnlyThisCuboid:"只这个长方体",AllCuboidsOnSameSurface:"同一表面上所有的长方体",AllCuboidsAboveSameBase:"同一地基上所有的长方体",AllSelectedCuboids:"所有选中的长方体",AllCuboids:"所有的长方体",OnlyThisSide:"只这个表面",AllSidesOfThisCuboid:"这个长方体所有的侧面",AllSidesOfSelectedCuboids:"所有选中长方体所有的侧面",AllSidesOfAllCuboids:"所有的长方体所有的侧面",AddPolygon:"添加多边形",Stackable:"可堆砌",GroupMaster:"主长方体"},polygonMenu:{Texture01:"一号材质",Texture02:"二号材质",Texture03:"三号材质",Texture04:"四号材质",Texture05:"五号材质",Texture06:"六号材质",Texture07:"七号材质",Texture08:"八号材质",Texture09:"九号材质",Texture10:"十号材质",TextBox:"文字框",FontOutlineColor:"字体轮廓颜色",FontOutlineWidth:"字体轮廓线宽",FontStrokeColor:"字体描边颜色",FontStrokeWidth:"字体描边线宽",NoOutline:"无轮廓线",Shiny:"光泽",Filled:"填充",FillTexture:"填充材质",FillColor:"填充颜色",Opacity:"遮光度",LineColor:"线条颜色",LineWidth:"线条宽度",LineStyle:"线条样式",SolidLine:"实线",DashedLine:"虚线",DottedLine:"点线",InsertVertexBeforeIndex:"前面插入顶点",InsertVertexAfterIndex:"后面插入顶点",DeleteVertex:"移除顶点",OnlyThisPolygon:"只这个多边形",AllPolygonsOnSurface:"同一表面上所有的多边形",AllPolygonsAboveFoundation:"同一地基上所有的多边形",AllSelectedPolygons:"所有选中的多边形",AllPolygons:"所有的多边形",Layout:"布局",SolarPanelArrayLayout:"光伏板阵列布局",SolarPanelArrayLayoutParametricDesign:"光伏板阵列布局参数化设计",SolarPanelArrayLayoutGenerativeDesign:"光伏板阵列布局生成式设计",SolarPanelArrayModel:"光伏板型号",SolarPanelArrayOrientation:"排列方向",SolarPanelArrayTiltAngle:"倾斜角度",SolarPanelArrayRowWidth:"行宽度",SolarPanelArrayInterRowSpacing:"行间距",SolarPanelArrayRowSpacing:"行间距",SolarPanelArrayRowAxis:"行轴方向",SolarPanelArrayLeftRightRowAxis:"左右方向(相对)",SolarPanelArrayUpDownRowAxis:"上下方向(相对)",SolarPanelArrayEastWestRowAxis:"东西方向(绝对)",SolarPanelArrayNorthSouthRowAxis:"南北方向(绝对)",SolarPanelArrayMargin:"边缘余地",SolarPanelArrayPoleHeight:"支架高度",SolarPanelArrayPoleSpacing:"支柱间隔",SolarPanelArrayTotalYearlyCost:"全年总成本",SolarPanelArrayTotalYearlyRevenue:"全年总收入",SolarPanelArrayTotalYearlyYield:"全年总发电量",SolarPanelArrayMeanYearlyYield:"平均年发电量",SolarPanelArrayYearlyProfit:"全年利润",LayoutNotAcceptedCheckYourParameters:"恕不能采用此布局。请检查您的参数设置。"},optimizationMenu:{Optimization:"优化",Parameters:"参数",Variables:"变量",Constants:"常量",GeneticAlgorithm:"遗传算法",GeneticAlgorithmSettings:"遗传算法设定",ParticleSwarmOptimization:"粒子群优化",ParticleSwarmOptimizationSettings:"粒子群优化设定",SolarPanelTiltAngleOptimization:"光伏板倾斜角度优化",SolarPanelArrayLayout:"光伏板阵列布局",Generation:"世代",Gene:"基因",NormalizedVariables:"标准化变量",Objective:"目标函数",ObjectiveFunctionDailyTotalYield:"当日总产出",ObjectiveFunctionYearlyTotalYield:"全年总产出",ObjectiveFunctionDailyMeanYield:"当日平均产出",ObjectiveFunctionYearlyMeanYield:"全年平均产出",ObjectiveFunctionDailyProfit:"当日利润",ObjectiveFunctionYearlyProfit:"全年利润",GeneticAlgorithmSelectionMethod:"遗传算法选择方法",RouletteWheel:"轮盘制",Tournament:"淘汰制",SearchMethod:"搜索方法",GlobalSearchUniformSelection:"全局搜索均匀取样",LocalSearchRandomOptimization:"局部搜索随机优化",PopulationSize:"种群个体数目",MaximumGenerations:"最大世代数目",SelectionRate:"选择概率",CrossoverRate:"交配概率",MutationRate:"突变概率",Step:"步数",SwarmSize:"粒子数目",MaximumSteps:"最大步数",MaximumVelocity:"最大速度",InertiaWeight:"惯性权重",CognitiveCoefficient:"认知系数",SocialCoefficient:"社会系数",ConvergenceThreshold:"终止条件的收敛阈值",LocalSearchRadius:"局部搜索的半径",RowsPerRackRange:"单个支架上光伏板行数的变化范围",TiltAngleRange:"光伏板倾斜角度的变化范围",InterRowSpacingRange:"光伏板阵列行间距的变化范围",ClickTargetPolygonToActivate:"点击目标多边形激活",ClickTargetFoundationToActivate:"点击目标地基激活"},treeMenu:{ShowModel:"显示近似模型",Flip:"翻转",Type:"树种",Spread:"树冠直径"},flowerMenu:{Flip:"翻转",Type:"品种",Spread:"直径"},peopleMenu:{ChangePerson:"改变人物",Flip:"转身",Observer:"观察者",ViewFromThisPerson:"视角移到此人位置"},lightMenu:{Color:"颜色",Intensity:"亮度",Decay:"衰减",MaximumDistance:"最大距离",Inside:"内部"},solarCollectorMenu:{Coordinates:"坐标",RelativeXCoordinateOfCenter:"中心的相对X坐标",RelativeYCoordinateOfCenter:"中心的相对Y坐标",RelativeAzimuth:"相对方位角",Pole:"支柱",PoleHeight:"支柱高度",PoleRadius:"支柱半径",ExtraPoleHeight:"额外的支柱高度",ExtraPoleHeightInAdditionToHalfWidth:"宽度一半额外的支柱高度",DrawSunBeam:"显示光束"},concentratedSolarPowerCollectorMenu:{ReflectorReflectance:"反射器镜面反射率",ReceiverAbsorptance:"接收器吸收率",ReflectorOpticalEfficiency:"反射器光效率",ReceiverThermalEfficiency:"接收器热效率"},solarWaterHeaterMenu:{OnlyThisSolarWaterHeater:"只这个太阳能热水器",AllSolarWaterHeatersOnSurface:"同一表面上所有的太阳能热水器",AllSolarWaterHeatersAboveFoundation:"同一地基上所有的太阳能热水器",AllSelectedSolarWaterHeaters:"所有选中的太阳能热水器",AllSolarWaterHeaters:"所有的太阳能热水器"},solarPanelMenu:{ElectricalProperties:"电气特性",InverterEfficiency:"逆变器效率",InverterEfficiencyExplained:"直流电转换为交流电的效率。",DcToAcSizeRatio:"直流-交流容量比例",DcToAcSizeRatioExplained:"直流电容量和交流电容量的比例。",ChangePvModel:"改变光伏板型号",Orientation:"排列方向",Portrait:"纵向",Landscape:"橫向",FrameColor:"框架颜色",Panels:"块",PanelsWide:"块光伏板宽",PanelsLong:"块光伏板长",TiltAngle:"倾斜角度",SouthFacingIsPositive:"朝南为正",Tracker:"追日系统",SolarTrackerFollowsSun:"追日系统提高光伏板产出。",PoleSpacing:"支柱间隔",NoTracker:"无追日系统",HorizontalSingleAxisTracker:"水平单轴追日系统",VerticalSingleAxisTracker:"竖直单轴追日系统",AltazimuthDualAxisTracker:"地平双轴追日系统",OnlyThisSolarPanel:"只这个光伏板",AllSolarPanelsOnSurface:"同一表面上所有的光伏板",AllSolarPanelsAboveFoundation:"同一地基上所有的光伏板",AllSelectedSolarPanels:"所有选中的光伏板",AllSolarPanels:"所有的光伏板"},pvModelPanel:{SolarPanelSpecs:"光伏板型号性能",General:"概况",Electrical:"电气",CellCountInXDirection:"X方向电池数目",CellCountInYDirection:"Y方向电池数目",Weight:"重量",Kilogram:"千克",RatedVoltage:"额定电压",RatedCurrent:"额定电流",OpenCircuitVoltage:"开路电压",ShortCircuitCurrent:"短路电流",MaximumRatedPower:"最大额定功率",Model:"型号",PanelSize:"尺寸",Cells:"电池組",CellType:"光伏电池类型",Monocrystalline:"单晶硅",Polycrystalline:"多晶硅",ThinFilm:"薄膜",Bifacial:"双面",BifacialityFactor:"双面性因子",Black:"黑色",Blue:"蓝色",ShadeTolerance:"阴影耐受度",SolarCellEfficiency:"光伏电池效率",NominalOperatingCellTemperature:"名义电池运行温度",TemperatureCoefficientOfPmax:"Pmax温度系数",AddedCustomSolarPanels:"已有",DisplayThisCustomSolarPanel:"展示这个定制光伏板",ExportThisCustomSolarPanel:"输出此定制光伏板",ImportCustomSolarPanelFromClipboard:"从系统剪切板输入定制光伏板数据d",CustomSolarPanelExportedToClipboard:"定制光伏板拷贝到剪贴板",DoYouReallyWantToRemoveThisCustomSolarPanel:"你确定删除此定制光伏板",MakeSureThisCustomSolarPanelIsNotUsed:"删除之前请确认此定制光伏板没有被当前模型采用",ThisCustomSolarPanelIsUsed:"此定制光伏板被当前模型采用",DoYouReallyWantToImportCustomSolarPanel:"你确定輸入定制光伏板",ExistingSettingsWillBeOverwritten:"现有的设定将被取代",CannotAddCustomSolarPanel:"无法添加此定制光伏板",CustomSolarPanelMustHaveModelName:"定制光伏板必须要有型号",CustomSolarPanelExists:"当前文件已经定义了此名字的定制光伏板",FailInImportingDataFromClipboard:"从系统剪切板输入数据失败"},parabolicTroughMenu:{ModuleLength:"模块长度",Modules:"模块",ModulesLong:"模块长",LatusRectum:"通径",OnlyThisParabolicTrough:"只这个抛物线槽",AllParabolicTroughsAboveFoundation:"同一地基上所有的抛物线槽",AllSelectedParabolicTroughs:"所有选中的抛物线槽",AllParabolicTroughs:"所有的抛物线槽"},fresnelReflectorMenu:{AbsorberPipe:"吸收管",SelectAbsorberToReflectSunlightTo:"选择阳光反射到的吸收管",ModuleLength:"模块长度",Modules:"模块",ModulesLong:"模块长",OnlyThisFresnelReflector:"只这个菲涅耳反射镜",AllFresnelReflectorsAboveFoundation:"同一地基上所有的菲涅耳反射镜",AllSelectedFresnelReflectors:"所有选中的菲涅耳反射镜",AllFresnelReflectors:"所有的菲涅耳反射镜"},heliostatMenu:{Tower:"吸收塔",SelectTowerToReflectSunlightTo:"选择阳光反射到的吸收塔",OnlyThisHeliostat:"只这个定日镜",AllHeliostatsAboveFoundation:"同一地基上所有的定日镜",AllSelectedHeliostats:"所有选中的定日镜",AllHeliostats:"所有的定日镜"},parabolicDishMenu:{ReceiverStructure:"接收器结构",CentralPole:"中心直柱",CentralPoleWithTripod:"三脚架和中心直柱",Quadrupod:"四脚架",RimDiameter:"外圈直径",LatusRectum:"通径",ExtraPoleHeightInAdditionToRadius:"半径之外额外的支架高度",OnlyThisParabolicDish:"只这个抛物线碟",AllParabolicDishesAboveFoundation:"同一地基上所有的抛物线碟",AllSelectedParabolicDishes:"所有选中的抛物线碟",AllParabolicDishes:"所有的抛物线碟"},windTurbineMenu:{BirdSafeDesign:"鸟类安全设计",BirdSafeNone:"无",BirdSafeBicolor:"双色",BirdSafeStriped:"条纹",Rotor:"转子",BladeNumber:"叶片数目",RotorInitialAngle:"转子初始角度",RotorBladeDesign:"转子叶片设计",RotorBladeRadius:"转子叶片半径",RotorBladePitchAngle:"转子叶片俯仰角",RelativeYawAngle:"相对偏流角",MaximumChordLength:"最大弦长度",Tower:"塔架",TowerHeight:"塔架高度",TowerRadius:"塔架半径",HubDesign:"转子轮毂设计",HubRadius:"轮毂半径",HubLength:"轮毂长度",OnlyThisWindTurbine:"只这个风力涡轮机",AllWindTurbinesAboveFoundation:"同一地基上所有的风力涡轮机",AllSelectedWindTurbines:"所有选中的风力涡轮机",AllWindTurbines:"所有的风力涡轮机"},wallMenu:{TextureDefault:"默认材质",Texture01:"一号材质",Texture02:"二号材质",Texture03:"三号材质",Texture04:"四号材质",Texture05:"五号材质",Texture06:"六号材质",Texture07:"七号材质",Texture08:"八号材质",Texture09:"九号材质",Texture10:"十号材质",SizeOfWall:"墙的尺寸",OnlyThisWall:"只这堵墙",AllConnectedWalls:"所有连接的墙",AllWallsAboveFoundation:"同一地基上所有的墙",AllSelectedWalls:"所有选中的墙",AllWalls:"所有的墙",Windows:"窗户",LockAllUnlockedWindows:"固定所有非固定的窗户",UnlockAllLockedWindows:"解除所有的窗户固定",RemoveAllUnlockedWindows:"删除这堵墙上所有非固定的窗户",DoYouReallyWantToRemoveAllWindowsOnThisWall:"你确定删除这堵墙上所有非固定的窗户吗",Doors:"门",LockAllUnlockedDoors:"固定所有非固定的门",UnlockAllLockedDoors:"解除所有的门固定",RemoveAllUnlockedDoors:"删除这堵墙上所有非固定的门",DoYouReallyWantToRemoveAllDoorsOnThisWall:"你确定删除这堵墙上所有非固定的门吗",SolarPanels:"光伏板",LockAllUnlockedSolarPanels:"固定所有非固定的光伏板",UnlockAllLockedSolarPanels:"解除所有的光伏板固定",RemoveAllUnlockedSolarPanels:"删除这堵墙上所有非固定的光伏板",DoYouReallyWantToRemoveAllSolarPanelsOnThisWall:"你确定删除这堵墙上所有非固定的光伏板吗",Sensors:"传感器",LockAllUnlockedSensors:"固定所有非固定的传感器",UnlockAllLockedSensors:"解除所有的传感器固定",RemoveAllUnlockedSensors:"删除这堵墙上所有非固定的传感器",DoYouReallyWantToRemoveAllSensorsOnThisWall:"你确定删除这堵墙上所有非固定的传感器吗",Lights:"电灯",LockAllUnlockedLights:"固定这堵墙上所有非固定的电灯",UnlockAllLockedLights:"解除这堵墙上所有的电灯固定",RemoveAllUnlockedLights:"删除这堵墙上所有非固定的电灯",DoYouReallyWantToRemoveAllLightsOnThisWall:"你确定删除这堵墙上所有非固定的电灯吗",Polygons:"多边形",LockAllUnlockedPolygons:"固定这堵墙上所有非固定的多边形",UnlockAllLockedPolygons:"解除这堵墙上所有的多边形固定",RemoveAllUnlockedPolygons:"删除这堵墙上所有非固定的多边形",DoYouReallyWantToRemoveAllPolygonsOnThisWall:"你确定删除这堵墙上所有非固定的多边形吗",WallStructure:"墙结构",DefaultStructure:"默认",StudStructure:"墙柱",PillarStructure:"圆柱",Opacity:"遮光度",StructureSpacing:"结构间距",StructureWidth:"结构宽度",StructureThickness:"结构厚度",StructureColor:"结构颜色",Color:"牆体颜色",Height:"高度",Thickness:"厚度",Texture:"材质",AllLightsOnWallInside:"所有电灯在牆内",AllLightsOnWallOutside:"所有电灯在牆外",Fill:"填充",Full:"全部",Partial:"部分",Empty:"空白",OpenToOutside:"对外面开放",EavesLength:"屋檐延伸长度",Parapet:"女墙",ParapetColor:"女墙颜色",ParapetTexture:"女墙材质",ParapetHeight:"女墙高度",CopingsHeight:"顶盖高度",CopingsWidth:"顶盖宽度"},windowMenu:{OnlyThisWindow:"只这个窗户",AllWindowsOnSurface:"同一表面上所有的窗户",AllWindowsAboveFoundation:"同一地基上所有的窗户",AllSelectedWindows:"所有选中的窗户",AllWindows:"所有的窗户",Width:"宽度",Height:"高度",Setback:"离墙体外表面的距离",RelativeToWallThickness:"相对于墙的厚度",Mullion:"直棂",HorizontalMullion:"水平的直棂",VerticalMullion:"竖直的直棂",MullionWidth:"直棂宽度",HorizontalMullionSpacing:"水平直棂的间距",VerticalMullionSpacing:"竖直直棂的间距",MullionColor:"直棂颜色",Tint:"着色",Opacity:"不透明度",SolarHeatGainCoefficient:"太阳辐射热获取系数(SHGC) = 1 - 不透明度",Shutter:"百叶窗",LeftShutter:"左侧百叶窗",RightShutter:"右侧百叶窗",BothShutters:"两侧百叶窗",ShutterWidth:"相对宽度",ShutterColor:"百叶窗颜色",Frame:"边框",FrameWidth:"边框宽度",SillWidth:"窗台宽度",Color:"边框颜色",WindowType:"窗户种类",Default:"默认",Arched:"拱形",Polygonal:"多边形",Interior:"内窗",Empty:"空白"},roofMenu:{TextureDefault:"默认材质",Texture01:"一号材质",Texture02:"二号材质",Texture03:"三号材质",Texture04:"四号材质",Texture05:"五号材质",Texture06:"六号材质",Texture07:"七号材质",OnlyThisRoof:"只这个屋顶",AllRoofsAboveFoundation:"同一地基上所有的屋顶",AllSelectedRoofs:"所有选中的屋顶",AllRoofs:"所有的屋顶",OnlyThisCeiling:"只这个天花板",AllCeilingsAboveFoundation:"同一地基上所有的天花板",AllCeilings:"所有的天花板",EavesOverhangLength:"屋檐延伸长度",RafterSpacing:"屋椽间距",RafterWidth:"屋椽宽度",RafterThickness:"屋椽厚度",RafterColor:"屋椽颜色",RoofColor:"屋顶颜色",RoofSideColor:"屋顶侧面颜色",GlassTint:"玻璃颜色",Opacity:"遮光度",RoofStructure:"屋顶结构",DefaultStructure:"默认",RafterStructure:"屋椽",GlassStructure:"玻璃",SolarPanels:"光伏板",LockAllUnlockedSolarPanels:"固定所有非固定的光伏板",UnlockAllLockedSolarPanels:"解除所有的光伏板固定",RemoveAllUnlockedSolarPanels:"删除这个屋顶上所有非固定的光伏板",DoYouReallyWantToRemoveAllSolarPanelsOnThisRoof:"你确定删除这个屋顶上所有非固定的光伏板吗",Windows:"天窗",LockAllUnlockedWindows:"固定所有非固定的天窗",UnlockAllLockedWindows:"解除所有的天窗固定",RemoveAllUnlockedWindows:"删除这个屋顶上所有非固定的天窗",DoYouReallyWantToRemoveAllWindowsOnThisRoof:"你确定删除这个屋顶上所有非固定的天窗吗",Sensors:"传感器",LockAllUnlockedSensors:"固定所有非固定的传感器",UnlockAllLockedSensors:"解除所有的传感器固定",RemoveAllUnlockedSensors:"删除这个屋顶上所有非固定的传感器",DoYouReallyWantToRemoveAllSensorsOnThisRoof:"你确定删除这个屋顶上所有非固定的传感器吗",Lights:"电灯",RemoveAllUnlockedLights:"删除这个屋顶上所有非固定的电灯",DoYouReallyWantToRemoveAllLightsOnThisRoof:"你确定删除这个屋顶上所有非固定的电灯吗",AllLightsOnRoofInside:"所有电灯在屋顶内",AllLightsOnRoofOutside:"所有电灯在屋顶外",Rise:"相对高度",Ceiling:"天花板",RoofRValue:"屋顶R值",CeilingRValue:"天花板R值"},doorMenu:{TextureDefault:"默认材质",Texture01:"一号材质",Texture02:"二号材质",Texture03:"三号材质",Texture04:"四号材质",Texture05:"五号材质",Texture06:"六号材质",Texture07:"七号材质",Texture08:"八号材质",Texture09:"九号材质",Texture10:"十号材质",Texture11:"十一号材质",Texture12:"十二号材质",Texture13:"十三号材质",Texture14:"十四号材质",Texture15:"十五号材质",Texture16:"十六号材质",Texture17:"十七号材质",OnlyThisDoor:"只这个门",AllDoorsOnWall:"同一面墙上所有的门",AllDoorsAboveFoundation:"同一地基上所有的门",AllSelectedDoors:"所有选中的门",AllDoors:"所有的门",DoorType:"门种类",Default:"默认",Arched:"拱形",Filled:"填充",FrameColor:"门框颜色",Interior:"内门"},siteInfoPanel:{High:"最高温度",Low:"最低温度"},designInfoPanel:{NumberOfSelectedHeliostats:"选中的定日镜总数",NumberOfSelectedSolarPanels:"选中的光伏板总数",ElectricityGeneratedDailyBySolarPanels:"这些光伏板的日发电量",SceneDiameter:"场景直径",BuildingArea:"建筑面积"},visualizationControlPanel:{ColorContrast:"热图颜色对比度",FluxScale:"热通量长度",ClickUpOrDownArrowButtonsToChange:"点击上下箭头改变参数"},instructionPanel:{Rotate:"旋转",DragMouse:"拖动鼠标",Zoom:"缩放",MouseWheelOrKeys:"鼠标滚轮或者Ctrl+[和Ctrl+]",MouseWheelOrKeysMac:"鼠标滚轮或者⌘+[和⌘+]",Pan:"平移",HoldCtrlDragMouse:"按下Ctrl键并拖动鼠标",HoldMetaDragMouse:"按下⌘键并拖动鼠标",Enter2DMode:"進入二维模式",Exit2DMode:"退出二维模式",NavigationMode:"导航模式",EnableNavigation:"進入导航模式",DisableNavigation:"退出导航模式",MoveForwardBack:"前后移动",MoveForwardBackInstruction:"按W/S键",MoveLeftRight:"左右移动",MoveLeftRightInstruction:"按A/D键",MoveUpDown:"上下移动",MoveUpDownInstruction:"按Z/X键",Turn:"拐弯",TurnInstruction:"按方向键",ResetView:"重置视角",AutoRotate:"自动旋转",StartOrStop:"按F4键启动或停止"},mapPanel:{ImageOnGround:"地面显示图像",HideAddress:"隐藏地址",WeatherStations:"气象站",WeatherStationsNote:"关闭此选项以提高地图速度",Coordinates:"经纬度坐标",Zoom:"放大程度"},visibilityPanel:{SolarPanelVisibility:"光伏板对观察者的可见度",Observer:"观察者",VantagePoint:"观察位置",ItemizedVisibilityByFields:"每个场的可见度",TotalVisibility:"总可见度"},sensorPanel:{LightSensor:"光传感器",WeatherDataFrom:"气象数据来自"},buildingEnergyPanel:{DailyBuildingEnergy:"建筑物日能耗",YearlyBuildingEnergy:"建筑物年能耗",Heater:"暖气",AC:"空调",SolarPanel:"光伏",Net:"净能耗"},solarPanelYieldPanel:{SolarPanelDailyYield:"光伏日发电量",SolarPanelYearlyYield:"光伏年发电量",Yield:"发电量",YieldPerHour:"每小时发电量",DailyTotal:"日发电总量",YearlyTotal:"年发电总量",ShowOutputsOfIndividualSolarPanels:"显示每行光伏板单独发电量",Profit:"利润",TotalCost:"总成本",TotalRevenue:"总收入",TotalYield:"总发电量",MeanYield:"平均发电量",ModuleCount:"光伏板总数"},parabolicTroughYieldPanel:{ParabolicTroughDailyYield:"抛物线槽日发电量",ParabolicTroughYearlyYield:"抛物线槽年发电量",Yield:"发电量",YieldPerHour:"每小时发电量",DailyTotal:"日发电总量",YearlyTotal:"年发电总量",ShowOutputsOfIndividualParabolicTroughs:"显示每行抛物线槽单独发电量"},parabolicDishYieldPanel:{ParabolicDishDailyYield:"抛物线碟日发电量",ParabolicDishYearlyYield:"抛物线碟年发电量",Yield:"发电量",YieldPerHour:"每小时发电量",DailyTotal:"日发电总量",YearlyTotal:"年发电总量",ShowOutputsOfIndividualParabolicDishes:"显示每个抛物线碟单独发电量"},fresnelReflectorYieldPanel:{FresnelReflectorDailyYield:"菲涅耳反射镜日发电量",FresnelReflectorYearlyYield:"菲涅耳反射镜年发电量",Yield:"发电量",YieldPerHour:"每小时发电量",DailyTotal:"日发电总量",YearlyTotal:"年发电总量",ShowOutputsOfIndividualFresnelReflectors:"显示每个菲涅耳反射镜单独发电量"},heliostatYieldPanel:{HeliostatDailyYield:"定日镜日发电量",HeliostatYearlyYield:"定日镜年发电量",Yield:"发电量",YieldPerHour:"每小时发电量",DailyTotal:"日发电总量",YearlyTotal:"年发电总量",ShowOutputsOfIndividualHeliostats:"显示每个定日镜单独发电量"},updraftTowerYieldPanel:{UpdraftTowerDailyYield:"太阳能上升气流塔日发电量",UpdraftTowerYearlyYield:"太阳能上升气流塔年发电量",ChimneyAirTemperature:"烟囱空气温度",ChimneyWindSpeed:"烟囱风速",Yield:"发电量",YieldPerHour:"每小时发电量",DailyTotal:"日发电总量",YearlyTotal:"年发电总量",ShowOutputsOfIndividualUpdraftTowers:"显示每个太阳能上升气流塔单独发电量"},heliodonPanel:{SunAndTimeSettings:"太阳和时间设置",SunAngles:"角度",TwentyFourHours:"24小时"},cloudFilePanel:{CopyTitle:"拷贝标题",TitleCopiedToClipBoard:"标题拷贝到剪贴板",SearchByTitle:"按标题搜索",MyLikes:"我喜欢的模型",MyCloudFiles:"我的云文件",GenerateLink:"生成链接",LinkGeneratedInClipBoard:"链接生成到剪贴板",DoYouReallyWantToDelete:"您确定删除此文件",IfSharedOrPublishedRenamingFileBreaksExistingLinks:"如果此文件已被分享或发布, 改名会使已有链接失效"},projectListPanel:{CopyTitle:"拷贝标题",TitleCopiedToClipBoard:"标题拷贝到剪贴板",SearchByTitle:"按标题搜索",MyProjects:"我的项目",GenerateProjectLink:"生成项目链接",ProjectLinkGeneratedInClipBoard:"项目链接生成到剪贴板",DoYouReallyWantToDeleteProject:"您确定删除项目",IfSharedOrPublishedRenamingProjectBreaksExistingLinks:"如果此项目已被分享或发布, 改名会使已有链接失效"},projectPanel:{ProjectSettings:"项目设定",ThumbnailImageSize:"缩略图大小",ProjectByOtherPeople:"别人的项目",Project:"项目",ProjectType:"类别",ProjectDescription:"描述",MakeDescriptionEditable:"编辑描述",MakeDescriptionNonEditable:"不编辑描述",DoubleClickToMakeDescriptionEditable:"双击此描述激活编辑功能",SolarPanelArray:"光伏板阵列设计",CurateCurrentDesign:"收藏当前设计",UpdateSelectedDesign:"更新选中设计",RemoveSelectedDesign:"删除选中设计",ClickToFlipSortingOrder:"点击逆转排序方向",DesignNotShownInSolutionSpaceClickToShow:"此设计目前不显示在设计空间内,点击显示",DesignShownInSolutionSpaceClickToHide:"此设计目前显示在设计空间内,点击隐藏",SolutionSpace:"设计空间",ChooseSolutionSpace:"选择设计空间",ChooseDataColoring:"选择数据着色",SameColorForAllDesigns:"所有设计一个颜色",OneColorForEachDesign:"每个设计一个颜色",SolutionSpaceScreenshot:"设计空间截屏",ScatterPlotScreenshot:"散点图截屏",SingleClickToSelectDoubleClickToOpen:"单击选择,双击打开。",SingleClickToDeselectDoubleClickToOpen:"单击取消选择,双击打开。",GenerateScatterPlot:"生成散点图",SelectXAxis:"选择X轴",SelectYAxis:"选择Y轴"},accountSettingsPanel:{MyAccountSettings:"我的账户设定",MyID:"我的🆔",ClickToCopyMyID:"点击此处拷贝我的ID",IDInClipBoard:"您现在可以粘贴ID了。",StoreMyNameInMyFilesWhenSaving:"保存文件时签上我的大名",DoYouReallyWantToShowYourNameInYourFiles:"您确定在您的文件里保存您的大名吗?",SignFileDisclaimer:"如果您选择保存,您的大名可能被所有打开您的文件的人看到。",Likes:"点赞总数",AllPublished:"发布总数",PublishedUnderAliases:"别名发布",UserCount:"用户总数",SchoolID:"学校编号",ClassID:"班级编号"},weatherPanel:{SunshineHours:"日照时间"},diurnalTemperaturePanel:{SelectAirTemperatureModel:"选择气温模型",Sinusoidal:"正弦函数"},economicsPanel:{EconomicsParameters:"经济学参数",ElectricitySellingPrice:"销售电价",OperationalCostPerUnit:"单位运行成本",SellingPrice:"销售电价",UnitCost:"单位成本"},navigationPanel:{NavigationParameters:"导航模式参数",MinimumMoveSpeed:"最小移动速度",MinimumTurnSpeed:"最小拐弯速度"},shadowSettingsPanel:{ShadowSettings:"阴影设定",ShadowCameraFarDistance:"最远距离",ShadowMapSize:"映射图长宽",Notes:"注意事项",RefreshPageNote:"改变设置后须刷新页面。",MapSizeWarning:"大的映射图长宽可能导致阿拉丁无法在某些电脑上运行。"},yearlyLightSensorPanel:{SkyClearness:"天空清晰度",ShowDaylightResults:"显示日照时间结果",ShowSkyClearnessResults:"显示天空清晰度结果",ShowAverageDailySolarRadiation:"显示日平均辐射结果"},analysisManager:{NoSensorForCollectingData:"没有传感器收集数据。",NoSolarPanelForAnalysis:"没有光伏板可以分析。",NoObserverForVisibilityAnalysis:"没有找到可见度分析的观察者。",NoSolarWaterHeaterForAnalysis:"沒有太阳能热水器可以分析。",NoParabolicDishForAnalysis:"沒有抛物线碟可以分析。",NoParabolicTroughForAnalysis:"沒有抛物线槽可以分析。",NoFresnelReflectorForAnalysis:"沒有菲涅耳反射镜可以分析。",NoHeliostatForAnalysis:"沒有定日镜可以分析。",NoSolarUpdraftTowerForAnalysis:"沒有太阳能上升气流塔可以分析。",NoBuildingForAnalysis:"沒有建筑物可以分析。"},toolbar:{CloudFile:"云文件",Select:"选择",AddFoundation:"添加地基",AddWall:"添加墙体",AddWindow:"添加窗户",AddDoor:"添加门",AddPyramidRoof:"添加金字塔屋顶",AddGableRoof:"添加双坡屋顶",AddHipRoof:"添加四坡屋顶",AddGambrelRoof:"添加复斜屋顶",AddMansardRoof:"添加折线屋顶",AddCuboid:"添加长方体",AddSensor:"添加传感器",AddSolarPanel:"添加光伏板",AddSolarWaterHeater:"添加太阳能热水器",AddBatteryStorage:"添加储蓄电池",AddParabolicDish:"添加抛物线碟",AddParabolicTrough:"添加抛物线槽",AddFresnelReflector:"添加菲涅耳反射镜",AddHeliostat:"添加定日镜",AddWindTurbine:"添加水平轴风力涡轮机",AddVerticalAxisWindTurbine:"添加垂直轴风力涡轮机",AddLight:"添加电灯",AddTree:"添加树木",AddFlower:"添加花草",AddPeople:"添加人物",DoubleClickToLockThisModeForNextAction:"双击按钮给下个动作锁定此模式",ClickToUnlockThisModeForNextAction:"点击按钮让动作完成即离开此模式",ManipulateGroup:"整体操作一个组",ClearScene:"清空场景",ShowSunAndTimeSettings:"显示太阳和时间设置",SpatialAnalysisOfEnergy:"能量的空间分析",DoYouReallyWantToClearContent:"您确定清空场景吗",ClickForMoreButtons:"点击此处切换到更多的按钮模式"},tooltip:{gotoIFI:"访问未来智能研究所",visitAladdinHomePage:"访问阿拉丁主页",clickToOpenMenu:"点击打开主菜单",clickToAccessAccountSettings:"点击打开账号设定"},tree:{Apple:"苹果树",Birch:"白桦",Coconut:"椰子树",Dogwood:"茱萸",Elm:"榆树",FanPalm:"扇叶棕榈",Linden:"菩提",Magnolia:"玉兰",Maple:"枫树",Oak:"橡树",Pine:"松树",Spruce:"云杉"},flower:{Bellflower:"铃兰",Boxwood:"黄杨",CactusCombo1:"仙人掌组合一",CactusCombo2:"仙人掌组合二",CactusCombo3:"仙人掌组合三",CactusCombo4:"仙人掌组合四",Hibiscus:"木槿",Hosta:"玉簪",Hydrangea:"绣球花",Peony:"牡丹",RedRose:"红玫瑰",Spirea:"绣线菊",Sunflower:"向日葵",TallBush:"高灌木",Tulip:"郁金香",WhiteFlower:"白花",YellowFlower:"黄花"},people:{Jaah:"贾阿",Jack:"杰克",Jacob:"雅各布",Jacqueline:"杰奎琳",Jade:"美玉",Jamelia:"洁米莉雅",James:"詹姆斯",Jane:"简",Jaya:"佳娅",Jaye:"杰伊",Jeanette:"珍妮特",Jedi:"杰迪",Jeff:"杰夫",Jena:"珍娜",Jennifer:"珍尼弗",Jess:"杰西",Jett:"杰特",Jill:"吉尔",Jiya:"吉娅",Joan:"琼",Jocelyn:"乔斯林",Joel:"乔尔",Joey:"乔伊",John:"约翰",Jonathon:"乔纳森",Jose:"何塞",Joseph:"约瑟夫",Joshua:"约书亚",Judd:"贾德",Judy:"朱蒂",Julia:"朱莉娅",Julio:"胡里奥",Jumapili:"祖玛匹莉",June:"准卫",Juro:"朱诺",Justin:"贾斯汀"},compass:{N:"北",S:"南",W:"西",E:"东"},month:{January:"一月",February:"二月",March:"三月",April:"四月",May:"五月",June:"六月",July:"七月",August:"八月",September:"九月",October:"十月",November:"十一月",December:"十二月"},modelsMap:{AllTime:"全部时间",SearchByPublisher:"按发布者搜索",SearchByLabel:"按标签搜索",MyPublishedModels:"我发布的模型",TotalNumberOfUserPublishedModelsInSelectedPeriod:"选定时间段用户发布的模型总数",AllTimeTotal:"全部时间用户发布的模型总数",SortFromOldestToNewest:"从早到晚排序",SortFromNewestToOldest:"从晚到早排序",SitesFound:"个位置",ModelsFoundOnThisSite:"个模型在此位置",ShowModelsPublishedByThisAuthor:"展示此用户发布的模型"}}},ppt={translation:{name:{IFI:"未來智能研究所",Aladdin:"阿拉丁",Tagline:"阿拉丁: 探索人工智慧時代的設計軟體 — 未來智能研究所研發"},cookie:{Statement:"聲明:為了改善您的用戶體驗,阿拉丁採用cookie儲存少量數據。",Accept:"同意"},aboutUs:{ProductBroughtToYouBy:"未來智能研究所榮譽出品",TermsOfService:"服務條款",PrivacyPolicy:"隱私政策",Software:"軟體",Content:"課件",Research:"研究",Support:"服務",Acknowledgment:"鳴謝",FundingInformation:"本產品的研發承蒙美國國家科學基金會慷慨資助(項目號#2105695,#2131097,#2301164)。本產品的任何觀點或結論僅代表創作者個人意見。",Contact:"如您需要更多資訊,請聯繫 Charles Xie (charles@intofuture.org)。我們會盡快回复。",Translators:"翻譯"},word:{BrandName:"品牌",Name:"名字",Refresh:"刷新",LastUpdate:"上一次更新",Small:"小",Medium:"中",Large:"大",Design:"設計",Information:"資訊",Type:"類别",Text:"文字",FontSize:"字體大小",FontColor:"字體顏色",Model:"模型",Models:"模型",Upload:"上傳",ClickCount:"點擊數",Share:"分享",AlreadyLike:"已點贊",Like:"點贊",MustLogInToLike:"必須登錄才能點贊",AllRightsReserved:"版權所有",MeterAbbreviation:"米",VoltAbbreviation:"伏",AmpereAbbreviation:"安",WattAbbreviation:"瓦",Version:"版本",VersionInitial:"版本",Options:"選項",Maximum:"最大",Minimum:"最小",MaximumNumber:"最多",MinimumNumber:"最少",MaximumValue:"最大值",MinimumValue:"最小值",Or:"或",None:"無",High:"高",Partial:"部分",Teacher:"老師",Class:"班級",Total:"總數",Leaderboard:"用戶排行榜",Latest:"最新",Range:"範圍",SIUnit:"國際單位制",USUnit:"美國單位制",ThermalTransmittance:"熱透過率",ThermalResistance:"熱阻",UValue:"U值",RValue:"R值",VolumetricHeatCapacity:"容積熱容",BuildingHVACSystem:"建築物暖通空調系統",ThermostatSetpoint:"恆溫器設定值",TemperatureToleranceThreshold:"溫度忍耐閾值",TemperatureToleranceThresholdExplanation:`當日最低外面溫度高於恆溫器設定值減去此閾值,暖氣不開。 -當日最高外面溫度低於恆溫器設定值加上此閾值,空調不開。`,Press:"按",Open:"打開",Save:"保存",SaveAsImage:"保存為圖像",SaveAsCsv:"保存為CSV",Update:"刷新",Paste:"粘貼",Copy:"複製",Cut:"剪切",Delete:"删除",Add:"添加",Lock:"固定",Translucent:"半透明",Transparency:"透明度",Color:"顏色",Pattern:"圖案",Texture:"材質",Thickness:"厚度",Size:"尺寸",Yes:"是",No:"不",OK:"確定",Cancel:"取消",Apply:"應用",Close:"關閉",ApplyTo:"適用於",Run:"運行",Pause:"暫停",Resume:"繼續",Clear:"清空",Warning:"警告",Caution:"小心",Reminder:"提醒",Length:"長度",Width:"寬度",Height:"高度",Radius:"半徑",Angle:"角度",Azimuth:"方位角",Coordinates:"坐標",Weather:"天氣",Show:"顯示",Animate:"動畫",Date:"日期",Time:"時間",Title:"標題",Owner:"所有者",Action:"操作",Rename:"改名",Location:"位置",Latitude:"緯度",Month:"月份",Day:"天",Hour:"小時",Daylight:"白天長度",Radiation:"輻射",Temperature:"温度",kWh:"千瓦時",dollar:"元",MeterPerSecond:"米/秒",NorthInitial:"北",SouthInitial:"南",EastInitial:"東",WestInitial:"西",Fixed:"固定",Elements:"部件",Energy:"能量",Unknown:"未知",Label:"標籤",Description:"描述",NoDescription:"無描述",MaximumCharacters:"最多字符數",Author:"作者",Publisher:"發布者",Building:"建築",ResidentialBuilding:"住宅建築",CommercialBuilding:"商用建築",SchoolBuilding:"學校建築",TouristAttraction:"旅遊景點",UnderConstruction:"在建",Photovoltaic:"光伏",WindPower:"風能",ColocationProjects:"共用空間專案",Anonymous:"無名氏",Nickname:"别名",Pin:"置頂",Unpin:"解除置頂"},shared:{NoTexture:"無材質",FoundationElement:"地基",CuboidElement:"長方體",PolygonElement:"多邊形",SensorElement:"傳感器",SolarPanelElement:"光伏板",SolarWaterHeaterElement:"太陽能熱水器",ParabolicDishElement:"拋物線碟",ParabolicTroughElement:"拋物線槽",FresnelReflectorElement:"菲涅耳反射鏡",HeliostatElement:"定日鏡",WindTurbineElement:"風力渦輪機",LightElement:"電燈",ElementLocked:"固定",ModelType:"模型類别",OutputBreakdown:"分列發電量",MoreResults:"更多結果"},message:{NewVersionAvailable:"有新版本",CalculationMayBeSlowDoYouWantToContinue:"計算可能會很慢。您想繼續嗎?",IncreaseSolarRadiationHeatmapGridCellSizeToSpeedUp:"加大太陽輻射熱圖網格的尺寸可加速",ModelNotFound:"沒有找到模型",CannotSignIn:"登錄失敗",CannotSignOut:"退出失敗",YourAccountWasCreated:"成功建立您的賬號。",CannotCreateAccount:"無法創建賬號",YourAccountSettingsWereSaved:"您的賬號設定已保存。",CannotSaveYourAccountSettings:"您的賬號設定無法保存",CannotSaveYourFileToCloud:"無法保存您的文檔到雲端",CannotCreateNewProject:"無法創建新專案",CannotCreateNewProjectWithoutTitle:"沒有標題, 無法創建新專案",CannotOpenYourProjects:"無法打開您的專案列表",CannotOpenProject:"無法打開專案",CannotDeleteProject:"無法刪除專案",CannotRenameProject:"無法給專案改名",CannotAddDesignToProject:"無法把此設計加到專案裡",CannotAddDesignToProjectOwnedByOthers:"不能把此設計加到別人的專案裡",DesignRemovedFromProject:"設計被成功地從專案裡刪除",CannotRemoveDesignFromProject:"無法把此設計從專案裡刪除",CannotUpdateProject:"無法更新專案",CannotFetchProjectData:"無法取得專案數據",TitleUsedChooseDifferentOne:"此標題已經被使用, 請採用不同的標題",CloudFileWithTitleExistsDoYouWantToOverwrite:"使用此標題的雲文檔已經存在,您確定要覆蓋它嗎?",CloudFileNotFound:"找不到此云端文檔",CannotLoadModelsOnMap:"無法下載地圖上的模型",CannotLoadLeaderboard:"無法下載排行榜",CannotPublishModelOnMap:"模型無法發佈到地圖上",CannotLikeModelFromMap:"無法點贊地圖上的模型",CannotDeleteModelFromMap:"無法删除地圖上的模型",ModelDeletedFromMap:"模型已從地圖上刪除",DoYouWantToDeleteModelFromMap:"您要删除地圖上的這個模型嗎?",CannotOpenCloudFile:"此云端文檔無法打開",CannotReadCloudFile:"無法讀取此云端文檔",CannotWriteCloudFile:"無法存儲此云端文檔",CloudFileCopied:"拷貝云端文檔",CannotOpenCloudFolder:"您的雲端文檔夾無法打開",CannotDeleteCloudFile:"無法刪除此云端文檔",CannotRenameCloudFile:"此云端文檔的名字無法更改",DoYouWantToSaveChanges:"您要保存當前文檔嗎?",NotApplicableToSelectedAction:"此值不適用於當前選擇範圍",ThisElementIsLocked:"這個部件被鎖定。",ThisCannotBeUndone:"這個操作一旦執行就不能撤銷。",AzimuthOfNorthIsZero:"正北的方位角為零度",CounterclockwiseAzimuthIsPositive:"逆時針為正",SouthFacingIsZero:"朝南為零度",ClockwiseRotationIsPositive:"順時針為正",MoveCancelledBecauseOfOverlap:"位置重疊,移動取消。",MoveOutsideBoundaryCancelled:"位置出界,移動取消。",RotationCancelledBecauseOfOverlap:"位置重疊,旋轉取消。",RotationOutsideBoundaryCancelled:"位置出界,旋轉取消。",ResizingCancelledBecauseOfOverlap:"位置重疊,尺寸調整取消。",ResizingOutsideBoundaryCancelled:"位置出界,尺寸調整取消。",CannotPasteOutsideBoundary:"位置出界,不能複制。",CannotPasteBecauseOfOverlap:"位置重疊,不能複制。",CannotMoveObjectTooFar:"位置太遠,移動取消。",ExistingSolarPanelsWillBeRemovedBeforeApplyingNewLayout:"採用新佈局之前必須移除現有的光伏板。",DoYouWantToContinue:"您想繼續嗎?",SolarPanelsCannotIntersectWithGround:"光伏板不能和地面接觸。",SolarPanelsCannotOverlapWithOneAnother:"光伏板不能重疊。",ScreenshotSaved:"截屏圖片保存在下載文檔夾裡。",CsvFileSaved:"CSV保存在下載文檔夾裡。",SimulationStarted:"模擬開始。",SimulationCompleted:"模擬結束。",SimulationAborted:"模擬取消。",SimulationPaused:"模擬暫停。",CancelSimulation:"取消模擬",PauseSimulation:"暫停模擬",ResumeSimulation:"繼續模擬",SimulationWillNotStartDueToErrors:"由於錯誤模擬無法運行",SimulationWillStartDespiteWarnings:"發現問題,但模擬仍然將運行。",EvolutionStarted:"演化開始。",EvolutionCompleted:"演化結束。",EvolutionAborted:"演化取消。",EvolutionPaused:"演化暫停。",EncounterEvolutionError:"演化出錯。",CancelEvolution:"取消演化",PauseEvolution:"暫停演化",ResumeEvolution:"繼續演化",ConvergenceThresholdHasBeenReached:"收斂閾值已達到。",MaximumNumberOfGenerationsHasBeenReached:"最大世代數已達到。",MaximumNumberOfStepsHasBeenReached:"最大步數已達到。",ObjectiveFunctionTypeError:"此操作不支持當前的目標函數。請從菜單啟動此功能。",WallsAreNotAtSameHeight:"墻體高度不同。",WallsAreNotPerpendicular:"墻體不垂直。",WallsAreNotConnected:"墻體不相連。",WallsNumberNeedToBeFour:"墻體數量必須為四個。",BuildingContainsEmptyWall:"建築物有空牆。",BuildingRoofMissing:"建築物沒有屋頂。",UnknownErrors:"未知錯誤。",SigningOutAnonymousAccount:"你確定退出嗎?一旦退出,此匿名帳號將不可恢復。"},menu:{AnalysisOptions:"分析選項",option:{GridCellSize:"計算網格的尺寸",SamplingFrequency:"採樣頻率",TimesPerHour:"每小時採樣次數",DaysPerYear:"每一年採樣天數"},mainMenu:"主菜單",cloudMenu:"雲菜單",projectSubMenu:"專案",project:{CreateNewProject:"創建新專案",OpenProject:"打開專案",SaveProject:"保存專案",SaveProjectAs:"另存專案為",YouMustLogInToCreateProject:"您必須登錄才能創建專案",YouMustLogInToOpenProject:"您必須登錄才能打開專案"},fileSubMenu:"文檔",file:{CreateNewFile:"創建新文檔",OpenLocalFile:"打開本地文檔",SaveAsLocalFile:"保存為本地文檔",SavingAbortedMustHaveValidFileName:"文檔名無效,保存失敗",OpenCloudFile:"打開雲端文檔",SaveCloudFile:"保存雲端文檔",SaveAsCloudFile:"另存雲端文檔為",SavingAbortedMustHaveValidTitle:"雲端文檔名無效,保存失敗",ToSaveYourWorkPleaseSignIn:"為了保存您的雲端文檔,請先登錄。",TakeScreenshot:"截屏",UseCloudFileName:"採用雲端文件名",PublishOnModelsMap:"發佈到地圖上",PublishedOnModelsMap:"您的模型成功發佈到地圖上",UpdatedOnModelsMap:"您的模型更新成功",YouMustLogInToPublishYourModel:"您必須登錄才能發布模型",YouCannotPublishAModelThatYouDoNotOwn:"您不能發布他人的模型",YouMustSaveModelOnCloudBeforePublishingIt:"您必須先把此模型保存在雲端才能發布它"},editSubMenu:"編輯",edit:{Undo:"撤銷",Redo:"重做"},viewSubMenu:"視界",view:{NavigationView:"導航模式",TwoDimensionalView:"二維模式",ResetView:"重置視角",ZoomIn:"放大",ZoomOut:"縮小",AutoRotate:"自動旋轉",ShowShadow:"顯示陰影",ShowSurfaceShininess:"顯示表面光澤",TranslucentFloatingWindows:"透明浮動窗口",accessoriesSubMenu:"配件",accessories:{SiteInformation:"位置資訊",DesignInformation:"設計資訊",Instruction:"操作說明",StickyNote:"便簽",Note:"便簽"}},settingsSubMenu:"設置",settings:{WeatherData:"氣象數據",DiurnalTemperature:"晝夜溫度",Heliodon:"日影儀",SunAndTime:"太陽和時間",CustomSolarPanels:"客製化的光伏板",CustomizeSolarPanel:"客製化光伏板"},benchmarksSubMenu:"基準",benchmarks:{SolarRadiationPredictionVsMeasurement:"太陽能輻射模型預測和實際測量的對比",BESTESTCase600:"建築物能耗模擬測試:BESTEST案例600",BESTESTCase610:"建築物能耗模擬測試:BESTEST案例610",BESTESTCase620:"建築物能耗模擬測試:BESTEST案例620",BESTESTCase630:"建築物能耗模擬測試:BESTEST案例630"},graph:{LineWidth:"線條寬度",SymbolSize:"符號大小",BarCategoryGap:"直條間隙",ShowHorizontalGridLines:"顯示格子的水平線條",ShowVerticalGridLines:"顯示格子的豎直線條"},analysisSubMenu:"分析",physicsSubMenu:"物理",physics:{DailySolarRadiationHeatmap:"當日太陽輻射總量分佈熱圖",SolarRadiationHeatmapOptions:"太陽輻射熱圖選項",SolarRadiationHeatmapGridCellSize:"太陽輻射熱圖網格的尺寸",SolarRadiationHeatmapMaxValue:"太陽輻射熱圖最大值",SolarRadiationHeatmapNoAnimation:"若無移動部件則省略動畫",ReflectionHeatmap:"反射熱圖"},sensorSubMenu:"傳感器",sensor:{CollectDailyData:"收集當天數據",CollectYearlyData:"收集全年數據",SensorSimulationNoAnimation:"若無移動部件則省略動畫"},buildingSubMenu:"建築物",building:{AnalyzeDailyBuildingEnergy:"建築物當天能耗分析",AnalyzeYearlyBuildingEnergy:"建築物全年能耗分析",EnergyAnalysisOptions:"能耗分析選項",EnergyGridCellSize:"計算網格的尺寸",BuildingEnergySimulationNoAnimation:"若無移動部件則省略動畫"},solarPanelSubMenu:"太陽能光伏板",solarPanel:{AnalyzeDailyYield:"分析當天產出",AnalyzeYearlyYield:"分析全年產出",AnalyzeVisibility:"分析可見度",PanelDiscretization:"光伏板離散化方法",Exact:"準確",Approximate:"近似",EnergyGridCellSize:"計算網格的尺寸",VisibilityGridCellSize:"視界因子計算網格的尺寸",EnergyAnalysisOptions:"能量分析選項",VisibilityAnalysisOptions:"可見度分析選項",SolarPanelSimulationNoAnimation:"若無移動部件則省略動畫"},parabolicTroughSubMenu:"拋物線槽",parabolicTrough:{AnalyzeDailyYield:"分析當天產出",AnalyzeYearlyYield:"分析全年產出"},parabolicDishSubMenu:"拋物線碟",parabolicDish:{AnalyzeDailyYield:"分析當天產出",AnalyzeYearlyYield:"分析全年產出"},fresnelReflectorSubMenu:"菲涅爾反射鏡",fresnelReflector:{AnalyzeDailyYield:"分析當天產出",AnalyzeYearlyYield:"分析全年產出"},heliostatSubMenu:"定日鏡",heliostat:{AnalyzeDailyYield:"分析當天產出",AnalyzeYearlyYield:"分析全年產出"},solarUpdraftTowerSubMenu:"太陽能上升氣流塔",solarUpdraftTower:{AnalyzeDailyYield:"分析當天產出",AnalyzeYearlyYield:"分析全年產出",SolarUpdraftTowerSimulationNoAnimation:"若無移動部件則省略動畫"},tutorialsSubMenu:"教程",solarEnergyScienceSubMenu:"太陽能科學",solarEnergyScienceTutorials:{SunAngles:"太陽相對於地面觀察者的角度",InsolationAndClimate:"太陽輻射和氣候的關係",SolarRadiationToBox:"一個長方體受到的太陽能輻射分析"},buildingScienceSubMenu:"建築科學",buildingScienceTutorials:{ThermalEnvelopeVsBuildingEnvelope:"房屋的熱學封套和圍護封套",EffectOfSizeOnBuildingEnergy:"房屋大小對能耗的影響",EffectOfOrientationOnBuildingEnergy:"房屋方位對能耗的影響",EffectOfInsulationOnBuildingEnergy:"房屋隔熱對能耗的影響",EffectOfRoofColorOnBuildingEnergy:"屋頂顏色對建築物能耗的影響",EffectOfEavesOverhangLengthOnBuildingEnergy:"屋簷延伸長度對建築物能耗的影響",EffectOfWindowSHGCOnBuildingEnergy:"窗戶太陽能輸入對房屋能耗的影響",EffectOfThermostatSetpointOnBuildingEnergy:"恆溫器設定值對房屋能耗的影響",EffectOfSolarPanelsOnBuildingEnergy:"光伏板對房屋能耗的影響",EffectOfGroundTemperatureOnBuildingEnergy:"地表温度對房屋能耗的影響",EffectOfTreesOnBuildingEnergy:"樹蔭對房屋能耗的影響"},buildingDesignSubMenu:"建築設計",buildingDesignTutorials:{CapeCodStyleHouseWithShedDormer:"有棚頂窗的科德角風格的住宅",MansardRoofWithDormers:"有天窗的折線屋頂",GableRoofVsHipRoof:"雙坡屋頂和四坡屋顶的對比",ColonialVsSaltbox:"殖民地風格和鹽盒風格的對比",GambrelRoofVsMansardRoof:"复斜屋顶和折線屋頂的對比",CombinationRoofVsBonnetRoof:"組合屋頂和帽簷屋頂的對比",DutchGableRoof:"荷蘭雙坡屋頂",GableAndValleyRoof:"坡谷屋頂",ClerestoryRoof:"天窗屋頂",MonitorRoof:"採光屋頂",AFrameHouse:"A字形房子",HalfTimberedHouse:"半木骨架房子",AllBasicRoofTypes:"所有的基本屋頂類型"},photovoltaicSolarPowerSubMenu:"光伏發電",photovoltaicSolarPowerTutorials:{EffectOfTiltAngleOfSolarPanel:"光伏板傾斜角對發電量的影響",EffectOfAzimuthOfSolarPanel:"光伏板方位角對發電量的影響",SolarPanelTypes:"光伏板類型",DefineYourOwnSolarPanels:"定義自己的光伏板",VerticalBifacialSolarPanels:"豎直的雙面光伏板",CompareMonofacialAndBifacialSolarPanels:"單面光伏板和雙面光伏板的對比",SolarTrackers:"自動追日器",CoveringGroundWithSolarPanels:"為什麼我們不簡單地用光伏板覆蓋地面",InterRowSpacingOfSolarPanelArray:"光伏板陣列行間距對發電量的影響",EffectOfOrientationOfSolarPanels:"光伏板排列方向對發電量的影響",SolarPanelArrayAutomaticLayout:"光伏板自動排列"},concentratedSolarPowerSubMenu:"光熱發電",concentratedSolarPowerTutorials:{EffectOfAzimuthOfParabolicTrough:"拋物線槽方位角對發電量的影響",EffectOfLatusRectumOfParabolicTrough:"拋物線槽通徑對發電量的影響",FocusSunlightWithParabolicDish:"用拋物線碟聚焦阳光",LinearFresnelReflectors:"用直線式菲涅爾反射鏡聚焦阳光",EffectOfAbsorberPipeHeightForLinearFresnelReflectors:"吸熱管的安装高度對直線式菲涅爾反射鏡發電量的影響",EffectOfAzimuthOfLinearFresnelReflectors:"直線式菲涅爾反射鏡方位角對發電量的影響",LinearFresnelReflectorsWithTwoAbsorbers:"配備兩個吸收管的直線式菲涅爾反射鏡陣列",CosineEfficiencyOfHeliostats:"定日鏡的餘弦效率",ShadowingAndBlockingOfHeliostats:"定日鏡的陰影和遮擋",EffectSolarPowerTowerHeight:"吸收塔高度對發電量的影響",SolarPowerTower:"塔式光熱發電站"},otherTypesOfSolarPowerSubMenu:"其它類型的太陽能發電",otherTypesOfSolarPowerTutorials:{SolarWaterHeaters:"太陽能熱水器",SolarUpdraftTower:"太陽能上升氣流塔"},windPowerSubMenu:"風力發電",windPowerTutorials:{EffectOfBladeNumberOfWindTurbine:"轉子葉片的數目對風力渦輪機輸出的影響",EffectOfPitchAngleOfWindTurbineBlades:"轉子葉片的俯仰角對風力渦輪機輸出的影響",BirdSafeBladeDesign:"對鳥類安全的葉片設計",OffshoreWindFarm:"離岸風電場"},colocationSubMenu:"共用空間項目",colocationTutorials:{AgricultureSolarWindColocation:"農業光電風力共用空間"},generativeDesignSubMenu:"生成式設計",generativeDesignTutorials:{MonofacialSolarPanelArrayTiltAngle:"單面光伏板陣列的傾斜角",BifacialSolarPanelArrayTiltAngle:"雙面光伏板陣列的傾斜角",OutputOfSolarPanelArrayInDifferentPlaces:"一個光伏板陣列在不同地區的產出",SimpleSolarFarmParetoFront:"簡單太陽能農場設計的帕累托前沿"},examplesSubMenu:"例子",solarEnergySubMenu:"太陽能",solarEnergyExamples:{SunBeamAndHeliodon:"太陽光束和日影儀",RooftopSolarPanels:"屋頂光伏板",NevadaSolarOneParabolicTroughArray:"內華達州太陽能一號的拋物線槽陣列",TooeleParabolicDishArray:"猶他州圖埃勒的拋物線碟陣列",PS10SolarPowerTower:"西班牙塞維利亞的PS10太陽能發電塔",TucsonLinearFresnelReflectors:"亞利桑那州圖森的直線式菲涅爾反射鏡陣列",SolarCanopyFormFactors:"太陽能天篷外形設計",SolarCanopyOverBleachers:"看台太陽能天篷",SolarCanopyOverGarage:"車庫太陽能天篷",SolarBusStop:"太陽能候車亭",SolarFacadeTesla:"特斯拉光伏牆",BuildingIntegratedPhotovoltaics:"建築整合光伏",Floatovoltaics:"浮動光伏",Agrivoltaics:"農業光伏",VegetativeBuffer:"太陽能農場绿化带",RainbowSwashSolarFarmBostonMA:"馬薩諸塞州波士頓彩虹激流旁邊的光伏板陣列",MickeyMouseSolarFarmOrlandoFL:"佛羅里達州奧蘭多的米老鼠形狀光伏板陣列",SolarPanelsOverCanalBakersfieldCA:"加利福尼亞州貝克斯菲爾德灌溉渠上假想的光伏板陣列",SolarNoiseBarrierLexingtonMA:"馬薩諸塞州列剋星敦高速公路噪音牆上假想的光伏板",HSATSolarTrackersRaleighNC:"北卡羅來納州羅利的一個水平方向單軸旋轉追日光伏板陣列(HSAT)",AADATSolarTrackersLancasterCA:"加利福尼亞州蘭開斯特的一個雙軸旋轉追日光伏板陣列(AADAT)",SolarTrackersInRealWorld:"模擬",SolarUpdraftTowerInCity:"太陽能上升氣流塔在城市中的應用"},builtEnvironmentSubMenu:"建造環境",residentialBuildingsSubMenu:"住宅建築",residentialBuildingExamples:{ColonialHouse:"殖民地風格的住宅",DutchColonialHouse:"荷蘭殖民地風格的住宅",TShapedHouse:"T字型房子",CapeCodHouseWithGarage:"有車庫的科德角風格的住宅",Solarium:"有日光浴室的房子",Church1:"教堂例一",Cathedral1:"主教座堂例一",Cathedral2:"主教座堂例二",Mosque1:"清真寺例一",AdobeTaosHouse:"陶斯土坯房",RanchHouse:"牧場風格的住宅",BonnetHouse:"有帽簷屋頂的住宅",BarnStyleHouse:"穀倉式風格的住宅",ModernHouse:"現代風格的住宅",ButterflyRoofHouse:"蝴蝶型屋頂的住宅"},commercialBuildingsSubMenu:"商用建築",commercialBuildingExamples:{WhiteHouse:"白宫",HaroldWashingtonCollege:"哈羅德華盛頓學院",BilimMersinTurkiye:"土耳其梅爾辛科學教育中心",SpanishStyleHotel:"西班牙風格旅館",ApartmentBuilding:"公寓樓",OfficeBuilding:"寫字樓",Hotel:"旅館"},buildingComplexesSubMenu:"建築群",buildingComplexExamples:{SouthBurlingtonHighSchoolVermont:"佛蒙特州南伯靈頓高中",MescaleroApacheSchoolNewMexico:"新墨西哥州梅斯卡勒羅阿帕奇學校"},urbanPlanningSubMenu:"城市規劃",urbanPlanningExamples:{CityBlockHeatmap:"城市街區熱圖",ChicagoSkyline:"芝加哥天際線"},otherBuildingsSubMenu:"其它建築",otherBuildingExamples:{Greenhouse:"溫室",Pavilion:"公園的亭子",OctagonalPagoda:"八角塔",OceanFront:"海邊",EgyptianPyramids:"埃及金字塔",MayanPyramid:"瑪雅金字塔",SiOSePol:"三十三孔橋",StackedCuboids:"堆砌長方體"},artificialIntelligenceSubMenu:"人工智慧",artificialIntelligenceExamples:{OptimizingTiltAngleOfOneSolarPanelRow:"優化單排光伏板的傾斜角",OptimizingTiltAnglesOfMultipleSolarPanelRows:"優化多排光伏板的傾斜角",SolarFarmGenerativeDesign:"生成式設計太陽能農場",SolarFarmGenerativeDesignWithBlock:"生成式設計太陽能農場:周邊有建築物的情況",FitchburgSolarFarmGenerativeDesign:"生成式設計太陽能農場:真實世界案例"},languageSubMenu:"語言",publicSubMenu:"公共",ModelsGallery:"模型畫廊",ModelsMap:"模型地圖",AboutUs:"關於我們"},avatarMenu:{AccountSettings:"賬號設定",PrivacyStatementTitle:"用戶隱私權保護聲明",PrivacyStatement:"登錄需要採用您的谷歌ID建立或進入您的阿拉丁賬戶。 我們只儲存一個隨機的字符串作為您的ID。 任何關於您的可辨識的個人信息都沒有被收集。 詳情請參考我們的",SignIn:"登錄",SignInAsMe:"實名登錄",SignInAnonymously:"匿名登錄",SignOut:"退出賬號",IfYouAreAStudent:"如果您是一個學生"},skyMenu:{Axes:"顯示坐標軸",Theme:"環境主題",ThemeDefault:"默認",ThemeDesert:"沙漠",ThemeDune:"沙丘",ThemeForest:"森林",ThemeGrassland:"草原",ThemeHill:"丘陵",ThemeLake:"湖泊",ThemeMountain:"山脈",ThemeRural:"田園",SunlightAttenuationCoefficientInAir:"陽光在空氣中傳播的衰減係數",ConvectiveCoefficientOfAir:"空氣對流傳熱係數",HighestTemperatureTimeInMinutes:"最高氣溫時間(分鐘)",SelectSunAnglesToShow:"選擇太陽角度顯示",ShowAzimuthAngle:"顯示方位角",ShowElevationAngle:"顯示高度角",ShowZenithAngle:"顯示天頂角",DirectLightBrightnessAtNoon:"正午直射光照度",AmbientLightBrightnessAtNoon:"正午環境光照度"},groundMenu:{MonthlyIrradianceLoss:"月份輻射度損失比",Vegetation:"植被",LeafOutDay:"樹葉長出的日子",LeafOffDay:"樹葉脫落的日子",Albedo:"反照率",ImageOnGround:"地面顯示圖像",WaterSurface:"水面",RemoveAllUnlockedTrees:"刪除所有非固定的樹木",RemoveAllUnlockedFlowers:"删除所有非固定的花草",RemoveAllUnlockedSolarPanels:"删除所有非固定的光伏板",RemoveAllUnlockedPeople:"删除所有非固定的人物",RemoveAllUnlockedFoundations:"删除所有非固定的地基",RemoveAllUnlockedCuboids:"删除所有非固定的長方體",DoYouReallyWantToRemoveAllPeople:"你確定刪除所有非固定的人物嗎",DoYouReallyWantToRemoveAllTrees:"你確定刪除所有非固定的樹木嗎",DoYouReallyWantToRemoveAllFlowers:"你確定刪除所有非固定的花草嗎",DoYouReallyWantToRemoveAllSolarPanels:"你確定刪除所有非固定的光伏板嗎",DoYouReallyWantToRemoveAllFoundations:"你確定刪除所有非固定的地基嗎",DoYouReallyWantToRemoveAllCuboids:"你確定刪除所有非固定的長方體嗎",LockAllUnlockedElements:"固定所有非固定的部件",UnlockAllLockedElements:"解除所有的固定"},labelSubMenu:{Label:"標籤",LabelText:"標籤的内容",LabelHeight:"標籤的高度",LabelSize:"標籤的大小",LabelFontSize:"字體的大小",LabelColor:"標籤的顏色",KeepShowingLabel:"顯示標籤"},foundationMenu:{RemoveAllUnlockedSolarPanels:"刪除此地基上所有非固定的光伏板",RemoveAllUnlockedParabolicTroughs:"刪除此地基上所有非固定的拋物線槽",RemoveAllUnlockedParabolicDishes:"刪除此地基上所有非固定的拋物線碟",RemoveAllUnlockedFresnelReflectors:"刪除此地基上所有非固定的菲涅耳反射鏡",RemoveAllUnlockedHeliostats:"刪除此地基上所有非固定的定日鏡",RemoveAllUnlockedWindTurbines:"刪除此地基上所有非固定的風力渦輪機",RemoveAllUnlockedSensors:"刪除此地基上所有非固定的傳感器",RemoveAllUnlockedLights:"刪除此地基上所有非固定的電燈",RemoveAllUnlockedWalls:"刪除此地基上所有非固定的牆",RemoveAllUnlockedWindows:"刪除此地基上所有非固定的窗戶",RemoveAllUnlockedDoors:"刪除此地基上所有非固定的門",RemoveAllUnlockedPolygons:"刪除此地基上所有非固定的多邊形",RemoveAllUnlockedHumans:"刪除此地基上所有非固定的人物",RemoveAllUnlockedTrees:"刪除此地基上所有非固定的樹木",RemoveAllUnlockedFlowers:"刪除此地基上所有非固定的花草",Racks:"支架",Texture01:"一號材質",Texture02:"二號材質",Texture03:"三號材質",Texture04:"四號材質",Texture05:"五號材質",Texture06:"六號材質",Texture07:"七號材質",Texture08:"八號材質",Texture09:"九號材質",Texture10:"十號材質",SolarPanels:"光伏板",SolarPanelArray:"光伏板陣列",DoYouReallyWantToRemoveAllSolarPanelsOnFoundation:"你確定刪除此地基上所有非固定的光伏板嗎",ParabolicTroughs:"拋物線槽",DoYouReallyWantToRemoveAllParabolicTroughsOnFoundation:"你確定刪除此地基上所有非固定的拋物線槽嗎",ParabolicDishes:"拋物線碟",DoYouReallyWantToRemoveAllParabolicDishesOnFoundation:"你確定刪除此地基上所有非固定的拋物線碟嗎",FresnelReflectors:"菲涅耳反射鏡",DoYouReallyWantToRemoveAllFresnelReflectorsOnFoundation:"你確定刪除此地基上所有非固定的菲涅耳反射鏡嗎",Heliostats:"定日鏡",DoYouReallyWantToRemoveAllHeliostatsOnFoundation:"你確定刪除此地基上所有非固定的定日鏡嗎",WindTurbines:"風力渦輪機",DoYouReallyWantToRemoveAllWindTurbinesOnFoundation:"你確定刪除此地基上所有非固定的風力渦輪機嗎",Sensors:"傳感器",DoYouReallyWantToRemoveAllSensorsOnFoundation:"你確定刪除此地基上所有非固定的傳感器嗎",Lights:"電燈",DoYouReallyWantToRemoveAllLightsOnFoundation:"你確定刪除此地基上所有非固定的電燈嗎",Walls:"牆",DoYouReallyWantToRemoveAllWallsOnFoundation:"你確定刪除此地基上所有非固定的牆嗎",Windows:"窗戶",DoYouReallyWantToRemoveAllWindowsOnFoundation:"你確定刪除此地基上所有非固定的窗戶嗎",Doors:"門",DoYouReallyWantToRemoveAllDoorsOnFoundation:"你確定刪除此地基上所有非固定的門嗎",Polygons:"多邊形",DoYouReallyWantToRemoveAllPolygonsOnFoundation:"你確定刪除此地基上所有非固定的多邊形嗎",Humans:"人物",DoYouReallyWantToRemoveAllHumansOnFoundation:"你確定刪除此地基上所有非固定的人物嗎",Trees:"樹木",DoYouReallyWantToRemoveAllTreesOnFoundation:"你確定刪除此地基上所有非固定的樹木嗎",Flowers:"花草",DoYouReallyWantToRemoveAllFlowersOnFoundation:"你確定刪除此地基上所有非固定的花草嗎",OnlyThisFoundation:"只這塊地基",AllConnectedFoundations:"所有相連的地基",AllSelectedFoundations:"所有選中的地基",AllFoundations:"所有的地基",AddPolygon:"添加多邊形",SolarStructure:"太陽能構型",GroupMaster:"主地基",LockAllUnlockedElementsOnThisFoundation:"固定此地基上所有非固定的部件",UnlockAllLockedElementsOnThisFoundation:"解除此地基上所有的固定",GroundFloorRValue:"建築物地板的R值",OnlyThisGroundFloor:"只這個建築物的地板",AllGroundFloors:"所有建築物的地板"},solarPowerTowerMenu:{ReceiverTowerForHeliostats:"和定日鏡配套的吸收塔",ReceiverTowerPhysicalProperties:"太陽能吸收塔的物理性質",ReceiverTowerHeight:"太陽能吸收塔的高度",ReceiverTowerRadius:"太陽能吸收塔的半徑",ReceiverAbsorptance:"太陽能吸收器的吸收率",ReceiverOpticalEfficiency:"太陽能吸收器的光效率",ReceiverThermalEfficiency:"太陽能吸收器的熱效率"},solarAbsorberPipeMenu:{AbsorberPipeForFresnelReflectors:"和菲涅爾反射鏡配套的吸收管",AbsorberPipePhysicalProperties:"太陽能吸收管的物理性質",AbsorberHeight:"太陽能吸收管的安装高度",AbsorberApertureWidth:"太陽能吸收管的孔徑",AbsorberPipePoleNumber:"太陽能吸收管的支柱數量",AbsorberAbsorptance:"太陽能吸收管的吸收率",AbsorberOpticalEfficiency:"太陽能吸收管的光效率",AbsorberThermalEfficiency:"太陽能吸收管的熱效率"},solarUpdraftTowerMenu:{SolarUpdraftTower:"太陽能上升氣流塔",SolarUpdraftTowerPhysicalProperties:"太陽能上升氣流塔的物理性質",SolarUpdraftTowerChimneyHeight:"太陽能上升氣流塔煙囪的高度",SolarUpdraftTowerChimneyRadius:"太陽能上升氣流塔煙囪的半徑",SolarUpdraftTowerCollectorHeight:"太陽能上升氣流塔集熱棚的高度",SolarUpdraftTowerCollectorRadius:"太陽能上升氣流塔集熱棚的半徑",SolarUpdraftTowerCollectorTransmissivity:"太陽能上升氣流塔集熱棚的透射率",SolarUpdraftTowerCollectorEmissivity:"太陽能上升氣流塔集熱棚的發射率",SolarUpdraftTowerDischargeCoefficient:"太陽能上升氣流塔的流量係數",SolarUpdraftTowerTurbineEfficiency:"太陽能上升氣流塔的渦輪機效率"},cuboidMenu:{Texture01:"一號材質",Texture02:"二號材質",Texture03:"三號材質",Texture04:"四號材質",Texture05:"五號材質",Texture06:"六號材質",Texture07:"七號材質",Texture08:"八號材質",Texture09:"九號材質",Texture10:"十號材質",RemoveAllUnlockedSolarPanels:"刪除此長方體表面上所有非固定的光伏板",RemoveAllUnlockedSensors:"刪除此長方體表面上所有非固定的傳感器",RemoveAllUnlockedPolygons:"刪除此長方體表面上所有非固定的多邊形",RemoveAllUnlockedHumans:"刪除此長方體表面上所有非固定的人物",RemoveAllUnlockedTrees:"刪除此長方體表面上所有非固定的樹木",RemoveAllUnlockedFlowers:"刪除此長方體表面上所有非固定的花草",RemoveAllUnlockedLights:"刪除此長方體表面上所有非固定的電燈",Racks:"支架",Lights:"電燈",DoYouReallyWantToRemoveAllLightsOnCuboid:"你確定刪除此長方體表面上所有非固定的電燈嗎",SolarPanels:"光伏板",DoYouReallyWantToRemoveAllSolarPanelsOnCuboid:"你確定刪除此長方體表面上所有非固定的光伏板嗎",Sensors:"傳感器",DoYouReallyWantToRemoveAllSensorsOnCuboid:"你確定刪除此長方體表面上所有非固定的傳感器嗎",Polygons:"多邊形",DoYouReallyWantToRemoveAllPolygonsOnCuboid:"你確定刪除此長方體表面上所有非固定的多邊形嗎",Humans:"人物",DoYouReallyWantToRemoveAllHumansOnCuboid:"你確定刪除此長方體表面上所有非固定的人物嗎",Trees:"樹木",DoYouReallyWantToRemoveAllTreesOnCuboid:"你確定刪除此長方體表面上所有非固定的樹木嗎",Flowers:"花草",DoYouReallyWantToRemoveAllFlowersOnCuboid:"你確定刪除此長方體表面上所有非固定的花草嗎",OnlyThisCuboid:"只這個長方體",AllCuboidsOnSameSurface:"同一表面上所有的長方體",AllCuboidsAboveSameBase:"同一地基上所有的長方體",AllSelectedCuboids:"所有選中的長方體",AllCuboids:"所有的長方體",OnlyThisSide:"只這個表面",AllSidesOfThisCuboid:"這個長方體所有的側面",AllSidesOfSelectedCuboids:"所有選中長方體所有的側面",AllSidesOfAllCuboids:"所有的長方體所有的側面",AddPolygon:"添加多邊形",Stackable:"可堆砌",GroupMaster:"主長方體"},polygonMenu:{Texture01:"一號材質",Texture02:"二號材質",Texture03:"三號材質",Texture04:"四號材質",Texture05:"五號材質",Texture06:"六號材質",Texture07:"七號材質",Texture08:"八號材質",Texture09:"九號材質",Texture10:"十號材質",TextBox:"文字框",FontOutlineColor:"字體輪廓顏色",FontOutlineWidth:"字體輪廓線寬",FontStrokeColor:"字體描邊顏色",FontStrokeWidth:"字體描邊線寬",NoOutline:"無輪廓線",Shiny:"光澤",Filled:"填充",FillTexture:"填充材質",FillColor:"填充顏色",Opacity:"遮光度",LineColor:"線條顏色",LineWidth:"線條寬度",LineStyle:"線條樣式",SolidLine:"實線",DashedLine:"虛線",DottedLine:"點線",InsertVertexBeforeIndex:"前面插入頂點",InsertVertexAfterIndex:"後面插入頂點",DeleteVertex:"移除頂點",OnlyThisPolygon:"只這個多邊形",AllPolygonsOnSurface:"同一表面上所有的多邊形",AllPolygonsAboveFoundation:"同一地基上所有的多邊形",AllSelectedPolygons:"所有選中的多邊形",AllPolygons:"所有的多邊形",Layout:"佈局",SolarPanelArrayLayout:"光伏板陣列佈局",SolarPanelArrayLayoutParametricDesign:"光伏板陣列佈局參數化設計",SolarPanelArrayLayoutGenerativeDesign:"光伏板陣列佈局生成式設計",SolarPanelArrayModel:"光伏板型號",SolarPanelArrayOrientation:"排列方向",SolarPanelArrayTiltAngle:"傾斜角度",SolarPanelArrayRowWidth:"行寬度",SolarPanelArrayInterRowSpacing:"行間距",SolarPanelArrayRowSpacing:"行間距",SolarPanelArrayRowAxis:"行軸方向",SolarPanelArrayLeftRightRowAxis:"左右方向(相對)",SolarPanelArrayUpDownRowAxis:"上下方向(相對)",SolarPanelArrayEastWestRowAxis:"東西方向(絕對)",SolarPanelArrayNorthSouthRowAxis:"南北方向(絕對)",SolarPanelArrayMargin:"邊緣餘地",SolarPanelArrayPoleHeight:"支架高度",SolarPanelArrayPoleSpacing:"支柱間隔",SolarPanelArrayTotalYearlyCost:"全年總成本",SolarPanelArrayTotalYearlyRevenue:"全年總收入",SolarPanelArrayTotalYearlyYield:"全年總發電量",SolarPanelArrayMeanYearlyYield:"平均年發電量",SolarPanelArrayYearlyProfit:"全年利潤",LayoutNotAcceptedCheckYourParameters:"恕不能採用此佈局。請檢查您的參數設置。"},optimizationMenu:{Optimization:"優化",Parameters:"參數",Variables:"變量",Constants:"常量",GeneticAlgorithm:"遺傳算法",GeneticAlgorithmSettings:"遺傳算法設定",ParticleSwarmOptimization:"粒子群優化",ParticleSwarmOptimizationSettings:"粒子群優化設定",SolarPanelTiltAngleOptimization:"光伏板傾斜角度優化",SolarPanelArrayLayout:"光伏板陣列佈局",Generation:"世代",Gene:"基因",NormalizedVariables:"標準化變量",Objective:"目標函數",ObjectiveFunctionDailyTotalYield:"當日總產出",ObjectiveFunctionYearlyTotalYield:"全年總產出",ObjectiveFunctionDailyMeanYield:"當日平均產出",ObjectiveFunctionYearlyMeanYield:"全年平均產出",ObjectiveFunctionDailyProfit:"當日利潤",ObjectiveFunctionYearlyProfit:"全年利潤",GeneticAlgorithmSelectionMethod:"遺傳算法選擇方法",RouletteWheel:"輪盤制",Tournament:"淘汰制",SearchMethod:"搜索方法",GlobalSearchUniformSelection:"全局搜索均勻取樣",LocalSearchRandomOptimization:"局部搜索隨機優化",PopulationSize:"種群個體數目",MaximumGenerations:"最大世代數目",SelectionRate:"選擇概率",CrossoverRate:"交配概率",MutationRate:"突變概率",Step:"步數",SwarmSize:"粒子數目",MaximumSteps:"最大步數",MaximumVelocity:"最大速度",InertiaWeight:"慣性權重",CognitiveCoefficient:"認知係數",SocialCoefficient:"社會係數",ConvergenceThreshold:"終止條件的收斂閾值",LocalSearchRadius:"局部搜索的半徑",RowsPerRackRange:"單個支架上光伏板行數的變化範圍",TiltAngleRange:"光伏板傾斜角度的變化範圍",InterRowSpacingRange:"光伏板陣列行間距的變化範圍",ClickTargetPolygonToActivate:"點擊目標多邊形激活",ClickTargetFoundationToActivate:"點擊目標地基激活"},treeMenu:{ShowModel:"顯示近似模型",Flip:"翻轉",Type:"樹種",Spread:"樹冠直徑"},flowerMenu:{Flip:"翻轉",Type:"品種",Spread:"直徑"},peopleMenu:{ChangePerson:"改變人物",Flip:"轉身",Observer:"觀察者",ViewFromThisPerson:"視角移到此人位置"},lightMenu:{Color:"顏色",Intensity:"亮度",Decay:"衰减",MaximumDistance:"最大距離",Inside:"内部"},solarCollectorMenu:{Coordinates:"座標",RelativeXCoordinateOfCenter:"中心的相對X座標",RelativeYCoordinateOfCenter:"中心的相對Y座標",RelativeAzimuth:"相對方位角",Pole:"支柱",PoleHeight:"支柱高度",PoleRadius:"支柱半徑",ExtraPoleHeight:"額外的支柱高度",ExtraPoleHeightInAdditionToHalfWidth:"寬度一半額外的支柱高度",DrawSunBeam:"顯示光束"},concentratedSolarPowerCollectorMenu:{ReflectorReflectance:"反射器鏡面反射率",ReceiverAbsorptance:"接收器吸收率",ReflectorOpticalEfficiency:"反射器光效率",ReceiverThermalEfficiency:"接收器熱效率"},solarWaterHeaterMenu:{OnlyThisSolarWaterHeater:"只這個太陽能熱水器",AllSolarWaterHeatersOnSurface:"同一表面上所有的太陽能熱水器",AllSolarWaterHeatersAboveFoundation:"同一地基上所有的太陽能熱水器",AllSelectedSolarWaterHeaters:"所有選中的太陽能熱水器",AllSolarWaterHeaters:"所有的太陽能熱水器"},solarPanelMenu:{ElectricalProperties:"電氣特性",InverterEfficiency:"逆變器效率",InverterEfficiencyExplained:"直流電轉換為交流電的效率。",DcToAcSizeRatio:"直流-交流容量比例",DcToAcSizeRatioExplained:"直流電容量和交流電容量的比例。",ChangePvModel:"改變光伏板型號",Orientation:"排列方向",Portrait:"縱向",Landscape:"橫向",FrameColor:"框架顏色",Panels:"塊",PanelsWide:"塊光伏板寬",PanelsLong:"塊光伏板長",TiltAngle:"傾斜角度",SouthFacingIsPositive:"朝南為正",Tracker:"追日系統",SolarTrackerFollowsSun:"追日系統提高光伏板產出。",PoleSpacing:"支柱間隔",NoTracker:"無追日系統",HorizontalSingleAxisTracker:"水平單軸追日系統",VerticalSingleAxisTracker:"豎直單軸追日系統",AltazimuthDualAxisTracker:"地平雙軸追日系統",OnlyThisSolarPanel:"只這個光伏板",AllSolarPanelsOnSurface:"同一表面上所有的光伏板",AllSolarPanelsAboveFoundation:"同一地基上所有的光伏板",AllSelectedSolarPanels:"所有選中的光伏板",AllSolarPanels:"所有的光伏板"},pvModelPanel:{SolarPanelSpecs:"光伏板型號性能",General:"概況",Electrical:"電力",CellCountInXDirection:"X方向電池數目",CellCountInYDirection:"Y方向電池數目",Weight:"重量",Kilogram:"公斤",RatedVoltage:"額定電壓",RatedCurrent:"額定電流",OpenCircuitVoltage:"開路電壓",ShortCircuitCurrent:"短路電流",MaximumRatedPower:"最大額定功率",Model:"型號",PanelSize:"尺寸",Cells:"電池組",CellType:"光伏電池類型",Monocrystalline:"單晶矽",Polycrystalline:"多晶矽",ThinFilm:"薄膜",Bifacial:"雙面",BifacialityFactor:"雙面性因子",Black:"黑色",Blue:"藍色",ShadeTolerance:"陰影耐受度",SolarCellEfficiency:"光伏電池效率",NominalOperatingCellTemperature:"名義電池運行溫度",TemperatureCoefficientOfPmax:"Pmax溫度係數",AddedCustomSolarPanels:"已有",DisplayThisCustomSolarPanel:"展示這個客製化光伏板",ExportThisCustomSolarPanel:"輸出此客製化光伏板",ImportCustomSolarPanelFromClipboard:"從系統剪切板輸入客製化光伏板數據",CustomSolarPanelExportedToClipboard:"客製化光伏板拷貝到剪貼板",DoYouReallyWantToRemoveThisCustomSolarPanel:"你確定刪除此客製化光伏板",MakeSureThisCustomSolarPanelIsNotUsed:"刪除之前請確認此客製化光伏板沒有被當前模型採用",ThisCustomSolarPanelIsUsed:"此客製化光伏板被當前模型採用",DoYouReallyWantToImportCustomSolarPanel:"你確定輸入客製化光伏板",ExistingSettingsWillBeOverwritten:"現有的設定將被取代",CannotAddCustomSolarPanel:"無法添加此客製化光伏板",CustomSolarPanelMustHaveModelName:"客製化光伏板必須要有型號",CustomSolarPanelExists:"目前文件已經定義了此名字的客製化光伏板",FailInImportingDataFromClipboard:"從系統剪切板輸入資料失敗"},parabolicTroughMenu:{ModuleLength:"模塊長度",Modules:"模塊",ModulesLong:"模塊長",LatusRectum:"通徑",OnlyThisParabolicTrough:"只這個拋物線槽",AllParabolicTroughsAboveFoundation:"同一地基上所有的拋物線槽",AllSelectedParabolicTroughs:"所有選中的抛物线槽",AllParabolicTroughs:"所有的拋物線槽"},fresnelReflectorMenu:{AbsorberPipe:"吸收管",SelectAbsorberToReflectSunlightTo:"選擇陽光反射到的吸收管",ModuleLength:"模塊長度",Modules:"模塊",ModulesLong:"模塊長",OnlyThisFresnelReflector:"只這個菲涅耳反射鏡",AllFresnelReflectorsAboveFoundation:"同一地基上所有的菲涅耳反射鏡",AllSelectedFresnelReflectors:"所有選中的菲涅耳反射镜",AllFresnelReflectors:"所有的菲涅耳反射鏡"},heliostatMenu:{Tower:"吸收塔",SelectTowerToReflectSunlightTo:"選擇陽光反射到的吸收塔",OnlyThisHeliostat:"只這個定日鏡",AllHeliostatsAboveFoundation:"同一地基上所有的定日鏡",AllSelectedHeliostats:"所有選中的定日镜",AllHeliostats:"所有的定日鏡"},parabolicDishMenu:{ReceiverStructure:"接收器結構",CentralPole:"中心直柱",CentralPoleWithTripod:"三腳架和中心直柱",Quadrupod:"四脚架",RimDiameter:"外圈直徑",LatusRectum:"通徑",ExtraPoleHeightInAdditionToRadius:"半徑之外額外的支架高度",OnlyThisParabolicDish:"只這個拋物線碟",AllParabolicDishesAboveFoundation:"同一地基上所有的拋物線碟",AllSelectedParabolicDishes:"所有選中的抛物线碟",AllParabolicDishes:"所有的拋物線碟"},windTurbineMenu:{BirdSafeDesign:"鳥類安全設計",BirdSafeNone:"無",BirdSafeBicolor:"雙色",BirdSafeStriped:"條紋",Rotor:"轉子",BladeNumber:"葉片數目",RotorInitialAngle:"轉子初始角度",RotorBladeDesign:"轉子葉片設計",RotorBladeRadius:"轉子葉片半徑",RotorBladePitchAngle:"轉子葉片俯仰角",RelativeYawAngle:"相對偏流角",MaximumChordLength:"最大弦長度",Tower:"塔架",TowerHeight:"塔架高度",TowerRadius:"塔架半徑",HubDesign:"轉子輪轂設計",HubRadius:"輪轂半徑",HubLength:"輪轂長度",OnlyThisWindTurbine:"只這個風力渦輪機",AllWindTurbinesAboveFoundation:"同一地基上所有的風力渦輪機",AllSelectedWindTurbines:"所有選中的風力渦輪機",AllWindTurbines:"所有的風力渦輪機"},wallMenu:{TextureDefault:"默認材質",Texture01:"一號材質",Texture02:"二號材質",Texture03:"三號材質",Texture04:"四號材質",Texture05:"五號材質",Texture06:"六號材質",Texture07:"七號材質",Texture08:"八號材質",Texture09:"九號材質",Texture10:"十號材質",SizeOfWall:"牆的尺寸",OnlyThisWall:"只這堵牆",AllConnectedWalls:"所有連接的牆",AllWallsAboveFoundation:"同一地基上所有的牆",AllSelectedWalls:"所有選中的墙",AllWalls:"所有的牆",Windows:"窗戶",LockAllUnlockedWindows:"固定所有非固定的窗戶",UnlockAllLockedWindows:"解除所有的窗戶固定",RemoveAllUnlockedWindows:"刪除這堵牆上所有非固定的窗戶",DoYouReallyWantToRemoveAllWindowsOnThisWall:"你確定刪除這堵牆上所有非固定的窗戶嗎",Doors:"門",LockAllUnlockedDoors:"固定所有非固定的門",UnlockAllLockedDoors:"解除所有的門固定",RemoveAllUnlockedDoors:"刪除這堵牆上所有非固定的門",DoYouReallyWantToRemoveAllDoorsOnThisWall:"你確定刪除這堵牆上所有非固定的門嗎",SolarPanels:"光伏板",LockAllUnlockedSolarPanels:"固定所有非固定的光伏板",UnlockAllLockedSolarPanels:"解除所有的光伏板固定",RemoveAllUnlockedSolarPanels:"刪除這堵牆上所有非固定的光伏板",DoYouReallyWantToRemoveAllSolarPanelsOnThisWall:"你確定刪除這堵牆上所有非固定的光伏板嗎",Sensors:"傳感器",LockAllUnlockedSensors:"固定所有非固定的傳感器",UnlockAllLockedSensors:"解除所有的傳感器固定",RemoveAllUnlockedSensors:"刪除這堵牆上所有非固定的傳感器",DoYouReallyWantToRemoveAllSensorsOnThisWall:"你確定刪除這堵牆上所有非固定的傳感器嗎",Lights:"電燈",LockAllUnlockedLights:"固定這堵牆上所有非固定的電燈",UnlockAllLockedLights:"解除這堵牆上所有的電燈固定",RemoveAllUnlockedLights:"刪除這堵牆上所有非固定的電燈",DoYouReallyWantToRemoveAllLightsOnThisWall:"你確定刪除這堵牆上所有非固定的電燈嗎",Polygons:"多邊形",LockAllUnlockedPolygons:"固定這堵牆上所有非固定的多邊形",UnlockAllLockedPolygons:"解除這堵牆上所有的多邊形固定",RemoveAllUnlockedPolygons:"刪除這堵牆上所有非固定的多邊形",DoYouReallyWantToRemoveAllPolygonsOnThisWall:"你確定刪除這堵牆上所有非固定的多邊形嗎",WallStructure:"牆結構",DefaultStructure:"默認",StudStructure:"牆柱",PillarStructure:"圓柱",Opacity:"遮光度",StructureSpacing:"結構間距",StructureWidth:"結構寬度",StructureThickness:"結構厚度",StructureColor:"結構颜色",Color:"牆体颜色",Height:"高度",Thickness:"厚度",Texture:"材質",AllLightsOnWallInside:"所有電燈在牆內",AllLightsOnWallOutside:"所有電燈在牆外",Fill:"填充",Full:"全部",Partial:"部分",Empty:"空白",OpenToOutside:"對外面開放",EavesLength:"屋簷延伸長度",Parapet:"女牆",ParapetColor:"女牆颜色",ParapetTexture:"女牆材質",ParapetHeight:"女牆高度",CopingsHeight:"頂蓋高度",CopingsWidth:"頂蓋寬度"},windowMenu:{OnlyThisWindow:"只這個窗戶",AllWindowsOnSurface:"同一表面上所有的窗戶",AllWindowsAboveFoundation:"同一地基上所有的窗戶",AllSelectedWindows:"所有選中的窗户",AllWindows:"所有的窗戶",Width:"寬度",Height:"高度",Setback:"離牆體外表面的距離",RelativeToWallThickness:"相對於牆的厚度",Mullion:"直櫺",HorizontalMullion:"水平的直櫺",VerticalMullion:"豎直的直櫺",MullionWidth:"直櫺寬度",HorizontalMullionSpacing:"水平直櫺的間距",VerticalMullionSpacing:"豎直直櫺的間距",MullionColor:"直櫺颜色",Tint:"著色",Opacity:"不透明度",SolarHeatGainCoefficient:"太陽輻射熱獲取係數(SHGC) = 1 - 不透明度",Shutter:"百葉窗",LeftShutter:"左側百葉窗",RightShutter:"右側百葉窗",BothShutters:"兩側百葉窗",ShutterWidth:"相對寬度",ShutterColor:"百葉窗顏色",Frame:"邊框",FrameWidth:"邊框寬度",SillWidth:"窗台寬度",Color:"邊框顔色",WindowType:"窗戶種類",Default:"默認",Arched:"拱形",Polygonal:"多邊形",Interior:"内窗",Empty:"空白"},roofMenu:{TextureDefault:"默認材質",Texture01:"一號材質",Texture02:"二號材質",Texture03:"三號材質",Texture04:"四號材質",Texture05:"五號材質",Texture06:"六號材質",Texture07:"七號材質",OnlyThisRoof:"只這個屋顶",AllRoofsAboveFoundation:"同一地基上所有的屋顶",AllSelectedRoofs:"所有選中的屋顶",AllRoofs:"所有的屋顶",OnlyThisCeiling:"只這個天花板",AllCeilingsAboveFoundation:"同一地基上所有的天花板",AllCeilings:"所有的天花板",EavesOverhangLength:"屋簷延伸長度",RafterSpacing:"屋椽間距",RafterWidth:"屋椽寬度",RafterThickness:"屋椽厚度",RafterColor:"屋椽颜色",RoofColor:"屋顶颜色",RoofSideColor:"屋顶側面颜色",GlassTint:"玻璃顏色",Opacity:"遮光度",RoofStructure:"屋頂結構",DefaultStructure:"默認",RafterStructure:"屋椽",GlassStructure:"玻璃",SolarPanels:"光伏板",LockAllUnlockedSolarPanels:"固定所有非固定的光伏板",UnlockAllLockedSolarPanels:"解除所有的光伏板固定",RemoveAllUnlockedSolarPanels:"刪除這個屋顶上所有非固定的光伏板",DoYouReallyWantToRemoveAllSolarPanelsOnThisRoof:"你確定刪除這個屋顶上所有非固定的光伏板嗎",Windows:"天窗",LockAllUnlockedWindows:"固定所有非固定的天窗",UnlockAllLockedWindows:"解除所有的天窗固定",RemoveAllUnlockedWindows:"刪除這個屋顶上所有非固定的天窗",DoYouReallyWantToRemoveAllWindowsOnThisRoof:"你確定刪除這個屋顶上所有非固定的天窗嗎",Sensors:"傳感器",LockAllUnlockedSensors:"固定所有非固定的傳感器",UnlockAllLockedSensors:"解除所有的傳感器固定",RemoveAllUnlockedSensors:"刪除這個屋顶上所有非固定的傳感器",DoYouReallyWantToRemoveAllSensorsOnThisRoof:"你確定刪除這個屋顶上所有非固定的傳感器嗎",Lights:"電燈",RemoveAllUnlockedLights:"刪除這個屋顶上所有非固定的電燈",DoYouReallyWantToRemoveAllLightsOnThisRoof:"你確定刪除這個屋顶上所有非固定的電燈嗎",AllLightsOnRoofInside:"所有電燈在屋頂內",AllLightsOnRoofOutside:"所有電燈在屋頂外",Rise:"相對高度",Ceiling:"天花板",RoofRValue:"屋顶R值",CeilingRValue:"天花板R值"},doorMenu:{TextureDefault:"默認材質",Texture01:"一號材質",Texture02:"二號材質",Texture03:"三號材質",Texture04:"四號材質",Texture05:"五號材質",Texture06:"六號材質",Texture07:"七號材質",Texture08:"八號材質",Texture09:"九號材質",Texture10:"十號材質",Texture11:"十一號材質",Texture12:"十二號材質",Texture13:"十三號材質",Texture14:"十四號材質",Texture15:"十五號材質",Texture16:"十六號材質",Texture17:"十七號材質",OnlyThisDoor:"只這個門",AllDoorsOnWall:"同一面牆上所有的門",AllDoorsAboveFoundation:"同一地基上所有的門",AllSelectedDoors:"所有選中的门",AllDoors:"所有的門",DoorType:"門種類",Default:"默認",Arched:"拱形",Filled:"填充",FrameColor:"門框顏色",Interior:"內門"},siteInfoPanel:{High:"最高溫度",Low:"最低温度"},designInfoPanel:{NumberOfSelectedHeliostats:"選中的定日鏡總數",NumberOfSelectedSolarPanels:"選中的光伏板總數",ElectricityGeneratedDailyBySolarPanels:"這些光伏板的日發電量",SceneDiameter:"場景直徑",BuildingArea:"建築面積"},visualizationControlPanel:{ColorContrast:"熱圖顏色對比度",FluxScale:"熱通量長度",ClickUpOrDownArrowButtonsToChange:"點擊上下箭頭改變參數"},instructionPanel:{Rotate:"旋轉",DragMouse:"拖動滑鼠",Zoom:"缩放",MouseWheelOrKeys:"滑鼠滾輪或者Ctrl+[和Ctrl+]",MouseWheelOrKeysMac:"滑鼠滾輪或者⌘+[和⌘+]",Pan:"平移",HoldCtrlDragMouse:"按下Ctrl鍵並拖動滑鼠",HoldMetaDragMouse:"按下⌘鍵並拖動滑鼠",Enter2DMode:"進入二維模式",Exit2DMode:"退出二維模式",NavigationMode:"導航模式",EnableNavigation:"進入導航模式",DisableNavigation:"退出導航模式",MoveForwardBack:"前後移動",MoveForwardBackInstruction:"按W/S鍵",MoveLeftRight:"左右移動",MoveLeftRightInstruction:"按A/D鍵",MoveUpDown:"上下移動",MoveUpDownInstruction:"按Z/X鍵",Turn:"拐彎",TurnInstruction:"按方向鍵",ResetView:"重置視角",AutoRotate:"自動旋轉",StartOrStop:"按F4鍵啟動或停止"},mapPanel:{ImageOnGround:"地面顯示圖像",HideAddress:"隱藏地址",WeatherStations:"氣象站",WeatherStationsNote:"關閉此選項以提高地圖速度",Coordinates:"經緯度坐標",Zoom:"放大程度"},visibilityPanel:{SolarPanelVisibility:"光伏板對觀察者的可見度",Observer:"觀察者",VantagePoint:"觀察位置",ItemizedVisibilityByFields:"每個場的可見度",TotalVisibility:"總可見度"},sensorPanel:{LightSensor:"光傳感器",WeatherDataFrom:"氣象數據來自"},buildingEnergyPanel:{DailyBuildingEnergy:"建築物日能耗",YearlyBuildingEnergy:"建築物年能耗",Heater:"暖氣",AC:"空調",SolarPanel:"光伏",Net:"淨能耗"},solarPanelYieldPanel:{SolarPanelDailyYield:"光伏日發電量",SolarPanelYearlyYield:"光伏年發電量",Yield:"發電量",YieldPerHour:"每小時發電量",DailyTotal:"日發電總量",YearlyTotal:"年發電總量",ShowOutputsOfIndividualSolarPanels:"顯示每行光伏板單獨發電量",Profit:"利潤",TotalCost:"總成本",TotalRevenue:"總收入",TotalYield:"總發電量",MeanYield:"平均發電量",ModuleCount:"光伏板總數"},parabolicTroughYieldPanel:{ParabolicTroughDailyYield:"拋物線槽日發電量",ParabolicTroughYearlyYield:"拋物線槽年發電量",Yield:"發電量",YieldPerHour:"每小時發電量",DailyTotal:"日發電總量",YearlyTotal:"年發電總量",ShowOutputsOfIndividualParabolicTroughs:"顯示每行拋物線槽單獨發電量"},parabolicDishYieldPanel:{ParabolicDishDailyYield:"拋物線碟日發電量",ParabolicDishYearlyYield:"拋物線碟年發電量",Yield:"發電量",YieldPerHour:"每小時發電量",DailyTotal:"日發電總量",YearlyTotal:"年發電總量",ShowOutputsOfIndividualParabolicDishes:"顯示每個拋物線碟單獨發電量"},fresnelReflectorYieldPanel:{FresnelReflectorDailyYield:"菲涅耳反射鏡日發電量",FresnelReflectorYearlyYield:"菲涅耳反射鏡年發電量",Yield:"發電量",YieldPerHour:"每小時發電量",DailyTotal:"日發電總量",YearlyTotal:"年發電總量",ShowOutputsOfIndividualFresnelReflectors:"顯示每個菲涅耳反射鏡單獨發電量"},heliostatYieldPanel:{HeliostatDailyYield:"定日鏡日發電量",HeliostatYearlyYield:"定日鏡年發電量",Yield:"發電量",YieldPerHour:"每小時發電量",DailyTotal:"日發電總量",YearlyTotal:"年發電總量",ShowOutputsOfIndividualHeliostats:"顯示每個定日鏡單獨發電量"},updraftTowerYieldPanel:{UpdraftTowerDailyYield:"太陽能上升氣流塔日發電量",UpdraftTowerYearlyYield:"太陽能上升氣流塔年發電量",ChimneyAirTemperature:"煙囪空氣溫度",ChimneyWindSpeed:"煙囪風速",Yield:"發電量",YieldPerHour:"每小時發電量",DailyTotal:"日發電總量",YearlyTotal:"年發電總量",ShowOutputsOfIndividualUpdraftTowers:"顯示每個太陽能上升氣流塔單獨發電量"},heliodonPanel:{SunAndTimeSettings:"太陽和時間設置",SunAngles:"角度",TwentyFourHours:"24小時"},cloudFilePanel:{CopyTitle:"拷貝標題",TitleCopiedToClipBoard:"標題拷貝到剪貼板",SearchByTitle:"按標題搜索",MyLikes:"我喜歡的模型",MyCloudFiles:"我的雲文件",GenerateLink:"生成鏈接",LinkGeneratedInClipBoard:"鏈接生成到剪貼板",DoYouReallyWantToDelete:"您確定刪除此文檔",IfSharedOrPublishedRenamingFileBreaksExistingLinks:"如果此文檔已被分享或發布, 改名會使已有鏈接失效"},projectListPanel:{CopyTitle:"拷貝標題",TitleCopiedToClipBoard:"標題拷貝到剪貼板",SearchByTitle:"按標題搜索",MyProjects:"我的專案",GenerateProjectLink:"生成專案鏈接",ProjectLinkGeneratedInClipBoard:"專案鏈接生成到剪貼板",DoYouReallyWantToDeleteProject:"您確定刪除專案",IfSharedOrPublishedRenamingProjectBreaksExistingLinks:"如果此專案已被分享或發布, 改名會使已有鏈接失效"},projectPanel:{ProjectSettings:"專案設定",ThumbnailImageSize:"縮略圖大小",ProjectByOtherPeople:"別人的專案",Project:"專案",ProjectType:"類别",ProjectDescription:"描述",MakeDescriptionEditable:"編輯描述",MakeDescriptionNonEditable:"不編輯描述",DoubleClickToMakeDescriptionEditable:"雙擊此描述激活編輯功能",SolarPanelArray:"光伏板陣列設計",CurateCurrentDesign:"收藏當前設計",UpdateSelectedDesign:"更新選中設計",RemoveSelectedDesign:"刪除選中設計",ClickToFlipSortingOrder:"點擊逆轉排序方向",DesignNotShownInSolutionSpaceClickToShow:"此設計目前不顯示在設計空間內,點擊顯示",DesignShownInSolutionSpaceClickToHide:"此設計目前顯示在設計空間內,點擊隱藏",SolutionSpace:"設計空間",ChooseSolutionSpace:"選擇設計空間",ChooseDataColoring:"選擇數據著色",SameColorForAllDesigns:"所有設計一個顏色",OneColorForEachDesign:"每個設計一個顏色",SolutionSpaceScreenshot:"設計空間截屏",ScatterPlotScreenshot:"散點圖截屏",SingleClickToSelectDoubleClickToOpen:"單擊選擇,雙擊打開。",SingleClickToDeselectDoubleClickToOpen:"單擊取消選擇,雙擊打開。",GenerateScatterPlot:"生成散點圖",SelectXAxis:"選擇X軸",SelectYAxis:"選擇Y軸"},accountSettingsPanel:{MyAccountSettings:"我的賬戶設定",MyID:"我的🆔",ClickToCopyMyID:"點擊此處拷貝我的ID",IDInClipBoard:"您現在可以粘貼ID了。",StoreMyNameInMyFilesWhenSaving:"保存文檔時籤上我的大名",DoYouReallyWantToShowYourNameInYourFiles:"您確定在您的文檔裡保存您的大名嗎?",SignFileDisclaimer:"如果您選擇保存,您的大名可能被所有打開您的文檔的人看到。",Likes:"點贊總數",AllPublished:"發佈總數",PublishedUnderAliases:"别名發佈",UserCount:"用戶總數",SchoolID:"學校編號",ClassID:"班級編號"},weatherPanel:{SunshineHours:"日照時間"},diurnalTemperaturePanel:{SelectAirTemperatureModel:"選擇氣溫模型",Sinusoidal:"正弦函數"},economicsPanel:{EconomicsParameters:"經濟學參數",ElectricitySellingPrice:"銷售電價",OperationalCostPerUnit:"單位運行成本",SellingPrice:"銷售電價",UnitCost:"單位成本"},navigationPanel:{NavigationParameters:"導航模式參數",MinimumMoveSpeed:"最小移動速度",MinimumTurnSpeed:"最小拐彎速度"},shadowSettingsPanel:{ShadowSettings:"陰影設定",ShadowCameraFarDistance:"最遠距離",ShadowMapSize:"映射圖長寬",Notes:"注意事項",RefreshPageNote:"改變設定後須刷新頁面。",MapSizeWarning:"大的映射圖長寬可能導致阿拉丁無法在某些電腦上運作。"},yearlyLightSensorPanel:{SkyClearness:"天空清晰度",ShowDaylightResults:"顯示日照時間結果",ShowSkyClearnessResults:"顯示天空清晰度結果",ShowAverageDailySolarRadiation:"顯示日平均輻射結果"},analysisManager:{NoSensorForCollectingData:"沒有傳感器收集數據。",NoSolarPanelForAnalysis:"沒有光伏板可以分析。",NoObserverForVisibilityAnalysis:"沒有找到可見度分析的觀察者。",NoSolarWaterHeaterForAnalysis:"沒有太陽能熱水器可以分析。",NoParabolicDishForAnalysis:"沒有拋物線碟可以分析。",NoParabolicTroughForAnalysis:"沒有拋物線槽可以分析。",NoFresnelReflectorForAnalysis:"沒有菲涅耳反射鏡可以分析。",NoHeliostatForAnalysis:"沒有定日鏡可以分析。",NoSolarUpdraftTowerForAnalysis:"沒有太陽能上升氣流塔可以分析。",NoBuildingForAnalysis:"沒有建築物可以分析。"},toolbar:{CloudFile:"雲文檔",Select:"選擇",AddFoundation:"添加地基",AddWall:"添加牆體",AddWindow:"添加窗戶",AddDoor:"添加門",AddPyramidRoof:"添加金字塔屋頂",AddGableRoof:"添加雙坡屋頂",AddHipRoof:"添加四坡屋顶",AddGambrelRoof:"添加复斜屋顶",AddMansardRoof:"添加折線屋顶",AddCuboid:"添加長方體",AddSensor:"添加傳感器",AddSolarPanel:"添加光伏板",AddSolarWaterHeater:"添加太陽能熱水器",AddBatteryStorage:"添加儲蓄電池",AddParabolicDish:"添加拋物線碟",AddParabolicTrough:"添加拋物線槽",AddFresnelReflector:"添加菲涅耳反射鏡",AddHeliostat:"添加定日鏡",AddWindTurbine:"添加水平轴風力渦輪機",AddVerticalAxisWindTurbine:"添加垂直軸風力渦輪機",AddLight:"添加電燈",AddTree:"添加樹木",AddFlower:"添加花草",AddPeople:"添加人物",DoubleClickToLockThisModeForNextAction:"雙擊按鈕給下個動作鎖定此模式",ClickToUnlockThisModeForNextAction:"點擊按鈕讓動作完成即離開此模式",ManipulateGroup:"整體操作一個組",ClearScene:"清空場景",ShowSunAndTimeSettings:"顯示太陽和時間設置",SpatialAnalysisOfEnergy:"能量的空間分析",DoYouReallyWantToClearContent:"您確定清空場景嗎",ClickForMoreButtons:"點擊此處切換到更多的按鈕模式"},tooltip:{gotoIFI:"訪問未來智能研究所",visitAladdinHomePage:"訪問阿拉丁主頁",clickToOpenMenu:"點擊打開主菜單",clickToAccessAccountSettings:"點擊打開賬號設定"},tree:{Apple:"蘋果樹",Birch:"白樺",Coconut:"椰子樹",Dogwood:"茱萸",Elm:"榆樹",FanPalm:"扇葉棕櫚",Linden:"菩提",Magnolia:"玉蘭",Maple:"楓樹",Oak:"橡樹",Pine:"松樹",Spruce:"雲杉"},flower:{Bellflower:"鈴蘭",Boxwood:"黃楊",CactusCombo1:"仙人掌組合一",CactusCombo2:"仙人掌組合二",CactusCombo3:"仙人掌組合三",CactusCombo4:"仙人掌組合四",Hibiscus:"木槿",Hosta:"玉簪",Hydrangea:"繡球花",Peony:"牡丹",RedRose:"紅玫瑰",Spirea:"繡線菊",Sunflower:"向日葵",TallBush:"高灌木",Tulip:"鬱金香",WhiteFlower:"白花",YellowFlower:"黄花"},people:{Jaah:"賈阿",Jack:"傑克",Jacob:"雅各布",Jacqueline:"杰奎琳",Jade:"美玉",Jamelia:"潔米莉雅",James:"詹姆斯",Jane:"簡",Jaya:"佳婭",Jaye:"傑伊",Jeanette:"珍妮特",Jedi:"傑迪",Jeff:"傑夫",Jena:"珍娜",Jennifer:"珍尼弗",Jess:"傑西",Jett:"傑特",Jill:"吉爾",Jiya:"吉娅",Joan:"瓊",Jocelyn:"喬斯林",Joel:"喬爾",Joey:"喬伊",John:"約翰",Jonathon:"喬納森",Jose:"何塞",Joseph:"約瑟夫",Joshua:"約書亞",Judd:"賈德",Judy:"朱蒂",Julia:"朱莉婭",Julio:"胡里奥",Jumapili:"祖瑪匹莉",June:"準衛",Juro:"朱諾",Justin:"賈斯汀"},compass:{N:"北",S:"南",W:"西",E:"東"},month:{January:"一月",February:"二月",March:"三月",April:"四月",May:"五月",June:"六月",July:"七月",August:"八月",September:"九月",October:"十月",November:"十一月",December:"十二月"},modelsMap:{AllTime:"全部時間",SearchByPublisher:"按發布者搜索",SearchByLabel:"按標籤搜索",MyPublishedModels:"我發布的模型",TotalNumberOfUserPublishedModelsInSelectedPeriod:"選定時間段用戶發布的模型總數",AllTimeTotal:"全部時間用戶發布的模型總數",SortFromOldestToNewest:"從早到晚排序",SortFromNewestToOldest:"從晚到早排序",SitesFound:"個位置",ModelsFoundOnThisSite:"個模型在此位置",ShowModelsPublishedByThisAuthor:"展示此用戶發布的模型"}}},gpt={translation:{name:{IFI:"Instituto de inteligencia futura",Aladdin:"Aladdin",Tagline:"Aladdin: Reimagining Design with Explainable AI — Institute for Future Intelligence"},cookie:{Statement:"Clicando Aceptar, autoriza el uso de cookies para mejora la experiencia con Aladdin",Accept:"Aceptar"},aboutUs:{ProductBroughtToYouBy:"Este producto esta hecho por",TermsOfService:"Términos de servicio",PrivacyPolicy:"Política de privacidad",Software:"Programa",Content:"Contenido",Research:"Investigación",Support:"Ayuda",Acknowledgment:"Agradecimientos",FundingInformation:"La National Science Foundation (NSF) proporcionó generosamente fondos para la investigación y el desarrollo de este producto a través de las subvenciones con número #2105695, #2131097, y #2301164. Sin embargo, todas las opiniones, hallazgos y conclusiones o recomendaciones expresados en este producto pertenecen a los autores y no reflejan necesariamente los puntos de vista de la NSF.",Contact:"Para más información, por favor contacte con Charles Xie (charles@intofuture.org).",Translators:"Translators"},word:{BrandName:"Brand Name",Name:"Name",Refresh:"Refresh",LastUpdate:"Last Update",Small:"Small",Medium:"Medium",Large:"Large",Design:"Design",Information:"Information",Type:"Type",Text:"Text",FontSize:"Font Size",FontColor:"Font Color",Model:"Model",Models:"Models",Upload:"Upload",ClickCount:"Click Count",Share:"Share",AlreadyLike:"Already like",Like:"Like",MustLogInToLike:"Must log in to like",AllRightsReserved:"Todos los derechos reservados",MeterAbbreviation:"m",VoltAbbreviation:"V",AmpereAbbreviation:"A",WattAbbreviation:"W",Version:"Versión",VersionInitial:"V",Options:"Opciones",Maximum:"Maximum",Minimum:"Minimum",MaximumNumber:"Número máximo",MinimumNumber:"Minimum Number",MaximumValue:"Maximum Value",MinimumValue:"Minimum Value",Or:"O",None:"Ninguno",High:"High",Partial:"Partial",Teacher:"Profesor",Class:"Clase",Total:"Total",Leaderboard:"Leaderboard",Latest:"Latest",Range:"Rango",SIUnit:"SI Unit",USUnit:"US Unit",ThermalTransmittance:"Thermal Transmittance",ThermalResistance:"Thermal Resistance",UValue:"U-Value",RValue:"R-Value",VolumetricHeatCapacity:"Volumetric Heat Capacity",BuildingHVACSystem:"Building HVAC System",ThermostatSetpoint:"Thermostat Setpoint",TemperatureToleranceThreshold:"Tolerance Threshold",TemperatureToleranceThresholdExplanation:`Heater will not run if the lowest outside temperature of the day is higher than the setpoint minus this threshold. -AC will not run if the highest outside temperature of the day is lower than the setpoint plus this threshold.`,Press:"Press",Open:"Abrir",Save:"Guardar",SaveAsImage:"Guardar como imagen",SaveAsCsv:"Save as CSV",Update:"Actualizar",Paste:"Pegar",Copy:"Copiar",Cut:"Cortar",Delete:"Eliminar",Add:"Add",Lock:"Cerrar con llave",Translucent:"Translucent",Transparency:"Transparency",Color:"Color",Pattern:"Pattern",Texture:"Textura",Size:"Tamaño",Thickness:"Grosor",Yes:"Sí",No:"No",OK:"OK",Cancel:"Cancelar",Apply:"Aplicar",Close:"Cerrar",ApplyTo:"Aplicar a",Run:"Run",Pause:"Pause",Resume:"Resume",Clear:"Limpiar",Warning:"Aviso",Caution:"Caution",Reminder:"Reminder",Length:"Longitud",Width:"Ancho",Height:"Altura",Radius:"Radius",Angle:"Ángulo",Azimuth:"Azimut",Coordinates:"Coordinates",Weather:"Tiempo",Show:"Mostrar",Animate:"Animar",Date:"Fecha",Time:"Tiempo",Title:"Título",Owner:"Propietario",Action:"Acción",Rename:"Renombrar",Location:"Location",Latitude:"Latitud",Month:"Mes",Day:"Día",Hour:"Hora",Daylight:"Luz solar",Radiation:"Radiación",Temperature:"Temperatura",kWh:"kWh",dollar:"dollar",MeterPerSecond:"m/s",NorthInitial:"N",SouthInitial:"S",EastInitial:"E",WestInitial:"O",Fixed:"Fixed",Elements:"Elements",Energy:"Energy",Unknown:"Unknown",Label:"Label",Description:"Description",NoDescription:"No description",MaximumCharacters:"Maximum characters",Author:"Author",Publisher:"Publisher",Building:"Building",ResidentialBuilding:"Residential Building",CommercialBuilding:"Commercial Building",SchoolBuilding:"School Building",TouristAttraction:"Tourist Attraction",UnderConstruction:"Under Construction",Photovoltaic:"Photovoltaic",WindPower:"Wind Power",ColocationProjects:"Colocation Projects",Anonymous:"Anonymous",Nickname:"Nickname",Pin:"Pin",Unpin:"Unpin"},shared:{NoTexture:"Sin textura",FoundationElement:"Bases",CuboidElement:"Cuboide",PolygonElement:"Polígon",SensorElement:"Sensor",SolarPanelElement:"Panel solar",SolarWaterHeaterElement:"Solar Water Heater",ParabolicDishElement:"Parabolic Dish",ParabolicTroughElement:"Parabolic Trough",FresnelReflectorElement:"Fresnel Reflector",HeliostatElement:"Heliostat",WindTurbineElement:"Wind Turbine",LightElement:"Light",ElementLocked:"Bloqueado",ModelType:"Model Type",OutputBreakdown:"Breakdown",MoreResults:"More Results"},message:{NewVersionAvailable:"A new version is available",CalculationMayBeSlowDoYouWantToContinue:"Calculation may be slow. Do you want to continue?",IncreaseSolarRadiationHeatmapGridCellSizeToSpeedUp:"Increase solar radiation heatmap grid cell size to speed up",ModelNotFound:"Model not found",CannotSignIn:"Cannot sign in",CannotSignOut:"Cannot sign out",YourAccountWasCreated:"Your account was created.",CannotCreateAccount:"Cannot create an account",YourAccountSettingsWereSaved:"Your account settings were saved.",CannotSaveYourAccountSettings:"Cannot save your account settings",CannotSaveYourFileToCloud:"Cannot save your file to the cloud",CannotCreateNewProject:"Cannot create a new project",CannotCreateNewProjectWithoutTitle:"Cannot create a new project without a title",CannotOpenYourProjects:"Cannot open your projects",CannotOpenProject:"Cannot open the project",CannotDeleteProject:"Cannot delete the project",CannotRenameProject:"Cannot rename the project",CannotAddDesignToProject:"Cannot add this design to the project",CannotAddDesignToProjectOwnedByOthers:"Cannot add this design to a project owned by others",DesignRemovedFromProject:"The design was successfully removed from the project",CannotRemoveDesignFromProject:"Cannot remove this design from the project",CannotUpdateProject:"Cannot update the project",CannotFetchProjectData:"Cannot fetch project data",TitleUsedChooseDifferentOne:"This title has been used. Choose a different one",CloudFileWithTitleExistsDoYouWantToOverwrite:"A cloud file with the title exists. Do you want to overwrite it?",CloudFileNotFound:"The cloud file was not found",CannotLoadModelsOnMap:"Cannot load models on map",CannotLoadLeaderboard:"Cannot load leaderboard",CannotPublishModelOnMap:"Cannot publish model on map",CannotLikeModelFromMap:"Cannot like model from map",CannotDeleteModelFromMap:"Cannot delete model from map",ModelDeletedFromMap:"Model is deleted from map",DoYouWantToDeleteModelFromMap:"Do you want to delete the model from map?",CannotOpenCloudFile:"Cannot open the cloud file",CannotReadCloudFile:"Cannot read the cloud file",CannotWriteCloudFile:"Cannot write the cloud file",CloudFileCopied:"Cloud file copied",CannotOpenCloudFolder:"Cannot open your cloud folder",CannotDeleteCloudFile:"Cannot delete the cloud file",CannotRenameCloudFile:"Cannot rename the cloud file",DoYouWantToSaveChanges:"¿Quieres guardar los cambios?",NotApplicableToSelectedAction:"No se aplica a la acción seleccionada",ThisElementIsLocked:"Este elemento está bloqueado",ThisCannotBeUndone:"Esto no se puede deshacer",AzimuthOfNorthIsZero:"Azimut del norte es 0°",CounterclockwiseAzimuthIsPositive:"Hacia la izquierda es positivo",SouthFacingIsZero:"South-facing is 0°",ClockwiseRotationIsPositive:"Clockwise is positive",MoveCancelledBecauseOfOverlap:"Move cancelled because of overlap.",MoveOutsideBoundaryCancelled:"Move outside the boundary cancelled.",RotationCancelledBecauseOfOverlap:"Rotation cancelled because of overlap.",RotationOutsideBoundaryCancelled:"Rotation outside the boundary cancelled.",ResizingCancelledBecauseOfOverlap:"Resizing cancelled because of overlap.",ResizingOutsideBoundaryCancelled:"Resizing outside the boundary cancelled.",CannotPasteOutsideBoundary:"Cannot paste outside this surface.",CannotPasteBecauseOfOverlap:"Cannot paste because of overlap.",CannotMoveObjectTooFar:"Cannot move object too far.",ExistingSolarPanelsWillBeRemovedBeforeApplyingNewLayout:"Existing solar panels will be removed before applying the new layout.",DoYouWantToContinue:"Do you want to continue?",SolarPanelsCannotIntersectWithGround:"Solar panels cannot intersect with the ground.",SolarPanelsCannotOverlapWithOneAnother:"Solar panels cannot overlap with one another.",ScreenshotSaved:"A screenshot was saved.",CsvFileSaved:"A CSV file was saved.",SimulationStarted:"Simulation started.",SimulationCompleted:"Simulation completed.",SimulationAborted:"Simulation aborted.",SimulationPaused:"Simulation paused.",CancelSimulation:"Cancel simulation",PauseSimulation:"Pause simulation",ResumeSimulation:"Resume simulation",SimulationWillNotStartDueToErrors:"Simulation will not start due to errors",SimulationWillStartDespiteWarnings:"Simulation will start despite warnings.",EvolutionStarted:"Evolution started.",EvolutionCompleted:"Evolution completed.",EvolutionAborted:"Evolution aborted.",EvolutionPaused:"Evolution paused.",EncounterEvolutionError:"Encountered an evolution error.",CancelEvolution:"Cancel evolution",PauseEvolution:"Pause evolution",ResumeEvolution:"Resume evolution",ConvergenceThresholdHasBeenReached:"The convergence threshold has been reached.",MaximumNumberOfGenerationsHasBeenReached:"The maximum number of generations has been reached.",MaximumNumberOfStepsHasBeenReached:"The maximum number of steps has been reached.",ObjectiveFunctionTypeError:"The current objective function is not supported by this operation. Please start from the menu.",WallsAreNotAtSameHeight:"Walls are not at the same height.",WallsAreNotPerpendicular:"Walls are not perpendicular.",WallsAreNotConnected:"Walls are not connected.",WallsNumberNeedToBeFour:"The number of walls needs to be four.",BuildingContainsEmptyWall:"Building contains one or more empty wall.",BuildingRoofMissing:"Building has a missing roof.",UnknownErrors:"Unknown errors.",SigningOutAnonymousAccount:"Are you sure you want to sign out? This anonymous account will be lost."},menu:{AnalysisOptions:"Analysis Options",option:{GridCellSize:"Grid Cell Size",SamplingFrequency:"Frecuencia de muestreo",TimesPerHour:"Veces per hora",DaysPerYear:"Days per Year"},mainMenu:"Menu principal",cloudMenu:"Menú en la nube",projectSubMenu:"Project",project:{CreateNewProject:"Create New Project",OpenProject:"Open Project",SaveProject:"Save Project",SaveProjectAs:"Save Project As",YouMustLogInToCreateProject:"You must log in to create a new project",YouMustLogInToOpenProject:"You must log in to open a project"},fileSubMenu:"Archivo",file:{CreateNewFile:"Crear nuevo archivo",OpenLocalFile:"Abrir archivo local",SaveAsLocalFile:"Guardar como archivo local",SavingAbortedMustHaveValidFileName:"!Error guardando! Debes tener un nombre de archivo válido",OpenCloudFile:"Abrir archivo en la nube",SaveCloudFile:"Guardar archivo en la nube",SaveAsCloudFile:"Guardar como archivo en la nube",SavingAbortedMustHaveValidTitle:"!Error guardando! Debes tener un título válido para el archivo en la nube",ToSaveYourWorkPleaseSignIn:"Para guardar tu trabajo, por favor regístrese.",TakeScreenshot:"Hacer captura de pantalla",UseCloudFileName:"Use Cloud File Name",PublishOnModelsMap:"Publish on Models Map",PublishedOnModelsMap:"Your model has been published on the Models Map",UpdatedOnModelsMap:"Your model has been updated on the Models Map",YouMustLogInToPublishYourModel:"You must log in to publish your model",YouCannotPublishAModelThatYouDoNotOwn:"You cannot publish a model that you do not own",YouMustSaveModelOnCloudBeforePublishingIt:"You must save the model on the cloud before publishing it"},editSubMenu:"Editar",edit:{Undo:"Deshacer",Redo:"Repetir"},viewSubMenu:"Vista",view:{NavigationView:"Navigation View",TwoDimensionalView:"Vista 2D",ResetView:"Resetear",ZoomIn:"Acercar",ZoomOut:"Alejar",AutoRotate:"Auto rotación",ShowShadow:"Mostrar sombra",ShowSurfaceShininess:"Show Surface Shininess",TranslucentFloatingWindows:"Translucent Floating Windows",accessoriesSubMenu:"Accessories",accessories:{SiteInformation:"Información del sitio",DesignInformation:"Información de diseño",Instruction:"Instrucción",StickyNote:"Nota adhesiva",Note:"Nota"}},settingsSubMenu:"Settings",settings:{WeatherData:"Datos del tiempo",DiurnalTemperature:"Diurnal Temperature",Heliodon:"Heliodon",SunAndTime:"Sun & Time",CustomSolarPanels:"Custom Solar Panels",CustomizeSolarPanel:"Customize Solar Panel"},benchmarksSubMenu:"Benchmarks",benchmarks:{SolarRadiationPredictionVsMeasurement:"Solar Radiation Prediction vs. Measurement",BESTESTCase600:"Building Energy Simulation Test: BESTEST Case 600",BESTESTCase610:"Building Energy Simulation Test: BESTEST Case 610",BESTESTCase620:"Building Energy Simulation Test: BESTEST Case 620",BESTESTCase630:"Building Energy Simulation Test: BESTEST Case 630"},graph:{LineWidth:"Line Width",SymbolSize:"Symbol Size",BarCategoryGap:"Bar Category Gap",ShowHorizontalGridLines:"Show Horizontal Grid Lines",ShowVerticalGridLines:"Show Vertical Grid Lines"},analysisSubMenu:"Análisis",physicsSubMenu:"Physics",physics:{DailySolarRadiationHeatmap:"Daily Solar Radiation Heatmap",SolarRadiationHeatmapOptions:"Solar Radiation Heatmap Options",SolarRadiationHeatmapGridCellSize:"Solar Radiation Heatmap Grid Cell Size",SolarRadiationHeatmapMaxValue:"Solar Radiation Heatmap Maximum Value",SolarRadiationHeatmapNoAnimation:"No Animation for Static Model",ReflectionHeatmap:"Reflection Heatmap"},sensorSubMenu:"Sensores",sensor:{CollectDailyData:"Recoger datos diarios",CollectYearlyData:"Recoger datos anuales",SensorSimulationNoAnimation:"No Animation for Collecting Sensor Data"},buildingSubMenu:"Building",building:{AnalyzeDailyBuildingEnergy:"Analyze Daily Building Energy",AnalyzeYearlyBuildingEnergy:"Analyze Yearly Building Energy",EnergyAnalysisOptions:"Energy Analysis Options",EnergyGridCellSize:"Energy Grid Cell Size",BuildingEnergySimulationNoAnimation:"No Animation for Building Energy Simulation"},solarPanelSubMenu:"Paneles solares",solarPanel:{AnalyzeDailyYield:"Analizar el rendimiento diario",AnalyzeYearlyYield:"Analizar el rendimiento anual",AnalyzeVisibility:"Analyze Visibility",PanelDiscretization:"Discretización del panel",Exact:"Exacto",Approximate:"Aproximado",EnergyGridCellSize:"Energy Grid Cell Size",VisibilityGridCellSize:"View Factor Grid Cell Size",EnergyAnalysisOptions:"Energy Analysis Options",VisibilityAnalysisOptions:"Visibility Analysis Options",SolarPanelSimulationNoAnimation:"No Animation for Solar Panel Simulation"},parabolicTroughSubMenu:"Parabolic Trough",parabolicTrough:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield"},parabolicDishSubMenu:"Parabolic Dish",parabolicDish:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield"},fresnelReflectorSubMenu:"Fresnel Reflector",fresnelReflector:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield"},heliostatSubMenu:"Heliostat",heliostat:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield"},solarUpdraftTowerSubMenu:"Solar Updraft Tower",solarUpdraftTower:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield",SolarUpdraftTowerSimulationNoAnimation:"No Animation for Solar Updraft Tower Simulation"},tutorialsSubMenu:"Tutorials",solarEnergyScienceSubMenu:"Solar Science",solarEnergyScienceTutorials:{SunAngles:"Ángulos solares relativos a un observador en el suelo",InsolationAndClimate:"Insolation and Climate",SolarRadiationToBox:"Radiación solar a una caja"},buildingScienceSubMenu:"Building Science",buildingScienceTutorials:{ThermalEnvelopeVsBuildingEnvelope:"Thermal Envelope vs. Building Envelope",EffectOfSizeOnBuildingEnergy:"Effect of Size on Building Energy",EffectOfOrientationOnBuildingEnergy:"Effect of Orientation on Building Energy",EffectOfInsulationOnBuildingEnergy:"Effect of Insulation on Building Energy",EffectOfRoofColorOnBuildingEnergy:"Effect of Roof Color on Building Energy",EffectOfEavesOverhangLengthOnBuildingEnergy:"Effect of Eaves Overhang Length on Building Energy",EffectOfWindowSHGCOnBuildingEnergy:"Effect of Window Solar Heat Gain on Building Energy",EffectOfThermostatSetpointOnBuildingEnergy:"Effect of Thermostat Setpoint on Building Energy",EffectOfSolarPanelsOnBuildingEnergy:"Effect of Solar Panels on Building Energy",EffectOfGroundTemperatureOnBuildingEnergy:"Effect of Ground Temperature on Building Energy",EffectOfTreesOnBuildingEnergy:"Effect of Trees on Building Energy"},buildingDesignSubMenu:"Building Design",buildingDesignTutorials:{CapeCodStyleHouseWithShedDormer:"Cape Cod Style House with Shed Dormer",MansardRoofWithDormers:"Mansard Roof with Dormers",GableRoofVsHipRoof:"Gable Roof vs. Hip Roof",ColonialVsSaltbox:"Colonial vs. Saltbox",GambrelRoofVsMansardRoof:"Gambrel Roof vs. Mansard Roof",CombinationRoofVsBonnetRoof:"Combination Roof vs. Bonnet Roof",DutchGableRoof:"Dutch Gable Roof",GableAndValleyRoof:"Gable and Valley Roof",ClerestoryRoof:"Clerestory Roof",MonitorRoof:"Monitor Roof",AFrameHouse:"A-Frame House",HalfTimberedHouse:"Half-Timbered House",AllBasicRoofTypes:"All Basic Roof Types"},photovoltaicSolarPowerSubMenu:"Photovoltaic Solar Power",photovoltaicSolarPowerTutorials:{EffectOfTiltAngleOfSolarPanel:"Effect of Tilt Angle",EffectOfAzimuthOfSolarPanel:"Effect of Azimuth",SolarPanelTypes:"Solar Panel Types",DefineYourOwnSolarPanels:"Define Your Own Solar Panels",VerticalBifacialSolarPanels:"Vertical Bifacial Solar Panels",CompareMonofacialAndBifacialSolarPanels:"Monofacial vs. Bifacial Solar Panels",SolarTrackers:"Seguidores solares",CoveringGroundWithSolarPanels:"Why Just Covering the Ground with Solar Panels is not a Good Idea",InterRowSpacingOfSolarPanelArray:"Effect of Inter-Row Spacing in a Solar Panel Array",EffectOfOrientationOfSolarPanels:"Effect of Orientation of Solar Panels",SolarPanelArrayAutomaticLayout:"Solar Panel Array Automatic Layout"},concentratedSolarPowerSubMenu:"Concentrated Solar Power",concentratedSolarPowerTutorials:{EffectOfAzimuthOfParabolicTrough:"Effect of Azimuth of a Parabolic Trough",EffectOfLatusRectumOfParabolicTrough:"Effect of Latus Rectum of a Parabolic Trough",FocusSunlightWithParabolicDish:"Focus Sunlight with a Parabolic Dish",LinearFresnelReflectors:"Linear Fresnel Reflectors",EffectOfAbsorberPipeHeightForLinearFresnelReflectors:"Effect of Absorber Pipe Height for Linear Fresnel Reflectors",EffectOfAzimuthOfLinearFresnelReflectors:"Effect of Azimuth of Linear Fresnel Reflectors",LinearFresnelReflectorsWithTwoAbsorbers:"Linear Fresnel Reflectors with Two Absorbers",CosineEfficiencyOfHeliostats:"Cosine Efficiency of Heliostats",ShadowingAndBlockingOfHeliostats:"Shadowing and Blocking of Heliostats",EffectSolarPowerTowerHeight:"Effect of Solar Power Tower Height",SolarPowerTower:"Solar Power Tower"},otherTypesOfSolarPowerSubMenu:"Other Types of Solar Power",otherTypesOfSolarPowerTutorials:{SolarWaterHeaters:"Solar Water Heaters",SolarUpdraftTower:"Solar Updraft Tower"},windPowerSubMenu:"Wind Power",windPowerTutorials:{EffectOfBladeNumberOfWindTurbine:"Effect of Blade Number of Wind Turbine",EffectOfPitchAngleOfWindTurbineBlades:"Effect of Pitch Angle of Wind Turbine Blades",BirdSafeBladeDesign:"Bird-Safe Blade Design",OffshoreWindFarm:"Offshore Wind Farm"},colocationSubMenu:"Colocation",colocationTutorials:{AgricultureSolarWindColocation:"Agriculture-Solar-Wind Colocation"},generativeDesignSubMenu:"Generative Design",generativeDesignTutorials:{MonofacialSolarPanelArrayTiltAngle:"The Tilt Angle of a Monofacial Solar Panel Array",BifacialSolarPanelArrayTiltAngle:"The Tilt Angle of a Bifacial Solar Panel Array",OutputOfSolarPanelArrayInDifferentPlaces:"The Output of a Solar Panel Array in Different Places",SimpleSolarFarmParetoFront:"The Pareto Front for Designing a Simple Solar Farm"},examplesSubMenu:"Ejemplos",solarEnergySubMenu:"Energía Solar",solarEnergyExamples:{SunBeamAndHeliodon:"Rayo de sol y heliodon",RooftopSolarPanels:"Rooftop Solar Panels",NevadaSolarOneParabolicTroughArray:"Nevada Solar One Parabolic Trough Array",TooeleParabolicDishArray:"Tooele Parabolic Dish Array",PS10SolarPowerTower:"PS10 Solar Power Tower",TucsonLinearFresnelReflectors:"Tucson Linear Fresnel Reflectors",SolarCanopyFormFactors:"Solar Canopy Form Factors",SolarCanopyOverBleachers:"Solar Canopy Over Bleachers",SolarCanopyOverGarage:"Solar Canopy Over Garage",SolarBusStop:"Solar Bus Stop",SolarFacadeTesla:"Tesla Solar Façade",BuildingIntegratedPhotovoltaics:"Building-Integrated Photovoltaics",Floatovoltaics:"Floatovoltaics",Agrivoltaics:"Agrivoltaics",VegetativeBuffer:"Vegetative Buffer",RainbowSwashSolarFarmBostonMA:"Rainbow Swash Solar Farm in Boston, MA",MickeyMouseSolarFarmOrlandoFL:"Mickey Mouse Solar Farm in Orlando, FL",SolarPanelsOverCanalBakersfieldCA:"Hypothetical Solar Panels Over Canal in Bakersfield, CA",SolarNoiseBarrierLexingtonMA:"Hypothetical Solar Noise Barrier in Lexington, MA",HSATSolarTrackersRaleighNC:"Horizontal Single Axis Trackers (HSAT) in Raleigh, NC",AADATSolarTrackersLancasterCA:"Azimuth–Altitude Dual Axis Trackers (AADAT) in Lancaster, CA",SolarUpdraftTowerInCity:"Solar Updraft Tower in City"},builtEnvironmentSubMenu:"Built Environment",residentialBuildingsSubMenu:"Residential Buildings",residentialBuildingExamples:{ColonialHouse:"Colonial House",DutchColonialHouse:"Dutch Colonial House",TShapedHouse:"T-Shaped House",CapeCodHouseWithGarage:"Cape Cod House with Garage",Solarium:"Solarium",Church1:"Church 1",Cathedral1:"Cathedral 1",Cathedral2:"Cathedral 2",Mosque1:"Mosque 1",AdobeTaosHouse:"Adobe Taos House",RanchHouse:"Ranch House",BonnetHouse:"Bonnet House",BarnStyleHouse:"Barn Style House",ModernHouse:"Modern House",ButterflyRoofHouse:"Butterfly Roof House"},commercialBuildingsSubMenu:"Commercial Buildings",commercialBuildingExamples:{WhiteHouse:"White House",HaroldWashingtonCollege:"Harold Washington College",BilimMersinTurkiye:"BILIM, Mersin, Turkiye",SpanishStyleHotel:"Spanish Style Hotel",ApartmentBuilding:"Apartment Building",OfficeBuilding:"Edificio de oficinas",Hotel:"Hotel"},buildingComplexesSubMenu:"Building Complexes",buildingComplexExamples:{SouthBurlingtonHighSchoolVermont:"South Burlington High School, VT",MescaleroApacheSchoolNewMexico:"Mescalero Apache School, NM"},urbanPlanningSubMenu:"Urban Planning",urbanPlanningExamples:{CityBlockHeatmap:"City Block Heatmap",ChicagoSkyline:"Chicago Skyline"},otherBuildingsSubMenu:"Other Buildings",otherBuildingExamples:{Greenhouse:"Greenhouse",Pavilion:"Pavilion in a Park",OctagonalPagoda:"Octagonal Pagoda",OceanFront:"Ocean Front",EgyptianPyramids:"Egyptian Pyramids",MayanPyramid:"Mayan Pyramid",SiOSePol:"Si-o-se-pol",StackedCuboids:"Stacked Cuboids"},artificialIntelligenceSubMenu:"Artificial Intelligence",artificialIntelligenceExamples:{OptimizingTiltAngleOfOneSolarPanelRow:"Optimizing the Tilt Angle of a Solar Panel Row",OptimizingTiltAnglesOfMultipleSolarPanelRows:"Optimizing the Tilt Angles of Multiple Solar Panel Rows",SolarFarmGenerativeDesign:"Solar Farm Generative Design",SolarFarmGenerativeDesignWithBlock:"Solar Farm Generative Design in the Presence of a Block",FitchburgSolarFarmGenerativeDesign:"Fitchburg Solar Farm Generative Design"},languageSubMenu:"Idioma",publicSubMenu:"Public",ModelsGallery:"Models Gallery",ModelsMap:"Models Map",AboutUs:"Sobre nosotros"},avatarMenu:{AccountSettings:"Configuraciones de la cuenta",PrivacyStatementTitle:"User Privacy Protection Statement",PrivacyStatement:"When you sign in, your Google ID is used to create and access your Aladdin account. Only a random alphanumeric string is stored in our database as a reference. No personally identifiable data such as your name or email is ever gathered. For more information, see our ",SignIn:"Iniciar sesión",SignInAsMe:"Sign in as me",SignInAnonymously:"Sign in anonymously",SignOut:"Desconectar",IfYouAreAStudent:"Si eres un estudiante"},skyMenu:{Axes:"Ejes",Theme:"Tema",ThemeDefault:"Por defecto",ThemeDesert:"Desierto",ThemeDune:"Dune",ThemeForest:"Bosque",ThemeGrassland:"Campo",ThemeHill:"Hill",ThemeLake:"Lake",ThemeMountain:"Mountain",ThemeRural:"Rural",SunlightAttenuationCoefficientInAir:"Sunlight Attenuation Coefficient in Air",ConvectiveCoefficientOfAir:"Convective Coefficient of Air",HighestTemperatureTimeInMinutes:"Highest Temperature Time (Minutes)",SelectSunAnglesToShow:"Select Sun Angles to Show",ShowAzimuthAngle:"Show Azimuth Angle",ShowElevationAngle:"Show Elevation Angle",ShowZenithAngle:"Show Zenith Angle",DirectLightBrightnessAtNoon:"Direct Light Brightness at Noon",AmbientLightBrightnessAtNoon:"Ambient Light Brightness at Noon"},groundMenu:{MonthlyIrradianceLoss:"Monthly Irradiance Loss",Vegetation:"Vegetation",LeafOutDay:"Leaf-Out Day",LeafOffDay:"Leaf-Off Day",Albedo:"Albedo",ImageOnGround:"Imagen en el suelo",WaterSurface:"Water Surface",RemoveAllUnlockedTrees:"Eliminar todos los árboles",RemoveAllUnlockedFlowers:"Remove All Unlocked Flowers",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",RemoveAllUnlockedPeople:"Eliminar toda la gente",RemoveAllUnlockedFoundations:"Eliminar todos las bases",RemoveAllUnlockedCuboids:"Eliminar todos los cuboides",DoYouReallyWantToRemoveAllPeople:"Estás seguro que quieres eliminar a toda la gente who are not locked",DoYouReallyWantToRemoveAllTrees:"Estás seguro que quieres eliminar todos los árboles that are not locked",DoYouReallyWantToRemoveAllFlowers:"Do you really want to remove all the flowers that are not locked",DoYouReallyWantToRemoveAllSolarPanels:"Do you really want to remove all the solar panels that are not locked",DoYouReallyWantToRemoveAllFoundations:"Estás seguro que quieres eliminar todas las bases that are not locked",DoYouReallyWantToRemoveAllCuboids:"Estás seguro que quieres eliminar todos los cuboides that are not locked",LockAllUnlockedElements:"Lock All Unlocked Elements",UnlockAllLockedElements:"Unlock All Locked Elements"},labelSubMenu:{Label:"Etiqueta",LabelText:"Label Text",LabelHeight:"Label Height",LabelSize:"Label Size",LabelFontSize:"Font Size",LabelColor:"Label Color",KeepShowingLabel:"Seguir mostrando etiqueta"},foundationMenu:{RemoveAllUnlockedSolarPanels:"Eliminar todos los paneles solares",RemoveAllUnlockedParabolicTroughs:"Remove All Unlocked Parabolic Troughs",RemoveAllUnlockedParabolicDishes:"Remove All Unlocked Parabolic Dishes",RemoveAllUnlockedFresnelReflectors:"Remove All Unlocked Fresnel Reflectors",RemoveAllUnlockedHeliostats:"Remove All Unlocked Heliostats",RemoveAllUnlockedWindTurbines:"Remove All Unlocked Wind Turbines",RemoveAllUnlockedSensors:"Eliminar todos los sensores",RemoveAllUnlockedLights:"Remove All Unlocked Lights",RemoveAllUnlockedWalls:"Eliminar todas las paredes",RemoveAllUnlockedWindows:"Remove All Unlocked Windows",RemoveAllUnlockedDoors:"Remove All Unlocked Doors",RemoveAllUnlockedPolygons:"Eliminar todos los polígonos",RemoveAllUnlockedHumans:"Remove All Humans",RemoveAllUnlockedTrees:"Remove All Trees",RemoveAllUnlockedFlowers:"Remove All Unlocked Flowers",Racks:"Rejillas",Texture01:"Textura 1",Texture02:"Textura 2",Texture03:"Textura 3",Texture04:"Textura 4",Texture05:"Textura 5",Texture06:"Textura 6",Texture07:"Textura 7",Texture08:"Textura 8",Texture09:"Textura 9",Texture10:"Textura 10",SolarPanels:"Paneles solares",SolarPanelArray:"Solar Panel Array",DoYouReallyWantToRemoveAllSolarPanelsOnFoundation:"Estás seguro que quieres eliminar todos los paneles solares en esta base that are not locked",ParabolicTroughs:"Parabolic Troughs",DoYouReallyWantToRemoveAllParabolicTroughsOnFoundation:"Do you really want to remove all the parabolic troughs on this foundation that are not locked",ParabolicDishes:"Parabolic Dishes",DoYouReallyWantToRemoveAllParabolicDishesOnFoundation:"Do you really want to remove all the parabolic dishes on this foundation that are not locked",FresnelReflectors:"Fresnel Reflectors",DoYouReallyWantToRemoveAllFresnelReflectorsOnFoundation:"Do you really want to remove all the Fresnel reflectors on this foundation that are not locked",Heliostats:"Heliostats",DoYouReallyWantToRemoveAllHeliostatsOnFoundation:"Do you really want to remove all the heliostats on this foundation that are not locked",WindTurbines:"Wind Turbines",DoYouReallyWantToRemoveAllWindTurbinesOnFoundation:"Do you really want to remove all the wind turbines on this foundation that are not locked",Sensors:"Sensores",DoYouReallyWantToRemoveAllSensorsOnFoundation:"Estás seguro que quieres eliminar todos los sensores de esta base",Lights:"Lights",DoYouReallyWantToRemoveAllLightsOnFoundation:"Do you really want to remove all the lights on this foundation that are not locked",Walls:"Paredes",DoYouReallyWantToRemoveAllWallsOnFoundation:"Estás seguro que quieres eliminar todas las paredes de esta base that are not locked",Windows:"Windows",DoYouReallyWantToRemoveAllWindowsOnFoundation:"Do you really want to remove all the windows on this foundation that are not locked",Doors:"Doors",DoYouReallyWantToRemoveAllDoorsOnFoundation:"Do you really want to remove all the doors on this foundation that are not locked",Polygons:"Polígonos",DoYouReallyWantToRemoveAllPolygonsOnFoundation:"Estás seguro que quieres eliminar todos los polígonos de esta base that are not locked",Humans:"Humans",DoYouReallyWantToRemoveAllHumansOnFoundation:"Do you really want to remove all the humans on this foundation who are not locked",Trees:"Trees",DoYouReallyWantToRemoveAllTreesOnFoundation:"Do you really want to remove all the trees on this foundation that are not locked",Flowers:"Flowers",DoYouReallyWantToRemoveAllFlowersOnFoundation:"Do you really want to remove all the flowers on this foundation that are not locked",OnlyThisFoundation:"Solamente esta base",AllConnectedFoundations:"Todas las bases conectadas",AllSelectedFoundations:"All Selected Foundations",AllFoundations:"Todas las bases",AddPolygon:"Añadir polígono",SolarStructure:"Solar Structure",GroupMaster:"Group Master",LockAllUnlockedElementsOnThisFoundation:"Lock All Unlocked Elements on This Foundation",UnlockAllLockedElementsOnThisFoundation:"Unlock All Locked Elements on This Foundation",GroundFloorRValue:"Ground Floor R-Value",OnlyThisGroundFloor:"Only This Ground Floor",AllGroundFloors:"All Ground Floors"},solarPowerTowerMenu:{ReceiverTowerForHeliostats:"Receiver Tower for Heliostats",ReceiverTowerPhysicalProperties:"Physical Properties of Receiver Tower",ReceiverTowerHeight:"Height of Receiver Tower",ReceiverTowerRadius:"Radius of Receiver Tower",ReceiverAbsorptance:"Absorptance of Receiver",ReceiverOpticalEfficiency:"Optical Efficiency of Receiver",ReceiverThermalEfficiency:"Thermal Efficiency of Receiver"},solarAbsorberPipeMenu:{AbsorberPipeForFresnelReflectors:"Absorber Pipe for Fresnel Reflectors",AbsorberPipePhysicalProperties:"Physical Properties of Absorber Pipe",AbsorberHeight:"Height of Absorber Pipe",AbsorberApertureWidth:"Aperture Width of Absorber Pipe",AbsorberPipePoleNumber:"Pole Number for Absorber Pipe",AbsorberAbsorptance:"Absorptance of Absorber",AbsorberOpticalEfficiency:"Optical Efficiency of Absorber",AbsorberThermalEfficiency:"Thermal Efficiency of Absorber"},solarUpdraftTowerMenu:{SolarUpdraftTower:"Solar Updraft Tower",SolarUpdraftTowerPhysicalProperties:"Physical Properties of Solar Updraft Tower",SolarUpdraftTowerChimneyHeight:"Solar Updraft Tower Chimney Height",SolarUpdraftTowerChimneyRadius:"Solar Updraft Tower Chimney Radius",SolarUpdraftTowerCollectorHeight:"Solar Updraft Tower Collector Height",SolarUpdraftTowerCollectorRadius:"Solar Updraft Tower Collector Radius",SolarUpdraftTowerCollectorTransmissivity:"Solar Updraft Tower Collector Transmissivity",SolarUpdraftTowerCollectorEmissivity:"Solar Updraft Tower Collector Emissivity",SolarUpdraftTowerDischargeCoefficient:"Solar Updraft Tower Discharge Coefficient",SolarUpdraftTowerTurbineEfficiency:"Solar Updraft Tower Turbine Efficiency"},cuboidMenu:{Texture01:"Textura 1",Texture02:"Textura 2",Texture03:"Textura 3",Texture04:"Textura 4",Texture05:"Textura 5",Texture06:"Textura 6",Texture07:"Textura 7",Texture08:"Textura 8",Texture09:"Textura 9",Texture10:"Textura 10",RemoveAllUnlockedSolarPanels:"Eliminar todos los paneles solares",RemoveAllUnlockedSensors:"Eliminar todos los sensores",RemoveAllUnlockedPolygons:"Eliminar todos los polígonos",RemoveAllUnlockedHumans:"Remove All Humans",RemoveAllUnlockedTrees:"Remove All Trees",RemoveAllUnlockedFlowers:"Remove All Unlocked Flowers",RemoveAllUnlockedLights:"Remove All Unlocked Lights",Racks:"Rejillas",Lights:"Lights",DoYouReallyWantToRemoveAllLightsOnCuboid:"Do you really want to remove all the lights on this cuboid that are not locked",SolarPanels:"Paneles solares",DoYouReallyWantToRemoveAllSolarPanelsOnCuboid:"Estás seguro que quieres eliminar todos los paneles solares de este cuboide that are not locked",Sensors:"Sensores",DoYouReallyWantToRemoveAllSensorsOnCuboid:"Estás seguro que quieres eliminar todos los sensores de este cuboide that are not locked",Polygons:"Polígonos",DoYouReallyWantToRemoveAllPolygonsOnCuboid:"Estás seguro que quieres eliminar todos los polígonos de este cuboide that are not locked",Humans:"Humans",DoYouReallyWantToRemoveAllHumansOnCuboid:"Do you really want to remove all the humans on this cuboid who are not locked",Trees:"Trees",DoYouReallyWantToRemoveAllTreesOnCuboid:"Do you really want to remove all the trees on this cuboid that are not locked",Flowers:"Flowers",DoYouReallyWantToRemoveAllFlowersOnCuboid:"Do you really want to remove all the flowers on this cuboid that are not locked",OnlyThisCuboid:"Solamente este cuboide",AllCuboidsOnSameSurface:"All Cuboids on Same Surface",AllCuboidsAboveSameBase:"All Cuboids above Same Base",AllSelectedCuboids:"All Selected Cuboids",AllCuboids:"Todos los cuboides",OnlyThisSide:"Solamente este lado",AllSidesOfThisCuboid:"Todos los lados en este cuboide",AllSidesOfSelectedCuboids:"All Sides of Selected Cuboids",AllSidesOfAllCuboids:"Todos los lados en todos los cuboides",AddPolygon:"Añadir polígono",Stackable:"Stackable",GroupMaster:"Group Master"},polygonMenu:{Texture01:"Textura 1",Texture02:"Textura 2",Texture03:"Textura 3",Texture04:"Textura 4",Texture05:"Textura 5",Texture06:"Textura 6",Texture07:"Textura 7",Texture08:"Textura 8",Texture09:"Textura 9",Texture10:"Textura 10",TextBox:"Text Box",FontOutlineColor:"Font Outline Color",FontOutlineWidth:"Font Outline Width",FontStrokeColor:"Font Stroke Color",FontStrokeWidth:"Font Stroke Width",NoOutline:"No Outline",Shiny:"Shiny",Filled:"Rellenar",FillTexture:"Rellenar textura",FillColor:"Rellenar color",Opacity:"Opacity",LineColor:"Color de la línea",LineWidth:"Line Width",LineStyle:"Line Style",SolidLine:"Solid Line",DashedLine:"Dashed Line",DottedLine:"Dotted Line",InsertVertexBeforeIndex:"Añadir vértice antes del índice",InsertVertexAfterIndex:"Añadir vértice después del índice",DeleteVertex:"Eliminar vértice",OnlyThisPolygon:"Solamente este polígono",AllPolygonsOnSurface:"All Polygons on the Same Surface",AllPolygonsAboveFoundation:"Todos los polígonos sobre la base",AllSelectedPolygons:"All Selected Polygons",AllPolygons:"Todos los polígonos",Layout:"Layout",SolarPanelArrayLayout:"Solar Panel Array Layout",SolarPanelArrayLayoutParametricDesign:"Solar Panel Array Layout: Parametric Design",SolarPanelArrayLayoutGenerativeDesign:"Solar Panel Array Layout: Generative Design",SolarPanelArrayModel:"Solar Panel Model",SolarPanelArrayOrientation:"Orientation",SolarPanelArrayTiltAngle:"Tilt Angle",SolarPanelArrayRowWidth:"Row Width",SolarPanelArrayInterRowSpacing:"Inter-Row Spacing",SolarPanelArrayRowSpacing:"Row Spacing",SolarPanelArrayRowAxis:"Row Axis",SolarPanelArrayLeftRightRowAxis:"Left-Right (Relative)",SolarPanelArrayUpDownRowAxis:"Up-Down (Relative)",SolarPanelArrayEastWestRowAxis:"East-West (Absolute)",SolarPanelArrayNorthSouthRowAxis:"North-South (Absolute)",SolarPanelArrayMargin:"Margin",SolarPanelArrayPoleHeight:"Pole Height",SolarPanelArrayPoleSpacing:"Pole Spacing",SolarPanelArrayTotalYearlyCost:"Total Cost",SolarPanelArrayTotalYearlyRevenue:"Total Revenue",SolarPanelArrayTotalYearlyYield:"Total Yield",SolarPanelArrayMeanYearlyYield:"Mean Yield",SolarPanelArrayYearlyProfit:"Profit",LayoutNotAcceptedCheckYourParameters:"This layout is not accepted. Please check your parameters."},optimizationMenu:{Optimization:"Optimization",Parameters:"Parameters",Variables:"Variables",Constants:"Constants",GeneticAlgorithm:"Genetic Algorithm",GeneticAlgorithmSettings:"Genetic Algorithm Settings",ParticleSwarmOptimization:"Particle Swarm Optimization",ParticleSwarmOptimizationSettings:"Particle Swarm Optimization Settings",SolarPanelTiltAngleOptimization:"Solar Panel Tilt Angle Optimization",SolarPanelArrayLayout:"Solar Panel Array Layout",Generation:"Generation",Gene:"Gene",NormalizedVariables:"Normalized Variables",Objective:"Objective",ObjectiveFunctionDailyTotalYield:"Daily Total Yield",ObjectiveFunctionYearlyTotalYield:"Yearly Total Yield",ObjectiveFunctionDailyMeanYield:"Daily Mean Yield",ObjectiveFunctionYearlyMeanYield:"Yearly Mean Yield",ObjectiveFunctionDailyProfit:"Daily Profit",ObjectiveFunctionYearlyProfit:"Yearly Profit",GeneticAlgorithmSelectionMethod:"Genetic Algorithm Selection Method",RouletteWheel:"Roulette Wheel",Tournament:"Tournament",SearchMethod:"Search Method",GlobalSearchUniformSelection:"Global Search Uniform Selection",LocalSearchRandomOptimization:"Local Search Random Optimization",PopulationSize:"Population Size",MaximumGenerations:"Maximum Generations",SelectionRate:"Selection Rate",CrossoverRate:"Crossover Rate",MutationRate:"Mutation Rate",Step:"Step",SwarmSize:"Swarm Size",MaximumSteps:"Maximum Steps",MaximumVelocity:"Maximum Velocity",InertiaWeight:"Inertia Weight",CognitiveCoefficient:"Cognitive Coefficient",SocialCoefficient:"Social Coefficient",ConvergenceThreshold:"Convergence Threshold for Termination",LocalSearchRadius:"Local Search Radius",RowsPerRackRange:"Range for Rows per Rack",TiltAngleRange:"Range for Tilt Angle",InterRowSpacingRange:"Range for Inter-Row Spacing",ClickTargetPolygonToActivate:"Click Target Polygon to Activate",ClickTargetFoundationToActivate:"Click Target Foundation to Activate"},treeMenu:{ShowModel:"Mostrar modelo",Flip:"Flip",Type:"Tipo",Spread:"Extender"},flowerMenu:{Flip:"Flip",Type:"Type",Spread:"Spread"},peopleMenu:{ChangePerson:"Cambiar persona",Flip:"Flip",Observer:"Observer",ViewFromThisPerson:"View from This Person"},lightMenu:{Color:"Color",Intensity:"Intensity",Decay:"Decay",MaximumDistance:"Distance",Inside:"Inside"},solarCollectorMenu:{Coordinates:"Coordinates",RelativeXCoordinateOfCenter:"Relative X Coordinate of Center",RelativeYCoordinateOfCenter:"Relative Y Coordinate of Center",RelativeAzimuth:"Azimut relativa",Pole:"Pole",PoleHeight:"Altura del poste",PoleRadius:"Pole Radius",ExtraPoleHeight:"Extra Pole Height",ExtraPoleHeightInAdditionToHalfWidth:"Extra Pole Height in Addition to Half Width",DrawSunBeam:"Dibujar rayo del sol"},concentratedSolarPowerCollectorMenu:{ReflectorReflectance:"Reflector Reflectance",ReceiverAbsorptance:"Receiver Absorptance",ReflectorOpticalEfficiency:"Reflector Optical Efficiency",ReceiverThermalEfficiency:"Receiver Thermal Efficiency"},solarPanelMenu:{ElectricalProperties:"Electrical Properties",InverterEfficiency:"Inverter Efficiency",InverterEfficiencyExplained:"The efficiency for converting direct current (DC) to alternating current (AC).",DcToAcSizeRatio:"DC-to-AC Size Ratio",DcToAcSizeRatioExplained:"The ratio of the solar panels' DC-rated size to the inverter's AC-rated size.",ChangePvModel:"Cambiar modelo PV",Orientation:"Orientación",Portrait:"Vertical",Landscape:"Horizontal",FrameColor:"Frame Color",Panels:"paneles",PanelsWide:"ancho paneles",PanelsLong:"longitud paneles",TiltAngle:"Inclinar ángulo",SouthFacingIsPositive:"Orientado al sur es positivo",Tracker:"Seguidor",SolarTrackerFollowsSun:"Un seguidor sigue el sol para incrementar las salidas de los paneles solares",PoleSpacing:"Espaciado entre postes",NoTracker:"Sin seguimiento",HorizontalSingleAxisTracker:"Seguidor horizontal de eje único",VerticalSingleAxisTracker:"Seguidor vertical de eje único",AltazimuthDualAxisTracker:"Seguidor de doble eje altazimutal",OnlyThisSolarPanel:"Solamente este panel solar",AllSolarPanelsOnSurface:"Todos los paneles solares en la misma superficie",AllSolarPanelsAboveFoundation:"Todos los paneles solares sobre la misma base",AllSelectedSolarPanels:"All Selected Solar Panels",AllSolarPanels:"Todos los paneles solares"},solarWaterHeaterMenu:{OnlyThisSolarWaterHeater:"Only This Solar Water Heater",AllSolarWaterHeatersOnSurface:"All Solar Water Heaters on the Same Surface",AllSolarWaterHeatersAboveFoundation:"All Solar Water Heaters Above the Same Foundation",AllSelectedSolarWaterHeaters:"All Selected Solar Water Heaters",AllSolarWaterHeaters:"All Solar Water Heaters"},pvModelPanel:{SolarPanelSpecs:"Especificaciones del panel solar",General:"General",Electrical:"Electrical",CellCountInXDirection:"Cell Count in X Direction",CellCountInYDirection:"Cell Count in Y Direction",Weight:"Weight",Kilogram:"kg",RatedVoltage:"Rated Voltage",RatedCurrent:"Rated Current",OpenCircuitVoltage:"Open-Circuit Voltage",ShortCircuitCurrent:"Short-Circuit Current",MaximumRatedPower:"Maximum Rated Power",Model:"Modelo",PanelSize:"Tamaño del panel",Cells:"Celdas",CellType:"Tipo de celda",Monocrystalline:"Monocristalino",Polycrystalline:"Policristalino",ThinFilm:"Película delgada",Bifacial:"Bifacial",BifacialityFactor:"Bifaciality Factor",Black:"Negro",Blue:"Azul",ShadeTolerance:"Tolerancia a la sombra",SolarCellEfficiency:"Eficiencia de la célula solar",NominalOperatingCellTemperature:"Temperatura nominal de la celda de funcionamiento",TemperatureCoefficientOfPmax:"Coeficiente de temperatura de Pmax",AddedCustomSolarPanels:"Added",DisplayThisCustomSolarPanel:"Display this custom solar panel",ExportThisCustomSolarPanel:"Export this custom solar panel",ImportCustomSolarPanelFromClipboard:"Import custom solar panel from clipboard",CustomSolarPanelExportedToClipboard:"Custom solar panel exported to Clipboard",DoYouReallyWantToRemoveThisCustomSolarPanel:"Do you really want to remove this custom solar panel",MakeSureThisCustomSolarPanelIsNotUsed:"Make sure this custom solar panel is not used in the current model",ThisCustomSolarPanelIsUsed:"This custom solar panel is used in the current model",DoYouReallyWantToImportCustomSolarPanel:"Do you really want to import a custom solar panel",ExistingSettingsWillBeOverwritten:"The existing settings will be overwritten",CannotAddCustomSolarPanel:"Cannot add custom solar panel",CustomSolarPanelMustHaveModelName:"A custom solar panel must have a model name",CustomSolarPanelExists:"A custom solar panel with this name already exists",FailInImportingDataFromClipboard:"Failed in importing data from the clipboard"},parabolicTroughMenu:{ModuleLength:"Module Length",Modules:"modules",ModulesLong:"modules long",LatusRectum:"Latus Rectum",OnlyThisParabolicTrough:"Only This Parabolic Trough",AllParabolicTroughsAboveFoundation:"All Parabolic Troughs Above the Same Foundation",AllSelectedParabolicTroughs:"All Selected Parabolic Troughs",AllParabolicTroughs:"All Parabolic Troughs"},fresnelReflectorMenu:{AbsorberPipe:"Absorber Pipe",SelectAbsorberToReflectSunlightTo:"Select Absorber to Reflect Sunlight to",ModuleLength:"Module Length",Modules:"modules",ModulesLong:"modules long",OnlyThisFresnelReflector:"Only This Fresnel Reflector",AllFresnelReflectorsAboveFoundation:"All Fresnel Reflectors Above the Same Foundation",AllSelectedFresnelReflectors:"All Selected Fresnel Reflectors",AllFresnelReflectors:"All Fresnel Reflectors"},heliostatMenu:{Tower:"Tower",SelectTowerToReflectSunlightTo:"Select Tower to Reflect Sunlight to",OnlyThisHeliostat:"Only This Heliostat",AllHeliostatsAboveFoundation:"All Heliostats Above the Same Foundation",AllSelectedHeliostats:"All Selected Heliostats",AllHeliostats:"All Heliostats"},parabolicDishMenu:{ReceiverStructure:"Receiver Structure",CentralPole:"Central Pole",CentralPoleWithTripod:"Central Pole with Tripod",Quadrupod:"Quadrupod",RimDiameter:"Rim Diameter",LatusRectum:"Latus Rectum",ExtraPoleHeightInAdditionToRadius:"Extra Pole Height in Addition to Radius",OnlyThisParabolicDish:"Only This Parabolic Dish",AllParabolicDishesAboveFoundation:"All Parabolic Dishes Above the Same Foundation",AllSelectedParabolicDishes:"All Selected Parabolic Dishes",AllParabolicDishes:"All Parabolic Dishes"},windTurbineMenu:{BirdSafeDesign:"Bird-Safe Design",BirdSafeNone:"None",BirdSafeBicolor:"Bicolor",BirdSafeStriped:"Striped",Rotor:"Rotor",BladeNumber:"Blade Number",RotorInitialAngle:"Rotor Initial Angle",RotorBladeDesign:"Rotor Blade Design",RotorBladeRadius:"Rotor Blade Radius",RotorBladePitchAngle:"Rotor Blade Pitch Angle",RelativeYawAngle:"Relative Yaw Angle",MaximumChordLength:"Maximum Chord Length",Tower:"Tower",TowerHeight:"Tower Height",TowerRadius:"Tower Radius",HubDesign:"Hub Design",HubRadius:"Hub Radius",HubLength:"Hub Length",OnlyThisWindTurbine:"Only This Wind Turbine",AllWindTurbinesAboveFoundation:"All Wind Turbines Above the Same Foundation",AllSelectedWindTurbines:"All Selected Wind Turbines",AllWindTurbines:"All Wind Turbines"},wallMenu:{TextureDefault:"Por defecto",Texture01:"Textura 1",Texture02:"Textura 2",Texture03:"Textura 3",Texture04:"Textura 4",Texture05:"Textura 5",Texture06:"Textura 6",Texture07:"Textura 7",Texture08:"Textura 8",Texture09:"Textura 9",Texture10:"Textura 10",SizeOfWall:"Tamaño de la pared",OnlyThisWall:"Solamente esta pared",AllConnectedWalls:"All Connected Walls",AllWallsAboveFoundation:"Todas las paredes sobre la misma base",AllSelectedWalls:"All Selected Walls",AllWalls:"Todo paredes",Windows:"Windows",LockAllUnlockedWindows:"Lock All Unlocked Windows",UnlockAllLockedWindows:"Unlock All Locked Windows",RemoveAllUnlockedWindows:"Remove All Unlocked Windows",DoYouReallyWantToRemoveAllWindowsOnThisWall:"Do you really want to remove all the windows on this wall",Doors:"Doors",LockAllUnlockedDoors:"Lock All Unlocked Doors",UnlockAllLockedDoors:"Unlock All Locked Doors",RemoveAllUnlockedDoors:"Remove All Unlocked Doors",DoYouReallyWantToRemoveAllDoorsOnThisWall:"Do you really want to remove all the doors on this wall",SolarPanels:"Solar Panels",LockAllUnlockedSolarPanels:"Lock All Unlocked Solar Panels",UnlockAllLockedSolarPanels:"Unlock All Locked Solar Panels",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",DoYouReallyWantToRemoveAllSolarPanelsOnThisWall:"Do you really want to remove all the solar panels on this wall",Sensors:"Sensors",LockAllUnlockedSensors:"Lock All Unlocked Sensors",UnlockAllLockedSensors:"Unlock All Locked Sensors",RemoveAllUnlockedSensors:"Remove All Unlocked Sensors",DoYouReallyWantToRemoveAllSensorsOnThisWall:"Do you really want to remove all the sensors on this wall",Lights:"Lights",LockAllUnlockedLights:"Lock All Unlocked Lights",UnlockAllLockedLights:"Unlock All Locked Lights",RemoveAllUnlockedLights:"Remove All Unlocked Lights",DoYouReallyWantToRemoveAllLightsOnThisWall:"Do you really want to remove all the lights on this wall",Polygons:"Polygons",LockAllUnlockedPolygons:"Lock All Unlocked Polygons",UnlockAllLockedPolygons:"Unlock All Locked Polygons",RemoveAllUnlockedPolygons:"Eliminar todos los polígonos",DoYouReallyWantToRemoveAllPolygonsOnThisWall:"Do you really want to remove all the polygons on this wall",WallStructure:"Wall Structure",DefaultStructure:"Default",StudStructure:"Stud",PillarStructure:"Pillar",Opacity:"Opacity",StructureSpacing:"Structure Spacing",StructureWidth:"Structure Width",StructureThickness:"Structure Thickness",StructureColor:"Structure Color",Color:"Wall Color",Height:"Altura",Thickness:"Thickness",Texture:"Texture",AllLightsOnWallInside:"All Lights on Wall Inside",AllLightsOnWallOutside:"All Lights on Wall Outside",Fill:"Fill",Full:"Full",Partial:"Partial",Empty:"Empty",OpenToOutside:"Open to Outside",EavesLength:"Eaves Overhang Length",Parapet:"Parapet",ParapetColor:"Parapet Color",ParapetTexture:"Parapet Texture",ParapetHeight:"Parapet Height",CopingsHeight:"Copings Height",CopingsWidth:"Copings Width"},windowMenu:{OnlyThisWindow:"Only This Window",AllWindowsOnSurface:"All Windows on the Same Surface",AllWindowsAboveFoundation:"All Windows Above the Same Foundation",AllSelectedWindows:"All Selected Windows",AllWindows:"All Windows",Width:"Ancho",Height:"Altura",Setback:"Setback from Exterior Surface",RelativeToWallThickness:"Relative to wall thickness",Mullion:"Mullion",HorizontalMullion:"Horizontal Mullion",VerticalMullion:"Vertical Mullion",MullionWidth:"Mullion Width",HorizontalMullionSpacing:"Horizontal Mullion Spacing",VerticalMullionSpacing:"Vertical Mullion Spacing",MullionColor:"Mullion Color",Tint:"Tint",Opacity:"Opacity",SolarHeatGainCoefficient:"Solar heat gain coefficient (SHGC) = 1 - opacity",Shutter:"Shutter",LeftShutter:"Left Shutter",RightShutter:"Right Shutter",BothShutters:"Both Shutters",ShutterWidth:"Relative Width",ShutterColor:"Shutter Color",Frame:"Frame",FrameWidth:"Frame Width",SillWidth:"Sill Width",Color:"Frame Color",WindowType:"Window Type",Default:"Default",Arched:"Arched",Polygonal:"Polygonal",Interior:"Interior",Empty:"Empty"},roofMenu:{TextureDefault:"Por defecto",Texture01:"Textura 1",Texture02:"Textura 2",Texture03:"Textura 3",Texture04:"Textura 4",Texture05:"Textura 5",Texture06:"Textura 6",Texture07:"Textura 7",OnlyThisRoof:"Only This Wall",AllRoofsAboveFoundation:"All Walls Above the Same Foundation",AllSelectedRoofs:"All Selected Roofs",AllRoofs:"All Roofs",OnlyThisCeiling:"Only This Ceiling",AllCeilingsAboveFoundation:"All Ceilings Above the Same Foundation",AllCeilings:"All Ceilings",EavesOverhangLength:"Eaves Overhang Length",RafterSpacing:"Rafter Spacing",RafterWidth:"Rafter Width",RafterThickness:"Rafter Thickness",RafterColor:"Rafter Color",RoofColor:"Roof Color",RoofSideColor:"Roof Side Color",GlassTint:"Glass Tint",Opacity:"Opacity",RoofStructure:"Roof Structure",DefaultStructure:"Default",RafterStructure:"Rafter",GlassStructure:"Glass",SolarPanels:"Solar Panels",LockAllUnlockedSolarPanels:"Lock All Unlocked Solar Panels",UnlockAllLockedSolarPanels:"Unlock All Locked Solar Panels",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",DoYouReallyWantToRemoveAllSolarPanelsOnThisRoof:"Do you really want to remove all the solar panels on this roof",Windows:"Windows",LockAllUnlockedWindows:"Lock All Unlocked Windows",UnlockAllLockedWindows:"Unlock All Locked Windows",RemoveAllUnlockedWindows:"Remove All Unlocked Windows",DoYouReallyWantToRemoveAllWindowsOnThisRoof:"Do you really want to remove all the windows on this roof",Sensors:"Sensors",LockAllUnlockedSensors:"Lock All Unlocked Sensors",UnlockAllLockedSensors:"Unlock All Locked Sensors",RemoveAllUnlockedSensors:"Remove All Unlocked Sensors",DoYouReallyWantToRemoveAllSensorsOnThisRoof:"Do you really want to remove all the sensors on this roof",Lights:"Lights",RemoveAllUnlockedLights:"Remove All Unlocked Lights",DoYouReallyWantToRemoveAllLightsOnThisRoof:"Do you really want to remove all the lights on this roof",AllLightsOnRoofInside:"All Lights on Roof Inside",AllLightsOnRoofOutside:"All Lights on Roof Outside",Rise:"Rise",Ceiling:"Ceiling",RoofRValue:"Roof R-Value",CeilingRValue:"Ceiling R-Value"},doorMenu:{TextureDefault:"Por defecto",Texture01:"Textura 1",Texture02:"Textura 2",Texture03:"Textura 3",Texture04:"Textura 4",Texture05:"Textura 5",Texture06:"Textura 6",Texture07:"Textura 7",Texture08:"Textura 8",Texture09:"Textura 9",Texture10:"Textura 10",Texture11:"Textura 11",Texture12:"Textura 12",Texture13:"Textura 13",Texture14:"Textura 14",Texture15:"Textura 15",Texture16:"Textura 16",Texture17:"Textura 17",OnlyThisDoor:"Only This Door",AllDoorsOnWall:"All Doors on the Same Wall",AllDoorsAboveFoundation:"All Doors Above the Same Foundation",AllSelectedDoors:"All Selected Doors",AllDoors:"All Doors",DoorType:"Door Type",Default:"Default",Arched:"Arched",Filled:"Filled",FrameColor:"Frame Color",Interior:"Interior"},siteInfoPanel:{High:"Alto",Low:"Bajo"},designInfoPanel:{NumberOfSelectedHeliostats:"Number of selected heliostats",NumberOfSelectedSolarPanels:"Number of selected solar panels",ElectricityGeneratedDailyBySolarPanels:"Electricity generated daily by these solar panels",SceneDiameter:"Scene diameter",BuildingArea:"Building area"},visualizationControlPanel:{ColorContrast:"Color Contrast",FluxScale:"Flux Scale",ClickUpOrDownArrowButtonsToChange:"Click up or down arrow buttons to change"},instructionPanel:{Rotate:"Rotar",DragMouse:"Arrastrar el ratón",Zoom:"Zoom",MouseWheelOrKeys:"Girar el mouse o presionar Ctrl+[ o Ctrl+]",MouseWheelOrKeysMac:"Girar el mouse o presionar ⌘+[ o ⌘+]",Pan:"Panorámica",HoldCtrlDragMouse:"Mantener Ctrl y mover el ratón",HoldMetaDragMouse:"Hold ⌘ and drag mouse",Enter2DMode:"Enter 2D mode",Exit2DMode:"Exit 2D mode",NavigationMode:"Navigation mode",EnableNavigation:"Enable navigation",DisableNavigation:"Disable navigation",MoveForwardBack:"Move forward/back",MoveForwardBackInstruction:"Press W/S",MoveLeftRight:"Move left/right",MoveLeftRightInstruction:"Press A/D",MoveUpDown:"Move up/down",MoveUpDownInstruction:"Press Z/X",Turn:"Turn",TurnInstruction:"Press arrow keys",ResetView:"Reset",AutoRotate:"Auto rotar",StartOrStop:"Presiona F4 para empezar o parar"},mapPanel:{ImageOnGround:"Imagen en el suelo",HideAddress:"Hide Address",WeatherStations:"Weather Stations",WeatherStationsNote:"Turn this off to speed up",Coordinates:"Coordenadas",Zoom:"Zoom"},visibilityPanel:{SolarPanelVisibility:"Solar Panel Visibility",Observer:"Observer",VantagePoint:"Vantage Point",ItemizedVisibilityByFields:"Itemized by Fields",TotalVisibility:"Total"},sensorPanel:{LightSensor:"Sensor de luz",WeatherDataFrom:"Datos metereológicos de"},buildingEnergyPanel:{DailyBuildingEnergy:"Daily Building Energy",YearlyBuildingEnergy:"Yearly Building Energy",Heater:"Heater",AC:"AC",SolarPanel:"Solar Panel",Net:"Net"},solarPanelYieldPanel:{SolarPanelDailyYield:"Rendimiento diario del panel solar",SolarPanelYearlyYield:"Rendimiento anual del panel solar",Yield:"Rendimiento",YieldPerHour:"Rendimiento por hora",DailyTotal:"Total diario",YearlyTotal:"Total anual",ShowOutputsOfIndividualSolarPanels:"Mostrar salidas de paneles solares individuales",Profit:"Profit",TotalCost:"Total Cost",TotalRevenue:"Total Revenue",TotalYield:"Total Yield",MeanYield:"Mean Yield",ModuleCount:"Module Count"},parabolicTroughYieldPanel:{ParabolicTroughDailyYield:"Parabolic Trough Daily Yield",ParabolicTroughYearlyYield:"Parabolic Trough Yearly Yield",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualParabolicTroughs:"Show outputs of individual parabolic troughs"},parabolicDishYieldPanel:{ParabolicDishDailyYield:"Parabolic Dish Daily Yield",ParabolicDishYearlyYield:"Parabolic Dish Yearly Yield",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualParabolicDishes:"Show outputs of individual parabolic dishes"},fresnelReflectorYieldPanel:{FresnelReflectorDailyYield:"Fresnel Reflector Daily Yield",FresnelReflectorYearlyYield:"Fresnel Reflector Yearly Yield",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualFresnelReflectors:"Show outputs of individual Fresnel feflectors"},heliostatYieldPanel:{HeliostatDailyYield:"Heliostat Daily Yield",HeliostatYearlyYield:"Heliostat Yearly Yield",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualHeliostats:"Show outputs of individual heliostats"},updraftTowerYieldPanel:{UpdraftTowerDailyYield:"Solar Updraft Tower Daily Yield",UpdraftTowerYearlyYield:"Solar Updraft Tower Yearly Yield",ChimneyAirTemperature:"Chimney Air Temperature",ChimneyWindSpeed:"Chimney Wind Speed",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualUpdraftTowers:"Show outputs of individual updraft towers"},heliodonPanel:{SunAndTimeSettings:"Sun & Time Settings",SunAngles:"Ángulos",TwentyFourHours:"24 Hours"},cloudFilePanel:{CopyTitle:"Copy Title",TitleCopiedToClipBoard:"The title was copied to the clip board",SearchByTitle:"Search by title",MyLikes:"My Likes",MyCloudFiles:"Mis archivos en la nube",GenerateLink:"Generar enlace",LinkGeneratedInClipBoard:"Se ha generado un enlace en el portapapeles",DoYouReallyWantToDelete:"Estás seguro que quieres eliminar",IfSharedOrPublishedRenamingFileBreaksExistingLinks:"If this file has been shared or published, renaming it breaks existing links"},projectListPanel:{CopyTitle:"Copy Title",TitleCopiedToClipBoard:"The title was copied to the clip board",SearchByTitle:"Search by title",MyProjects:"My Projects",GenerateProjectLink:"Generate Project Link",ProjectLinkGeneratedInClipBoard:"A link to the project was generated in the clip board",DoYouReallyWantToDeleteProject:"Do you really want to delete Project",IfSharedOrPublishedRenamingProjectBreaksExistingLinks:"If this project has been shared or published, renaming it breaks existing links"},projectPanel:{ProjectSettings:"Project Settings",ThumbnailImageSize:"Thumbnail Image Size",ProjectByOtherPeople:"Project by Other People",Project:"Project",ProjectType:"Type",ProjectDescription:"Description",MakeDescriptionEditable:"Make this description editable",MakeDescriptionNonEditable:"Make this description non-editable",DoubleClickToMakeDescriptionEditable:"Double-click to make this description editable",SolarPanelArray:"Solar Panel Array",CurateCurrentDesign:"Curate current design",UpdateSelectedDesign:"Update selected design",RemoveSelectedDesign:"Remove selected design",ClickToFlipSortingOrder:"Click to flip the sorting order",DesignNotShownInSolutionSpaceClickToShow:"This design is not shown in solution space; click to show",DesignShownInSolutionSpaceClickToHide:"This design is shown in solution space; click to hide",SolutionSpace:"Solution Space",ChooseSolutionSpace:"Choose solution space",ChooseDataColoring:"Choose data coloring",SameColorForAllDesigns:"Same color for all designs",OneColorForEachDesign:"One color for each design",SolutionSpaceScreenshot:"Take a screenshot of the solution space",ScatterPlotScreenshot:"Take a screenshot of the scatter plot",SingleClickToSelectDoubleClickToOpen:"Single-click to select, double-click to open.",SingleClickToDeselectDoubleClickToOpen:"Single-click to deselect, double-click to open.",GenerateScatterPlot:"Generate Scatter Plot",SelectXAxis:"Select X Axis",SelectYAxis:"Select Y Axis"},accountSettingsPanel:{MyAccountSettings:"Configuración de mi cuenta",MyID:"My 🆔",ClickToCopyMyID:"Click to copy my ID",IDInClipBoard:"Your ID was copied and is ready to paste.",StoreMyNameInMyFilesWhenSaving:"Store my name in my files when saving",DoYouReallyWantToShowYourNameInYourFiles:"Do you really want to show your display name in your files?",SignFileDisclaimer:"If yes, your display name may be seen by anyone who can access your files.",Likes:"Likes",AllPublished:"All Published",PublishedUnderAliases:"Aliases",UserCount:"User Count",SchoolID:"School ID",ClassID:"Class ID"},weatherPanel:{SunshineHours:"Luz solar"},diurnalTemperaturePanel:{SelectAirTemperatureModel:"Select Air Temperature Model",Sinusoidal:"Sinusoidal"},economicsPanel:{EconomicsParameters:"Economics Parameters",ElectricitySellingPrice:"Electricity Selling Price",OperationalCostPerUnit:"Operational Cost per Unit",SellingPrice:"Selling Price",UnitCost:"Unit Cost"},navigationPanel:{NavigationParameters:"Navigation Parameters",MinimumMoveSpeed:"Minimum Move Speed",MinimumTurnSpeed:"Minimum Turn Speed"},shadowSettingsPanel:{ShadowSettings:"Shadow Settings",ShadowCameraFarDistance:"Shadow Camera Far Distance",ShadowMapSize:"Shadow Map Size",Notes:"Notes",RefreshPageNote:"Refresh the page for the new settings to take effect.",MapSizeWarning:"A large shadow map size may cause Aladdin to crash on some computers."},yearlyLightSensorPanel:{SkyClearness:"Claridad",ShowDaylightResults:"Mostrar resultados de la luz solar",ShowSkyClearnessResults:"Mostrar resultados de claridad del cielo",ShowAverageDailySolarRadiation:"Mostrar la radiación solar diaria promedio"},analysisManager:{NoSensorForCollectingData:"Sin sensor para recopilar datos",NoSolarPanelForAnalysis:"Sin panel solar para el análisis",NoObserverForVisibilityAnalysis:"There is no observer for visibility analysis.",NoSolarWaterHeaterForAnalysis:"There is no solar water heater for analysis.",NoParabolicDishForAnalysis:"There is no parabolic dish for analysis.",NoParabolicTroughForAnalysis:"There is no parabolic trough for analysis.",NoFresnelReflectorForAnalysis:"There is no Fresnel reflector for analysis.",NoHeliostatForAnalysis:"There is no heliostat for analysis.",NoSolarUpdraftTowerForAnalysis:"There is no solar updraft tower for analysis.",NoBuildingForAnalysis:"There is no building for analysis."},toolbar:{CloudFile:"Archivo en la nube",Select:"Seleccionar",AddFoundation:"Añadir base",AddWall:"Añadir pared",AddWindow:"Añadir ventana",AddDoor:"Añadir door",AddPyramidRoof:"Add Pyramid Roof",AddGableRoof:"Add Gable Roof",AddHipRoof:"Add Hip Roof",AddGambrelRoof:"Add Gambrel Roof",AddMansardRoof:"Add Mansard Roof",AddCuboid:"Añadir Cuboid",AddSensor:"Añadir Sensor",AddSolarPanel:"Añadir Panel Solar",AddSolarWaterHeater:"Add Solar Water Heater",AddBatteryStorage:"Add Battery Storage",AddParabolicDish:"Add Parabolic Dish",AddParabolicTrough:"Add Parabolic Trough",AddFresnelReflector:"Add Fresnel Reflector",AddHeliostat:"Add Heliostat",AddWindTurbine:"Add Horizontal Axis Wind Turbine",AddVerticalAxisWindTurbine:"Add Vertical Axis Wind Turbine",AddLight:"Add Light",AddTree:"Añadir árbol",AddFlower:"Add Flower",AddPeople:"Añadir gente",DoubleClickToLockThisModeForNextAction:"Double-click to lock this mode for next action",ClickToUnlockThisModeForNextAction:"Click to unlock this mode for next action",ManipulateGroup:"Manipulate a group",ClearScene:"Clear escena",ShowSunAndTimeSettings:"Show sun and time settings",SpatialAnalysisOfEnergy:"Spatial analysis of energy",DoYouReallyWantToClearContent:"Estás seguro que quieres borrar el contenido",ClickForMoreButtons:"Click for more buttons"},tooltip:{gotoIFI:"Ver Institute for Future Intelligence",visitAladdinHomePage:"Visita la página de Aladdin",clickToOpenMenu:"Haz clic para abrir el menú principal",clickToAccessAccountSettings:"Click to access account settings"},tree:{Apple:"Apple",Birch:"Birch",Coconut:"Coconut",Dogwood:"Cerezo silvestre",Elm:"Olmo",FanPalm:"Fan Palm",Linden:"Tilo",Magnolia:"Magnolia",Maple:"Arce",Oak:"Roble",Pine:"Pino",Spruce:"Spruce"},flower:{Bellflower:"Bellflower",Boxwood:"Boxwood",CactusCombo1:"Cactus Combo 1",CactusCombo2:"Cactus Combo 2",CactusCombo3:"Cactus Combo 3",CactusCombo4:"Cactus Combo 4",Hibiscus:"Hibiscus",Hosta:"Hosta",Hydrangea:"Hydrangea",Peony:"Peony",RedRose:"Red Rose",Spirea:"Spirea",Sunflower:"Sunflower",TallBush:"Tall Bush",Tulip:"Tulip",WhiteFlower:"White Flower",YellowFlower:"Yellow Flower"},people:{Jaah:"Jaah",Jack:"Jack",Jacob:"Jacob",Jacqueline:"Jacqueline",Jade:"Jade",Jamelia:"Jamelia",James:"James",Jane:"Jane",Jaya:"Jaya",Jaye:"Jaye",Jeanette:"Jeanette",Jedi:"Jedi",Jeff:"Jeff",Jena:"Jena",Jennifer:"Jennifer",Jess:"Jess",Jett:"Jett",Jill:"Jill",Jiya:"Jiya",Joan:"Joan",Jocelyn:"Jocelyn",Joel:"Joel",Joey:"Joey",John:"John",Jonathon:"Jonathon",Jose:"Jose",Joseph:"Joseph",Joshua:"Joshua",Judd:"Judd",Judy:"Judy",Julia:"Julia",Julio:"Julio",Jumapili:"Jumapili",June:"June",Juro:"Juro",Justin:"Justin"},compass:{N:"N",S:"S",W:"W",E:"E"},month:{January:"Jan",February:"Feb",March:"Mar",April:"Apr",May:"May",June:"Jun",July:"Jul",August:"Aug",September:"Sep",October:"Oct",November:"Nov",December:"Dec"},modelsMap:{AllTime:"All Time",SearchByPublisher:"Search by publisher",SearchByLabel:"Search by label",MyPublishedModels:"My Published Models",TotalNumberOfUserPublishedModelsInSelectedPeriod:"Total number of user-published models in the selected period",AllTimeTotal:"All-time total",SortFromOldestToNewest:"Sort from oldest to newest",SortFromNewestToOldest:"Sort from newest to oldest",SitesFound:"sites found",ModelsFoundOnThisSite:"models found on this site",ShowModelsPublishedByThisAuthor:"Show the models published by this author"}}},mpt={translation:{name:{IFI:"Yarının Zekası Enstitüsü",Aladdin:"Aladdin",Tagline:"Aladdin: Açıklanabilir Yapay Zeka ile Tasarımı Yeniden Hayal Et — Yarının Zekası Enstitüsü"},cookie:{Statement:"Kabul Ete tıklayarak, iyi bir Aladdin deneyimi için çerez kullanımını kabul etmiş olursunuz.",Accept:"Kabul Et"},aboutUs:{ProductBroughtToYouBy:"Geliştiriciler",TermsOfService:"Hizmet Şartları",PrivacyPolicy:"Gizlilik Politikası",Software:"Yazılım",Content:"İçerik",Research:"Araştırma",Support:"Destek",Acknowledgment:"Onay",FundingInformation:"Ulusal Bilim Vakfı (NSF), #2105695, #2131097, ve #2301164 numaralı fon destekleriyle mevcut ürünün araştırma ve geliştirme çalışmalarına cömert bir mali kaynak sağlamıştır. Bununla birlikte üründe ifade edilen herhangi bir görüş, bulgu ve sonuç veya öneri yazarların kendi görüşleridir. NSF'nin kurumsal görüşlerini yansıtmayabilir.",Contact:"Daha fazla bilgi için lütfen Charles Xie (charles@intofuture.org) ile iletişime geçiniz.",Translators:"Çevirmenler"},word:{BrandName:"Brand Name",Name:"Name",Refresh:"Refresh",LastUpdate:"Last Update",Small:"Small",Medium:"Medium",Large:"Large",Design:"Design",Information:"Information",Type:"Type",Text:"Text",FontSize:"Font Size",FontColor:"Font Color",Model:"Model",Models:"Models",Upload:"Upload",ClickCount:"Click Count",Share:"Share",AlreadyLike:"Already like",Like:"Like",MustLogInToLike:"Must log in to like",AllRightsReserved:"Tüm Hakları Saklıdır.",MeterAbbreviation:"m",VoltAbbreviation:"V",AmpereAbbreviation:"A",WattAbbreviation:"W",Version:"Sürüm",VersionInitial:"S",Options:"Seçenekler",Maximum:"Maximum",Minimum:"Minimum",MaximumNumber:"Maksimum Sayı",MinimumNumber:"Minimum Sayı",MaximumValue:"Maksimum Değer",MinimumValue:"Minimum Değer",Or:"Veya",None:"Hiçbiri",High:"Yüksek",Partial:"Kısmi",Teacher:"Öğretmen",Class:"Sınıf",Total:"Toplam",Leaderboard:"Leaderboard",Latest:"Latest",Range:"Aralık",SIUnit:"SI Unit",USUnit:"US Unit",ThermalTransmittance:"Thermal Transmittance",ThermalResistance:"Thermal Resistance",UValue:"U-Value",RValue:"R-Value",VolumetricHeatCapacity:"Volumetric Heat Capacity",BuildingHVACSystem:"Building HVAC System",ThermostatSetpoint:"Thermostat Setpoint",TemperatureToleranceThreshold:"Tolerance Threshold",TemperatureToleranceThresholdExplanation:`Heater will not run if the lowest outside temperature of the day is higher than the setpoint minus this threshold. -AC will not run if the highest outside temperature of the day is lower than the setpoint plus this threshold.`,Press:"Tıkla",Open:"Aç",Save:"Kaydet",SaveAsImage:"Resim Olarak Kaydet",SaveAsCsv:"Save as CSV",Update:"Güncelle",Paste:"Yapıştır",Copy:"Kopyala",Cut:"Kes",Delete:"Sil",Add:"Add",Lock:"Kilitle",Translucent:"Yarı Saydam",Transparency:"Transparency",Color:"Renk",Pattern:"Pattern",Texture:"Doku",Size:"Boyut",Thickness:"Kalınlık",Yes:"Evet",No:"Hayır",OK:"Tamam",Cancel:"İptal",Apply:"Uygula",Close:"Kapat",ApplyTo:"Uygula",Run:"Çalıştır",Pause:"Duraklat",Resume:"Sürdür",Clear:"Temizle",Warning:"Uyarı",Caution:"Caution",Reminder:"Hatırlatıcı",Length:"Uzunluk",Width:"Genişlik",Height:"Yükseklik",Radius:"Yarıçap",Angle:"Açı",Azimuth:"Azimut",Coordinates:"Koordinatlar",Weather:"Hava Durumu",Show:"Göster",Animate:"Oynat",Date:"Tarih",Time:"Saat",Title:"Başlık",Owner:"Sahibi",Action:"Eylem",Rename:"Yeniden Adlandır",Location:"Konum",Latitude:"Enlem",Month:"Ay",Day:"Gün",Hour:"Saat",Daylight:"Gün Işığı",Radiation:"Işınım",Temperature:"Sıcaklık",kWh:"kWh",dollar:"dollar",MeterPerSecond:"m/s",NorthInitial:"N",SouthInitial:"S",EastInitial:"E",WestInitial:"W",Fixed:"Sabit",Elements:"Öğeler",Energy:"Energy",Unknown:"Unknown",Label:"Label",Description:"Description",NoDescription:"No description",MaximumCharacters:"Maximum characters",Author:"Author",Publisher:"Publisher",Building:"Building",ResidentialBuilding:"Residential Building",CommercialBuilding:"Commercial Building",SchoolBuilding:"School Building",TouristAttraction:"Tourist Attraction",UnderConstruction:"Under Construction",Photovoltaic:"Photovoltaic",WindPower:"Wind Power",ColocationProjects:"Colocation Projects",Anonymous:"Anonymous",Nickname:"Nickname",Pin:"Pin",Unpin:"Unpin"},shared:{NoTexture:"Doku Yok",FoundationElement:"Temel",CuboidElement:"Kübik",PolygonElement:"Poligon",SensorElement:"Sensör",SolarPanelElement:"Güneş Paneli",SolarWaterHeaterElement:"Su Isıtıcı",ParabolicDishElement:"Parabolik Çanak",ParabolicTroughElement:"Parabolik Oluk",FresnelReflectorElement:"Fresnel Reflektör",HeliostatElement:"Heliostat",WindTurbineElement:"Wind Turbine",LightElement:"Light",ElementLocked:"Kilitli",ModelType:"Model Type",OutputBreakdown:"Breakdown",MoreResults:"More Results"},message:{NewVersionAvailable:"A new version is available",CalculationMayBeSlowDoYouWantToContinue:"Calculation may be slow. Do you want to continue?",IncreaseSolarRadiationHeatmapGridCellSizeToSpeedUp:"Increase solar radiation heatmap grid cell size to speed up",ModelNotFound:"Model not found",CannotSignIn:"Oturum açılamıyor",CannotSignOut:"Çıkış yapılamıyor",YourAccountWasCreated:"Hesabınız oluşturuldu",CannotCreateAccount:"Hesap oluşturulamıyor",YourAccountSettingsWereSaved:"Hesap ayarlarınız kaydedildi.",CannotSaveYourAccountSettings:"Hesap ayarlarınız kaydedilemiyor",CannotSaveYourFileToCloud:"Dosyanız buluta kaydedilemiyor",CannotCreateNewProject:"Cannot create a new project",CannotCreateNewProjectWithoutTitle:"Cannot create a new project without a title",CannotOpenYourProjects:"Cannot open your projects",CannotOpenProject:"Cannot open the project",CannotDeleteProject:"Cannot delete the project",CannotRenameProject:"Cannot rename the project",CannotAddDesignToProject:"Cannot add this design to the project",CannotAddDesignToProjectOwnedByOthers:"Cannot add this design to a project owned by others",DesignRemovedFromProject:"The design was successfully removed from the project",CannotRemoveDesignFromProject:"Cannot remove this design from the project",CannotUpdateProject:"Cannot update the project",CannotFetchProjectData:"Cannot fetch project data",TitleUsedChooseDifferentOne:"This title has been used. Choose a different one",CloudFileWithTitleExistsDoYouWantToOverwrite:"A cloud file with the title exists. Do you want to overwrite it?",CloudFileNotFound:"Bulut dosyası bulunamadı",CannotLoadModelsOnMap:"Cannot load models on map",CannotLoadLeaderboard:"Cannot load leaderboard",CannotPublishModelOnMap:"Cannot publish model on map",CannotLikeModelFromMap:"Cannot like model from map",CannotDeleteModelFromMap:"Cannot delete model from map",ModelDeletedFromMap:"Model is deleted from map",DoYouWantToDeleteModelFromMap:"Do you want to delete the model from map?",CannotOpenCloudFile:"Bulut dosyası açılamıyor",CannotReadCloudFile:"Cannot read the cloud file",CannotWriteCloudFile:"Cannot write the cloud file",CloudFileCopied:"Cloud file copied",CannotOpenCloudFolder:"Bulut klasörünüz açılamıyor",CannotDeleteCloudFile:"Bulut dosyası silinemiyor",CannotRenameCloudFile:"Bulut dosyası yeniden adlandırılamıyor",DoYouWantToSaveChanges:"Değişiklikleri kaydetmek istiyor musunuz?",NotApplicableToSelectedAction:"Seçili eyleme uygulanamaz",ThisElementIsLocked:"Bu öğe kilitli.",ThisCannotBeUndone:"Geri alınamaz.",AzimuthOfNorthIsZero:"Kuzey yönünün azimut açısı 0 ° derecedir.",CounterclockwiseAzimuthIsPositive:"Saat yönünün tersi yönde azimut açısı pozitiftir.",SouthFacingIsZero:"South-facing is 0°",ClockwiseRotationIsPositive:"Clockwise is positive",MoveCancelledBecauseOfOverlap:"Çakışma nedeniyle taşıma iptal edildi.",MoveOutsideBoundaryCancelled:"Alan dışına çıkan taşıma iptal edildi.",RotationCancelledBecauseOfOverlap:"Çakışma nedeniyle döndürme iptal edildi.",RotationOutsideBoundaryCancelled:"Alan dışı döndürme iptal edildi.",ResizingCancelledBecauseOfOverlap:"Çakışma nedeniyle yeniden boyutlandırma iptal edildi.",ResizingOutsideBoundaryCancelled:"Alan dışında yeniden boyutlandırma iptal edildi.",CannotPasteOutsideBoundary:"Alanın dışına yapıştırılamaz.",CannotPasteBecauseOfOverlap:"Çakışma nedeniyle yapıştırılamıyor.",CannotMoveObjectTooFar:"Nesne buraya taşınamaz.",ExistingSolarPanelsWillBeRemovedBeforeApplyingNewLayout:"Yeni yerleşim düzeni uygulanmadan önce mevcut güneş panelleri kaldırılacaktır.",DoYouWantToContinue:"Devam etmek istiyor musunuz?",SolarPanelsCannotIntersectWithGround:"Güneş panelleri zeminle kesişemez.",SolarPanelsCannotOverlapWithOneAnother:"Güneş panelleri birbiriyle örtüşemez.",ScreenshotSaved:"Ekran görüntüsü kaydedildi.",CsvFileSaved:"A CSV file was saved.",SimulationStarted:"Simülasyon başladı.",SimulationCompleted:"Simülasyon tamamlandı.",SimulationAborted:"Simülasyon iptal edildi.",SimulationPaused:"Simülasyon duraklatıldı.",CancelSimulation:"Simülasyonu iptal et",PauseSimulation:"Simülasyonu duraklat",ResumeSimulation:"Simülasyonu devam ettir",SimulationWillNotStartDueToErrors:"Simulation will not start due to errors",SimulationWillStartDespiteWarnings:"Simulation will start despite warnings.",EvolutionStarted:"Evrim başladı.",EvolutionCompleted:"Evrim tamamlandı.",EvolutionAborted:"Evrim iptal edildi.",EvolutionPaused:"Evrim duraklatıldı.",EncounterEvolutionError:"Evrim hatasıyla karşılaşıldı.",CancelEvolution:"Evrimi iptal et",PauseEvolution:"Evrimi duraklat",ResumeEvolution:"Evrime devam et",ConvergenceThresholdHasBeenReached:"Yakınsama eşiğine ulaşıldı.",MaximumNumberOfGenerationsHasBeenReached:"Maksimum nesil sayısına ulaşıldı.",MaximumNumberOfStepsHasBeenReached:"Maksimum adım sayısına ulaşıldı.",ObjectiveFunctionTypeError:"Geçerli işlev desteklenmiyor. Lütfen menüden başlatınız.",WallsAreNotAtSameHeight:"Walls are not at same height.",WallsAreNotPerpendicular:"Walls are not perpendicular.",WallsAreNotConnected:"Walls are not connected.",WallsNumberNeedToBeFour:"The number of walls needs to be four.",BuildingContainsEmptyWall:"Building contains one or more empty wall.",BuildingRoofMissing:"Building has a missing roof.",UnknownErrors:"Unknown errors.",SigningOutAnonymousAccount:"Are you sure you want to sign out? This anonymous account will be lost."},menu:{AnalysisOptions:"Analiz Seçenekleri",option:{GridCellSize:"Hücre Boyutu",SamplingFrequency:"Örneklem Frekansı",TimesPerHour:"x 1/saat",DaysPerYear:"Gün Sayısı / Yıl"},mainMenu:"Ana Menü",cloudMenu:"Bulut Menüsü",projectSubMenu:"Project",project:{CreateNewProject:"Create New Project",OpenProject:"Open Project",SaveProject:"Save Project",SaveProjectAs:"Save Project As",YouMustLogInToCreateProject:"You must log in to create a new project",YouMustLogInToOpenProject:"You must log in to open a project"},fileSubMenu:"Dosya",file:{CreateNewFile:"Yeni Dosya Oluştur",OpenLocalFile:"Yerel Dosya Aç",SaveAsLocalFile:"Yerel Dosya Olarak Kaydet",SavingAbortedMustHaveValidFileName:"Kaydetme iptal edildi! Geçerli bir dosya adı kullanınız.",OpenCloudFile:"Bulut Dosyası Aç",SaveCloudFile:"Bulut Dosyasını Kaydet",SaveAsCloudFile:"Bulut Dosyası Olarak Kaydet",SavingAbortedMustHaveValidTitle:"Kaydetme iptal edildi! Dosya adı geçersiz!",ToSaveYourWorkPleaseSignIn:"Çalışmanızı kaydetmek için lütfen oturum açınız.",TakeScreenshot:"Ekran görüntüsü al",UseCloudFileName:"Bulut Dosya Adını Kullan",PublishOnModelsMap:"Publish on Models Map",PublishedOnModelsMap:"Your model has been published on the Models Map",UpdatedOnModelsMap:"Your model has been updated on the Models Map",YouMustLogInToPublishYourModel:"You must log in to publish your model",YouCannotPublishAModelThatYouDoNotOwn:"You cannot publish a model that you do not own",YouMustSaveModelOnCloudBeforePublishingIt:"You must save the model on the cloud before publishing it"},editSubMenu:"Düzen",edit:{Undo:"Geri Al",Redo:"Yinele"},viewSubMenu:"Görünüm",view:{NavigationView:"Navigation View",TwoDimensionalView:"2D",ResetView:"Yenile",ZoomIn:"Yaklaş",ZoomOut:"Uzaklaş",AutoRotate:"Otomatik Döndür",ShowShadow:"Gölge",ShowSurfaceShininess:"Show Surface Shininess",TranslucentFloatingWindows:"Yüzer Pencere",accessoriesSubMenu:"Accessories",accessories:{SiteInformation:"Konum Bilgisi",DesignInformation:"Izgara Hücre Sayısı",Instruction:"Yardım",StickyNote:"Notlar",Note:"Notlar"}},settingsSubMenu:"Settings",settings:{WeatherData:"Hava Durumu",DiurnalTemperature:"Günlük Sıcaklık",Heliodon:"Heliodon",SunAndTime:"Güneş & Zaman",CustomSolarPanels:"Custom Solar Panels",CustomizeSolarPanel:"Customize Solar Panel"},benchmarksSubMenu:"Deneysel",benchmarks:{SolarRadiationPredictionVsMeasurement:"Güneş Işınım Tahmini Vs. Ölçümü ",BESTESTCase600:"Building Energy Simulation Test: BESTEST Case 600",BESTESTCase610:"Building Energy Simulation Test: BESTEST Case 610",BESTESTCase620:"Building Energy Simulation Test: BESTEST Case 620",BESTESTCase630:"Building Energy Simulation Test: BESTEST Case 630"},graph:{LineWidth:"Çizgi Kalınlığı",SymbolSize:"Sembol Boyutu",BarCategoryGap:"Bar Category Gap",ShowHorizontalGridLines:"Yatay Izgara Çizgilerini Göster",ShowVerticalGridLines:"Dikey Izgara Çizgilerini Göster"},analysisSubMenu:"Analiz",physicsSubMenu:"Fizik",physics:{DailySolarRadiationHeatmap:"Günlük Isı Haritası",SolarRadiationHeatmapOptions:"Isı Haritası Seçenekleri",SolarRadiationHeatmapGridCellSize:"Hücre Boyutu",SolarRadiationHeatmapMaxValue:"Işınım Maksimum Değer",SolarRadiationHeatmapNoAnimation:"Animasyon Yok",ReflectionHeatmap:"Yansıma Isı Haritası"},sensorSubMenu:"Sensörler",sensor:{CollectDailyData:"Günlük Veri Topla",CollectYearlyData:"Yıllık Veri Topla",SensorSimulationNoAnimation:"Animasyon Yok"},buildingSubMenu:"Building",building:{AnalyzeDailyBuildingEnergy:"Analyze Daily Building Energy",AnalyzeYearlyBuildingEnergy:"Analyze Yearly Building Energy",EnergyAnalysisOptions:"Energy Analysis Options",EnergyGridCellSize:"Energy Grid Cell Size",BuildingEnergySimulationNoAnimation:"No Animation for Building Energy Simulation"},solarPanelSubMenu:"Güneş Panelleri",solarPanel:{AnalyzeDailyYield:"Günlük Üretim Analizi",AnalyzeYearlyYield:"Yıllık Üretim Analizi",AnalyzeVisibility:"Görünüm Analizi",PanelDiscretization:"Panel Ayrıklaştırma",Exact:"Kesin",Approximate:" Yaklaşık",EnergyGridCellSize:"Hücre Boyutu",VisibilityGridCellSize:"Hücre Boyutu",EnergyAnalysisOptions:"Enerji Analiz Seçenekleri",VisibilityAnalysisOptions:"Görünüm Analiz Seçenekleri",SolarPanelSimulationNoAnimation:"Animasyon Yok"},parabolicTroughSubMenu:"Parabolik Oluk",parabolicTrough:{AnalyzeDailyYield:"Günlük Üretim Analizi",AnalyzeYearlyYield:"Yıllık Üretim Analizi"},parabolicDishSubMenu:"Parabolik Çanak",parabolicDish:{AnalyzeDailyYield:"Günlük Üretim Analizi",AnalyzeYearlyYield:"Yıllık Üretim Analizi"},fresnelReflectorSubMenu:"Fresnel Yansıtıcı",fresnelReflector:{AnalyzeDailyYield:"Günlük Üretim Analizi",AnalyzeYearlyYield:"Yıllık Üretim Analizi"},heliostatSubMenu:"Heliostat",heliostat:{AnalyzeDailyYield:"Günlük Üretim Analizi",AnalyzeYearlyYield:"Yıllık Üretim Analizi"},solarUpdraftTowerSubMenu:"Solar Updraft Kulesi",solarUpdraftTower:{AnalyzeDailyYield:"Günlük Üretim Analizi",AnalyzeYearlyYield:"Yıllık Üretim Analizi",SolarUpdraftTowerSimulationNoAnimation:"Animasyon Yok"},tutorialsSubMenu:"Öğrenme Merkezi",solarEnergyScienceSubMenu:"Güneş Bilimi",solarEnergyScienceTutorials:{SunAngles:"Gözlemciye Göre Güneş Açıları",InsolationAndClimate:"Güneşlenme ve İklim",SolarRadiationToBox:"Kutu Güneş Işınımı"},buildingScienceSubMenu:"Building Science",buildingScienceTutorials:{ThermalEnvelopeVsBuildingEnvelope:"Thermal Envelope vs. Building Envelope",EffectOfSizeOnBuildingEnergy:"Effect of Size on Building Energy",EffectOfOrientationOnBuildingEnergy:"Effect of Orientation on Building Energy",EffectOfInsulationOnBuildingEnergy:"Effect of Insulation on Building Energy",EffectOfRoofColorOnBuildingEnergy:"Effect of Roof Color on Building Energy",EffectOfEavesOverhangLengthOnBuildingEnergy:"Effect of Eaves Overhang Length on Building Energy",EffectOfWindowSHGCOnBuildingEnergy:"Effect of Window Solar Heat Gain on Building Energy",EffectOfThermostatSetpointOnBuildingEnergy:"Effect of Thermostat Setpoint on Building Energy",EffectOfSolarPanelsOnBuildingEnergy:"Effect of Solar Panels on Building Energy",EffectOfGroundTemperatureOnBuildingEnergy:"Effect of Ground Temperature on Building Energy",EffectOfTreesOnBuildingEnergy:"Effect of Trees on Building Energy"},buildingDesignSubMenu:"Bina Tasarımı",buildingDesignTutorials:{CapeCodStyleHouseWithShedDormer:"Çatı Pencereli Cape Cod Evi",MansardRoofWithDormers:"Mansard Roof with Dormers",GableRoofVsHipRoof:"Beşik Çatı vs. Kırma Çatı",ColonialVsSaltbox:"Koloni vs. Tuz Kutusu",GambrelRoofVsMansardRoof:"Flemenk Çatı vs. Mansart Çatı",CombinationRoofVsBonnetRoof:"Combination Roof vs. Bonnet Roof",DutchGableRoof:"Dutch Gable Roof",GableAndValleyRoof:"Gable and Valley Roof",ClerestoryRoof:"Clerestory Roof",MonitorRoof:"Monitor Roof",AFrameHouse:"A-Frame House",HalfTimberedHouse:"Half-Timbered House",AllBasicRoofTypes:"Tüm Çatı Tipleri"},photovoltaicSolarPowerSubMenu:"Fotovoltaik Güneş Enerjisi",photovoltaicSolarPowerTutorials:{EffectOfTiltAngleOfSolarPanel:"Güneş Paneli Eğim Açısı Etkisi",EffectOfAzimuthOfSolarPanel:"Güneş Paneli Azimut Açısı Etkisi",SolarPanelTypes:"Solar Panel Types",DefineYourOwnSolarPanels:"Define Your Own Solar Panels",VerticalBifacialSolarPanels:"Vertical Bifacial Solar Panels",CompareMonofacialAndBifacialSolarPanels:"Monofacial vs. Bifacial Solar Panels",SolarTrackers:"Güneş İzleyiciler",CoveringGroundWithSolarPanels:"Sadece güneş panellerini kullanarak yüzeyi kaplamak neden iyi bir fikir değildir?",InterRowSpacingOfSolarPanelArray:"Güneş Paneli Dizi Arası Boşluk Etkisi",EffectOfOrientationOfSolarPanels:"Güneş Panelleri Yön Etkisi",SolarPanelArrayAutomaticLayout:"Solar Panel Array Automatic Layout"},concentratedSolarPowerSubMenu:"Yoğunlaştırılmış Güneş Enerjisi",concentratedSolarPowerTutorials:{EffectOfAzimuthOfParabolicTrough:"Parabolik Oluk Azimut Açısı Etkisi",EffectOfLatusRectumOfParabolicTrough:"Parabolik Oluk Özkiriş Etkisi",FocusSunlightWithParabolicDish:"Güneş Işığını Parabolik Çanakla Odaklama",LinearFresnelReflectors:"Doğrusal Fresnel Reflektörler",EffectOfAbsorberPipeHeightForLinearFresnelReflectors:"Doğrusal Fresnel Reflektörlerde Soğurucu Boru Yükseklik Etkisi",EffectOfAzimuthOfLinearFresnelReflectors:"Doğrusal Fresnel Reflektörlerde Azimut Açısı Etkisi",LinearFresnelReflectorsWithTwoAbsorbers:"İki Soğuruculu Doğrusal Fresnel Reflektörler",CosineEfficiencyOfHeliostats:"Heliostatların Kosinüs Verimliliği",ShadowingAndBlockingOfHeliostats:"Heliostatlarda Gölgeleme ve Engellenme",EffectSolarPowerTowerHeight:"Güneş Güç Kulesi Yükseklik Etkisi",SolarPowerTower:"Güneş Güç Kulesi"},otherTypesOfSolarPowerSubMenu:"Diğer Güneş Gücü Türleri",otherTypesOfSolarPowerTutorials:{SolarWaterHeaters:"Solar Water Heaters",SolarUpdraftTower:"Solar Updraft Kulesi"},windPowerSubMenu:"Wind Power",windPowerTutorials:{EffectOfBladeNumberOfWindTurbine:"Effect of Blade Number of Wind Turbine",EffectOfPitchAngleOfWindTurbineBlades:"Effect of Pitch Angle of Wind Turbine Blades",BirdSafeBladeDesign:"Bird-Safe Blade Design",OffshoreWindFarm:"Offshore Wind Farm"},colocationSubMenu:"Colocation",colocationTutorials:{AgricultureSolarWindColocation:"Agriculture-Solar-Wind Colocation"},generativeDesignSubMenu:"Generative Design",generativeDesignTutorials:{MonofacialSolarPanelArrayTiltAngle:"The Tilt Angle of a Monofacial Solar Panel Array",BifacialSolarPanelArrayTiltAngle:"The Tilt Angle of a Bifacial Solar Panel Array",OutputOfSolarPanelArrayInDifferentPlaces:"The Output of a Solar Panel Array in Different Places",SimpleSolarFarmParetoFront:"The Pareto Front for Designing a Simple Solar Farm"},examplesSubMenu:"Örnekler",solarEnergySubMenu:"Güneş Enerjisi",solarEnergyExamples:{SunBeamAndHeliodon:"Güneş Işını ve Heliodon",RooftopSolarPanels:"Çatı Üstü Güneş Panelleri",NevadaSolarOneParabolicTroughArray:"Nevada Eyaletinde Parabolik Oluk Dizisi",TooeleParabolicDishArray:"Tooele Şehrinde Parabolik Çanak Dizisi",PS10SolarPowerTower:"PS10 Güneş Güç Kulesi",TucsonLinearFresnelReflectors:"Tucson Şehrinde Doğrusal Fresnel Reflektörleri",SolarCanopyFormFactors:"Solar Gölgelik Biçim Etkileri",SolarCanopyOverBleachers:"Tirübün Üzeri Solar Gölgelik",SolarCanopyOverGarage:"Solar Canopy Over Garage",SolarBusStop:"Solar Otobüs Durağı",SolarFacadeTesla:"Tesla Solar Façade",BuildingIntegratedPhotovoltaics:"Building-Integrated Photovoltaics",Floatovoltaics:"Floatovoltaics",Agrivoltaics:"Agrivoltaics",VegetativeBuffer:"Bitkisel Tampon",RainbowSwashSolarFarmBostonMA:"Rainbow Swash Solar Farm in Boston, MA",MickeyMouseSolarFarmOrlandoFL:"Mickey Mouse Solar Farm in Orlando, FL",SolarPanelsOverCanalBakersfieldCA:"Bakersfield Şehrinde Kanal Üzerindeki Varsayımsal Güneş Panelleri",SolarNoiseBarrierLexingtonMA:"Lexington Kasabasında Varsayımsal Güneş Gürültü Bariyeri",HSATSolarTrackersRaleighNC:"Raleigh Şehrinde Yatay Tek Eksenli İzleyiciler (HSAT)",AADATSolarTrackersLancasterCA:"Lancaster Şehrinde Azimut–İrtifa Çift Eksenli İzleyiciler (AADAT)",SolarUpdraftTowerInCity:"Şehir Solar Updraft Kulesi"},builtEnvironmentSubMenu:"Yapılı Çevre",residentialBuildingsSubMenu:"Konut inşaatları",residentialBuildingExamples:{ColonialHouse:"Colonial House",DutchColonialHouse:"Flemenk Koloni Evi",TShapedHouse:"T-Shaped House",CapeCodHouseWithGarage:"Cape Cod House with Garage",Solarium:"Solaryum",Church1:"Kilise 1",Cathedral1:"Cathedral 1",Cathedral2:"Cathedral 2",Mosque1:"Mosque 1",AdobeTaosHouse:"Adobe Taos House",RanchHouse:"Ranch House",BonnetHouse:"Bonnet House",BarnStyleHouse:"Çiftlik Evi",ModernHouse:"Modern House",ButterflyRoofHouse:"Butterfly Roof House"},commercialBuildingsSubMenu:"Ticari Binalar",commercialBuildingExamples:{WhiteHouse:"White House",HaroldWashingtonCollege:"Harold Washington College",BilimMersinTurkiye:"Yenişehir Belediyesi Bilim ve Sanat Merkezi",SpanishStyleHotel:"Spanish Style Hotel",ApartmentBuilding:"Apartment Building",OfficeBuilding:"Ofis Binası",Hotel:"Hotel"},buildingComplexesSubMenu:"Building Complexes",buildingComplexExamples:{SouthBurlingtonHighSchoolVermont:"Güney Burlington Lisesi",MescaleroApacheSchoolNewMexico:"Mescalero Apache School, NM"},urbanPlanningSubMenu:"Şehir Planlaması",urbanPlanningExamples:{CityBlockHeatmap:"City Block Heatmap",ChicagoSkyline:"Chicago Skyline"},otherBuildingsSubMenu:"Other Buildings",otherBuildingExamples:{Greenhouse:"Sera",Pavilion:"Park Kamelyası",OctagonalPagoda:"Octagonal Pagoda",OceanFront:"Ocean Front",EgyptianPyramids:"Egyptian Pyramids",MayanPyramid:"Mayan Pyramid",SiOSePol:"Si-o-se-pol",StackedCuboids:"Stacked Cuboids"},artificialIntelligenceSubMenu:"Yapay Zeka",artificialIntelligenceExamples:{OptimizingTiltAngleOfOneSolarPanelRow:"Güneş Paneli Sıra Eğim Açısı Optimize Etme",OptimizingTiltAnglesOfMultipleSolarPanelRows:"Çoklu Güneş Paneli Sıra Eğim Açısı Optimize Etme",SolarFarmGenerativeDesign:"Güneş Tarlası Tasarımı",SolarFarmGenerativeDesignWithBlock:"Blok Varlığında Güneş Tarlası Tasarımı",FitchburgSolarFarmGenerativeDesign:"Fitchburg Güneş Tarlası Tasarımı"},languageSubMenu:"Dil",publicSubMenu:"Public",ModelsGallery:"Models Gallery",ModelsMap:"Models Map",AboutUs:"Hakkımızda"},avatarMenu:{AccountSettings:"Hesap Ayarları",PrivacyStatementTitle:"User Privacy Protection Statement",PrivacyStatement:"Oturum açtığınızda, Aladdin hesabınızı oluşturmak ve hesabınıza erişmek için Google Kimliğiniz kullanılır. Veritabanımızda referans olarak yalnızca rastgele bir alfasayısal dize depolanır. Adınız veya e-posta adresiniz gibi kişisel olarak tanımlanabilir hiçbir veri toplanmaz. Daha fazla bilgi için ",SignIn:"Kayıt Ol",SignInAsMe:"Sign in as me",SignInAnonymously:"Sign in anonymously",SignOut:"Oturum Kapat",IfYouAreAStudent:"Eğer Öğrenciyseniz"},skyMenu:{Axes:"Eksenler",Theme:"Tema",ThemeDefault:"Varsayılan",ThemeDesert:"Çöl",ThemeDune:"Dune",ThemeForest:"Orman",ThemeGrassland:"Çayır",ThemeHill:"Hill",ThemeLake:"Lake",ThemeMountain:"Mountain",ThemeRural:"Rural",SunlightAttenuationCoefficientInAir:"Havan Güneş Işığı Zayıflatma Katsayısı",ConvectiveCoefficientOfAir:"Havan Isı İletkenlik Katsayısı",HighestTemperatureTimeInMinutes:"En Yüksek Sıcaklık Süresi (Dakika)",SelectSunAnglesToShow:"Gösterilecek Güneş Açılarını Seçin",ShowAzimuthAngle:"Azimut Açısını Göster",ShowElevationAngle:"Yükselme Açısını Göster",ShowZenithAngle:"Zenit Açısını Göster",DirectLightBrightnessAtNoon:"Direct Light Brightness at Noon",AmbientLightBrightnessAtNoon:"Ambient Light Brightness at Noon"},groundMenu:{MonthlyIrradianceLoss:"Monthly Irradiance Loss",Vegetation:"Vegetation",LeafOutDay:"Leaf-Out Day",LeafOffDay:"Leaf-Off Day",Albedo:"Albedo",ImageOnGround:"Yer Görüntüsü",WaterSurface:"Water Surface",RemoveAllUnlockedTrees:"Tüm Ağaçları Kaldır",RemoveAllUnlockedFlowers:"Remove All Unlocked Flowers",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",RemoveAllUnlockedPeople:"Tüm Kişileri Kaldır",RemoveAllUnlockedFoundations:"Tüm Temelleri Kaldır",RemoveAllUnlockedCuboids:"Tüm Kübikleri Kaldır",DoYouReallyWantToRemoveAllPeople:"Tüm Kişileri Kaldırmak İstiyor Musunuz?",DoYouReallyWantToRemoveAllTrees:"Tüm Ağaçları Kaldırmak İstiyor Musunuz?",DoYouReallyWantToRemoveAllFlowers:"Do you really want to remove all the flowers that are not locked",DoYouReallyWantToRemoveAllSolarPanels:"Do you really want to remove all the solar panels that are not locked",DoYouReallyWantToRemoveAllFoundations:"Tüm Temelleri Kaldırmak İstiyor Musunuz?",DoYouReallyWantToRemoveAllCuboids:"Tüm Kübikleri Kaldırmak İstiyor Musunuz?",LockAllUnlockedElements:"Lock All Unlocked Elements",UnlockAllLockedElements:"Unlock All Locked Elements"},labelSubMenu:{Label:"Etiket",LabelText:"Label Text",LabelHeight:"Label Height",LabelSize:"Label Size",LabelFontSize:"Font Size",LabelColor:"Label Color",KeepShowingLabel:"Etiketi Göstermeye Devam Et"},foundationMenu:{RemoveAllUnlockedSolarPanels:"Tüm Kilitlenmemiş Güneş Panellerini Kaldır",RemoveAllUnlockedParabolicTroughs:"Tüm Kilitlenmemiş Parabolik Olukları Kaldır",RemoveAllUnlockedParabolicDishes:"Tüm Kilitlenmemiş Parabolik Çanakları Kaldır",RemoveAllUnlockedFresnelReflectors:"Tüm Kilitlenmemiş Fresnel Reflektörleri Kaldır",RemoveAllUnlockedHeliostats:"Tüm Kilitlenmemiş Heliostatları Kaldır",RemoveAllUnlockedWindTurbines:"Remove All Unlocked Wind Turbines",RemoveAllUnlockedSensors:"Tüm Kilitlenmemiş Sensörleri Kaldır",RemoveAllUnlockedLights:"Remove All Unlocked Lights",RemoveAllUnlockedWalls:"Tüm Kilitlenmemiş Duvarları Kaldır",RemoveAllUnlockedWindows:"Remove All Unlocked Windows",RemoveAllUnlockedDoors:"Remove All Unlocked Doors",RemoveAllUnlockedPolygons:"Tüm Kilitlenmemiş Çokgenleri Kaldır",RemoveAllUnlockedHumans:"Tüm Kilitlenmemiş İnsanları Kaldır",RemoveAllUnlockedTrees:"Tüm Kilitlenmemiş Ağaçları Kaldır",RemoveAllUnlockedFlowers:"Remove All Unlocked Flowers",Racks:"Çerçeveler",Texture01:"Doku 1",Texture02:"Doku 2",Texture03:"Doku 3",Texture04:"Doku 4",Texture05:"Doku 5",Texture06:"Doku 6",Texture07:"Doku 7",Texture08:"Doku 8",Texture09:"Doku 9",Texture10:"Doku 10",SolarPanels:"Güneş Panelleri",SolarPanelArray:"Solar Panel Array",DoYouReallyWantToRemoveAllSolarPanelsOnFoundation:" Seçili temel üzerindeki tüm güneş panellerini kaldırmak istiyor musunuz?",ParabolicTroughs:"Parabolik Oluklar",DoYouReallyWantToRemoveAllParabolicTroughsOnFoundation:" Seçili temel üzerinde kilitli olmayan tüm parabolik olukları kaldırmak istiyor musunuz?",ParabolicDishes:"Parabolik Çanaklar",DoYouReallyWantToRemoveAllParabolicDishesOnFoundation:" Seçili temel üzerinde kilitli olmayan tüm parabolik çanakları kaldırmak istiyor musunuz?",FresnelReflectors:"Fresnel Reflektörler",DoYouReallyWantToRemoveAllFresnelReflectorsOnFoundation:" Seçili temel üzerinde kilitli olmayan tüm Fresnel reflektörlerini kaldırmak istiyor musunuz?",Heliostats:"Heliostatlar",DoYouReallyWantToRemoveAllHeliostatsOnFoundation:" Seçili temel üzerinde kilitli olmayan tüm heliostatları kaldırmak istiyor musunuz?",WindTurbines:"Wind Turbines",DoYouReallyWantToRemoveAllWindTurbinesOnFoundation:"Do you really want to remove all the wind turbines on this foundation that are not locked",Sensors:"Sensörler",DoYouReallyWantToRemoveAllSensorsOnFoundation:" Seçili temel üzerinde kilitli olmayan tüm sensörleri kaldırmak istiyor musunuz?",Lights:"Lights",DoYouReallyWantToRemoveAllLightsOnFoundation:"Do you really want to remove all the lights on this foundation that are not locked",Walls:"Duvarlar",DoYouReallyWantToRemoveAllWallsOnFoundation:" Seçili temel üzerinde kilitli olmayan tüm duvarları kaldırmak istiyor musunuz? ",Windows:"Windows",DoYouReallyWantToRemoveAllWindowsOnFoundation:"Do you really want to remove all the windows on this foundation that are not locked",Doors:"Doors",DoYouReallyWantToRemoveAllDoorsOnFoundation:"Do you really want to remove all the doors on this foundation that are not locked",Polygons:"Poligonlar",DoYouReallyWantToRemoveAllPolygonsOnFoundation:" Seçili temel üzerinde kilitli olmayan tüm poligonları kaldırmak istiyor musunuz?",Humans:"Kişiler",DoYouReallyWantToRemoveAllHumansOnFoundation:" Seçili temel üzerinde kilitli olmayan tüm insanları kaldırmak istiyor musunuz?",Trees:"Ağaçlar",DoYouReallyWantToRemoveAllTreesOnFoundation:" Seçili temel üzerinde kilitli olmayan tüm ağaçları kaldırmak istiyor musunuz?",Flowers:"Flowers",DoYouReallyWantToRemoveAllFlowersOnFoundation:"Do you really want to remove all the flowers on this foundation that are not locked",OnlyThisFoundation:"Sadece Seçili Temel",AllConnectedFoundations:"Tüm Bağlantılı Temeller",AllSelectedFoundations:"All Selected Foundations",AllFoundations:"Tüm Temeller",AddPolygon:"Poligon Ekle",SolarStructure:"Solar Yapı Seçin",GroupMaster:"Grup Yöneticisi",LockAllUnlockedElementsOnThisFoundation:"Lock All Unlocked Elements on This Foundation",UnlockAllLockedElementsOnThisFoundation:"Unlock All Locked Elements on This Foundation",GroundFloorRValue:"Ground Floor R-Value",OnlyThisGroundFloor:"Only This Ground Floor",AllGroundFloors:"All Ground Floors"},solarPowerTowerMenu:{ReceiverTowerForHeliostats:"Heliostat Alıcı Kulesi",ReceiverTowerPhysicalProperties:"Alıcı Kule Fiziksel Özellikler",ReceiverTowerHeight:"Alıcı Kule Yükseklik",ReceiverTowerRadius:"Alıcı Kule Yarıçap",ReceiverAbsorptance:"Alıcı Absorbsiyon",ReceiverOpticalEfficiency:"Alıcı Optik Verim",ReceiverThermalEfficiency:"Alıcı Termal Verim"},solarAbsorberPipeMenu:{AbsorberPipeForFresnelReflectors:"Fresnel Reflektör Soğurucu Boru",AbsorberPipePhysicalProperties:"Soğurucu Boru Fiziksel Özellikler",AbsorberHeight:"Soğurucu Boru Yükseklik",AbsorberApertureWidth:"Soğurucu boru diyafram genişliği",AbsorberPipePoleNumber:"Soğurucu Boru Sayısı",AbsorberAbsorptance:"Soğurucu Absorbsiyonu",AbsorberOpticalEfficiency:"Soğurucu Optik Verimlilik",AbsorberThermalEfficiency:"Soğurucu Isıl Verimlilik"},solarUpdraftTowerMenu:{SolarUpdraftTower:"Solar Updraft Kulesi",SolarUpdraftTowerPhysicalProperties:"Solar Updraft Kulesi Fiziksel Özellikler",SolarUpdraftTowerChimneyHeight:"Solar Updraft Kulesi Baca Yüksekliği",SolarUpdraftTowerChimneyRadius:"Solar Updraft Kulesi Baca Yarıçapı",SolarUpdraftTowerCollectorHeight:"Solar Updraft Kulesi Collector Height",SolarUpdraftTowerCollectorRadius:"Solar Updraft Kulesi Kollektör Yarıçapı",SolarUpdraftTowerCollectorTransmissivity:"Solar Updraft Kulesi Kollektör Geçirgenliği",SolarUpdraftTowerCollectorEmissivity:"Solar Updraft Kulesi Kollektör Emisivite",SolarUpdraftTowerDischargeCoefficient:"Solar Updraft Kulesi Deşarj Katsayısı",SolarUpdraftTowerTurbineEfficiency:"Solar Updraft Kulesi Türbin Verimliliği"},cuboidMenu:{Texture01:"Doku 1",Texture02:"Doku 2",Texture03:"Doku 3",Texture04:"Doku 4",Texture05:"Doku 5",Texture06:"Doku 6",Texture07:"Doku 7",Texture08:"Doku 8",Texture09:"Doku 9",Texture10:"Doku 10",RemoveAllUnlockedSolarPanels:"Tüm Kilitlenmemiş Güneş Panellerini Kaldır",RemoveAllUnlockedSensors:"Tüm Kilitlenmemiş Sensörleri Kaldır",RemoveAllUnlockedPolygons:"Tüm Kilitlenmemiş Poligonları Kaldır",RemoveAllUnlockedHumans:"Tüm Kilitlenmemiş Kişileri Kaldır",RemoveAllUnlockedTrees:"Tüm Kilitlenmemiş Ağaçları Kaldır",RemoveAllUnlockedFlowers:"Remove All Unlocked Flowers",RemoveAllUnlockedLights:"Remove All Unlocked Lights",Racks:"Çerçeveler",Lights:"Lights",DoYouReallyWantToRemoveAllLightsOnCuboid:"Do you really want to remove all the lights on this cuboid that are not locked",SolarPanels:"Güneş Panelleri",DoYouReallyWantToRemoveAllSolarPanelsOnCuboid:" Seçili kübik üzerinde kilitlenmemiş tüm güneş panellerini kaldırmak istiyor musunuz?",Sensors:"Sensörler",DoYouReallyWantToRemoveAllSensorsOnCuboid:" Seçili kübik üzerinde kilitlenmemiş tüm sensörleri kaldırmak istiyor musunuz?",Polygons:"Poligonlar",DoYouReallyWantToRemoveAllPolygonsOnCuboid:" Seçili kübik üzerinde kilitlenmemiş tüm poligonları kaldırmak istiyor musunuz?",Humans:"İnsanlar",DoYouReallyWantToRemoveAllHumansOnCuboid:" Seçili kübik üzerinde kilitlenmemiş tüm insanları kaldırmak istiyor musunuz?",Trees:"Ağaçlar",DoYouReallyWantToRemoveAllTreesOnCuboid:" Seçili kübik üzerinde kilitlenmemiş tüm ağaçları kaldırmak istiyor musunuz?",Flowers:"Flowers",DoYouReallyWantToRemoveAllFlowersOnCuboid:"Do you really want to remove all the flowers on this cuboid that are not locked",OnlyThisCuboid:"Sadece Seçili Kübik",AllCuboidsOnSameSurface:"All Cuboids on Same Surface",AllCuboidsAboveSameBase:"All Cuboids above Same Base",AllSelectedCuboids:"All Selected Cuboids",AllCuboids:"Tüm Kübikler",OnlyThisSide:"Sadece Seçili Yüzey",AllSidesOfThisCuboid:"Seçili Kübik Tüm Yüzeyler",AllSidesOfSelectedCuboids:"All Sides of Selected Cuboids",AllSidesOfAllCuboids:"Bütün Kübik Yüzeyleri ",AddPolygon:"Poligon Ekle",Stackable:"Stackable",GroupMaster:"Group Master"},polygonMenu:{Texture01:"Doku 1",Texture02:"Doku 2",Texture03:"Doku 3",Texture04:"Doku 4",Texture05:"Doku 5",Texture06:"Doku 6",Texture07:"Doku 7",Texture08:"Doku 8",Texture09:"Doku 9",Texture10:"Doku 10",TextBox:"Text Box",FontOutlineColor:"Font Outline Color",FontOutlineWidth:"Font Outline Width",FontStrokeColor:"Font Stroke Color",FontStrokeWidth:"Font Stroke Width",NoOutline:"No Outline",Shiny:"Shiny",Filled:"Dolgu",FillTexture:"Dolgu Dokusu",FillColor:"Dolgu Rengi",Opacity:"Opaklık",LineColor:"Çizgi Rengi",LineWidth:"Çizgi Kalınlığı",LineStyle:"Çizgi Stili",SolidLine:"Düz çizgi",DashedLine:"Kesik çizgi",DottedLine:"Noktalı çizgi",InsertVertexBeforeIndex:"İndeksten Önce Tepe Noktası Ekle",InsertVertexAfterIndex:"İndeksten Sonra Tepe Noktası Ekle",DeleteVertex:"Tepe Noktası Sil",OnlyThisPolygon:"Sadece Seçili Poligon",AllPolygonsOnSurface:"Tüm Poligonlar Aynı Yüzeyde",AllPolygonsAboveFoundation:"Temel Üzerindeki Tüm Poligonlar",AllSelectedPolygons:"All Selected Polygons",AllPolygons:"Tüm Poligonlar",Layout:"Düzen",SolarPanelArrayLayout:"Güneş Paneli Dizi Düzeni",SolarPanelArrayLayoutParametricDesign:"Güneş Paneli Dizi Düzeni: Parametrik Tasarım",SolarPanelArrayLayoutGenerativeDesign:"Güneş Paneli Dizi Düzeni: Üretici Tasarım",SolarPanelArrayModel:"Güneş Paneli Modeli",SolarPanelArrayOrientation:"Oryantasyon",SolarPanelArrayTiltAngle:"Eğim Açısı",SolarPanelArrayRowWidth:"Dizi Sıra Genişliği",SolarPanelArrayInterRowSpacing:"Dizi Sıra Arası Boşluk",SolarPanelArrayRowSpacing:"Row Spacing",SolarPanelArrayRowAxis:"Dizi Sıra Ekseni",SolarPanelArrayLeftRightRowAxis:"Left-Right (Relative)",SolarPanelArrayUpDownRowAxis:"Up-Down (Relative)",SolarPanelArrayEastWestRowAxis:"Doğu-Batı (Absolute)",SolarPanelArrayNorthSouthRowAxis:"Kuzey-Güney (Absolute)",SolarPanelArrayMargin:"Margin",SolarPanelArrayPoleHeight:"Direk Yükseklik",SolarPanelArrayPoleSpacing:"Direk Aralık",SolarPanelArrayTotalYearlyCost:"Total Cost",SolarPanelArrayTotalYearlyRevenue:"Total Revenue",SolarPanelArrayTotalYearlyYield:"Total Yield",SolarPanelArrayMeanYearlyYield:"Mean Yield",SolarPanelArrayYearlyProfit:"Profit",LayoutNotAcceptedCheckYourParameters:"Bu yerleşim düzeni uygulanamaz. Lütfen parametrelerinizi kontrol edin."},optimizationMenu:{Optimization:"Optimizasyon",Parameters:"Parametreler",Variables:"Değişkenler",Constants:"Sabitler",GeneticAlgorithm:"Genetik Algoritma",GeneticAlgorithmSettings:"Genetik Algoritma Ayarı",ParticleSwarmOptimization:"Parçacık Sürü Optimizasyon",ParticleSwarmOptimizationSettings:"Parçacık Sürü Optimizasyon Ayarı",SolarPanelTiltAngleOptimization:"Güneş Paneli Eğim Açısı Optimizasyonu",SolarPanelArrayLayout:"Güneş Paneli Dizi Düzeni",Generation:"Nesil",Gene:"Gen",NormalizedVariables:"Normalleştirilmiş Değişkenler",Objective:"Amaç",ObjectiveFunctionDailyTotalYield:"Günlük Toplam Üretim",ObjectiveFunctionYearlyTotalYield:"Yıllık Toplam Üretim",ObjectiveFunctionDailyMeanYield:"Günlük Ortalama Üretim",ObjectiveFunctionYearlyMeanYield:"Yıllık Ortalama Üretim",ObjectiveFunctionDailyProfit:"Günlük Kazanç",ObjectiveFunctionYearlyProfit:"Yıllık Kazanç",GeneticAlgorithmSelectionMethod:"Genetik Algoritma Seçim Yöntemi",RouletteWheel:"Rulet Çarkı",Tournament:"Turnuva",SearchMethod:"Arama Yöntemi",GlobalSearchUniformSelection:"Küresel Arama Standart Seçim",LocalSearchRandomOptimization:"Yerel Arama Rastgele Optimizasyon",PopulationSize:"Popülasyon Boyutu",MaximumGenerations:"Maksimum Nesil",SelectionRate:"Seçim Oranı",CrossoverRate:"Geçiş Oranı",MutationRate:"Mutasyon Oranı",Step:"Adım",SwarmSize:"Sürü Boyutu",MaximumSteps:"Maksimum Adım",MaximumVelocity:"Maksimum Hız",InertiaWeight:"Atalet Ağırlığı",CognitiveCoefficient:"Bilişsel Katsayı",SocialCoefficient:"Sosyal Katsayı",ConvergenceThreshold:"Sonlandırma için Yakınsama Eşiği",LocalSearchRadius:"Yerel Arama Yarıçapı",RowsPerRackRange:"Raf Başına Sıra Aralığı",TiltAngleRange:"Eğim Açısı Aralığı",InterRowSpacingRange:"Sıra Arası Aralık Ranjı",ClickTargetPolygonToActivate:"Etkinleştirmek için Hedef Poligona Tıklayınız",ClickTargetFoundationToActivate:"Etkinleştirmek için Hedef Temele Tıklayınız"},treeMenu:{ShowModel:"Modeli Göster",Flip:"Flip",Type:"Tür",Spread:"Yayılım"},flowerMenu:{Flip:"Flip",Type:"Type",Spread:"Spread"},peopleMenu:{ChangePerson:"Kişi Değiştir",Flip:"Flip",Observer:"Gözlemci",ViewFromThisPerson:" Seçili Kişiye Göre Perspektif"},lightMenu:{Color:"Color",Intensity:"Intensity",Decay:"Decay",MaximumDistance:"Distance",Inside:"Inside"},solarCollectorMenu:{Coordinates:"Coordinates",RelativeXCoordinateOfCenter:"Relative X Coordinate of Center",RelativeYCoordinateOfCenter:"Relative Y Coordinate of Center",RelativeAzimuth:"Göreceli Azimut Açısı",Pole:"Pole",PoleHeight:"Direk Yüksekliği",PoleRadius:"Pole Radius",ExtraPoleHeight:"Ekstra Direk Yüksekliği",ExtraPoleHeightInAdditionToHalfWidth:"Yarım Genişliğe Ek Ekstra Direk Yüksekliği",DrawSunBeam:"Güneş Işını Çiz"},concentratedSolarPowerCollectorMenu:{ReflectorReflectance:"Reflektör Yansıma",ReceiverAbsorptance:"Alıcı Absorbsiyonu",ReflectorOpticalEfficiency:"Reflektör Optik Verimliliği",ReceiverThermalEfficiency:"Alıcı Termal Verimliliği"},solarPanelMenu:{ElectricalProperties:"Electrical Properties",InverterEfficiency:"Inverter Efficiency",InverterEfficiencyExplained:"The efficiency for converting direct current (DC) to alternating current (AC).",DcToAcSizeRatio:"DC-to-AC Size Ratio",DcToAcSizeRatioExplained:"The ratio of the solar panels' DC-rated size to the inverter's AC-rated size.",ChangePvModel:"PV Modelini Değiştir",Orientation:"Oryantasyon",Portrait:"Portre",Landscape:"Peyzaj",FrameColor:"Frame Color",Panels:"Paneller",PanelsWide:"Panel Genişliği",PanelsLong:"Panel Uzunluğu",TiltAngle:"Eğim Açısı",SouthFacingIsPositive:"Güney yönünde açı pozitiftir.",Tracker:"İzleyici",SolarTrackerFollowsSun:"Güneş paneli verimini artırmak için bir güneş izleme sistemi güneşi sürekli takip eder.",PoleSpacing:"Direk Aralığı",NoTracker:"İzleme Sistemi Yok",HorizontalSingleAxisTracker:"Yatay Tek Eksenli İzleme Sistemi",VerticalSingleAxisTracker:"Dikey Tek Eksenli İzleme Sistemi",AltazimuthDualAxisTracker:"Altazimut Çift Eksenli İzleme Sistemi",OnlyThisSolarPanel:"Sadece Seçili Güneş Paneli",AllSolarPanelsOnSurface:"Tüm Güneş Panelleri Aynı Yüzeyde",AllSolarPanelsAboveFoundation:"Tüm Güneş Panelleri Aynı Temel Üzerinde",AllSelectedSolarPanels:"All Selected Solar Panels",AllSolarPanels:"Tüm Güneş Panelleri"},solarWaterHeaterMenu:{OnlyThisSolarWaterHeater:"Only This Solar Water Heater",AllSolarWaterHeatersOnSurface:"All Solar Water Heaters on the Same Surface",AllSolarWaterHeatersAboveFoundation:"All Solar Water Heaters Above the Same Foundation",AllSelectedSolarWaterHeaters:"All Selected Solar Water Heaters",AllSolarWaterHeaters:"All Solar Water Heaters"},pvModelPanel:{SolarPanelSpecs:"Güneş Paneli Özellikleri",General:"General",Electrical:"Electrical",CellCountInXDirection:"Cell Count in X Direction",CellCountInYDirection:"Cell Count in Y Direction",Weight:"Weight",Kilogram:"kg",RatedVoltage:"Rated Voltage",RatedCurrent:"Rated Current",OpenCircuitVoltage:"Open-Circuit Voltage",ShortCircuitCurrent:"Short-Circuit Current",MaximumRatedPower:"Maximum Rated Power",Model:"Model",PanelSize:"Panel Boyutu",Cells:"Hücreler",CellType:"Hücre Tipi",Monocrystalline:"Monokristal",Polycrystalline:"Polikristal",ThinFilm:"İnce Katman",Bifacial:"Bifacial",BifacialityFactor:"Bifaciality Factor",Black:"Siyah",Blue:"Mavi",ShadeTolerance:"Gölge Toleransı",SolarCellEfficiency:"Güneş Pili Verimliliği",NominalOperatingCellTemperature:"Nominal Çalışma Hücresi Sıcaklığı",TemperatureCoefficientOfPmax:"Pmax Sıcaklık Katsayısı",AddedCustomSolarPanels:"Added",DisplayThisCustomSolarPanel:"Display this custom solar panel",ExportThisCustomSolarPanel:"Export this custom solar panel",ImportCustomSolarPanelFromClipboard:"Import custom solar panel from clipboard",CustomSolarPanelExportedToClipboard:"Custom solar panel exported to Clipboard",DoYouReallyWantToRemoveThisCustomSolarPanel:"Do you really want to remove this custom solar panel",MakeSureThisCustomSolarPanelIsNotUsed:"Make sure this custom solar panel is not used in the current model",ThisCustomSolarPanelIsUsed:"This custom solar panel is used in the current model",DoYouReallyWantToImportCustomSolarPanel:"Do you really want to import a custom solar panel",ExistingSettingsWillBeOverwritten:"The existing settings will be overwritten",CannotAddCustomSolarPanel:"Cannot add custom solar panel",CustomSolarPanelMustHaveModelName:"A custom solar panel must have a model name",CustomSolarPanelExists:"A custom solar panel with this name already exists",FailInImportingDataFromClipboard:"Failed in importing data from the clipboard"},parabolicTroughMenu:{ModuleLength:"Modül Uzunluğu",Modules:"Modüller",ModulesLong:"Modüllerin Uzunluğu",LatusRectum:"Özkiriş",OnlyThisParabolicTrough:"Sadece Seçili Parabolik Oluk",AllParabolicTroughsAboveFoundation:"Aynı Temelin Üzerindeki Tüm Parabolik Oluklar",AllSelectedParabolicTroughs:"All Selected Parabolic Troughs",AllParabolicTroughs:"Tüm Parabolik Oluklar"},fresnelReflectorMenu:{AbsorberPipe:"Soğurucu Boru",SelectAbsorberToReflectSunlightTo:"Güneş Işığı Yansıtılacak Soğurucuyu Seçin",ModuleLength:"Modül Uzunluğu",Modules:"Modüller",ModulesLong:"Modüllerin Uzunluğu",OnlyThisFresnelReflector:"Sadece Seçili Fresnel Reflektör",AllFresnelReflectorsAboveFoundation:"Aynı Temel Üzerindeki Tüm Fresnel Reflektörler",AllSelectedFresnelReflectors:"All Selected Fresnel Reflectors",AllFresnelReflectors:"Tüm Fresnel Reflektörler"},heliostatMenu:{Tower:"Kule",SelectTowerToReflectSunlightTo:"Güneş Işığı Yansıtılacak Kuleyi Seçin",OnlyThisHeliostat:"Sadece Seçili Heliostat",AllHeliostatsAboveFoundation:"Aynı Temel Üzerindeki Tüm Heliostatlar",AllSelectedHeliostats:"All Selected Heliostats",AllHeliostats:"Tüm Heliostatlar"},parabolicDishMenu:{ReceiverStructure:"Alıcı Yapısı",CentralPole:"Merkez Direk",CentralPoleWithTripod:"Tripodlu Merkez Direk",Quadrupod:"Dört Ayaklı",RimDiameter:"Kasnak Çapı",LatusRectum:"Özkiriş",ExtraPoleHeightInAdditionToRadius:"Yarıçapa Ek Olarak Ekstra Direk Yüksekliği",OnlyThisParabolicDish:"Sadece Seçili Parabolik Çanak",AllParabolicDishesAboveFoundation:"Aynı Temel Üzerindeki Tüm Parabolik Çanaklar",AllSelectedParabolicDishes:"All Selected Parabolic Dishes",AllParabolicDishes:"Tüm Parabolik Çanaklar"},windTurbineMenu:{BirdSafeDesign:"Bird-Safe Design",BirdSafeNone:"None",BirdSafeBicolor:"Bicolor",BirdSafeStriped:"Striped",Rotor:"Rotor",BladeNumber:"Blade Number",RotorInitialAngle:"Rotor Initial Angle",RotorBladeDesign:"Rotor Blade Design",RotorBladeRadius:"Rotor Blade Radius",RotorBladePitchAngle:"Rotor Blade Pitch Angle",RelativeYawAngle:"Relative Yaw Angle",MaximumChordLength:"Maximum Chord Length",Tower:"Tower",TowerHeight:"Tower Height",TowerRadius:"Tower Radius",HubDesign:"Hub Design",HubRadius:"Hub Radius",HubLength:"Hub Length",OnlyThisWindTurbine:"Only This Wind Turbine",AllWindTurbinesAboveFoundation:"All Wind Turbines Above the Same Foundation",AllSelectedWindTurbines:"All Selected Wind Turbines",AllWindTurbines:"All Wind Turbines"},wallMenu:{TextureDefault:"Varsayılan",Texture01:"Doku 1",Texture02:"Doku 2",Texture03:"Doku 3",Texture04:"Doku 4",Texture05:"Doku 5",Texture06:"Doku 6",Texture07:"Doku 7",Texture08:"Doku 8",Texture09:"Doku 9",Texture10:"Doku 10",SizeOfWall:"Duvar Boyutu",OnlyThisWall:"Sadece Seçili Duvar",AllConnectedWalls:"All Connected Walls",AllWallsAboveFoundation:" Aynı Temel Üzerindeki Tüm Duvarlar",AllSelectedWalls:"All Selected Walls",AllWalls:"Tüm Duvarlar",Windows:"Pencereler",LockAllUnlockedWindows:"Lock All Unlocked Windows",UnlockAllLockedWindows:"Unlock All Locked Windows",RemoveAllUnlockedWindows:"Kilitlenmemiş Tüm Pencereleri Kaldır",DoYouReallyWantToRemoveAllWindowsOnThisWall:" Seçili duvardaki tüm pencereleri kaldırmak istiyor musunuz?",Doors:"Kapılar",LockAllUnlockedDoors:"Lock All Unlocked Doors",UnlockAllLockedDoors:"Unlock All Locked Doors",RemoveAllUnlockedDoors:"Tüm Kilitlenmemiş Kapıları Kaldır",DoYouReallyWantToRemoveAllDoorsOnThisWall:" Seçili duvardaki tüm kapıları kaldırmak istiyor musun?",SolarPanels:"Güneş Panelleri",LockAllUnlockedSolarPanels:"Lock All Unlocked Solar Panels",UnlockAllLockedSolarPanels:"Unlock All Locked Solar Panels",RemoveAllUnlockedSolarPanels:"Kilitlenmemiş Tüm Güneş Panellerini Kaldır",DoYouReallyWantToRemoveAllSolarPanelsOnThisWall:" Seçili duvardaki tüm güneş panellerini kaldırmak istiyor musunuz?",Sensors:"Sensors",LockAllUnlockedSensors:"Lock All Unlocked Sensors",UnlockAllLockedSensors:"Unlock All Locked Sensors",RemoveAllUnlockedSensors:"Remove All Unlocked Sensors",DoYouReallyWantToRemoveAllSensorsOnThisWall:"Do you really want to remove all the sensors on this wall",Lights:"Lights",LockAllUnlockedLights:"Lock All Unlocked Lights",UnlockAllLockedLights:"Unlock All Locked Lights",RemoveAllUnlockedLights:"Remove All Unlocked Lights",DoYouReallyWantToRemoveAllLightsOnThisWall:"Do you really want to remove all the lights on this wall",Polygons:"Polygons",LockAllUnlockedPolygons:"Lock All Unlocked Polygons",UnlockAllLockedPolygons:"Unlock All Locked Polygons",RemoveAllUnlockedPolygons:"Tüm Kilitlenmemiş Poligonları Kaldır",DoYouReallyWantToRemoveAllPolygonsOnThisWall:"Do you really want to remove all the polygons on this wall",WallStructure:"Duvar Yapısı",DefaultStructure:"Varsayılan",StudStructure:"Ahşap Dikme",PillarStructure:"Pillar",Opacity:"Opaklık",StructureSpacing:"Structure Spacing",StructureWidth:"Structure Width",StructureThickness:"Structure Thickness",StructureColor:"Structure Color",Color:"Wall Color",Height:"Height",Thickness:"Thickness",Texture:"Texture",AllLightsOnWallInside:"All Lights on Wall Inside",AllLightsOnWallOutside:"All Lights on Wall Outside",Fill:"Fill",Full:"Full",Partial:"Partial",Empty:"Empty",OpenToOutside:"Open to Outside",EavesLength:"Eaves Overhang Length",Parapet:"Parapet",ParapetColor:"Parapet Color",ParapetTexture:"Parapet Texture",ParapetHeight:"Parapet Height",CopingsHeight:"Copings Height",CopingsWidth:"Copings Width"},windowMenu:{OnlyThisWindow:"Sadece Bu Pencere",AllWindowsOnSurface:"All Windows on the Same Surface",AllWindowsAboveFoundation:"Aynı Temelin Üzerindeki Tüm Pencereler",AllSelectedWindows:"All Selected Windows",AllWindows:"Tüm Pencereler",Width:"Genişlik",Height:"Yükseklik",Setback:"Setback from Exterior Surface",RelativeToWallThickness:"Relative to wall thickness",Mullion:"Tiriz",HorizontalMullion:"Horizontal Mullion",VerticalMullion:"Vertical Mullion",MullionWidth:"Tiriz Genişliği",HorizontalMullionSpacing:"Horizontal Mullion Spacing",VerticalMullionSpacing:"Vertical Mullion Spacing",MullionColor:"Mullion Color",Tint:"Ton",Opacity:"Opaklık",SolarHeatGainCoefficient:"Solar heat gain coefficient (SHGC) = 1 - opacity",Shutter:"Kepenk",LeftShutter:"Sol Kepenk",RightShutter:"Sağ Kepenk",BothShutters:"Kepenkler",ShutterWidth:"Genişlik",ShutterColor:"Kepenk Rengi",Frame:"Frame",FrameWidth:"Frame Width",SillWidth:"Sill Width",Color:"Frame Color",WindowType:"Window Type",Default:"Default",Arched:"Arched",Polygonal:"Polygonal",Interior:"Interior",Empty:"Empty"},roofMenu:{TextureDefault:"Varsayılan",Texture01:"Doku 1",Texture02:"Doku 2",Texture03:"Doku 3",Texture04:"Doku 4",Texture05:"Doku 5",Texture06:"Doku 6",Texture07:"Doku 7",OnlyThisRoof:"Sadece Seçili Çatı",AllRoofsAboveFoundation:"Aynı Temelin Üzerinde Tüm Çatılar",AllSelectedRoofs:"All Selected Roofs",AllRoofs:"Tüm Çatılar",OnlyThisCeiling:"Only This Ceiling",AllCeilingsAboveFoundation:"All Ceilings Above the Same Foundation",AllCeilings:"All Ceilings",EavesOverhangLength:"Eaves Overhang Length",RafterSpacing:"Mertek Aralığı",RafterWidth:"Mertek Genişliği",RafterThickness:"Mertek Kalınlığı",RafterColor:"Mertek Rengi",RoofColor:"Çatı Rengi",RoofSideColor:"Roof Side Color",GlassTint:"Cam Tonu",Opacity:"Opaklık",RoofStructure:"Çatı Yapısı",DefaultStructure:"Varsayılan",RafterStructure:"Mertek",GlassStructure:"Cam",SolarPanels:"Solar Panels",LockAllUnlockedSolarPanels:"Lock All Unlocked Solar Panels",UnlockAllLockedSolarPanels:"Unlock All Locked Solar Panels",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",DoYouReallyWantToRemoveAllSolarPanelsOnThisRoof:"Do you really want to remove all the solar panels on this roof",Windows:"Windows",LockAllUnlockedWindows:"Lock All Unlocked Windows",UnlockAllLockedWindows:"Unlock All Locked Windows",RemoveAllUnlockedWindows:"Remove All Unlocked Windows",DoYouReallyWantToRemoveAllWindowsOnThisRoof:"Do you really want to remove all the windows on this roof",Sensors:"Sensors",LockAllUnlockedSensors:"Lock All Unlocked Sensors",UnlockAllLockedSensors:"Unlock All Locked Sensors",RemoveAllUnlockedSensors:"Remove All Unlocked Sensors",DoYouReallyWantToRemoveAllSensorsOnThisRoof:"Do you really want to remove all the sensors on this roof",Lights:"Lights",RemoveAllUnlockedLights:"Remove All Unlocked Lights",DoYouReallyWantToRemoveAllLightsOnThisRoof:"Do you really want to remove all the lights on this roof",AllLightsOnRoofInside:"All Lights on Roof Inside",AllLightsOnRoofOutside:"All Lights on Roof Outside",Rise:"Rise",Ceiling:"Ceiling",RoofRValue:"Roof R-Value",CeilingRValue:"Ceiling R-Value"},doorMenu:{TextureDefault:"Varsayılan",Texture01:"Doku 1",Texture02:"Doku 2",Texture03:"Doku 3",Texture04:"Doku 4",Texture05:"Doku 5",Texture06:"Doku 6",Texture07:"Doku 7",Texture08:"Doku 8",Texture09:"Doku 9",Texture10:"Doku 10",Texture11:"Doku 11",Texture12:"Doku 12",Texture13:"Doku 13",Texture14:"Doku 14",Texture15:"Doku 15",Texture16:"Doku 16",Texture17:"Doku 17",OnlyThisDoor:"Sadece Seçili Kapı",AllDoorsOnWall:"Aynı Duvardaki Tüm Kapılar",AllDoorsAboveFoundation:"Aynı Temelin Üstündeki Tüm Kapılar",AllSelectedDoors:"All Selected Doors",AllDoors:"Tüm Kapılar",DoorType:"Door Type",Default:"Default",Arched:"Arched",Filled:"Filled",FrameColor:"Frame Color",Interior:"Interior"},siteInfoPanel:{High:"Yüksek",Low:"Düşük"},designInfoPanel:{NumberOfSelectedHeliostats:"Seçilen heliostat sayısı",NumberOfSelectedSolarPanels:"Seçilen güneş paneli sayısı",ElectricityGeneratedDailyBySolarPanels:"Güneş panellerinin günlük elektrik üretimi",SceneDiameter:"Scene diameter",BuildingArea:"Building area"},visualizationControlPanel:{ColorContrast:"Renk Kontrastı",FluxScale:"Flux Scale",ClickUpOrDownArrowButtonsToChange:"Değiştirmek için yukarı veya aşağı ok butonlarına tıklayınız"},instructionPanel:{Rotate:"Döndürme",DragMouse:"Sol Tık + Sürükle",Zoom:"Yakınlaştırma",MouseWheelOrKeys:"Tekerlek veya Ctrl+[ veya Ctrl+]",MouseWheelOrKeysMac:"Tekerlek veya ⌘+[ veya ⌘+]",Pan:"Ekran Kaydırma",HoldCtrlDragMouse:"Ctrl + Sürükle",HoldMetaDragMouse:"Hold ⌘ and drag mouse",Enter2DMode:"Enter 2D mode",Exit2DMode:"Exit 2D mode",NavigationMode:"Navigation mode",EnableNavigation:"Enable navigation",DisableNavigation:"Disable navigation",MoveForwardBack:"Move forward/back",MoveForwardBackInstruction:"Press W/S",MoveLeftRight:"Move left/right",MoveLeftRightInstruction:"Press A/D",MoveUpDown:"Move up/down",MoveUpDownInstruction:"Press Z/X",Turn:"Turn",TurnInstruction:"Press arrow keys",ResetView:"Yeniden Başlat",AutoRotate:"Otomatik Döndürme",StartOrStop:"Başlat veya Durdur (F4)"},mapPanel:{ImageOnGround:"Yüzey Görünümü",HideAddress:"Hide Address",WeatherStations:"Referans",WeatherStationsNote:"Turn this off to speed up",Coordinates:"Koordinatlar",Zoom:"Büyüt"},visibilityPanel:{SolarPanelVisibility:"Güneş Paneli Görünüm",Observer:"Gözlemci",VantagePoint:"Referans Noktası",ItemizedVisibilityByFields:"Alana Özel Perspektif",TotalVisibility:"Toplam"},sensorPanel:{LightSensor:"Işık Sensörü",WeatherDataFrom:"Hava Durumu"},buildingEnergyPanel:{DailyBuildingEnergy:"Daily Building Energy",YearlyBuildingEnergy:"Yearly Building Energy",Heater:"Heater",AC:"AC",SolarPanel:"Solar Panel",Net:"Net"},solarPanelYieldPanel:{SolarPanelDailyYield:"Güneş Paneli Günlük Üretim",SolarPanelYearlyYield:"Güneş Paneli Yıllık Üretim",Yield:"Üretim",YieldPerHour:"Saatlik Üretim",DailyTotal:"Günlük Toplam",YearlyTotal:"Yıllık Toplam",ShowOutputsOfIndividualSolarPanels:"Herbir güneş panelinin üretimini göster",Profit:"Kazanç",TotalCost:"Total Cost",TotalRevenue:"Total Revenue",TotalYield:"Total Yield",MeanYield:"Mean Yield",ModuleCount:"Module Count"},parabolicTroughYieldPanel:{ParabolicTroughDailyYield:"Parabolik Oluk Günlük Üretim",ParabolicTroughYearlyYield:"Parabolik Oluk Yıllık Üretim",Yield:"Üretim",YieldPerHour:"Saatlik Üretim",DailyTotal:"Günlük Toplam",YearlyTotal:"Yıllık Toplam",ShowOutputsOfIndividualParabolicTroughs:"Herbir parabolik oluğun üretimini göster"},parabolicDishYieldPanel:{ParabolicDishDailyYield:"Parabolik Çanak Günlük Üretim",ParabolicDishYearlyYield:"Parabolik Çanak Yıllık Üretim",Yield:"Üretim",YieldPerHour:"Saatlik Üretim",DailyTotal:"Günlük Toplam",YearlyTotal:"Yıllık Toplam",ShowOutputsOfIndividualParabolicDishes:"Herbir parabolik çanağın üretimini göster"},fresnelReflectorYieldPanel:{FresnelReflectorDailyYield:"Fresnel Reflektör Günlük Üretim",FresnelReflectorYearlyYield:"Fresnel Reflektör Yıllık Üretim",Yield:"Üretim",YieldPerHour:"Saatlik Üretim",DailyTotal:"Günlük Toplam",YearlyTotal:"Yıllık Toplam",ShowOutputsOfIndividualFresnelReflectors:"Herbir Fresnel yansıtıcısının üretimini göster"},heliostatYieldPanel:{HeliostatDailyYield:"Heliostat Günlük Üretim",HeliostatYearlyYield:"Heliostat Yıllık Üretim",Yield:"Üretim",YieldPerHour:"Saatlik Üretim",DailyTotal:"Günlük Toplam",YearlyTotal:"Yıllık Toplam",ShowOutputsOfIndividualHeliostats:"Herbir heliostatın üretimini göster"},updraftTowerYieldPanel:{UpdraftTowerDailyYield:"Solar Updraft Kulesi Günlük Üretimi",UpdraftTowerYearlyYield:"Solar Updraft Kulesi Yıllık Üretimi",ChimneyAirTemperature:"Baca Hava Sıcaklığı",ChimneyWindSpeed:"Baca Rüzgar Hızı",Yield:"Üretim",YieldPerHour:"Saatlik Üretim",DailyTotal:"Günlük Toplam",YearlyTotal:"Yıllık Toplam",ShowOutputsOfIndividualUpdraftTowers:"Herbir updraft kulesinin üretimini göster"},heliodonPanel:{SunAndTimeSettings:"Güneş & Saat Ayarları",SunAngles:"Açılar",TwentyFourHours:"24 Hours"},cloudFilePanel:{CopyTitle:"Copy Title",TitleCopiedToClipBoard:"The title was copied to the clip board",SearchByTitle:"Search by title",MyLikes:"My Likes",MyCloudFiles:"Bulut Dosyalarım",GenerateLink:"Link Oluştur",LinkGeneratedInClipBoard:"Klip Panosunda Oluşturulan Link",DoYouReallyWantToDelete:"Gerçekten silmek istiyor musun?",IfSharedOrPublishedRenamingFileBreaksExistingLinks:"If this file has been shared or published, renaming it breaks existing links"},projectListPanel:{CopyTitle:"Copy Title",TitleCopiedToClipBoard:"The title was copied to the clip board",SearchByTitle:"Search by title",MyProjects:"My Projects",GenerateProjectLink:"Generate Project Link",ProjectLinkGeneratedInClipBoard:"A link to the project was generated in the clip board",DoYouReallyWantToDeleteProject:"Do you really want to delete Project",IfSharedOrPublishedRenamingProjectBreaksExistingLinks:"If this project has been shared or published, renaming it breaks existing links"},projectPanel:{ProjectSettings:"Project Settings",ThumbnailImageSize:"Thumbnail Image Size",ProjectByOtherPeople:"Project by Other People",Project:"Project",ProjectType:"Type",ProjectDescription:"Description",MakeDescriptionEditable:"Make this description editable",MakeDescriptionNonEditable:"Make this description non-editable",DoubleClickToMakeDescriptionEditable:"Double-click to make this description editable",SolarPanelArray:"Solar Panel Array",CurateCurrentDesign:"Curate current design",UpdateSelectedDesign:"Update selected design",RemoveSelectedDesign:"Remove selected design",ClickToFlipSortingOrder:"Click to flip the sorting order",DesignNotShownInSolutionSpaceClickToShow:"This design is not shown in solution space; click to show",DesignShownInSolutionSpaceClickToHide:"This design is shown in solution space; click to hide",SolutionSpace:"Solution Space",ChooseSolutionSpace:"Choose solution space",ChooseDataColoring:"Choose data coloring",SameColorForAllDesigns:"Same color for all designs",OneColorForEachDesign:"One color for each design",SolutionSpaceScreenshot:"Take a screenshot of the solution space",ScatterPlotScreenshot:"Take a screenshot of the scatter plot",SingleClickToSelectDoubleClickToOpen:"Single-click to select, double-click to open.",SingleClickToDeselectDoubleClickToOpen:"Single-click to deselect, double-click to open.",GenerateScatterPlot:"Generate Scatter Plot",SelectXAxis:"Select X Axis",SelectYAxis:"Select Y Axis"},accountSettingsPanel:{MyAccountSettings:"Hesap Ayarlarım",MyID:"Bilgilerim",ClickToCopyMyID:"Bilgilerinizi kopyalamak için tıklayın",IDInClipBoard:"Kişisel bilgileriniz kopyalandı ve yapıştırmaya hazır.",StoreMyNameInMyFilesWhenSaving:"Kaydederken, adımı dosyalarıma ekle",DoYouReallyWantToShowYourNameInYourFiles:"Dosyalarınızda isminizin gösterilmesini istiyor musunuz?",SignFileDisclaimer:"Evet ise, isiminiz dosyalarınıza erişimi olan bütün kişiler tarafından görülebilir.",Likes:"Likes",AllPublished:"All Published",PublishedUnderAliases:"Aliases",UserCount:"Kullanıcı Sayısı",SchoolID:"Okul",ClassID:"Sınıf"},weatherPanel:{SunshineHours:"Gündüz Saatleri"},diurnalTemperaturePanel:{SelectAirTemperatureModel:"Model Seç",Sinusoidal:"Sinüzoidal"},economicsPanel:{EconomicsParameters:"Ekonomik Parametreler",ElectricitySellingPrice:"Elektrik Satış Fiyatı",OperationalCostPerUnit:"Birim Başına İşletme Maliyeti",SellingPrice:"Selling Price",UnitCost:"Unit Cost"},navigationPanel:{NavigationParameters:"Navigation Parameters",MinimumMoveSpeed:"Minimum Move Speed",MinimumTurnSpeed:"Minimum Turn Speed"},shadowSettingsPanel:{ShadowSettings:"Shadow Settings",ShadowCameraFarDistance:"Shadow Camera Far Distance",ShadowMapSize:"Shadow Map Size",Notes:"Notes",RefreshPageNote:"Refresh the page for the new settings to take effect.",MapSizeWarning:"A large shadow map size may cause Aladdin to crash on some computers."},yearlyLightSensorPanel:{SkyClearness:"Gökyüzü Açıklığı",ShowDaylightResults:"Gün Işığı Sonuçlarını Göster",ShowSkyClearnessResults:"Gökyüzü Açıklığı Sonuçlarını Göster",ShowAverageDailySolarRadiation:"Günlük ortalama güneş Işınımını göster"},analysisManager:{NoSensorForCollectingData:"Veri toplamak için sensör yok.",NoSolarPanelForAnalysis:"Analiz için güneş paneli yok.",NoObserverForVisibilityAnalysis:"Görünürlük analizi için gözlemci yok.",NoSolarWaterHeaterForAnalysis:"Analiz için su ısıtıcısı yok",NoParabolicDishForAnalysis:"Analiz için parabolik çanak yok",NoParabolicTroughForAnalysis:"Analiz için parabolik oluk yok.",NoFresnelReflectorForAnalysis:"Analiz için Fresnel reflektörü yok.",NoHeliostatForAnalysis:"Analiz için heliostat yok.",NoSolarUpdraftTowerForAnalysis:"Analiz için Solar Updraft Kulesi yok.",NoBuildingForAnalysis:"There is no building for analysis."},toolbar:{CloudFile:"Bulut Dosyası",Select:"Seç",AddFoundation:"Temel Ekle",AddWall:"Duvar Ekle",AddWindow:"Pencere Ekle",AddDoor:"Kapı Ekle",AddPyramidRoof:"Piramit Çatı Ekle",AddGableRoof:"Beşik Çatı Ekle",AddHipRoof:"Kırma Çatı Ekle",AddGambrelRoof:"Flemenk Çatı Ekle",AddMansardRoof:"Mansart Çatı Ekle",AddCuboid:"Kübik Ekle",AddSensor:"Sensör Ekle",AddSolarPanel:"Güneş Paneli Ekle",AddSolarWaterHeater:"Su Isıtıcı Ekle",AddBatteryStorage:"Add Battery Storage",AddParabolicDish:"Parabolik Çanak Ekle",AddParabolicTrough:"Parabolik Oluk Ekle",AddFresnelReflector:"Fresnel Reflektörü Ekle",AddHeliostat:"Heliostat Ekle",AddWindTurbine:"Add Horizontal Axis Wind Turbine",AddVerticalAxisWindTurbine:"Add Vertical Axis Wind Turbine",AddLight:"Add Light",AddTree:"Ağaç Ekle",AddFlower:"Add Flower",AddPeople:"İnsan Ekle",DoubleClickToLockThisModeForNextAction:"Double-click to lock this mode for next action",ClickToUnlockThisModeForNextAction:"Click to unlock this mode for next action",ManipulateGroup:"Ölçeklendirme",ClearScene:"Herşeyi Sil",ShowSunAndTimeSettings:"Güneş & Zaman Ayarlarını Göster",SpatialAnalysisOfEnergy:"Spatial analysis of energy",DoYouReallyWantToClearContent:"İçeriği silmek istiyor musunuz",ClickForMoreButtons:"Daha fazla buton için tıklayın"},tooltip:{gotoIFI:"Yarının Zekası Enstitüsüne Git",visitAladdinHomePage:"Aladdin Ana Sayfasını Ziyaret Edin",clickToOpenMenu:"Ana Menüyü Açmak İçin Tıklayınız",clickToAccessAccountSettings:"Click to access account settings"},tree:{Apple:"Apple",Birch:"Birch",Coconut:"Coconut",Dogwood:"Kızılcık Ağacı",Elm:"Karaağaç",FanPalm:"Fan Palm",Linden:"Ihlamur Ağacı",Magnolia:"Magnolia",Maple:"Akçaağaç",Oak:"Meşe Ağacı",Pine:"Çam",Spruce:"Alaçam"},flower:{Bellflower:"Bellflower",Boxwood:"Boxwood",CactusCombo1:"Cactus Combo 1",CactusCombo2:"Cactus Combo 2",CactusCombo3:"Cactus Combo 3",CactusCombo4:"Cactus Combo 4",Hibiscus:"Hibiscus",Hosta:"Hosta",Hydrangea:"Hydrangea",Peony:"Peony",RedRose:"Red Rose",Spirea:"Spirea",Sunflower:"Sunflower",TallBush:"Tall Bush",Tulip:"Tulip",WhiteFlower:"White Flower",YellowFlower:"Yellow Flower"},people:{Jaah:"Ata",Jack:"Mete",Jacob:"Jacob",Jacqueline:"Beril",Jade:"Ece",Jamelia:"Bilge",James:"James",Jane:"Jane",Jaya:"Asya",Jaye:"Aylin",Jeanette:"Jeanette",Jedi:"Alp",Jeff:"Kaya",Jena:"Nehir",Jennifer:"Defne",Jess:"Zeynep",Jett:"Umut",Jill:"Jill",Jiya:"Elif",Joan:"Ezgi",Jocelyn:"Jocelyn",Joel:"Cenk",Joey:"Azra",John:"Can",Jonathon:"Jonathon",Jose:"Mert",Joseph:"Joseph",Joshua:"Joshua",Judd:"Ozan",Judy:"Judy",Julia:"Julia",Julio:"Bulut",Jumapili:"Umay",June:"Naz",Juro:"Efe",Justin:"Justin"},compass:{N:"N",S:"S",W:"W",E:"E"},month:{January:"Jan",February:"Feb",March:"Mar",April:"Apr",May:"May",June:"Jun",July:"Jul",August:"Aug",September:"Sep",October:"Oct",November:"Nov",December:"Dec"},modelsMap:{AllTime:"All Time",SearchByPublisher:"Search by publisher",SearchByLabel:"Search by label",MyPublishedModels:"My Published Models",TotalNumberOfUserPublishedModelsInSelectedPeriod:"Total number of user-published models in the selected period",AllTimeTotal:"All-time total",SortFromOldestToNewest:"Sort from oldest to newest",SortFromNewestToOldest:"Sort from newest to oldest",SitesFound:"sites found",ModelsFoundOnThisSite:"models found on this site",ShowModelsPublishedByThisAuthor:"Show the models published by this author"}}},ypt={translation:{name:{IFI:"Інститут Інтелекту Майбутнього",Aladdin:"Aladdin",Tagline:"Aladdin: Переосмислення Дизайну з Пояснювальним Штучним Інтелектом - Інститут Інтелекту Майбутнього"},cookie:{Statement:"Натиснувши «Прийняти», ви погоджуєтеся з використанням файлів cookie для покращення вашого досвіду з Aladdin.",Accept:"Прийняти"},aboutUs:{ProductBroughtToYouBy:"Цей Продукт Було Створено:",TermsOfService:"Умови Використання",PrivacyPolicy:"Політика Конфіденційності",Software:"Програмне Забезпечення",Content:"Матеріали",Research:"Дослідження",Support:"Підтримка",Acknowledgment:"Подяка",FundingInformation:"Національний Науковий Фонд (ННФ, Cполучені Штати Америки) надав фінансову підтримку для дослідження та розробки цього продукту за допомогою грантів №2105695, №2131097, та №#2301164. Однак, будь-які погляди, результати та висновки, висловлені у продукті, належать авторам і можуть не повністю відображати погляди ННФ.",Contact:"Для отримання додаткової інформації, будь ласка, зверніться до Charles Xie (charles@intofuture.org).",Translators:"Переклад"},word:{BrandName:"Brand Name",Name:"Name",Refresh:"Refresh",LastUpdate:"Last Update",Small:"Small",Medium:"Medium",Large:"Large",Design:"Design",Information:"Information",Type:"Type",Text:"Текст",FontSize:"Розмір Шрифту",FontColor:"Колір Шрифту",Model:" Модель",Models:"Моделі",Upload:"Завантажити",ClickCount:"Натисніть Підрахувати",Share:"Поділитись",AlreadyLike:"Вподобано",Like:"Вподобати",MustLogInToLike:"Потрібно Увійти, щоб Вподобати",AllRightsReserved:"Усі Права Захищено",MeterAbbreviation:"м",VoltAbbreviation:"V",AmpereAbbreviation:"A",WattAbbreviation:"W",Version:"Версія",VersionInitial:"В",Options:"Опції",Maximum:"Максимум",Minimum:"Мінімум",MaximumNumber:"Максимальне Число",MinimumNumber:"Мінімальне Число",MaximumValue:"Максимальне Значення",MinimumValue:"Мінімальне Значення",Or:"Або",None:"Жоден",High:"Високий",Partial:"Частковий",Teacher:"Вчитель",Class:"Клас",Total:"Всього",Leaderboard:"Таблиця Лідерів",Latest:"Останнє",Range:"Діапазон",SIUnit:"SI Одиниця",USUnit:"US Одиниця",ThermalTransmittance:"Теплопередача",ThermalResistance:"Термічний Опір",UValue:"U-Значення",RValue:"R-Значення",VolumetricHeatCapacity:"Об'ємна Теплоємність",BuildingHVACSystem:"Побудова Системи Опалення, Вентиляції та Кондиціювання Повітря (ОВК)",ThermostatSetpoint:"Задана Температура Термостата",TemperatureToleranceThreshold:"Порогове Значення Допустимого Відхилення Температури",TemperatureToleranceThresholdExplanation:"Обігрівач не працюватиме, якщо найнижча зовнішня температура дня вища за значення отриманe, якщо від заданої температури відняти порогове значення. Кондиціонер не працюватиме, якщо найвища зовнішня температура дня нижча за значення отримане, якщо від заданої температури відняти порогове значення.",Press:"Натисніть",Open:"Відкрити",Save:"Зберегти",SaveAsImage:"Зберегти як Зображення",SaveAsCsv:"Зберегти як CSV",Update:"Оновити",Paste:"Вставити",Copy:"Копіювати",Cut:"Вирізати",Delete:"Видалити",Add:"Add",Lock:"Заблокувати",Translucent:"Півпрозорий",Transparency:"Transparency",Color:"Колір",Pattern:"Pattern",Texture:"Текстура",Size:"Розмір",Thickness:"Товщина",Yes:"Так",No:"Ні",OK:"ОК",Cancel:"Скасувати",Apply:"Застосувати",Close:"Закрити",ApplyTo:"Застосувати До",Run:"Запустити",Pause:"Пауза",Resume:"Відновити",Clear:"Очистити",Warning:"Попередження",Caution:"Обережно",Reminder:"Нагадування",Length:"Довжина",Width:"Ширина",Height:"Висота",Radius:"Радіус",Angle:"Кут",Azimuth:"Азимут",Coordinates:"Координати",Weather:"Погода",Show:"Показати",Animate:"Анімувати",Date:"Дата",Time:"Час",Title:"Заголовок",Owner:"Власник",Action:"Дія",Rename:"Перейменувати",Location:"Місцезнаходження",Latitude:"Широта",Month:"Місяць",Day:"День",Hour:"Година",Daylight:"Денне світло",Radiation:"Радіаційне Випромінювання",Temperature:"Температура",kWh:"кВт-год",dollar:"долар",MeterPerSecond:"м/с",NorthInitial:"Північ",SouthInitial:"Південь",EastInitial:"Схід",WestInitial:"Захід",Fixed:"Фіксований",Elements:"Елементи",Energy:"Енергія",Unknown:"Невідомо",Label:"Мітка",Description:"Опис",NoDescription:"Без опису",MaximumCharacters:"Максимальна кількість символів",Author:"Автор",Publisher:"Видавець",Building:"Будівля",ResidentialBuilding:"Житлова будівля",CommercialBuilding:"Комерційна будівля",SchoolBuilding:"Шкільна будівля",TouristAttraction:"Туристична визначна пам'ятка",UnderConstruction:"В стадії будівництва",Photovoltaic:"Фотоелектричний",WindPower:"Wind Power",ColocationProjects:"Colocation Projects",Anonymous:"Анонімний",Nickname:"Нікнейм",Pin:"Закріпити",Unpin:"Відкріпити"},shared:{NoTexture:"Без текстури",FoundationElement:"Фундамент",CuboidElement:"Паралелепіпед",PolygonElement:"Багатокутник",SensorElement:"Сенсор",SolarPanelElement:"Сонячна панель",SolarWaterHeaterElement:"Водонагрівач",ParabolicDishElement:"Параболічна тарілка",ParabolicTroughElement:"Параболічний сонячний колектор",FresnelReflectorElement:"Відбивач Френеля",HeliostatElement:"Геліостат",WindTurbineElement:"Вітрова турбіна",LightElement:"Світло",ElementLocked:"Заблоковано",ModelType:"Тип моделі",OutputBreakdown:"Breakdown",MoreResults:"More Results"},message:{NewVersionAvailable:"A new version is available",CalculationMayBeSlowDoYouWantToContinue:"Calculation may be slow. Do you want to continue?",IncreaseSolarRadiationHeatmapGridCellSizeToSpeedUp:"Increase solar radiation heatmap grid cell size to speed up",ModelNotFound:"Модель не знайдено",CannotSignIn:"Не вдається увійти",CannotSignOut:"Не вдається вийти",YourAccountWasCreated:"Ваш обліковий запис був створений",CannotCreateAccount:"Не вдається створити обліковий запис",YourAccountSettingsWereSaved:"Налаштування облікового запису були збережені",CannotSaveYourAccountSettings:"Не вдається зберегти налаштування облікового запису",CannotSaveYourFileToCloud:"Не вдається зберегти ваш файл у хмарному середовищі",CannotCreateNewProject:"Не вдається створити новий проєкт",CannotCreateNewProjectWithoutTitle:"Cannot create a new project without a title",CannotOpenYourProjects:"Не вдається відкрити ваші проєкти",CannotOpenProject:"Cannot open the project",CannotDeleteProject:"Cannot delete the project",CannotRenameProject:"Cannot rename the project",CannotAddDesignToProject:"Cannot add this design to the project",CannotAddDesignToProjectOwnedByOthers:"Cannot add this design to a project owned by others",DesignRemovedFromProject:"The design was successfully removed from the project",CannotRemoveDesignFromProject:"Cannot remove this design from the project",CannotUpdateProject:"Cannot update the project",CannotFetchProjectData:"Cannot fetch project data",TitleUsedChooseDifferentOne:"Ця назва була використана. Виберіть іншу",CloudFileWithTitleExistsDoYouWantToOverwrite:"Хмарний файл з такою ж назвою вже існує. Ви хочете перезаписати його?",CloudFileNotFound:"Файл у хмарному середовищі не знайдено",CannotLoadModelsOnMap:"Не вдається завантажити моделі на карту",CannotLoadLeaderboard:"Не вдається завантажити таблицю лідерів",CannotPublishModelOnMap:"Не вдається опублікувати модель на карті",CannotLikeModelFromMap:"Не вдається оцінити модель з карти",CannotDeleteModelFromMap:"Не вдається видалити модель з карти",ModelDeletedFromMap:"Модель видалена з карти",DoYouWantToDeleteModelFromMap:"Ви бажаєте видалити модель з карти?",CannotOpenCloudFile:"Не вдається відкрити файл у хмарному середовищі",CannotReadCloudFile:"Cannot read the cloud file",CannotWriteCloudFile:"Cannot write the cloud file",CloudFileCopied:"Cloud file copied",CannotOpenCloudFolder:"Не вдається відкрити папку у хмарному середовищі",CannotDeleteCloudFile:"Не вдається видалити файл у хмарному середовищі",CannotRenameCloudFile:"Не вдається перейменувати файл у хмарному середовищі",DoYouWantToSaveChanges:"Бажаєте зберегти зміни?",NotApplicableToSelectedAction:"Не застосовується до обраної дії",ThisElementIsLocked:"Цей елемент заблокований.",ThisCannotBeUndone:"Це не можна скасувати.",AzimuthOfNorthIsZero:"Азимут півночі дорівнює 0°",CounterclockwiseAzimuthIsPositive:"Азимут є позитивним проти годинникової стрілки.",SouthFacingIsZero:"South-facing is 0°",ClockwiseRotationIsPositive:"Clockwise is positive",MoveCancelledBecauseOfOverlap:"Переміщення скасовано через перекриття.",MoveOutsideBoundaryCancelled:"Переміщення за межі скасовано.",RotationCancelledBecauseOfOverlap:"Ротацію скасовано через перекриття.",RotationOutsideBoundaryCancelled:"Ротація за межі скасована.",ResizingCancelledBecauseOfOverlap:"Зміна розміру скасована через перекриття.",ResizingOutsideBoundaryCancelled:"Зміна розміру за межі скасована.",CannotPasteOutsideBoundary:"Не можна вставити за межі.",CannotPasteBecauseOfOverlap:"Не можна вставити через перекриття.",CannotMoveObjectTooFar:"Не можна перемістити об'єкт занадто далеко.",ExistingSolarPanelsWillBeRemovedBeforeApplyingNewLayout:"Існуючі сонячні панелі будуть видалені перед застосуванням нового макету.",DoYouWantToContinue:"Бажаєте продовжити?",SolarPanelsCannotIntersectWithGround:"Сонячні панелі не можуть перетинатися з землею.",SolarPanelsCannotOverlapWithOneAnother:"Сонячні панелі не можуть накладатися одна на одну.",ScreenshotSaved:"Знімок екрана збережено.",CsvFileSaved:"CSV файл збережено.",SimulationStarted:"Розпочато симуляцію.",SimulationCompleted:"Симуляцію завершено.",SimulationAborted:"Симуляцію перервано.",SimulationPaused:"Симуляцію призупинено.",CancelSimulation:"Скасувати симуляцію",PauseSimulation:"Призупинити симуляцію",ResumeSimulation:"Продовжити симуляцію",SimulationWillNotStartDueToErrors:"Симуляція не розпочнеться через помилки",SimulationWillStartDespiteWarnings:"Симуляція розпочнеться незважаючи на попередження.",EvolutionStarted:"Еволюцію розпочато.",EvolutionCompleted:"Еволюцію завершено.",EvolutionAborted:"Еволюцію перервано.",EvolutionPaused:"Еволюцію призупинено.",EncounterEvolutionError:"Сталася помилка еволюції.",CancelEvolution:"Скасувати еволюцію",PauseEvolution:"Призупинити еволюцію",ResumeEvolution:"Продовжити еволюцію",ConvergenceThresholdHasBeenReached:"Досягнуто порогове значення збіжності.",MaximumNumberOfGenerationsHasBeenReached:"Досягнуто максимальну кількість поколінь.",MaximumNumberOfStepsHasBeenReached:"Досягнуто максимальну кількість кроків.",ObjectiveFunctionTypeError:"Поточна цільова функція не підтримується цією операцією. Будь ласка, розпочніть з меню.",WallsAreNotAtSameHeight:"Стіни не знаходяться на однаковій висоті.",WallsAreNotPerpendicular:"Стіни не перпендикулярні.",WallsAreNotConnected:"Стіни не з'єднані.",WallsNumberNeedToBeFour:"Кількість стін має дорівнювати чотири.",BuildingContainsEmptyWall:"Будівля містить одну або кілька порожніх стін.",BuildingRoofMissing:"У будівлі відсутній дах.",UnknownErrors:"Невідомі помилки.",SigningOutAnonymousAccount:"Are you sure you want to sign out? This anonymous account will be lost."},menu:{AnalysisOptions:"Опції аналізу",option:{GridCellSize:"Розмір комірки сітки",SamplingFrequency:"Частота вибірки",TimesPerHour:"Разів на годину",DaysPerYear:"Днів на рік"},mainMenu:"Головне Меню",cloudMenu:"Меню Хмарного Середовища",projectSubMenu:"Проєкт",project:{CreateNewProject:"Створити Новий Проєкт",OpenProject:"Відкрити Проєкт",SaveProject:"Save Project",SaveProjectAs:"Save Project As",YouMustLogInToCreateProject:"Ви повинні увійти, щоб створити новий проєкт",YouMustLogInToOpenProject:"Ви повинні увійти, щоб відкрити проєкт"},fileSubMenu:"Файл",file:{CreateNewFile:"Створити новий",OpenLocalFile:"Відкрити локально",SaveAsLocalFile:"Зберегти як",SavingAbortedMustHaveValidFileName:"Збереження перервано! Вам потрібно мати дійсне ім'я файлу",OpenCloudFile:"Відкрити у хмарному середовищі",SaveCloudFile:"Зберегти у хмарному середовищі",SaveAsCloudFile:"Зберегти у хмарному середовищі",SavingAbortedMustHaveValidTitle:"Збереження перервано! Вам потрібно мати дійсний заголовок для хмарного файлу",ToSaveYourWorkPleaseSignIn:"Щоб зберегти вашу роботу, будь ласка, увійдіть в систему.",TakeScreenshot:"Зробити знімок екрана",UseCloudFileName:"Використовувати ім'я файлу у хмарному середовищі",PublishOnModelsMap:"Опублікувати на карті моделей",PublishedOnModelsMap:"Вашу модель було опубліковано на карті моделей",UpdatedOnModelsMap:"Ваша модель була оновлена на карті моделей",YouMustLogInToPublishYourModel:"Вам потрібно увійти в систему, щоб опублікувати свою модель",YouCannotPublishAModelThatYouDoNotOwn:"Ви не можете опублікувати модель, якою не володієте",YouMustSaveModelOnCloudBeforePublishingIt:"Вам потрібно зберегти модель у хмарному середовищі перед її публікацією"},editSubMenu:"Редагувати",edit:{Undo:"Скасувати",Redo:"Повторити"},viewSubMenu:"Перегляд",view:{NavigationView:"Navigation View",TwoDimensionalView:"2D Вигляд",ResetView:"Скинути",ZoomIn:"Збільшити масштаб",ZoomOut:"Зменшити масштаб",AutoRotate:"Автоматичний поворот",ShowShadow:"Показати тінь",ShowSurfaceShininess:"Показати блиск поверхні",TranslucentFloatingWindows:"Напівпрозорі плаваючі вікна",accessoriesSubMenu:"Додаткові елементи",accessories:{SiteInformation:"Інформація про місце",DesignInformation:"Інформація про дизайн",Instruction:"Інструкція",StickyNote:"Примітка",Note:"Примітка"}},settingsSubMenu:"Налаштування",settings:{WeatherData:"Дані про погоду",DiurnalTemperature:"Добова температура",Heliodon:"Геліодон",SunAndTime:"Сонце та час",CustomSolarPanels:"Custom Solar Panels",CustomizeSolarPanel:"Customize Solar Panel"},benchmarksSubMenu:"Бенчмарки",benchmarks:{SolarRadiationPredictionVsMeasurement:"Прогнозування сонячної радіації порівняно з вимірюванням",BESTESTCase600:"Тестування енергоефективності будівель: BESTEST Case 600",BESTESTCase610:"Тестування енергоефективності будівель: BESTEST Case 610",BESTESTCase620:"Тестування енергоефективності будівель: BESTEST Case 620",BESTESTCase630:"Тестування енергоефективності будівель: BESTEST Case 630"},graph:{LineWidth:"Товщина лінії",SymbolSize:"Розмір символу",BarCategoryGap:"Відступ категорій стовпців",ShowHorizontalGridLines:"Показати горизонтальні лінії сітки",ShowVerticalGridLines:"Показати вертикальні лінії сітки"},analysisSubMenu:"Аналіз",physicsSubMenu:"Фізика",physics:{DailySolarRadiationHeatmap:"Щоденна карта сонячної радіації",SolarRadiationHeatmapOptions:"Параметри карти сонячної радіації",SolarRadiationHeatmapGridCellSize:"Розмір комірки на карті сонячної радіації",SolarRadiationHeatmapMaxValue:"Максимальне значення на карті",SolarRadiationHeatmapNoAnimation:"Немає анімації для статичної моделі",ReflectionHeatmap:"Карта відображень"},sensorSubMenu:"Датчик",sensor:{CollectDailyData:"Збирати щоденні дані",CollectYearlyData:"Збирати щорічні дані",SensorSimulationNoAnimation:"Немає анімації для збору даних датчика"},buildingSubMenu:"Будівля",building:{AnalyzeDailyBuildingEnergy:"Аналізувати щоденну енергію будівлі",AnalyzeYearlyBuildingEnergy:"Аналізувати щорічну енергію будівлі",EnergyAnalysisOptions:"Параметри аналізу енергії",EnergyGridCellSize:"Розмір комірки сітки",BuildingEnergySimulationNoAnimation:"Немає анімації симулювати енергію будівлі"},solarPanelSubMenu:"Сонячна панель",solarPanel:{AnalyzeDailyYield:"Аналізувати щоденний дохід",AnalyzeYearlyYield:"Аналізувати щорічний дохід",AnalyzeVisibility:"Аналізувати видимість",PanelDiscretization:"Дискретизація панелі",Exact:"Точний",Approximate:"Наближений",EnergyGridCellSize:"Розмір комірки сітки енергії",VisibilityGridCellSize:"Розмір комірки сітки коефіцієнта видимості",EnergyAnalysisOptions:"Параметри аналізу енергії",VisibilityAnalysisOptions:"Параметри аналізу видимості",SolarPanelSimulationNoAnimation:"Немає анімації для симуляції сонячної панелі"},parabolicTroughSubMenu:"Параболічний сонячний колектор",parabolicTrough:{AnalyzeDailyYield:"Аналізувати щоденний дохід",AnalyzeYearlyYield:"Аналізувати щорічний дохід"},parabolicDishSubMenu:"Параболічний диск",parabolicDish:{AnalyzeDailyYield:"Аналізувати щоденний дохід",AnalyzeYearlyYield:"Аналізувати щорічний дохід"},fresnelReflectorSubMenu:"Відбивач Френеля",fresnelReflector:{AnalyzeDailyYield:"Аналізувати щоденний дохід",AnalyzeYearlyYield:"Аналізувати щорічний дохід"},heliostatSubMenu:"Геліостат",heliostat:{AnalyzeDailyYield:"Аналізувати щоденний дохід",AnalyzeYearlyYield:"Аналізувати щорічний дохід"},solarUpdraftTowerSubMenu:"Сонячна вежа з використаним повітрям",solarUpdraftTower:{AnalyzeDailyYield:"Аналізувати щоденний дохід",AnalyzeYearlyYield:"Аналізувати щорічний дохід",SolarUpdraftTowerSimulationNoAnimation:"Немає анімації симулювати сонячну вежу з використаним повітрям"},tutorialsSubMenu:"Посібники",solarEnergyScienceSubMenu:"Сонячна наука",solarEnergyScienceTutorials:{SunAngles:"Кути сонця відносно спостерігача на землі",InsolationAndClimate:"Інсоляція та клімат",SolarRadiationToBox:"Сонячна радіація в коробку"},buildingScienceSubMenu:"Наука про будівлі",buildingScienceTutorials:{ThermalEnvelopeVsBuildingEnvelope:"Теплозахисна оболонка проти будівельної оболонки",EffectOfSizeOnBuildingEnergy:"Вплив розміру на енергію будівлі",EffectOfOrientationOnBuildingEnergy:"Вплив орієнтації на енергію будівлі",EffectOfInsulationOnBuildingEnergy:"Вплив інсоляції на енергію будівлі",EffectOfRoofColorOnBuildingEnergy:"Вплив кольору даху на енергію будівлі",EffectOfEavesOverhangLengthOnBuildingEnergy:"Вплив довжини виступу карнизу на енергію будівлі",EffectOfWindowSHGCOnBuildingEnergy:"Вплив коефіцієнта сонячного теплозиску вікна на енергію будівлі",EffectOfThermostatSetpointOnBuildingEnergy:"Вплив заданої температури на термостаті на енергію будівлі",EffectOfSolarPanelsOnBuildingEnergy:"Вплив сонячних панелей на енергію будівлі",EffectOfGroundTemperatureOnBuildingEnergy:"Вплив температури грунту на енергію будівлі",EffectOfTreesOnBuildingEnergy:"Вплив дерев на енергію будівлі"},buildingDesignSubMenu:"Дизайн будівлі",buildingDesignTutorials:{CapeCodStyleHouseWithShedDormer:'Будинок у стилі Кейп Код з пристроєм типу "шед-дормер"',MansardRoofWithDormers:"Мансарда з горизонтальними пристроями",GableRoofVsHipRoof:"Схиловий дах проти двосхилих дахів",ColonialVsSaltbox:"Колоніальний стиль проти стилю Saltbox",GambrelRoofVsMansardRoof:"Півшаровий дах проти мансардного даху",CombinationRoofVsBonnetRoof:"Комбінований дах проти капотного даху",DutchGableRoof:"Голландський дах з рикетом",GableAndValleyRoof:"Схиловий та долинний дах",ClerestoryRoof:"Клересторний дах",MonitorRoof:"Моніторний дах",AFrameHouse:'Будинок у формі літери "А"',HalfTimberedHouse:"Будинок з напівдерев'яними стінами",AllBasicRoofTypes:"Усі основні типи дахів"},photovoltaicSolarPowerSubMenu:"Фотоелектрична сонячна енергія",photovoltaicSolarPowerTutorials:{EffectOfTiltAngleOfSolarPanel:"Вплив кута нахилу сонячної панелі",EffectOfAzimuthOfSolarPanel:"Вплив азимуту сонячної панелі",SolarPanelTypes:"Типи сонячних панелей",DefineYourOwnSolarPanels:"Define Your Own Solar Panels",VerticalBifacialSolarPanels:"Vertical Bifacial Solar Panels",CompareMonofacialAndBifacialSolarPanels:"Monofacial vs. Bifacial Solar Panels",SolarTrackers:"Сонячні трекери",CoveringGroundWithSolarPanels:"Чому просто покриття землі сонячними панелями - не найкраща ідея",InterRowSpacingOfSolarPanelArray:"Вплив міжрядного простору в масиві сонячних панелей",EffectOfOrientationOfSolarPanels:"Вплив орієнтації сонячних панелей",SolarPanelArrayAutomaticLayout:"Автоматичне розміщення масиву сонячних панелей"},concentratedSolarPowerSubMenu:"Концентрована сонячна енергія",concentratedSolarPowerTutorials:{EffectOfAzimuthOfParabolicTrough:"Вплив азимуту параболічного сонячного колектора",EffectOfLatusRectumOfParabolicTrough:"Вплив прямої лінії на параболічний сонячний колектор",FocusSunlightWithParabolicDish:"Фокусування сонячного світла за допомогою параболічного диску",LinearFresnelReflectors:"Лінійні відбивачі Френеля",EffectOfAbsorberPipeHeightForLinearFresnelReflectors:"Вплив висоти поглинаючої трубки на лінійні відбивачі Френеля",EffectOfAzimuthOfLinearFresnelReflectors:"Вплив азимуту на лінійні відбивачі Френеля",LinearFresnelReflectorsWithTwoAbsorbers:"Лінійні відбивачі Френеля з двома поглинаючими елементами",CosineEfficiencyOfHeliostats:"Косинусна ефективність геліостатів",ShadowingAndBlockingOfHeliostats:"Затінення та блокування геліостатів",EffectSolarPowerTowerHeight:"Вплив висоти сонячної вежі з використаним повітрям",SolarPowerTower:"Сонячна вежа з використаним повітрям"},otherTypesOfSolarPowerSubMenu:"Інші типи сонячної енергії",otherTypesOfSolarPowerTutorials:{SolarWaterHeaters:"Solar Water Heaters",SolarUpdraftTower:"Сонячна вежа з використаним повітрям"},windPowerSubMenu:"Wind Power",windPowerTutorials:{EffectOfBladeNumberOfWindTurbine:"Effect of Blade Number of Wind Turbine",EffectOfPitchAngleOfWindTurbineBlades:"Effect of Pitch Angle of Wind Turbine Blades",BirdSafeBladeDesign:"Bird-Safe Blade Design",OffshoreWindFarm:"Offshore Wind Farm"},colocationSubMenu:"Colocation",colocationTutorials:{AgricultureSolarWindColocation:"Agriculture-Solar-Wind Colocation"},generativeDesignSubMenu:"Generative Design",generativeDesignTutorials:{MonofacialSolarPanelArrayTiltAngle:"The Tilt Angle of a Monofacial Solar Panel Array",BifacialSolarPanelArrayTiltAngle:"The Tilt Angle of a Bifacial Solar Panel Array",OutputOfSolarPanelArrayInDifferentPlaces:"The Output of a Solar Panel Array in Different Places",SimpleSolarFarmParetoFront:"The Pareto Front for Designing a Simple Solar Farm"},examplesSubMenu:"Приклади",solarEnergySubMenu:"Сонячна енергія",solarEnergyExamples:{SunBeamAndHeliodon:"Промінь сонця та геліодон",RooftopSolarPanels:"Сонячні панелі на даху",NevadaSolarOneParabolicTroughArray:"Масив параболічних сонячних колекторів Nevada Solar One",TooeleParabolicDishArray:"Масив параболічних тарілок Tooele",PS10SolarPowerTower:"Сонячна енергетична вежа PS10",TucsonLinearFresnelReflectors:"Лінійні відбивачі Френеля в Tucson",SolarCanopyFormFactors:"Форми сонячних козирків",SolarCanopyOverBleachers:"Сонячний козирок над трибунами",SolarCanopyOverGarage:"Сонячний козирок над гаражем",SolarBusStop:"Сонячна автобусна зупинка",SolarFacadeTesla:"Сонячна фасадна панель Tesla",BuildingIntegratedPhotovoltaics:"Вбудовані фотоелектричні системи в будівлі",Floatovoltaics:"Сонячні панелі на плавучих платформах",Agrivoltaics:"Агровольтаїка",VegetativeBuffer:"Вегетативна зона",RainbowSwashSolarFarmBostonMA:"Сонячна ферма Rainbow Swash в Boston, MA",MickeyMouseSolarFarmOrlandoFL:"Сонячна ферма Міккі Мауса в Orlando, FL",SolarPanelsOverCanalBakersfieldCA:"Сонячні панелі над каналом в Bakersfield, CA",SolarNoiseBarrierLexingtonMA:"Сонячний шумовий бар'єр в Lexington, MA",HSATSolarTrackersRaleighNC:"Сонячні трекери з горизонтальною віссю в Raleign, NC",AADATSolarTrackersLancasterCA:"Сонячні трекери з азимутальною-вертикальною віссю в Lancaster, CA",SolarUpdraftTowerInCity:"Сонячна вежа з використаним повітрям у місті"},builtEnvironmentSubMenu:"Забудоване середовище",residentialBuildingsSubMenu:"Житлові будівлі",residentialBuildingExamples:{ColonialHouse:"Колоніальний будинок",DutchColonialHouse:"Голландський колоніальний будинок",TShapedHouse:"Будинок у формі літери Т",CapeCodHouseWithGarage:"Будинок у стилі Cape Cod з гаражем",Solarium:"Солярій",Church1:"Церква 1",Cathedral1:"Собор 1",Cathedral2:"Собор 2",Mosque1:"Мечеть 1",AdobeTaosHouse:"Будинок з адобе в стилі Taos",RanchHouse:"Ranch House",BonnetHouse:"Будинок в стилі Bonnet",BarnStyleHouse:"Будинок у стилі амбара",ModernHouse:"Сучасний будинок",ButterflyRoofHouse:"Будинок з метеликовим дахом"},commercialBuildingsSubMenu:"Комерційні будівлі",commercialBuildingExamples:{WhiteHouse:"Білий Дім",HaroldWashingtonCollege:"Harold Washington College",BilimMersinTurkiye:"Bilim, Mersin, Туреччина",SpanishStyleHotel:"Готель в іспанському стилі",ApartmentBuilding:"Багатоквартирний будинок",OfficeBuilding:"Офісна будівля",Hotel:"Готель"},buildingComplexesSubMenu:"Будівельні комплекси",buildingComplexExamples:{SouthBurlingtonHighSchoolVermont:"South Burlington High School, Vermont",MescaleroApacheSchoolNewMexico:"Mescalero Apache School, New Mexico"},urbanPlanningSubMenu:"Міське планування",urbanPlanningExamples:{CityBlockHeatmap:"City Block Heatmap",ChicagoSkyline:"Chicago Skyline"},otherBuildingsSubMenu:"Інші будівлі",otherBuildingExamples:{Greenhouse:"Теплиця",Pavilion:"Павільйон у парку",OctagonalPagoda:"Восьмикутна пагода",OceanFront:"Будівля біля океану",EgyptianPyramids:"Єгипетські піраміди",MayanPyramid:"Піраміда Мая",SiOSePol:"Si-O-Se-Pol",StackedCuboids:"Стековані кубоїди"},artificialIntelligenceSubMenu:"Штучний інтелект",artificialIntelligenceExamples:{OptimizingTiltAngleOfOneSolarPanelRow:"Оптимізація кута нахилу одного ряду сонячних панелей",OptimizingTiltAnglesOfMultipleSolarPanelRows:"Оптимізація кутів нахилу декількох рядів сонячних панелей",SolarFarmGenerativeDesign:"Генеративний дизайн сонячної ферми",SolarFarmGenerativeDesignWithBlock:"Генеративний дизайн сонячної ферми в присутності перешкоди",FitchburgSolarFarmGenerativeDesign:"Генеративний дизайн сонячної ферми у Fitchburg"},languageSubMenu:"Мова",publicSubMenu:"Загальнодоступно",ModelsGallery:"Галерея моделей",ModelsMap:"Карта моделей",AboutUs:"Про нас"},avatarMenu:{AccountSettings:"Налаштування облікового запису",PrivacyStatementTitle:"User Privacy Protection Statement",PrivacyStatement:"Коли ви увійдете, ваш Google ID використовується для створення та доступу до вашого облікового запису Aladdin. В нашій базі даних зберігається лише випадковий алфавітно-цифровий рядок як посилання. Ми ніколи не збираємо особисто ідентифіковану інформацію, таку як ваше ім'я або електронна пошта. Для отримання додаткової інформації ознайомтесь з нашою ",SignIn:"Увійти",SignInAsMe:"Sign in as me",SignInAnonymously:"Sign in anonymously",SignOut:"Вийти",IfYouAreAStudent:"Якщо ви студент"},skyMenu:{Axes:"Вісі",Theme:"Тематика",ThemeDefault:"За замовчуванням",ThemeDesert:"Пустеля",ThemeDune:"Дюна",ThemeForest:"Ліс",ThemeGrassland:"Степ",ThemeHill:"Пагорб",ThemeLake:"Озеро",ThemeMountain:"Гора",ThemeRural:"Сільська місцевість",SunlightAttenuationCoefficientInAir:"Коефіцієнт затухання сонячного світла у повітрі",ConvectiveCoefficientOfAir:"Коефіцієнт конвекції повітря",HighestTemperatureTimeInMinutes:"Час найвищої температури (хвилини)",SelectSunAnglesToShow:"Виберіть кути сонця, які показати",ShowAzimuthAngle:"Показати азимутний кут",ShowElevationAngle:"Показати висотний кут",ShowZenithAngle:"Показати зенітний кут",DirectLightBrightnessAtNoon:"Direct Light Brightness at Noon",AmbientLightBrightnessAtNoon:"Ambient Light Brightness at Noon"},groundMenu:{MonthlyIrradianceLoss:"Monthly Irradiance Loss",Vegetation:"Рослинність",LeafOutDay:"День розпускання листя",LeafOffDay:"День опадання листя",Albedo:"Альбедо",ImageOnGround:"Зображення на поверхні",WaterSurface:"Поверхня води",RemoveAllUnlockedTrees:"Видалити всі розблоковані дерева",RemoveAllUnlockedFlowers:"Видалити всі розблоковані квіти",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",RemoveAllUnlockedPeople:"Видалити всіх розблокованих людей",RemoveAllUnlockedFoundations:"Видалити всі розблоковані фундаменти",RemoveAllUnlockedCuboids:"Видалити всі розблоковані кубоїди",DoYouReallyWantToRemoveAllPeople:"Ви дійсно хочете видалити всіх людей, що не заблоковані",DoYouReallyWantToRemoveAllTrees:"Ви дійсно хочете видалити всі дерева, що не заблоковані",DoYouReallyWantToRemoveAllFlowers:"Ви дійсно хочете видалити всі квіти, що не заблоковані",DoYouReallyWantToRemoveAllSolarPanels:"Do you really want to remove all the solar panels that are not locked",DoYouReallyWantToRemoveAllFoundations:"Ви дійсно хочете видалити всі фундаменти, що не заблоковані",DoYouReallyWantToRemoveAllCuboids:"Ви дійсно хочете видалити всі кубоїди, що не заблоковані",LockAllUnlockedElements:"Lock All Unlocked Elements",UnlockAllLockedElements:"Unlock All Locked Elements"},labelSubMenu:{Label:"Мітка",LabelText:"Текст мітки",LabelHeight:"Висота мітки",LabelSize:"Розмір мітки",LabelFontSize:"Розмір шрифту",LabelColor:"Колір мітки",KeepShowingLabel:"Залишати видимою мітку"},foundationMenu:{RemoveAllUnlockedSolarPanels:"Видалити всі незаблоковані сонячні панелі",RemoveAllUnlockedParabolicTroughs:"Видалити всі незаблоковані параболічні сонячні колектори",RemoveAllUnlockedParabolicDishes:"Видалити всі незаблоковані параболічні антени",RemoveAllUnlockedFresnelReflectors:"Видалити всі незаблоковані відбивачі Френеля",RemoveAllUnlockedHeliostats:"Видалити всі незаблоковані геліостати",RemoveAllUnlockedWindTurbines:"Remove All Unlocked Wind Turbines",RemoveAllUnlockedSensors:"Видалити всі незаблоковані датчики",RemoveAllUnlockedLights:"Видалити всі незаблоковані освітлювальні прилади",RemoveAllUnlockedWalls:"Видалити всі незаблоковані стіни",RemoveAllUnlockedWindows:"Видалити всі незаблоковані вікна",RemoveAllUnlockedDoors:"Видалити всі незаблоковані двері",RemoveAllUnlockedPolygons:"Видалити всі незаблоковані полігони",RemoveAllUnlockedHumans:"Видалити всіх незаблокованих людей",RemoveAllUnlockedTrees:"Видалити всі незаблоковані дерева",RemoveAllUnlockedFlowers:"Видалити всі незаблоковані квіти",Racks:"Стелажі",Texture01:"Текстура 1",Texture02:"Текстура 2",Texture03:"Текстура 3",Texture04:"Текстура 4",Texture05:"Текстура 5",Texture06:"Текстура 6",Texture07:"Текстура 7",Texture08:"Текстура 8",Texture09:"Текстура 9",Texture10:"Текстура 10",SolarPanels:"Сонячні панелі",SolarPanelArray:"Solar Panel Array",DoYouReallyWantToRemoveAllSolarPanelsOnFoundation:"Ви дійсно бажаєте видалити всі сонячні панелі на цьому фундаменті, які не є заблокованими",ParabolicTroughs:"Параболічні сонячні колектори",DoYouReallyWantToRemoveAllParabolicTroughsOnFoundation:"Ви дійсно бажаєте видалити всі параболічні сонячні колектори на цьому фундаменті, які не є заблокованими",ParabolicDishes:"Параболічні антени",DoYouReallyWantToRemoveAllParabolicDishesOnFoundation:"Ви дійсно бажаєте видалити всі параболічні антени на цьому фундаменті, які не є заблокованими",FresnelReflectors:"Відбивачі Френеля",DoYouReallyWantToRemoveAllFresnelReflectorsOnFoundation:"Ви дійсно бажаєте видалити всі відбивачі Френеля на цьому фундаменті, які не є заблокованими",Heliostats:"Геліостати",DoYouReallyWantToRemoveAllHeliostatsOnFoundation:"Ви дійсно бажаєте видалити всі геліостати на цьому фундаменті, які не є заблокованими",WindTurbines:"Wind Turbines",DoYouReallyWantToRemoveAllWindTurbinesOnFoundation:"Do you really want to remove all the wind turbines on this foundation that are not locked",Sensors:"Датчики",DoYouReallyWantToRemoveAllSensorsOnFoundation:"Ви дійсно бажаєте видалити всі датчики на цьому фундаменті, які не є заблокованими",Lights:"Світильники",DoYouReallyWantToRemoveAllLightsOnFoundation:"Ви дійсно бажаєте видалити всі світильники на цьому фундаменті, які не є заблокованими",Walls:"Стіни",DoYouReallyWantToRemoveAllWallsOnFoundation:"Ви дійсно бажаєте видалити всі стіни на цьому фундаменті, які не є заблокованими",Windows:"Вікна",DoYouReallyWantToRemoveAllWindowsOnFoundation:"Ви дійсно бажаєте видалити всі вікна на цьому фундаменті, які не є заблокованими",Doors:"Двері",DoYouReallyWantToRemoveAllDoorsOnFoundation:"Ви дійсно бажаєте видалити всі двері на цьому фундаменті, які не є заблокованими",Polygons:"Багатокутники",DoYouReallyWantToRemoveAllPolygonsOnFoundation:"Ви дійсно бажаєте видалити всі багатокутники на цьому фундаменті, які не є заблокованими",Humans:"Люди",DoYouReallyWantToRemoveAllHumansOnFoundation:"Ви дійсно бажаєте видалити всіх людей на цьому фундаменті, які не є заблокованими",Trees:"Дерева",DoYouReallyWantToRemoveAllTreesOnFoundation:"Ви дійсно бажаєте видалити всі дерева на цьому фундаменті, які не є заблокованими",Flowers:"Квіти",DoYouReallyWantToRemoveAllFlowersOnFoundation:"Ви дійсно бажаєте видалити всі квіти на цьому фундаменті, які не є заблокованими",OnlyThisFoundation:"Тільки цей фундамент",AllConnectedFoundations:"Всі пов’язані фундаменти",AllSelectedFoundations:"All Selected Foundations",AllFoundations:"Всі фундаменти",AddPolygon:"Додати багатокутник",SolarStructure:"Вибрати сонячну структуру",GroupMaster:"Груповий майстер",LockAllUnlockedElementsOnThisFoundation:"Lock All Unlocked Elements on This Foundation",UnlockAllLockedElementsOnThisFoundation:"Unlock All Locked Elements on This Foundation",GroundFloorRValue:"Теплопровідність перекриття цокольного поверху",OnlyThisGroundFloor:"Тільки цокольний поверх",AllGroundFloors:"Всі цокольні поверхи"},solarPowerTowerMenu:{ReceiverTowerForHeliostats:"Вежа приймача для геліостатів",ReceiverTowerPhysicalProperties:"Фізичні властивості вежі приймача",ReceiverTowerHeight:"Висота вежі приймача",ReceiverTowerRadius:"Радіус вежі приймача",ReceiverAbsorptance:"Поглинання приймача",ReceiverOpticalEfficiency:"Оптична ефективність приймача",ReceiverThermalEfficiency:"Теплова ефективність приймача"},solarAbsorberPipeMenu:{AbsorberPipeForFresnelReflectors:"Трубопровід для відбивачів Френеля",AbsorberPipePhysicalProperties:"Фізичні властивості трубопроводу поглинання",AbsorberHeight:"Висота трубопроводу поглинання",AbsorberApertureWidth:"Ширина отвору трубопроводу поглинання",AbsorberPipePoleNumber:"Кількість полюсів для трубопроводу поглинання",AbsorberAbsorptance:"Сила поглинання",AbsorberOpticalEfficiency:"Оптична ефективність поглинача",AbsorberThermalEfficiency:"Теплова ефективність поглинача"},solarUpdraftTowerMenu:{SolarUpdraftTower:"Сонячна вежа з тяговим потоком",SolarUpdraftTowerPhysicalProperties:"Фізичні властивості сонячної вежі з тяговим потоком",SolarUpdraftTowerChimneyHeight:"Висота димової труби сонячної вежі з тяговим потоком",SolarUpdraftTowerChimneyRadius:"Радіус димової труби сонячної вежі з тяговим потоком",SolarUpdraftTowerCollectorHeight:"Висота колектора сонячної вежі з тяговим потоком",SolarUpdraftTowerCollectorRadius:"Радіус колектора сонячної вежі з тяговим потоком",SolarUpdraftTowerCollectorTransmissivity:"Проникність колектора сонячної вежі з тяговим потоком",SolarUpdraftTowerCollectorEmissivity:"Випромінюваність колектора сонячної вежі з тяговим потоком",SolarUpdraftTowerDischargeCoefficient:"Коефіцієнт викиду сонячної вежі з тяговим потоком",SolarUpdraftTowerTurbineEfficiency:"Ефективність турбіни сонячної вежі з тяговим потоком"},cuboidMenu:{Texture01:"Текстура 1",Texture02:"Текстура 2",Texture03:"Текстура 3",Texture04:"Текстура 4",Texture05:"Текстура 5",Texture06:"Текстура 6",Texture07:"Текстура 7",Texture08:"Текстура 8",Texture09:"Текстура 9",Texture10:"Текстура 10",RemoveAllUnlockedSolarPanels:"Видалити всі розблоковані сонячні панелі",RemoveAllUnlockedSensors:"Видалити всі розблоковані сенсори",RemoveAllUnlockedPolygons:"Видалити всі розблоковані полігони",RemoveAllUnlockedHumans:"Видалити всіх розблокованих людей",RemoveAllUnlockedTrees:"Видалити всі розблоковані дерева",RemoveAllUnlockedFlowers:"Видалити всі розблоковані квіти",RemoveAllUnlockedLights:"Remove All Unlocked Lights",Racks:"Стійки",Lights:"Lights",DoYouReallyWantToRemoveAllLightsOnCuboid:"Do you really want to remove all the lights on this cuboid that are not locked",SolarPanels:"Сонячні панелі",DoYouReallyWantToRemoveAllSolarPanelsOnCuboid:"Ви дійсно бажаєте видалити всі сонячні панелі на цьому кубоїді, які не заблоковані",Sensors:"Сенсори",DoYouReallyWantToRemoveAllSensorsOnCuboid:"Ви дійсно бажаєте видалити всі сенсори на цьому кубоїді, які не заблоковані",Polygons:"Полігони",DoYouReallyWantToRemoveAllPolygonsOnCuboid:"Ви дійсно бажаєте видалити всі полігони на цьому кубоїді, які не заблоковані",Humans:"Люди",DoYouReallyWantToRemoveAllHumansOnCuboid:"Ви дійсно бажаєте видалити всіх людей на цьому кубоїді, які не заблоковані",Trees:"Дерева",DoYouReallyWantToRemoveAllTreesOnCuboid:"Ви дійсно бажаєте видалити всі дерева на цьому кубоїді, які не заблоковані",Flowers:"Квіти",DoYouReallyWantToRemoveAllFlowersOnCuboid:"Ви дійсно бажаєте видалити всі квіти на цьому кубоїді, які не заблоковані",OnlyThisCuboid:"Тільки цей кубоїд",AllCuboidsOnSameSurface:"Усі кубоїди на одній поверхні",AllCuboidsAboveSameBase:"Усі кубоїди над тією ж основою",AllSelectedCuboids:"All Selected Cuboids",AllCuboids:"Всі кубоїди",OnlyThisSide:"Тільки ця сторона",AllSidesOfThisCuboid:"Всі сторони цього кубоїда",AllSidesOfSelectedCuboids:"All Sides of Selected Cuboids",AllSidesOfAllCuboids:"Всі сторони всіх кубоїдів",AddPolygon:"Додати полігон",Stackable:"Стекабельне",GroupMaster:"Майстер групи"},polygonMenu:{Texture01:"Текстура 1",Texture02:"Текстура 2",Texture03:"Текстура 3",Texture04:"Текстура 4",Texture05:"Текстура 5",Texture06:"Текстура 6",Texture07:"Текстура 7",Texture08:"Текстура 8",Texture09:"Текстура 9",Texture10:"Текстура 10",TextBox:"Текстове поле",FontOutlineColor:"Колір контуру шрифту",FontOutlineWidth:"Товщина контуру шрифту",FontStrokeColor:"Колір обводки шрифту",FontStrokeWidth:"Товщина обводки шрифту",NoOutline:"Без контуру",Shiny:"Блискучий",Filled:"Заповнений",FillTexture:"Текстура заповнення",FillColor:"Колір заповнення",Opacity:"Прозорість",LineColor:"Колір лінії",LineWidth:"Товщина лінії",LineStyle:"Стиль лінії",SolidLine:"Суцільна лінія",DashedLine:"Пунктирна лінія",DottedLine:"Точкова лінія",InsertVertexBeforeIndex:"Вставити вершину перед індексом",InsertVertexAfterIndex:"Вставити вершину після індексу",DeleteVertex:"Видалити вершину",OnlyThisPolygon:"Тільки цей полігон",AllPolygonsOnSurface:"Всі полігони на цій поверхні",AllPolygonsAboveFoundation:"Всі полігони вище фундаменту",AllSelectedPolygons:"All Selected Polygons",AllPolygons:"Всі полігони",Layout:"Розташування",SolarPanelArrayLayout:"Розташування сонячних панелей",SolarPanelArrayLayoutParametricDesign:"Розташування сонячних панелей: параметричний дизайн",SolarPanelArrayLayoutGenerativeDesign:"Розташування сонячних панелей: генеративний дизайн",SolarPanelArrayModel:"Модель сонячної панелі",SolarPanelArrayOrientation:"Орієнтація",SolarPanelArrayTiltAngle:"Кут нахилу",SolarPanelArrayRowWidth:"Ширина ряду",SolarPanelArrayInterRowSpacing:"Міжрядковий інтервал",SolarPanelArrayRowSpacing:"Row Spacing",SolarPanelArrayRowAxis:"Вісь ряду",SolarPanelArrayLeftRightRowAxis:"Наліво-Направо (відносне)",SolarPanelArrayUpDownRowAxis:"Вгору-Вниз (відносне)",SolarPanelArrayEastWestRowAxis:"Схід-Захід (абсолютне)",SolarPanelArrayNorthSouthRowAxis:"Північ-Південь (абсолютне)",SolarPanelArrayMargin:"Відступ",SolarPanelArrayPoleHeight:"Висота стовпа",SolarPanelArrayPoleSpacing:"Інтервал між стовпами",SolarPanelArrayTotalYearlyCost:"Total Cost",SolarPanelArrayTotalYearlyRevenue:"Total Revenue",SolarPanelArrayTotalYearlyYield:"Total Yield",SolarPanelArrayMeanYearlyYield:"Mean Yield",SolarPanelArrayYearlyProfit:"Profit",LayoutNotAcceptedCheckYourParameters:"Це розташування не приймається. Будь ласка, перевірте ваші параметри."},optimizationMenu:{Optimization:"Оптимізація",Parameters:"Параметри",Variables:"Змінні",Constants:"Константи",GeneticAlgorithm:"Генетичний алгоритм",GeneticAlgorithmSettings:"Налаштування генетичного алгоритму",ParticleSwarmOptimization:"Оптимізація роєм частинок",ParticleSwarmOptimizationSettings:"Налаштування оптимізації роєм частинок",SolarPanelTiltAngleOptimization:"Оптимізація кута нахилу сонячних панелей",SolarPanelArrayLayout:"Розташування сонячних панелей",Generation:"Покоління",Gene:"Ген",NormalizedVariables:"Нормалізовані змінні",Objective:"Ціль",ObjectiveFunctionDailyTotalYield:"Щоденний загальний дохід",ObjectiveFunctionYearlyTotalYield:"Щорічний загальний дохід",ObjectiveFunctionDailyMeanYield:"Щоденний середній дохід",ObjectiveFunctionYearlyMeanYield:"Щорічний середній дохід",ObjectiveFunctionDailyProfit:"Щоденний прибуток",ObjectiveFunctionYearlyProfit:"Щорічний прибуток",GeneticAlgorithmSelectionMethod:"Метод вибору для генетичного алгоритму",RouletteWheel:"Велосипедне колесо",Tournament:"Турнір",SearchMethod:"Метод пошуку",GlobalSearchUniformSelection:"Глобальний пошук з однорідним вибором",LocalSearchRandomOptimization:"Локальний пошук випадкової оптимізації",PopulationSize:"Розмір населення",MaximumGenerations:"Максимальна кількість поколінь",SelectionRate:"Швидкість відбору",CrossoverRate:"Швидкість схрещування",MutationRate:"Швидкість мутації",Step:"Крок",SwarmSize:"Розмір рою",MaximumSteps:"Максимальна кількість кроків",MaximumVelocity:"Максимальна швидкість",InertiaWeight:"Вага інерції",CognitiveCoefficient:"Коефіцієнт когнітивної функції",SocialCoefficient:"Коефіцієнт соціальної взаємодії",ConvergenceThreshold:"Поріг збіжності для завершення",LocalSearchRadius:"Радіус локального пошуку",RowsPerRackRange:"Діапазон для рядів на стелаж",TiltAngleRange:"Діапазон для кута нахилу",InterRowSpacingRange:"Діапазон для міжрядкового проміжку",ClickTargetPolygonToActivate:"Натисніть на цільовий полігон для активації",ClickTargetFoundationToActivate:"Натисніть на цільовий фундамент для активації"},treeMenu:{ShowModel:"Показати модель",Flip:"Перевернути",Type:"Тип",Spread:"Розповсюдження"},flowerMenu:{Flip:"Перевернути",Type:"Тип",Spread:"Розповсюдження"},peopleMenu:{ChangePerson:"Змінити особу",Flip:"Перевернути",Observer:"Спостерігач",ViewFromThisPerson:"Переглянути з цієї особи"},lightMenu:{Color:"Колір",Intensity:"Інтенсивність",Decay:"Затухання",MaximumDistance:"Максимальна відстань",Inside:"Усередині"},solarCollectorMenu:{Coordinates:"Coordinates",RelativeXCoordinateOfCenter:"Relative X Coordinate of Center",RelativeYCoordinateOfCenter:"Relative Y Coordinate of Center",RelativeAzimuth:"Відносний азимут",Pole:"Стовп",PoleHeight:"Висота стовпа",PoleRadius:"Pole Radius",ExtraPoleHeight:"Додаткова висота стовпа",ExtraPoleHeightInAdditionToHalfWidth:"Додаткова висота стовпа на додаток до половини ширини",DrawSunBeam:"Намалювати промінь сонця"},concentratedSolarPowerCollectorMenu:{ReflectorReflectance:"Відбивання відбивача",ReceiverAbsorptance:"Поглинання приймача",ReflectorOpticalEfficiency:"Оптична ефективність відбивача",ReceiverThermalEfficiency:"Теплова ефективність приймача"},solarWaterHeaterMenu:{OnlyThisSolarWaterHeater:"Only This Solar Water Heater",AllSolarWaterHeatersOnSurface:"All Solar Water Heaters on the Same Surface",AllSolarWaterHeatersAboveFoundation:"All Solar Water Heaters Above the Same Foundation",AllSelectedSolarWaterHeaters:"All Selected Solar Water Heaters",AllSolarWaterHeaters:"All Solar Water Heaters"},solarPanelMenu:{ElectricalProperties:"Electrical Properties",InverterEfficiency:"Inverter Efficiency",InverterEfficiencyExplained:"The efficiency for converting direct current (DC) to alternating current (AC).",DcToAcSizeRatio:"DC-to-AC Size Ratio",DcToAcSizeRatioExplained:"The ratio of the solar panels' DC-rated size to the inverter's AC-rated size.",ChangePvModel:"Змінити модель",Orientation:"Орієнтація",Portrait:"Вертикальна",Landscape:"Горизонтальна",FrameColor:"Колір рамки",Panels:"панелі",PanelsWide:"панелі по ширині",PanelsLong:"панелі по довжині",TiltAngle:"Кут нахилу",SouthFacingIsPositive:"Південь вважається позитивним",Tracker:"Трекер",SolarTrackerFollowsSun:"Трекер слідкує за сонцем для збільшення виходу сонячних панелей.",PoleSpacing:"Відстань між стовпами",NoTracker:"Без трекера",HorizontalSingleAxisTracker:"Трекер з горизонтальною одноосевою орієнтацією",VerticalSingleAxisTracker:"Трекер з вертикальною одноосевою орієнтацією",AltazimuthDualAxisTracker:"Трекер з азимутально-альтазимутальною двоосевою орієнтацією",OnlyThisSolarPanel:"Тільки ця сонячна панель",AllSolarPanelsOnSurface:"Всі сонячні панелі на одній поверхні",AllSolarPanelsAboveFoundation:"Всі сонячні панелі над однією фундаментом",AllSelectedSolarPanels:"All Selected Solar Panels",AllSolarPanels:"Всі сонячні панелі"},pvModelPanel:{SolarPanelSpecs:"Технічні характеристики сонячної панелі",General:"General",Electrical:"Electrical",CellCountInXDirection:"Cell Count in X Direction",CellCountInYDirection:"Cell Count in Y Direction",Weight:"Weight",Kilogram:"kg",RatedVoltage:"Rated Voltage",RatedCurrent:"Rated Current",OpenCircuitVoltage:"Open-Circuit Voltage",ShortCircuitCurrent:"Short-Circuit Current",MaximumRatedPower:"Maximum Rated Power",Model:"Модель",PanelSize:"Розмір панелі",Cells:"Комірки",CellType:"Тип комірок",Monocrystalline:"Монокристалічні",Polycrystalline:"Полікристалічні",ThinFilm:"Тонкоплівкові",Bifacial:"Bifacial",BifacialityFactor:"Bifaciality Factor",Black:"Чорний",Blue:"Синій",ShadeTolerance:"Стійкість до затінення",SolarCellEfficiency:"Ефективність сонячної комірки",NominalOperatingCellTemperature:"Номінальна робоча температура комірки",TemperatureCoefficientOfPmax:"Температурний коефіцієнт Pmax",AddedCustomSolarPanels:"Added",DisplayThisCustomSolarPanel:"Display this custom solar panel",ExportThisCustomSolarPanel:"Export this custom solar panel",ImportCustomSolarPanelFromClipboard:"Import custom solar panel from clipboard",CustomSolarPanelExportedToClipboard:"Custom solar panel exported to Clipboard",DoYouReallyWantToRemoveThisCustomSolarPanel:"Do you really want to remove this custom solar panel",MakeSureThisCustomSolarPanelIsNotUsed:"Make sure this custom solar panel is not used in the current model",ThisCustomSolarPanelIsUsed:"This custom solar panel is used in the current model",DoYouReallyWantToImportCustomSolarPanel:"Do you really want to import a custom solar panel",ExistingSettingsWillBeOverwritten:"The existing settings will be overwritten",CannotAddCustomSolarPanel:"Cannot add custom solar panel",CustomSolarPanelMustHaveModelName:"A custom solar panel must have a model name",CustomSolarPanelExists:"A custom solar panel with this name already exists",FailInImportingDataFromClipboard:"Failed in importing data from the clipboard"},parabolicTroughMenu:{ModuleLength:"Довжина модуля",Modules:"модулі",ModulesLong:"модулів у довжину",LatusRectum:"Велика піввісь",OnlyThisParabolicTrough:"Тільки цей параболічний сонячний колектор",AllParabolicTroughsAboveFoundation:"Усі параболічні сонячні колектори над цим фундаментом",AllSelectedParabolicTroughs:"All Selected Parabolic Troughs",AllParabolicTroughs:"Усі параболічні сонячні колектори"},fresnelReflectorMenu:{AbsorberPipe:"Труба поглинання",SelectAbsorberToReflectSunlightTo:"Виберіть поглинач, до якого буде відбиватися сонячне світло",ModuleLength:"Довжина модуля",Modules:"модулі",ModulesLong:"модулів у довжину",OnlyThisFresnelReflector:"Тільки цей відбивач Френеля",AllFresnelReflectorsAboveFoundation:"Усі відбивачі Френеля над цим фундаментом",AllSelectedFresnelReflectors:"All Selected Fresnel Reflectors",AllFresnelReflectors:"Усі відбивачі Френеля"},heliostatMenu:{Tower:"Вежа",SelectTowerToReflectSunlightTo:"Виберіть вежу, до якої буде відбиватися сонячне світло",OnlyThisHeliostat:"Тільки цей геліостат",AllHeliostatsAboveFoundation:"Усі геліостати над цим фундаментом",AllSelectedHeliostats:"All Selected Heliostats",AllHeliostats:"Усі геліостати"},parabolicDishMenu:{ReceiverStructure:"Структура приймача",CentralPole:"Центральний стовп",CentralPoleWithTripod:"Центральний стовп з триногою",Quadrupod:"Чотиринога",RimDiameter:"Діаметр ободу",LatusRectum:"Велика піввісь",ExtraPoleHeightInAdditionToRadius:"Додаткова висота стовпа плюс радіус",OnlyThisParabolicDish:"Тільки ця параболічна тарілка",AllParabolicDishesAboveFoundation:"Усі параболічні тарілки над цим фундаментом",AllSelectedParabolicDishes:"All Selected Parabolic Dishes",AllParabolicDishes:"Усі параболічні тарілки"},windTurbineMenu:{BirdSafeDesign:"Bird-Safe Design",BirdSafeNone:"None",BirdSafeBicolor:"Bicolor",BirdSafeStriped:"Striped",Rotor:"Rotor",BladeNumber:"Blade Number",RotorInitialAngle:"Rotor Initial Angle",RotorBladeDesign:"Rotor Blade Design",RotorBladeRadius:"Rotor Blade Radius",RotorBladePitchAngle:"Rotor Blade Pitch Angle",RelativeYawAngle:"Relative Yaw Angle",MaximumChordLength:"Maximum Chord Length",Tower:"Tower",TowerHeight:"Tower Height",TowerRadius:"Tower Radius",HubDesign:"Hub Design",HubRadius:"Hub Radius",HubLength:"Hub Length",OnlyThisWindTurbine:"Only This Wind Turbine",AllWindTurbinesAboveFoundation:"All Wind Turbines Above the Same Foundation",AllSelectedWindTurbines:"All Selected Wind Turbines",AllWindTurbines:"All Wind Turbines"},wallMenu:{TextureDefault:"Типова текстура",Texture01:"Текстура 1",Texture02:"Текстура 2",Texture03:"Текстура 3",Texture04:"Текстура 4",Texture05:"Текстура 5",Texture06:"Текстура 6",Texture07:"Текстура 7",Texture08:"Текстура 8",Texture09:"Текстура 9",Texture10:"Текстура 10",SizeOfWall:"Розмір стіни",OnlyThisWall:"Тільки ця стіна",AllConnectedWalls:"Всі пов'язані стіни",AllWallsAboveFoundation:"Всі стіни над цим фундаментом",AllSelectedWalls:"All Selected Walls",AllWalls:"Всі стіни",Windows:"Вікна",LockAllUnlockedWindows:"Lock All Unlocked Windows",UnlockAllLockedWindows:"Unlock All Locked Windows",RemoveAllUnlockedWindows:"Видалити всі розблоковані вікна",DoYouReallyWantToRemoveAllWindowsOnThisWall:"Ви дійсно бажаєте видалити всі вікна на цій стіні",Doors:"Двері",LockAllUnlockedDoors:"Lock All Unlocked Doors",UnlockAllLockedDoors:"Unlock All Locked Doors",RemoveAllUnlockedDoors:"Видалити всі розблоковані двері",DoYouReallyWantToRemoveAllDoorsOnThisWall:"Ви дійсно бажаєте видалити всі двері на цій стіні",SolarPanels:"Сонячні панелі",LockAllUnlockedSolarPanels:"Lock All Unlocked Solar Panels",UnlockAllLockedSolarPanels:"Unlock All Locked Solar Panels",RemoveAllUnlockedSolarPanels:"Видалити всі розблоковані сонячні панелі",DoYouReallyWantToRemoveAllSolarPanelsOnThisWall:"Ви дійсно бажаєте видалити всі сонячні панелі на цій стіні",Sensors:"Датчики",LockAllUnlockedSensors:"Lock All Unlocked Sensors",UnlockAllLockedSensors:"Unlock All Locked Sensors",RemoveAllUnlockedSensors:"Видалити всі розблоковані датчики",DoYouReallyWantToRemoveAllSensorsOnThisWall:"Ви дійсно бажаєте видалити всі датчики на цій стіні",Lights:"Лампи",LockAllUnlockedLights:"Lock All Unlocked Lights",UnlockAllLockedLights:"Unlock All Locked Lights",RemoveAllUnlockedLights:"Видалити всі розблоковані лампи",DoYouReallyWantToRemoveAllLightsOnThisWall:"Ви дійсно бажаєте видалити всі лампи на цій стіні",Polygons:"Polygons",LockAllUnlockedPolygons:"Lock All Unlocked Polygons",UnlockAllLockedPolygons:"Unlock All Locked Polygons",RemoveAllUnlockedPolygons:"Видалити всі розблоковані полігони",DoYouReallyWantToRemoveAllPolygonsOnThisWall:"Do you really want to remove all the polygons on this wall",WallStructure:"Структура стіни",DefaultStructure:"Типова",StudStructure:"Студ",PillarStructure:"Пілар",Opacity:"Непрозорість",StructureSpacing:"Відстань між структурами",StructureWidth:"Ширина структури",StructureThickness:"Товщина структури",StructureColor:"Колір структури",Color:"Колір стіни",Height:"Висота",Thickness:"Товщина",Texture:"Текстура",AllLightsOnWallInside:"Всі лампи всередині стіни",AllLightsOnWallOutside:"Всі лампи ззовні стіни",Fill:"Заповнення",Full:"Повне",Partial:"Часткове",Empty:"Порожнє",OpenToOutside:"Відкрите на зовнішню сторону",EavesLength:"Довжина карнизу",Parapet:"Перила",ParapetColor:"Колір перил",ParapetTexture:"Текстура перил",ParapetHeight:"Висота перил",CopingsHeight:"Висота паркану",CopingsWidth:"Ширина паркану"},windowMenu:{OnlyThisWindow:"Тільки це вікно",AllWindowsOnSurface:"All Windows on the Same Surface",AllWindowsAboveFoundation:"Всі вікна над однією фундаментом",AllSelectedWindows:"All Selected Windows",AllWindows:"Всі вікна",Width:"Ширина",Height:"Висота",Setback:"Setback from Exterior Surface",RelativeToWallThickness:"Relative to wall thickness",Mullion:"Розділовий стовпець",HorizontalMullion:"Horizontal Mullion",VerticalMullion:"Vertical Mullion",MullionWidth:"Ширина розділового стовпця",HorizontalMullionSpacing:"Horizontal Mullion Spacing",VerticalMullionSpacing:"Vertical Mullion Spacing",MullionColor:"Колір розділового стовпця",Tint:"Відтінок",Opacity:"Непрозорість",SolarHeatGainCoefficient:"Коефіцієнт сонячного теплового навантаження (SHGC) = 1 - непрозорість",Shutter:"Жалюзі",LeftShutter:"Ліве жалюзі",RightShutter:"Праве жалюзі",BothShutters:"Обидві жалюзі",ShutterWidth:"Відносна ширина",ShutterColor:"Колір жалюзі",Frame:"Рамка",FrameWidth:"Ширина рамки",SillWidth:"Ширина підвіконня",Color:"Колір рамки",WindowType:"Тип вікна",Default:"Типове",Arched:"Аркове",Polygonal:"Багатокутне",Interior:"Інтер'єр",Empty:"Порожнє"},roofMenu:{TextureDefault:"Типове",Texture01:"Текстура 1",Texture02:"Текстура 2",Texture03:"Текстура 3",Texture04:"Текстура 4",Texture05:"Текстура 5",Texture06:"Текстура 6",Texture07:"Текстура 7",OnlyThisRoof:"Тільки цей дах",AllRoofsAboveFoundation:"Всі дахи над одним фундаментом",AllSelectedRoofs:"All Selected Roofs",AllRoofs:"Всі дахи",OnlyThisCeiling:"Тільки ця стеля",AllCeilingsAboveFoundation:"Всі стелі над одним фундаментом",AllCeilings:"Всі стелі",EavesOverhangLength:"Довжина виступу карнизу",RafterSpacing:"Відстань між стропилами",RafterWidth:"Ширина стропила",RafterThickness:"Товщина стропила",RafterColor:"Колір стропила",RoofColor:"Колір даху",RoofSideColor:"Колір бокової частини даху",GlassTint:"Колір скла",Opacity:"Непрозорість",RoofStructure:"Структура даху",DefaultStructure:"Типова",RafterStructure:"Стропило",GlassStructure:"Скло",SolarPanels:"Сонячні панелі",LockAllUnlockedSolarPanels:"Lock All Unlocked Solar Panels",UnlockAllLockedSolarPanels:"Unlock All Locked Solar Panels",RemoveAllUnlockedSolarPanels:"Видалити всі розблоковані сонячні панелі",DoYouReallyWantToRemoveAllSolarPanelsOnThisRoof:"Ви дійсно бажаєте видалити всі сонячні панелі на цьому даху",Windows:"Вікна",LockAllUnlockedWindows:"Lock All Unlocked Windows",UnlockAllLockedWindows:"Unlock All Locked Windows",RemoveAllUnlockedWindows:"Видалити всі розблоковані вікна",DoYouReallyWantToRemoveAllWindowsOnThisRoof:"Ви дійсно бажаєте видалити всі вікна на цьому даху",Sensors:"Сенсори",LockAllUnlockedSensors:"Lock All Unlocked Sensors",UnlockAllLockedSensors:"Unlock All Locked Sensors",RemoveAllUnlockedSensors:"Видалити всі розблоковані сенсори",DoYouReallyWantToRemoveAllSensorsOnThisRoof:"Ви дійсно бажаєте видалити всі сенсори на цьому даху",Lights:"Лампи",RemoveAllUnlockedLights:"Видалити всі розблоковані лампи",DoYouReallyWantToRemoveAllLightsOnThisRoof:"Ви дійсно бажаєте видалити всі лампи на цьому даху",AllLightsOnRoofInside:"Всі лампи на даху всередині",AllLightsOnRoofOutside:"Всі лампи на даху ззовні",Rise:"Піднімання",Ceiling:"Стеля",RoofRValue:"Значення R для даху",CeilingRValue:"Значення R для стелі"},doorMenu:{TextureDefault:"За замовчуванням",Texture01:"Текстура 1",Texture02:"Текстура 2",Texture03:"Текстура 3",Texture04:"Текстура 4",Texture05:"Текстура 5",Texture06:"Текстура 6",Texture07:"Текстура 7",Texture08:"Текстура 8",Texture09:"Текстура 9",Texture10:"Текстура 10",Texture11:"Текстура 11",Texture12:"Текстура 12",Texture13:"Текстура 13",Texture14:"Текстура 14",Texture15:"Текстура 15",Texture16:"Текстура 16",Texture17:"Текстура 17",OnlyThisDoor:"Тільки ці двері",AllDoorsOnWall:"Всі двері на цій стіні",AllDoorsAboveFoundation:"Всі двері над тим самим фундаментом",AllSelectedDoors:"All Selected Doors",AllDoors:"Всі двері",DoorType:"Тип дверей",Default:"За замовчуванням",Arched:"Аркові",Filled:"Заповнені",FrameColor:"Колір рамки",Interior:"Інтер'єр"},siteInfoPanel:{High:"Високо",Low:"Низько"},designInfoPanel:{NumberOfSelectedHeliostats:"Кількість вибраних геліостатів",NumberOfSelectedSolarPanels:"Кількість вибраних сонячних панелей",ElectricityGeneratedDailyBySolarPanels:"Електрика, що генерується щоденно цими сонячними панелями",SceneDiameter:"Діаметр сцени",BuildingArea:"Площа будівлі"},visualizationControlPanel:{ColorContrast:"Контраст кольору",FluxScale:"Шкала потоку",ClickUpOrDownArrowButtonsToChange:"Натисніть кнопки зі стрілками вгору або вниз щоб змінити"},instructionPanel:{Rotate:"Повернути",DragMouse:"Перетягніть мишею",Zoom:"Масштабування",MouseWheelOrKeys:"Обертайте колесо миші або натисніть Ctrl+[ або Ctrl+]",MouseWheelOrKeysMac:"Обертайте колесо миші або натисніть ⌘+[ або ⌘+]",Pan:"Переміщення",HoldCtrlDragMouse:"Натисніть і утримуйте Ctrl, перетягніть мишею",HoldMetaDragMouse:"Натисніть і утримуйте ⌘, перетягніть мишею",Enter2DMode:"Ввійти в 2D режим",Exit2DMode:"Вийти з 2D режиму",NavigationMode:"Режим навігації",EnableNavigation:"Увімкнути навігацію",DisableNavigation:"Вимкнути навігацію",MoveForwardBack:"Рухатися вперед/назад",MoveForwardBackInstruction:"Натисніть W/S",MoveLeftRight:"Рухатися вліво/вправо",MoveLeftRightInstruction:"Натисніть A/D",MoveUpDown:"Рухатися вгору/вниз",MoveUpDownInstruction:"Натисніть Z/X",Turn:"Повернути",TurnInstruction:"Натисніть клавіші зі стрілками",ResetView:"Скинути",AutoRotate:"Автоматичний поворот",StartOrStop:"Натисніть F4, щоб почати або зупинити"},mapPanel:{ImageOnGround:"Зображення на землі",HideAddress:"Hide Address",WeatherStations:"Метеостанції",WeatherStationsNote:"Вимкніть це, щоб прискорити",Coordinates:"Координати",Zoom:"Масштабування"},visibilityPanel:{SolarPanelVisibility:"Видимість сонячних панелей",Observer:"Спостерігач",VantagePoint:"Точка огляду",ItemizedVisibilityByFields:"Розгорнутий за полями",TotalVisibility:"Загальна видимість"},sensorPanel:{LightSensor:"Датчик освітленості",WeatherDataFrom:"Метеодані з"},buildingEnergyPanel:{DailyBuildingEnergy:"Щоденна енергія будівлі",YearlyBuildingEnergy:"Річна енергія будівлі",Heater:"Обігрівач",AC:"Кондиціонер",SolarPanel:"Сонячна панель",Net:"Всього"},solarPanelYieldPanel:{SolarPanelDailyYield:"Щоденний дохід сонячних панелей",SolarPanelYearlyYield:"Річний дохід сонячних панелей",Yield:"Дохід",YieldPerHour:"Дохід за годину",DailyTotal:"Щоденний загальний",YearlyTotal:"Річний загальний",ShowOutputsOfIndividualSolarPanels:"Показати дохід окремих сонячних панелей",Profit:"Прибуток",TotalCost:"Total Cost",TotalRevenue:"Total Revenue",TotalYield:"Total Yield",MeanYield:"Mean Yield",ModuleCount:"Module Count"},parabolicTroughYieldPanel:{ParabolicTroughDailyYield:"Щоденний дохід параболічних сонячних колекторів",ParabolicTroughYearlyYield:"Річний дохід параболічних сонячних колекторів",Yield:"Дохід",YieldPerHour:"Дохід за годину",DailyTotal:"Щоденний загальний",YearlyTotal:"Річний загальний",ShowOutputsOfIndividualParabolicTroughs:"Показати дохід окремих параболічних сонячних колекторів"},parabolicDishYieldPanel:{ParabolicDishDailyYield:"Щоденний дохід параболічних тарілок",ParabolicDishYearlyYield:"Річний дохід параболічних тарілок",Yield:"Дохід",YieldPerHour:"Дохід за годину",DailyTotal:"Щоденний загальний",YearlyTotal:"Річний загальний",ShowOutputsOfIndividualParabolicDishes:"Показати дохід окремих параболічних тарілок"},fresnelReflectorYieldPanel:{FresnelReflectorDailyYield:"Щоденний дохід відбивача Френеля",FresnelReflectorYearlyYield:"Річний дохід відбивача Френеля",Yield:"Дохід",YieldPerHour:"Дохід за годину",DailyTotal:"Щоденний загальний",YearlyTotal:"Річний загальний",ShowOutputsOfIndividualFresnelReflectors:"Показати дохід окремих відбивачів Френеля"},heliostatYieldPanel:{HeliostatDailyYield:"Щоденний дохід геліостату",HeliostatYearlyYield:"Річний дохід геліостату",Yield:"Дохід",YieldPerHour:"Дохід за годину",DailyTotal:"Щоденний загальний",YearlyTotal:"Річний загальний",ShowOutputsOfIndividualHeliostats:"Показати дохід окремих геліостатів"},updraftTowerYieldPanel:{UpdraftTowerDailyYield:"Щоденний дохід сонячної вежі",UpdraftTowerYearlyYield:"Річний дохід сонячної вежі",ChimneyAirTemperature:"Температура повітря у димовій трубі",ChimneyWindSpeed:"Швидкість вітру у димовій трубі",Yield:"дохід",YieldPerHour:"Дохід за годину",DailyTotal:"Щоденний загальний",YearlyTotal:"Річний загальний",ShowOutputsOfIndividualUpdraftTowers:"Показати дохід окремих сонячних веж"},heliodonPanel:{SunAndTimeSettings:"Налаштування Сонця та Часу",SunAngles:"Кути Сонця",TwentyFourHours:"24 Години"},cloudFilePanel:{CopyTitle:"Copy Title",TitleCopiedToClipBoard:"The title was copied to the clip board",SearchByTitle:"Пошук за назвою",MyLikes:"Мої вподобання",MyCloudFiles:"Мої файли у хмарному середовищі",GenerateLink:"Створити посилання",LinkGeneratedInClipBoard:"Посилання було створено та скопійовано до буферу обміну",DoYouReallyWantToDelete:"Ви дійсно бажаєте видалити",IfSharedOrPublishedRenamingFileBreaksExistingLinks:"Якщо цей файл було відкрито або опубліковано, зміна його назви порушить наявні посилання"},projectListPanel:{CopyTitle:"Copy Title",TitleCopiedToClipBoard:"The title was copied to the clip board",SearchByTitle:"Пошук за назвою",MyProjects:"My Projects",GenerateProjectLink:"Generate Project Link",ProjectLinkGeneratedInClipBoard:"A link to the project was generated in the clip board",DoYouReallyWantToDeleteProject:"Do you really want to delete Project",IfSharedOrPublishedRenamingProjectBreaksExistingLinks:"If this project has been shared or published, renaming it breaks existing links"},projectPanel:{ProjectSettings:"Project Settings",ThumbnailImageSize:"Thumbnail Image Size",ProjectByOtherPeople:"Project by Other People",Project:"Project",ProjectType:"Тип проєкту",ProjectDescription:"Description",MakeDescriptionEditable:"Make this description editable",MakeDescriptionNonEditable:"Make this description non-editable",DoubleClickToMakeDescriptionEditable:"Double-click to make this description editable",SolarPanelArray:"Solar Panel Array",CurateCurrentDesign:"Curate current design",UpdateSelectedDesign:"Update selected design",RemoveSelectedDesign:"Remove selected design",ClickToFlipSortingOrder:"Click to flip the sorting order",DesignNotShownInSolutionSpaceClickToShow:"This design is not shown in solution space; click to show",DesignShownInSolutionSpaceClickToHide:"This design is shown in solution space; click to hide",SolutionSpace:"Solution Space",ChooseSolutionSpace:"Choose solution space",ChooseDataColoring:"Choose data coloring",SameColorForAllDesigns:"Same color for all designs",OneColorForEachDesign:"One color for each design",SolutionSpaceScreenshot:"Take a screenshot of the solution space",ScatterPlotScreenshot:"Take a screenshot of the scatter plot",SingleClickToSelectDoubleClickToOpen:"Single-click to select, double-click to open.",SingleClickToDeselectDoubleClickToOpen:"Single-click to deselect, double-click to open.",GenerateScatterPlot:"Generate Scatter Plot",SelectXAxis:"Select X Axis",SelectYAxis:"Select Y Axis"},accountSettingsPanel:{MyAccountSettings:"Мої налаштування облікового запису",MyID:"Моє 🆔",ClickToCopyMyID:"Натисніть, щоб скопіювати моє ID",IDInClipBoard:"Ваш ID було скопійоване і готове для вставки.",StoreMyNameInMyFilesWhenSaving:"Зберігати моє ім'я в моїх файлах при збереженні",DoYouReallyWantToShowYourNameInYourFiles:"Ви дійсно бажаєте відображати ваше ім'я в файлах?",SignFileDisclaimer:"Якщо так, ваше ім'я зможе бачити будь-хто, хто матиме доступ до ваших файлів.",Likes:"Вподобання",AllPublished:"Усі опубліковані",PublishedUnderAliases:"Псевдоніми",UserCount:"Кількість користувачів",SchoolID:"ID Школи",ClassID:"ID Класу"},weatherPanel:{SunshineHours:"Сонячні години"},diurnalTemperaturePanel:{SelectAirTemperatureModel:"Виберіть модель повітряної температури",Sinusoidal:"Синусоїдальна"},economicsPanel:{EconomicsParameters:"Параметри економіки",ElectricitySellingPrice:"Ціна продажу електроенергії",OperationalCostPerUnit:"Операційні витрати за одиницю",SellingPrice:"Selling Price",UnitCost:"Unit Cost"},navigationPanel:{NavigationParameters:"Navigation Parameters",MinimumMoveSpeed:"Minimum Move Speed",MinimumTurnSpeed:"Minimum Turn Speed"},shadowSettingsPanel:{ShadowSettings:"Shadow Settings",ShadowCameraFarDistance:"Shadow Camera Far Distance",ShadowMapSize:"Shadow Map Size",Notes:"Notes",RefreshPageNote:"Refresh the page for the new settings to take effect.",MapSizeWarning:"A large shadow map size may cause Aladdin to crash on some computers."},yearlyLightSensorPanel:{SkyClearness:"Ясність неба",ShowDaylightResults:"Показати результати денного освітлення",ShowSkyClearnessResults:"Показати результати ясності неба",ShowAverageDailySolarRadiation:"Показати середню щоденну сонячну радіацію"},analysisManager:{NoSensorForCollectingData:"Немає датчика для збору даних.",NoSolarPanelForAnalysis:"Немає сонячної панелі для аналізу.",NoObserverForVisibilityAnalysis:"Немає спостерігача для аналізу видимості.",NoSolarWaterHeaterForAnalysis:"Немає водонагрівача для аналізу.",NoParabolicDishForAnalysis:"Немає параболічної тарілки для аналізу.",NoParabolicTroughForAnalysis:"Немає параболічного сонячного колектора для аналізу.",NoFresnelReflectorForAnalysis:"Немає відбивача Френеля для аналізу.",NoHeliostatForAnalysis:"Немає геліостата для аналізу.",NoSolarUpdraftTowerForAnalysis:"Немає сонячної вежі для аналізу.",NoBuildingForAnalysis:"Немає будівлі для аналізу."},toolbar:{CloudFile:"Хмарний файл",Select:"Вибрати",AddFoundation:"Додати фундамент",AddWall:"Додати стіну",AddWindow:"Додати вікно",AddDoor:"Додати двері",AddPyramidRoof:"Додати пірамідальний дах",AddGableRoof:"Додати шатровий дах",AddHipRoof:"Додати чотирихилий дах",AddGambrelRoof:"Додати двосхилий дах",AddMansardRoof:"Додати мансардний дах",AddCuboid:"Додати прямокутний паралелепіпед",AddSensor:"Додати датчик",AddSolarPanel:"Додати сонячну панель",AddSolarWaterHeater:"Додати водонагрівач",AddBatteryStorage:"Add Battery Storage",AddParabolicDish:"Додати параболічну тарілку",AddParabolicTrough:"Додати параболічний сонячний колектор",AddFresnelReflector:"Додати відбивач Френеля",AddHeliostat:"Додати геліостат",AddWindTurbine:"Add Horizontal Axis Wind Turbine",AddVerticalAxisWindTurbine:"Add Vertical Axis Wind Turbine",AddLight:"Додати світло",AddTree:"Додати дерево",AddFlower:"Додати квітку",AddPeople:"Додати людей",DoubleClickToLockThisModeForNextAction:"Подвійне клацання, щоб заблокувати цей режим для наступної дії",ClickToUnlockThisModeForNextAction:"Клацніть, щоб розблокувати цей режим для наступної дії",ManipulateGroup:"Маніпулювати групою",ClearScene:"Очистити сцену",ShowSunAndTimeSettings:"Показати налаштування Сонця та Часу",SpatialAnalysisOfEnergy:"Просторовий аналіз енергії",DoYouReallyWantToClearContent:"Ви дійсно бажаєте очистити вміст",ClickForMoreButtons:"Натисніть для додаткових кнопок"},tooltip:{gotoIFI:"Перейти до Інституту Інтелекту Майбутнього",visitAladdinHomePage:"Відвідати домашню сторінку Aladdin",clickToOpenMenu:"Натисність, щоб відкрити Головне Меню",clickToAccessAccountSettings:"Click to access account settings"},tree:{Apple:"Яблуня",Birch:"Береза",Coconut:"Кокос",Dogwood:"Дерен",Elm:"В'яз",FanPalm:"Віяльна пальма",Linden:"Липа",Magnolia:"Магнолія",Maple:"Клен",Oak:"Дуб",Pine:"Сосна",Spruce:"Ялина"},flower:{Bellflower:"Дзвоник",Boxwood:"Самшит",CactusCombo1:"Кактус Комбо 1",CactusCombo2:"Кактус Комбо 2",CactusCombo3:"Кактус Комбо 3",CactusCombo4:"Кактус Комбо 4",Hibiscus:"Гібіскус",Hosta:"Госта",Hydrangea:"Гортензія",Peony:"Півонія",RedRose:"Червона троянда",Spirea:"Спірея",Sunflower:"Соняшник",TallBush:"Високий кущ",Tulip:"Тюльпан",WhiteFlower:"Біла квітка",YellowFlower:"Жовта квітка"},people:{Jaah:"Артем",Jack:"Віталій",Jacob:"Ярослав",Jacqueline:"Олена",Jade:"Ольга",Jamelia:"Олександра",James:"Андрій",Jane:"Вікторія",Jaya:"Ірина",Jaye:"Назар",Jeanette:"Соломія",Jedi:"Євген",Jeff:"Павло",Jena:"Любов",Jennifer:"Тетяна",Jess:"Злата",Jett:"Сергій",Jill:"Надія",Jiya:"Марина",Joan:"Іванна",Jocelyn:"Анастасія",Joel:"Володимир",Joey:"Вероніка",John:"Іван",Jonathon:"Петро",Jose:"Микита",Joseph:"Віктор",Joshua:"Михайло",Judd:"Владислав",Judy:"Марія",Julia:"Юлія",Julio:"Дмитро",Jumapili:"Марта",June:"Анна",Juro:"Юрій",Justin:"Богдан"},compass:{N:"Пн",S:"Пд",W:"Зx",E:"Сх"},month:{January:"Jan",February:"Feb",March:"Mar",April:"Apr",May:"May",June:"Jun",July:"Jul",August:"Aug",September:"Sep",October:"Oct",November:"Nov",December:"Dec"},modelsMap:{AllTime:"All Time",SearchByPublisher:"Пошук за виробником",SearchByLabel:"Пошук за міткою",MyPublishedModels:"Мої опубліковані моделі",TotalNumberOfUserPublishedModelsInSelectedPeriod:"Total number of user-published models in the selected period",AllTimeTotal:"All-time total",SortFromOldestToNewest:"Сортувати від найдавніших до найновіших",SortFromNewestToOldest:"Сортувати від найновіших до найдавніших",SitesFound:"sites found",ModelsFoundOnThisSite:"моделей знайдено на цьому сайті",ShowModelsPublishedByThisAuthor:"Показати моделі, опубліковані цим автором"}}};Y.use(vWe).use(Vht).init({debug:!0,fallbackLng:"en",interpolation:{escapeValue:!1},resources:{en:fpt,zh_cn:hpt,zh_tw:ppt,es:gpt,tr:mpt,ua:ypt}});var m1e={},xWe={exports:{}};(function(t){function e(n){return n&&n.__esModule?n:{default:n}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(xWe);var Id=xWe.exports,nq={};Object.defineProperty(nq,"__esModule",{value:!0});nq.default=void 0;var Apt={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};nq.default=Apt;var oq={},ZL={},rq={};Object.defineProperty(rq,"__esModule",{value:!0});rq.default=void 0;var wpt={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"};rq.default=wpt;var eW={};Object.defineProperty(eW,"__esModule",{value:!0});eW.default=void 0;const vpt={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};eW.default=vpt;var bWe=Id.default;Object.defineProperty(ZL,"__esModule",{value:!0});ZL.default=void 0;var xpt=bWe(rq),bpt=bWe(eW);const Spt={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},xpt.default),timePickerLocale:Object.assign({},bpt.default)};ZL.default=Spt;var Tpt=Id.default;Object.defineProperty(oq,"__esModule",{value:!0});oq.default=void 0;var Ppt=Tpt(ZL);oq.default=Ppt.default;var iq=Id.default;Object.defineProperty(m1e,"__esModule",{value:!0});var y1e=m1e.default=void 0,Cpt=iq(nq),Rpt=iq(oq),Hpt=iq(ZL),Mpt=iq(eW);const D1="${label} is not a valid ${type}",Ipt={locale:"en",Pagination:Cpt.default,DatePicker:Hpt.default,TimePicker:Mpt.default,Calendar:Rpt.default,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:D1,method:D1,array:D1,object:D1,number:D1,date:D1,boolean:D1,integer:D1,float:D1,regexp:D1,email:D1,url:D1,hex:D1},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty"}};y1e=m1e.default=Ipt;const zpt="/aladdin/assets/weather-Cmaoollj.csv",Dpt="/aladdin/assets/solar_radiation_horizontal-XbDP6xhD.csv",Ept="/aladdin/assets/solar_radiation_vertical-CITm3vMC.csv",Fpt="/aladdin/assets/pvmodules-BhZ8sEOG.csv";function Dm(t){for(var e=arguments.length,n=Array(e>1?e-1:0),o=1;o3?e.i-4:e.i:Array.isArray(t)?1:A1e(t)?2:w1e(t)?3:0}function Use(t,e){return PH(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function kpt(t,e){return PH(t)===2?t.get(e):t[e]}function SWe(t,e,n){var o=PH(t);o===2?t.set(e,n):o===3?t.add(n):t[e]=n}function Lpt(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function A1e(t){return Ypt&&t instanceof Map}function w1e(t){return Opt&&t instanceof Set}function md(t){return t.o||t.t}function v1e(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=_pt(t);delete e[ns];for(var n=T1e(e),o=0;o1&&(t.set=t.add=t.clear=t.delete=Wpt),Object.freeze(t),e&&oR(t,function(n,o){return x1e(o,!0)},!0)),t}function Wpt(){Dm(2)}function b1e(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function S9(t){var e=Bse[t];return e||Dm(18,t),e}function Npt(t,e){Bse[t]||(Bse[t]=e)}function $_(){return PF}function Poe(t,e){e&&(S9("Patches"),t.u=[],t.s=[],t.v=e)}function Q_(t){jse(t),t.p.forEach(Upt),t.p=null}function jse(t){t===PF&&(PF=t.l)}function u4e(t){return PF={p:[],l:PF,h:t,m:!0,_:0}}function Upt(t){var e=t[ns];e.i===0||e.i===1?e.j():e.g=!0}function Coe(t,e){e._=e.p.length;var n=e.p[0],o=t!==void 0&&t!==n;return e.h.O||S9("ES5").S(e,t,o),o?(n[ns].P&&(Q_(e),Dm(4)),q6(t)&&(t=Z_(e,t),e.l||eG(e,t)),e.u&&S9("Patches").M(n[ns].t,t,e.u,e.s)):t=Z_(e,n,[]),Q_(e),e.u&&e.v(e.u,e.s),t!==TWe?t:void 0}function Z_(t,e,n){if(b1e(e))return e;var o=e[ns];if(!o)return oR(e,function(l,s){return d4e(t,o,e,l,s,n)},!0),e;if(o.A!==t)return e;if(!o.P)return eG(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var r=o.i===4||o.i===5?o.o=v1e(o.k):o.o,i=r,a=!1;o.i===3&&(i=new Set(r),r.clear(),a=!0),oR(i,function(l,s){return d4e(t,o,r,l,s,n,a)}),eG(t,r,!1),n&&t.u&&S9("Patches").N(o,n,t.u,t.s)}return o.o}function d4e(t,e,n,o,r,i,a){if(nR(r)){var l=Z_(t,r,i&&e&&e.i!==3&&!Use(e.R,o)?i.concat(o):void 0);if(SWe(n,o,l),!nR(l))return;t.m=!1}else a&&n.add(r);if(q6(r)&&!b1e(r)){if(!t.h.D&&t._<1)return;Z_(t,r),e&&e.A.l||eG(t,r)}}function eG(t,e,n){n===void 0&&(n=!1),!t.l&&t.h.D&&t.m&&x1e(e,n)}function Roe(t,e){var n=t[ns];return(n?md(n):t)[e]}function f4e(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var o=Object.getOwnPropertyDescriptor(n,e);if(o)return o;n=Object.getPrototypeOf(n)}}function A6(t){t.P||(t.P=!0,t.l&&A6(t.l))}function Hoe(t){t.o||(t.o=v1e(t.t))}function TF(t,e,n){var o=A1e(e)?S9("MapSet").F(e,n):w1e(e)?S9("MapSet").T(e,n):t.O?function(r,i){var a=Array.isArray(r),l={i:a?1:0,A:i?i.A:$_(),P:!1,I:!1,R:{},l:i,t:r,k:null,o:null,j:null,C:!1},s=l,c=Yse;a&&(s=[l],c=RD);var u=Proxy.revocable(s,c),d=u.revoke,f=u.proxy;return l.k=f,l.j=d,f}(e,n):S9("ES5").J(e,n);return(n?n.A:$_()).p.push(o),o}function jpt(t){return nR(t)||Dm(22,t),function e(n){if(!q6(n))return n;var o,r=n[ns],i=PH(n);if(r){if(!r.P&&(r.i<4||!S9("ES5").K(r)))return r.t;r.I=!0,o=h4e(n,i),r.I=!1}else o=h4e(n,i);return oR(o,function(a,l){r&&kpt(r.t,a)===l||SWe(o,a,e(l))}),i===3?new Set(o):o}(t)}function h4e(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return v1e(t)}function Bpt(){function t(l,s){function c(){this.constructor=l}r(l,s),l.prototype=(c.prototype=s.prototype,new c)}function e(l){l.o||(l.R=new Map,l.o=new Map(l.t))}function n(l){l.o||(l.o=new Set,l.t.forEach(function(s){if(q6(s)){var c=TF(l.A.h,s,l);l.p.set(s,c),l.o.add(c)}else l.o.add(s)}))}function o(l){l.g&&Dm(3,JSON.stringify(md(l)))}var r=function(l,s){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)u.hasOwnProperty(d)&&(c[d]=u[d])})(l,s)},i=function(){function l(c,u){return this[ns]={i:2,l:u,A:u?u.A:$_(),P:!1,I:!1,o:void 0,R:void 0,t:c,k:this,C:!1,g:!1},this}t(l,Map);var s=l.prototype;return Object.defineProperty(s,"size",{get:function(){return md(this[ns]).size}}),s.has=function(c){return md(this[ns]).has(c)},s.set=function(c,u){var d=this[ns];return o(d),md(d).has(c)&&md(d).get(c)===u||(e(d),A6(d),d.R.set(c,!0),d.o.set(c,u),d.R.set(c,!0)),this},s.delete=function(c){if(!this.has(c))return!1;var u=this[ns];return o(u),e(u),A6(u),u.t.has(c)?u.R.set(c,!1):u.R.delete(c),u.o.delete(c),!0},s.clear=function(){var c=this[ns];o(c),md(c).size&&(e(c),A6(c),c.R=new Map,oR(c.t,function(u){c.R.set(u,!1)}),c.o.clear())},s.forEach=function(c,u){var d=this;md(this[ns]).forEach(function(f,p){c.call(u,d.get(p),p,d)})},s.get=function(c){var u=this[ns];o(u);var d=md(u).get(c);if(u.I||!q6(d)||d!==u.t.get(c))return d;var f=TF(u.A.h,d,u);return e(u),u.o.set(c,f),f},s.keys=function(){return md(this[ns]).keys()},s.values=function(){var c,u=this,d=this.keys();return(c={})[gB]=function(){return u.values()},c.next=function(){var f=d.next();return f.done?f:{done:!1,value:u.get(f.value)}},c},s.entries=function(){var c,u=this,d=this.keys();return(c={})[gB]=function(){return u.entries()},c.next=function(){var f=d.next();if(f.done)return f;var p=u.get(f.value);return{done:!1,value:[f.value,p]}},c},s[gB]=function(){return this.entries()},l}(),a=function(){function l(c,u){return this[ns]={i:3,l:u,A:u?u.A:$_(),P:!1,I:!1,o:void 0,t:c,k:this,p:new Map,g:!1,C:!1},this}t(l,Set);var s=l.prototype;return Object.defineProperty(s,"size",{get:function(){return md(this[ns]).size}}),s.has=function(c){var u=this[ns];return o(u),u.o?!!u.o.has(c)||!(!u.p.has(c)||!u.o.has(u.p.get(c))):u.t.has(c)},s.add=function(c){var u=this[ns];return o(u),this.has(c)||(n(u),A6(u),u.o.add(c)),this},s.delete=function(c){if(!this.has(c))return!1;var u=this[ns];return o(u),n(u),A6(u),u.o.delete(c)||!!u.p.has(c)&&u.o.delete(u.p.get(c))},s.clear=function(){var c=this[ns];o(c),md(c).size&&(n(c),A6(c),c.o.clear())},s.values=function(){var c=this[ns];return o(c),n(c),c.o.values()},s.entries=function(){var c=this[ns];return o(c),n(c),c.o.entries()},s.keys=function(){return this.values()},s[gB]=function(){return this.values()},s.forEach=function(c,u){for(var d=this.values(),f=d.next();!f.done;)c.call(u,f.value,f.value,this),f=d.next()},l}();Npt("MapSet",{F:function(l,s){return new i(l,s)},T:function(l,s){return new a(l,s)}})}var p4e,PF,S1e=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Ypt=typeof Map<"u",Opt=typeof Set<"u",g4e=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",TWe=S1e?Symbol.for("immer-nothing"):((p4e={})["immer-nothing"]=!0,p4e),qm=S1e?Symbol.for("immer-draftable"):"__$immer_draftable",ns=S1e?Symbol.for("immer-state"):"__$immer_state",gB=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",Vpt=""+Object.prototype.constructor,T1e=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,_pt=Object.getOwnPropertyDescriptors||function(t){var e={};return T1e(t).forEach(function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)}),e},Bse={},Yse={get:function(t,e){if(e===ns)return t;var n=md(t);if(!Use(n,e))return function(r,i,a){var l,s=f4e(i,a);return s?"value"in s?s.value:(l=s.get)===null||l===void 0?void 0:l.call(r.k):void 0}(t,n,e);var o=n[e];return t.I||!q6(o)?o:o===Roe(t.t,e)?(Hoe(t),t.o[e]=TF(t.A.h,o,t)):o},has:function(t,e){return e in md(t)},ownKeys:function(t){return Reflect.ownKeys(md(t))},set:function(t,e,n){var o=f4e(md(t),e);if(o!=null&&o.set)return o.set.call(t.k,n),!0;if(!t.P){var r=Roe(md(t),e),i=r==null?void 0:r[ns];if(i&&i.t===n)return t.o[e]=n,t.R[e]=!1,!0;if(Lpt(n,r)&&(n!==void 0||Use(t.t,e)))return!0;Hoe(t),A6(t)}return t.o[e]===n&&(n!==void 0||e in t.o)||Number.isNaN(n)&&Number.isNaN(t.o[e])||(t.o[e]=n,t.R[e]=!0),!0},deleteProperty:function(t,e){return Roe(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Hoe(t),A6(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=md(t),o=Reflect.getOwnPropertyDescriptor(n,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:n[e]}},defineProperty:function(){Dm(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Dm(12)}},RD={};oR(Yse,function(t,e){RD[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),RD.deleteProperty=function(t,e){return RD.set.call(this,t,e,void 0)},RD.set=function(t,e,n){return Yse.set.call(this,t[0],e,n,t[0])};var Gpt=function(){function t(n){var o=this;this.O=g4e,this.D=!0,this.produce=function(r,i,a){if(typeof r=="function"&&typeof i!="function"){var l=i;i=r;var s=o;return function(A){var y=this;A===void 0&&(A=l);for(var S=arguments.length,C=Array(S>1?S-1:0),P=1;P1?u-1:0),f=1;f=0;r--){var i=o[r];if(i.path.length===0&&i.op==="replace"){n=i.value;break}}r>-1&&(o=o.slice(r+1));var a=S9("Patches").$;return nR(n)?a(n,o):this.produce(n,function(l){return a(l,o)})},t}(),Hg=new Gpt,JP=Hg.produce;Hg.produceWithPatches.bind(Hg);Hg.setAutoFreeze.bind(Hg);Hg.setUseProxies.bind(Hg);Hg.applyPatches.bind(Hg);Hg.createDraft.bind(Hg);Hg.finishDraft.bind(Hg);/** +AC will not run if the highest outside temperature of the day is lower than the setpoint plus this threshold.`,Press:"Press",Open:"Open",Save:"Save",SaveAsImage:"Save as Image",SaveAsCsv:"Save as CSV",Update:"Update",Paste:"Paste",Copy:"Copy",Cut:"Cut",Delete:"Delete",Add:"Add",Lock:"Lock",Translucent:"Translucent",Transparency:"Transparency",Color:"Color",Pattern:"Pattern",Texture:"Texture",Size:"Size",Thickness:"Thickness",Yes:"Yes",No:"No",OK:"OK",Cancel:"Cancel",Apply:"Apply",Close:"Close",ApplyTo:"Apply to",Run:"Run",Pause:"Pause",Resume:"Resume",Clear:"Clear",Warning:"Warning",Caution:"Caution",Reminder:"Reminder",Length:"Length",Width:"Width",Height:"Height",Radius:"Radius",Angle:"Angle",Azimuth:"Azimuth",Coordinates:"Coordinates",Weather:"Weather",Show:"Show",Animate:"Animate",Date:"Date",Time:"Time",Title:"Title",Owner:"Owner",Action:"Action",Rename:"Rename",Location:"Location",Latitude:"Latitude",Month:"Month",Day:"Day",Hour:"Hour",Daylight:"Daylight",Radiation:"Radiation",Temperature:"Temperature",kWh:"kWh",dollar:"dollar",MeterPerSecond:"m/s",NorthInitial:"N",SouthInitial:"S",EastInitial:"E",WestInitial:"W",Fixed:"Fixed",Elements:"Elements",Energy:"Energy",Unknown:"Unknown",Label:"Label",Description:"Description",NoDescription:"No description",MaximumCharacters:"Maximum characters",Author:"Author",Publisher:"Publisher",Building:"Building",ResidentialBuilding:"Residential Building",CommercialBuilding:"Commercial Building",SchoolBuilding:"School Building",TouristAttraction:"Tourist Attraction",UnderConstruction:"Under Construction",Photovoltaic:"Photovoltaic",WindPower:"Wind Power",ColocationProjects:"Colocation Projects",Anonymous:"Anonymous",Nickname:"Nickname",Pin:"Pin",Unpin:"Unpin"},shared:{NoTexture:"No Texture",FoundationElement:"Foundation",CuboidElement:"Cuboid",PolygonElement:"Polygon",SensorElement:"Sensor",SolarPanelElement:"Solar Panel",SolarWaterHeaterElement:"Solar Water Heater",ParabolicDishElement:"Parabolic Dish",ParabolicTroughElement:"Parabolic Trough",FresnelReflectorElement:"Fresnel Reflector",HeliostatElement:"Heliostat",WindTurbineElement:"Wind Turbine",LightElement:"Light",ElementLocked:"Locked",ModelType:"Model Type",OutputBreakdown:"Breakdown",MoreResults:"More Results"},message:{NewVersionAvailable:"A new version is available",CalculationMayBeSlowDoYouWantToContinue:"Calculation may be slow. Do you want to continue?",IncreaseSolarRadiationHeatmapGridCellSizeToSpeedUp:"Increase solar radiation heatmap grid cell size to speed up",ModelNotFound:"Model not found",CannotSignIn:"Cannot sign in",CannotSignOut:"Cannot sign out",YourAccountWasCreated:"Your account was created.",CannotCreateAccount:"Cannot create an account",YourAccountSettingsWereSaved:"Your account settings were saved.",CannotSaveYourAccountSettings:"Cannot save your account settings",CannotSaveYourFileToCloud:"Cannot save your file to the cloud",CannotCreateNewProject:"Cannot create a new project",CannotCreateNewProjectWithoutTitle:"Cannot create a new project without a title",CannotOpenYourProjects:"Cannot open your projects",CannotOpenProject:"Cannot open the project",CannotDeleteProject:"Cannot delete the project",CannotRenameProject:"Cannot rename the project",CannotAddDesignToProject:"Cannot add this design to the project",CannotAddDesignToProjectOwnedByOthers:"Cannot add this design to a project owned by others",DesignRemovedFromProject:"The design was successfully removed from the project",CannotRemoveDesignFromProject:"Cannot remove this design from the project",CannotUpdateProject:"Cannot update the project",CannotFetchProjectData:"Cannot fetch project data",TitleUsedChooseDifferentOne:"This title has been used. Choose a different one",CloudFileWithTitleExistsDoYouWantToOverwrite:"A cloud file with the title exists. Do you want to overwrite it?",CloudFileNotFound:"The cloud file was not found",CannotLoadModelsOnMap:"Cannot load models on map",CannotLoadLeaderboard:"Cannot load leaderboard",CannotPublishModelOnMap:"Cannot publish model on map",CannotLikeModelFromMap:"Cannot like model from map",CannotDeleteModelFromMap:"Cannot delete model from map",ModelDeletedFromMap:"Model is deleted from map",DoYouWantToDeleteModelFromMap:"Do you want to delete the model from map?",CannotOpenCloudFile:"Cannot open the cloud file",CannotReadCloudFile:"Cannot read the cloud file",CannotWriteCloudFile:"Cannot write the cloud file",CloudFileCopied:"Cloud file copied",CannotOpenCloudFolder:"Cannot open your cloud folder",CannotDeleteCloudFile:"Cannot delete the cloud file",CannotRenameCloudFile:"Cannot rename the cloud file",DoYouWantToSaveChanges:"Do you want to save changes?",NotApplicableToSelectedAction:"Not Applicable to Selected Action",ThisElementIsLocked:"This element is locked.",ThisCannotBeUndone:"This cannot be undone.",AzimuthOfNorthIsZero:"Azimuth of north is 0°",CounterclockwiseAzimuthIsPositive:"Counter-clockwise is positive",SouthFacingIsZero:"South-facing is 0°",ClockwiseRotationIsPositive:"Clockwise is positive",MoveCancelledBecauseOfOverlap:"Move cancelled because of overlap.",MoveOutsideBoundaryCancelled:"Move outside the boundary cancelled.",RotationCancelledBecauseOfOverlap:"Rotation cancelled because of overlap.",RotationOutsideBoundaryCancelled:"Rotation outside the boundary cancelled.",ResizingCancelledBecauseOfOverlap:"Resizing cancelled because of overlap.",ResizingOutsideBoundaryCancelled:"Resizing outside the boundary cancelled.",CannotPasteOutsideBoundary:"Cannot paste outside the boundary.",CannotPasteBecauseOfOverlap:"Cannot paste because of overlap.",CannotMoveObjectTooFar:"Cannot move object too far.",ExistingSolarPanelsWillBeRemovedBeforeApplyingNewLayout:"Existing solar panels will be removed before applying the new layout.",DoYouWantToContinue:"Do you want to continue?",SolarPanelsCannotIntersectWithGround:"Solar panels cannot intersect with the ground.",SolarPanelsCannotOverlapWithOneAnother:"Solar panels cannot overlap with one another.",ScreenshotSaved:"A screenshot was saved.",CsvFileSaved:"A CSV file was saved.",SimulationStarted:"Simulation started.",SimulationCompleted:"Simulation completed.",SimulationAborted:"Simulation aborted.",SimulationPaused:"Simulation paused.",CancelSimulation:"Cancel simulation",PauseSimulation:"Pause simulation",ResumeSimulation:"Resume simulation",SimulationWillNotStartDueToErrors:"Simulation will not start due to errors",SimulationWillStartDespiteWarnings:"Simulation will start despite warnings.",EvolutionStarted:"Evolution started.",EvolutionCompleted:"Evolution completed.",EvolutionAborted:"Evolution aborted.",EvolutionPaused:"Evolution paused.",EncounterEvolutionError:"Encountered an evolution error.",CancelEvolution:"Cancel evolution",PauseEvolution:"Pause evolution",ResumeEvolution:"Resume evolution",ConvergenceThresholdHasBeenReached:"The convergence threshold has been reached.",MaximumNumberOfGenerationsHasBeenReached:"The maximum number of generations has been reached.",MaximumNumberOfStepsHasBeenReached:"The maximum number of steps has been reached.",ObjectiveFunctionTypeError:"The current objective function is not supported by this operation. Please start from the menu.",WallsAreNotAtSameHeight:"Walls are not at the same height.",WallsAreNotPerpendicular:"Walls are not perpendicular.",WallsAreNotConnected:"Walls are not connected.",WallsNumberNeedToBeFour:"The number of walls needs to be four.",BuildingContainsEmptyWall:"Building contains one or more empty wall.",BuildingRoofMissing:"Building has a missing roof.",UnknownErrors:"Unknown errors.",SigningOutAnonymousAccount:"Are you sure you want to sign out? This anonymous account will be lost."},menu:{AnalysisOptions:"Analysis Options",option:{GridCellSize:"Grid Cell Size",SamplingFrequency:"Sampling Frequency",TimesPerHour:"Times per Hour",DaysPerYear:"Days per Year"},mainMenu:"Main Menu",cloudMenu:"Cloud Menu",projectSubMenu:"Project",project:{CreateNewProject:"Create New Project",OpenProject:"Open Project",SaveProject:"Save Project",SaveProjectAs:"Save Project As",YouMustLogInToCreateProject:"You must log in to create a new project",YouMustLogInToOpenProject:"You must log in to open a project"},fileSubMenu:"File",file:{CreateNewFile:"Create New File",OpenLocalFile:"Open Local File",SaveAsLocalFile:"Save as Local File",SavingAbortedMustHaveValidFileName:"Saving aborted! You must have a valid file name",OpenCloudFile:"Open Cloud File",SaveCloudFile:"Save Cloud File",SaveAsCloudFile:"Save as Cloud File",SavingAbortedMustHaveValidTitle:"Saving aborted! You must have a valid title for a cloud file",ToSaveYourWorkPleaseSignIn:"To save your work, please sign in.",TakeScreenshot:"Take Screenshot",UseCloudFileName:"Use Cloud File Name",PublishOnModelsMap:"Publish on Models Map",PublishedOnModelsMap:"Your model has been published on the Models Map",UpdatedOnModelsMap:"Your model has been updated on the Models Map",YouMustLogInToPublishYourModel:"You must log in to publish your model",YouCannotPublishAModelThatYouDoNotOwn:"You cannot publish a model that you do not own",YouMustSaveModelOnCloudBeforePublishingIt:"You must save the model on the cloud before publishing it"},editSubMenu:"Edit",edit:{Undo:"Undo",Redo:"Redo"},viewSubMenu:"View",view:{NavigationView:"Navigation View",TwoDimensionalView:"2D View",ResetView:"Reset",ZoomIn:"Zoom In",ZoomOut:"Zoom Out",AutoRotate:"Auto Rotate",ShowShadow:"Show Shadow",ShowSurfaceShininess:"Show Surface Shininess",TranslucentFloatingWindows:"Translucent Floating Windows",accessoriesSubMenu:"Accessories",accessories:{SiteInformation:"Site Information",DesignInformation:"Design Information",Instruction:"Instruction",StickyNote:"Sticky Note",Note:"Note"}},settingsSubMenu:"Settings",settings:{WeatherData:"Weather Data",DiurnalTemperature:"Diurnal Temperature",Heliodon:"Heliodon",SunAndTime:"Sun & Time",CustomSolarPanels:"Custom Solar Panels",CustomizeSolarPanel:"Customize Solar Panel"},benchmarksSubMenu:"Benchmarks",benchmarks:{SolarRadiationPredictionVsMeasurement:"Solar Radiation Prediction vs. Measurement",BESTESTCase600:"Building Energy Simulation Test: BESTEST Case 600",BESTESTCase610:"Building Energy Simulation Test: BESTEST Case 610",BESTESTCase620:"Building Energy Simulation Test: BESTEST Case 620",BESTESTCase630:"Building Energy Simulation Test: BESTEST Case 630"},graph:{LineWidth:"Line Width",SymbolSize:"Symbol Size",BarCategoryGap:"Bar Category Gap",ShowHorizontalGridLines:"Show Horizontal Grid Lines",ShowVerticalGridLines:"Show Vertical Grid Lines"},analysisSubMenu:"Analysis",physicsSubMenu:"Physics",physics:{DailySolarRadiationHeatmap:"Daily Solar Radiation Heatmap",SolarRadiationHeatmapOptions:"Solar Radiation Heatmap Options",SolarRadiationHeatmapGridCellSize:"Solar Radiation Heatmap Grid Cell Size",SolarRadiationHeatmapMaxValue:"Solar Radiation Heatmap Maximum Value",SolarRadiationHeatmapNoAnimation:"No Animation for Static Model",ReflectionHeatmap:"Reflection Heatmap"},sensorSubMenu:"Sensor",sensor:{CollectDailyData:"Collect Daily Data",CollectYearlyData:"Collect Yearly Data",SensorSimulationNoAnimation:"No Animation for Collecting Sensor Data"},buildingSubMenu:"Building",building:{AnalyzeDailyBuildingEnergy:"Analyze Daily Building Energy",AnalyzeYearlyBuildingEnergy:"Analyze Yearly Building Energy",EnergyAnalysisOptions:"Energy Analysis Options",EnergyGridCellSize:"Energy Grid Cell Size",BuildingEnergySimulationNoAnimation:"No Animation for Building Energy Simulation"},solarPanelSubMenu:"Solar Panel",solarPanel:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield",AnalyzeVisibility:"Analyze Visibility",PanelDiscretization:"Panel Discretization",Exact:"Exact",Approximate:"Approximate",EnergyGridCellSize:"Energy Grid Cell Size",VisibilityGridCellSize:"View Factor Grid Cell Size",EnergyAnalysisOptions:"Energy Analysis Options",VisibilityAnalysisOptions:"Visibility Analysis Options",SolarPanelSimulationNoAnimation:"No Animation for Solar Panel Simulation"},parabolicTroughSubMenu:"Parabolic Trough",parabolicTrough:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield"},parabolicDishSubMenu:"Parabolic Dish",parabolicDish:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield"},fresnelReflectorSubMenu:"Fresnel Reflector",fresnelReflector:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield"},heliostatSubMenu:"Heliostat",heliostat:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield"},solarUpdraftTowerSubMenu:"Solar Updraft Tower",solarUpdraftTower:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield",SolarUpdraftTowerSimulationNoAnimation:"No Animation for Solar Updraft Tower Simulation"},tutorialsSubMenu:"Tutorials",solarEnergyScienceSubMenu:"Solar Science",solarEnergyScienceTutorials:{SunAngles:"Sun Angles Relative to an Observer on the Ground",InsolationAndClimate:"Insolation and Climate",SolarRadiationToBox:"Solar Radiation to a Box"},buildingScienceSubMenu:"Building Science",buildingScienceTutorials:{ThermalEnvelopeVsBuildingEnvelope:"Thermal Envelope vs. Building Envelope",EffectOfSizeOnBuildingEnergy:"Effect of Size on Building Energy",EffectOfOrientationOnBuildingEnergy:"Effect of Orientation on Building Energy",EffectOfInsulationOnBuildingEnergy:"Effect of Insulation on Building Energy",EffectOfRoofColorOnBuildingEnergy:"Effect of Roof Color on Building Energy",EffectOfEavesOverhangLengthOnBuildingEnergy:"Effect of Eaves Overhang Length on Building Energy",EffectOfWindowSHGCOnBuildingEnergy:"Effect of Window Solar Heat Gain on Building Energy",EffectOfThermostatSetpointOnBuildingEnergy:"Effect of Thermostat Setpoint on Building Energy",EffectOfSolarPanelsOnBuildingEnergy:"Effect of Solar Panels on Building Energy",EffectOfGroundTemperatureOnBuildingEnergy:"Effect of Ground Temperature on Building Energy",EffectOfTreesOnBuildingEnergy:"Effect of Trees on Building Energy"},buildingDesignSubMenu:"Building Design",buildingDesignTutorials:{CapeCodStyleHouseWithShedDormer:"Cape Cod Style House with Shed Dormer",MansardRoofWithDormers:"Mansard Roof with Dormers",GableRoofVsHipRoof:"Gable Roof vs. Hip Roof",ColonialVsSaltbox:"Colonial vs. Saltbox",GambrelRoofVsMansardRoof:"Gambrel Roof vs. Mansard Roof",CombinationRoofVsBonnetRoof:"Combination Roof vs. Bonnet Roof",DutchGableRoof:"Dutch Gable Roof",GableAndValleyRoof:"Gable and Valley Roof",ClerestoryRoof:"Clerestory Roof",MonitorRoof:"Monitor Roof",AFrameHouse:"A-Frame House",HalfTimberedHouse:"Half-Timbered House",AllBasicRoofTypes:"All Basic Roof Types"},photovoltaicSolarPowerSubMenu:"Photovoltaic Solar Power",photovoltaicSolarPowerTutorials:{EffectOfTiltAngleOfSolarPanel:"Effect of Tilt Angle of a Solar Panel",EffectOfAzimuthOfSolarPanel:"Effect of Azimuth of a Solar Panel",SolarPanelTypes:"Solar Panel Types",DefineYourOwnSolarPanels:"Define Your Own Solar Panels",VerticalBifacialSolarPanels:"Vertical Bifacial Solar Panels",CompareMonofacialAndBifacialSolarPanels:"Monofacial vs. Bifacial Solar Panels",SolarTrackers:"Solar Trackers",CoveringGroundWithSolarPanels:"Why Just Covering the Ground with Solar Panels is not a Good Idea",InterRowSpacingOfSolarPanelArray:"Effect of Inter-Row Spacing in a Solar Panel Array",EffectOfOrientationOfSolarPanels:"Effect of Orientation of Solar Panels",SolarPanelArrayAutomaticLayout:"Solar Panel Array Automatic Layout"},concentratedSolarPowerSubMenu:"Concentrated Solar Power",concentratedSolarPowerTutorials:{EffectOfAzimuthOfParabolicTrough:"Effect of Azimuth of a Parabolic Trough",EffectOfLatusRectumOfParabolicTrough:"Effect of Latus Rectum of a Parabolic Trough",FocusSunlightWithParabolicDish:"Focus Sunlight with a Parabolic Dish",LinearFresnelReflectors:"Linear Fresnel Reflectors",EffectOfAbsorberPipeHeightForLinearFresnelReflectors:"Effect of Absorber Pipe Height for Linear Fresnel Reflectors",EffectOfAzimuthOfLinearFresnelReflectors:"Effect of Azimuth of Linear Fresnel Reflectors",LinearFresnelReflectorsWithTwoAbsorbers:"Linear Fresnel Reflectors with Two Absorbers",CosineEfficiencyOfHeliostats:"Cosine Efficiency of Heliostats",ShadowingAndBlockingOfHeliostats:"Shadowing and Blocking of Heliostats",EffectSolarPowerTowerHeight:"Effect of Solar Power Tower Height",SolarPowerTower:"Solar Power Tower"},otherTypesOfSolarPowerSubMenu:"Other Types of Solar Power",otherTypesOfSolarPowerTutorials:{SolarWaterHeaters:"Solar Water Heaters",SolarUpdraftTower:"Solar Updraft Tower"},windPowerSubMenu:"Wind Power",windPowerTutorials:{EffectOfBladeNumberOfWindTurbine:"Effect of Blade Number of Wind Turbine",EffectOfPitchAngleOfWindTurbineBlades:"Effect of Pitch Angle of Wind Turbine Blades",BirdSafeBladeDesign:"Bird-Safe Blade Design",OffshoreWindFarm:"Offshore Wind Farm"},colocationSubMenu:"Colocation",colocationTutorials:{AgricultureSolarWindColocation:"Agriculture-Solar-Wind Colocation"},generativeDesignSubMenu:"Generative Design",generativeDesignTutorials:{MonofacialSolarPanelArrayTiltAngle:"The Tilt Angle of a Monofacial Solar Panel Array",BifacialSolarPanelArrayTiltAngle:"The Tilt Angle of a Bifacial Solar Panel Array",OutputOfSolarPanelArrayInDifferentPlaces:"The Output of a Solar Panel Array in Different Places",SimpleSolarFarmParetoFront:"The Pareto Front for Designing a Simple Solar Farm"},examplesSubMenu:"Examples",solarEnergySubMenu:"Solar Energy",solarEnergyExamples:{SunBeamAndHeliodon:"Sun Beam and Heliodon",RooftopSolarPanels:"Rooftop Solar Panels",NevadaSolarOneParabolicTroughArray:"Nevada Solar One Parabolic Trough Array",TooeleParabolicDishArray:"Tooele Parabolic Dish Array",PS10SolarPowerTower:"PS10 Solar Power Tower",TucsonLinearFresnelReflectors:"Tucson Linear Fresnel Reflectors",SolarCanopyFormFactors:"Solar Canopy Form Factors",SolarCanopyOverBleachers:"Solar Canopy Over Bleachers",SolarCanopyOverGarage:"Solar Canopy Over Garage",SolarBusStop:"Solar Bus Stop",SolarFacadeTesla:"Tesla Solar Façade",BuildingIntegratedPhotovoltaics:"Building-Integrated Photovoltaics",Floatovoltaics:"Floatovoltaics",Agrivoltaics:"Agrivoltaics",VegetativeBuffer:"Vegetative Buffer",RainbowSwashSolarFarmBostonMA:"Rainbow Swash Solar Farm in Boston, MA",MickeyMouseSolarFarmOrlandoFL:"Mickey Mouse Solar Farm in Orlando, FL",SolarPanelsOverCanalBakersfieldCA:"Hypothetical Solar Panels Over Canal in Bakersfield, CA",SolarNoiseBarrierLexingtonMA:"Hypothetical Solar Noise Barrier in Lexington, MA",HSATSolarTrackersRaleighNC:"Horizontal Single Axis Trackers (HSAT) in Raleigh, NC",AADATSolarTrackersLancasterCA:"Azimuth–Altitude Dual Axis Trackers (AADAT) in Lancaster, CA",SolarUpdraftTowerInCity:"Solar Updraft Tower in City"},builtEnvironmentSubMenu:"Built Environment",residentialBuildingsSubMenu:"Residential Buildings",residentialBuildingExamples:{ColonialHouse:"Colonial House",DutchColonialHouse:"Dutch Colonial House",TShapedHouse:"T-Shaped House",CapeCodHouseWithGarage:"Cape Cod House with Garage",Solarium:"Solarium",Church1:"Church 1",Cathedral1:"Cathedral 1",Cathedral2:"Cathedral 2",Mosque1:"Mosque 1",AdobeTaosHouse:"Adobe Taos House",RanchHouse:"Ranch House",BonnetHouse:"Bonnet House",BarnStyleHouse:"Barn Style House",ModernHouse:"Modern House",ButterflyRoofHouse:"Butterfly Roof House"},commercialBuildingsSubMenu:"Commercial Buildings",commercialBuildingExamples:{WhiteHouse:"White House",HaroldWashingtonCollege:"Harold Washington College",BilimMersinTurkiye:"BILIM, Mersin, Turkiye",SpanishStyleHotel:"Spanish Style Hotel",ApartmentBuilding:"Apartment Building",OfficeBuilding:"Office Building",Hotel:"Hotel"},buildingComplexesSubMenu:"Building Complexes",buildingComplexExamples:{SouthBurlingtonHighSchoolVermont:"South Burlington High School, VT",MescaleroApacheSchoolNewMexico:"Mescalero Apache School, NM"},urbanPlanningSubMenu:"Urban Planning",urbanPlanningExamples:{CityBlockHeatmap:"City Block Heatmap",ChicagoSkyline:"Chicago Skyline"},otherBuildingsSubMenu:"Other Buildings",otherBuildingExamples:{Greenhouse:"Greenhouse",Pavilion:"Pavilion in a Park",OctagonalPagoda:"Octagonal Pagoda",OceanFront:"Ocean Front",EgyptianPyramids:"Egyptian Pyramids",MayanPyramid:"Mayan Pyramid",SiOSePol:"Si-o-se-pol",StackedCuboids:"Stacked Cuboids"},artificialIntelligenceSubMenu:"Artificial Intelligence",artificialIntelligenceExamples:{OptimizingTiltAngleOfOneSolarPanelRow:"Optimizing the Tilt Angle of a Solar Panel Row",OptimizingTiltAnglesOfMultipleSolarPanelRows:"Optimizing the Tilt Angles of Multiple Solar Panel Rows",SolarFarmGenerativeDesign:"Solar Farm Generative Design",SolarFarmGenerativeDesignWithBlock:"Solar Farm Generative Design in the Presence of a Block",FitchburgSolarFarmGenerativeDesign:"Fitchburg Solar Farm Generative Design"},languageSubMenu:"Language",publicSubMenu:"Public",ModelsGallery:"Models Gallery",ModelsMap:"Models Map",AboutUs:"About Us"},avatarMenu:{AccountSettings:"Account Settings",PrivacyStatementTitle:"User Privacy Protection Statement",PrivacyStatement:"When you sign in, your Google ID is used to create and access your Aladdin account. Only a random alphanumeric string is stored in our database as a reference. No personally identifiable data such as your name or email is ever gathered. For more information, see our ",SignIn:"Sign In",SignInAsMe:"Sign in as me",SignInAnonymously:"Sign in anonymously",SignOut:"Sign Out",IfYouAreAStudent:"If you are a student"},skyMenu:{Axes:"Axes",Theme:"Theme",ThemeDefault:"Default",ThemeDesert:"Desert",ThemeDune:"Dune",ThemeForest:"Forest",ThemeGrassland:"Grassland",ThemeHill:"Hill",ThemeLake:"Lake",ThemeMountain:"Mountain",ThemeRural:"Rural",SunlightAttenuationCoefficientInAir:"Sunlight Attenuation Coefficient in Air",ConvectiveCoefficientOfAir:"Convective Coefficient of Air",HighestTemperatureTimeInMinutes:"Highest Temperature Time (Minutes)",SelectSunAnglesToShow:"Select Sun Angles to Show",ShowAzimuthAngle:"Show Azimuth Angle",ShowElevationAngle:"Show Elevation Angle",ShowZenithAngle:"Show Zenith Angle",DirectLightBrightnessAtNoon:"Direct Light Brightness at Noon",AmbientLightBrightnessAtNoon:"Ambient Light Brightness at Noon"},groundMenu:{MonthlyIrradianceLoss:"Monthly Irradiance Loss",Vegetation:"Vegetation",LeafOutDay:"Leaf-Out Day",LeafOffDay:"Leaf-Off Day",Albedo:"Albedo",ImageOnGround:"Image on Ground",WaterSurface:"Water Surface",RemoveAllUnlockedTrees:"Remove All Unlocked Trees",RemoveAllUnlockedFlowers:"Remove All Unlocked Flowers",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",RemoveAllUnlockedPeople:"Remove All Unlocked People",RemoveAllUnlockedFoundations:"Remove All Unlocked Foundations",RemoveAllUnlockedCuboids:"Remove All Unlocked Cuboids",DoYouReallyWantToRemoveAllPeople:"Do you really want to remove all the people who are not locked",DoYouReallyWantToRemoveAllTrees:"Do you really want to remove all the trees that are not locked",DoYouReallyWantToRemoveAllFlowers:"Do you really want to remove all the flowers that are not locked",DoYouReallyWantToRemoveAllSolarPanels:"Do you really want to remove all the solar panels that are not locked",DoYouReallyWantToRemoveAllFoundations:"Do you really want to remove all the foundations that are not locked",DoYouReallyWantToRemoveAllCuboids:"Do you really want to remove all the cuboids that are not locked",LockAllUnlockedElements:"Lock All Unlocked Elements",UnlockAllLockedElements:"Unlock All Locked Elements"},labelSubMenu:{Label:"Label",LabelText:"Label Text",LabelHeight:"Label Height",LabelSize:"Label Size",LabelFontSize:"Font Size",LabelColor:"Label Color",KeepShowingLabel:"Keep Showing Label"},foundationMenu:{RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",RemoveAllUnlockedParabolicTroughs:"Remove All Unlocked Parabolic Troughs",RemoveAllUnlockedParabolicDishes:"Remove All Unlocked Parabolic Dishes",RemoveAllUnlockedFresnelReflectors:"Remove All Unlocked Fresnel Reflectors",RemoveAllUnlockedHeliostats:"Remove All Unlocked Heliostats",RemoveAllUnlockedWindTurbines:"Remove All Unlocked Wind Turbines",RemoveAllUnlockedSensors:"Remove All Unlocked Sensors",RemoveAllUnlockedLights:"Remove All Unlocked Lights",RemoveAllUnlockedWalls:"Remove All Unlocked Walls",RemoveAllUnlockedWindows:"Remove All Unlocked Windows",RemoveAllUnlockedDoors:"Remove All Unlocked Doors",RemoveAllUnlockedPolygons:"Remove All Unlocked Polygons",RemoveAllUnlockedHumans:"Remove All Unlocked Humans",RemoveAllUnlockedTrees:"Remove All Unlocked Trees",RemoveAllUnlockedFlowers:"Remove All Unlocked Flowers",Racks:"Racks",Texture01:"Texture 1",Texture02:"Texture 2",Texture03:"Texture 3",Texture04:"Texture 4",Texture05:"Texture 5",Texture06:"Texture 6",Texture07:"Texture 7",Texture08:"Texture 8",Texture09:"Texture 9",Texture10:"Texture 10",SolarPanels:"Solar Panels",SolarPanelArray:"Solar Panel Array",DoYouReallyWantToRemoveAllSolarPanelsOnFoundation:"Do you really want to remove all the solar panels on this foundation that are not locked",ParabolicTroughs:"Parabolic Troughs",DoYouReallyWantToRemoveAllParabolicTroughsOnFoundation:"Do you really want to remove all the parabolic troughs on this foundation that are not locked",ParabolicDishes:"Parabolic Dishes",DoYouReallyWantToRemoveAllParabolicDishesOnFoundation:"Do you really want to remove all the parabolic dishes on this foundation that are not locked",FresnelReflectors:"Fresnel Reflectors",DoYouReallyWantToRemoveAllFresnelReflectorsOnFoundation:"Do you really want to remove all the Fresnel reflectors on this foundation that are not locked",Heliostats:"Heliostats",DoYouReallyWantToRemoveAllHeliostatsOnFoundation:"Do you really want to remove all the heliostats on this foundation that are not locked",WindTurbines:"Wind Turbines",DoYouReallyWantToRemoveAllWindTurbinesOnFoundation:"Do you really want to remove all the wind turbines on this foundation that are not locked",Sensors:"Sensors",DoYouReallyWantToRemoveAllSensorsOnFoundation:"Do you really want to remove all the sensors on this foundation that are not locked",Lights:"Lights",DoYouReallyWantToRemoveAllLightsOnFoundation:"Do you really want to remove all the lights on this foundation that are not locked",Walls:"Walls",DoYouReallyWantToRemoveAllWallsOnFoundation:"Do you really want to remove all the walls on this foundation that are not locked",Windows:"Windows",DoYouReallyWantToRemoveAllWindowsOnFoundation:"Do you really want to remove all the windows on this foundation that are not locked",Doors:"Doors",DoYouReallyWantToRemoveAllDoorsOnFoundation:"Do you really want to remove all the doors on this foundation that are not locked",Polygons:"Polygons",DoYouReallyWantToRemoveAllPolygonsOnFoundation:"Do you really want to remove all the polygons on this foundation that are not locked",Humans:"Humans",DoYouReallyWantToRemoveAllHumansOnFoundation:"Do you really want to remove all the humans on this foundation who are not locked",Trees:"Trees",DoYouReallyWantToRemoveAllTreesOnFoundation:"Do you really want to remove all the trees on this foundation that are not locked",Flowers:"Flowers",DoYouReallyWantToRemoveAllFlowersOnFoundation:"Do you really want to remove all the flowers on this foundation that are not locked",OnlyThisFoundation:"Only This Foundation",AllConnectedFoundations:"All Connected Foundations",AllSelectedFoundations:"All Selected Foundations",AllFoundations:"All Foundations",AddPolygon:"Add Polygon",SolarStructure:"Solar Structure",GroupMaster:"Group Master",LockAllUnlockedElementsOnThisFoundation:"Lock All Unlocked Elements on This Foundation",UnlockAllLockedElementsOnThisFoundation:"Unlock All Locked Elements on This Foundation",GroundFloorRValue:"Ground Floor R-Value",OnlyThisGroundFloor:"Only This Ground Floor",AllGroundFloors:"All Ground Floors"},solarPowerTowerMenu:{ReceiverTowerForHeliostats:"Receiver Tower for Heliostats",ReceiverTowerPhysicalProperties:"Physical Properties of Receiver Tower",ReceiverTowerHeight:"Height of Receiver Tower",ReceiverTowerRadius:"Radius of Receiver Tower",ReceiverAbsorptance:"Absorptance of Receiver",ReceiverOpticalEfficiency:"Optical Efficiency of Receiver",ReceiverThermalEfficiency:"Thermal Efficiency of Receiver"},solarAbsorberPipeMenu:{AbsorberPipeForFresnelReflectors:"Absorber Pipe for Fresnel Reflectors",AbsorberPipePhysicalProperties:"Physical Properties of Absorber Pipe",AbsorberHeight:"Height of Absorber Pipe",AbsorberApertureWidth:"Aperture Width of Absorber Pipe",AbsorberPipePoleNumber:"Pole Number for Absorber Pipe",AbsorberAbsorptance:"Absorptance of Absorber",AbsorberOpticalEfficiency:"Optical Efficiency of Absorber",AbsorberThermalEfficiency:"Thermal Efficiency of Absorber"},solarUpdraftTowerMenu:{SolarUpdraftTower:"Solar Updraft Tower",SolarUpdraftTowerPhysicalProperties:"Physical Properties of Solar Updraft Tower",SolarUpdraftTowerChimneyHeight:"Solar Updraft Tower Chimney Height",SolarUpdraftTowerChimneyRadius:"Solar Updraft Tower Chimney Radius",SolarUpdraftTowerCollectorHeight:"Solar Updraft Tower Collector Height",SolarUpdraftTowerCollectorRadius:"Solar Updraft Tower Collector Radius",SolarUpdraftTowerCollectorTransmissivity:"Solar Updraft Tower Collector Transmissivity",SolarUpdraftTowerCollectorEmissivity:"Solar Updraft Tower Collector Emissivity",SolarUpdraftTowerDischargeCoefficient:"Solar Updraft Tower Discharge Coefficient",SolarUpdraftTowerTurbineEfficiency:"Solar Updraft Tower Turbine Efficiency"},cuboidMenu:{Texture01:"Texture 1",Texture02:"Texture 2",Texture03:"Texture 3",Texture04:"Texture 4",Texture05:"Texture 5",Texture06:"Texture 6",Texture07:"Texture 7",Texture08:"Texture 8",Texture09:"Texture 9",Texture10:"Texture 10",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",RemoveAllUnlockedSensors:"Remove All Unlocked Sensors",RemoveAllUnlockedPolygons:"Remove All Unlocked Polygons",RemoveAllUnlockedHumans:"Remove All Unlocked Humans",RemoveAllUnlockedTrees:"Remove All Unlocked Trees",RemoveAllUnlockedFlowers:"Remove All Unlocked Flowers",RemoveAllUnlockedLights:"Remove All Unlocked Lights",Racks:"Racks",SolarPanels:"Solar Panels",DoYouReallyWantToRemoveAllSolarPanelsOnCuboid:"Do you really want to remove all the solar panels on this cuboid that are not locked",Lights:"Lights",DoYouReallyWantToRemoveAllLightsOnCuboid:"Do you really want to remove all the lights on this cuboid that are not locked",Sensors:"Sensors",DoYouReallyWantToRemoveAllSensorsOnCuboid:"Do you really want to remove all the sensors on this cuboid that are not locked",Polygons:"Polygons",DoYouReallyWantToRemoveAllPolygonsOnCuboid:"Do you really want to remove all the polygons on this cuboid that are not locked",Humans:"Humans",DoYouReallyWantToRemoveAllHumansOnCuboid:"Do you really want to remove all the humans on this cuboid who are not locked",Trees:"Trees",DoYouReallyWantToRemoveAllTreesOnCuboid:"Do you really want to remove all the trees on this cuboid that are not locked",Flowers:"Flowers",DoYouReallyWantToRemoveAllFlowersOnCuboid:"Do you really want to remove all the flowers on this cuboid that are not locked",OnlyThisCuboid:"Only This Cuboid",AllCuboidsOnSameSurface:"All Cuboids on Same Surface",AllCuboidsAboveSameBase:"All Cuboids Above Same Base",AllSelectedCuboids:"All Selected Cuboids",AllCuboids:"All Cuboids",OnlyThisSide:"Only This Side",AllSidesOfThisCuboid:"All Sides of This Cuboid",AllSidesOfSelectedCuboids:"All Sides of Selected Cuboids",AllSidesOfAllCuboids:"All Sides of All Cuboids",AddPolygon:"Add Polygon",Stackable:"Stackable",GroupMaster:"Group Master"},polygonMenu:{Texture01:"Texture 1",Texture02:"Texture 2",Texture03:"Texture 3",Texture04:"Texture 4",Texture05:"Texture 5",Texture06:"Texture 6",Texture07:"Texture 7",Texture08:"Texture 8",Texture09:"Texture 9",Texture10:"Texture 10",TextBox:"Text Box",FontOutlineColor:"Font Outline Color",FontOutlineWidth:"Font Outline Width",FontStrokeColor:"Font Stroke Color",FontStrokeWidth:"Font Stroke Width",NoOutline:"No Outline",Shiny:"Shiny",Filled:"Filled",FillTexture:"Fill Texture",FillColor:"Fill Color",Opacity:"Opacity",LineColor:"Line Color",LineWidth:"Line Width",LineStyle:"Line Style",SolidLine:"Solid Line",DashedLine:"Dashed Line",DottedLine:"Dotted Line",InsertVertexBeforeIndex:"Insert Vertex Before Index",InsertVertexAfterIndex:"Insert Vertex After Index",DeleteVertex:"Delete Vertex",OnlyThisPolygon:"Only This Polygon",AllPolygonsOnSurface:"All Polygons on the Same Surface",AllPolygonsAboveFoundation:"All Polygons Above Foundation",AllSelectedPolygons:"All Selected Polygons",AllPolygons:"All Polygons",Layout:"Layout",SolarPanelArrayLayout:"Solar Panel Array Layout",SolarPanelArrayLayoutParametricDesign:"Solar Panel Array Layout: Parametric Design",SolarPanelArrayLayoutGenerativeDesign:"Solar Panel Array Layout: Generative Design",SolarPanelArrayModel:"Solar Panel Model",SolarPanelArrayOrientation:"Orientation",SolarPanelArrayTiltAngle:"Tilt Angle",SolarPanelArrayRowWidth:"Row Width",SolarPanelArrayInterRowSpacing:"Inter-Row Spacing",SolarPanelArrayRowSpacing:"Row Spacing",SolarPanelArrayRowAxis:"Row Axis",SolarPanelArrayLeftRightRowAxis:"Left-Right (Relative)",SolarPanelArrayUpDownRowAxis:"Up-Down (Relative)",SolarPanelArrayEastWestRowAxis:"East-West (Absolute)",SolarPanelArrayNorthSouthRowAxis:"North-South (Absolute)",SolarPanelArrayMargin:"Margin",SolarPanelArrayPoleHeight:"Pole Height",SolarPanelArrayPoleSpacing:"Pole Spacing",SolarPanelArrayTotalYearlyCost:"Total Cost",SolarPanelArrayTotalYearlyRevenue:"Total Revenue",SolarPanelArrayTotalYearlyYield:"Total Yield",SolarPanelArrayMeanYearlyYield:"Mean Yield",SolarPanelArrayYearlyProfit:"Profit",LayoutNotAcceptedCheckYourParameters:"This layout is not accepted. Please check your parameters."},optimizationMenu:{Optimization:"Optimization",Parameters:"Parameters",Variables:"Variables",Constants:"Constants",GeneticAlgorithm:"Genetic Algorithm",GeneticAlgorithmSettings:"Genetic Algorithm Settings",ParticleSwarmOptimization:"Particle Swarm Optimization",ParticleSwarmOptimizationSettings:"Particle Swarm Optimization Settings",SolarPanelTiltAngleOptimization:"Solar Panel Tilt Angle Optimization",SolarPanelArrayLayout:"Solar Panel Array Layout",Generation:"Generation",Gene:"Gene",NormalizedVariables:"Normalized Variables",Objective:"Objective",ObjectiveFunctionDailyTotalYield:"Daily Total Yield",ObjectiveFunctionYearlyTotalYield:"Yearly Total Yield",ObjectiveFunctionDailyMeanYield:"Daily Mean Yield",ObjectiveFunctionYearlyMeanYield:"Yearly Mean Yield",ObjectiveFunctionDailyProfit:"Daily Profit",ObjectiveFunctionYearlyProfit:"Yearly Profit",GeneticAlgorithmSelectionMethod:"Genetic Algorithm Selection Method",RouletteWheel:"Roulette Wheel",Tournament:"Tournament",SearchMethod:"Search Method",GlobalSearchUniformSelection:"Global Search Uniform Selection",LocalSearchRandomOptimization:"Local Search Random Optimization",PopulationSize:"Population Size",MaximumGenerations:"Maximum Generations",SelectionRate:"Selection Rate",CrossoverRate:"Crossover Rate",MutationRate:"Mutation Rate",Step:"Step",SwarmSize:"Swarm Size",MaximumSteps:"Maximum Steps",MaximumVelocity:"Maximum Velocity",InertiaWeight:"Inertia Weight",CognitiveCoefficient:"Cognitive Coefficient",SocialCoefficient:"Social Coefficient",ConvergenceThreshold:"Convergence Threshold for Termination",LocalSearchRadius:"Local Search Radius",RowsPerRackRange:"Range for Rows per Rack",TiltAngleRange:"Range for Tilt Angle",InterRowSpacingRange:"Range for Inter-Row Spacing",ClickTargetPolygonToActivate:"Click Target Polygon to Activate",ClickTargetFoundationToActivate:"Click Target Foundation to Activate"},treeMenu:{ShowModel:"Show Model",Flip:"Flip",Type:"Type",Spread:"Spread"},flowerMenu:{Flip:"Flip",Type:"Type",Spread:"Spread"},peopleMenu:{ChangePerson:"Change Person",Flip:"Flip",Observer:"Observer",ViewFromThisPerson:"View from This Person"},lightMenu:{Color:"Color",Intensity:"Intensity",Decay:"Decay",MaximumDistance:"Distance",Inside:"Inside"},solarCollectorMenu:{Coordinates:"Coordinates",RelativeXCoordinateOfCenter:"Relative X Coordinate of Center",RelativeYCoordinateOfCenter:"Relative Y Coordinate of Center",RelativeAzimuth:"Relative Azimuth",Pole:"Pole",PoleHeight:"Pole Height",PoleRadius:"Pole Radius",ExtraPoleHeight:"Extra Pole Height",ExtraPoleHeightInAdditionToHalfWidth:"Extra Pole Height in Addition to Half Width",DrawSunBeam:"Draw Sun Beam"},concentratedSolarPowerCollectorMenu:{ReflectorReflectance:"Reflector Reflectance",ReceiverAbsorptance:"Receiver Absorptance",ReflectorOpticalEfficiency:"Reflector Optical Efficiency",ReceiverThermalEfficiency:"Receiver Thermal Efficiency"},solarPanelMenu:{ElectricalProperties:"Electrical Properties",InverterEfficiency:"Inverter Efficiency",InverterEfficiencyExplained:"The efficiency for converting direct current (DC) to alternating current (AC).",DcToAcSizeRatio:"DC-to-AC Size Ratio",DcToAcSizeRatioExplained:"The ratio of the solar panels' DC-rated size to the inverter's AC-rated size.",ChangePvModel:"Change PV Model",Orientation:"Orientation",Portrait:"Portrait",Landscape:"Landscape",FrameColor:"Frame Color",Panels:"panels",PanelsWide:"panels wide",PanelsLong:"panels long",TiltAngle:"Tilt Angle",SouthFacingIsPositive:"South facing is positive",Tracker:"Tracker",SolarTrackerFollowsSun:"A tracker follows the sun to increase solar panel outputs.",PoleSpacing:"Pole Spacing",NoTracker:"No Tracker",HorizontalSingleAxisTracker:"Horizontal Single Axis Tracker",VerticalSingleAxisTracker:"Vertical Single Axis Tracker",AltazimuthDualAxisTracker:"Altazimuth Dual Axis Tracker",OnlyThisSolarPanel:"Only This Solar Panel",AllSolarPanelsOnSurface:"All Solar Panels on the Same Surface",AllSolarPanelsAboveFoundation:"All Solar Panels Above the Same Foundation",AllSelectedSolarPanels:"All Selected Solar Panels",AllSolarPanels:"All Solar Panels"},solarWaterHeaterMenu:{OnlyThisSolarWaterHeater:"Only This Solar Water Heater",AllSolarWaterHeatersOnSurface:"All Solar Water Heaters on the Same Surface",AllSolarWaterHeatersAboveFoundation:"All Solar Water Heaters Above the Same Foundation",AllSelectedSolarWaterHeaters:"All Selected Solar Water Heaters",AllSolarWaterHeaters:"All Solar Water Heaters"},pvModelPanel:{SolarPanelSpecs:"Solar Panel Specs",General:"General",Electrical:"Electrical",CellCountInXDirection:"Cell Count in X Direction",CellCountInYDirection:"Cell Count in Y Direction",Weight:"Weight",Kilogram:"kg",RatedVoltage:"Rated Voltage",RatedCurrent:"Rated Current",OpenCircuitVoltage:"Open-Circuit Voltage",ShortCircuitCurrent:"Short-Circuit Current",MaximumRatedPower:"Maximum Rated Power",Model:"Model",PanelSize:"Panel Size",Cells:"Cells",CellType:"Cell Type",Monocrystalline:"Monocrystalline",Polycrystalline:"Polycrystalline",ThinFilm:"Thin Film",Bifacial:"Bifacial",PowerBifaciality:"Power Bifaciality (Rear/Front)",Black:"Black",Blue:"Blue",ShadeTolerance:"Shade Tolerance",SolarCellEfficiency:"Solar Cell Efficiency",NominalOperatingCellTemperature:"Nominal Operating Cell Temperature",TemperatureCoefficientOfPmax:"Temperature Coefficient of Pmax",AddedCustomSolarPanels:"Added",DisplayThisCustomSolarPanel:"Display this custom solar panel",ExportThisCustomSolarPanel:"Export this custom solar panel",ImportCustomSolarPanelFromClipboard:"Import custom solar panel from clipboard",CustomSolarPanelExportedToClipboard:"Custom solar panel exported to Clipboard",DoYouReallyWantToRemoveThisCustomSolarPanel:"Do you really want to remove this custom solar panel",MakeSureThisCustomSolarPanelIsNotUsed:"Make sure this custom solar panel is not used in the current model",ThisCustomSolarPanelIsUsed:"This custom solar panel is used in the current model",DoYouReallyWantToImportCustomSolarPanel:"Do you really want to import a custom solar panel",ExistingSettingsWillBeOverwritten:"The existing settings will be overwritten",CannotAddCustomSolarPanel:"Cannot add custom solar panel",CustomSolarPanelMustHaveModelName:"A custom solar panel must have a model name",CustomSolarPanelExists:"A custom solar panel with this name already exists",FailInImportingDataFromClipboard:"Failed in importing data from the clipboard"},parabolicTroughMenu:{ModuleLength:"Module Length",Modules:"modules",ModulesLong:"modules long",LatusRectum:"Latus Rectum",OnlyThisParabolicTrough:"Only This Parabolic Trough",AllParabolicTroughsAboveFoundation:"All Parabolic Troughs Above the Same Foundation",AllSelectedParabolicTroughs:"All Selected Parabolic Troughs",AllParabolicTroughs:"All Parabolic Troughs"},fresnelReflectorMenu:{AbsorberPipe:"Absorber Pipe",SelectAbsorberToReflectSunlightTo:"Select Absorber to Reflect Sunlight to",ModuleLength:"Module Length",Modules:"modules",ModulesLong:"modules long",OnlyThisFresnelReflector:"Only This Fresnel Reflector",AllFresnelReflectorsAboveFoundation:"All Fresnel Reflectors Above the Same Foundation",AllSelectedFresnelReflectors:"All Selected Fresnel Reflectors",AllFresnelReflectors:"All Fresnel Reflectors"},heliostatMenu:{Tower:"Tower",SelectTowerToReflectSunlightTo:"Select Tower to Reflect Sunlight to",OnlyThisHeliostat:"Only This Heliostat",AllHeliostatsAboveFoundation:"All Heliostats Above the Same Foundation",AllSelectedHeliostats:"All Selected Heliostats",AllHeliostats:"All Heliostats"},parabolicDishMenu:{ReceiverStructure:"Receiver Structure",CentralPole:"Central Pole",CentralPoleWithTripod:"Central Pole with Tripod",Quadrupod:"Quadrupod",RimDiameter:"Rim Diameter",LatusRectum:"Latus Rectum",ExtraPoleHeightInAdditionToRadius:"Extra Pole Height in Addition to Radius",OnlyThisParabolicDish:"Only This Parabolic Dish",AllParabolicDishesAboveFoundation:"All Parabolic Dishes Above the Same Foundation",AllSelectedParabolicDishes:"All Selected Parabolic Dishes",AllParabolicDishes:"All Parabolic Dishes"},windTurbineMenu:{BirdSafeDesign:"Bird-Safe Design",BirdSafeNone:"None",BirdSafeBicolor:"Bicolor",BirdSafeStriped:"Striped",Rotor:"Rotor",BladeNumber:"Blade Number",RotorInitialAngle:"Rotor Initial Angle",RotorBladeDesign:"Rotor Blade Design",RotorBladeRadius:"Rotor Blade Radius",RotorBladePitchAngle:"Rotor Blade Pitch Angle",RelativeYawAngle:"Relative Yaw Angle",MaximumChordLength:"Maximum Chord Length",Tower:"Tower",TowerHeight:"Tower Height",TowerRadius:"Tower Radius",HubDesign:"Hub Design",HubRadius:"Hub Radius",HubLength:"Hub Length",OnlyThisWindTurbine:"Only This Wind Turbine",AllWindTurbinesAboveFoundation:"All Wind Turbines Above the Same Foundation",AllSelectedWindTurbines:"All Selected Wind Turbines",AllWindTurbines:"All Wind Turbines"},wallMenu:{TextureDefault:"Default",Texture01:"Texture 1",Texture02:"Texture 2",Texture03:"Texture 3",Texture04:"Texture 4",Texture05:"Texture 5",Texture06:"Texture 6",Texture07:"Texture 7",Texture08:"Texture 8",Texture09:"Texture 9",Texture10:"Texture 10",SizeOfWall:"Size of Wall",OnlyThisWall:"Only This Wall",AllConnectedWalls:"All Connected Walls",AllWallsAboveFoundation:"All Walls Above the Same Foundation",AllSelectedWalls:"All Selected Walls",AllWalls:"All Walls",Windows:"Windows",LockAllUnlockedWindows:"Lock All Unlocked Windows",UnlockAllLockedWindows:"Unlock All Locked Windows",RemoveAllUnlockedWindows:"Remove All Unlocked Windows",DoYouReallyWantToRemoveAllWindowsOnThisWall:"Do you really want to remove all the windows on this wall",Doors:"Doors",LockAllUnlockedDoors:"Lock All Unlocked Doors",UnlockAllLockedDoors:"Unlock All Locked Doors",RemoveAllUnlockedDoors:"Remove All Unlocked Doors",DoYouReallyWantToRemoveAllDoorsOnThisWall:"Do you really want to remove all the doors on this wall",SolarPanels:"Solar Panels",LockAllUnlockedSolarPanels:"Lock All Unlocked Solar Panels",UnlockAllLockedSolarPanels:"Unlock All Locked Solar Panels",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",DoYouReallyWantToRemoveAllSolarPanelsOnThisWall:"Do you really want to remove all the solar panels on this wall",Sensors:"Sensors",LockAllUnlockedSensors:"Lock All Unlocked Sensors",UnlockAllLockedSensors:"Unlock All Locked Sensors",RemoveAllUnlockedSensors:"Remove All Unlocked Sensors",DoYouReallyWantToRemoveAllSensorsOnThisWall:"Do you really want to remove all the sensors on this wall",Lights:"Lights",LockAllUnlockedLights:"Lock All Unlocked Lights",UnlockAllLockedLights:"Unlock All Locked Lights",RemoveAllUnlockedLights:"Remove All Unlocked Lights",DoYouReallyWantToRemoveAllLightsOnThisWall:"Do you really want to remove all the lights on this wall",Polygons:"Polygons",LockAllUnlockedPolygons:"Lock All Unlocked Polygons",UnlockAllLockedPolygons:"Unlock All Locked Polygons",RemoveAllUnlockedPolygons:"Remove All Unlocked Polygons",DoYouReallyWantToRemoveAllPolygonsOnThisWall:"Do you really want to remove all the polygons on this wall",WallStructure:"Wall Structure",DefaultStructure:"Default",StudStructure:"Stud",PillarStructure:"Pillar",Opacity:"Opacity",StructureSpacing:"Structure Spacing",StructureWidth:"Structure Width",StructureThickness:"Structure Thickness",StructureColor:"Structure Color",Color:"Wall Color",Height:"Height",Thickness:"Thickness",Texture:"Texture",AllLightsOnWallInside:"All Lights on Wall Inside",AllLightsOnWallOutside:"All Lights on Wall Outside",Fill:"Fill",Full:"Full",Partial:"Partial",Empty:"Empty",OpenToOutside:"Open to Outside",EavesLength:"Eaves Overhang Length",Parapet:"Parapet",ParapetColor:"Parapet Color",ParapetTexture:"Parapet Texture",ParapetHeight:"Parapet Height",CopingsHeight:"Copings Height",CopingsWidth:"Copings Width"},windowMenu:{OnlyThisWindow:"Only This Window",AllWindowsOnSurface:"All Windows on the Same Surface",AllWindowsAboveFoundation:"All Windows Above the Same Foundation",AllSelectedWindows:"All Selected Windows",AllWindows:"All Windows",Width:"Width",Height:"Height",Setback:"Setback from Exterior Surface",RelativeToWallThickness:"Relative to wall thickness",Mullion:"Mullion",HorizontalMullion:"Horizontal Mullion",VerticalMullion:"Vertical Mullion",MullionWidth:"Mullion Width",HorizontalMullionSpacing:"Horizontal Mullion Spacing",VerticalMullionSpacing:"Vertical Mullion Spacing",MullionColor:"Mullion Color",Tint:"Tint",Opacity:"Opacity",SolarHeatGainCoefficient:"Solar heat gain coefficient (SHGC) = 1 - opacity",Shutter:"Shutter",LeftShutter:"Left Shutter",RightShutter:"Right Shutter",BothShutters:"Both Shutters",ShutterWidth:"Relative Width",ShutterColor:"Shutter Color",Frame:"Frame",FrameWidth:"Frame Width",SillWidth:"Sill Width",Color:"Frame Color",WindowType:"Window Type",Default:"Default",Arched:"Arched",Polygonal:"Polygonal",Interior:"Interior",Empty:"Empty"},roofMenu:{TextureDefault:"Default",Texture01:"Texture 1",Texture02:"Texture 2",Texture03:"Texture 3",Texture04:"Texture 4",Texture05:"Texture 5",Texture06:"Texture 6",Texture07:"Texture 7",OnlyThisRoof:"Only This Roof",AllRoofsAboveFoundation:"All Roofs Above the Same Foundation",AllSelectedRoofs:"All Selected Roofs",AllRoofs:"All Roofs",OnlyThisCeiling:"Only This Ceiling",AllCeilingsAboveFoundation:"All Ceilings Above the Same Foundation",AllCeilings:"All Ceilings",EavesOverhangLength:"Eaves Overhang Length",RafterSpacing:"Rafter Spacing",RafterWidth:"Rafter Width",RafterThickness:"Rafter Thickness",RafterColor:"Rafter Color",RoofColor:"Roof Color",RoofSideColor:"Roof Side Color",GlassTint:"Glass Tint",Opacity:"Opacity",RoofStructure:"Roof Structure",DefaultStructure:"Default",RafterStructure:"Rafter",GlassStructure:"Glass",SolarPanels:"Solar Panels",LockAllUnlockedSolarPanels:"Lock All Unlocked Solar Panels",UnlockAllLockedSolarPanels:"Unlock All Locked Solar Panels",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",DoYouReallyWantToRemoveAllSolarPanelsOnThisRoof:"Do you really want to remove all the solar panels on this roof",Windows:"Windows",LockAllUnlockedWindows:"Lock All Unlocked Windows",UnlockAllLockedWindows:"Unlock All Locked Windows",RemoveAllUnlockedWindows:"Remove All Unlocked Windows",DoYouReallyWantToRemoveAllWindowsOnThisRoof:"Do you really want to remove all the windows on this roof",Sensors:"Sensors",LockAllUnlockedSensors:"Lock All Unlocked Sensors",UnlockAllLockedSensors:"Unlock All Locked Sensors",RemoveAllUnlockedSensors:"Remove All Unlocked Sensors",DoYouReallyWantToRemoveAllSensorsOnThisRoof:"Do you really want to remove all the sensors on this roof",Lights:"Lights",RemoveAllUnlockedLights:"Remove All Unlocked Lights",DoYouReallyWantToRemoveAllLightsOnThisRoof:"Do you really want to remove all the lights on this roof",AllLightsOnRoofInside:"All Lights on Roof Inside",AllLightsOnRoofOutside:"All Lights on Roof Outside",Rise:"Rise",Ceiling:"Ceiling",RoofRValue:"Roof R-Value",CeilingRValue:"Ceiling R-Value"},doorMenu:{TextureDefault:"Default",Texture01:"Texture 1",Texture02:"Texture 2",Texture03:"Texture 3",Texture04:"Texture 4",Texture05:"Texture 5",Texture06:"Texture 6",Texture07:"Texture 7",Texture08:"Texture 8",Texture09:"Texture 9",Texture10:"Texture 10",Texture11:"Texture 11",Texture12:"Texture 12",Texture13:"Texture 13",Texture14:"Texture 14",Texture15:"Texture 15",Texture16:"Texture 16",Texture17:"Texture 17",OnlyThisDoor:"Only This Door",AllDoorsOnWall:"All Doors on the Same Wall",AllDoorsAboveFoundation:"All Doors Above the Same Foundation",AllSelectedDoors:"All Selected Doors",AllDoors:"All Doors",DoorType:"Door Type",Default:"Default",Arched:"Arched",Filled:"Filled",FrameColor:"Frame Color",Interior:"Interior"},siteInfoPanel:{High:"High",Low:"Low"},designInfoPanel:{NumberOfSelectedHeliostats:"Number of selected heliostats",NumberOfSelectedSolarPanels:"Number of selected solar panels",ElectricityGeneratedDailyBySolarPanels:"Electricity generated daily by these solar panels",SceneDiameter:"Scene diameter",BuildingArea:"Building area"},visualizationControlPanel:{ColorContrast:"Color Contrast",FluxScale:"Flux Scale",ClickUpOrDownArrowButtonsToChange:"Click up or down arrow buttons to change"},instructionPanel:{Rotate:"Rotate",DragMouse:"Drag mouse",Zoom:"Zoom",MouseWheelOrKeys:"Rotate mouse wheel or press Ctrl+[ or Ctrl+]",MouseWheelOrKeysMac:"Rotate mouse wheel or press ⌘+[ or ⌘+]",Pan:"Pan",HoldCtrlDragMouse:"Hold Ctrl and drag mouse",HoldMetaDragMouse:"Hold ⌘ and drag mouse",Enter2DMode:"Enter 2D mode",Exit2DMode:"Exit 2D mode",NavigationMode:"Navigation mode",EnableNavigation:"Enable navigation",DisableNavigation:"Disable navigation",MoveForwardBack:"Move forward/back",MoveForwardBackInstruction:"Press W/S",MoveLeftRight:"Move left/right",MoveLeftRightInstruction:"Press A/D",MoveUpDown:"Move up/down",MoveUpDownInstruction:"Press Z/X",Turn:"Turn",TurnInstruction:"Press arrow keys",ResetView:"Reset",AutoRotate:"Auto rotate",StartOrStop:"Press F4 to start or stop"},mapPanel:{ImageOnGround:"Image on Ground",HideAddress:"Hide Address",WeatherStations:"Weather Stations",WeatherStationsNote:"Turn this off to speed up",Coordinates:"Coordinates",Zoom:"Zoom"},visibilityPanel:{SolarPanelVisibility:"Solar Panel Visibility",Observer:"Observer",VantagePoint:"Vantage Point",ItemizedVisibilityByFields:"Itemized by Fields",TotalVisibility:"Total"},sensorPanel:{LightSensor:"Light Sensor",WeatherDataFrom:"Weather Data from"},buildingEnergyPanel:{DailyBuildingEnergy:"Daily Building Energy",YearlyBuildingEnergy:"Yearly Building Energy",Heater:"Heater",AC:"AC",SolarPanel:"Solar Panel",Net:"Net"},solarPanelYieldPanel:{SolarPanelDailyYield:"Solar Panel Daily Yield",SolarPanelYearlyYield:"Solar Panel Yearly Yield",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualSolarPanels:"Show outputs of individual solar panels",Profit:"Profit",TotalCost:"Total Cost",TotalRevenue:"Total Revenue",TotalYield:"Total Yield",MeanYield:"Mean Yield",ModuleCount:"Module Count"},parabolicTroughYieldPanel:{ParabolicTroughDailyYield:"Parabolic Trough Daily Yield",ParabolicTroughYearlyYield:"Parabolic Trough Yearly Yield",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualParabolicTroughs:"Show outputs of individual parabolic troughs"},parabolicDishYieldPanel:{ParabolicDishDailyYield:"Parabolic Dish Daily Yield",ParabolicDishYearlyYield:"Parabolic Dish Yearly Yield",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualParabolicDishes:"Show outputs of individual parabolic dishes"},fresnelReflectorYieldPanel:{FresnelReflectorDailyYield:"Fresnel Reflector Daily Yield",FresnelReflectorYearlyYield:"Fresnel Reflector Yearly Yield",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualFresnelReflectors:"Show outputs of individual Fresnel feflectors"},heliostatYieldPanel:{HeliostatDailyYield:"Heliostat Daily Yield",HeliostatYearlyYield:"Heliostat Yearly Yield",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualHeliostats:"Show outputs of individual heliostats"},updraftTowerYieldPanel:{UpdraftTowerDailyYield:"Solar Updraft Tower Daily Yield",UpdraftTowerYearlyYield:"Solar Updraft Tower Yearly Yield",ChimneyAirTemperature:"Chimney Air Temperature",ChimneyWindSpeed:"Chimney Wind Speed",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualUpdraftTowers:"Show outputs of individual updraft towers"},heliodonPanel:{SunAndTimeSettings:"Sun & Time Settings",SunAngles:"Angles",TwentyFourHours:"24 Hours"},cloudFilePanel:{CopyTitle:"Copy Title",TitleCopiedToClipBoard:"The title was copied to the clip board",SearchByTitle:"Search by title",MyLikes:"My Likes",MyCloudFiles:"My Cloud Files",GenerateLink:"Generate Link",LinkGeneratedInClipBoard:"A link was generated in the clip board",DoYouReallyWantToDelete:"Do you really want to delete",IfSharedOrPublishedRenamingFileBreaksExistingLinks:"If this file has been shared or published, renaming it breaks existing links"},projectListPanel:{CopyTitle:"Copy Title",TitleCopiedToClipBoard:"The title was copied to the clip board",SearchByTitle:"Search by title",MyProjects:"My Projects",GenerateProjectLink:"Generate Project Link",ProjectLinkGeneratedInClipBoard:"A link to the project was generated in the clip board",DoYouReallyWantToDeleteProject:"Do you really want to delete Project",IfSharedOrPublishedRenamingProjectBreaksExistingLinks:"If this project has been shared or published, renaming it breaks existing links"},projectPanel:{ProjectSettings:"Project Settings",ThumbnailImageSize:"Thumbnail Image Size",ProjectByOtherPeople:"Project by Other People",Project:"Project",ProjectType:"Type",ProjectDescription:"Description",MakeDescriptionEditable:"Make this description editable",MakeDescriptionNonEditable:"Make this description non-editable",DoubleClickToMakeDescriptionEditable:"Double-click to make this description editable",SolarPanelArray:"Solar Panel Array",CurateCurrentDesign:"Curate current design",UpdateSelectedDesign:"Update selected design",RemoveSelectedDesign:"Remove selected design",ClickToFlipSortingOrder:"Click to flip the sorting order",DesignNotShownInSolutionSpaceClickToShow:"This design is not shown in solution space; click to show",DesignShownInSolutionSpaceClickToHide:"This design is shown in solution space; click to hide",SolutionSpace:"Solution Space",ChooseSolutionSpace:"Choose solution space",ChooseDataColoring:"Choose data coloring",SameColorForAllDesigns:"Same color for all designs",OneColorForEachDesign:"One color for each design",SolutionSpaceScreenshot:"Take a screenshot of the solution space",ScatterPlotScreenshot:"Take a screenshot of the scatter plot",SingleClickToSelectDoubleClickToOpen:"Single-click to select, double-click to open.",SingleClickToDeselectDoubleClickToOpen:"Single-click to deselect, double-click to open.",GenerateScatterPlot:"Generate Scatter Plot",SelectXAxis:"Select X Axis",SelectYAxis:"Select Y Axis"},accountSettingsPanel:{MyAccountSettings:"My Account Settings",MyID:"My 🆔",ClickToCopyMyID:"Click to copy my ID",IDInClipBoard:"Your ID was copied and is ready to paste.",StoreMyNameInMyFilesWhenSaving:"Store my name in my files when saving",DoYouReallyWantToShowYourNameInYourFiles:"Do you really want to show your display name in your files?",SignFileDisclaimer:"If yes, your display name may be seen by anyone who can access your files.",Likes:"Likes",AllPublished:"All Published",PublishedUnderAliases:"Aliases",UserCount:"User Count",SchoolID:"School ID",ClassID:"Class ID"},weatherPanel:{SunshineHours:"Sunshine"},diurnalTemperaturePanel:{SelectAirTemperatureModel:"Select Air Temperature Model",Sinusoidal:"Sinusoidal"},economicsPanel:{EconomicsParameters:"Economics Parameters",ElectricitySellingPrice:"Electricity Selling Price",OperationalCostPerUnit:"Operational Cost per Unit",SellingPrice:"Selling Price",UnitCost:"Unit Cost"},navigationPanel:{NavigationParameters:"Navigation Parameters",MinimumMoveSpeed:"Minimum Move Speed",MinimumTurnSpeed:"Minimum Turn Speed"},shadowSettingsPanel:{ShadowSettings:"Shadow Settings",ShadowCameraFarDistance:"Shadow Camera Far Distance",ShadowMapSize:"Shadow Map Size",Notes:"Notes",RefreshPageNote:"Refresh the page for the new settings to take effect.",MapSizeWarning:"A large shadow map size may cause Aladdin to crash on some computers."},yearlyLightSensorPanel:{SkyClearness:"Clearness",ShowDaylightResults:"Show daylight results",ShowSkyClearnessResults:"Show sky clearness results",ShowAverageDailySolarRadiation:"Show average daily solar radiation"},analysisManager:{NoSensorForCollectingData:"There is no sensor for collecting data.",NoSolarPanelForAnalysis:"There is no solar panel for analysis.",NoObserverForVisibilityAnalysis:"There is no observer for visibility analysis.",NoSolarWaterHeaterForAnalysis:"There is no solar water heater for analysis.",NoParabolicDishForAnalysis:"There is no parabolic dish for analysis.",NoParabolicTroughForAnalysis:"There is no parabolic trough for analysis.",NoFresnelReflectorForAnalysis:"There is no Fresnel reflector for analysis.",NoHeliostatForAnalysis:"There is no heliostat for analysis.",NoSolarUpdraftTowerForAnalysis:"There is no solar updraft tower for analysis.",NoBuildingForAnalysis:"There is no building for analysis."},toolbar:{CloudFile:"Cloud file",Select:"Select",AddFoundation:"Add Foundation",AddWall:"Add Wall",AddWindow:"Add Window",AddDoor:"Add Door",AddPyramidRoof:"Add Pyramid Roof",AddGableRoof:"Add Gable Roof",AddHipRoof:"Add Hip Roof",AddGambrelRoof:"Add Gambrel Roof",AddMansardRoof:"Add Mansard Roof",AddCuboid:"Add Cuboid",AddSensor:"Add Sensor",AddSolarPanel:"Add Solar Panel",AddSolarWaterHeater:"Add Solar Water Heater",AddBatteryStorage:"Add Battery Storage",AddParabolicDish:"Add Parabolic Dish",AddParabolicTrough:"Add Parabolic Trough",AddFresnelReflector:"Add Fresnel Reflector",AddHeliostat:"Add Heliostat",AddWindTurbine:"Add Horizontal Axis Wind Turbine",AddVerticalAxisWindTurbine:"Add Vertical Axis Wind Turbine",AddLight:"Add Light",AddTree:"Add Tree",AddFlower:"Add Flower",AddPeople:"Add People",DoubleClickToLockThisModeForNextAction:"Double-click to lock this mode for next action",ClickToUnlockThisModeForNextAction:"Click to unlock this mode for next action",ManipulateGroup:"Manipulate a group",ClearScene:"Clear scene",ShowSunAndTimeSettings:"Show sun and time settings",SpatialAnalysisOfEnergy:"Spatial analysis of energy",DoYouReallyWantToClearContent:"Do you really want to clear the content",ClickForMoreButtons:"Click for more buttons"},tooltip:{gotoIFI:"Go to Institute for Future Intelligence",visitAladdinHomePage:"Visit Aladdin Homepage",clickToOpenMenu:"Click to open main menu",clickToAccessAccountSettings:"Click to access account settings"},tree:{Apple:"Apple",Birch:"Birch",Coconut:"Coconut",Dogwood:"Dogwood",Elm:"Elm",FanPalm:"Fan Palm",Linden:"Linden",Magnolia:"Magnolia",Maple:"Maple",Oak:"Oak",Pine:"Pine",Spruce:"Spruce"},flower:{Bellflower:"Bellflower",Boxwood:"Boxwood",CactusCombo1:"Cactus Combo 1",CactusCombo2:"Cactus Combo 2",CactusCombo3:"Cactus Combo 3",CactusCombo4:"Cactus Combo 4",Hibiscus:"Hibiscus",Hosta:"Hosta",Hydrangea:"Hydrangea",Peony:"Peony",RedRose:"Red Rose",Spirea:"Spirea",Sunflower:"Sunflower",TallBush:"Tall Bush",Tulip:"Tulip",WhiteFlower:"White Flower",YellowFlower:"Yellow Flower"},people:{Jaah:"Jaah",Jack:"Jack",Jacob:"Jacob",Jacqueline:"Jacqueline",Jade:"Jade",Jamelia:"Jamelia",James:"James",Jane:"Jane",Jaya:"Jaya",Jaye:"Jaye",Jeanette:"Jeanette",Jedi:"Jedi",Jeff:"Jeff",Jena:"Jena",Jennifer:"Jennifer",Jess:"Jess",Jett:"Jett",Jill:"Jill",Jiya:"Jiya",Joan:"Joan",Jocelyn:"Jocelyn",Joel:"Joel",Joey:"Joey",John:"John",Jonathon:"Jonathon",Jose:"Jose",Joseph:"Joseph",Joshua:"Joshua",Judd:"Judd",Judy:"Judy",Julia:"Julia",Julio:"Julio",Jumapili:"Jumapili",June:"June",Juro:"Juro",Justin:"Justin"},compass:{N:"N",S:"S",W:"W",E:"E"},month:{January:"Jan",February:"Feb",March:"Mar",April:"Apr",May:"May",June:"Jun",July:"Jul",August:"Aug",September:"Sep",October:"Oct",November:"Nov",December:"Dec"},modelsMap:{AllTime:"All Time",SearchByPublisher:"Search by publisher",SearchByLabel:"Search by label",MyPublishedModels:"My Published Models",TotalNumberOfUserPublishedModelsInSelectedPeriod:"Total number of user-published models in the selected period",AllTimeTotal:"All-time total",SortFromOldestToNewest:"Sort from oldest to newest",SortFromNewestToOldest:"Sort from newest to oldest",SitesFound:"sites found",ModelsFoundOnThisSite:"models found on this site",ShowModelsPublishedByThisAuthor:"Show the models published by this author"}}},hpt={translation:{name:{IFI:"未来智能研究所",Aladdin:"阿拉丁",Tagline:"阿拉丁: 探索人工智能时代的设计软件 — 未来智能研究所研发"},cookie:{Statement:"声明:为了改善您的用户体验,阿拉丁采用cookie储存少量数据。",Accept:"同意"},aboutUs:{ProductBroughtToYouBy:"未来智能研究所荣誉出品",TermsOfService:"服务条款",PrivacyPolicy:"隐私政策",Software:"软件",Content:"课件",Research:"研究",Support:"服务",Acknowledgment:"鸣谢",FundingInformation:"本产品的研发承蒙美国国家科学基金会慷慨资助(项目号#2105695,#2131097,#2301164)。本产品的任何观点或结论仅代表创作者个人意见。",Contact:"如您需要更多信息,请联系 Charles Xie (charles@intofuture.org)。我们会尽快回复。",Translators:"翻译"},word:{BrandName:"品牌",Name:"名字",Refresh:"刷新",LastUpdate:"上一次更新",Small:"小",Medium:"中",Large:"大",Design:"设计",Information:"信息",Type:"类别",Text:"文字",FontSize:"字体大小",FontColor:"字体颜色",Model:"模型",Models:"模型",Upload:"上传",ClickCount:"点击数",Share:"分享",AlreadyLike:"已点赞",Like:"点赞",MustLogInToLike:"必须登录才能点赞",AllRightsReserved:"版权所有",MeterAbbreviation:"米",VoltAbbreviation:"伏",AmpereAbbreviation:"安",WattAbbreviation:"瓦",Version:"版本",VersionInitial:"版本",Options:"选项",Maximum:"最大",Minimum:"最小",MaximumNumber:"最多",MinimumNumber:"最少",MaximumValue:"最大值",MinimumValue:"最小值",Or:"或",None:"无",High:"高",Partial:"部分",Teacher:"老师",Class:"班级",Total:"总数",Leaderboard:"用戶排行榜",Latest:"最新",Range:"范围",SIUnit:"国际单位制",USUnit:"美国单位制",ThermalTransmittance:"热透过率",ThermalResistance:"热阻",UValue:"U值",RValue:"R值",VolumetricHeatCapacity:"容积热容",BuildingHVACSystem:"建筑物暖通空调系统",ThermostatSetpoint:"恒温器设定值",TemperatureToleranceThreshold:"温度忍耐阈值",TemperatureToleranceThresholdExplanation:`当日最低外面温度高于恒温器设定值减去此阈值,暖气不开。 +当日最高外面温度低于恒温器设定值加上此阈值,空调不开。`,Press:"按",Open:"打开",Save:"保存",SaveAsImage:"保存为图像",SaveAsCsv:"保存为CSV",Update:"刷新",Paste:"粘贴",Copy:"复制",Cut:"剪切",Delete:"删除",Add:"添加",Lock:"固定",Translucent:"半透明",Transparency:"透明度",Color:"颜色",Pattern:"图案",Texture:"材质",Thickness:"厚度",Size:"尺寸",Yes:"是",No:"不",OK:"确定",Cancel:"取消",Apply:"应用",Close:"关闭",ApplyTo:"适用于",Run:"运行",Pause:"暂停",Resume:"继续",Clear:"清空",Warning:"警告",Caution:"小心",Reminder:"提醒",Length:"长度",Width:"宽度",Height:"高度",Radius:"半径",Angle:"角度",Azimuth:"方位角",Coordinates:"坐标",Weather:"天气",Show:"显示",Animate:"动画",Date:"日期",Time:"时间",Title:"标题",Owner:"所有者",Action:"操作",Rename:"改名",Location:"位置",Latitude:"纬度",Month:"月份",Day:"天",Hour:"小时",Daylight:"白天长度",Radiation:"辐射",Temperature:"温度",kWh:"千瓦时",dollar:"元",MeterPerSecond:"米/秒",NorthInitial:"北",SouthInitial:"南",EastInitial:"东",WestInitial:"西",Fixed:"固定",Elements:"部件",Energy:"能量",Unknown:"未知",Label:"标签",Description:"描述",NoDescription:"无描述",MaximumCharacters:"最多字符数",Author:"作者",Publisher:"发布者",Building:"建筑",ResidentialBuilding:"住宅建筑",CommercialBuilding:"商用建筑",SchoolBuilding:"学校建筑",TouristAttraction:"旅游景点",UnderConstruction:"在建",Photovoltaic:"光伏",WindPower:"风能",ColocationProjects:"共用空间项目",Anonymous:"无名氏",Nickname:"别名",Pin:"置顶",Unpin:"解除置顶"},shared:{NoTexture:"无材质",FoundationElement:"地基",CuboidElement:"长方体",PolygonElement:"多边形",SensorElement:"传感器",SolarPanelElement:"光伏板",SolarWaterHeaterElement:"太阳能热水器",ParabolicDishElement:"抛物线碟",ParabolicTroughElement:"抛物线槽",FresnelReflectorElement:"菲涅耳反射镜",HeliostatElement:"定日镜",WindTurbineElement:"风力涡轮机",LightElement:"电灯",ElementLocked:"固定",ModelType:"模型类别",OutputBreakdown:"分列发电量",MoreResults:"更多结果"},message:{NewVersionAvailable:"有新版本",CalculationMayBeSlowDoYouWantToContinue:"计算可能会很慢。您想继续吗?",IncreaseSolarRadiationHeatmapGridCellSizeToSpeedUp:"加大太阳辐射热图网格的尺寸可加速",ModelNotFound:"没有找到模型",CannotSignIn:"登录失败",CannotSignOut:"退出失败",YourAccountWasCreated:"成功建立您的账号。",CannotCreateAccount:"无法创建账号",YourAccountSettingsWereSaved:"您的账号设定已保存。",CannotSaveYourAccountSettings:"您的账号设定无法保存",CannotSaveYourFileToCloud:"无法保存您的文件到云端",CannotCreateNewProject:"无法创建新项目",CannotCreateNewProjectWithoutTitle:"没有标题, 无法创建新项目",CannotOpenYourProjects:"无法打开您的项目列表",CannotOpenProject:"无法打开项目",CannotDeleteProject:"无法删除项目",CannotRenameProject:"无法给项目改名",CannotAddDesignToProject:"无法把此设计加到项目里",CannotAddDesignToProjectOwnedByOthers:"不能把此设计加到别人的项目里",DesignRemovedFromProject:"设计被成功地从项目里删除",CannotRemoveDesignFromProject:"无法把此设计从项目里删除",CannotUpdateProject:"无法更新项目",CannotFetchProjectData:"无法取得项目数据",TitleUsedChooseDifferentOne:"此标题已经被使用, 请采用不同的标题",CloudFileWithTitleExistsDoYouWantToOverwrite:"使用此标题的云文件已经存在,您确定要覆盖它吗?",CloudFileNotFound:"找不到此云端文件",CannotLoadModelsOnMap:"无法下载地图上的模型",CannotLoadLeaderboard:"无法下载排行榜",CannotPublishModelOnMap:"模型无法发布到地图上",CannotLikeModelFromMap:"无法点赞地图上的模型",CannotDeleteModelFromMap:"无法删除地图上的模型",ModelDeletedFromMap:"模型已从地图上删除",DoYouWantToDeleteModelFromMap:"您要删除地图上的这个模型吗?",CannotOpenCloudFile:"此云端文件无法打开",CannotReadCloudFile:"无法读取此云端文件",CannotWriteCloudFile:"无法存储此云端文件",CloudFileCopied:"拷贝云端文件",CannotOpenCloudFolder:"您的云端文件夹无法打开",CannotDeleteCloudFile:"无法删除此云端文件",CannotRenameCloudFile:"此云端文件的名字无法更改",DoYouWantToSaveChanges:"您要保存当前文件吗?",NotApplicableToSelectedAction:"此值不适用于当前选择范围",ThisElementIsLocked:"这个部件被锁定。",ThisCannotBeUndone:"这个操作一旦执行就不能撤销。",AzimuthOfNorthIsZero:"正北的方位角为零度",CounterclockwiseAzimuthIsPositive:"逆时针为正",SouthFacingIsZero:"朝南为零度",ClockwiseRotationIsPositive:"顺时针为正",MoveCancelledBecauseOfOverlap:"位置重叠,移动取消。",MoveOutsideBoundaryCancelled:"位置出界,移动取消。",RotationCancelledBecauseOfOverlap:"位置重叠,旋转取消。",RotationOutsideBoundaryCancelled:"位置出界,旋转取消。",ResizingCancelledBecauseOfOverlap:"位置重叠,尺寸调整取消。",ResizingOutsideBoundaryCancelled:"位置出界,尺寸调整取消。",CannotPasteOutsideBoundary:"位置出界,不能复制。",CannotPasteBecauseOfOverlap:"位置重叠,不能复制。",CannotMoveObjectTooFar:"位置太远,移动取消。",ExistingSolarPanelsWillBeRemovedBeforeApplyingNewLayout:"采用新布局之前必须移除现有的光伏板。",DoYouWantToContinue:"您想继续吗?",SolarPanelsCannotIntersectWithGround:"光伏板不能和地面接触。",SolarPanelsCannotOverlapWithOneAnother:"光伏板不能重叠。",ScreenshotSaved:"截屏图片保存在下载文件夹里。",CsvFileSaved:"CSV保存在下载文件夹里。",SimulationStarted:"模拟开始。",SimulationCompleted:"模拟结束。",SimulationAborted:"模拟取消。",SimulationPaused:"模拟暂停。",CancelSimulation:"取消模拟",PauseSimulation:"暂停模拟",ResumeSimulation:"继续模拟",SimulationWillNotStartDueToErrors:"由于错误模拟无法运行",SimulationWillStartDespiteWarnings:"发现问题,但模拟仍然将运行。",EvolutionStarted:"演化开始。",EvolutionCompleted:"演化结束。",EvolutionAborted:"演化取消。",EvolutionPaused:"演化暂停。",EncounterEvolutionError:"演化出错。",CancelEvolution:"取消演化",PauseEvolution:"暂停演化",ResumeEvolution:"继续演化",ConvergenceThresholdHasBeenReached:"收敛阈值已达到。",MaximumNumberOfGenerationsHasBeenReached:"最大世代数已达到。",MaximumNumberOfStepsHasBeenReached:"最大步数已达到。",ObjectiveFunctionTypeError:"此操作不支持当前的目标函数。请从菜单启动此功能。",WallsAreNotAtSameHeight:"墙体高度不同。",WallsAreNotPerpendicular:"墙体不垂直。",WallsAreNotConnected:"墙体不相连。",WallsNumberNeedToBeFour:"墙体数量必须为四个。",BuildingContainsEmptyWall:"建筑物有空墙。",BuildingRoofMissing:"建筑物没有屋顶。",UnknownErrors:"未知错误。",SigningOutAnonymousAccount:"你确定退出吗?一旦退出,此匿名账号将不可恢复。"},menu:{AnalysisOptions:"分析选项",option:{GridCellSize:"计算网格的尺寸",SamplingFrequency:"采样频率",TimesPerHour:"每小时采样次数",DaysPerYear:"每一年采样天数"},mainMenu:"主菜单",cloudMenu:"云菜单",projectSubMenu:"项目",project:{CreateNewProject:"创建新项目",OpenProject:"打开项目",SaveProject:"保存项目",SaveProjectAs:"另存项目为",YouMustLogInToCreateProject:"您必须登录才能创建项目",YouMustLogInToOpenProject:"您必须登录才能打开项目"},fileSubMenu:"文件",file:{CreateNewFile:"创建新文件",OpenLocalFile:"打开本地文件",SaveAsLocalFile:"保存为本地文件",SavingAbortedMustHaveValidFileName:"文件名无效,保存失败",OpenCloudFile:"打开云端文件",SaveCloudFile:"保存云端文件",SaveAsCloudFile:"另存云端文件为",SavingAbortedMustHaveValidTitle:"云端文件名无效,保存失败",ToSaveYourWorkPleaseSignIn:"为了保存您的云端文件,请先登录。",TakeScreenshot:"截屏",UseCloudFileName:"采用云端文件名",PublishOnModelsMap:"发布到地图上",PublishedOnModelsMap:"您的模型成功发布到地图上",UpdatedOnModelsMap:"您的模型更新成功",YouMustLogInToPublishYourModel:"您必须登录才能发布模型",YouCannotPublishAModelThatYouDoNotOwn:"您不能发布他人的模型",YouMustSaveModelOnCloudBeforePublishingIt:"您必须先把此模型保存在云端才能发布它"},editSubMenu:"编辑",edit:{Undo:"撤销",Redo:"重做"},viewSubMenu:"视界",view:{NavigationView:"导航模式",TwoDimensionalView:"二维模式",ResetView:"重置视角",ZoomIn:"放大",ZoomOut:"缩小",AutoRotate:"自动旋转",ShowShadow:"显示阴影",ShowSurfaceShininess:"显示表面光泽",TranslucentFloatingWindows:"透明浮动窗口",accessoriesSubMenu:"配件",accessories:{SiteInformation:"位置信息",DesignInformation:"设计信息",Instruction:"操作说明",StickyNote:"便签",Note:"便签"}},settingsSubMenu:"设置",settings:{WeatherData:"气象数据",DiurnalTemperature:"昼夜温度",Heliodon:"日影仪",SunAndTime:"太阳和时间",CustomSolarPanels:"定制的光伏板",CustomizeSolarPanel:"定制光伏板"},benchmarksSubMenu:"基准",benchmarks:{SolarRadiationPredictionVsMeasurement:"太阳能辐射模型预测和实际测量的对比",BESTESTCase600:"建筑物能耗模拟测试:BESTEST案例600",BESTESTCase610:"建筑物能耗模拟测试:BESTEST案例610",BESTESTCase620:"建筑物能耗模拟测试:BESTEST案例620",BESTESTCase630:"建筑物能耗模拟测试:BESTEST案例630"},graph:{LineWidth:"线条宽度",SymbolSize:"符号大小",BarCategoryGap:"直条间隙",ShowHorizontalGridLines:"显示格子的水平线条",ShowVerticalGridLines:"显示格子的竖直线条"},analysisSubMenu:"分析",physicsSubMenu:"物理",physics:{DailySolarRadiationHeatmap:"当日太阳辐射总量分布热图",SolarRadiationHeatmapOptions:"太阳辐射热图选项",SolarRadiationHeatmapGridCellSize:"太阳辐射热图网格的尺寸",SolarRadiationHeatmapMaxValue:"太阳辐射热图最大值",SolarRadiationHeatmapNoAnimation:"若无移动部件则省略动画",ReflectionHeatmap:"反射热图"},sensorSubMenu:"传感器",sensor:{CollectDailyData:"收集当天数据",CollectYearlyData:"收集全年数据",SensorSimulationNoAnimation:"若无移动部件则省略动画"},buildingSubMenu:"建筑物",building:{AnalyzeDailyBuildingEnergy:"建筑物当天能耗分析",AnalyzeYearlyBuildingEnergy:"建筑物全年能耗分析",EnergyAnalysisOptions:"能耗分析选项",EnergyGridCellSize:"计算网格的尺寸",BuildingEnergySimulationNoAnimation:"若无移动部件则省略动画"},solarPanelSubMenu:"太阳能光伏板",solarPanel:{AnalyzeDailyYield:"分析当天产出",AnalyzeYearlyYield:"分析全年产出",AnalyzeVisibility:"分析可见度",PanelDiscretization:"光伏板离散化方法",Exact:"准确",Approximate:"近似",EnergyGridCellSize:"计算网格的尺寸",VisibilityGridCellSize:"视界因子计算网格的尺寸",EnergyAnalysisOptions:"能量分析选项",VisibilityAnalysisOptions:"可见度分析选项",SolarPanelSimulationNoAnimation:"若无移动部件则省略动画"},parabolicTroughSubMenu:"抛物线槽",parabolicTrough:{AnalyzeDailyYield:"分析当天产出",AnalyzeYearlyYield:"分析全年产出"},parabolicDishSubMenu:"抛物线碟",parabolicDish:{AnalyzeDailyYield:"分析当天产出",AnalyzeYearlyYield:"分析全年产出"},fresnelReflectorSubMenu:"菲涅尔反射镜",fresnelReflector:{AnalyzeDailyYield:"分析当天产出",AnalyzeYearlyYield:"分析全年产出"},heliostatSubMenu:"定日镜",heliostat:{AnalyzeDailyYield:"分析当天产出",AnalyzeYearlyYield:"分析全年产出"},solarUpdraftTowerSubMenu:"太阳能上升气流塔",solarUpdraftTower:{AnalyzeDailyYield:"分析当天产出",AnalyzeYearlyYield:"分析全年产出",SolarUpdraftTowerSimulationNoAnimation:"若无移动部件则省略动画"},tutorialsSubMenu:"教程",solarEnergyScienceSubMenu:"太阳能科学",solarEnergyScienceTutorials:{SunAngles:"太阳相对于地面观察者的角度",InsolationAndClimate:"太阳辐射和气候的关系",SolarRadiationToBox:"一个长方体受到的太阳能辐射分析"},buildingScienceSubMenu:"建筑科学",buildingScienceTutorials:{ThermalEnvelopeVsBuildingEnvelope:"房屋的热学封套和围护封套",EffectOfSizeOnBuildingEnergy:"房屋大小对能耗的影响",EffectOfOrientationOnBuildingEnergy:"房屋方位对能耗的影响",EffectOfInsulationOnBuildingEnergy:"房屋隔热对能耗的影响",EffectOfRoofColorOnBuildingEnergy:"屋顶颜色对建筑物能耗的影响",EffectOfEavesOverhangLengthOnBuildingEnergy:"屋檐延伸长度对建筑物能耗的影响",EffectOfWindowSHGCOnBuildingEnergy:"窗户太阳能输入对房屋能耗的影响",EffectOfThermostatSetpointOnBuildingEnergy:"恒温器设定值对房屋能耗的影响",EffectOfSolarPanelsOnBuildingEnergy:"光伏板对房屋能耗的影响",EffectOfGroundTemperatureOnBuildingEnergy:"地表温度对房屋能耗的影响",EffectOfTreesOnBuildingEnergy:"树荫对房屋能耗的影响"},buildingDesignSubMenu:"建筑设计",buildingDesignTutorials:{CapeCodStyleHouseWithShedDormer:"有棚顶窗的科德角风格的住宅",MansardRoofWithDormers:"有天窗的折线屋顶",GableRoofVsHipRoof:"双坡屋顶和四坡屋顶的对比",ColonialVsSaltbox:"殖民地风格和盐盒风格的对比",GambrelRoofVsMansardRoof:"复斜屋顶和折线屋顶的对比",CombinationRoofVsBonnetRoof:"组合屋顶和帽檐屋顶的对比",DutchGableRoof:"荷兰双坡屋顶",GableAndValleyRoof:"坡谷屋顶",ClerestoryRoof:"天窗屋顶",MonitorRoof:"采光屋顶",AFrameHouse:"A字形房子",HalfTimberedHouse:"半木骨架房子",AllBasicRoofTypes:"所有的基本屋顶类型"},photovoltaicSolarPowerSubMenu:"光伏发电",photovoltaicSolarPowerTutorials:{EffectOfTiltAngleOfSolarPanel:"光伏板倾斜角对发电量的影响",EffectOfAzimuthOfSolarPanel:"光伏板方位角对发电量的影响",SolarPanelTypes:"光伏板类型",DefineYourOwnSolarPanels:"定义自己的光伏板",VerticalBifacialSolarPanels:"竖直的双面光伏板",CompareMonofacialAndBifacialSolarPanels:"单面光伏板和双面光伏板的对比",SolarTrackers:"自动追日器",CoveringGroundWithSolarPanels:"为什么我们不简单地用光伏板覆盖地面",InterRowSpacingOfSolarPanelArray:"光伏板阵列行间距对发电量的影响",EffectOfOrientationOfSolarPanels:"光伏板排列方向对发电量的影响",SolarPanelArrayAutomaticLayout:"光伏板自动排列"},concentratedSolarPowerSubMenu:"光热发电",concentratedSolarPowerTutorials:{EffectOfAzimuthOfParabolicTrough:"抛物线槽方位角对发电量的影响",EffectOfLatusRectumOfParabolicTrough:"抛物线槽通径对发电量的影响",FocusSunlightWithParabolicDish:"用抛物线碟聚焦陽光",LinearFresnelReflectors:"用直线式菲涅尔反射镜聚焦陽光",EffectOfAbsorberPipeHeightForLinearFresnelReflectors:"吸热管的安装高度对直线式菲涅尔反射镜发电量的影响",EffectOfAzimuthOfLinearFresnelReflectors:"直线式菲涅尔反射镜方位角对发电量的影响",LinearFresnelReflectorsWithTwoAbsorbers:"配备两个吸收管的直线式菲涅尔反射镜阵列",CosineEfficiencyOfHeliostats:"定日镜的余弦效率",ShadowingAndBlockingOfHeliostats:"定日镜的阴影和遮挡",EffectSolarPowerTowerHeight:"吸收塔高度对发电量的影响",SolarPowerTower:"塔式光热发电站"},otherTypesOfSolarPowerSubMenu:"其它类型的太阳能发电",otherTypesOfSolarPowerTutorials:{SolarWaterHeaters:"太阳能热水器",SolarUpdraftTower:"太阳能上升气流塔"},windPowerSubMenu:"风力发电",windPowerTutorials:{EffectOfBladeNumberOfWindTurbine:"转子叶片的数目对风力涡轮机输出的影响",EffectOfPitchAngleOfWindTurbineBlades:"转子叶片的俯仰角对风力涡轮机输出的影响",BirdSafeBladeDesign:"对鸟类安全的叶片设计",OffshoreWindFarm:"海上风电场"},colocationSubMenu:"共用空间项目",colocationTutorials:{AgricultureSolarWindColocation:"农业光伏风力共用空间"},generativeDesignSubMenu:"生成式设计",generativeDesignTutorials:{MonofacialSolarPanelArrayTiltAngle:"单面光伏板阵列的倾斜角",BifacialSolarPanelArrayTiltAngle:"双面光伏板阵列的倾斜角",OutputOfSolarPanelArrayInDifferentPlaces:"一个光伏板阵列在不同地区的产出",SimpleSolarFarmParetoFront:"简单太阳能农场设计的帕累托前沿"},examplesSubMenu:"例子",solarEnergySubMenu:"太阳能",solarEnergyExamples:{SunBeamAndHeliodon:"太阳光束和日影仪",RooftopSolarPanels:"屋顶光伏板",NevadaSolarOneParabolicTroughArray:"内华达州太阳能一号的抛物线槽阵列",TooeleParabolicDishArray:"犹他州图埃勒的抛物线碟阵列",PS10SolarPowerTower:"西班牙塞维利亚的PS10太阳能发电塔",TucsonLinearFresnelReflectors:"亚利桑那州图森的直线式菲涅尔反射镜阵列",SolarCanopyFormFactors:"太阳能天篷外形设计",SolarCanopyOverBleachers:"看台太阳能天篷",SolarCanopyOverGarage:"车库太阳能天篷",SolarBusStop:"太阳能候车亭",SolarFacadeTesla:"特斯拉光伏墙",BuildingIntegratedPhotovoltaics:"建筑整合光伏",Floatovoltaics:"浮动光伏",Agrivoltaics:"农业光伏",VegetativeBuffer:"太阳能农场绿化带",RainbowSwashSolarFarmBostonMA:"马萨诸塞州波士顿彩虹激流旁边的光伏板阵列",MickeyMouseSolarFarmOrlandoFL:"佛罗里达州奥兰多的米老鼠形状光伏板阵列",SolarPanelsOverCanalBakersfieldCA:"加利福尼亚州贝克斯菲尔德灌溉渠上假想的光伏板阵列",SolarNoiseBarrierLexingtonMA:"马萨诸塞州列克星敦高速公路噪音墙上假想的光伏板",HSATSolarTrackersRaleighNC:"北卡罗来纳州罗利的一个水平方向单轴旋转追日光伏板阵列(HSAT)",AADATSolarTrackersLancasterCA:"加利福尼亚州兰开斯特的一个双轴旋转追日光伏板阵列(AADAT)",SolarUpdraftTowerInCity:"太阳能上升气流塔在城市中的应用"},builtEnvironmentSubMenu:"建造环境",residentialBuildingsSubMenu:"住宅建筑",residentialBuildingExamples:{ColonialHouse:"殖民地风格的住宅",DutchColonialHouse:"荷兰殖民地风格的住宅",TShapedHouse:"T字型房子",CapeCodHouseWithGarage:"有车库的科德角风格的住宅",Solarium:"有日光浴室的房子",Church1:"教堂例一",Cathedral1:"主教座堂例一",Cathedral2:"主教座堂例二",Mosque1:"清真寺例一",AdobeTaosHouse:"陶斯土坯房",RanchHouse:"牧场风格的住宅",BonnetHouse:"有帽檐屋顶的住宅",BarnStyleHouse:"谷仓式风格的住宅",ModernHouse:"现代风格的住宅",ButterflyRoofHouse:"蝴蝶型屋顶的住宅"},commercialBuildingsSubMenu:"商用建筑",commercialBuildingExamples:{WhiteHouse:"白宫",HaroldWashingtonCollege:"哈罗德华盛顿学院",BilimMersinTurkiye:"土耳其梅尔辛科学教育中心",SpanishStyleHotel:"西班牙风格旅馆",ApartmentBuilding:"公寓楼",OfficeBuilding:"办公楼",Hotel:"旅馆"},buildingComplexesSubMenu:"建筑群",buildingComplexExamples:{SouthBurlingtonHighSchoolVermont:"佛蒙特州南伯灵顿高中",MescaleroApacheSchoolNewMexico:"新墨西哥州梅斯卡勒罗阿帕奇学校"},urbanPlanningSubMenu:"城市规划",urbanPlanningExamples:{CityBlockHeatmap:"城市街区热图",ChicagoSkyline:"芝加哥天际线"},otherBuildingsSubMenu:"其它建筑",otherBuildingExamples:{Greenhouse:"温室",Pavilion:"公园的亭子",OctagonalPagoda:"八角塔",OceanFront:"海边",EgyptianPyramids:"埃及金字塔",MayanPyramid:"玛雅金字塔",SiOSePol:"三十三孔桥",StackedCuboids:"堆砌长方体"},artificialIntelligenceSubMenu:"人工智能",artificialIntelligenceExamples:{OptimizingTiltAngleOfOneSolarPanelRow:"优化单排光伏板的倾斜角",OptimizingTiltAnglesOfMultipleSolarPanelRows:"优化多排光伏板的倾斜角",SolarFarmGenerativeDesign:"生成式设计太阳能农场",SolarFarmGenerativeDesignWithBlock:"生成式设计太阳能农场:周边有建筑物的情况",FitchburgSolarFarmGenerativeDesign:"生成式设计太阳能农场:真实世界案例"},languageSubMenu:"语言",publicSubMenu:"公共",ModelsGallery:"模型画廊",ModelsMap:"模型地图",AboutUs:"关于我们"},avatarMenu:{AccountSettings:"账号设定",PrivacyStatementTitle:"用户隐私保护声明",PrivacyStatement:"登录需要采用您的谷歌ID建立或进入您的阿拉丁账户。 我们只储存一个随机的字符串作为您的ID。 任何关于您的可辨识的个人信息都没有被收集。 详情请参考我们的",SignIn:"登录",SignInAsMe:"实名登录",SignInAnonymously:"匿名登录",SignOut:"退出账号",IfYouAreAStudent:"如果您是一个学生"},skyMenu:{Axes:"显示坐标轴",Theme:"环境主题",ThemeDefault:"默认",ThemeDesert:"沙漠",ThemeDune:"沙丘",ThemeForest:"森林",ThemeGrassland:"草原",ThemeHill:"丘陵",ThemeLake:"湖泊",ThemeMountain:"山脉",ThemeRural:"田园",SunlightAttenuationCoefficientInAir:"阳光在空气中传播的衰减系数",ConvectiveCoefficientOfAir:"空气对流传热系数",HighestTemperatureTimeInMinutes:"最高气温时间(分钟)",SelectSunAnglesToShow:"选择太阳角度显示",ShowAzimuthAngle:"显示方位角",ShowElevationAngle:"显示高度角",ShowZenithAngle:"显示天顶角",DirectLightBrightnessAtNoon:"正午直射光照度",AmbientLightBrightnessAtNoon:"正午环境光照度"},groundMenu:{MonthlyIrradianceLoss:"月份辐射度损失比",Vegetation:"植被",LeafOutDay:"树叶长出的日子",LeafOffDay:"树叶脱落的日子",Albedo:"反照率",ImageOnGround:"地面显示图像",WaterSurface:"水面",RemoveAllUnlockedTrees:"删除所有非固定的树木",RemoveAllUnlockedFlowers:"删除所有非固定的花草",RemoveAllUnlockedSolarPanels:"删除所有非固定的光伏板",RemoveAllUnlockedPeople:"删除所有非固定的人物",RemoveAllUnlockedFoundations:"删除所有非固定的地基",RemoveAllUnlockedCuboids:"删除所有非固定的长方体",DoYouReallyWantToRemoveAllPeople:"你确定删除所有非固定的人物吗",DoYouReallyWantToRemoveAllTrees:"你确定删除所有非固定的树木吗",DoYouReallyWantToRemoveAllFlowers:"你确定删除所有非固定的花草吗",DoYouReallyWantToRemoveAllSolarPanels:"你确定删除所有非固定的光伏板吗",DoYouReallyWantToRemoveAllFoundations:"你确定删除所有非固定的地基吗",DoYouReallyWantToRemoveAllCuboids:"你确定删除所有非固定的长方体吗",LockAllUnlockedElements:"固定所有非固定的部件",UnlockAllLockedElements:"解除所有的固定"},labelSubMenu:{Label:"标签",LabelText:"标签的内容",LabelHeight:"标签的高度",LabelSize:"标签的大小",LabelFontSize:"字体的大小",LabelColor:"标签的颜色",KeepShowingLabel:"显示标签"},foundationMenu:{RemoveAllUnlockedSolarPanels:"删除此地基上所有非固定的光伏板",RemoveAllUnlockedParabolicTroughs:"删除此地基上所有非固定的抛物线槽",RemoveAllUnlockedParabolicDishes:"删除此地基上所有非固定的抛物线碟",RemoveAllUnlockedFresnelReflectors:"删除此地基上所有非固定的菲涅耳反射镜",RemoveAllUnlockedHeliostats:"删除此地基上所有非固定的定日镜",RemoveAllUnlockedWindTurbines:"删除此地基上所有非固定的风力涡轮机",RemoveAllUnlockedSensors:"删除此地基上所有非固定的传感器",RemoveAllUnlockedLights:"删除此地基上所有非固定的电灯",RemoveAllUnlockedWalls:"删除此地基上所有非固定的墙",RemoveAllUnlockedWindows:"删除此地基上所有非固定的窗户",RemoveAllUnlockedDoors:"删除此地基上所有非固定的门",RemoveAllUnlockedPolygons:"删除此地基上所有非固定的多边形",RemoveAllUnlockedHumans:"删除此地基上所有非固定的人物",RemoveAllUnlockedTrees:"删除此地基上所有非固定的树木",RemoveAllUnlockedFlowers:"删除此地基上所有非固定的花草",Racks:"支架",Texture01:"一号材质",Texture02:"二号材质",Texture03:"三号材质",Texture04:"四号材质",Texture05:"五号材质",Texture06:"六号材质",Texture07:"七号材质",Texture08:"八号材质",Texture09:"九号材质",Texture10:"十号材质",SolarPanels:"光伏板",SolarPanelArray:"光伏板阵列",DoYouReallyWantToRemoveAllSolarPanelsOnFoundation:"你确定删除此地基上所有非固定的光伏板吗",ParabolicTroughs:"抛物线槽",DoYouReallyWantToRemoveAllParabolicTroughsOnFoundation:"你确定删除此地基上所有非固定的抛物线槽吗",ParabolicDishes:"抛物线碟",DoYouReallyWantToRemoveAllParabolicDishesOnFoundation:"你确定删除此地基上所有非固定的抛物线碟吗",FresnelReflectors:"菲涅耳反射镜",DoYouReallyWantToRemoveAllFresnelReflectorsOnFoundation:"你确定删除此地基上所有非固定的菲涅耳反射镜吗",Heliostats:"定日镜",DoYouReallyWantToRemoveAllHeliostatsOnFoundation:"你确定删除此地基上所有非固定的定日镜吗",WindTurbines:"风力涡轮机",DoYouReallyWantToRemoveAllWindTurbinesOnFoundation:"你确定删除此地基上所有非固定的风力涡轮机吗",Sensors:"传感器",DoYouReallyWantToRemoveAllSensorsOnFoundation:"你确定删除此地基上所有非固定的传感器吗",Lights:"电灯",DoYouReallyWantToRemoveAllLightsOnFoundation:"你确定删除此地基上所有非固定的电灯吗",Walls:"墙",DoYouReallyWantToRemoveAllWallsOnFoundation:"你确定删除此地基上所有非固定的墙吗",Windows:"窗户",DoYouReallyWantToRemoveAllWindowsOnFoundation:"你确定删除此地基上所有非固定的窗户吗",Doors:"门",DoYouReallyWantToRemoveAllDoorsOnFoundation:"你确定删除此地基上所有非固定的门吗",Polygons:"多边形",DoYouReallyWantToRemoveAllPolygonsOnFoundation:"你确定删除此地基上所有非固定的多边形吗",Humans:"人物",DoYouReallyWantToRemoveAllHumansOnFoundation:"你确定删除此地基上所有非固定的人物吗",Trees:"树木",DoYouReallyWantToRemoveAllTreesOnFoundation:"你确定删除此地基上所有非固定的树木吗",Flowers:"花草",DoYouReallyWantToRemoveAllFlowersOnFoundation:"你确定删除此地基上所有非固定的花草吗",OnlyThisFoundation:"只这块地基",AllSelectedFoundations:"所有选中的地基",AllConnectedFoundations:"所有相连的地基",AllFoundations:"所有的地基",AddPolygon:"添加多边形",SolarStructure:"太阳能构型",GroupMaster:"主地基",LockAllUnlockedElementsOnThisFoundation:"固定此地基上所有非固定的部件",UnlockAllLockedElementsOnThisFoundation:"解除此地基上所有的固定",GroundFloorRValue:"建筑物地板的R值",OnlyThisGroundFloor:"只这个建筑物的地板",AllGroundFloors:"所有建筑物的地板"},solarPowerTowerMenu:{ReceiverTowerForHeliostats:"和定日镜配套的吸收塔",ReceiverTowerPhysicalProperties:"太阳能吸收塔的物理性质",ReceiverTowerHeight:"太阳能吸收塔的高度",ReceiverTowerRadius:"太阳能吸收塔的半径",ReceiverAbsorptance:"太阳能吸收器的吸收率",ReceiverOpticalEfficiency:"太阳能吸收器的光效率",ReceiverThermalEfficiency:"太阳能吸收器的热效率"},solarAbsorberPipeMenu:{AbsorberPipeForFresnelReflectors:"和菲涅尔反射镜配套的吸收管",AbsorberPipePhysicalProperties:"太阳能吸收管的物理性质",AbsorberHeight:"太阳能吸收管的安装高度",AbsorberApertureWidth:"太阳能吸收管的孔径",AbsorberPipePoleNumber:"太阳能吸收管的支柱数量",AbsorberAbsorptance:"太阳能吸收管的吸收率",AbsorberOpticalEfficiency:"太阳能吸收管的光效率",AbsorberThermalEfficiency:"太阳能吸收管的热效率"},solarUpdraftTowerMenu:{SolarUpdraftTower:"太阳能上升气流塔",SolarUpdraftTowerPhysicalProperties:"太阳能上升气流塔的物理性质",SolarUpdraftTowerChimneyHeight:"太阳能上升气流塔烟囱的高度",SolarUpdraftTowerChimneyRadius:"太阳能上升气流塔烟囱的半径",SolarUpdraftTowerCollectorHeight:"太阳能上升气流塔集热棚的高度",SolarUpdraftTowerCollectorRadius:"太阳能上升气流塔集热棚的半径",SolarUpdraftTowerCollectorTransmissivity:"太阳能上升气流塔集热棚的透射率",SolarUpdraftTowerCollectorEmissivity:"太阳能上升气流塔集热棚的发射率",SolarUpdraftTowerDischargeCoefficient:"太阳能上升气流塔的流量系数",SolarUpdraftTowerTurbineEfficiency:"太阳能上升气流塔的涡轮机效率"},cuboidMenu:{Texture01:"一号材质",Texture02:"二号材质",Texture03:"三号材质",Texture04:"四号材质",Texture05:"五号材质",Texture06:"六号材质",Texture07:"七号材质",Texture08:"八号材质",Texture09:"九号材质",Texture10:"十号材质",RemoveAllUnlockedSolarPanels:"删除此长方体表面上所有非固定的光伏板",RemoveAllUnlockedSensors:"删除此长方体表面上所有非固定的传感器",RemoveAllUnlockedPolygons:"删除此长方体表面上所有非固定的多边形",RemoveAllUnlockedHumans:"删除此长方体表面上所有非固定的人物",RemoveAllUnlockedTrees:"删除此长方体表面上所有非固定的树木",RemoveAllUnlockedFlowers:"删除此长方体表面上所有非固定的花草",RemoveAllUnlockedLights:"删除此长方体表面上所有非固定的电灯",Racks:"支架",SolarPanels:"光伏板",Lights:"电灯",DoYouReallyWantToRemoveAllLightsOnCuboid:"你确定删除此长方体表面上所有非固定的电灯吗",DoYouReallyWantToRemoveAllSolarPanelsOnCuboid:"你确定删除此长方体表面上所有非固定的光伏板吗",Sensors:"传感器",DoYouReallyWantToRemoveAllSensorsOnCuboid:"你确定删除此长方体表面上所有非固定的传感器吗",Polygons:"多边形",DoYouReallyWantToRemoveAllPolygonsOnCuboid:"你确定删除此长方体表面上所有非固定的多边形吗",Humans:"人物",DoYouReallyWantToRemoveAllHumansOnCuboid:"你确定删除此长方体表面上所有非固定的人物吗",Trees:"树木",DoYouReallyWantToRemoveAllTreesOnCuboid:"你确定删除此长方体表面上所有非固定的树木吗",Flowers:"花草",DoYouReallyWantToRemoveAllFlowersOnCuboid:"你确定删除此长方体表面上所有非固定的花草吗",OnlyThisCuboid:"只这个长方体",AllCuboidsOnSameSurface:"同一表面上所有的长方体",AllCuboidsAboveSameBase:"同一地基上所有的长方体",AllSelectedCuboids:"所有选中的长方体",AllCuboids:"所有的长方体",OnlyThisSide:"只这个表面",AllSidesOfThisCuboid:"这个长方体所有的侧面",AllSidesOfSelectedCuboids:"所有选中长方体所有的侧面",AllSidesOfAllCuboids:"所有的长方体所有的侧面",AddPolygon:"添加多边形",Stackable:"可堆砌",GroupMaster:"主长方体"},polygonMenu:{Texture01:"一号材质",Texture02:"二号材质",Texture03:"三号材质",Texture04:"四号材质",Texture05:"五号材质",Texture06:"六号材质",Texture07:"七号材质",Texture08:"八号材质",Texture09:"九号材质",Texture10:"十号材质",TextBox:"文字框",FontOutlineColor:"字体轮廓颜色",FontOutlineWidth:"字体轮廓线宽",FontStrokeColor:"字体描边颜色",FontStrokeWidth:"字体描边线宽",NoOutline:"无轮廓线",Shiny:"光泽",Filled:"填充",FillTexture:"填充材质",FillColor:"填充颜色",Opacity:"遮光度",LineColor:"线条颜色",LineWidth:"线条宽度",LineStyle:"线条样式",SolidLine:"实线",DashedLine:"虚线",DottedLine:"点线",InsertVertexBeforeIndex:"前面插入顶点",InsertVertexAfterIndex:"后面插入顶点",DeleteVertex:"移除顶点",OnlyThisPolygon:"只这个多边形",AllPolygonsOnSurface:"同一表面上所有的多边形",AllPolygonsAboveFoundation:"同一地基上所有的多边形",AllSelectedPolygons:"所有选中的多边形",AllPolygons:"所有的多边形",Layout:"布局",SolarPanelArrayLayout:"光伏板阵列布局",SolarPanelArrayLayoutParametricDesign:"光伏板阵列布局参数化设计",SolarPanelArrayLayoutGenerativeDesign:"光伏板阵列布局生成式设计",SolarPanelArrayModel:"光伏板型号",SolarPanelArrayOrientation:"排列方向",SolarPanelArrayTiltAngle:"倾斜角度",SolarPanelArrayRowWidth:"行宽度",SolarPanelArrayInterRowSpacing:"行间距",SolarPanelArrayRowSpacing:"行间距",SolarPanelArrayRowAxis:"行轴方向",SolarPanelArrayLeftRightRowAxis:"左右方向(相对)",SolarPanelArrayUpDownRowAxis:"上下方向(相对)",SolarPanelArrayEastWestRowAxis:"东西方向(绝对)",SolarPanelArrayNorthSouthRowAxis:"南北方向(绝对)",SolarPanelArrayMargin:"边缘余地",SolarPanelArrayPoleHeight:"支架高度",SolarPanelArrayPoleSpacing:"支柱间隔",SolarPanelArrayTotalYearlyCost:"全年总成本",SolarPanelArrayTotalYearlyRevenue:"全年总收入",SolarPanelArrayTotalYearlyYield:"全年总发电量",SolarPanelArrayMeanYearlyYield:"平均年发电量",SolarPanelArrayYearlyProfit:"全年利润",LayoutNotAcceptedCheckYourParameters:"恕不能采用此布局。请检查您的参数设置。"},optimizationMenu:{Optimization:"优化",Parameters:"参数",Variables:"变量",Constants:"常量",GeneticAlgorithm:"遗传算法",GeneticAlgorithmSettings:"遗传算法设定",ParticleSwarmOptimization:"粒子群优化",ParticleSwarmOptimizationSettings:"粒子群优化设定",SolarPanelTiltAngleOptimization:"光伏板倾斜角度优化",SolarPanelArrayLayout:"光伏板阵列布局",Generation:"世代",Gene:"基因",NormalizedVariables:"标准化变量",Objective:"目标函数",ObjectiveFunctionDailyTotalYield:"当日总产出",ObjectiveFunctionYearlyTotalYield:"全年总产出",ObjectiveFunctionDailyMeanYield:"当日平均产出",ObjectiveFunctionYearlyMeanYield:"全年平均产出",ObjectiveFunctionDailyProfit:"当日利润",ObjectiveFunctionYearlyProfit:"全年利润",GeneticAlgorithmSelectionMethod:"遗传算法选择方法",RouletteWheel:"轮盘制",Tournament:"淘汰制",SearchMethod:"搜索方法",GlobalSearchUniformSelection:"全局搜索均匀取样",LocalSearchRandomOptimization:"局部搜索随机优化",PopulationSize:"种群个体数目",MaximumGenerations:"最大世代数目",SelectionRate:"选择概率",CrossoverRate:"交配概率",MutationRate:"突变概率",Step:"步数",SwarmSize:"粒子数目",MaximumSteps:"最大步数",MaximumVelocity:"最大速度",InertiaWeight:"惯性权重",CognitiveCoefficient:"认知系数",SocialCoefficient:"社会系数",ConvergenceThreshold:"终止条件的收敛阈值",LocalSearchRadius:"局部搜索的半径",RowsPerRackRange:"单个支架上光伏板行数的变化范围",TiltAngleRange:"光伏板倾斜角度的变化范围",InterRowSpacingRange:"光伏板阵列行间距的变化范围",ClickTargetPolygonToActivate:"点击目标多边形激活",ClickTargetFoundationToActivate:"点击目标地基激活"},treeMenu:{ShowModel:"显示近似模型",Flip:"翻转",Type:"树种",Spread:"树冠直径"},flowerMenu:{Flip:"翻转",Type:"品种",Spread:"直径"},peopleMenu:{ChangePerson:"改变人物",Flip:"转身",Observer:"观察者",ViewFromThisPerson:"视角移到此人位置"},lightMenu:{Color:"颜色",Intensity:"亮度",Decay:"衰减",MaximumDistance:"最大距离",Inside:"内部"},solarCollectorMenu:{Coordinates:"坐标",RelativeXCoordinateOfCenter:"中心的相对X坐标",RelativeYCoordinateOfCenter:"中心的相对Y坐标",RelativeAzimuth:"相对方位角",Pole:"支柱",PoleHeight:"支柱高度",PoleRadius:"支柱半径",ExtraPoleHeight:"额外的支柱高度",ExtraPoleHeightInAdditionToHalfWidth:"宽度一半额外的支柱高度",DrawSunBeam:"显示光束"},concentratedSolarPowerCollectorMenu:{ReflectorReflectance:"反射器镜面反射率",ReceiverAbsorptance:"接收器吸收率",ReflectorOpticalEfficiency:"反射器光效率",ReceiverThermalEfficiency:"接收器热效率"},solarWaterHeaterMenu:{OnlyThisSolarWaterHeater:"只这个太阳能热水器",AllSolarWaterHeatersOnSurface:"同一表面上所有的太阳能热水器",AllSolarWaterHeatersAboveFoundation:"同一地基上所有的太阳能热水器",AllSelectedSolarWaterHeaters:"所有选中的太阳能热水器",AllSolarWaterHeaters:"所有的太阳能热水器"},solarPanelMenu:{ElectricalProperties:"电气特性",InverterEfficiency:"逆变器效率",InverterEfficiencyExplained:"直流电转换为交流电的效率。",DcToAcSizeRatio:"直流-交流容量比例",DcToAcSizeRatioExplained:"直流电容量和交流电容量的比例。",ChangePvModel:"改变光伏板型号",Orientation:"排列方向",Portrait:"纵向",Landscape:"橫向",FrameColor:"框架颜色",Panels:"块",PanelsWide:"块光伏板宽",PanelsLong:"块光伏板长",TiltAngle:"倾斜角度",SouthFacingIsPositive:"朝南为正",Tracker:"追日系统",SolarTrackerFollowsSun:"追日系统提高光伏板产出。",PoleSpacing:"支柱间隔",NoTracker:"无追日系统",HorizontalSingleAxisTracker:"水平单轴追日系统",VerticalSingleAxisTracker:"竖直单轴追日系统",AltazimuthDualAxisTracker:"地平双轴追日系统",OnlyThisSolarPanel:"只这个光伏板",AllSolarPanelsOnSurface:"同一表面上所有的光伏板",AllSolarPanelsAboveFoundation:"同一地基上所有的光伏板",AllSelectedSolarPanels:"所有选中的光伏板",AllSolarPanels:"所有的光伏板"},pvModelPanel:{SolarPanelSpecs:"光伏板型号性能",General:"概况",Electrical:"电气",CellCountInXDirection:"X方向电池数目",CellCountInYDirection:"Y方向电池数目",Weight:"重量",Kilogram:"千克",RatedVoltage:"额定电压",RatedCurrent:"额定电流",OpenCircuitVoltage:"开路电压",ShortCircuitCurrent:"短路电流",MaximumRatedPower:"最大额定功率",Model:"型号",PanelSize:"尺寸",Cells:"电池組",CellType:"光伏电池类型",Monocrystalline:"单晶硅",Polycrystalline:"多晶硅",ThinFilm:"薄膜",Bifacial:"双面",PowerBifaciality:"功率双面性因子(背面对正面)",Black:"黑色",Blue:"蓝色",ShadeTolerance:"阴影耐受度",SolarCellEfficiency:"光伏电池效率",NominalOperatingCellTemperature:"名义电池运行温度",TemperatureCoefficientOfPmax:"Pmax温度系数",AddedCustomSolarPanels:"已有",DisplayThisCustomSolarPanel:"展示这个定制光伏板",ExportThisCustomSolarPanel:"输出此定制光伏板",ImportCustomSolarPanelFromClipboard:"从系统剪切板输入定制光伏板数据d",CustomSolarPanelExportedToClipboard:"定制光伏板拷贝到剪贴板",DoYouReallyWantToRemoveThisCustomSolarPanel:"你确定删除此定制光伏板",MakeSureThisCustomSolarPanelIsNotUsed:"删除之前请确认此定制光伏板没有被当前模型采用",ThisCustomSolarPanelIsUsed:"此定制光伏板被当前模型采用",DoYouReallyWantToImportCustomSolarPanel:"你确定輸入定制光伏板",ExistingSettingsWillBeOverwritten:"现有的设定将被取代",CannotAddCustomSolarPanel:"无法添加此定制光伏板",CustomSolarPanelMustHaveModelName:"定制光伏板必须要有型号",CustomSolarPanelExists:"当前文件已经定义了此名字的定制光伏板",FailInImportingDataFromClipboard:"从系统剪切板输入数据失败"},parabolicTroughMenu:{ModuleLength:"模块长度",Modules:"模块",ModulesLong:"模块长",LatusRectum:"通径",OnlyThisParabolicTrough:"只这个抛物线槽",AllParabolicTroughsAboveFoundation:"同一地基上所有的抛物线槽",AllSelectedParabolicTroughs:"所有选中的抛物线槽",AllParabolicTroughs:"所有的抛物线槽"},fresnelReflectorMenu:{AbsorberPipe:"吸收管",SelectAbsorberToReflectSunlightTo:"选择阳光反射到的吸收管",ModuleLength:"模块长度",Modules:"模块",ModulesLong:"模块长",OnlyThisFresnelReflector:"只这个菲涅耳反射镜",AllFresnelReflectorsAboveFoundation:"同一地基上所有的菲涅耳反射镜",AllSelectedFresnelReflectors:"所有选中的菲涅耳反射镜",AllFresnelReflectors:"所有的菲涅耳反射镜"},heliostatMenu:{Tower:"吸收塔",SelectTowerToReflectSunlightTo:"选择阳光反射到的吸收塔",OnlyThisHeliostat:"只这个定日镜",AllHeliostatsAboveFoundation:"同一地基上所有的定日镜",AllSelectedHeliostats:"所有选中的定日镜",AllHeliostats:"所有的定日镜"},parabolicDishMenu:{ReceiverStructure:"接收器结构",CentralPole:"中心直柱",CentralPoleWithTripod:"三脚架和中心直柱",Quadrupod:"四脚架",RimDiameter:"外圈直径",LatusRectum:"通径",ExtraPoleHeightInAdditionToRadius:"半径之外额外的支架高度",OnlyThisParabolicDish:"只这个抛物线碟",AllParabolicDishesAboveFoundation:"同一地基上所有的抛物线碟",AllSelectedParabolicDishes:"所有选中的抛物线碟",AllParabolicDishes:"所有的抛物线碟"},windTurbineMenu:{BirdSafeDesign:"鸟类安全设计",BirdSafeNone:"无",BirdSafeBicolor:"双色",BirdSafeStriped:"条纹",Rotor:"转子",BladeNumber:"叶片数目",RotorInitialAngle:"转子初始角度",RotorBladeDesign:"转子叶片设计",RotorBladeRadius:"转子叶片半径",RotorBladePitchAngle:"转子叶片俯仰角",RelativeYawAngle:"相对偏流角",MaximumChordLength:"最大弦长度",Tower:"塔架",TowerHeight:"塔架高度",TowerRadius:"塔架半径",HubDesign:"转子轮毂设计",HubRadius:"轮毂半径",HubLength:"轮毂长度",OnlyThisWindTurbine:"只这个风力涡轮机",AllWindTurbinesAboveFoundation:"同一地基上所有的风力涡轮机",AllSelectedWindTurbines:"所有选中的风力涡轮机",AllWindTurbines:"所有的风力涡轮机"},wallMenu:{TextureDefault:"默认材质",Texture01:"一号材质",Texture02:"二号材质",Texture03:"三号材质",Texture04:"四号材质",Texture05:"五号材质",Texture06:"六号材质",Texture07:"七号材质",Texture08:"八号材质",Texture09:"九号材质",Texture10:"十号材质",SizeOfWall:"墙的尺寸",OnlyThisWall:"只这堵墙",AllConnectedWalls:"所有连接的墙",AllWallsAboveFoundation:"同一地基上所有的墙",AllSelectedWalls:"所有选中的墙",AllWalls:"所有的墙",Windows:"窗户",LockAllUnlockedWindows:"固定所有非固定的窗户",UnlockAllLockedWindows:"解除所有的窗户固定",RemoveAllUnlockedWindows:"删除这堵墙上所有非固定的窗户",DoYouReallyWantToRemoveAllWindowsOnThisWall:"你确定删除这堵墙上所有非固定的窗户吗",Doors:"门",LockAllUnlockedDoors:"固定所有非固定的门",UnlockAllLockedDoors:"解除所有的门固定",RemoveAllUnlockedDoors:"删除这堵墙上所有非固定的门",DoYouReallyWantToRemoveAllDoorsOnThisWall:"你确定删除这堵墙上所有非固定的门吗",SolarPanels:"光伏板",LockAllUnlockedSolarPanels:"固定所有非固定的光伏板",UnlockAllLockedSolarPanels:"解除所有的光伏板固定",RemoveAllUnlockedSolarPanels:"删除这堵墙上所有非固定的光伏板",DoYouReallyWantToRemoveAllSolarPanelsOnThisWall:"你确定删除这堵墙上所有非固定的光伏板吗",Sensors:"传感器",LockAllUnlockedSensors:"固定所有非固定的传感器",UnlockAllLockedSensors:"解除所有的传感器固定",RemoveAllUnlockedSensors:"删除这堵墙上所有非固定的传感器",DoYouReallyWantToRemoveAllSensorsOnThisWall:"你确定删除这堵墙上所有非固定的传感器吗",Lights:"电灯",LockAllUnlockedLights:"固定这堵墙上所有非固定的电灯",UnlockAllLockedLights:"解除这堵墙上所有的电灯固定",RemoveAllUnlockedLights:"删除这堵墙上所有非固定的电灯",DoYouReallyWantToRemoveAllLightsOnThisWall:"你确定删除这堵墙上所有非固定的电灯吗",Polygons:"多边形",LockAllUnlockedPolygons:"固定这堵墙上所有非固定的多边形",UnlockAllLockedPolygons:"解除这堵墙上所有的多边形固定",RemoveAllUnlockedPolygons:"删除这堵墙上所有非固定的多边形",DoYouReallyWantToRemoveAllPolygonsOnThisWall:"你确定删除这堵墙上所有非固定的多边形吗",WallStructure:"墙结构",DefaultStructure:"默认",StudStructure:"墙柱",PillarStructure:"圆柱",Opacity:"遮光度",StructureSpacing:"结构间距",StructureWidth:"结构宽度",StructureThickness:"结构厚度",StructureColor:"结构颜色",Color:"牆体颜色",Height:"高度",Thickness:"厚度",Texture:"材质",AllLightsOnWallInside:"所有电灯在牆内",AllLightsOnWallOutside:"所有电灯在牆外",Fill:"填充",Full:"全部",Partial:"部分",Empty:"空白",OpenToOutside:"对外面开放",EavesLength:"屋檐延伸长度",Parapet:"女墙",ParapetColor:"女墙颜色",ParapetTexture:"女墙材质",ParapetHeight:"女墙高度",CopingsHeight:"顶盖高度",CopingsWidth:"顶盖宽度"},windowMenu:{OnlyThisWindow:"只这个窗户",AllWindowsOnSurface:"同一表面上所有的窗户",AllWindowsAboveFoundation:"同一地基上所有的窗户",AllSelectedWindows:"所有选中的窗户",AllWindows:"所有的窗户",Width:"宽度",Height:"高度",Setback:"离墙体外表面的距离",RelativeToWallThickness:"相对于墙的厚度",Mullion:"直棂",HorizontalMullion:"水平的直棂",VerticalMullion:"竖直的直棂",MullionWidth:"直棂宽度",HorizontalMullionSpacing:"水平直棂的间距",VerticalMullionSpacing:"竖直直棂的间距",MullionColor:"直棂颜色",Tint:"着色",Opacity:"不透明度",SolarHeatGainCoefficient:"太阳辐射热获取系数(SHGC) = 1 - 不透明度",Shutter:"百叶窗",LeftShutter:"左侧百叶窗",RightShutter:"右侧百叶窗",BothShutters:"两侧百叶窗",ShutterWidth:"相对宽度",ShutterColor:"百叶窗颜色",Frame:"边框",FrameWidth:"边框宽度",SillWidth:"窗台宽度",Color:"边框颜色",WindowType:"窗户种类",Default:"默认",Arched:"拱形",Polygonal:"多边形",Interior:"内窗",Empty:"空白"},roofMenu:{TextureDefault:"默认材质",Texture01:"一号材质",Texture02:"二号材质",Texture03:"三号材质",Texture04:"四号材质",Texture05:"五号材质",Texture06:"六号材质",Texture07:"七号材质",OnlyThisRoof:"只这个屋顶",AllRoofsAboveFoundation:"同一地基上所有的屋顶",AllSelectedRoofs:"所有选中的屋顶",AllRoofs:"所有的屋顶",OnlyThisCeiling:"只这个天花板",AllCeilingsAboveFoundation:"同一地基上所有的天花板",AllCeilings:"所有的天花板",EavesOverhangLength:"屋檐延伸长度",RafterSpacing:"屋椽间距",RafterWidth:"屋椽宽度",RafterThickness:"屋椽厚度",RafterColor:"屋椽颜色",RoofColor:"屋顶颜色",RoofSideColor:"屋顶侧面颜色",GlassTint:"玻璃颜色",Opacity:"遮光度",RoofStructure:"屋顶结构",DefaultStructure:"默认",RafterStructure:"屋椽",GlassStructure:"玻璃",SolarPanels:"光伏板",LockAllUnlockedSolarPanels:"固定所有非固定的光伏板",UnlockAllLockedSolarPanels:"解除所有的光伏板固定",RemoveAllUnlockedSolarPanels:"删除这个屋顶上所有非固定的光伏板",DoYouReallyWantToRemoveAllSolarPanelsOnThisRoof:"你确定删除这个屋顶上所有非固定的光伏板吗",Windows:"天窗",LockAllUnlockedWindows:"固定所有非固定的天窗",UnlockAllLockedWindows:"解除所有的天窗固定",RemoveAllUnlockedWindows:"删除这个屋顶上所有非固定的天窗",DoYouReallyWantToRemoveAllWindowsOnThisRoof:"你确定删除这个屋顶上所有非固定的天窗吗",Sensors:"传感器",LockAllUnlockedSensors:"固定所有非固定的传感器",UnlockAllLockedSensors:"解除所有的传感器固定",RemoveAllUnlockedSensors:"删除这个屋顶上所有非固定的传感器",DoYouReallyWantToRemoveAllSensorsOnThisRoof:"你确定删除这个屋顶上所有非固定的传感器吗",Lights:"电灯",RemoveAllUnlockedLights:"删除这个屋顶上所有非固定的电灯",DoYouReallyWantToRemoveAllLightsOnThisRoof:"你确定删除这个屋顶上所有非固定的电灯吗",AllLightsOnRoofInside:"所有电灯在屋顶内",AllLightsOnRoofOutside:"所有电灯在屋顶外",Rise:"相对高度",Ceiling:"天花板",RoofRValue:"屋顶R值",CeilingRValue:"天花板R值"},doorMenu:{TextureDefault:"默认材质",Texture01:"一号材质",Texture02:"二号材质",Texture03:"三号材质",Texture04:"四号材质",Texture05:"五号材质",Texture06:"六号材质",Texture07:"七号材质",Texture08:"八号材质",Texture09:"九号材质",Texture10:"十号材质",Texture11:"十一号材质",Texture12:"十二号材质",Texture13:"十三号材质",Texture14:"十四号材质",Texture15:"十五号材质",Texture16:"十六号材质",Texture17:"十七号材质",OnlyThisDoor:"只这个门",AllDoorsOnWall:"同一面墙上所有的门",AllDoorsAboveFoundation:"同一地基上所有的门",AllSelectedDoors:"所有选中的门",AllDoors:"所有的门",DoorType:"门种类",Default:"默认",Arched:"拱形",Filled:"填充",FrameColor:"门框颜色",Interior:"内门"},siteInfoPanel:{High:"最高温度",Low:"最低温度"},designInfoPanel:{NumberOfSelectedHeliostats:"选中的定日镜总数",NumberOfSelectedSolarPanels:"选中的光伏板总数",ElectricityGeneratedDailyBySolarPanels:"这些光伏板的日发电量",SceneDiameter:"场景直径",BuildingArea:"建筑面积"},visualizationControlPanel:{ColorContrast:"热图颜色对比度",FluxScale:"热通量长度",ClickUpOrDownArrowButtonsToChange:"点击上下箭头改变参数"},instructionPanel:{Rotate:"旋转",DragMouse:"拖动鼠标",Zoom:"缩放",MouseWheelOrKeys:"鼠标滚轮或者Ctrl+[和Ctrl+]",MouseWheelOrKeysMac:"鼠标滚轮或者⌘+[和⌘+]",Pan:"平移",HoldCtrlDragMouse:"按下Ctrl键并拖动鼠标",HoldMetaDragMouse:"按下⌘键并拖动鼠标",Enter2DMode:"進入二维模式",Exit2DMode:"退出二维模式",NavigationMode:"导航模式",EnableNavigation:"進入导航模式",DisableNavigation:"退出导航模式",MoveForwardBack:"前后移动",MoveForwardBackInstruction:"按W/S键",MoveLeftRight:"左右移动",MoveLeftRightInstruction:"按A/D键",MoveUpDown:"上下移动",MoveUpDownInstruction:"按Z/X键",Turn:"拐弯",TurnInstruction:"按方向键",ResetView:"重置视角",AutoRotate:"自动旋转",StartOrStop:"按F4键启动或停止"},mapPanel:{ImageOnGround:"地面显示图像",HideAddress:"隐藏地址",WeatherStations:"气象站",WeatherStationsNote:"关闭此选项以提高地图速度",Coordinates:"经纬度坐标",Zoom:"放大程度"},visibilityPanel:{SolarPanelVisibility:"光伏板对观察者的可见度",Observer:"观察者",VantagePoint:"观察位置",ItemizedVisibilityByFields:"每个场的可见度",TotalVisibility:"总可见度"},sensorPanel:{LightSensor:"光传感器",WeatherDataFrom:"气象数据来自"},buildingEnergyPanel:{DailyBuildingEnergy:"建筑物日能耗",YearlyBuildingEnergy:"建筑物年能耗",Heater:"暖气",AC:"空调",SolarPanel:"光伏",Net:"净能耗"},solarPanelYieldPanel:{SolarPanelDailyYield:"光伏日发电量",SolarPanelYearlyYield:"光伏年发电量",Yield:"发电量",YieldPerHour:"每小时发电量",DailyTotal:"日发电总量",YearlyTotal:"年发电总量",ShowOutputsOfIndividualSolarPanels:"显示每行光伏板单独发电量",Profit:"利润",TotalCost:"总成本",TotalRevenue:"总收入",TotalYield:"总发电量",MeanYield:"平均发电量",ModuleCount:"光伏板总数"},parabolicTroughYieldPanel:{ParabolicTroughDailyYield:"抛物线槽日发电量",ParabolicTroughYearlyYield:"抛物线槽年发电量",Yield:"发电量",YieldPerHour:"每小时发电量",DailyTotal:"日发电总量",YearlyTotal:"年发电总量",ShowOutputsOfIndividualParabolicTroughs:"显示每行抛物线槽单独发电量"},parabolicDishYieldPanel:{ParabolicDishDailyYield:"抛物线碟日发电量",ParabolicDishYearlyYield:"抛物线碟年发电量",Yield:"发电量",YieldPerHour:"每小时发电量",DailyTotal:"日发电总量",YearlyTotal:"年发电总量",ShowOutputsOfIndividualParabolicDishes:"显示每个抛物线碟单独发电量"},fresnelReflectorYieldPanel:{FresnelReflectorDailyYield:"菲涅耳反射镜日发电量",FresnelReflectorYearlyYield:"菲涅耳反射镜年发电量",Yield:"发电量",YieldPerHour:"每小时发电量",DailyTotal:"日发电总量",YearlyTotal:"年发电总量",ShowOutputsOfIndividualFresnelReflectors:"显示每个菲涅耳反射镜单独发电量"},heliostatYieldPanel:{HeliostatDailyYield:"定日镜日发电量",HeliostatYearlyYield:"定日镜年发电量",Yield:"发电量",YieldPerHour:"每小时发电量",DailyTotal:"日发电总量",YearlyTotal:"年发电总量",ShowOutputsOfIndividualHeliostats:"显示每个定日镜单独发电量"},updraftTowerYieldPanel:{UpdraftTowerDailyYield:"太阳能上升气流塔日发电量",UpdraftTowerYearlyYield:"太阳能上升气流塔年发电量",ChimneyAirTemperature:"烟囱空气温度",ChimneyWindSpeed:"烟囱风速",Yield:"发电量",YieldPerHour:"每小时发电量",DailyTotal:"日发电总量",YearlyTotal:"年发电总量",ShowOutputsOfIndividualUpdraftTowers:"显示每个太阳能上升气流塔单独发电量"},heliodonPanel:{SunAndTimeSettings:"太阳和时间设置",SunAngles:"角度",TwentyFourHours:"24小时"},cloudFilePanel:{CopyTitle:"拷贝标题",TitleCopiedToClipBoard:"标题拷贝到剪贴板",SearchByTitle:"按标题搜索",MyLikes:"我喜欢的模型",MyCloudFiles:"我的云文件",GenerateLink:"生成链接",LinkGeneratedInClipBoard:"链接生成到剪贴板",DoYouReallyWantToDelete:"您确定删除此文件",IfSharedOrPublishedRenamingFileBreaksExistingLinks:"如果此文件已被分享或发布, 改名会使已有链接失效"},projectListPanel:{CopyTitle:"拷贝标题",TitleCopiedToClipBoard:"标题拷贝到剪贴板",SearchByTitle:"按标题搜索",MyProjects:"我的项目",GenerateProjectLink:"生成项目链接",ProjectLinkGeneratedInClipBoard:"项目链接生成到剪贴板",DoYouReallyWantToDeleteProject:"您确定删除项目",IfSharedOrPublishedRenamingProjectBreaksExistingLinks:"如果此项目已被分享或发布, 改名会使已有链接失效"},projectPanel:{ProjectSettings:"项目设定",ThumbnailImageSize:"缩略图大小",ProjectByOtherPeople:"别人的项目",Project:"项目",ProjectType:"类别",ProjectDescription:"描述",MakeDescriptionEditable:"编辑描述",MakeDescriptionNonEditable:"不编辑描述",DoubleClickToMakeDescriptionEditable:"双击此描述激活编辑功能",SolarPanelArray:"光伏板阵列设计",CurateCurrentDesign:"收藏当前设计",UpdateSelectedDesign:"更新选中设计",RemoveSelectedDesign:"删除选中设计",ClickToFlipSortingOrder:"点击逆转排序方向",DesignNotShownInSolutionSpaceClickToShow:"此设计目前不显示在设计空间内,点击显示",DesignShownInSolutionSpaceClickToHide:"此设计目前显示在设计空间内,点击隐藏",SolutionSpace:"设计空间",ChooseSolutionSpace:"选择设计空间",ChooseDataColoring:"选择数据着色",SameColorForAllDesigns:"所有设计一个颜色",OneColorForEachDesign:"每个设计一个颜色",SolutionSpaceScreenshot:"设计空间截屏",ScatterPlotScreenshot:"散点图截屏",SingleClickToSelectDoubleClickToOpen:"单击选择,双击打开。",SingleClickToDeselectDoubleClickToOpen:"单击取消选择,双击打开。",GenerateScatterPlot:"生成散点图",SelectXAxis:"选择X轴",SelectYAxis:"选择Y轴"},accountSettingsPanel:{MyAccountSettings:"我的账户设定",MyID:"我的🆔",ClickToCopyMyID:"点击此处拷贝我的ID",IDInClipBoard:"您现在可以粘贴ID了。",StoreMyNameInMyFilesWhenSaving:"保存文件时签上我的大名",DoYouReallyWantToShowYourNameInYourFiles:"您确定在您的文件里保存您的大名吗?",SignFileDisclaimer:"如果您选择保存,您的大名可能被所有打开您的文件的人看到。",Likes:"点赞总数",AllPublished:"发布总数",PublishedUnderAliases:"别名发布",UserCount:"用户总数",SchoolID:"学校编号",ClassID:"班级编号"},weatherPanel:{SunshineHours:"日照时间"},diurnalTemperaturePanel:{SelectAirTemperatureModel:"选择气温模型",Sinusoidal:"正弦函数"},economicsPanel:{EconomicsParameters:"经济学参数",ElectricitySellingPrice:"销售电价",OperationalCostPerUnit:"单位运行成本",SellingPrice:"销售电价",UnitCost:"单位成本"},navigationPanel:{NavigationParameters:"导航模式参数",MinimumMoveSpeed:"最小移动速度",MinimumTurnSpeed:"最小拐弯速度"},shadowSettingsPanel:{ShadowSettings:"阴影设定",ShadowCameraFarDistance:"最远距离",ShadowMapSize:"映射图长宽",Notes:"注意事项",RefreshPageNote:"改变设置后须刷新页面。",MapSizeWarning:"大的映射图长宽可能导致阿拉丁无法在某些电脑上运行。"},yearlyLightSensorPanel:{SkyClearness:"天空清晰度",ShowDaylightResults:"显示日照时间结果",ShowSkyClearnessResults:"显示天空清晰度结果",ShowAverageDailySolarRadiation:"显示日平均辐射结果"},analysisManager:{NoSensorForCollectingData:"没有传感器收集数据。",NoSolarPanelForAnalysis:"没有光伏板可以分析。",NoObserverForVisibilityAnalysis:"没有找到可见度分析的观察者。",NoSolarWaterHeaterForAnalysis:"沒有太阳能热水器可以分析。",NoParabolicDishForAnalysis:"沒有抛物线碟可以分析。",NoParabolicTroughForAnalysis:"沒有抛物线槽可以分析。",NoFresnelReflectorForAnalysis:"沒有菲涅耳反射镜可以分析。",NoHeliostatForAnalysis:"沒有定日镜可以分析。",NoSolarUpdraftTowerForAnalysis:"沒有太阳能上升气流塔可以分析。",NoBuildingForAnalysis:"沒有建筑物可以分析。"},toolbar:{CloudFile:"云文件",Select:"选择",AddFoundation:"添加地基",AddWall:"添加墙体",AddWindow:"添加窗户",AddDoor:"添加门",AddPyramidRoof:"添加金字塔屋顶",AddGableRoof:"添加双坡屋顶",AddHipRoof:"添加四坡屋顶",AddGambrelRoof:"添加复斜屋顶",AddMansardRoof:"添加折线屋顶",AddCuboid:"添加长方体",AddSensor:"添加传感器",AddSolarPanel:"添加光伏板",AddSolarWaterHeater:"添加太阳能热水器",AddBatteryStorage:"添加储蓄电池",AddParabolicDish:"添加抛物线碟",AddParabolicTrough:"添加抛物线槽",AddFresnelReflector:"添加菲涅耳反射镜",AddHeliostat:"添加定日镜",AddWindTurbine:"添加水平轴风力涡轮机",AddVerticalAxisWindTurbine:"添加垂直轴风力涡轮机",AddLight:"添加电灯",AddTree:"添加树木",AddFlower:"添加花草",AddPeople:"添加人物",DoubleClickToLockThisModeForNextAction:"双击按钮给下个动作锁定此模式",ClickToUnlockThisModeForNextAction:"点击按钮让动作完成即离开此模式",ManipulateGroup:"整体操作一个组",ClearScene:"清空场景",ShowSunAndTimeSettings:"显示太阳和时间设置",SpatialAnalysisOfEnergy:"能量的空间分析",DoYouReallyWantToClearContent:"您确定清空场景吗",ClickForMoreButtons:"点击此处切换到更多的按钮模式"},tooltip:{gotoIFI:"访问未来智能研究所",visitAladdinHomePage:"访问阿拉丁主页",clickToOpenMenu:"点击打开主菜单",clickToAccessAccountSettings:"点击打开账号设定"},tree:{Apple:"苹果树",Birch:"白桦",Coconut:"椰子树",Dogwood:"茱萸",Elm:"榆树",FanPalm:"扇叶棕榈",Linden:"菩提",Magnolia:"玉兰",Maple:"枫树",Oak:"橡树",Pine:"松树",Spruce:"云杉"},flower:{Bellflower:"铃兰",Boxwood:"黄杨",CactusCombo1:"仙人掌组合一",CactusCombo2:"仙人掌组合二",CactusCombo3:"仙人掌组合三",CactusCombo4:"仙人掌组合四",Hibiscus:"木槿",Hosta:"玉簪",Hydrangea:"绣球花",Peony:"牡丹",RedRose:"红玫瑰",Spirea:"绣线菊",Sunflower:"向日葵",TallBush:"高灌木",Tulip:"郁金香",WhiteFlower:"白花",YellowFlower:"黄花"},people:{Jaah:"贾阿",Jack:"杰克",Jacob:"雅各布",Jacqueline:"杰奎琳",Jade:"美玉",Jamelia:"洁米莉雅",James:"詹姆斯",Jane:"简",Jaya:"佳娅",Jaye:"杰伊",Jeanette:"珍妮特",Jedi:"杰迪",Jeff:"杰夫",Jena:"珍娜",Jennifer:"珍尼弗",Jess:"杰西",Jett:"杰特",Jill:"吉尔",Jiya:"吉娅",Joan:"琼",Jocelyn:"乔斯林",Joel:"乔尔",Joey:"乔伊",John:"约翰",Jonathon:"乔纳森",Jose:"何塞",Joseph:"约瑟夫",Joshua:"约书亚",Judd:"贾德",Judy:"朱蒂",Julia:"朱莉娅",Julio:"胡里奥",Jumapili:"祖玛匹莉",June:"准卫",Juro:"朱诺",Justin:"贾斯汀"},compass:{N:"北",S:"南",W:"西",E:"东"},month:{January:"一月",February:"二月",March:"三月",April:"四月",May:"五月",June:"六月",July:"七月",August:"八月",September:"九月",October:"十月",November:"十一月",December:"十二月"},modelsMap:{AllTime:"全部时间",SearchByPublisher:"按发布者搜索",SearchByLabel:"按标签搜索",MyPublishedModels:"我发布的模型",TotalNumberOfUserPublishedModelsInSelectedPeriod:"选定时间段用户发布的模型总数",AllTimeTotal:"全部时间用户发布的模型总数",SortFromOldestToNewest:"从早到晚排序",SortFromNewestToOldest:"从晚到早排序",SitesFound:"个位置",ModelsFoundOnThisSite:"个模型在此位置",ShowModelsPublishedByThisAuthor:"展示此用户发布的模型"}}},ppt={translation:{name:{IFI:"未來智能研究所",Aladdin:"阿拉丁",Tagline:"阿拉丁: 探索人工智慧時代的設計軟體 — 未來智能研究所研發"},cookie:{Statement:"聲明:為了改善您的用戶體驗,阿拉丁採用cookie儲存少量數據。",Accept:"同意"},aboutUs:{ProductBroughtToYouBy:"未來智能研究所榮譽出品",TermsOfService:"服務條款",PrivacyPolicy:"隱私政策",Software:"軟體",Content:"課件",Research:"研究",Support:"服務",Acknowledgment:"鳴謝",FundingInformation:"本產品的研發承蒙美國國家科學基金會慷慨資助(項目號#2105695,#2131097,#2301164)。本產品的任何觀點或結論僅代表創作者個人意見。",Contact:"如您需要更多資訊,請聯繫 Charles Xie (charles@intofuture.org)。我們會盡快回复。",Translators:"翻譯"},word:{BrandName:"品牌",Name:"名字",Refresh:"刷新",LastUpdate:"上一次更新",Small:"小",Medium:"中",Large:"大",Design:"設計",Information:"資訊",Type:"類别",Text:"文字",FontSize:"字體大小",FontColor:"字體顏色",Model:"模型",Models:"模型",Upload:"上傳",ClickCount:"點擊數",Share:"分享",AlreadyLike:"已點贊",Like:"點贊",MustLogInToLike:"必須登錄才能點贊",AllRightsReserved:"版權所有",MeterAbbreviation:"米",VoltAbbreviation:"伏",AmpereAbbreviation:"安",WattAbbreviation:"瓦",Version:"版本",VersionInitial:"版本",Options:"選項",Maximum:"最大",Minimum:"最小",MaximumNumber:"最多",MinimumNumber:"最少",MaximumValue:"最大值",MinimumValue:"最小值",Or:"或",None:"無",High:"高",Partial:"部分",Teacher:"老師",Class:"班級",Total:"總數",Leaderboard:"用戶排行榜",Latest:"最新",Range:"範圍",SIUnit:"國際單位制",USUnit:"美國單位制",ThermalTransmittance:"熱透過率",ThermalResistance:"熱阻",UValue:"U值",RValue:"R值",VolumetricHeatCapacity:"容積熱容",BuildingHVACSystem:"建築物暖通空調系統",ThermostatSetpoint:"恆溫器設定值",TemperatureToleranceThreshold:"溫度忍耐閾值",TemperatureToleranceThresholdExplanation:`當日最低外面溫度高於恆溫器設定值減去此閾值,暖氣不開。 +當日最高外面溫度低於恆溫器設定值加上此閾值,空調不開。`,Press:"按",Open:"打開",Save:"保存",SaveAsImage:"保存為圖像",SaveAsCsv:"保存為CSV",Update:"刷新",Paste:"粘貼",Copy:"複製",Cut:"剪切",Delete:"删除",Add:"添加",Lock:"固定",Translucent:"半透明",Transparency:"透明度",Color:"顏色",Pattern:"圖案",Texture:"材質",Thickness:"厚度",Size:"尺寸",Yes:"是",No:"不",OK:"確定",Cancel:"取消",Apply:"應用",Close:"關閉",ApplyTo:"適用於",Run:"運行",Pause:"暫停",Resume:"繼續",Clear:"清空",Warning:"警告",Caution:"小心",Reminder:"提醒",Length:"長度",Width:"寬度",Height:"高度",Radius:"半徑",Angle:"角度",Azimuth:"方位角",Coordinates:"坐標",Weather:"天氣",Show:"顯示",Animate:"動畫",Date:"日期",Time:"時間",Title:"標題",Owner:"所有者",Action:"操作",Rename:"改名",Location:"位置",Latitude:"緯度",Month:"月份",Day:"天",Hour:"小時",Daylight:"白天長度",Radiation:"輻射",Temperature:"温度",kWh:"千瓦時",dollar:"元",MeterPerSecond:"米/秒",NorthInitial:"北",SouthInitial:"南",EastInitial:"東",WestInitial:"西",Fixed:"固定",Elements:"部件",Energy:"能量",Unknown:"未知",Label:"標籤",Description:"描述",NoDescription:"無描述",MaximumCharacters:"最多字符數",Author:"作者",Publisher:"發布者",Building:"建築",ResidentialBuilding:"住宅建築",CommercialBuilding:"商用建築",SchoolBuilding:"學校建築",TouristAttraction:"旅遊景點",UnderConstruction:"在建",Photovoltaic:"光伏",WindPower:"風能",ColocationProjects:"共用空間專案",Anonymous:"無名氏",Nickname:"别名",Pin:"置頂",Unpin:"解除置頂"},shared:{NoTexture:"無材質",FoundationElement:"地基",CuboidElement:"長方體",PolygonElement:"多邊形",SensorElement:"傳感器",SolarPanelElement:"光伏板",SolarWaterHeaterElement:"太陽能熱水器",ParabolicDishElement:"拋物線碟",ParabolicTroughElement:"拋物線槽",FresnelReflectorElement:"菲涅耳反射鏡",HeliostatElement:"定日鏡",WindTurbineElement:"風力渦輪機",LightElement:"電燈",ElementLocked:"固定",ModelType:"模型類别",OutputBreakdown:"分列發電量",MoreResults:"更多結果"},message:{NewVersionAvailable:"有新版本",CalculationMayBeSlowDoYouWantToContinue:"計算可能會很慢。您想繼續嗎?",IncreaseSolarRadiationHeatmapGridCellSizeToSpeedUp:"加大太陽輻射熱圖網格的尺寸可加速",ModelNotFound:"沒有找到模型",CannotSignIn:"登錄失敗",CannotSignOut:"退出失敗",YourAccountWasCreated:"成功建立您的賬號。",CannotCreateAccount:"無法創建賬號",YourAccountSettingsWereSaved:"您的賬號設定已保存。",CannotSaveYourAccountSettings:"您的賬號設定無法保存",CannotSaveYourFileToCloud:"無法保存您的文檔到雲端",CannotCreateNewProject:"無法創建新專案",CannotCreateNewProjectWithoutTitle:"沒有標題, 無法創建新專案",CannotOpenYourProjects:"無法打開您的專案列表",CannotOpenProject:"無法打開專案",CannotDeleteProject:"無法刪除專案",CannotRenameProject:"無法給專案改名",CannotAddDesignToProject:"無法把此設計加到專案裡",CannotAddDesignToProjectOwnedByOthers:"不能把此設計加到別人的專案裡",DesignRemovedFromProject:"設計被成功地從專案裡刪除",CannotRemoveDesignFromProject:"無法把此設計從專案裡刪除",CannotUpdateProject:"無法更新專案",CannotFetchProjectData:"無法取得專案數據",TitleUsedChooseDifferentOne:"此標題已經被使用, 請採用不同的標題",CloudFileWithTitleExistsDoYouWantToOverwrite:"使用此標題的雲文檔已經存在,您確定要覆蓋它嗎?",CloudFileNotFound:"找不到此云端文檔",CannotLoadModelsOnMap:"無法下載地圖上的模型",CannotLoadLeaderboard:"無法下載排行榜",CannotPublishModelOnMap:"模型無法發佈到地圖上",CannotLikeModelFromMap:"無法點贊地圖上的模型",CannotDeleteModelFromMap:"無法删除地圖上的模型",ModelDeletedFromMap:"模型已從地圖上刪除",DoYouWantToDeleteModelFromMap:"您要删除地圖上的這個模型嗎?",CannotOpenCloudFile:"此云端文檔無法打開",CannotReadCloudFile:"無法讀取此云端文檔",CannotWriteCloudFile:"無法存儲此云端文檔",CloudFileCopied:"拷貝云端文檔",CannotOpenCloudFolder:"您的雲端文檔夾無法打開",CannotDeleteCloudFile:"無法刪除此云端文檔",CannotRenameCloudFile:"此云端文檔的名字無法更改",DoYouWantToSaveChanges:"您要保存當前文檔嗎?",NotApplicableToSelectedAction:"此值不適用於當前選擇範圍",ThisElementIsLocked:"這個部件被鎖定。",ThisCannotBeUndone:"這個操作一旦執行就不能撤銷。",AzimuthOfNorthIsZero:"正北的方位角為零度",CounterclockwiseAzimuthIsPositive:"逆時針為正",SouthFacingIsZero:"朝南為零度",ClockwiseRotationIsPositive:"順時針為正",MoveCancelledBecauseOfOverlap:"位置重疊,移動取消。",MoveOutsideBoundaryCancelled:"位置出界,移動取消。",RotationCancelledBecauseOfOverlap:"位置重疊,旋轉取消。",RotationOutsideBoundaryCancelled:"位置出界,旋轉取消。",ResizingCancelledBecauseOfOverlap:"位置重疊,尺寸調整取消。",ResizingOutsideBoundaryCancelled:"位置出界,尺寸調整取消。",CannotPasteOutsideBoundary:"位置出界,不能複制。",CannotPasteBecauseOfOverlap:"位置重疊,不能複制。",CannotMoveObjectTooFar:"位置太遠,移動取消。",ExistingSolarPanelsWillBeRemovedBeforeApplyingNewLayout:"採用新佈局之前必須移除現有的光伏板。",DoYouWantToContinue:"您想繼續嗎?",SolarPanelsCannotIntersectWithGround:"光伏板不能和地面接觸。",SolarPanelsCannotOverlapWithOneAnother:"光伏板不能重疊。",ScreenshotSaved:"截屏圖片保存在下載文檔夾裡。",CsvFileSaved:"CSV保存在下載文檔夾裡。",SimulationStarted:"模擬開始。",SimulationCompleted:"模擬結束。",SimulationAborted:"模擬取消。",SimulationPaused:"模擬暫停。",CancelSimulation:"取消模擬",PauseSimulation:"暫停模擬",ResumeSimulation:"繼續模擬",SimulationWillNotStartDueToErrors:"由於錯誤模擬無法運行",SimulationWillStartDespiteWarnings:"發現問題,但模擬仍然將運行。",EvolutionStarted:"演化開始。",EvolutionCompleted:"演化結束。",EvolutionAborted:"演化取消。",EvolutionPaused:"演化暫停。",EncounterEvolutionError:"演化出錯。",CancelEvolution:"取消演化",PauseEvolution:"暫停演化",ResumeEvolution:"繼續演化",ConvergenceThresholdHasBeenReached:"收斂閾值已達到。",MaximumNumberOfGenerationsHasBeenReached:"最大世代數已達到。",MaximumNumberOfStepsHasBeenReached:"最大步數已達到。",ObjectiveFunctionTypeError:"此操作不支持當前的目標函數。請從菜單啟動此功能。",WallsAreNotAtSameHeight:"墻體高度不同。",WallsAreNotPerpendicular:"墻體不垂直。",WallsAreNotConnected:"墻體不相連。",WallsNumberNeedToBeFour:"墻體數量必須為四個。",BuildingContainsEmptyWall:"建築物有空牆。",BuildingRoofMissing:"建築物沒有屋頂。",UnknownErrors:"未知錯誤。",SigningOutAnonymousAccount:"你確定退出嗎?一旦退出,此匿名帳號將不可恢復。"},menu:{AnalysisOptions:"分析選項",option:{GridCellSize:"計算網格的尺寸",SamplingFrequency:"採樣頻率",TimesPerHour:"每小時採樣次數",DaysPerYear:"每一年採樣天數"},mainMenu:"主菜單",cloudMenu:"雲菜單",projectSubMenu:"專案",project:{CreateNewProject:"創建新專案",OpenProject:"打開專案",SaveProject:"保存專案",SaveProjectAs:"另存專案為",YouMustLogInToCreateProject:"您必須登錄才能創建專案",YouMustLogInToOpenProject:"您必須登錄才能打開專案"},fileSubMenu:"文檔",file:{CreateNewFile:"創建新文檔",OpenLocalFile:"打開本地文檔",SaveAsLocalFile:"保存為本地文檔",SavingAbortedMustHaveValidFileName:"文檔名無效,保存失敗",OpenCloudFile:"打開雲端文檔",SaveCloudFile:"保存雲端文檔",SaveAsCloudFile:"另存雲端文檔為",SavingAbortedMustHaveValidTitle:"雲端文檔名無效,保存失敗",ToSaveYourWorkPleaseSignIn:"為了保存您的雲端文檔,請先登錄。",TakeScreenshot:"截屏",UseCloudFileName:"採用雲端文件名",PublishOnModelsMap:"發佈到地圖上",PublishedOnModelsMap:"您的模型成功發佈到地圖上",UpdatedOnModelsMap:"您的模型更新成功",YouMustLogInToPublishYourModel:"您必須登錄才能發布模型",YouCannotPublishAModelThatYouDoNotOwn:"您不能發布他人的模型",YouMustSaveModelOnCloudBeforePublishingIt:"您必須先把此模型保存在雲端才能發布它"},editSubMenu:"編輯",edit:{Undo:"撤銷",Redo:"重做"},viewSubMenu:"視界",view:{NavigationView:"導航模式",TwoDimensionalView:"二維模式",ResetView:"重置視角",ZoomIn:"放大",ZoomOut:"縮小",AutoRotate:"自動旋轉",ShowShadow:"顯示陰影",ShowSurfaceShininess:"顯示表面光澤",TranslucentFloatingWindows:"透明浮動窗口",accessoriesSubMenu:"配件",accessories:{SiteInformation:"位置資訊",DesignInformation:"設計資訊",Instruction:"操作說明",StickyNote:"便簽",Note:"便簽"}},settingsSubMenu:"設置",settings:{WeatherData:"氣象數據",DiurnalTemperature:"晝夜溫度",Heliodon:"日影儀",SunAndTime:"太陽和時間",CustomSolarPanels:"客製化的光伏板",CustomizeSolarPanel:"客製化光伏板"},benchmarksSubMenu:"基準",benchmarks:{SolarRadiationPredictionVsMeasurement:"太陽能輻射模型預測和實際測量的對比",BESTESTCase600:"建築物能耗模擬測試:BESTEST案例600",BESTESTCase610:"建築物能耗模擬測試:BESTEST案例610",BESTESTCase620:"建築物能耗模擬測試:BESTEST案例620",BESTESTCase630:"建築物能耗模擬測試:BESTEST案例630"},graph:{LineWidth:"線條寬度",SymbolSize:"符號大小",BarCategoryGap:"直條間隙",ShowHorizontalGridLines:"顯示格子的水平線條",ShowVerticalGridLines:"顯示格子的豎直線條"},analysisSubMenu:"分析",physicsSubMenu:"物理",physics:{DailySolarRadiationHeatmap:"當日太陽輻射總量分佈熱圖",SolarRadiationHeatmapOptions:"太陽輻射熱圖選項",SolarRadiationHeatmapGridCellSize:"太陽輻射熱圖網格的尺寸",SolarRadiationHeatmapMaxValue:"太陽輻射熱圖最大值",SolarRadiationHeatmapNoAnimation:"若無移動部件則省略動畫",ReflectionHeatmap:"反射熱圖"},sensorSubMenu:"傳感器",sensor:{CollectDailyData:"收集當天數據",CollectYearlyData:"收集全年數據",SensorSimulationNoAnimation:"若無移動部件則省略動畫"},buildingSubMenu:"建築物",building:{AnalyzeDailyBuildingEnergy:"建築物當天能耗分析",AnalyzeYearlyBuildingEnergy:"建築物全年能耗分析",EnergyAnalysisOptions:"能耗分析選項",EnergyGridCellSize:"計算網格的尺寸",BuildingEnergySimulationNoAnimation:"若無移動部件則省略動畫"},solarPanelSubMenu:"太陽能光伏板",solarPanel:{AnalyzeDailyYield:"分析當天產出",AnalyzeYearlyYield:"分析全年產出",AnalyzeVisibility:"分析可見度",PanelDiscretization:"光伏板離散化方法",Exact:"準確",Approximate:"近似",EnergyGridCellSize:"計算網格的尺寸",VisibilityGridCellSize:"視界因子計算網格的尺寸",EnergyAnalysisOptions:"能量分析選項",VisibilityAnalysisOptions:"可見度分析選項",SolarPanelSimulationNoAnimation:"若無移動部件則省略動畫"},parabolicTroughSubMenu:"拋物線槽",parabolicTrough:{AnalyzeDailyYield:"分析當天產出",AnalyzeYearlyYield:"分析全年產出"},parabolicDishSubMenu:"拋物線碟",parabolicDish:{AnalyzeDailyYield:"分析當天產出",AnalyzeYearlyYield:"分析全年產出"},fresnelReflectorSubMenu:"菲涅爾反射鏡",fresnelReflector:{AnalyzeDailyYield:"分析當天產出",AnalyzeYearlyYield:"分析全年產出"},heliostatSubMenu:"定日鏡",heliostat:{AnalyzeDailyYield:"分析當天產出",AnalyzeYearlyYield:"分析全年產出"},solarUpdraftTowerSubMenu:"太陽能上升氣流塔",solarUpdraftTower:{AnalyzeDailyYield:"分析當天產出",AnalyzeYearlyYield:"分析全年產出",SolarUpdraftTowerSimulationNoAnimation:"若無移動部件則省略動畫"},tutorialsSubMenu:"教程",solarEnergyScienceSubMenu:"太陽能科學",solarEnergyScienceTutorials:{SunAngles:"太陽相對於地面觀察者的角度",InsolationAndClimate:"太陽輻射和氣候的關係",SolarRadiationToBox:"一個長方體受到的太陽能輻射分析"},buildingScienceSubMenu:"建築科學",buildingScienceTutorials:{ThermalEnvelopeVsBuildingEnvelope:"房屋的熱學封套和圍護封套",EffectOfSizeOnBuildingEnergy:"房屋大小對能耗的影響",EffectOfOrientationOnBuildingEnergy:"房屋方位對能耗的影響",EffectOfInsulationOnBuildingEnergy:"房屋隔熱對能耗的影響",EffectOfRoofColorOnBuildingEnergy:"屋頂顏色對建築物能耗的影響",EffectOfEavesOverhangLengthOnBuildingEnergy:"屋簷延伸長度對建築物能耗的影響",EffectOfWindowSHGCOnBuildingEnergy:"窗戶太陽能輸入對房屋能耗的影響",EffectOfThermostatSetpointOnBuildingEnergy:"恆溫器設定值對房屋能耗的影響",EffectOfSolarPanelsOnBuildingEnergy:"光伏板對房屋能耗的影響",EffectOfGroundTemperatureOnBuildingEnergy:"地表温度對房屋能耗的影響",EffectOfTreesOnBuildingEnergy:"樹蔭對房屋能耗的影響"},buildingDesignSubMenu:"建築設計",buildingDesignTutorials:{CapeCodStyleHouseWithShedDormer:"有棚頂窗的科德角風格的住宅",MansardRoofWithDormers:"有天窗的折線屋頂",GableRoofVsHipRoof:"雙坡屋頂和四坡屋顶的對比",ColonialVsSaltbox:"殖民地風格和鹽盒風格的對比",GambrelRoofVsMansardRoof:"复斜屋顶和折線屋頂的對比",CombinationRoofVsBonnetRoof:"組合屋頂和帽簷屋頂的對比",DutchGableRoof:"荷蘭雙坡屋頂",GableAndValleyRoof:"坡谷屋頂",ClerestoryRoof:"天窗屋頂",MonitorRoof:"採光屋頂",AFrameHouse:"A字形房子",HalfTimberedHouse:"半木骨架房子",AllBasicRoofTypes:"所有的基本屋頂類型"},photovoltaicSolarPowerSubMenu:"光伏發電",photovoltaicSolarPowerTutorials:{EffectOfTiltAngleOfSolarPanel:"光伏板傾斜角對發電量的影響",EffectOfAzimuthOfSolarPanel:"光伏板方位角對發電量的影響",SolarPanelTypes:"光伏板類型",DefineYourOwnSolarPanels:"定義自己的光伏板",VerticalBifacialSolarPanels:"豎直的雙面光伏板",CompareMonofacialAndBifacialSolarPanels:"單面光伏板和雙面光伏板的對比",SolarTrackers:"自動追日器",CoveringGroundWithSolarPanels:"為什麼我們不簡單地用光伏板覆蓋地面",InterRowSpacingOfSolarPanelArray:"光伏板陣列行間距對發電量的影響",EffectOfOrientationOfSolarPanels:"光伏板排列方向對發電量的影響",SolarPanelArrayAutomaticLayout:"光伏板自動排列"},concentratedSolarPowerSubMenu:"光熱發電",concentratedSolarPowerTutorials:{EffectOfAzimuthOfParabolicTrough:"拋物線槽方位角對發電量的影響",EffectOfLatusRectumOfParabolicTrough:"拋物線槽通徑對發電量的影響",FocusSunlightWithParabolicDish:"用拋物線碟聚焦阳光",LinearFresnelReflectors:"用直線式菲涅爾反射鏡聚焦阳光",EffectOfAbsorberPipeHeightForLinearFresnelReflectors:"吸熱管的安装高度對直線式菲涅爾反射鏡發電量的影響",EffectOfAzimuthOfLinearFresnelReflectors:"直線式菲涅爾反射鏡方位角對發電量的影響",LinearFresnelReflectorsWithTwoAbsorbers:"配備兩個吸收管的直線式菲涅爾反射鏡陣列",CosineEfficiencyOfHeliostats:"定日鏡的餘弦效率",ShadowingAndBlockingOfHeliostats:"定日鏡的陰影和遮擋",EffectSolarPowerTowerHeight:"吸收塔高度對發電量的影響",SolarPowerTower:"塔式光熱發電站"},otherTypesOfSolarPowerSubMenu:"其它類型的太陽能發電",otherTypesOfSolarPowerTutorials:{SolarWaterHeaters:"太陽能熱水器",SolarUpdraftTower:"太陽能上升氣流塔"},windPowerSubMenu:"風力發電",windPowerTutorials:{EffectOfBladeNumberOfWindTurbine:"轉子葉片的數目對風力渦輪機輸出的影響",EffectOfPitchAngleOfWindTurbineBlades:"轉子葉片的俯仰角對風力渦輪機輸出的影響",BirdSafeBladeDesign:"對鳥類安全的葉片設計",OffshoreWindFarm:"離岸風電場"},colocationSubMenu:"共用空間項目",colocationTutorials:{AgricultureSolarWindColocation:"農業光電風力共用空間"},generativeDesignSubMenu:"生成式設計",generativeDesignTutorials:{MonofacialSolarPanelArrayTiltAngle:"單面光伏板陣列的傾斜角",BifacialSolarPanelArrayTiltAngle:"雙面光伏板陣列的傾斜角",OutputOfSolarPanelArrayInDifferentPlaces:"一個光伏板陣列在不同地區的產出",SimpleSolarFarmParetoFront:"簡單太陽能農場設計的帕累托前沿"},examplesSubMenu:"例子",solarEnergySubMenu:"太陽能",solarEnergyExamples:{SunBeamAndHeliodon:"太陽光束和日影儀",RooftopSolarPanels:"屋頂光伏板",NevadaSolarOneParabolicTroughArray:"內華達州太陽能一號的拋物線槽陣列",TooeleParabolicDishArray:"猶他州圖埃勒的拋物線碟陣列",PS10SolarPowerTower:"西班牙塞維利亞的PS10太陽能發電塔",TucsonLinearFresnelReflectors:"亞利桑那州圖森的直線式菲涅爾反射鏡陣列",SolarCanopyFormFactors:"太陽能天篷外形設計",SolarCanopyOverBleachers:"看台太陽能天篷",SolarCanopyOverGarage:"車庫太陽能天篷",SolarBusStop:"太陽能候車亭",SolarFacadeTesla:"特斯拉光伏牆",BuildingIntegratedPhotovoltaics:"建築整合光伏",Floatovoltaics:"浮動光伏",Agrivoltaics:"農業光伏",VegetativeBuffer:"太陽能農場绿化带",RainbowSwashSolarFarmBostonMA:"馬薩諸塞州波士頓彩虹激流旁邊的光伏板陣列",MickeyMouseSolarFarmOrlandoFL:"佛羅里達州奧蘭多的米老鼠形狀光伏板陣列",SolarPanelsOverCanalBakersfieldCA:"加利福尼亞州貝克斯菲爾德灌溉渠上假想的光伏板陣列",SolarNoiseBarrierLexingtonMA:"馬薩諸塞州列剋星敦高速公路噪音牆上假想的光伏板",HSATSolarTrackersRaleighNC:"北卡羅來納州羅利的一個水平方向單軸旋轉追日光伏板陣列(HSAT)",AADATSolarTrackersLancasterCA:"加利福尼亞州蘭開斯特的一個雙軸旋轉追日光伏板陣列(AADAT)",SolarTrackersInRealWorld:"模擬",SolarUpdraftTowerInCity:"太陽能上升氣流塔在城市中的應用"},builtEnvironmentSubMenu:"建造環境",residentialBuildingsSubMenu:"住宅建築",residentialBuildingExamples:{ColonialHouse:"殖民地風格的住宅",DutchColonialHouse:"荷蘭殖民地風格的住宅",TShapedHouse:"T字型房子",CapeCodHouseWithGarage:"有車庫的科德角風格的住宅",Solarium:"有日光浴室的房子",Church1:"教堂例一",Cathedral1:"主教座堂例一",Cathedral2:"主教座堂例二",Mosque1:"清真寺例一",AdobeTaosHouse:"陶斯土坯房",RanchHouse:"牧場風格的住宅",BonnetHouse:"有帽簷屋頂的住宅",BarnStyleHouse:"穀倉式風格的住宅",ModernHouse:"現代風格的住宅",ButterflyRoofHouse:"蝴蝶型屋頂的住宅"},commercialBuildingsSubMenu:"商用建築",commercialBuildingExamples:{WhiteHouse:"白宫",HaroldWashingtonCollege:"哈羅德華盛頓學院",BilimMersinTurkiye:"土耳其梅爾辛科學教育中心",SpanishStyleHotel:"西班牙風格旅館",ApartmentBuilding:"公寓樓",OfficeBuilding:"寫字樓",Hotel:"旅館"},buildingComplexesSubMenu:"建築群",buildingComplexExamples:{SouthBurlingtonHighSchoolVermont:"佛蒙特州南伯靈頓高中",MescaleroApacheSchoolNewMexico:"新墨西哥州梅斯卡勒羅阿帕奇學校"},urbanPlanningSubMenu:"城市規劃",urbanPlanningExamples:{CityBlockHeatmap:"城市街區熱圖",ChicagoSkyline:"芝加哥天際線"},otherBuildingsSubMenu:"其它建築",otherBuildingExamples:{Greenhouse:"溫室",Pavilion:"公園的亭子",OctagonalPagoda:"八角塔",OceanFront:"海邊",EgyptianPyramids:"埃及金字塔",MayanPyramid:"瑪雅金字塔",SiOSePol:"三十三孔橋",StackedCuboids:"堆砌長方體"},artificialIntelligenceSubMenu:"人工智慧",artificialIntelligenceExamples:{OptimizingTiltAngleOfOneSolarPanelRow:"優化單排光伏板的傾斜角",OptimizingTiltAnglesOfMultipleSolarPanelRows:"優化多排光伏板的傾斜角",SolarFarmGenerativeDesign:"生成式設計太陽能農場",SolarFarmGenerativeDesignWithBlock:"生成式設計太陽能農場:周邊有建築物的情況",FitchburgSolarFarmGenerativeDesign:"生成式設計太陽能農場:真實世界案例"},languageSubMenu:"語言",publicSubMenu:"公共",ModelsGallery:"模型畫廊",ModelsMap:"模型地圖",AboutUs:"關於我們"},avatarMenu:{AccountSettings:"賬號設定",PrivacyStatementTitle:"用戶隱私權保護聲明",PrivacyStatement:"登錄需要採用您的谷歌ID建立或進入您的阿拉丁賬戶。 我們只儲存一個隨機的字符串作為您的ID。 任何關於您的可辨識的個人信息都沒有被收集。 詳情請參考我們的",SignIn:"登錄",SignInAsMe:"實名登錄",SignInAnonymously:"匿名登錄",SignOut:"退出賬號",IfYouAreAStudent:"如果您是一個學生"},skyMenu:{Axes:"顯示坐標軸",Theme:"環境主題",ThemeDefault:"默認",ThemeDesert:"沙漠",ThemeDune:"沙丘",ThemeForest:"森林",ThemeGrassland:"草原",ThemeHill:"丘陵",ThemeLake:"湖泊",ThemeMountain:"山脈",ThemeRural:"田園",SunlightAttenuationCoefficientInAir:"陽光在空氣中傳播的衰減係數",ConvectiveCoefficientOfAir:"空氣對流傳熱係數",HighestTemperatureTimeInMinutes:"最高氣溫時間(分鐘)",SelectSunAnglesToShow:"選擇太陽角度顯示",ShowAzimuthAngle:"顯示方位角",ShowElevationAngle:"顯示高度角",ShowZenithAngle:"顯示天頂角",DirectLightBrightnessAtNoon:"正午直射光照度",AmbientLightBrightnessAtNoon:"正午環境光照度"},groundMenu:{MonthlyIrradianceLoss:"月份輻射度損失比",Vegetation:"植被",LeafOutDay:"樹葉長出的日子",LeafOffDay:"樹葉脫落的日子",Albedo:"反照率",ImageOnGround:"地面顯示圖像",WaterSurface:"水面",RemoveAllUnlockedTrees:"刪除所有非固定的樹木",RemoveAllUnlockedFlowers:"删除所有非固定的花草",RemoveAllUnlockedSolarPanels:"删除所有非固定的光伏板",RemoveAllUnlockedPeople:"删除所有非固定的人物",RemoveAllUnlockedFoundations:"删除所有非固定的地基",RemoveAllUnlockedCuboids:"删除所有非固定的長方體",DoYouReallyWantToRemoveAllPeople:"你確定刪除所有非固定的人物嗎",DoYouReallyWantToRemoveAllTrees:"你確定刪除所有非固定的樹木嗎",DoYouReallyWantToRemoveAllFlowers:"你確定刪除所有非固定的花草嗎",DoYouReallyWantToRemoveAllSolarPanels:"你確定刪除所有非固定的光伏板嗎",DoYouReallyWantToRemoveAllFoundations:"你確定刪除所有非固定的地基嗎",DoYouReallyWantToRemoveAllCuboids:"你確定刪除所有非固定的長方體嗎",LockAllUnlockedElements:"固定所有非固定的部件",UnlockAllLockedElements:"解除所有的固定"},labelSubMenu:{Label:"標籤",LabelText:"標籤的内容",LabelHeight:"標籤的高度",LabelSize:"標籤的大小",LabelFontSize:"字體的大小",LabelColor:"標籤的顏色",KeepShowingLabel:"顯示標籤"},foundationMenu:{RemoveAllUnlockedSolarPanels:"刪除此地基上所有非固定的光伏板",RemoveAllUnlockedParabolicTroughs:"刪除此地基上所有非固定的拋物線槽",RemoveAllUnlockedParabolicDishes:"刪除此地基上所有非固定的拋物線碟",RemoveAllUnlockedFresnelReflectors:"刪除此地基上所有非固定的菲涅耳反射鏡",RemoveAllUnlockedHeliostats:"刪除此地基上所有非固定的定日鏡",RemoveAllUnlockedWindTurbines:"刪除此地基上所有非固定的風力渦輪機",RemoveAllUnlockedSensors:"刪除此地基上所有非固定的傳感器",RemoveAllUnlockedLights:"刪除此地基上所有非固定的電燈",RemoveAllUnlockedWalls:"刪除此地基上所有非固定的牆",RemoveAllUnlockedWindows:"刪除此地基上所有非固定的窗戶",RemoveAllUnlockedDoors:"刪除此地基上所有非固定的門",RemoveAllUnlockedPolygons:"刪除此地基上所有非固定的多邊形",RemoveAllUnlockedHumans:"刪除此地基上所有非固定的人物",RemoveAllUnlockedTrees:"刪除此地基上所有非固定的樹木",RemoveAllUnlockedFlowers:"刪除此地基上所有非固定的花草",Racks:"支架",Texture01:"一號材質",Texture02:"二號材質",Texture03:"三號材質",Texture04:"四號材質",Texture05:"五號材質",Texture06:"六號材質",Texture07:"七號材質",Texture08:"八號材質",Texture09:"九號材質",Texture10:"十號材質",SolarPanels:"光伏板",SolarPanelArray:"光伏板陣列",DoYouReallyWantToRemoveAllSolarPanelsOnFoundation:"你確定刪除此地基上所有非固定的光伏板嗎",ParabolicTroughs:"拋物線槽",DoYouReallyWantToRemoveAllParabolicTroughsOnFoundation:"你確定刪除此地基上所有非固定的拋物線槽嗎",ParabolicDishes:"拋物線碟",DoYouReallyWantToRemoveAllParabolicDishesOnFoundation:"你確定刪除此地基上所有非固定的拋物線碟嗎",FresnelReflectors:"菲涅耳反射鏡",DoYouReallyWantToRemoveAllFresnelReflectorsOnFoundation:"你確定刪除此地基上所有非固定的菲涅耳反射鏡嗎",Heliostats:"定日鏡",DoYouReallyWantToRemoveAllHeliostatsOnFoundation:"你確定刪除此地基上所有非固定的定日鏡嗎",WindTurbines:"風力渦輪機",DoYouReallyWantToRemoveAllWindTurbinesOnFoundation:"你確定刪除此地基上所有非固定的風力渦輪機嗎",Sensors:"傳感器",DoYouReallyWantToRemoveAllSensorsOnFoundation:"你確定刪除此地基上所有非固定的傳感器嗎",Lights:"電燈",DoYouReallyWantToRemoveAllLightsOnFoundation:"你確定刪除此地基上所有非固定的電燈嗎",Walls:"牆",DoYouReallyWantToRemoveAllWallsOnFoundation:"你確定刪除此地基上所有非固定的牆嗎",Windows:"窗戶",DoYouReallyWantToRemoveAllWindowsOnFoundation:"你確定刪除此地基上所有非固定的窗戶嗎",Doors:"門",DoYouReallyWantToRemoveAllDoorsOnFoundation:"你確定刪除此地基上所有非固定的門嗎",Polygons:"多邊形",DoYouReallyWantToRemoveAllPolygonsOnFoundation:"你確定刪除此地基上所有非固定的多邊形嗎",Humans:"人物",DoYouReallyWantToRemoveAllHumansOnFoundation:"你確定刪除此地基上所有非固定的人物嗎",Trees:"樹木",DoYouReallyWantToRemoveAllTreesOnFoundation:"你確定刪除此地基上所有非固定的樹木嗎",Flowers:"花草",DoYouReallyWantToRemoveAllFlowersOnFoundation:"你確定刪除此地基上所有非固定的花草嗎",OnlyThisFoundation:"只這塊地基",AllConnectedFoundations:"所有相連的地基",AllSelectedFoundations:"所有選中的地基",AllFoundations:"所有的地基",AddPolygon:"添加多邊形",SolarStructure:"太陽能構型",GroupMaster:"主地基",LockAllUnlockedElementsOnThisFoundation:"固定此地基上所有非固定的部件",UnlockAllLockedElementsOnThisFoundation:"解除此地基上所有的固定",GroundFloorRValue:"建築物地板的R值",OnlyThisGroundFloor:"只這個建築物的地板",AllGroundFloors:"所有建築物的地板"},solarPowerTowerMenu:{ReceiverTowerForHeliostats:"和定日鏡配套的吸收塔",ReceiverTowerPhysicalProperties:"太陽能吸收塔的物理性質",ReceiverTowerHeight:"太陽能吸收塔的高度",ReceiverTowerRadius:"太陽能吸收塔的半徑",ReceiverAbsorptance:"太陽能吸收器的吸收率",ReceiverOpticalEfficiency:"太陽能吸收器的光效率",ReceiverThermalEfficiency:"太陽能吸收器的熱效率"},solarAbsorberPipeMenu:{AbsorberPipeForFresnelReflectors:"和菲涅爾反射鏡配套的吸收管",AbsorberPipePhysicalProperties:"太陽能吸收管的物理性質",AbsorberHeight:"太陽能吸收管的安装高度",AbsorberApertureWidth:"太陽能吸收管的孔徑",AbsorberPipePoleNumber:"太陽能吸收管的支柱數量",AbsorberAbsorptance:"太陽能吸收管的吸收率",AbsorberOpticalEfficiency:"太陽能吸收管的光效率",AbsorberThermalEfficiency:"太陽能吸收管的熱效率"},solarUpdraftTowerMenu:{SolarUpdraftTower:"太陽能上升氣流塔",SolarUpdraftTowerPhysicalProperties:"太陽能上升氣流塔的物理性質",SolarUpdraftTowerChimneyHeight:"太陽能上升氣流塔煙囪的高度",SolarUpdraftTowerChimneyRadius:"太陽能上升氣流塔煙囪的半徑",SolarUpdraftTowerCollectorHeight:"太陽能上升氣流塔集熱棚的高度",SolarUpdraftTowerCollectorRadius:"太陽能上升氣流塔集熱棚的半徑",SolarUpdraftTowerCollectorTransmissivity:"太陽能上升氣流塔集熱棚的透射率",SolarUpdraftTowerCollectorEmissivity:"太陽能上升氣流塔集熱棚的發射率",SolarUpdraftTowerDischargeCoefficient:"太陽能上升氣流塔的流量係數",SolarUpdraftTowerTurbineEfficiency:"太陽能上升氣流塔的渦輪機效率"},cuboidMenu:{Texture01:"一號材質",Texture02:"二號材質",Texture03:"三號材質",Texture04:"四號材質",Texture05:"五號材質",Texture06:"六號材質",Texture07:"七號材質",Texture08:"八號材質",Texture09:"九號材質",Texture10:"十號材質",RemoveAllUnlockedSolarPanels:"刪除此長方體表面上所有非固定的光伏板",RemoveAllUnlockedSensors:"刪除此長方體表面上所有非固定的傳感器",RemoveAllUnlockedPolygons:"刪除此長方體表面上所有非固定的多邊形",RemoveAllUnlockedHumans:"刪除此長方體表面上所有非固定的人物",RemoveAllUnlockedTrees:"刪除此長方體表面上所有非固定的樹木",RemoveAllUnlockedFlowers:"刪除此長方體表面上所有非固定的花草",RemoveAllUnlockedLights:"刪除此長方體表面上所有非固定的電燈",Racks:"支架",Lights:"電燈",DoYouReallyWantToRemoveAllLightsOnCuboid:"你確定刪除此長方體表面上所有非固定的電燈嗎",SolarPanels:"光伏板",DoYouReallyWantToRemoveAllSolarPanelsOnCuboid:"你確定刪除此長方體表面上所有非固定的光伏板嗎",Sensors:"傳感器",DoYouReallyWantToRemoveAllSensorsOnCuboid:"你確定刪除此長方體表面上所有非固定的傳感器嗎",Polygons:"多邊形",DoYouReallyWantToRemoveAllPolygonsOnCuboid:"你確定刪除此長方體表面上所有非固定的多邊形嗎",Humans:"人物",DoYouReallyWantToRemoveAllHumansOnCuboid:"你確定刪除此長方體表面上所有非固定的人物嗎",Trees:"樹木",DoYouReallyWantToRemoveAllTreesOnCuboid:"你確定刪除此長方體表面上所有非固定的樹木嗎",Flowers:"花草",DoYouReallyWantToRemoveAllFlowersOnCuboid:"你確定刪除此長方體表面上所有非固定的花草嗎",OnlyThisCuboid:"只這個長方體",AllCuboidsOnSameSurface:"同一表面上所有的長方體",AllCuboidsAboveSameBase:"同一地基上所有的長方體",AllSelectedCuboids:"所有選中的長方體",AllCuboids:"所有的長方體",OnlyThisSide:"只這個表面",AllSidesOfThisCuboid:"這個長方體所有的側面",AllSidesOfSelectedCuboids:"所有選中長方體所有的側面",AllSidesOfAllCuboids:"所有的長方體所有的側面",AddPolygon:"添加多邊形",Stackable:"可堆砌",GroupMaster:"主長方體"},polygonMenu:{Texture01:"一號材質",Texture02:"二號材質",Texture03:"三號材質",Texture04:"四號材質",Texture05:"五號材質",Texture06:"六號材質",Texture07:"七號材質",Texture08:"八號材質",Texture09:"九號材質",Texture10:"十號材質",TextBox:"文字框",FontOutlineColor:"字體輪廓顏色",FontOutlineWidth:"字體輪廓線寬",FontStrokeColor:"字體描邊顏色",FontStrokeWidth:"字體描邊線寬",NoOutline:"無輪廓線",Shiny:"光澤",Filled:"填充",FillTexture:"填充材質",FillColor:"填充顏色",Opacity:"遮光度",LineColor:"線條顏色",LineWidth:"線條寬度",LineStyle:"線條樣式",SolidLine:"實線",DashedLine:"虛線",DottedLine:"點線",InsertVertexBeforeIndex:"前面插入頂點",InsertVertexAfterIndex:"後面插入頂點",DeleteVertex:"移除頂點",OnlyThisPolygon:"只這個多邊形",AllPolygonsOnSurface:"同一表面上所有的多邊形",AllPolygonsAboveFoundation:"同一地基上所有的多邊形",AllSelectedPolygons:"所有選中的多邊形",AllPolygons:"所有的多邊形",Layout:"佈局",SolarPanelArrayLayout:"光伏板陣列佈局",SolarPanelArrayLayoutParametricDesign:"光伏板陣列佈局參數化設計",SolarPanelArrayLayoutGenerativeDesign:"光伏板陣列佈局生成式設計",SolarPanelArrayModel:"光伏板型號",SolarPanelArrayOrientation:"排列方向",SolarPanelArrayTiltAngle:"傾斜角度",SolarPanelArrayRowWidth:"行寬度",SolarPanelArrayInterRowSpacing:"行間距",SolarPanelArrayRowSpacing:"行間距",SolarPanelArrayRowAxis:"行軸方向",SolarPanelArrayLeftRightRowAxis:"左右方向(相對)",SolarPanelArrayUpDownRowAxis:"上下方向(相對)",SolarPanelArrayEastWestRowAxis:"東西方向(絕對)",SolarPanelArrayNorthSouthRowAxis:"南北方向(絕對)",SolarPanelArrayMargin:"邊緣餘地",SolarPanelArrayPoleHeight:"支架高度",SolarPanelArrayPoleSpacing:"支柱間隔",SolarPanelArrayTotalYearlyCost:"全年總成本",SolarPanelArrayTotalYearlyRevenue:"全年總收入",SolarPanelArrayTotalYearlyYield:"全年總發電量",SolarPanelArrayMeanYearlyYield:"平均年發電量",SolarPanelArrayYearlyProfit:"全年利潤",LayoutNotAcceptedCheckYourParameters:"恕不能採用此佈局。請檢查您的參數設置。"},optimizationMenu:{Optimization:"優化",Parameters:"參數",Variables:"變量",Constants:"常量",GeneticAlgorithm:"遺傳算法",GeneticAlgorithmSettings:"遺傳算法設定",ParticleSwarmOptimization:"粒子群優化",ParticleSwarmOptimizationSettings:"粒子群優化設定",SolarPanelTiltAngleOptimization:"光伏板傾斜角度優化",SolarPanelArrayLayout:"光伏板陣列佈局",Generation:"世代",Gene:"基因",NormalizedVariables:"標準化變量",Objective:"目標函數",ObjectiveFunctionDailyTotalYield:"當日總產出",ObjectiveFunctionYearlyTotalYield:"全年總產出",ObjectiveFunctionDailyMeanYield:"當日平均產出",ObjectiveFunctionYearlyMeanYield:"全年平均產出",ObjectiveFunctionDailyProfit:"當日利潤",ObjectiveFunctionYearlyProfit:"全年利潤",GeneticAlgorithmSelectionMethod:"遺傳算法選擇方法",RouletteWheel:"輪盤制",Tournament:"淘汰制",SearchMethod:"搜索方法",GlobalSearchUniformSelection:"全局搜索均勻取樣",LocalSearchRandomOptimization:"局部搜索隨機優化",PopulationSize:"種群個體數目",MaximumGenerations:"最大世代數目",SelectionRate:"選擇概率",CrossoverRate:"交配概率",MutationRate:"突變概率",Step:"步數",SwarmSize:"粒子數目",MaximumSteps:"最大步數",MaximumVelocity:"最大速度",InertiaWeight:"慣性權重",CognitiveCoefficient:"認知係數",SocialCoefficient:"社會係數",ConvergenceThreshold:"終止條件的收斂閾值",LocalSearchRadius:"局部搜索的半徑",RowsPerRackRange:"單個支架上光伏板行數的變化範圍",TiltAngleRange:"光伏板傾斜角度的變化範圍",InterRowSpacingRange:"光伏板陣列行間距的變化範圍",ClickTargetPolygonToActivate:"點擊目標多邊形激活",ClickTargetFoundationToActivate:"點擊目標地基激活"},treeMenu:{ShowModel:"顯示近似模型",Flip:"翻轉",Type:"樹種",Spread:"樹冠直徑"},flowerMenu:{Flip:"翻轉",Type:"品種",Spread:"直徑"},peopleMenu:{ChangePerson:"改變人物",Flip:"轉身",Observer:"觀察者",ViewFromThisPerson:"視角移到此人位置"},lightMenu:{Color:"顏色",Intensity:"亮度",Decay:"衰减",MaximumDistance:"最大距離",Inside:"内部"},solarCollectorMenu:{Coordinates:"座標",RelativeXCoordinateOfCenter:"中心的相對X座標",RelativeYCoordinateOfCenter:"中心的相對Y座標",RelativeAzimuth:"相對方位角",Pole:"支柱",PoleHeight:"支柱高度",PoleRadius:"支柱半徑",ExtraPoleHeight:"額外的支柱高度",ExtraPoleHeightInAdditionToHalfWidth:"寬度一半額外的支柱高度",DrawSunBeam:"顯示光束"},concentratedSolarPowerCollectorMenu:{ReflectorReflectance:"反射器鏡面反射率",ReceiverAbsorptance:"接收器吸收率",ReflectorOpticalEfficiency:"反射器光效率",ReceiverThermalEfficiency:"接收器熱效率"},solarWaterHeaterMenu:{OnlyThisSolarWaterHeater:"只這個太陽能熱水器",AllSolarWaterHeatersOnSurface:"同一表面上所有的太陽能熱水器",AllSolarWaterHeatersAboveFoundation:"同一地基上所有的太陽能熱水器",AllSelectedSolarWaterHeaters:"所有選中的太陽能熱水器",AllSolarWaterHeaters:"所有的太陽能熱水器"},solarPanelMenu:{ElectricalProperties:"電氣特性",InverterEfficiency:"逆變器效率",InverterEfficiencyExplained:"直流電轉換為交流電的效率。",DcToAcSizeRatio:"直流-交流容量比例",DcToAcSizeRatioExplained:"直流電容量和交流電容量的比例。",ChangePvModel:"改變光伏板型號",Orientation:"排列方向",Portrait:"縱向",Landscape:"橫向",FrameColor:"框架顏色",Panels:"塊",PanelsWide:"塊光伏板寬",PanelsLong:"塊光伏板長",TiltAngle:"傾斜角度",SouthFacingIsPositive:"朝南為正",Tracker:"追日系統",SolarTrackerFollowsSun:"追日系統提高光伏板產出。",PoleSpacing:"支柱間隔",NoTracker:"無追日系統",HorizontalSingleAxisTracker:"水平單軸追日系統",VerticalSingleAxisTracker:"豎直單軸追日系統",AltazimuthDualAxisTracker:"地平雙軸追日系統",OnlyThisSolarPanel:"只這個光伏板",AllSolarPanelsOnSurface:"同一表面上所有的光伏板",AllSolarPanelsAboveFoundation:"同一地基上所有的光伏板",AllSelectedSolarPanels:"所有選中的光伏板",AllSolarPanels:"所有的光伏板"},pvModelPanel:{SolarPanelSpecs:"光伏板型號性能",General:"概況",Electrical:"電力",CellCountInXDirection:"X方向電池數目",CellCountInYDirection:"Y方向電池數目",Weight:"重量",Kilogram:"公斤",RatedVoltage:"額定電壓",RatedCurrent:"額定電流",OpenCircuitVoltage:"開路電壓",ShortCircuitCurrent:"短路電流",MaximumRatedPower:"最大額定功率",Model:"型號",PanelSize:"尺寸",Cells:"電池組",CellType:"光伏電池類型",Monocrystalline:"單晶矽",Polycrystalline:"多晶矽",ThinFilm:"薄膜",Bifacial:"雙面",PowerBifaciality:"功率雙面性因子(背面對正面)",Black:"黑色",Blue:"藍色",ShadeTolerance:"陰影耐受度",SolarCellEfficiency:"光伏電池效率",NominalOperatingCellTemperature:"名義電池運行溫度",TemperatureCoefficientOfPmax:"Pmax溫度係數",AddedCustomSolarPanels:"已有",DisplayThisCustomSolarPanel:"展示這個客製化光伏板",ExportThisCustomSolarPanel:"輸出此客製化光伏板",ImportCustomSolarPanelFromClipboard:"從系統剪切板輸入客製化光伏板數據",CustomSolarPanelExportedToClipboard:"客製化光伏板拷貝到剪貼板",DoYouReallyWantToRemoveThisCustomSolarPanel:"你確定刪除此客製化光伏板",MakeSureThisCustomSolarPanelIsNotUsed:"刪除之前請確認此客製化光伏板沒有被當前模型採用",ThisCustomSolarPanelIsUsed:"此客製化光伏板被當前模型採用",DoYouReallyWantToImportCustomSolarPanel:"你確定輸入客製化光伏板",ExistingSettingsWillBeOverwritten:"現有的設定將被取代",CannotAddCustomSolarPanel:"無法添加此客製化光伏板",CustomSolarPanelMustHaveModelName:"客製化光伏板必須要有型號",CustomSolarPanelExists:"目前文件已經定義了此名字的客製化光伏板",FailInImportingDataFromClipboard:"從系統剪切板輸入資料失敗"},parabolicTroughMenu:{ModuleLength:"模塊長度",Modules:"模塊",ModulesLong:"模塊長",LatusRectum:"通徑",OnlyThisParabolicTrough:"只這個拋物線槽",AllParabolicTroughsAboveFoundation:"同一地基上所有的拋物線槽",AllSelectedParabolicTroughs:"所有選中的抛物线槽",AllParabolicTroughs:"所有的拋物線槽"},fresnelReflectorMenu:{AbsorberPipe:"吸收管",SelectAbsorberToReflectSunlightTo:"選擇陽光反射到的吸收管",ModuleLength:"模塊長度",Modules:"模塊",ModulesLong:"模塊長",OnlyThisFresnelReflector:"只這個菲涅耳反射鏡",AllFresnelReflectorsAboveFoundation:"同一地基上所有的菲涅耳反射鏡",AllSelectedFresnelReflectors:"所有選中的菲涅耳反射镜",AllFresnelReflectors:"所有的菲涅耳反射鏡"},heliostatMenu:{Tower:"吸收塔",SelectTowerToReflectSunlightTo:"選擇陽光反射到的吸收塔",OnlyThisHeliostat:"只這個定日鏡",AllHeliostatsAboveFoundation:"同一地基上所有的定日鏡",AllSelectedHeliostats:"所有選中的定日镜",AllHeliostats:"所有的定日鏡"},parabolicDishMenu:{ReceiverStructure:"接收器結構",CentralPole:"中心直柱",CentralPoleWithTripod:"三腳架和中心直柱",Quadrupod:"四脚架",RimDiameter:"外圈直徑",LatusRectum:"通徑",ExtraPoleHeightInAdditionToRadius:"半徑之外額外的支架高度",OnlyThisParabolicDish:"只這個拋物線碟",AllParabolicDishesAboveFoundation:"同一地基上所有的拋物線碟",AllSelectedParabolicDishes:"所有選中的抛物线碟",AllParabolicDishes:"所有的拋物線碟"},windTurbineMenu:{BirdSafeDesign:"鳥類安全設計",BirdSafeNone:"無",BirdSafeBicolor:"雙色",BirdSafeStriped:"條紋",Rotor:"轉子",BladeNumber:"葉片數目",RotorInitialAngle:"轉子初始角度",RotorBladeDesign:"轉子葉片設計",RotorBladeRadius:"轉子葉片半徑",RotorBladePitchAngle:"轉子葉片俯仰角",RelativeYawAngle:"相對偏流角",MaximumChordLength:"最大弦長度",Tower:"塔架",TowerHeight:"塔架高度",TowerRadius:"塔架半徑",HubDesign:"轉子輪轂設計",HubRadius:"輪轂半徑",HubLength:"輪轂長度",OnlyThisWindTurbine:"只這個風力渦輪機",AllWindTurbinesAboveFoundation:"同一地基上所有的風力渦輪機",AllSelectedWindTurbines:"所有選中的風力渦輪機",AllWindTurbines:"所有的風力渦輪機"},wallMenu:{TextureDefault:"默認材質",Texture01:"一號材質",Texture02:"二號材質",Texture03:"三號材質",Texture04:"四號材質",Texture05:"五號材質",Texture06:"六號材質",Texture07:"七號材質",Texture08:"八號材質",Texture09:"九號材質",Texture10:"十號材質",SizeOfWall:"牆的尺寸",OnlyThisWall:"只這堵牆",AllConnectedWalls:"所有連接的牆",AllWallsAboveFoundation:"同一地基上所有的牆",AllSelectedWalls:"所有選中的墙",AllWalls:"所有的牆",Windows:"窗戶",LockAllUnlockedWindows:"固定所有非固定的窗戶",UnlockAllLockedWindows:"解除所有的窗戶固定",RemoveAllUnlockedWindows:"刪除這堵牆上所有非固定的窗戶",DoYouReallyWantToRemoveAllWindowsOnThisWall:"你確定刪除這堵牆上所有非固定的窗戶嗎",Doors:"門",LockAllUnlockedDoors:"固定所有非固定的門",UnlockAllLockedDoors:"解除所有的門固定",RemoveAllUnlockedDoors:"刪除這堵牆上所有非固定的門",DoYouReallyWantToRemoveAllDoorsOnThisWall:"你確定刪除這堵牆上所有非固定的門嗎",SolarPanels:"光伏板",LockAllUnlockedSolarPanels:"固定所有非固定的光伏板",UnlockAllLockedSolarPanels:"解除所有的光伏板固定",RemoveAllUnlockedSolarPanels:"刪除這堵牆上所有非固定的光伏板",DoYouReallyWantToRemoveAllSolarPanelsOnThisWall:"你確定刪除這堵牆上所有非固定的光伏板嗎",Sensors:"傳感器",LockAllUnlockedSensors:"固定所有非固定的傳感器",UnlockAllLockedSensors:"解除所有的傳感器固定",RemoveAllUnlockedSensors:"刪除這堵牆上所有非固定的傳感器",DoYouReallyWantToRemoveAllSensorsOnThisWall:"你確定刪除這堵牆上所有非固定的傳感器嗎",Lights:"電燈",LockAllUnlockedLights:"固定這堵牆上所有非固定的電燈",UnlockAllLockedLights:"解除這堵牆上所有的電燈固定",RemoveAllUnlockedLights:"刪除這堵牆上所有非固定的電燈",DoYouReallyWantToRemoveAllLightsOnThisWall:"你確定刪除這堵牆上所有非固定的電燈嗎",Polygons:"多邊形",LockAllUnlockedPolygons:"固定這堵牆上所有非固定的多邊形",UnlockAllLockedPolygons:"解除這堵牆上所有的多邊形固定",RemoveAllUnlockedPolygons:"刪除這堵牆上所有非固定的多邊形",DoYouReallyWantToRemoveAllPolygonsOnThisWall:"你確定刪除這堵牆上所有非固定的多邊形嗎",WallStructure:"牆結構",DefaultStructure:"默認",StudStructure:"牆柱",PillarStructure:"圓柱",Opacity:"遮光度",StructureSpacing:"結構間距",StructureWidth:"結構寬度",StructureThickness:"結構厚度",StructureColor:"結構颜色",Color:"牆体颜色",Height:"高度",Thickness:"厚度",Texture:"材質",AllLightsOnWallInside:"所有電燈在牆內",AllLightsOnWallOutside:"所有電燈在牆外",Fill:"填充",Full:"全部",Partial:"部分",Empty:"空白",OpenToOutside:"對外面開放",EavesLength:"屋簷延伸長度",Parapet:"女牆",ParapetColor:"女牆颜色",ParapetTexture:"女牆材質",ParapetHeight:"女牆高度",CopingsHeight:"頂蓋高度",CopingsWidth:"頂蓋寬度"},windowMenu:{OnlyThisWindow:"只這個窗戶",AllWindowsOnSurface:"同一表面上所有的窗戶",AllWindowsAboveFoundation:"同一地基上所有的窗戶",AllSelectedWindows:"所有選中的窗户",AllWindows:"所有的窗戶",Width:"寬度",Height:"高度",Setback:"離牆體外表面的距離",RelativeToWallThickness:"相對於牆的厚度",Mullion:"直櫺",HorizontalMullion:"水平的直櫺",VerticalMullion:"豎直的直櫺",MullionWidth:"直櫺寬度",HorizontalMullionSpacing:"水平直櫺的間距",VerticalMullionSpacing:"豎直直櫺的間距",MullionColor:"直櫺颜色",Tint:"著色",Opacity:"不透明度",SolarHeatGainCoefficient:"太陽輻射熱獲取係數(SHGC) = 1 - 不透明度",Shutter:"百葉窗",LeftShutter:"左側百葉窗",RightShutter:"右側百葉窗",BothShutters:"兩側百葉窗",ShutterWidth:"相對寬度",ShutterColor:"百葉窗顏色",Frame:"邊框",FrameWidth:"邊框寬度",SillWidth:"窗台寬度",Color:"邊框顔色",WindowType:"窗戶種類",Default:"默認",Arched:"拱形",Polygonal:"多邊形",Interior:"内窗",Empty:"空白"},roofMenu:{TextureDefault:"默認材質",Texture01:"一號材質",Texture02:"二號材質",Texture03:"三號材質",Texture04:"四號材質",Texture05:"五號材質",Texture06:"六號材質",Texture07:"七號材質",OnlyThisRoof:"只這個屋顶",AllRoofsAboveFoundation:"同一地基上所有的屋顶",AllSelectedRoofs:"所有選中的屋顶",AllRoofs:"所有的屋顶",OnlyThisCeiling:"只這個天花板",AllCeilingsAboveFoundation:"同一地基上所有的天花板",AllCeilings:"所有的天花板",EavesOverhangLength:"屋簷延伸長度",RafterSpacing:"屋椽間距",RafterWidth:"屋椽寬度",RafterThickness:"屋椽厚度",RafterColor:"屋椽颜色",RoofColor:"屋顶颜色",RoofSideColor:"屋顶側面颜色",GlassTint:"玻璃顏色",Opacity:"遮光度",RoofStructure:"屋頂結構",DefaultStructure:"默認",RafterStructure:"屋椽",GlassStructure:"玻璃",SolarPanels:"光伏板",LockAllUnlockedSolarPanels:"固定所有非固定的光伏板",UnlockAllLockedSolarPanels:"解除所有的光伏板固定",RemoveAllUnlockedSolarPanels:"刪除這個屋顶上所有非固定的光伏板",DoYouReallyWantToRemoveAllSolarPanelsOnThisRoof:"你確定刪除這個屋顶上所有非固定的光伏板嗎",Windows:"天窗",LockAllUnlockedWindows:"固定所有非固定的天窗",UnlockAllLockedWindows:"解除所有的天窗固定",RemoveAllUnlockedWindows:"刪除這個屋顶上所有非固定的天窗",DoYouReallyWantToRemoveAllWindowsOnThisRoof:"你確定刪除這個屋顶上所有非固定的天窗嗎",Sensors:"傳感器",LockAllUnlockedSensors:"固定所有非固定的傳感器",UnlockAllLockedSensors:"解除所有的傳感器固定",RemoveAllUnlockedSensors:"刪除這個屋顶上所有非固定的傳感器",DoYouReallyWantToRemoveAllSensorsOnThisRoof:"你確定刪除這個屋顶上所有非固定的傳感器嗎",Lights:"電燈",RemoveAllUnlockedLights:"刪除這個屋顶上所有非固定的電燈",DoYouReallyWantToRemoveAllLightsOnThisRoof:"你確定刪除這個屋顶上所有非固定的電燈嗎",AllLightsOnRoofInside:"所有電燈在屋頂內",AllLightsOnRoofOutside:"所有電燈在屋頂外",Rise:"相對高度",Ceiling:"天花板",RoofRValue:"屋顶R值",CeilingRValue:"天花板R值"},doorMenu:{TextureDefault:"默認材質",Texture01:"一號材質",Texture02:"二號材質",Texture03:"三號材質",Texture04:"四號材質",Texture05:"五號材質",Texture06:"六號材質",Texture07:"七號材質",Texture08:"八號材質",Texture09:"九號材質",Texture10:"十號材質",Texture11:"十一號材質",Texture12:"十二號材質",Texture13:"十三號材質",Texture14:"十四號材質",Texture15:"十五號材質",Texture16:"十六號材質",Texture17:"十七號材質",OnlyThisDoor:"只這個門",AllDoorsOnWall:"同一面牆上所有的門",AllDoorsAboveFoundation:"同一地基上所有的門",AllSelectedDoors:"所有選中的门",AllDoors:"所有的門",DoorType:"門種類",Default:"默認",Arched:"拱形",Filled:"填充",FrameColor:"門框顏色",Interior:"內門"},siteInfoPanel:{High:"最高溫度",Low:"最低温度"},designInfoPanel:{NumberOfSelectedHeliostats:"選中的定日鏡總數",NumberOfSelectedSolarPanels:"選中的光伏板總數",ElectricityGeneratedDailyBySolarPanels:"這些光伏板的日發電量",SceneDiameter:"場景直徑",BuildingArea:"建築面積"},visualizationControlPanel:{ColorContrast:"熱圖顏色對比度",FluxScale:"熱通量長度",ClickUpOrDownArrowButtonsToChange:"點擊上下箭頭改變參數"},instructionPanel:{Rotate:"旋轉",DragMouse:"拖動滑鼠",Zoom:"缩放",MouseWheelOrKeys:"滑鼠滾輪或者Ctrl+[和Ctrl+]",MouseWheelOrKeysMac:"滑鼠滾輪或者⌘+[和⌘+]",Pan:"平移",HoldCtrlDragMouse:"按下Ctrl鍵並拖動滑鼠",HoldMetaDragMouse:"按下⌘鍵並拖動滑鼠",Enter2DMode:"進入二維模式",Exit2DMode:"退出二維模式",NavigationMode:"導航模式",EnableNavigation:"進入導航模式",DisableNavigation:"退出導航模式",MoveForwardBack:"前後移動",MoveForwardBackInstruction:"按W/S鍵",MoveLeftRight:"左右移動",MoveLeftRightInstruction:"按A/D鍵",MoveUpDown:"上下移動",MoveUpDownInstruction:"按Z/X鍵",Turn:"拐彎",TurnInstruction:"按方向鍵",ResetView:"重置視角",AutoRotate:"自動旋轉",StartOrStop:"按F4鍵啟動或停止"},mapPanel:{ImageOnGround:"地面顯示圖像",HideAddress:"隱藏地址",WeatherStations:"氣象站",WeatherStationsNote:"關閉此選項以提高地圖速度",Coordinates:"經緯度坐標",Zoom:"放大程度"},visibilityPanel:{SolarPanelVisibility:"光伏板對觀察者的可見度",Observer:"觀察者",VantagePoint:"觀察位置",ItemizedVisibilityByFields:"每個場的可見度",TotalVisibility:"總可見度"},sensorPanel:{LightSensor:"光傳感器",WeatherDataFrom:"氣象數據來自"},buildingEnergyPanel:{DailyBuildingEnergy:"建築物日能耗",YearlyBuildingEnergy:"建築物年能耗",Heater:"暖氣",AC:"空調",SolarPanel:"光伏",Net:"淨能耗"},solarPanelYieldPanel:{SolarPanelDailyYield:"光伏日發電量",SolarPanelYearlyYield:"光伏年發電量",Yield:"發電量",YieldPerHour:"每小時發電量",DailyTotal:"日發電總量",YearlyTotal:"年發電總量",ShowOutputsOfIndividualSolarPanels:"顯示每行光伏板單獨發電量",Profit:"利潤",TotalCost:"總成本",TotalRevenue:"總收入",TotalYield:"總發電量",MeanYield:"平均發電量",ModuleCount:"光伏板總數"},parabolicTroughYieldPanel:{ParabolicTroughDailyYield:"拋物線槽日發電量",ParabolicTroughYearlyYield:"拋物線槽年發電量",Yield:"發電量",YieldPerHour:"每小時發電量",DailyTotal:"日發電總量",YearlyTotal:"年發電總量",ShowOutputsOfIndividualParabolicTroughs:"顯示每行拋物線槽單獨發電量"},parabolicDishYieldPanel:{ParabolicDishDailyYield:"拋物線碟日發電量",ParabolicDishYearlyYield:"拋物線碟年發電量",Yield:"發電量",YieldPerHour:"每小時發電量",DailyTotal:"日發電總量",YearlyTotal:"年發電總量",ShowOutputsOfIndividualParabolicDishes:"顯示每個拋物線碟單獨發電量"},fresnelReflectorYieldPanel:{FresnelReflectorDailyYield:"菲涅耳反射鏡日發電量",FresnelReflectorYearlyYield:"菲涅耳反射鏡年發電量",Yield:"發電量",YieldPerHour:"每小時發電量",DailyTotal:"日發電總量",YearlyTotal:"年發電總量",ShowOutputsOfIndividualFresnelReflectors:"顯示每個菲涅耳反射鏡單獨發電量"},heliostatYieldPanel:{HeliostatDailyYield:"定日鏡日發電量",HeliostatYearlyYield:"定日鏡年發電量",Yield:"發電量",YieldPerHour:"每小時發電量",DailyTotal:"日發電總量",YearlyTotal:"年發電總量",ShowOutputsOfIndividualHeliostats:"顯示每個定日鏡單獨發電量"},updraftTowerYieldPanel:{UpdraftTowerDailyYield:"太陽能上升氣流塔日發電量",UpdraftTowerYearlyYield:"太陽能上升氣流塔年發電量",ChimneyAirTemperature:"煙囪空氣溫度",ChimneyWindSpeed:"煙囪風速",Yield:"發電量",YieldPerHour:"每小時發電量",DailyTotal:"日發電總量",YearlyTotal:"年發電總量",ShowOutputsOfIndividualUpdraftTowers:"顯示每個太陽能上升氣流塔單獨發電量"},heliodonPanel:{SunAndTimeSettings:"太陽和時間設置",SunAngles:"角度",TwentyFourHours:"24小時"},cloudFilePanel:{CopyTitle:"拷貝標題",TitleCopiedToClipBoard:"標題拷貝到剪貼板",SearchByTitle:"按標題搜索",MyLikes:"我喜歡的模型",MyCloudFiles:"我的雲文件",GenerateLink:"生成鏈接",LinkGeneratedInClipBoard:"鏈接生成到剪貼板",DoYouReallyWantToDelete:"您確定刪除此文檔",IfSharedOrPublishedRenamingFileBreaksExistingLinks:"如果此文檔已被分享或發布, 改名會使已有鏈接失效"},projectListPanel:{CopyTitle:"拷貝標題",TitleCopiedToClipBoard:"標題拷貝到剪貼板",SearchByTitle:"按標題搜索",MyProjects:"我的專案",GenerateProjectLink:"生成專案鏈接",ProjectLinkGeneratedInClipBoard:"專案鏈接生成到剪貼板",DoYouReallyWantToDeleteProject:"您確定刪除專案",IfSharedOrPublishedRenamingProjectBreaksExistingLinks:"如果此專案已被分享或發布, 改名會使已有鏈接失效"},projectPanel:{ProjectSettings:"專案設定",ThumbnailImageSize:"縮略圖大小",ProjectByOtherPeople:"別人的專案",Project:"專案",ProjectType:"類别",ProjectDescription:"描述",MakeDescriptionEditable:"編輯描述",MakeDescriptionNonEditable:"不編輯描述",DoubleClickToMakeDescriptionEditable:"雙擊此描述激活編輯功能",SolarPanelArray:"光伏板陣列設計",CurateCurrentDesign:"收藏當前設計",UpdateSelectedDesign:"更新選中設計",RemoveSelectedDesign:"刪除選中設計",ClickToFlipSortingOrder:"點擊逆轉排序方向",DesignNotShownInSolutionSpaceClickToShow:"此設計目前不顯示在設計空間內,點擊顯示",DesignShownInSolutionSpaceClickToHide:"此設計目前顯示在設計空間內,點擊隱藏",SolutionSpace:"設計空間",ChooseSolutionSpace:"選擇設計空間",ChooseDataColoring:"選擇數據著色",SameColorForAllDesigns:"所有設計一個顏色",OneColorForEachDesign:"每個設計一個顏色",SolutionSpaceScreenshot:"設計空間截屏",ScatterPlotScreenshot:"散點圖截屏",SingleClickToSelectDoubleClickToOpen:"單擊選擇,雙擊打開。",SingleClickToDeselectDoubleClickToOpen:"單擊取消選擇,雙擊打開。",GenerateScatterPlot:"生成散點圖",SelectXAxis:"選擇X軸",SelectYAxis:"選擇Y軸"},accountSettingsPanel:{MyAccountSettings:"我的賬戶設定",MyID:"我的🆔",ClickToCopyMyID:"點擊此處拷貝我的ID",IDInClipBoard:"您現在可以粘貼ID了。",StoreMyNameInMyFilesWhenSaving:"保存文檔時籤上我的大名",DoYouReallyWantToShowYourNameInYourFiles:"您確定在您的文檔裡保存您的大名嗎?",SignFileDisclaimer:"如果您選擇保存,您的大名可能被所有打開您的文檔的人看到。",Likes:"點贊總數",AllPublished:"發佈總數",PublishedUnderAliases:"别名發佈",UserCount:"用戶總數",SchoolID:"學校編號",ClassID:"班級編號"},weatherPanel:{SunshineHours:"日照時間"},diurnalTemperaturePanel:{SelectAirTemperatureModel:"選擇氣溫模型",Sinusoidal:"正弦函數"},economicsPanel:{EconomicsParameters:"經濟學參數",ElectricitySellingPrice:"銷售電價",OperationalCostPerUnit:"單位運行成本",SellingPrice:"銷售電價",UnitCost:"單位成本"},navigationPanel:{NavigationParameters:"導航模式參數",MinimumMoveSpeed:"最小移動速度",MinimumTurnSpeed:"最小拐彎速度"},shadowSettingsPanel:{ShadowSettings:"陰影設定",ShadowCameraFarDistance:"最遠距離",ShadowMapSize:"映射圖長寬",Notes:"注意事項",RefreshPageNote:"改變設定後須刷新頁面。",MapSizeWarning:"大的映射圖長寬可能導致阿拉丁無法在某些電腦上運作。"},yearlyLightSensorPanel:{SkyClearness:"天空清晰度",ShowDaylightResults:"顯示日照時間結果",ShowSkyClearnessResults:"顯示天空清晰度結果",ShowAverageDailySolarRadiation:"顯示日平均輻射結果"},analysisManager:{NoSensorForCollectingData:"沒有傳感器收集數據。",NoSolarPanelForAnalysis:"沒有光伏板可以分析。",NoObserverForVisibilityAnalysis:"沒有找到可見度分析的觀察者。",NoSolarWaterHeaterForAnalysis:"沒有太陽能熱水器可以分析。",NoParabolicDishForAnalysis:"沒有拋物線碟可以分析。",NoParabolicTroughForAnalysis:"沒有拋物線槽可以分析。",NoFresnelReflectorForAnalysis:"沒有菲涅耳反射鏡可以分析。",NoHeliostatForAnalysis:"沒有定日鏡可以分析。",NoSolarUpdraftTowerForAnalysis:"沒有太陽能上升氣流塔可以分析。",NoBuildingForAnalysis:"沒有建築物可以分析。"},toolbar:{CloudFile:"雲文檔",Select:"選擇",AddFoundation:"添加地基",AddWall:"添加牆體",AddWindow:"添加窗戶",AddDoor:"添加門",AddPyramidRoof:"添加金字塔屋頂",AddGableRoof:"添加雙坡屋頂",AddHipRoof:"添加四坡屋顶",AddGambrelRoof:"添加复斜屋顶",AddMansardRoof:"添加折線屋顶",AddCuboid:"添加長方體",AddSensor:"添加傳感器",AddSolarPanel:"添加光伏板",AddSolarWaterHeater:"添加太陽能熱水器",AddBatteryStorage:"添加儲蓄電池",AddParabolicDish:"添加拋物線碟",AddParabolicTrough:"添加拋物線槽",AddFresnelReflector:"添加菲涅耳反射鏡",AddHeliostat:"添加定日鏡",AddWindTurbine:"添加水平轴風力渦輪機",AddVerticalAxisWindTurbine:"添加垂直軸風力渦輪機",AddLight:"添加電燈",AddTree:"添加樹木",AddFlower:"添加花草",AddPeople:"添加人物",DoubleClickToLockThisModeForNextAction:"雙擊按鈕給下個動作鎖定此模式",ClickToUnlockThisModeForNextAction:"點擊按鈕讓動作完成即離開此模式",ManipulateGroup:"整體操作一個組",ClearScene:"清空場景",ShowSunAndTimeSettings:"顯示太陽和時間設置",SpatialAnalysisOfEnergy:"能量的空間分析",DoYouReallyWantToClearContent:"您確定清空場景嗎",ClickForMoreButtons:"點擊此處切換到更多的按鈕模式"},tooltip:{gotoIFI:"訪問未來智能研究所",visitAladdinHomePage:"訪問阿拉丁主頁",clickToOpenMenu:"點擊打開主菜單",clickToAccessAccountSettings:"點擊打開賬號設定"},tree:{Apple:"蘋果樹",Birch:"白樺",Coconut:"椰子樹",Dogwood:"茱萸",Elm:"榆樹",FanPalm:"扇葉棕櫚",Linden:"菩提",Magnolia:"玉蘭",Maple:"楓樹",Oak:"橡樹",Pine:"松樹",Spruce:"雲杉"},flower:{Bellflower:"鈴蘭",Boxwood:"黃楊",CactusCombo1:"仙人掌組合一",CactusCombo2:"仙人掌組合二",CactusCombo3:"仙人掌組合三",CactusCombo4:"仙人掌組合四",Hibiscus:"木槿",Hosta:"玉簪",Hydrangea:"繡球花",Peony:"牡丹",RedRose:"紅玫瑰",Spirea:"繡線菊",Sunflower:"向日葵",TallBush:"高灌木",Tulip:"鬱金香",WhiteFlower:"白花",YellowFlower:"黄花"},people:{Jaah:"賈阿",Jack:"傑克",Jacob:"雅各布",Jacqueline:"杰奎琳",Jade:"美玉",Jamelia:"潔米莉雅",James:"詹姆斯",Jane:"簡",Jaya:"佳婭",Jaye:"傑伊",Jeanette:"珍妮特",Jedi:"傑迪",Jeff:"傑夫",Jena:"珍娜",Jennifer:"珍尼弗",Jess:"傑西",Jett:"傑特",Jill:"吉爾",Jiya:"吉娅",Joan:"瓊",Jocelyn:"喬斯林",Joel:"喬爾",Joey:"喬伊",John:"約翰",Jonathon:"喬納森",Jose:"何塞",Joseph:"約瑟夫",Joshua:"約書亞",Judd:"賈德",Judy:"朱蒂",Julia:"朱莉婭",Julio:"胡里奥",Jumapili:"祖瑪匹莉",June:"準衛",Juro:"朱諾",Justin:"賈斯汀"},compass:{N:"北",S:"南",W:"西",E:"東"},month:{January:"一月",February:"二月",March:"三月",April:"四月",May:"五月",June:"六月",July:"七月",August:"八月",September:"九月",October:"十月",November:"十一月",December:"十二月"},modelsMap:{AllTime:"全部時間",SearchByPublisher:"按發布者搜索",SearchByLabel:"按標籤搜索",MyPublishedModels:"我發布的模型",TotalNumberOfUserPublishedModelsInSelectedPeriod:"選定時間段用戶發布的模型總數",AllTimeTotal:"全部時間用戶發布的模型總數",SortFromOldestToNewest:"從早到晚排序",SortFromNewestToOldest:"從晚到早排序",SitesFound:"個位置",ModelsFoundOnThisSite:"個模型在此位置",ShowModelsPublishedByThisAuthor:"展示此用戶發布的模型"}}},gpt={translation:{name:{IFI:"Instituto de inteligencia futura",Aladdin:"Aladdin",Tagline:"Aladdin: Reimagining Design with Explainable AI — Institute for Future Intelligence"},cookie:{Statement:"Clicando Aceptar, autoriza el uso de cookies para mejora la experiencia con Aladdin",Accept:"Aceptar"},aboutUs:{ProductBroughtToYouBy:"Este producto esta hecho por",TermsOfService:"Términos de servicio",PrivacyPolicy:"Política de privacidad",Software:"Programa",Content:"Contenido",Research:"Investigación",Support:"Ayuda",Acknowledgment:"Agradecimientos",FundingInformation:"La National Science Foundation (NSF) proporcionó generosamente fondos para la investigación y el desarrollo de este producto a través de las subvenciones con número #2105695, #2131097, y #2301164. Sin embargo, todas las opiniones, hallazgos y conclusiones o recomendaciones expresados en este producto pertenecen a los autores y no reflejan necesariamente los puntos de vista de la NSF.",Contact:"Para más información, por favor contacte con Charles Xie (charles@intofuture.org).",Translators:"Translators"},word:{BrandName:"Brand Name",Name:"Name",Refresh:"Refresh",LastUpdate:"Last Update",Small:"Small",Medium:"Medium",Large:"Large",Design:"Design",Information:"Information",Type:"Type",Text:"Text",FontSize:"Font Size",FontColor:"Font Color",Model:"Model",Models:"Models",Upload:"Upload",ClickCount:"Click Count",Share:"Share",AlreadyLike:"Already like",Like:"Like",MustLogInToLike:"Must log in to like",AllRightsReserved:"Todos los derechos reservados",MeterAbbreviation:"m",VoltAbbreviation:"V",AmpereAbbreviation:"A",WattAbbreviation:"W",Version:"Versión",VersionInitial:"V",Options:"Opciones",Maximum:"Maximum",Minimum:"Minimum",MaximumNumber:"Número máximo",MinimumNumber:"Minimum Number",MaximumValue:"Maximum Value",MinimumValue:"Minimum Value",Or:"O",None:"Ninguno",High:"High",Partial:"Partial",Teacher:"Profesor",Class:"Clase",Total:"Total",Leaderboard:"Leaderboard",Latest:"Latest",Range:"Rango",SIUnit:"SI Unit",USUnit:"US Unit",ThermalTransmittance:"Thermal Transmittance",ThermalResistance:"Thermal Resistance",UValue:"U-Value",RValue:"R-Value",VolumetricHeatCapacity:"Volumetric Heat Capacity",BuildingHVACSystem:"Building HVAC System",ThermostatSetpoint:"Thermostat Setpoint",TemperatureToleranceThreshold:"Tolerance Threshold",TemperatureToleranceThresholdExplanation:`Heater will not run if the lowest outside temperature of the day is higher than the setpoint minus this threshold. +AC will not run if the highest outside temperature of the day is lower than the setpoint plus this threshold.`,Press:"Press",Open:"Abrir",Save:"Guardar",SaveAsImage:"Guardar como imagen",SaveAsCsv:"Save as CSV",Update:"Actualizar",Paste:"Pegar",Copy:"Copiar",Cut:"Cortar",Delete:"Eliminar",Add:"Add",Lock:"Cerrar con llave",Translucent:"Translucent",Transparency:"Transparency",Color:"Color",Pattern:"Pattern",Texture:"Textura",Size:"Tamaño",Thickness:"Grosor",Yes:"Sí",No:"No",OK:"OK",Cancel:"Cancelar",Apply:"Aplicar",Close:"Cerrar",ApplyTo:"Aplicar a",Run:"Run",Pause:"Pause",Resume:"Resume",Clear:"Limpiar",Warning:"Aviso",Caution:"Caution",Reminder:"Reminder",Length:"Longitud",Width:"Ancho",Height:"Altura",Radius:"Radius",Angle:"Ángulo",Azimuth:"Azimut",Coordinates:"Coordinates",Weather:"Tiempo",Show:"Mostrar",Animate:"Animar",Date:"Fecha",Time:"Tiempo",Title:"Título",Owner:"Propietario",Action:"Acción",Rename:"Renombrar",Location:"Location",Latitude:"Latitud",Month:"Mes",Day:"Día",Hour:"Hora",Daylight:"Luz solar",Radiation:"Radiación",Temperature:"Temperatura",kWh:"kWh",dollar:"dollar",MeterPerSecond:"m/s",NorthInitial:"N",SouthInitial:"S",EastInitial:"E",WestInitial:"O",Fixed:"Fixed",Elements:"Elements",Energy:"Energy",Unknown:"Unknown",Label:"Label",Description:"Description",NoDescription:"No description",MaximumCharacters:"Maximum characters",Author:"Author",Publisher:"Publisher",Building:"Building",ResidentialBuilding:"Residential Building",CommercialBuilding:"Commercial Building",SchoolBuilding:"School Building",TouristAttraction:"Tourist Attraction",UnderConstruction:"Under Construction",Photovoltaic:"Photovoltaic",WindPower:"Wind Power",ColocationProjects:"Colocation Projects",Anonymous:"Anonymous",Nickname:"Nickname",Pin:"Pin",Unpin:"Unpin"},shared:{NoTexture:"Sin textura",FoundationElement:"Bases",CuboidElement:"Cuboide",PolygonElement:"Polígon",SensorElement:"Sensor",SolarPanelElement:"Panel solar",SolarWaterHeaterElement:"Solar Water Heater",ParabolicDishElement:"Parabolic Dish",ParabolicTroughElement:"Parabolic Trough",FresnelReflectorElement:"Fresnel Reflector",HeliostatElement:"Heliostat",WindTurbineElement:"Wind Turbine",LightElement:"Light",ElementLocked:"Bloqueado",ModelType:"Model Type",OutputBreakdown:"Breakdown",MoreResults:"More Results"},message:{NewVersionAvailable:"A new version is available",CalculationMayBeSlowDoYouWantToContinue:"Calculation may be slow. Do you want to continue?",IncreaseSolarRadiationHeatmapGridCellSizeToSpeedUp:"Increase solar radiation heatmap grid cell size to speed up",ModelNotFound:"Model not found",CannotSignIn:"Cannot sign in",CannotSignOut:"Cannot sign out",YourAccountWasCreated:"Your account was created.",CannotCreateAccount:"Cannot create an account",YourAccountSettingsWereSaved:"Your account settings were saved.",CannotSaveYourAccountSettings:"Cannot save your account settings",CannotSaveYourFileToCloud:"Cannot save your file to the cloud",CannotCreateNewProject:"Cannot create a new project",CannotCreateNewProjectWithoutTitle:"Cannot create a new project without a title",CannotOpenYourProjects:"Cannot open your projects",CannotOpenProject:"Cannot open the project",CannotDeleteProject:"Cannot delete the project",CannotRenameProject:"Cannot rename the project",CannotAddDesignToProject:"Cannot add this design to the project",CannotAddDesignToProjectOwnedByOthers:"Cannot add this design to a project owned by others",DesignRemovedFromProject:"The design was successfully removed from the project",CannotRemoveDesignFromProject:"Cannot remove this design from the project",CannotUpdateProject:"Cannot update the project",CannotFetchProjectData:"Cannot fetch project data",TitleUsedChooseDifferentOne:"This title has been used. Choose a different one",CloudFileWithTitleExistsDoYouWantToOverwrite:"A cloud file with the title exists. Do you want to overwrite it?",CloudFileNotFound:"The cloud file was not found",CannotLoadModelsOnMap:"Cannot load models on map",CannotLoadLeaderboard:"Cannot load leaderboard",CannotPublishModelOnMap:"Cannot publish model on map",CannotLikeModelFromMap:"Cannot like model from map",CannotDeleteModelFromMap:"Cannot delete model from map",ModelDeletedFromMap:"Model is deleted from map",DoYouWantToDeleteModelFromMap:"Do you want to delete the model from map?",CannotOpenCloudFile:"Cannot open the cloud file",CannotReadCloudFile:"Cannot read the cloud file",CannotWriteCloudFile:"Cannot write the cloud file",CloudFileCopied:"Cloud file copied",CannotOpenCloudFolder:"Cannot open your cloud folder",CannotDeleteCloudFile:"Cannot delete the cloud file",CannotRenameCloudFile:"Cannot rename the cloud file",DoYouWantToSaveChanges:"¿Quieres guardar los cambios?",NotApplicableToSelectedAction:"No se aplica a la acción seleccionada",ThisElementIsLocked:"Este elemento está bloqueado",ThisCannotBeUndone:"Esto no se puede deshacer",AzimuthOfNorthIsZero:"Azimut del norte es 0°",CounterclockwiseAzimuthIsPositive:"Hacia la izquierda es positivo",SouthFacingIsZero:"South-facing is 0°",ClockwiseRotationIsPositive:"Clockwise is positive",MoveCancelledBecauseOfOverlap:"Move cancelled because of overlap.",MoveOutsideBoundaryCancelled:"Move outside the boundary cancelled.",RotationCancelledBecauseOfOverlap:"Rotation cancelled because of overlap.",RotationOutsideBoundaryCancelled:"Rotation outside the boundary cancelled.",ResizingCancelledBecauseOfOverlap:"Resizing cancelled because of overlap.",ResizingOutsideBoundaryCancelled:"Resizing outside the boundary cancelled.",CannotPasteOutsideBoundary:"Cannot paste outside this surface.",CannotPasteBecauseOfOverlap:"Cannot paste because of overlap.",CannotMoveObjectTooFar:"Cannot move object too far.",ExistingSolarPanelsWillBeRemovedBeforeApplyingNewLayout:"Existing solar panels will be removed before applying the new layout.",DoYouWantToContinue:"Do you want to continue?",SolarPanelsCannotIntersectWithGround:"Solar panels cannot intersect with the ground.",SolarPanelsCannotOverlapWithOneAnother:"Solar panels cannot overlap with one another.",ScreenshotSaved:"A screenshot was saved.",CsvFileSaved:"A CSV file was saved.",SimulationStarted:"Simulation started.",SimulationCompleted:"Simulation completed.",SimulationAborted:"Simulation aborted.",SimulationPaused:"Simulation paused.",CancelSimulation:"Cancel simulation",PauseSimulation:"Pause simulation",ResumeSimulation:"Resume simulation",SimulationWillNotStartDueToErrors:"Simulation will not start due to errors",SimulationWillStartDespiteWarnings:"Simulation will start despite warnings.",EvolutionStarted:"Evolution started.",EvolutionCompleted:"Evolution completed.",EvolutionAborted:"Evolution aborted.",EvolutionPaused:"Evolution paused.",EncounterEvolutionError:"Encountered an evolution error.",CancelEvolution:"Cancel evolution",PauseEvolution:"Pause evolution",ResumeEvolution:"Resume evolution",ConvergenceThresholdHasBeenReached:"The convergence threshold has been reached.",MaximumNumberOfGenerationsHasBeenReached:"The maximum number of generations has been reached.",MaximumNumberOfStepsHasBeenReached:"The maximum number of steps has been reached.",ObjectiveFunctionTypeError:"The current objective function is not supported by this operation. Please start from the menu.",WallsAreNotAtSameHeight:"Walls are not at the same height.",WallsAreNotPerpendicular:"Walls are not perpendicular.",WallsAreNotConnected:"Walls are not connected.",WallsNumberNeedToBeFour:"The number of walls needs to be four.",BuildingContainsEmptyWall:"Building contains one or more empty wall.",BuildingRoofMissing:"Building has a missing roof.",UnknownErrors:"Unknown errors.",SigningOutAnonymousAccount:"Are you sure you want to sign out? This anonymous account will be lost."},menu:{AnalysisOptions:"Analysis Options",option:{GridCellSize:"Grid Cell Size",SamplingFrequency:"Frecuencia de muestreo",TimesPerHour:"Veces per hora",DaysPerYear:"Days per Year"},mainMenu:"Menu principal",cloudMenu:"Menú en la nube",projectSubMenu:"Project",project:{CreateNewProject:"Create New Project",OpenProject:"Open Project",SaveProject:"Save Project",SaveProjectAs:"Save Project As",YouMustLogInToCreateProject:"You must log in to create a new project",YouMustLogInToOpenProject:"You must log in to open a project"},fileSubMenu:"Archivo",file:{CreateNewFile:"Crear nuevo archivo",OpenLocalFile:"Abrir archivo local",SaveAsLocalFile:"Guardar como archivo local",SavingAbortedMustHaveValidFileName:"!Error guardando! Debes tener un nombre de archivo válido",OpenCloudFile:"Abrir archivo en la nube",SaveCloudFile:"Guardar archivo en la nube",SaveAsCloudFile:"Guardar como archivo en la nube",SavingAbortedMustHaveValidTitle:"!Error guardando! Debes tener un título válido para el archivo en la nube",ToSaveYourWorkPleaseSignIn:"Para guardar tu trabajo, por favor regístrese.",TakeScreenshot:"Hacer captura de pantalla",UseCloudFileName:"Use Cloud File Name",PublishOnModelsMap:"Publish on Models Map",PublishedOnModelsMap:"Your model has been published on the Models Map",UpdatedOnModelsMap:"Your model has been updated on the Models Map",YouMustLogInToPublishYourModel:"You must log in to publish your model",YouCannotPublishAModelThatYouDoNotOwn:"You cannot publish a model that you do not own",YouMustSaveModelOnCloudBeforePublishingIt:"You must save the model on the cloud before publishing it"},editSubMenu:"Editar",edit:{Undo:"Deshacer",Redo:"Repetir"},viewSubMenu:"Vista",view:{NavigationView:"Navigation View",TwoDimensionalView:"Vista 2D",ResetView:"Resetear",ZoomIn:"Acercar",ZoomOut:"Alejar",AutoRotate:"Auto rotación",ShowShadow:"Mostrar sombra",ShowSurfaceShininess:"Show Surface Shininess",TranslucentFloatingWindows:"Translucent Floating Windows",accessoriesSubMenu:"Accessories",accessories:{SiteInformation:"Información del sitio",DesignInformation:"Información de diseño",Instruction:"Instrucción",StickyNote:"Nota adhesiva",Note:"Nota"}},settingsSubMenu:"Settings",settings:{WeatherData:"Datos del tiempo",DiurnalTemperature:"Diurnal Temperature",Heliodon:"Heliodon",SunAndTime:"Sun & Time",CustomSolarPanels:"Custom Solar Panels",CustomizeSolarPanel:"Customize Solar Panel"},benchmarksSubMenu:"Benchmarks",benchmarks:{SolarRadiationPredictionVsMeasurement:"Solar Radiation Prediction vs. Measurement",BESTESTCase600:"Building Energy Simulation Test: BESTEST Case 600",BESTESTCase610:"Building Energy Simulation Test: BESTEST Case 610",BESTESTCase620:"Building Energy Simulation Test: BESTEST Case 620",BESTESTCase630:"Building Energy Simulation Test: BESTEST Case 630"},graph:{LineWidth:"Line Width",SymbolSize:"Symbol Size",BarCategoryGap:"Bar Category Gap",ShowHorizontalGridLines:"Show Horizontal Grid Lines",ShowVerticalGridLines:"Show Vertical Grid Lines"},analysisSubMenu:"Análisis",physicsSubMenu:"Physics",physics:{DailySolarRadiationHeatmap:"Daily Solar Radiation Heatmap",SolarRadiationHeatmapOptions:"Solar Radiation Heatmap Options",SolarRadiationHeatmapGridCellSize:"Solar Radiation Heatmap Grid Cell Size",SolarRadiationHeatmapMaxValue:"Solar Radiation Heatmap Maximum Value",SolarRadiationHeatmapNoAnimation:"No Animation for Static Model",ReflectionHeatmap:"Reflection Heatmap"},sensorSubMenu:"Sensores",sensor:{CollectDailyData:"Recoger datos diarios",CollectYearlyData:"Recoger datos anuales",SensorSimulationNoAnimation:"No Animation for Collecting Sensor Data"},buildingSubMenu:"Building",building:{AnalyzeDailyBuildingEnergy:"Analyze Daily Building Energy",AnalyzeYearlyBuildingEnergy:"Analyze Yearly Building Energy",EnergyAnalysisOptions:"Energy Analysis Options",EnergyGridCellSize:"Energy Grid Cell Size",BuildingEnergySimulationNoAnimation:"No Animation for Building Energy Simulation"},solarPanelSubMenu:"Paneles solares",solarPanel:{AnalyzeDailyYield:"Analizar el rendimiento diario",AnalyzeYearlyYield:"Analizar el rendimiento anual",AnalyzeVisibility:"Analyze Visibility",PanelDiscretization:"Discretización del panel",Exact:"Exacto",Approximate:"Aproximado",EnergyGridCellSize:"Energy Grid Cell Size",VisibilityGridCellSize:"View Factor Grid Cell Size",EnergyAnalysisOptions:"Energy Analysis Options",VisibilityAnalysisOptions:"Visibility Analysis Options",SolarPanelSimulationNoAnimation:"No Animation for Solar Panel Simulation"},parabolicTroughSubMenu:"Parabolic Trough",parabolicTrough:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield"},parabolicDishSubMenu:"Parabolic Dish",parabolicDish:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield"},fresnelReflectorSubMenu:"Fresnel Reflector",fresnelReflector:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield"},heliostatSubMenu:"Heliostat",heliostat:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield"},solarUpdraftTowerSubMenu:"Solar Updraft Tower",solarUpdraftTower:{AnalyzeDailyYield:"Analyze Daily Yield",AnalyzeYearlyYield:"Analyze Yearly Yield",SolarUpdraftTowerSimulationNoAnimation:"No Animation for Solar Updraft Tower Simulation"},tutorialsSubMenu:"Tutorials",solarEnergyScienceSubMenu:"Solar Science",solarEnergyScienceTutorials:{SunAngles:"Ángulos solares relativos a un observador en el suelo",InsolationAndClimate:"Insolation and Climate",SolarRadiationToBox:"Radiación solar a una caja"},buildingScienceSubMenu:"Building Science",buildingScienceTutorials:{ThermalEnvelopeVsBuildingEnvelope:"Thermal Envelope vs. Building Envelope",EffectOfSizeOnBuildingEnergy:"Effect of Size on Building Energy",EffectOfOrientationOnBuildingEnergy:"Effect of Orientation on Building Energy",EffectOfInsulationOnBuildingEnergy:"Effect of Insulation on Building Energy",EffectOfRoofColorOnBuildingEnergy:"Effect of Roof Color on Building Energy",EffectOfEavesOverhangLengthOnBuildingEnergy:"Effect of Eaves Overhang Length on Building Energy",EffectOfWindowSHGCOnBuildingEnergy:"Effect of Window Solar Heat Gain on Building Energy",EffectOfThermostatSetpointOnBuildingEnergy:"Effect of Thermostat Setpoint on Building Energy",EffectOfSolarPanelsOnBuildingEnergy:"Effect of Solar Panels on Building Energy",EffectOfGroundTemperatureOnBuildingEnergy:"Effect of Ground Temperature on Building Energy",EffectOfTreesOnBuildingEnergy:"Effect of Trees on Building Energy"},buildingDesignSubMenu:"Building Design",buildingDesignTutorials:{CapeCodStyleHouseWithShedDormer:"Cape Cod Style House with Shed Dormer",MansardRoofWithDormers:"Mansard Roof with Dormers",GableRoofVsHipRoof:"Gable Roof vs. Hip Roof",ColonialVsSaltbox:"Colonial vs. Saltbox",GambrelRoofVsMansardRoof:"Gambrel Roof vs. Mansard Roof",CombinationRoofVsBonnetRoof:"Combination Roof vs. Bonnet Roof",DutchGableRoof:"Dutch Gable Roof",GableAndValleyRoof:"Gable and Valley Roof",ClerestoryRoof:"Clerestory Roof",MonitorRoof:"Monitor Roof",AFrameHouse:"A-Frame House",HalfTimberedHouse:"Half-Timbered House",AllBasicRoofTypes:"All Basic Roof Types"},photovoltaicSolarPowerSubMenu:"Photovoltaic Solar Power",photovoltaicSolarPowerTutorials:{EffectOfTiltAngleOfSolarPanel:"Effect of Tilt Angle",EffectOfAzimuthOfSolarPanel:"Effect of Azimuth",SolarPanelTypes:"Solar Panel Types",DefineYourOwnSolarPanels:"Define Your Own Solar Panels",VerticalBifacialSolarPanels:"Vertical Bifacial Solar Panels",CompareMonofacialAndBifacialSolarPanels:"Monofacial vs. Bifacial Solar Panels",SolarTrackers:"Seguidores solares",CoveringGroundWithSolarPanels:"Why Just Covering the Ground with Solar Panels is not a Good Idea",InterRowSpacingOfSolarPanelArray:"Effect of Inter-Row Spacing in a Solar Panel Array",EffectOfOrientationOfSolarPanels:"Effect of Orientation of Solar Panels",SolarPanelArrayAutomaticLayout:"Solar Panel Array Automatic Layout"},concentratedSolarPowerSubMenu:"Concentrated Solar Power",concentratedSolarPowerTutorials:{EffectOfAzimuthOfParabolicTrough:"Effect of Azimuth of a Parabolic Trough",EffectOfLatusRectumOfParabolicTrough:"Effect of Latus Rectum of a Parabolic Trough",FocusSunlightWithParabolicDish:"Focus Sunlight with a Parabolic Dish",LinearFresnelReflectors:"Linear Fresnel Reflectors",EffectOfAbsorberPipeHeightForLinearFresnelReflectors:"Effect of Absorber Pipe Height for Linear Fresnel Reflectors",EffectOfAzimuthOfLinearFresnelReflectors:"Effect of Azimuth of Linear Fresnel Reflectors",LinearFresnelReflectorsWithTwoAbsorbers:"Linear Fresnel Reflectors with Two Absorbers",CosineEfficiencyOfHeliostats:"Cosine Efficiency of Heliostats",ShadowingAndBlockingOfHeliostats:"Shadowing and Blocking of Heliostats",EffectSolarPowerTowerHeight:"Effect of Solar Power Tower Height",SolarPowerTower:"Solar Power Tower"},otherTypesOfSolarPowerSubMenu:"Other Types of Solar Power",otherTypesOfSolarPowerTutorials:{SolarWaterHeaters:"Solar Water Heaters",SolarUpdraftTower:"Solar Updraft Tower"},windPowerSubMenu:"Wind Power",windPowerTutorials:{EffectOfBladeNumberOfWindTurbine:"Effect of Blade Number of Wind Turbine",EffectOfPitchAngleOfWindTurbineBlades:"Effect of Pitch Angle of Wind Turbine Blades",BirdSafeBladeDesign:"Bird-Safe Blade Design",OffshoreWindFarm:"Offshore Wind Farm"},colocationSubMenu:"Colocation",colocationTutorials:{AgricultureSolarWindColocation:"Agriculture-Solar-Wind Colocation"},generativeDesignSubMenu:"Generative Design",generativeDesignTutorials:{MonofacialSolarPanelArrayTiltAngle:"The Tilt Angle of a Monofacial Solar Panel Array",BifacialSolarPanelArrayTiltAngle:"The Tilt Angle of a Bifacial Solar Panel Array",OutputOfSolarPanelArrayInDifferentPlaces:"The Output of a Solar Panel Array in Different Places",SimpleSolarFarmParetoFront:"The Pareto Front for Designing a Simple Solar Farm"},examplesSubMenu:"Ejemplos",solarEnergySubMenu:"Energía Solar",solarEnergyExamples:{SunBeamAndHeliodon:"Rayo de sol y heliodon",RooftopSolarPanels:"Rooftop Solar Panels",NevadaSolarOneParabolicTroughArray:"Nevada Solar One Parabolic Trough Array",TooeleParabolicDishArray:"Tooele Parabolic Dish Array",PS10SolarPowerTower:"PS10 Solar Power Tower",TucsonLinearFresnelReflectors:"Tucson Linear Fresnel Reflectors",SolarCanopyFormFactors:"Solar Canopy Form Factors",SolarCanopyOverBleachers:"Solar Canopy Over Bleachers",SolarCanopyOverGarage:"Solar Canopy Over Garage",SolarBusStop:"Solar Bus Stop",SolarFacadeTesla:"Tesla Solar Façade",BuildingIntegratedPhotovoltaics:"Building-Integrated Photovoltaics",Floatovoltaics:"Floatovoltaics",Agrivoltaics:"Agrivoltaics",VegetativeBuffer:"Vegetative Buffer",RainbowSwashSolarFarmBostonMA:"Rainbow Swash Solar Farm in Boston, MA",MickeyMouseSolarFarmOrlandoFL:"Mickey Mouse Solar Farm in Orlando, FL",SolarPanelsOverCanalBakersfieldCA:"Hypothetical Solar Panels Over Canal in Bakersfield, CA",SolarNoiseBarrierLexingtonMA:"Hypothetical Solar Noise Barrier in Lexington, MA",HSATSolarTrackersRaleighNC:"Horizontal Single Axis Trackers (HSAT) in Raleigh, NC",AADATSolarTrackersLancasterCA:"Azimuth–Altitude Dual Axis Trackers (AADAT) in Lancaster, CA",SolarUpdraftTowerInCity:"Solar Updraft Tower in City"},builtEnvironmentSubMenu:"Built Environment",residentialBuildingsSubMenu:"Residential Buildings",residentialBuildingExamples:{ColonialHouse:"Colonial House",DutchColonialHouse:"Dutch Colonial House",TShapedHouse:"T-Shaped House",CapeCodHouseWithGarage:"Cape Cod House with Garage",Solarium:"Solarium",Church1:"Church 1",Cathedral1:"Cathedral 1",Cathedral2:"Cathedral 2",Mosque1:"Mosque 1",AdobeTaosHouse:"Adobe Taos House",RanchHouse:"Ranch House",BonnetHouse:"Bonnet House",BarnStyleHouse:"Barn Style House",ModernHouse:"Modern House",ButterflyRoofHouse:"Butterfly Roof House"},commercialBuildingsSubMenu:"Commercial Buildings",commercialBuildingExamples:{WhiteHouse:"White House",HaroldWashingtonCollege:"Harold Washington College",BilimMersinTurkiye:"BILIM, Mersin, Turkiye",SpanishStyleHotel:"Spanish Style Hotel",ApartmentBuilding:"Apartment Building",OfficeBuilding:"Edificio de oficinas",Hotel:"Hotel"},buildingComplexesSubMenu:"Building Complexes",buildingComplexExamples:{SouthBurlingtonHighSchoolVermont:"South Burlington High School, VT",MescaleroApacheSchoolNewMexico:"Mescalero Apache School, NM"},urbanPlanningSubMenu:"Urban Planning",urbanPlanningExamples:{CityBlockHeatmap:"City Block Heatmap",ChicagoSkyline:"Chicago Skyline"},otherBuildingsSubMenu:"Other Buildings",otherBuildingExamples:{Greenhouse:"Greenhouse",Pavilion:"Pavilion in a Park",OctagonalPagoda:"Octagonal Pagoda",OceanFront:"Ocean Front",EgyptianPyramids:"Egyptian Pyramids",MayanPyramid:"Mayan Pyramid",SiOSePol:"Si-o-se-pol",StackedCuboids:"Stacked Cuboids"},artificialIntelligenceSubMenu:"Artificial Intelligence",artificialIntelligenceExamples:{OptimizingTiltAngleOfOneSolarPanelRow:"Optimizing the Tilt Angle of a Solar Panel Row",OptimizingTiltAnglesOfMultipleSolarPanelRows:"Optimizing the Tilt Angles of Multiple Solar Panel Rows",SolarFarmGenerativeDesign:"Solar Farm Generative Design",SolarFarmGenerativeDesignWithBlock:"Solar Farm Generative Design in the Presence of a Block",FitchburgSolarFarmGenerativeDesign:"Fitchburg Solar Farm Generative Design"},languageSubMenu:"Idioma",publicSubMenu:"Public",ModelsGallery:"Models Gallery",ModelsMap:"Models Map",AboutUs:"Sobre nosotros"},avatarMenu:{AccountSettings:"Configuraciones de la cuenta",PrivacyStatementTitle:"User Privacy Protection Statement",PrivacyStatement:"When you sign in, your Google ID is used to create and access your Aladdin account. Only a random alphanumeric string is stored in our database as a reference. No personally identifiable data such as your name or email is ever gathered. For more information, see our ",SignIn:"Iniciar sesión",SignInAsMe:"Sign in as me",SignInAnonymously:"Sign in anonymously",SignOut:"Desconectar",IfYouAreAStudent:"Si eres un estudiante"},skyMenu:{Axes:"Ejes",Theme:"Tema",ThemeDefault:"Por defecto",ThemeDesert:"Desierto",ThemeDune:"Dune",ThemeForest:"Bosque",ThemeGrassland:"Campo",ThemeHill:"Hill",ThemeLake:"Lake",ThemeMountain:"Mountain",ThemeRural:"Rural",SunlightAttenuationCoefficientInAir:"Sunlight Attenuation Coefficient in Air",ConvectiveCoefficientOfAir:"Convective Coefficient of Air",HighestTemperatureTimeInMinutes:"Highest Temperature Time (Minutes)",SelectSunAnglesToShow:"Select Sun Angles to Show",ShowAzimuthAngle:"Show Azimuth Angle",ShowElevationAngle:"Show Elevation Angle",ShowZenithAngle:"Show Zenith Angle",DirectLightBrightnessAtNoon:"Direct Light Brightness at Noon",AmbientLightBrightnessAtNoon:"Ambient Light Brightness at Noon"},groundMenu:{MonthlyIrradianceLoss:"Monthly Irradiance Loss",Vegetation:"Vegetation",LeafOutDay:"Leaf-Out Day",LeafOffDay:"Leaf-Off Day",Albedo:"Albedo",ImageOnGround:"Imagen en el suelo",WaterSurface:"Water Surface",RemoveAllUnlockedTrees:"Eliminar todos los árboles",RemoveAllUnlockedFlowers:"Remove All Unlocked Flowers",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",RemoveAllUnlockedPeople:"Eliminar toda la gente",RemoveAllUnlockedFoundations:"Eliminar todos las bases",RemoveAllUnlockedCuboids:"Eliminar todos los cuboides",DoYouReallyWantToRemoveAllPeople:"Estás seguro que quieres eliminar a toda la gente who are not locked",DoYouReallyWantToRemoveAllTrees:"Estás seguro que quieres eliminar todos los árboles that are not locked",DoYouReallyWantToRemoveAllFlowers:"Do you really want to remove all the flowers that are not locked",DoYouReallyWantToRemoveAllSolarPanels:"Do you really want to remove all the solar panels that are not locked",DoYouReallyWantToRemoveAllFoundations:"Estás seguro que quieres eliminar todas las bases that are not locked",DoYouReallyWantToRemoveAllCuboids:"Estás seguro que quieres eliminar todos los cuboides that are not locked",LockAllUnlockedElements:"Lock All Unlocked Elements",UnlockAllLockedElements:"Unlock All Locked Elements"},labelSubMenu:{Label:"Etiqueta",LabelText:"Label Text",LabelHeight:"Label Height",LabelSize:"Label Size",LabelFontSize:"Font Size",LabelColor:"Label Color",KeepShowingLabel:"Seguir mostrando etiqueta"},foundationMenu:{RemoveAllUnlockedSolarPanels:"Eliminar todos los paneles solares",RemoveAllUnlockedParabolicTroughs:"Remove All Unlocked Parabolic Troughs",RemoveAllUnlockedParabolicDishes:"Remove All Unlocked Parabolic Dishes",RemoveAllUnlockedFresnelReflectors:"Remove All Unlocked Fresnel Reflectors",RemoveAllUnlockedHeliostats:"Remove All Unlocked Heliostats",RemoveAllUnlockedWindTurbines:"Remove All Unlocked Wind Turbines",RemoveAllUnlockedSensors:"Eliminar todos los sensores",RemoveAllUnlockedLights:"Remove All Unlocked Lights",RemoveAllUnlockedWalls:"Eliminar todas las paredes",RemoveAllUnlockedWindows:"Remove All Unlocked Windows",RemoveAllUnlockedDoors:"Remove All Unlocked Doors",RemoveAllUnlockedPolygons:"Eliminar todos los polígonos",RemoveAllUnlockedHumans:"Remove All Humans",RemoveAllUnlockedTrees:"Remove All Trees",RemoveAllUnlockedFlowers:"Remove All Unlocked Flowers",Racks:"Rejillas",Texture01:"Textura 1",Texture02:"Textura 2",Texture03:"Textura 3",Texture04:"Textura 4",Texture05:"Textura 5",Texture06:"Textura 6",Texture07:"Textura 7",Texture08:"Textura 8",Texture09:"Textura 9",Texture10:"Textura 10",SolarPanels:"Paneles solares",SolarPanelArray:"Solar Panel Array",DoYouReallyWantToRemoveAllSolarPanelsOnFoundation:"Estás seguro que quieres eliminar todos los paneles solares en esta base that are not locked",ParabolicTroughs:"Parabolic Troughs",DoYouReallyWantToRemoveAllParabolicTroughsOnFoundation:"Do you really want to remove all the parabolic troughs on this foundation that are not locked",ParabolicDishes:"Parabolic Dishes",DoYouReallyWantToRemoveAllParabolicDishesOnFoundation:"Do you really want to remove all the parabolic dishes on this foundation that are not locked",FresnelReflectors:"Fresnel Reflectors",DoYouReallyWantToRemoveAllFresnelReflectorsOnFoundation:"Do you really want to remove all the Fresnel reflectors on this foundation that are not locked",Heliostats:"Heliostats",DoYouReallyWantToRemoveAllHeliostatsOnFoundation:"Do you really want to remove all the heliostats on this foundation that are not locked",WindTurbines:"Wind Turbines",DoYouReallyWantToRemoveAllWindTurbinesOnFoundation:"Do you really want to remove all the wind turbines on this foundation that are not locked",Sensors:"Sensores",DoYouReallyWantToRemoveAllSensorsOnFoundation:"Estás seguro que quieres eliminar todos los sensores de esta base",Lights:"Lights",DoYouReallyWantToRemoveAllLightsOnFoundation:"Do you really want to remove all the lights on this foundation that are not locked",Walls:"Paredes",DoYouReallyWantToRemoveAllWallsOnFoundation:"Estás seguro que quieres eliminar todas las paredes de esta base that are not locked",Windows:"Windows",DoYouReallyWantToRemoveAllWindowsOnFoundation:"Do you really want to remove all the windows on this foundation that are not locked",Doors:"Doors",DoYouReallyWantToRemoveAllDoorsOnFoundation:"Do you really want to remove all the doors on this foundation that are not locked",Polygons:"Polígonos",DoYouReallyWantToRemoveAllPolygonsOnFoundation:"Estás seguro que quieres eliminar todos los polígonos de esta base that are not locked",Humans:"Humans",DoYouReallyWantToRemoveAllHumansOnFoundation:"Do you really want to remove all the humans on this foundation who are not locked",Trees:"Trees",DoYouReallyWantToRemoveAllTreesOnFoundation:"Do you really want to remove all the trees on this foundation that are not locked",Flowers:"Flowers",DoYouReallyWantToRemoveAllFlowersOnFoundation:"Do you really want to remove all the flowers on this foundation that are not locked",OnlyThisFoundation:"Solamente esta base",AllConnectedFoundations:"Todas las bases conectadas",AllSelectedFoundations:"All Selected Foundations",AllFoundations:"Todas las bases",AddPolygon:"Añadir polígono",SolarStructure:"Solar Structure",GroupMaster:"Group Master",LockAllUnlockedElementsOnThisFoundation:"Lock All Unlocked Elements on This Foundation",UnlockAllLockedElementsOnThisFoundation:"Unlock All Locked Elements on This Foundation",GroundFloorRValue:"Ground Floor R-Value",OnlyThisGroundFloor:"Only This Ground Floor",AllGroundFloors:"All Ground Floors"},solarPowerTowerMenu:{ReceiverTowerForHeliostats:"Receiver Tower for Heliostats",ReceiverTowerPhysicalProperties:"Physical Properties of Receiver Tower",ReceiverTowerHeight:"Height of Receiver Tower",ReceiverTowerRadius:"Radius of Receiver Tower",ReceiverAbsorptance:"Absorptance of Receiver",ReceiverOpticalEfficiency:"Optical Efficiency of Receiver",ReceiverThermalEfficiency:"Thermal Efficiency of Receiver"},solarAbsorberPipeMenu:{AbsorberPipeForFresnelReflectors:"Absorber Pipe for Fresnel Reflectors",AbsorberPipePhysicalProperties:"Physical Properties of Absorber Pipe",AbsorberHeight:"Height of Absorber Pipe",AbsorberApertureWidth:"Aperture Width of Absorber Pipe",AbsorberPipePoleNumber:"Pole Number for Absorber Pipe",AbsorberAbsorptance:"Absorptance of Absorber",AbsorberOpticalEfficiency:"Optical Efficiency of Absorber",AbsorberThermalEfficiency:"Thermal Efficiency of Absorber"},solarUpdraftTowerMenu:{SolarUpdraftTower:"Solar Updraft Tower",SolarUpdraftTowerPhysicalProperties:"Physical Properties of Solar Updraft Tower",SolarUpdraftTowerChimneyHeight:"Solar Updraft Tower Chimney Height",SolarUpdraftTowerChimneyRadius:"Solar Updraft Tower Chimney Radius",SolarUpdraftTowerCollectorHeight:"Solar Updraft Tower Collector Height",SolarUpdraftTowerCollectorRadius:"Solar Updraft Tower Collector Radius",SolarUpdraftTowerCollectorTransmissivity:"Solar Updraft Tower Collector Transmissivity",SolarUpdraftTowerCollectorEmissivity:"Solar Updraft Tower Collector Emissivity",SolarUpdraftTowerDischargeCoefficient:"Solar Updraft Tower Discharge Coefficient",SolarUpdraftTowerTurbineEfficiency:"Solar Updraft Tower Turbine Efficiency"},cuboidMenu:{Texture01:"Textura 1",Texture02:"Textura 2",Texture03:"Textura 3",Texture04:"Textura 4",Texture05:"Textura 5",Texture06:"Textura 6",Texture07:"Textura 7",Texture08:"Textura 8",Texture09:"Textura 9",Texture10:"Textura 10",RemoveAllUnlockedSolarPanels:"Eliminar todos los paneles solares",RemoveAllUnlockedSensors:"Eliminar todos los sensores",RemoveAllUnlockedPolygons:"Eliminar todos los polígonos",RemoveAllUnlockedHumans:"Remove All Humans",RemoveAllUnlockedTrees:"Remove All Trees",RemoveAllUnlockedFlowers:"Remove All Unlocked Flowers",RemoveAllUnlockedLights:"Remove All Unlocked Lights",Racks:"Rejillas",Lights:"Lights",DoYouReallyWantToRemoveAllLightsOnCuboid:"Do you really want to remove all the lights on this cuboid that are not locked",SolarPanels:"Paneles solares",DoYouReallyWantToRemoveAllSolarPanelsOnCuboid:"Estás seguro que quieres eliminar todos los paneles solares de este cuboide that are not locked",Sensors:"Sensores",DoYouReallyWantToRemoveAllSensorsOnCuboid:"Estás seguro que quieres eliminar todos los sensores de este cuboide that are not locked",Polygons:"Polígonos",DoYouReallyWantToRemoveAllPolygonsOnCuboid:"Estás seguro que quieres eliminar todos los polígonos de este cuboide that are not locked",Humans:"Humans",DoYouReallyWantToRemoveAllHumansOnCuboid:"Do you really want to remove all the humans on this cuboid who are not locked",Trees:"Trees",DoYouReallyWantToRemoveAllTreesOnCuboid:"Do you really want to remove all the trees on this cuboid that are not locked",Flowers:"Flowers",DoYouReallyWantToRemoveAllFlowersOnCuboid:"Do you really want to remove all the flowers on this cuboid that are not locked",OnlyThisCuboid:"Solamente este cuboide",AllCuboidsOnSameSurface:"All Cuboids on Same Surface",AllCuboidsAboveSameBase:"All Cuboids above Same Base",AllSelectedCuboids:"All Selected Cuboids",AllCuboids:"Todos los cuboides",OnlyThisSide:"Solamente este lado",AllSidesOfThisCuboid:"Todos los lados en este cuboide",AllSidesOfSelectedCuboids:"All Sides of Selected Cuboids",AllSidesOfAllCuboids:"Todos los lados en todos los cuboides",AddPolygon:"Añadir polígono",Stackable:"Stackable",GroupMaster:"Group Master"},polygonMenu:{Texture01:"Textura 1",Texture02:"Textura 2",Texture03:"Textura 3",Texture04:"Textura 4",Texture05:"Textura 5",Texture06:"Textura 6",Texture07:"Textura 7",Texture08:"Textura 8",Texture09:"Textura 9",Texture10:"Textura 10",TextBox:"Text Box",FontOutlineColor:"Font Outline Color",FontOutlineWidth:"Font Outline Width",FontStrokeColor:"Font Stroke Color",FontStrokeWidth:"Font Stroke Width",NoOutline:"No Outline",Shiny:"Shiny",Filled:"Rellenar",FillTexture:"Rellenar textura",FillColor:"Rellenar color",Opacity:"Opacity",LineColor:"Color de la línea",LineWidth:"Line Width",LineStyle:"Line Style",SolidLine:"Solid Line",DashedLine:"Dashed Line",DottedLine:"Dotted Line",InsertVertexBeforeIndex:"Añadir vértice antes del índice",InsertVertexAfterIndex:"Añadir vértice después del índice",DeleteVertex:"Eliminar vértice",OnlyThisPolygon:"Solamente este polígono",AllPolygonsOnSurface:"All Polygons on the Same Surface",AllPolygonsAboveFoundation:"Todos los polígonos sobre la base",AllSelectedPolygons:"All Selected Polygons",AllPolygons:"Todos los polígonos",Layout:"Layout",SolarPanelArrayLayout:"Solar Panel Array Layout",SolarPanelArrayLayoutParametricDesign:"Solar Panel Array Layout: Parametric Design",SolarPanelArrayLayoutGenerativeDesign:"Solar Panel Array Layout: Generative Design",SolarPanelArrayModel:"Solar Panel Model",SolarPanelArrayOrientation:"Orientation",SolarPanelArrayTiltAngle:"Tilt Angle",SolarPanelArrayRowWidth:"Row Width",SolarPanelArrayInterRowSpacing:"Inter-Row Spacing",SolarPanelArrayRowSpacing:"Row Spacing",SolarPanelArrayRowAxis:"Row Axis",SolarPanelArrayLeftRightRowAxis:"Left-Right (Relative)",SolarPanelArrayUpDownRowAxis:"Up-Down (Relative)",SolarPanelArrayEastWestRowAxis:"East-West (Absolute)",SolarPanelArrayNorthSouthRowAxis:"North-South (Absolute)",SolarPanelArrayMargin:"Margin",SolarPanelArrayPoleHeight:"Pole Height",SolarPanelArrayPoleSpacing:"Pole Spacing",SolarPanelArrayTotalYearlyCost:"Total Cost",SolarPanelArrayTotalYearlyRevenue:"Total Revenue",SolarPanelArrayTotalYearlyYield:"Total Yield",SolarPanelArrayMeanYearlyYield:"Mean Yield",SolarPanelArrayYearlyProfit:"Profit",LayoutNotAcceptedCheckYourParameters:"This layout is not accepted. Please check your parameters."},optimizationMenu:{Optimization:"Optimization",Parameters:"Parameters",Variables:"Variables",Constants:"Constants",GeneticAlgorithm:"Genetic Algorithm",GeneticAlgorithmSettings:"Genetic Algorithm Settings",ParticleSwarmOptimization:"Particle Swarm Optimization",ParticleSwarmOptimizationSettings:"Particle Swarm Optimization Settings",SolarPanelTiltAngleOptimization:"Solar Panel Tilt Angle Optimization",SolarPanelArrayLayout:"Solar Panel Array Layout",Generation:"Generation",Gene:"Gene",NormalizedVariables:"Normalized Variables",Objective:"Objective",ObjectiveFunctionDailyTotalYield:"Daily Total Yield",ObjectiveFunctionYearlyTotalYield:"Yearly Total Yield",ObjectiveFunctionDailyMeanYield:"Daily Mean Yield",ObjectiveFunctionYearlyMeanYield:"Yearly Mean Yield",ObjectiveFunctionDailyProfit:"Daily Profit",ObjectiveFunctionYearlyProfit:"Yearly Profit",GeneticAlgorithmSelectionMethod:"Genetic Algorithm Selection Method",RouletteWheel:"Roulette Wheel",Tournament:"Tournament",SearchMethod:"Search Method",GlobalSearchUniformSelection:"Global Search Uniform Selection",LocalSearchRandomOptimization:"Local Search Random Optimization",PopulationSize:"Population Size",MaximumGenerations:"Maximum Generations",SelectionRate:"Selection Rate",CrossoverRate:"Crossover Rate",MutationRate:"Mutation Rate",Step:"Step",SwarmSize:"Swarm Size",MaximumSteps:"Maximum Steps",MaximumVelocity:"Maximum Velocity",InertiaWeight:"Inertia Weight",CognitiveCoefficient:"Cognitive Coefficient",SocialCoefficient:"Social Coefficient",ConvergenceThreshold:"Convergence Threshold for Termination",LocalSearchRadius:"Local Search Radius",RowsPerRackRange:"Range for Rows per Rack",TiltAngleRange:"Range for Tilt Angle",InterRowSpacingRange:"Range for Inter-Row Spacing",ClickTargetPolygonToActivate:"Click Target Polygon to Activate",ClickTargetFoundationToActivate:"Click Target Foundation to Activate"},treeMenu:{ShowModel:"Mostrar modelo",Flip:"Flip",Type:"Tipo",Spread:"Extender"},flowerMenu:{Flip:"Flip",Type:"Type",Spread:"Spread"},peopleMenu:{ChangePerson:"Cambiar persona",Flip:"Flip",Observer:"Observer",ViewFromThisPerson:"View from This Person"},lightMenu:{Color:"Color",Intensity:"Intensity",Decay:"Decay",MaximumDistance:"Distance",Inside:"Inside"},solarCollectorMenu:{Coordinates:"Coordinates",RelativeXCoordinateOfCenter:"Relative X Coordinate of Center",RelativeYCoordinateOfCenter:"Relative Y Coordinate of Center",RelativeAzimuth:"Azimut relativa",Pole:"Pole",PoleHeight:"Altura del poste",PoleRadius:"Pole Radius",ExtraPoleHeight:"Extra Pole Height",ExtraPoleHeightInAdditionToHalfWidth:"Extra Pole Height in Addition to Half Width",DrawSunBeam:"Dibujar rayo del sol"},concentratedSolarPowerCollectorMenu:{ReflectorReflectance:"Reflector Reflectance",ReceiverAbsorptance:"Receiver Absorptance",ReflectorOpticalEfficiency:"Reflector Optical Efficiency",ReceiverThermalEfficiency:"Receiver Thermal Efficiency"},solarPanelMenu:{ElectricalProperties:"Electrical Properties",InverterEfficiency:"Inverter Efficiency",InverterEfficiencyExplained:"The efficiency for converting direct current (DC) to alternating current (AC).",DcToAcSizeRatio:"DC-to-AC Size Ratio",DcToAcSizeRatioExplained:"The ratio of the solar panels' DC-rated size to the inverter's AC-rated size.",ChangePvModel:"Cambiar modelo PV",Orientation:"Orientación",Portrait:"Vertical",Landscape:"Horizontal",FrameColor:"Frame Color",Panels:"paneles",PanelsWide:"ancho paneles",PanelsLong:"longitud paneles",TiltAngle:"Inclinar ángulo",SouthFacingIsPositive:"Orientado al sur es positivo",Tracker:"Seguidor",SolarTrackerFollowsSun:"Un seguidor sigue el sol para incrementar las salidas de los paneles solares",PoleSpacing:"Espaciado entre postes",NoTracker:"Sin seguimiento",HorizontalSingleAxisTracker:"Seguidor horizontal de eje único",VerticalSingleAxisTracker:"Seguidor vertical de eje único",AltazimuthDualAxisTracker:"Seguidor de doble eje altazimutal",OnlyThisSolarPanel:"Solamente este panel solar",AllSolarPanelsOnSurface:"Todos los paneles solares en la misma superficie",AllSolarPanelsAboveFoundation:"Todos los paneles solares sobre la misma base",AllSelectedSolarPanels:"All Selected Solar Panels",AllSolarPanels:"Todos los paneles solares"},solarWaterHeaterMenu:{OnlyThisSolarWaterHeater:"Only This Solar Water Heater",AllSolarWaterHeatersOnSurface:"All Solar Water Heaters on the Same Surface",AllSolarWaterHeatersAboveFoundation:"All Solar Water Heaters Above the Same Foundation",AllSelectedSolarWaterHeaters:"All Selected Solar Water Heaters",AllSolarWaterHeaters:"All Solar Water Heaters"},pvModelPanel:{SolarPanelSpecs:"Especificaciones del panel solar",General:"General",Electrical:"Electrical",CellCountInXDirection:"Cell Count in X Direction",CellCountInYDirection:"Cell Count in Y Direction",Weight:"Weight",Kilogram:"kg",RatedVoltage:"Rated Voltage",RatedCurrent:"Rated Current",OpenCircuitVoltage:"Open-Circuit Voltage",ShortCircuitCurrent:"Short-Circuit Current",MaximumRatedPower:"Maximum Rated Power",Model:"Modelo",PanelSize:"Tamaño del panel",Cells:"Celdas",CellType:"Tipo de celda",Monocrystalline:"Monocristalino",Polycrystalline:"Policristalino",ThinFilm:"Película delgada",Bifacial:"Bifacial",PowerBifaciality:"Power Bifaciality (Rear/Front)",Black:"Negro",Blue:"Azul",ShadeTolerance:"Tolerancia a la sombra",SolarCellEfficiency:"Eficiencia de la célula solar",NominalOperatingCellTemperature:"Temperatura nominal de la celda de funcionamiento",TemperatureCoefficientOfPmax:"Coeficiente de temperatura de Pmax",AddedCustomSolarPanels:"Added",DisplayThisCustomSolarPanel:"Display this custom solar panel",ExportThisCustomSolarPanel:"Export this custom solar panel",ImportCustomSolarPanelFromClipboard:"Import custom solar panel from clipboard",CustomSolarPanelExportedToClipboard:"Custom solar panel exported to Clipboard",DoYouReallyWantToRemoveThisCustomSolarPanel:"Do you really want to remove this custom solar panel",MakeSureThisCustomSolarPanelIsNotUsed:"Make sure this custom solar panel is not used in the current model",ThisCustomSolarPanelIsUsed:"This custom solar panel is used in the current model",DoYouReallyWantToImportCustomSolarPanel:"Do you really want to import a custom solar panel",ExistingSettingsWillBeOverwritten:"The existing settings will be overwritten",CannotAddCustomSolarPanel:"Cannot add custom solar panel",CustomSolarPanelMustHaveModelName:"A custom solar panel must have a model name",CustomSolarPanelExists:"A custom solar panel with this name already exists",FailInImportingDataFromClipboard:"Failed in importing data from the clipboard"},parabolicTroughMenu:{ModuleLength:"Module Length",Modules:"modules",ModulesLong:"modules long",LatusRectum:"Latus Rectum",OnlyThisParabolicTrough:"Only This Parabolic Trough",AllParabolicTroughsAboveFoundation:"All Parabolic Troughs Above the Same Foundation",AllSelectedParabolicTroughs:"All Selected Parabolic Troughs",AllParabolicTroughs:"All Parabolic Troughs"},fresnelReflectorMenu:{AbsorberPipe:"Absorber Pipe",SelectAbsorberToReflectSunlightTo:"Select Absorber to Reflect Sunlight to",ModuleLength:"Module Length",Modules:"modules",ModulesLong:"modules long",OnlyThisFresnelReflector:"Only This Fresnel Reflector",AllFresnelReflectorsAboveFoundation:"All Fresnel Reflectors Above the Same Foundation",AllSelectedFresnelReflectors:"All Selected Fresnel Reflectors",AllFresnelReflectors:"All Fresnel Reflectors"},heliostatMenu:{Tower:"Tower",SelectTowerToReflectSunlightTo:"Select Tower to Reflect Sunlight to",OnlyThisHeliostat:"Only This Heliostat",AllHeliostatsAboveFoundation:"All Heliostats Above the Same Foundation",AllSelectedHeliostats:"All Selected Heliostats",AllHeliostats:"All Heliostats"},parabolicDishMenu:{ReceiverStructure:"Receiver Structure",CentralPole:"Central Pole",CentralPoleWithTripod:"Central Pole with Tripod",Quadrupod:"Quadrupod",RimDiameter:"Rim Diameter",LatusRectum:"Latus Rectum",ExtraPoleHeightInAdditionToRadius:"Extra Pole Height in Addition to Radius",OnlyThisParabolicDish:"Only This Parabolic Dish",AllParabolicDishesAboveFoundation:"All Parabolic Dishes Above the Same Foundation",AllSelectedParabolicDishes:"All Selected Parabolic Dishes",AllParabolicDishes:"All Parabolic Dishes"},windTurbineMenu:{BirdSafeDesign:"Bird-Safe Design",BirdSafeNone:"None",BirdSafeBicolor:"Bicolor",BirdSafeStriped:"Striped",Rotor:"Rotor",BladeNumber:"Blade Number",RotorInitialAngle:"Rotor Initial Angle",RotorBladeDesign:"Rotor Blade Design",RotorBladeRadius:"Rotor Blade Radius",RotorBladePitchAngle:"Rotor Blade Pitch Angle",RelativeYawAngle:"Relative Yaw Angle",MaximumChordLength:"Maximum Chord Length",Tower:"Tower",TowerHeight:"Tower Height",TowerRadius:"Tower Radius",HubDesign:"Hub Design",HubRadius:"Hub Radius",HubLength:"Hub Length",OnlyThisWindTurbine:"Only This Wind Turbine",AllWindTurbinesAboveFoundation:"All Wind Turbines Above the Same Foundation",AllSelectedWindTurbines:"All Selected Wind Turbines",AllWindTurbines:"All Wind Turbines"},wallMenu:{TextureDefault:"Por defecto",Texture01:"Textura 1",Texture02:"Textura 2",Texture03:"Textura 3",Texture04:"Textura 4",Texture05:"Textura 5",Texture06:"Textura 6",Texture07:"Textura 7",Texture08:"Textura 8",Texture09:"Textura 9",Texture10:"Textura 10",SizeOfWall:"Tamaño de la pared",OnlyThisWall:"Solamente esta pared",AllConnectedWalls:"All Connected Walls",AllWallsAboveFoundation:"Todas las paredes sobre la misma base",AllSelectedWalls:"All Selected Walls",AllWalls:"Todo paredes",Windows:"Windows",LockAllUnlockedWindows:"Lock All Unlocked Windows",UnlockAllLockedWindows:"Unlock All Locked Windows",RemoveAllUnlockedWindows:"Remove All Unlocked Windows",DoYouReallyWantToRemoveAllWindowsOnThisWall:"Do you really want to remove all the windows on this wall",Doors:"Doors",LockAllUnlockedDoors:"Lock All Unlocked Doors",UnlockAllLockedDoors:"Unlock All Locked Doors",RemoveAllUnlockedDoors:"Remove All Unlocked Doors",DoYouReallyWantToRemoveAllDoorsOnThisWall:"Do you really want to remove all the doors on this wall",SolarPanels:"Solar Panels",LockAllUnlockedSolarPanels:"Lock All Unlocked Solar Panels",UnlockAllLockedSolarPanels:"Unlock All Locked Solar Panels",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",DoYouReallyWantToRemoveAllSolarPanelsOnThisWall:"Do you really want to remove all the solar panels on this wall",Sensors:"Sensors",LockAllUnlockedSensors:"Lock All Unlocked Sensors",UnlockAllLockedSensors:"Unlock All Locked Sensors",RemoveAllUnlockedSensors:"Remove All Unlocked Sensors",DoYouReallyWantToRemoveAllSensorsOnThisWall:"Do you really want to remove all the sensors on this wall",Lights:"Lights",LockAllUnlockedLights:"Lock All Unlocked Lights",UnlockAllLockedLights:"Unlock All Locked Lights",RemoveAllUnlockedLights:"Remove All Unlocked Lights",DoYouReallyWantToRemoveAllLightsOnThisWall:"Do you really want to remove all the lights on this wall",Polygons:"Polygons",LockAllUnlockedPolygons:"Lock All Unlocked Polygons",UnlockAllLockedPolygons:"Unlock All Locked Polygons",RemoveAllUnlockedPolygons:"Eliminar todos los polígonos",DoYouReallyWantToRemoveAllPolygonsOnThisWall:"Do you really want to remove all the polygons on this wall",WallStructure:"Wall Structure",DefaultStructure:"Default",StudStructure:"Stud",PillarStructure:"Pillar",Opacity:"Opacity",StructureSpacing:"Structure Spacing",StructureWidth:"Structure Width",StructureThickness:"Structure Thickness",StructureColor:"Structure Color",Color:"Wall Color",Height:"Altura",Thickness:"Thickness",Texture:"Texture",AllLightsOnWallInside:"All Lights on Wall Inside",AllLightsOnWallOutside:"All Lights on Wall Outside",Fill:"Fill",Full:"Full",Partial:"Partial",Empty:"Empty",OpenToOutside:"Open to Outside",EavesLength:"Eaves Overhang Length",Parapet:"Parapet",ParapetColor:"Parapet Color",ParapetTexture:"Parapet Texture",ParapetHeight:"Parapet Height",CopingsHeight:"Copings Height",CopingsWidth:"Copings Width"},windowMenu:{OnlyThisWindow:"Only This Window",AllWindowsOnSurface:"All Windows on the Same Surface",AllWindowsAboveFoundation:"All Windows Above the Same Foundation",AllSelectedWindows:"All Selected Windows",AllWindows:"All Windows",Width:"Ancho",Height:"Altura",Setback:"Setback from Exterior Surface",RelativeToWallThickness:"Relative to wall thickness",Mullion:"Mullion",HorizontalMullion:"Horizontal Mullion",VerticalMullion:"Vertical Mullion",MullionWidth:"Mullion Width",HorizontalMullionSpacing:"Horizontal Mullion Spacing",VerticalMullionSpacing:"Vertical Mullion Spacing",MullionColor:"Mullion Color",Tint:"Tint",Opacity:"Opacity",SolarHeatGainCoefficient:"Solar heat gain coefficient (SHGC) = 1 - opacity",Shutter:"Shutter",LeftShutter:"Left Shutter",RightShutter:"Right Shutter",BothShutters:"Both Shutters",ShutterWidth:"Relative Width",ShutterColor:"Shutter Color",Frame:"Frame",FrameWidth:"Frame Width",SillWidth:"Sill Width",Color:"Frame Color",WindowType:"Window Type",Default:"Default",Arched:"Arched",Polygonal:"Polygonal",Interior:"Interior",Empty:"Empty"},roofMenu:{TextureDefault:"Por defecto",Texture01:"Textura 1",Texture02:"Textura 2",Texture03:"Textura 3",Texture04:"Textura 4",Texture05:"Textura 5",Texture06:"Textura 6",Texture07:"Textura 7",OnlyThisRoof:"Only This Wall",AllRoofsAboveFoundation:"All Walls Above the Same Foundation",AllSelectedRoofs:"All Selected Roofs",AllRoofs:"All Roofs",OnlyThisCeiling:"Only This Ceiling",AllCeilingsAboveFoundation:"All Ceilings Above the Same Foundation",AllCeilings:"All Ceilings",EavesOverhangLength:"Eaves Overhang Length",RafterSpacing:"Rafter Spacing",RafterWidth:"Rafter Width",RafterThickness:"Rafter Thickness",RafterColor:"Rafter Color",RoofColor:"Roof Color",RoofSideColor:"Roof Side Color",GlassTint:"Glass Tint",Opacity:"Opacity",RoofStructure:"Roof Structure",DefaultStructure:"Default",RafterStructure:"Rafter",GlassStructure:"Glass",SolarPanels:"Solar Panels",LockAllUnlockedSolarPanels:"Lock All Unlocked Solar Panels",UnlockAllLockedSolarPanels:"Unlock All Locked Solar Panels",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",DoYouReallyWantToRemoveAllSolarPanelsOnThisRoof:"Do you really want to remove all the solar panels on this roof",Windows:"Windows",LockAllUnlockedWindows:"Lock All Unlocked Windows",UnlockAllLockedWindows:"Unlock All Locked Windows",RemoveAllUnlockedWindows:"Remove All Unlocked Windows",DoYouReallyWantToRemoveAllWindowsOnThisRoof:"Do you really want to remove all the windows on this roof",Sensors:"Sensors",LockAllUnlockedSensors:"Lock All Unlocked Sensors",UnlockAllLockedSensors:"Unlock All Locked Sensors",RemoveAllUnlockedSensors:"Remove All Unlocked Sensors",DoYouReallyWantToRemoveAllSensorsOnThisRoof:"Do you really want to remove all the sensors on this roof",Lights:"Lights",RemoveAllUnlockedLights:"Remove All Unlocked Lights",DoYouReallyWantToRemoveAllLightsOnThisRoof:"Do you really want to remove all the lights on this roof",AllLightsOnRoofInside:"All Lights on Roof Inside",AllLightsOnRoofOutside:"All Lights on Roof Outside",Rise:"Rise",Ceiling:"Ceiling",RoofRValue:"Roof R-Value",CeilingRValue:"Ceiling R-Value"},doorMenu:{TextureDefault:"Por defecto",Texture01:"Textura 1",Texture02:"Textura 2",Texture03:"Textura 3",Texture04:"Textura 4",Texture05:"Textura 5",Texture06:"Textura 6",Texture07:"Textura 7",Texture08:"Textura 8",Texture09:"Textura 9",Texture10:"Textura 10",Texture11:"Textura 11",Texture12:"Textura 12",Texture13:"Textura 13",Texture14:"Textura 14",Texture15:"Textura 15",Texture16:"Textura 16",Texture17:"Textura 17",OnlyThisDoor:"Only This Door",AllDoorsOnWall:"All Doors on the Same Wall",AllDoorsAboveFoundation:"All Doors Above the Same Foundation",AllSelectedDoors:"All Selected Doors",AllDoors:"All Doors",DoorType:"Door Type",Default:"Default",Arched:"Arched",Filled:"Filled",FrameColor:"Frame Color",Interior:"Interior"},siteInfoPanel:{High:"Alto",Low:"Bajo"},designInfoPanel:{NumberOfSelectedHeliostats:"Number of selected heliostats",NumberOfSelectedSolarPanels:"Number of selected solar panels",ElectricityGeneratedDailyBySolarPanels:"Electricity generated daily by these solar panels",SceneDiameter:"Scene diameter",BuildingArea:"Building area"},visualizationControlPanel:{ColorContrast:"Color Contrast",FluxScale:"Flux Scale",ClickUpOrDownArrowButtonsToChange:"Click up or down arrow buttons to change"},instructionPanel:{Rotate:"Rotar",DragMouse:"Arrastrar el ratón",Zoom:"Zoom",MouseWheelOrKeys:"Girar el mouse o presionar Ctrl+[ o Ctrl+]",MouseWheelOrKeysMac:"Girar el mouse o presionar ⌘+[ o ⌘+]",Pan:"Panorámica",HoldCtrlDragMouse:"Mantener Ctrl y mover el ratón",HoldMetaDragMouse:"Hold ⌘ and drag mouse",Enter2DMode:"Enter 2D mode",Exit2DMode:"Exit 2D mode",NavigationMode:"Navigation mode",EnableNavigation:"Enable navigation",DisableNavigation:"Disable navigation",MoveForwardBack:"Move forward/back",MoveForwardBackInstruction:"Press W/S",MoveLeftRight:"Move left/right",MoveLeftRightInstruction:"Press A/D",MoveUpDown:"Move up/down",MoveUpDownInstruction:"Press Z/X",Turn:"Turn",TurnInstruction:"Press arrow keys",ResetView:"Reset",AutoRotate:"Auto rotar",StartOrStop:"Presiona F4 para empezar o parar"},mapPanel:{ImageOnGround:"Imagen en el suelo",HideAddress:"Hide Address",WeatherStations:"Weather Stations",WeatherStationsNote:"Turn this off to speed up",Coordinates:"Coordenadas",Zoom:"Zoom"},visibilityPanel:{SolarPanelVisibility:"Solar Panel Visibility",Observer:"Observer",VantagePoint:"Vantage Point",ItemizedVisibilityByFields:"Itemized by Fields",TotalVisibility:"Total"},sensorPanel:{LightSensor:"Sensor de luz",WeatherDataFrom:"Datos metereológicos de"},buildingEnergyPanel:{DailyBuildingEnergy:"Daily Building Energy",YearlyBuildingEnergy:"Yearly Building Energy",Heater:"Heater",AC:"AC",SolarPanel:"Solar Panel",Net:"Net"},solarPanelYieldPanel:{SolarPanelDailyYield:"Rendimiento diario del panel solar",SolarPanelYearlyYield:"Rendimiento anual del panel solar",Yield:"Rendimiento",YieldPerHour:"Rendimiento por hora",DailyTotal:"Total diario",YearlyTotal:"Total anual",ShowOutputsOfIndividualSolarPanels:"Mostrar salidas de paneles solares individuales",Profit:"Profit",TotalCost:"Total Cost",TotalRevenue:"Total Revenue",TotalYield:"Total Yield",MeanYield:"Mean Yield",ModuleCount:"Module Count"},parabolicTroughYieldPanel:{ParabolicTroughDailyYield:"Parabolic Trough Daily Yield",ParabolicTroughYearlyYield:"Parabolic Trough Yearly Yield",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualParabolicTroughs:"Show outputs of individual parabolic troughs"},parabolicDishYieldPanel:{ParabolicDishDailyYield:"Parabolic Dish Daily Yield",ParabolicDishYearlyYield:"Parabolic Dish Yearly Yield",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualParabolicDishes:"Show outputs of individual parabolic dishes"},fresnelReflectorYieldPanel:{FresnelReflectorDailyYield:"Fresnel Reflector Daily Yield",FresnelReflectorYearlyYield:"Fresnel Reflector Yearly Yield",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualFresnelReflectors:"Show outputs of individual Fresnel feflectors"},heliostatYieldPanel:{HeliostatDailyYield:"Heliostat Daily Yield",HeliostatYearlyYield:"Heliostat Yearly Yield",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualHeliostats:"Show outputs of individual heliostats"},updraftTowerYieldPanel:{UpdraftTowerDailyYield:"Solar Updraft Tower Daily Yield",UpdraftTowerYearlyYield:"Solar Updraft Tower Yearly Yield",ChimneyAirTemperature:"Chimney Air Temperature",ChimneyWindSpeed:"Chimney Wind Speed",Yield:"Yield",YieldPerHour:"Yield per Hour",DailyTotal:"Daily Total",YearlyTotal:"Yearly Total",ShowOutputsOfIndividualUpdraftTowers:"Show outputs of individual updraft towers"},heliodonPanel:{SunAndTimeSettings:"Sun & Time Settings",SunAngles:"Ángulos",TwentyFourHours:"24 Hours"},cloudFilePanel:{CopyTitle:"Copy Title",TitleCopiedToClipBoard:"The title was copied to the clip board",SearchByTitle:"Search by title",MyLikes:"My Likes",MyCloudFiles:"Mis archivos en la nube",GenerateLink:"Generar enlace",LinkGeneratedInClipBoard:"Se ha generado un enlace en el portapapeles",DoYouReallyWantToDelete:"Estás seguro que quieres eliminar",IfSharedOrPublishedRenamingFileBreaksExistingLinks:"If this file has been shared or published, renaming it breaks existing links"},projectListPanel:{CopyTitle:"Copy Title",TitleCopiedToClipBoard:"The title was copied to the clip board",SearchByTitle:"Search by title",MyProjects:"My Projects",GenerateProjectLink:"Generate Project Link",ProjectLinkGeneratedInClipBoard:"A link to the project was generated in the clip board",DoYouReallyWantToDeleteProject:"Do you really want to delete Project",IfSharedOrPublishedRenamingProjectBreaksExistingLinks:"If this project has been shared or published, renaming it breaks existing links"},projectPanel:{ProjectSettings:"Project Settings",ThumbnailImageSize:"Thumbnail Image Size",ProjectByOtherPeople:"Project by Other People",Project:"Project",ProjectType:"Type",ProjectDescription:"Description",MakeDescriptionEditable:"Make this description editable",MakeDescriptionNonEditable:"Make this description non-editable",DoubleClickToMakeDescriptionEditable:"Double-click to make this description editable",SolarPanelArray:"Solar Panel Array",CurateCurrentDesign:"Curate current design",UpdateSelectedDesign:"Update selected design",RemoveSelectedDesign:"Remove selected design",ClickToFlipSortingOrder:"Click to flip the sorting order",DesignNotShownInSolutionSpaceClickToShow:"This design is not shown in solution space; click to show",DesignShownInSolutionSpaceClickToHide:"This design is shown in solution space; click to hide",SolutionSpace:"Solution Space",ChooseSolutionSpace:"Choose solution space",ChooseDataColoring:"Choose data coloring",SameColorForAllDesigns:"Same color for all designs",OneColorForEachDesign:"One color for each design",SolutionSpaceScreenshot:"Take a screenshot of the solution space",ScatterPlotScreenshot:"Take a screenshot of the scatter plot",SingleClickToSelectDoubleClickToOpen:"Single-click to select, double-click to open.",SingleClickToDeselectDoubleClickToOpen:"Single-click to deselect, double-click to open.",GenerateScatterPlot:"Generate Scatter Plot",SelectXAxis:"Select X Axis",SelectYAxis:"Select Y Axis"},accountSettingsPanel:{MyAccountSettings:"Configuración de mi cuenta",MyID:"My 🆔",ClickToCopyMyID:"Click to copy my ID",IDInClipBoard:"Your ID was copied and is ready to paste.",StoreMyNameInMyFilesWhenSaving:"Store my name in my files when saving",DoYouReallyWantToShowYourNameInYourFiles:"Do you really want to show your display name in your files?",SignFileDisclaimer:"If yes, your display name may be seen by anyone who can access your files.",Likes:"Likes",AllPublished:"All Published",PublishedUnderAliases:"Aliases",UserCount:"User Count",SchoolID:"School ID",ClassID:"Class ID"},weatherPanel:{SunshineHours:"Luz solar"},diurnalTemperaturePanel:{SelectAirTemperatureModel:"Select Air Temperature Model",Sinusoidal:"Sinusoidal"},economicsPanel:{EconomicsParameters:"Economics Parameters",ElectricitySellingPrice:"Electricity Selling Price",OperationalCostPerUnit:"Operational Cost per Unit",SellingPrice:"Selling Price",UnitCost:"Unit Cost"},navigationPanel:{NavigationParameters:"Navigation Parameters",MinimumMoveSpeed:"Minimum Move Speed",MinimumTurnSpeed:"Minimum Turn Speed"},shadowSettingsPanel:{ShadowSettings:"Shadow Settings",ShadowCameraFarDistance:"Shadow Camera Far Distance",ShadowMapSize:"Shadow Map Size",Notes:"Notes",RefreshPageNote:"Refresh the page for the new settings to take effect.",MapSizeWarning:"A large shadow map size may cause Aladdin to crash on some computers."},yearlyLightSensorPanel:{SkyClearness:"Claridad",ShowDaylightResults:"Mostrar resultados de la luz solar",ShowSkyClearnessResults:"Mostrar resultados de claridad del cielo",ShowAverageDailySolarRadiation:"Mostrar la radiación solar diaria promedio"},analysisManager:{NoSensorForCollectingData:"Sin sensor para recopilar datos",NoSolarPanelForAnalysis:"Sin panel solar para el análisis",NoObserverForVisibilityAnalysis:"There is no observer for visibility analysis.",NoSolarWaterHeaterForAnalysis:"There is no solar water heater for analysis.",NoParabolicDishForAnalysis:"There is no parabolic dish for analysis.",NoParabolicTroughForAnalysis:"There is no parabolic trough for analysis.",NoFresnelReflectorForAnalysis:"There is no Fresnel reflector for analysis.",NoHeliostatForAnalysis:"There is no heliostat for analysis.",NoSolarUpdraftTowerForAnalysis:"There is no solar updraft tower for analysis.",NoBuildingForAnalysis:"There is no building for analysis."},toolbar:{CloudFile:"Archivo en la nube",Select:"Seleccionar",AddFoundation:"Añadir base",AddWall:"Añadir pared",AddWindow:"Añadir ventana",AddDoor:"Añadir door",AddPyramidRoof:"Add Pyramid Roof",AddGableRoof:"Add Gable Roof",AddHipRoof:"Add Hip Roof",AddGambrelRoof:"Add Gambrel Roof",AddMansardRoof:"Add Mansard Roof",AddCuboid:"Añadir Cuboid",AddSensor:"Añadir Sensor",AddSolarPanel:"Añadir Panel Solar",AddSolarWaterHeater:"Add Solar Water Heater",AddBatteryStorage:"Add Battery Storage",AddParabolicDish:"Add Parabolic Dish",AddParabolicTrough:"Add Parabolic Trough",AddFresnelReflector:"Add Fresnel Reflector",AddHeliostat:"Add Heliostat",AddWindTurbine:"Add Horizontal Axis Wind Turbine",AddVerticalAxisWindTurbine:"Add Vertical Axis Wind Turbine",AddLight:"Add Light",AddTree:"Añadir árbol",AddFlower:"Add Flower",AddPeople:"Añadir gente",DoubleClickToLockThisModeForNextAction:"Double-click to lock this mode for next action",ClickToUnlockThisModeForNextAction:"Click to unlock this mode for next action",ManipulateGroup:"Manipulate a group",ClearScene:"Clear escena",ShowSunAndTimeSettings:"Show sun and time settings",SpatialAnalysisOfEnergy:"Spatial analysis of energy",DoYouReallyWantToClearContent:"Estás seguro que quieres borrar el contenido",ClickForMoreButtons:"Click for more buttons"},tooltip:{gotoIFI:"Ver Institute for Future Intelligence",visitAladdinHomePage:"Visita la página de Aladdin",clickToOpenMenu:"Haz clic para abrir el menú principal",clickToAccessAccountSettings:"Click to access account settings"},tree:{Apple:"Apple",Birch:"Birch",Coconut:"Coconut",Dogwood:"Cerezo silvestre",Elm:"Olmo",FanPalm:"Fan Palm",Linden:"Tilo",Magnolia:"Magnolia",Maple:"Arce",Oak:"Roble",Pine:"Pino",Spruce:"Spruce"},flower:{Bellflower:"Bellflower",Boxwood:"Boxwood",CactusCombo1:"Cactus Combo 1",CactusCombo2:"Cactus Combo 2",CactusCombo3:"Cactus Combo 3",CactusCombo4:"Cactus Combo 4",Hibiscus:"Hibiscus",Hosta:"Hosta",Hydrangea:"Hydrangea",Peony:"Peony",RedRose:"Red Rose",Spirea:"Spirea",Sunflower:"Sunflower",TallBush:"Tall Bush",Tulip:"Tulip",WhiteFlower:"White Flower",YellowFlower:"Yellow Flower"},people:{Jaah:"Jaah",Jack:"Jack",Jacob:"Jacob",Jacqueline:"Jacqueline",Jade:"Jade",Jamelia:"Jamelia",James:"James",Jane:"Jane",Jaya:"Jaya",Jaye:"Jaye",Jeanette:"Jeanette",Jedi:"Jedi",Jeff:"Jeff",Jena:"Jena",Jennifer:"Jennifer",Jess:"Jess",Jett:"Jett",Jill:"Jill",Jiya:"Jiya",Joan:"Joan",Jocelyn:"Jocelyn",Joel:"Joel",Joey:"Joey",John:"John",Jonathon:"Jonathon",Jose:"Jose",Joseph:"Joseph",Joshua:"Joshua",Judd:"Judd",Judy:"Judy",Julia:"Julia",Julio:"Julio",Jumapili:"Jumapili",June:"June",Juro:"Juro",Justin:"Justin"},compass:{N:"N",S:"S",W:"W",E:"E"},month:{January:"Jan",February:"Feb",March:"Mar",April:"Apr",May:"May",June:"Jun",July:"Jul",August:"Aug",September:"Sep",October:"Oct",November:"Nov",December:"Dec"},modelsMap:{AllTime:"All Time",SearchByPublisher:"Search by publisher",SearchByLabel:"Search by label",MyPublishedModels:"My Published Models",TotalNumberOfUserPublishedModelsInSelectedPeriod:"Total number of user-published models in the selected period",AllTimeTotal:"All-time total",SortFromOldestToNewest:"Sort from oldest to newest",SortFromNewestToOldest:"Sort from newest to oldest",SitesFound:"sites found",ModelsFoundOnThisSite:"models found on this site",ShowModelsPublishedByThisAuthor:"Show the models published by this author"}}},mpt={translation:{name:{IFI:"Yarının Zekası Enstitüsü",Aladdin:"Aladdin",Tagline:"Aladdin: Açıklanabilir Yapay Zeka ile Tasarımı Yeniden Hayal Et — Yarının Zekası Enstitüsü"},cookie:{Statement:"Kabul Ete tıklayarak, iyi bir Aladdin deneyimi için çerez kullanımını kabul etmiş olursunuz.",Accept:"Kabul Et"},aboutUs:{ProductBroughtToYouBy:"Geliştiriciler",TermsOfService:"Hizmet Şartları",PrivacyPolicy:"Gizlilik Politikası",Software:"Yazılım",Content:"İçerik",Research:"Araştırma",Support:"Destek",Acknowledgment:"Onay",FundingInformation:"Ulusal Bilim Vakfı (NSF), #2105695, #2131097, ve #2301164 numaralı fon destekleriyle mevcut ürünün araştırma ve geliştirme çalışmalarına cömert bir mali kaynak sağlamıştır. Bununla birlikte üründe ifade edilen herhangi bir görüş, bulgu ve sonuç veya öneri yazarların kendi görüşleridir. NSF'nin kurumsal görüşlerini yansıtmayabilir.",Contact:"Daha fazla bilgi için lütfen Charles Xie (charles@intofuture.org) ile iletişime geçiniz.",Translators:"Çevirmenler"},word:{BrandName:"Brand Name",Name:"Name",Refresh:"Refresh",LastUpdate:"Last Update",Small:"Small",Medium:"Medium",Large:"Large",Design:"Design",Information:"Information",Type:"Type",Text:"Text",FontSize:"Font Size",FontColor:"Font Color",Model:"Model",Models:"Models",Upload:"Upload",ClickCount:"Click Count",Share:"Share",AlreadyLike:"Already like",Like:"Like",MustLogInToLike:"Must log in to like",AllRightsReserved:"Tüm Hakları Saklıdır.",MeterAbbreviation:"m",VoltAbbreviation:"V",AmpereAbbreviation:"A",WattAbbreviation:"W",Version:"Sürüm",VersionInitial:"S",Options:"Seçenekler",Maximum:"Maximum",Minimum:"Minimum",MaximumNumber:"Maksimum Sayı",MinimumNumber:"Minimum Sayı",MaximumValue:"Maksimum Değer",MinimumValue:"Minimum Değer",Or:"Veya",None:"Hiçbiri",High:"Yüksek",Partial:"Kısmi",Teacher:"Öğretmen",Class:"Sınıf",Total:"Toplam",Leaderboard:"Leaderboard",Latest:"Latest",Range:"Aralık",SIUnit:"SI Unit",USUnit:"US Unit",ThermalTransmittance:"Thermal Transmittance",ThermalResistance:"Thermal Resistance",UValue:"U-Value",RValue:"R-Value",VolumetricHeatCapacity:"Volumetric Heat Capacity",BuildingHVACSystem:"Building HVAC System",ThermostatSetpoint:"Thermostat Setpoint",TemperatureToleranceThreshold:"Tolerance Threshold",TemperatureToleranceThresholdExplanation:`Heater will not run if the lowest outside temperature of the day is higher than the setpoint minus this threshold. +AC will not run if the highest outside temperature of the day is lower than the setpoint plus this threshold.`,Press:"Tıkla",Open:"Aç",Save:"Kaydet",SaveAsImage:"Resim Olarak Kaydet",SaveAsCsv:"Save as CSV",Update:"Güncelle",Paste:"Yapıştır",Copy:"Kopyala",Cut:"Kes",Delete:"Sil",Add:"Add",Lock:"Kilitle",Translucent:"Yarı Saydam",Transparency:"Transparency",Color:"Renk",Pattern:"Pattern",Texture:"Doku",Size:"Boyut",Thickness:"Kalınlık",Yes:"Evet",No:"Hayır",OK:"Tamam",Cancel:"İptal",Apply:"Uygula",Close:"Kapat",ApplyTo:"Uygula",Run:"Çalıştır",Pause:"Duraklat",Resume:"Sürdür",Clear:"Temizle",Warning:"Uyarı",Caution:"Caution",Reminder:"Hatırlatıcı",Length:"Uzunluk",Width:"Genişlik",Height:"Yükseklik",Radius:"Yarıçap",Angle:"Açı",Azimuth:"Azimut",Coordinates:"Koordinatlar",Weather:"Hava Durumu",Show:"Göster",Animate:"Oynat",Date:"Tarih",Time:"Saat",Title:"Başlık",Owner:"Sahibi",Action:"Eylem",Rename:"Yeniden Adlandır",Location:"Konum",Latitude:"Enlem",Month:"Ay",Day:"Gün",Hour:"Saat",Daylight:"Gün Işığı",Radiation:"Işınım",Temperature:"Sıcaklık",kWh:"kWh",dollar:"dollar",MeterPerSecond:"m/s",NorthInitial:"N",SouthInitial:"S",EastInitial:"E",WestInitial:"W",Fixed:"Sabit",Elements:"Öğeler",Energy:"Energy",Unknown:"Unknown",Label:"Label",Description:"Description",NoDescription:"No description",MaximumCharacters:"Maximum characters",Author:"Author",Publisher:"Publisher",Building:"Building",ResidentialBuilding:"Residential Building",CommercialBuilding:"Commercial Building",SchoolBuilding:"School Building",TouristAttraction:"Tourist Attraction",UnderConstruction:"Under Construction",Photovoltaic:"Photovoltaic",WindPower:"Wind Power",ColocationProjects:"Colocation Projects",Anonymous:"Anonymous",Nickname:"Nickname",Pin:"Pin",Unpin:"Unpin"},shared:{NoTexture:"Doku Yok",FoundationElement:"Temel",CuboidElement:"Kübik",PolygonElement:"Poligon",SensorElement:"Sensör",SolarPanelElement:"Güneş Paneli",SolarWaterHeaterElement:"Su Isıtıcı",ParabolicDishElement:"Parabolik Çanak",ParabolicTroughElement:"Parabolik Oluk",FresnelReflectorElement:"Fresnel Reflektör",HeliostatElement:"Heliostat",WindTurbineElement:"Wind Turbine",LightElement:"Light",ElementLocked:"Kilitli",ModelType:"Model Type",OutputBreakdown:"Breakdown",MoreResults:"More Results"},message:{NewVersionAvailable:"A new version is available",CalculationMayBeSlowDoYouWantToContinue:"Calculation may be slow. Do you want to continue?",IncreaseSolarRadiationHeatmapGridCellSizeToSpeedUp:"Increase solar radiation heatmap grid cell size to speed up",ModelNotFound:"Model not found",CannotSignIn:"Oturum açılamıyor",CannotSignOut:"Çıkış yapılamıyor",YourAccountWasCreated:"Hesabınız oluşturuldu",CannotCreateAccount:"Hesap oluşturulamıyor",YourAccountSettingsWereSaved:"Hesap ayarlarınız kaydedildi.",CannotSaveYourAccountSettings:"Hesap ayarlarınız kaydedilemiyor",CannotSaveYourFileToCloud:"Dosyanız buluta kaydedilemiyor",CannotCreateNewProject:"Cannot create a new project",CannotCreateNewProjectWithoutTitle:"Cannot create a new project without a title",CannotOpenYourProjects:"Cannot open your projects",CannotOpenProject:"Cannot open the project",CannotDeleteProject:"Cannot delete the project",CannotRenameProject:"Cannot rename the project",CannotAddDesignToProject:"Cannot add this design to the project",CannotAddDesignToProjectOwnedByOthers:"Cannot add this design to a project owned by others",DesignRemovedFromProject:"The design was successfully removed from the project",CannotRemoveDesignFromProject:"Cannot remove this design from the project",CannotUpdateProject:"Cannot update the project",CannotFetchProjectData:"Cannot fetch project data",TitleUsedChooseDifferentOne:"This title has been used. Choose a different one",CloudFileWithTitleExistsDoYouWantToOverwrite:"A cloud file with the title exists. Do you want to overwrite it?",CloudFileNotFound:"Bulut dosyası bulunamadı",CannotLoadModelsOnMap:"Cannot load models on map",CannotLoadLeaderboard:"Cannot load leaderboard",CannotPublishModelOnMap:"Cannot publish model on map",CannotLikeModelFromMap:"Cannot like model from map",CannotDeleteModelFromMap:"Cannot delete model from map",ModelDeletedFromMap:"Model is deleted from map",DoYouWantToDeleteModelFromMap:"Do you want to delete the model from map?",CannotOpenCloudFile:"Bulut dosyası açılamıyor",CannotReadCloudFile:"Cannot read the cloud file",CannotWriteCloudFile:"Cannot write the cloud file",CloudFileCopied:"Cloud file copied",CannotOpenCloudFolder:"Bulut klasörünüz açılamıyor",CannotDeleteCloudFile:"Bulut dosyası silinemiyor",CannotRenameCloudFile:"Bulut dosyası yeniden adlandırılamıyor",DoYouWantToSaveChanges:"Değişiklikleri kaydetmek istiyor musunuz?",NotApplicableToSelectedAction:"Seçili eyleme uygulanamaz",ThisElementIsLocked:"Bu öğe kilitli.",ThisCannotBeUndone:"Geri alınamaz.",AzimuthOfNorthIsZero:"Kuzey yönünün azimut açısı 0 ° derecedir.",CounterclockwiseAzimuthIsPositive:"Saat yönünün tersi yönde azimut açısı pozitiftir.",SouthFacingIsZero:"South-facing is 0°",ClockwiseRotationIsPositive:"Clockwise is positive",MoveCancelledBecauseOfOverlap:"Çakışma nedeniyle taşıma iptal edildi.",MoveOutsideBoundaryCancelled:"Alan dışına çıkan taşıma iptal edildi.",RotationCancelledBecauseOfOverlap:"Çakışma nedeniyle döndürme iptal edildi.",RotationOutsideBoundaryCancelled:"Alan dışı döndürme iptal edildi.",ResizingCancelledBecauseOfOverlap:"Çakışma nedeniyle yeniden boyutlandırma iptal edildi.",ResizingOutsideBoundaryCancelled:"Alan dışında yeniden boyutlandırma iptal edildi.",CannotPasteOutsideBoundary:"Alanın dışına yapıştırılamaz.",CannotPasteBecauseOfOverlap:"Çakışma nedeniyle yapıştırılamıyor.",CannotMoveObjectTooFar:"Nesne buraya taşınamaz.",ExistingSolarPanelsWillBeRemovedBeforeApplyingNewLayout:"Yeni yerleşim düzeni uygulanmadan önce mevcut güneş panelleri kaldırılacaktır.",DoYouWantToContinue:"Devam etmek istiyor musunuz?",SolarPanelsCannotIntersectWithGround:"Güneş panelleri zeminle kesişemez.",SolarPanelsCannotOverlapWithOneAnother:"Güneş panelleri birbiriyle örtüşemez.",ScreenshotSaved:"Ekran görüntüsü kaydedildi.",CsvFileSaved:"A CSV file was saved.",SimulationStarted:"Simülasyon başladı.",SimulationCompleted:"Simülasyon tamamlandı.",SimulationAborted:"Simülasyon iptal edildi.",SimulationPaused:"Simülasyon duraklatıldı.",CancelSimulation:"Simülasyonu iptal et",PauseSimulation:"Simülasyonu duraklat",ResumeSimulation:"Simülasyonu devam ettir",SimulationWillNotStartDueToErrors:"Simulation will not start due to errors",SimulationWillStartDespiteWarnings:"Simulation will start despite warnings.",EvolutionStarted:"Evrim başladı.",EvolutionCompleted:"Evrim tamamlandı.",EvolutionAborted:"Evrim iptal edildi.",EvolutionPaused:"Evrim duraklatıldı.",EncounterEvolutionError:"Evrim hatasıyla karşılaşıldı.",CancelEvolution:"Evrimi iptal et",PauseEvolution:"Evrimi duraklat",ResumeEvolution:"Evrime devam et",ConvergenceThresholdHasBeenReached:"Yakınsama eşiğine ulaşıldı.",MaximumNumberOfGenerationsHasBeenReached:"Maksimum nesil sayısına ulaşıldı.",MaximumNumberOfStepsHasBeenReached:"Maksimum adım sayısına ulaşıldı.",ObjectiveFunctionTypeError:"Geçerli işlev desteklenmiyor. Lütfen menüden başlatınız.",WallsAreNotAtSameHeight:"Walls are not at same height.",WallsAreNotPerpendicular:"Walls are not perpendicular.",WallsAreNotConnected:"Walls are not connected.",WallsNumberNeedToBeFour:"The number of walls needs to be four.",BuildingContainsEmptyWall:"Building contains one or more empty wall.",BuildingRoofMissing:"Building has a missing roof.",UnknownErrors:"Unknown errors.",SigningOutAnonymousAccount:"Are you sure you want to sign out? This anonymous account will be lost."},menu:{AnalysisOptions:"Analiz Seçenekleri",option:{GridCellSize:"Hücre Boyutu",SamplingFrequency:"Örneklem Frekansı",TimesPerHour:"x 1/saat",DaysPerYear:"Gün Sayısı / Yıl"},mainMenu:"Ana Menü",cloudMenu:"Bulut Menüsü",projectSubMenu:"Project",project:{CreateNewProject:"Create New Project",OpenProject:"Open Project",SaveProject:"Save Project",SaveProjectAs:"Save Project As",YouMustLogInToCreateProject:"You must log in to create a new project",YouMustLogInToOpenProject:"You must log in to open a project"},fileSubMenu:"Dosya",file:{CreateNewFile:"Yeni Dosya Oluştur",OpenLocalFile:"Yerel Dosya Aç",SaveAsLocalFile:"Yerel Dosya Olarak Kaydet",SavingAbortedMustHaveValidFileName:"Kaydetme iptal edildi! Geçerli bir dosya adı kullanınız.",OpenCloudFile:"Bulut Dosyası Aç",SaveCloudFile:"Bulut Dosyasını Kaydet",SaveAsCloudFile:"Bulut Dosyası Olarak Kaydet",SavingAbortedMustHaveValidTitle:"Kaydetme iptal edildi! Dosya adı geçersiz!",ToSaveYourWorkPleaseSignIn:"Çalışmanızı kaydetmek için lütfen oturum açınız.",TakeScreenshot:"Ekran görüntüsü al",UseCloudFileName:"Bulut Dosya Adını Kullan",PublishOnModelsMap:"Publish on Models Map",PublishedOnModelsMap:"Your model has been published on the Models Map",UpdatedOnModelsMap:"Your model has been updated on the Models Map",YouMustLogInToPublishYourModel:"You must log in to publish your model",YouCannotPublishAModelThatYouDoNotOwn:"You cannot publish a model that you do not own",YouMustSaveModelOnCloudBeforePublishingIt:"You must save the model on the cloud before publishing it"},editSubMenu:"Düzen",edit:{Undo:"Geri Al",Redo:"Yinele"},viewSubMenu:"Görünüm",view:{NavigationView:"Navigation View",TwoDimensionalView:"2D",ResetView:"Yenile",ZoomIn:"Yaklaş",ZoomOut:"Uzaklaş",AutoRotate:"Otomatik Döndür",ShowShadow:"Gölge",ShowSurfaceShininess:"Show Surface Shininess",TranslucentFloatingWindows:"Yüzer Pencere",accessoriesSubMenu:"Accessories",accessories:{SiteInformation:"Konum Bilgisi",DesignInformation:"Izgara Hücre Sayısı",Instruction:"Yardım",StickyNote:"Notlar",Note:"Notlar"}},settingsSubMenu:"Settings",settings:{WeatherData:"Hava Durumu",DiurnalTemperature:"Günlük Sıcaklık",Heliodon:"Heliodon",SunAndTime:"Güneş & Zaman",CustomSolarPanels:"Custom Solar Panels",CustomizeSolarPanel:"Customize Solar Panel"},benchmarksSubMenu:"Deneysel",benchmarks:{SolarRadiationPredictionVsMeasurement:"Güneş Işınım Tahmini Vs. Ölçümü ",BESTESTCase600:"Building Energy Simulation Test: BESTEST Case 600",BESTESTCase610:"Building Energy Simulation Test: BESTEST Case 610",BESTESTCase620:"Building Energy Simulation Test: BESTEST Case 620",BESTESTCase630:"Building Energy Simulation Test: BESTEST Case 630"},graph:{LineWidth:"Çizgi Kalınlığı",SymbolSize:"Sembol Boyutu",BarCategoryGap:"Bar Category Gap",ShowHorizontalGridLines:"Yatay Izgara Çizgilerini Göster",ShowVerticalGridLines:"Dikey Izgara Çizgilerini Göster"},analysisSubMenu:"Analiz",physicsSubMenu:"Fizik",physics:{DailySolarRadiationHeatmap:"Günlük Isı Haritası",SolarRadiationHeatmapOptions:"Isı Haritası Seçenekleri",SolarRadiationHeatmapGridCellSize:"Hücre Boyutu",SolarRadiationHeatmapMaxValue:"Işınım Maksimum Değer",SolarRadiationHeatmapNoAnimation:"Animasyon Yok",ReflectionHeatmap:"Yansıma Isı Haritası"},sensorSubMenu:"Sensörler",sensor:{CollectDailyData:"Günlük Veri Topla",CollectYearlyData:"Yıllık Veri Topla",SensorSimulationNoAnimation:"Animasyon Yok"},buildingSubMenu:"Building",building:{AnalyzeDailyBuildingEnergy:"Analyze Daily Building Energy",AnalyzeYearlyBuildingEnergy:"Analyze Yearly Building Energy",EnergyAnalysisOptions:"Energy Analysis Options",EnergyGridCellSize:"Energy Grid Cell Size",BuildingEnergySimulationNoAnimation:"No Animation for Building Energy Simulation"},solarPanelSubMenu:"Güneş Panelleri",solarPanel:{AnalyzeDailyYield:"Günlük Üretim Analizi",AnalyzeYearlyYield:"Yıllık Üretim Analizi",AnalyzeVisibility:"Görünüm Analizi",PanelDiscretization:"Panel Ayrıklaştırma",Exact:"Kesin",Approximate:" Yaklaşık",EnergyGridCellSize:"Hücre Boyutu",VisibilityGridCellSize:"Hücre Boyutu",EnergyAnalysisOptions:"Enerji Analiz Seçenekleri",VisibilityAnalysisOptions:"Görünüm Analiz Seçenekleri",SolarPanelSimulationNoAnimation:"Animasyon Yok"},parabolicTroughSubMenu:"Parabolik Oluk",parabolicTrough:{AnalyzeDailyYield:"Günlük Üretim Analizi",AnalyzeYearlyYield:"Yıllık Üretim Analizi"},parabolicDishSubMenu:"Parabolik Çanak",parabolicDish:{AnalyzeDailyYield:"Günlük Üretim Analizi",AnalyzeYearlyYield:"Yıllık Üretim Analizi"},fresnelReflectorSubMenu:"Fresnel Yansıtıcı",fresnelReflector:{AnalyzeDailyYield:"Günlük Üretim Analizi",AnalyzeYearlyYield:"Yıllık Üretim Analizi"},heliostatSubMenu:"Heliostat",heliostat:{AnalyzeDailyYield:"Günlük Üretim Analizi",AnalyzeYearlyYield:"Yıllık Üretim Analizi"},solarUpdraftTowerSubMenu:"Solar Updraft Kulesi",solarUpdraftTower:{AnalyzeDailyYield:"Günlük Üretim Analizi",AnalyzeYearlyYield:"Yıllık Üretim Analizi",SolarUpdraftTowerSimulationNoAnimation:"Animasyon Yok"},tutorialsSubMenu:"Öğrenme Merkezi",solarEnergyScienceSubMenu:"Güneş Bilimi",solarEnergyScienceTutorials:{SunAngles:"Gözlemciye Göre Güneş Açıları",InsolationAndClimate:"Güneşlenme ve İklim",SolarRadiationToBox:"Kutu Güneş Işınımı"},buildingScienceSubMenu:"Building Science",buildingScienceTutorials:{ThermalEnvelopeVsBuildingEnvelope:"Thermal Envelope vs. Building Envelope",EffectOfSizeOnBuildingEnergy:"Effect of Size on Building Energy",EffectOfOrientationOnBuildingEnergy:"Effect of Orientation on Building Energy",EffectOfInsulationOnBuildingEnergy:"Effect of Insulation on Building Energy",EffectOfRoofColorOnBuildingEnergy:"Effect of Roof Color on Building Energy",EffectOfEavesOverhangLengthOnBuildingEnergy:"Effect of Eaves Overhang Length on Building Energy",EffectOfWindowSHGCOnBuildingEnergy:"Effect of Window Solar Heat Gain on Building Energy",EffectOfThermostatSetpointOnBuildingEnergy:"Effect of Thermostat Setpoint on Building Energy",EffectOfSolarPanelsOnBuildingEnergy:"Effect of Solar Panels on Building Energy",EffectOfGroundTemperatureOnBuildingEnergy:"Effect of Ground Temperature on Building Energy",EffectOfTreesOnBuildingEnergy:"Effect of Trees on Building Energy"},buildingDesignSubMenu:"Bina Tasarımı",buildingDesignTutorials:{CapeCodStyleHouseWithShedDormer:"Çatı Pencereli Cape Cod Evi",MansardRoofWithDormers:"Mansard Roof with Dormers",GableRoofVsHipRoof:"Beşik Çatı vs. Kırma Çatı",ColonialVsSaltbox:"Koloni vs. Tuz Kutusu",GambrelRoofVsMansardRoof:"Flemenk Çatı vs. Mansart Çatı",CombinationRoofVsBonnetRoof:"Combination Roof vs. Bonnet Roof",DutchGableRoof:"Dutch Gable Roof",GableAndValleyRoof:"Gable and Valley Roof",ClerestoryRoof:"Clerestory Roof",MonitorRoof:"Monitor Roof",AFrameHouse:"A-Frame House",HalfTimberedHouse:"Half-Timbered House",AllBasicRoofTypes:"Tüm Çatı Tipleri"},photovoltaicSolarPowerSubMenu:"Fotovoltaik Güneş Enerjisi",photovoltaicSolarPowerTutorials:{EffectOfTiltAngleOfSolarPanel:"Güneş Paneli Eğim Açısı Etkisi",EffectOfAzimuthOfSolarPanel:"Güneş Paneli Azimut Açısı Etkisi",SolarPanelTypes:"Solar Panel Types",DefineYourOwnSolarPanels:"Define Your Own Solar Panels",VerticalBifacialSolarPanels:"Vertical Bifacial Solar Panels",CompareMonofacialAndBifacialSolarPanels:"Monofacial vs. Bifacial Solar Panels",SolarTrackers:"Güneş İzleyiciler",CoveringGroundWithSolarPanels:"Sadece güneş panellerini kullanarak yüzeyi kaplamak neden iyi bir fikir değildir?",InterRowSpacingOfSolarPanelArray:"Güneş Paneli Dizi Arası Boşluk Etkisi",EffectOfOrientationOfSolarPanels:"Güneş Panelleri Yön Etkisi",SolarPanelArrayAutomaticLayout:"Solar Panel Array Automatic Layout"},concentratedSolarPowerSubMenu:"Yoğunlaştırılmış Güneş Enerjisi",concentratedSolarPowerTutorials:{EffectOfAzimuthOfParabolicTrough:"Parabolik Oluk Azimut Açısı Etkisi",EffectOfLatusRectumOfParabolicTrough:"Parabolik Oluk Özkiriş Etkisi",FocusSunlightWithParabolicDish:"Güneş Işığını Parabolik Çanakla Odaklama",LinearFresnelReflectors:"Doğrusal Fresnel Reflektörler",EffectOfAbsorberPipeHeightForLinearFresnelReflectors:"Doğrusal Fresnel Reflektörlerde Soğurucu Boru Yükseklik Etkisi",EffectOfAzimuthOfLinearFresnelReflectors:"Doğrusal Fresnel Reflektörlerde Azimut Açısı Etkisi",LinearFresnelReflectorsWithTwoAbsorbers:"İki Soğuruculu Doğrusal Fresnel Reflektörler",CosineEfficiencyOfHeliostats:"Heliostatların Kosinüs Verimliliği",ShadowingAndBlockingOfHeliostats:"Heliostatlarda Gölgeleme ve Engellenme",EffectSolarPowerTowerHeight:"Güneş Güç Kulesi Yükseklik Etkisi",SolarPowerTower:"Güneş Güç Kulesi"},otherTypesOfSolarPowerSubMenu:"Diğer Güneş Gücü Türleri",otherTypesOfSolarPowerTutorials:{SolarWaterHeaters:"Solar Water Heaters",SolarUpdraftTower:"Solar Updraft Kulesi"},windPowerSubMenu:"Wind Power",windPowerTutorials:{EffectOfBladeNumberOfWindTurbine:"Effect of Blade Number of Wind Turbine",EffectOfPitchAngleOfWindTurbineBlades:"Effect of Pitch Angle of Wind Turbine Blades",BirdSafeBladeDesign:"Bird-Safe Blade Design",OffshoreWindFarm:"Offshore Wind Farm"},colocationSubMenu:"Colocation",colocationTutorials:{AgricultureSolarWindColocation:"Agriculture-Solar-Wind Colocation"},generativeDesignSubMenu:"Generative Design",generativeDesignTutorials:{MonofacialSolarPanelArrayTiltAngle:"The Tilt Angle of a Monofacial Solar Panel Array",BifacialSolarPanelArrayTiltAngle:"The Tilt Angle of a Bifacial Solar Panel Array",OutputOfSolarPanelArrayInDifferentPlaces:"The Output of a Solar Panel Array in Different Places",SimpleSolarFarmParetoFront:"The Pareto Front for Designing a Simple Solar Farm"},examplesSubMenu:"Örnekler",solarEnergySubMenu:"Güneş Enerjisi",solarEnergyExamples:{SunBeamAndHeliodon:"Güneş Işını ve Heliodon",RooftopSolarPanels:"Çatı Üstü Güneş Panelleri",NevadaSolarOneParabolicTroughArray:"Nevada Eyaletinde Parabolik Oluk Dizisi",TooeleParabolicDishArray:"Tooele Şehrinde Parabolik Çanak Dizisi",PS10SolarPowerTower:"PS10 Güneş Güç Kulesi",TucsonLinearFresnelReflectors:"Tucson Şehrinde Doğrusal Fresnel Reflektörleri",SolarCanopyFormFactors:"Solar Gölgelik Biçim Etkileri",SolarCanopyOverBleachers:"Tirübün Üzeri Solar Gölgelik",SolarCanopyOverGarage:"Solar Canopy Over Garage",SolarBusStop:"Solar Otobüs Durağı",SolarFacadeTesla:"Tesla Solar Façade",BuildingIntegratedPhotovoltaics:"Building-Integrated Photovoltaics",Floatovoltaics:"Floatovoltaics",Agrivoltaics:"Agrivoltaics",VegetativeBuffer:"Bitkisel Tampon",RainbowSwashSolarFarmBostonMA:"Rainbow Swash Solar Farm in Boston, MA",MickeyMouseSolarFarmOrlandoFL:"Mickey Mouse Solar Farm in Orlando, FL",SolarPanelsOverCanalBakersfieldCA:"Bakersfield Şehrinde Kanal Üzerindeki Varsayımsal Güneş Panelleri",SolarNoiseBarrierLexingtonMA:"Lexington Kasabasında Varsayımsal Güneş Gürültü Bariyeri",HSATSolarTrackersRaleighNC:"Raleigh Şehrinde Yatay Tek Eksenli İzleyiciler (HSAT)",AADATSolarTrackersLancasterCA:"Lancaster Şehrinde Azimut–İrtifa Çift Eksenli İzleyiciler (AADAT)",SolarUpdraftTowerInCity:"Şehir Solar Updraft Kulesi"},builtEnvironmentSubMenu:"Yapılı Çevre",residentialBuildingsSubMenu:"Konut inşaatları",residentialBuildingExamples:{ColonialHouse:"Colonial House",DutchColonialHouse:"Flemenk Koloni Evi",TShapedHouse:"T-Shaped House",CapeCodHouseWithGarage:"Cape Cod House with Garage",Solarium:"Solaryum",Church1:"Kilise 1",Cathedral1:"Cathedral 1",Cathedral2:"Cathedral 2",Mosque1:"Mosque 1",AdobeTaosHouse:"Adobe Taos House",RanchHouse:"Ranch House",BonnetHouse:"Bonnet House",BarnStyleHouse:"Çiftlik Evi",ModernHouse:"Modern House",ButterflyRoofHouse:"Butterfly Roof House"},commercialBuildingsSubMenu:"Ticari Binalar",commercialBuildingExamples:{WhiteHouse:"White House",HaroldWashingtonCollege:"Harold Washington College",BilimMersinTurkiye:"Yenişehir Belediyesi Bilim ve Sanat Merkezi",SpanishStyleHotel:"Spanish Style Hotel",ApartmentBuilding:"Apartment Building",OfficeBuilding:"Ofis Binası",Hotel:"Hotel"},buildingComplexesSubMenu:"Building Complexes",buildingComplexExamples:{SouthBurlingtonHighSchoolVermont:"Güney Burlington Lisesi",MescaleroApacheSchoolNewMexico:"Mescalero Apache School, NM"},urbanPlanningSubMenu:"Şehir Planlaması",urbanPlanningExamples:{CityBlockHeatmap:"City Block Heatmap",ChicagoSkyline:"Chicago Skyline"},otherBuildingsSubMenu:"Other Buildings",otherBuildingExamples:{Greenhouse:"Sera",Pavilion:"Park Kamelyası",OctagonalPagoda:"Octagonal Pagoda",OceanFront:"Ocean Front",EgyptianPyramids:"Egyptian Pyramids",MayanPyramid:"Mayan Pyramid",SiOSePol:"Si-o-se-pol",StackedCuboids:"Stacked Cuboids"},artificialIntelligenceSubMenu:"Yapay Zeka",artificialIntelligenceExamples:{OptimizingTiltAngleOfOneSolarPanelRow:"Güneş Paneli Sıra Eğim Açısı Optimize Etme",OptimizingTiltAnglesOfMultipleSolarPanelRows:"Çoklu Güneş Paneli Sıra Eğim Açısı Optimize Etme",SolarFarmGenerativeDesign:"Güneş Tarlası Tasarımı",SolarFarmGenerativeDesignWithBlock:"Blok Varlığında Güneş Tarlası Tasarımı",FitchburgSolarFarmGenerativeDesign:"Fitchburg Güneş Tarlası Tasarımı"},languageSubMenu:"Dil",publicSubMenu:"Public",ModelsGallery:"Models Gallery",ModelsMap:"Models Map",AboutUs:"Hakkımızda"},avatarMenu:{AccountSettings:"Hesap Ayarları",PrivacyStatementTitle:"User Privacy Protection Statement",PrivacyStatement:"Oturum açtığınızda, Aladdin hesabınızı oluşturmak ve hesabınıza erişmek için Google Kimliğiniz kullanılır. Veritabanımızda referans olarak yalnızca rastgele bir alfasayısal dize depolanır. Adınız veya e-posta adresiniz gibi kişisel olarak tanımlanabilir hiçbir veri toplanmaz. Daha fazla bilgi için ",SignIn:"Kayıt Ol",SignInAsMe:"Sign in as me",SignInAnonymously:"Sign in anonymously",SignOut:"Oturum Kapat",IfYouAreAStudent:"Eğer Öğrenciyseniz"},skyMenu:{Axes:"Eksenler",Theme:"Tema",ThemeDefault:"Varsayılan",ThemeDesert:"Çöl",ThemeDune:"Dune",ThemeForest:"Orman",ThemeGrassland:"Çayır",ThemeHill:"Hill",ThemeLake:"Lake",ThemeMountain:"Mountain",ThemeRural:"Rural",SunlightAttenuationCoefficientInAir:"Havan Güneş Işığı Zayıflatma Katsayısı",ConvectiveCoefficientOfAir:"Havan Isı İletkenlik Katsayısı",HighestTemperatureTimeInMinutes:"En Yüksek Sıcaklık Süresi (Dakika)",SelectSunAnglesToShow:"Gösterilecek Güneş Açılarını Seçin",ShowAzimuthAngle:"Azimut Açısını Göster",ShowElevationAngle:"Yükselme Açısını Göster",ShowZenithAngle:"Zenit Açısını Göster",DirectLightBrightnessAtNoon:"Direct Light Brightness at Noon",AmbientLightBrightnessAtNoon:"Ambient Light Brightness at Noon"},groundMenu:{MonthlyIrradianceLoss:"Monthly Irradiance Loss",Vegetation:"Vegetation",LeafOutDay:"Leaf-Out Day",LeafOffDay:"Leaf-Off Day",Albedo:"Albedo",ImageOnGround:"Yer Görüntüsü",WaterSurface:"Water Surface",RemoveAllUnlockedTrees:"Tüm Ağaçları Kaldır",RemoveAllUnlockedFlowers:"Remove All Unlocked Flowers",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",RemoveAllUnlockedPeople:"Tüm Kişileri Kaldır",RemoveAllUnlockedFoundations:"Tüm Temelleri Kaldır",RemoveAllUnlockedCuboids:"Tüm Kübikleri Kaldır",DoYouReallyWantToRemoveAllPeople:"Tüm Kişileri Kaldırmak İstiyor Musunuz?",DoYouReallyWantToRemoveAllTrees:"Tüm Ağaçları Kaldırmak İstiyor Musunuz?",DoYouReallyWantToRemoveAllFlowers:"Do you really want to remove all the flowers that are not locked",DoYouReallyWantToRemoveAllSolarPanels:"Do you really want to remove all the solar panels that are not locked",DoYouReallyWantToRemoveAllFoundations:"Tüm Temelleri Kaldırmak İstiyor Musunuz?",DoYouReallyWantToRemoveAllCuboids:"Tüm Kübikleri Kaldırmak İstiyor Musunuz?",LockAllUnlockedElements:"Lock All Unlocked Elements",UnlockAllLockedElements:"Unlock All Locked Elements"},labelSubMenu:{Label:"Etiket",LabelText:"Label Text",LabelHeight:"Label Height",LabelSize:"Label Size",LabelFontSize:"Font Size",LabelColor:"Label Color",KeepShowingLabel:"Etiketi Göstermeye Devam Et"},foundationMenu:{RemoveAllUnlockedSolarPanels:"Tüm Kilitlenmemiş Güneş Panellerini Kaldır",RemoveAllUnlockedParabolicTroughs:"Tüm Kilitlenmemiş Parabolik Olukları Kaldır",RemoveAllUnlockedParabolicDishes:"Tüm Kilitlenmemiş Parabolik Çanakları Kaldır",RemoveAllUnlockedFresnelReflectors:"Tüm Kilitlenmemiş Fresnel Reflektörleri Kaldır",RemoveAllUnlockedHeliostats:"Tüm Kilitlenmemiş Heliostatları Kaldır",RemoveAllUnlockedWindTurbines:"Remove All Unlocked Wind Turbines",RemoveAllUnlockedSensors:"Tüm Kilitlenmemiş Sensörleri Kaldır",RemoveAllUnlockedLights:"Remove All Unlocked Lights",RemoveAllUnlockedWalls:"Tüm Kilitlenmemiş Duvarları Kaldır",RemoveAllUnlockedWindows:"Remove All Unlocked Windows",RemoveAllUnlockedDoors:"Remove All Unlocked Doors",RemoveAllUnlockedPolygons:"Tüm Kilitlenmemiş Çokgenleri Kaldır",RemoveAllUnlockedHumans:"Tüm Kilitlenmemiş İnsanları Kaldır",RemoveAllUnlockedTrees:"Tüm Kilitlenmemiş Ağaçları Kaldır",RemoveAllUnlockedFlowers:"Remove All Unlocked Flowers",Racks:"Çerçeveler",Texture01:"Doku 1",Texture02:"Doku 2",Texture03:"Doku 3",Texture04:"Doku 4",Texture05:"Doku 5",Texture06:"Doku 6",Texture07:"Doku 7",Texture08:"Doku 8",Texture09:"Doku 9",Texture10:"Doku 10",SolarPanels:"Güneş Panelleri",SolarPanelArray:"Solar Panel Array",DoYouReallyWantToRemoveAllSolarPanelsOnFoundation:" Seçili temel üzerindeki tüm güneş panellerini kaldırmak istiyor musunuz?",ParabolicTroughs:"Parabolik Oluklar",DoYouReallyWantToRemoveAllParabolicTroughsOnFoundation:" Seçili temel üzerinde kilitli olmayan tüm parabolik olukları kaldırmak istiyor musunuz?",ParabolicDishes:"Parabolik Çanaklar",DoYouReallyWantToRemoveAllParabolicDishesOnFoundation:" Seçili temel üzerinde kilitli olmayan tüm parabolik çanakları kaldırmak istiyor musunuz?",FresnelReflectors:"Fresnel Reflektörler",DoYouReallyWantToRemoveAllFresnelReflectorsOnFoundation:" Seçili temel üzerinde kilitli olmayan tüm Fresnel reflektörlerini kaldırmak istiyor musunuz?",Heliostats:"Heliostatlar",DoYouReallyWantToRemoveAllHeliostatsOnFoundation:" Seçili temel üzerinde kilitli olmayan tüm heliostatları kaldırmak istiyor musunuz?",WindTurbines:"Wind Turbines",DoYouReallyWantToRemoveAllWindTurbinesOnFoundation:"Do you really want to remove all the wind turbines on this foundation that are not locked",Sensors:"Sensörler",DoYouReallyWantToRemoveAllSensorsOnFoundation:" Seçili temel üzerinde kilitli olmayan tüm sensörleri kaldırmak istiyor musunuz?",Lights:"Lights",DoYouReallyWantToRemoveAllLightsOnFoundation:"Do you really want to remove all the lights on this foundation that are not locked",Walls:"Duvarlar",DoYouReallyWantToRemoveAllWallsOnFoundation:" Seçili temel üzerinde kilitli olmayan tüm duvarları kaldırmak istiyor musunuz? ",Windows:"Windows",DoYouReallyWantToRemoveAllWindowsOnFoundation:"Do you really want to remove all the windows on this foundation that are not locked",Doors:"Doors",DoYouReallyWantToRemoveAllDoorsOnFoundation:"Do you really want to remove all the doors on this foundation that are not locked",Polygons:"Poligonlar",DoYouReallyWantToRemoveAllPolygonsOnFoundation:" Seçili temel üzerinde kilitli olmayan tüm poligonları kaldırmak istiyor musunuz?",Humans:"Kişiler",DoYouReallyWantToRemoveAllHumansOnFoundation:" Seçili temel üzerinde kilitli olmayan tüm insanları kaldırmak istiyor musunuz?",Trees:"Ağaçlar",DoYouReallyWantToRemoveAllTreesOnFoundation:" Seçili temel üzerinde kilitli olmayan tüm ağaçları kaldırmak istiyor musunuz?",Flowers:"Flowers",DoYouReallyWantToRemoveAllFlowersOnFoundation:"Do you really want to remove all the flowers on this foundation that are not locked",OnlyThisFoundation:"Sadece Seçili Temel",AllConnectedFoundations:"Tüm Bağlantılı Temeller",AllSelectedFoundations:"All Selected Foundations",AllFoundations:"Tüm Temeller",AddPolygon:"Poligon Ekle",SolarStructure:"Solar Yapı Seçin",GroupMaster:"Grup Yöneticisi",LockAllUnlockedElementsOnThisFoundation:"Lock All Unlocked Elements on This Foundation",UnlockAllLockedElementsOnThisFoundation:"Unlock All Locked Elements on This Foundation",GroundFloorRValue:"Ground Floor R-Value",OnlyThisGroundFloor:"Only This Ground Floor",AllGroundFloors:"All Ground Floors"},solarPowerTowerMenu:{ReceiverTowerForHeliostats:"Heliostat Alıcı Kulesi",ReceiverTowerPhysicalProperties:"Alıcı Kule Fiziksel Özellikler",ReceiverTowerHeight:"Alıcı Kule Yükseklik",ReceiverTowerRadius:"Alıcı Kule Yarıçap",ReceiverAbsorptance:"Alıcı Absorbsiyon",ReceiverOpticalEfficiency:"Alıcı Optik Verim",ReceiverThermalEfficiency:"Alıcı Termal Verim"},solarAbsorberPipeMenu:{AbsorberPipeForFresnelReflectors:"Fresnel Reflektör Soğurucu Boru",AbsorberPipePhysicalProperties:"Soğurucu Boru Fiziksel Özellikler",AbsorberHeight:"Soğurucu Boru Yükseklik",AbsorberApertureWidth:"Soğurucu boru diyafram genişliği",AbsorberPipePoleNumber:"Soğurucu Boru Sayısı",AbsorberAbsorptance:"Soğurucu Absorbsiyonu",AbsorberOpticalEfficiency:"Soğurucu Optik Verimlilik",AbsorberThermalEfficiency:"Soğurucu Isıl Verimlilik"},solarUpdraftTowerMenu:{SolarUpdraftTower:"Solar Updraft Kulesi",SolarUpdraftTowerPhysicalProperties:"Solar Updraft Kulesi Fiziksel Özellikler",SolarUpdraftTowerChimneyHeight:"Solar Updraft Kulesi Baca Yüksekliği",SolarUpdraftTowerChimneyRadius:"Solar Updraft Kulesi Baca Yarıçapı",SolarUpdraftTowerCollectorHeight:"Solar Updraft Kulesi Collector Height",SolarUpdraftTowerCollectorRadius:"Solar Updraft Kulesi Kollektör Yarıçapı",SolarUpdraftTowerCollectorTransmissivity:"Solar Updraft Kulesi Kollektör Geçirgenliği",SolarUpdraftTowerCollectorEmissivity:"Solar Updraft Kulesi Kollektör Emisivite",SolarUpdraftTowerDischargeCoefficient:"Solar Updraft Kulesi Deşarj Katsayısı",SolarUpdraftTowerTurbineEfficiency:"Solar Updraft Kulesi Türbin Verimliliği"},cuboidMenu:{Texture01:"Doku 1",Texture02:"Doku 2",Texture03:"Doku 3",Texture04:"Doku 4",Texture05:"Doku 5",Texture06:"Doku 6",Texture07:"Doku 7",Texture08:"Doku 8",Texture09:"Doku 9",Texture10:"Doku 10",RemoveAllUnlockedSolarPanels:"Tüm Kilitlenmemiş Güneş Panellerini Kaldır",RemoveAllUnlockedSensors:"Tüm Kilitlenmemiş Sensörleri Kaldır",RemoveAllUnlockedPolygons:"Tüm Kilitlenmemiş Poligonları Kaldır",RemoveAllUnlockedHumans:"Tüm Kilitlenmemiş Kişileri Kaldır",RemoveAllUnlockedTrees:"Tüm Kilitlenmemiş Ağaçları Kaldır",RemoveAllUnlockedFlowers:"Remove All Unlocked Flowers",RemoveAllUnlockedLights:"Remove All Unlocked Lights",Racks:"Çerçeveler",Lights:"Lights",DoYouReallyWantToRemoveAllLightsOnCuboid:"Do you really want to remove all the lights on this cuboid that are not locked",SolarPanels:"Güneş Panelleri",DoYouReallyWantToRemoveAllSolarPanelsOnCuboid:" Seçili kübik üzerinde kilitlenmemiş tüm güneş panellerini kaldırmak istiyor musunuz?",Sensors:"Sensörler",DoYouReallyWantToRemoveAllSensorsOnCuboid:" Seçili kübik üzerinde kilitlenmemiş tüm sensörleri kaldırmak istiyor musunuz?",Polygons:"Poligonlar",DoYouReallyWantToRemoveAllPolygonsOnCuboid:" Seçili kübik üzerinde kilitlenmemiş tüm poligonları kaldırmak istiyor musunuz?",Humans:"İnsanlar",DoYouReallyWantToRemoveAllHumansOnCuboid:" Seçili kübik üzerinde kilitlenmemiş tüm insanları kaldırmak istiyor musunuz?",Trees:"Ağaçlar",DoYouReallyWantToRemoveAllTreesOnCuboid:" Seçili kübik üzerinde kilitlenmemiş tüm ağaçları kaldırmak istiyor musunuz?",Flowers:"Flowers",DoYouReallyWantToRemoveAllFlowersOnCuboid:"Do you really want to remove all the flowers on this cuboid that are not locked",OnlyThisCuboid:"Sadece Seçili Kübik",AllCuboidsOnSameSurface:"All Cuboids on Same Surface",AllCuboidsAboveSameBase:"All Cuboids above Same Base",AllSelectedCuboids:"All Selected Cuboids",AllCuboids:"Tüm Kübikler",OnlyThisSide:"Sadece Seçili Yüzey",AllSidesOfThisCuboid:"Seçili Kübik Tüm Yüzeyler",AllSidesOfSelectedCuboids:"All Sides of Selected Cuboids",AllSidesOfAllCuboids:"Bütün Kübik Yüzeyleri ",AddPolygon:"Poligon Ekle",Stackable:"Stackable",GroupMaster:"Group Master"},polygonMenu:{Texture01:"Doku 1",Texture02:"Doku 2",Texture03:"Doku 3",Texture04:"Doku 4",Texture05:"Doku 5",Texture06:"Doku 6",Texture07:"Doku 7",Texture08:"Doku 8",Texture09:"Doku 9",Texture10:"Doku 10",TextBox:"Text Box",FontOutlineColor:"Font Outline Color",FontOutlineWidth:"Font Outline Width",FontStrokeColor:"Font Stroke Color",FontStrokeWidth:"Font Stroke Width",NoOutline:"No Outline",Shiny:"Shiny",Filled:"Dolgu",FillTexture:"Dolgu Dokusu",FillColor:"Dolgu Rengi",Opacity:"Opaklık",LineColor:"Çizgi Rengi",LineWidth:"Çizgi Kalınlığı",LineStyle:"Çizgi Stili",SolidLine:"Düz çizgi",DashedLine:"Kesik çizgi",DottedLine:"Noktalı çizgi",InsertVertexBeforeIndex:"İndeksten Önce Tepe Noktası Ekle",InsertVertexAfterIndex:"İndeksten Sonra Tepe Noktası Ekle",DeleteVertex:"Tepe Noktası Sil",OnlyThisPolygon:"Sadece Seçili Poligon",AllPolygonsOnSurface:"Tüm Poligonlar Aynı Yüzeyde",AllPolygonsAboveFoundation:"Temel Üzerindeki Tüm Poligonlar",AllSelectedPolygons:"All Selected Polygons",AllPolygons:"Tüm Poligonlar",Layout:"Düzen",SolarPanelArrayLayout:"Güneş Paneli Dizi Düzeni",SolarPanelArrayLayoutParametricDesign:"Güneş Paneli Dizi Düzeni: Parametrik Tasarım",SolarPanelArrayLayoutGenerativeDesign:"Güneş Paneli Dizi Düzeni: Üretici Tasarım",SolarPanelArrayModel:"Güneş Paneli Modeli",SolarPanelArrayOrientation:"Oryantasyon",SolarPanelArrayTiltAngle:"Eğim Açısı",SolarPanelArrayRowWidth:"Dizi Sıra Genişliği",SolarPanelArrayInterRowSpacing:"Dizi Sıra Arası Boşluk",SolarPanelArrayRowSpacing:"Row Spacing",SolarPanelArrayRowAxis:"Dizi Sıra Ekseni",SolarPanelArrayLeftRightRowAxis:"Left-Right (Relative)",SolarPanelArrayUpDownRowAxis:"Up-Down (Relative)",SolarPanelArrayEastWestRowAxis:"Doğu-Batı (Absolute)",SolarPanelArrayNorthSouthRowAxis:"Kuzey-Güney (Absolute)",SolarPanelArrayMargin:"Margin",SolarPanelArrayPoleHeight:"Direk Yükseklik",SolarPanelArrayPoleSpacing:"Direk Aralık",SolarPanelArrayTotalYearlyCost:"Total Cost",SolarPanelArrayTotalYearlyRevenue:"Total Revenue",SolarPanelArrayTotalYearlyYield:"Total Yield",SolarPanelArrayMeanYearlyYield:"Mean Yield",SolarPanelArrayYearlyProfit:"Profit",LayoutNotAcceptedCheckYourParameters:"Bu yerleşim düzeni uygulanamaz. Lütfen parametrelerinizi kontrol edin."},optimizationMenu:{Optimization:"Optimizasyon",Parameters:"Parametreler",Variables:"Değişkenler",Constants:"Sabitler",GeneticAlgorithm:"Genetik Algoritma",GeneticAlgorithmSettings:"Genetik Algoritma Ayarı",ParticleSwarmOptimization:"Parçacık Sürü Optimizasyon",ParticleSwarmOptimizationSettings:"Parçacık Sürü Optimizasyon Ayarı",SolarPanelTiltAngleOptimization:"Güneş Paneli Eğim Açısı Optimizasyonu",SolarPanelArrayLayout:"Güneş Paneli Dizi Düzeni",Generation:"Nesil",Gene:"Gen",NormalizedVariables:"Normalleştirilmiş Değişkenler",Objective:"Amaç",ObjectiveFunctionDailyTotalYield:"Günlük Toplam Üretim",ObjectiveFunctionYearlyTotalYield:"Yıllık Toplam Üretim",ObjectiveFunctionDailyMeanYield:"Günlük Ortalama Üretim",ObjectiveFunctionYearlyMeanYield:"Yıllık Ortalama Üretim",ObjectiveFunctionDailyProfit:"Günlük Kazanç",ObjectiveFunctionYearlyProfit:"Yıllık Kazanç",GeneticAlgorithmSelectionMethod:"Genetik Algoritma Seçim Yöntemi",RouletteWheel:"Rulet Çarkı",Tournament:"Turnuva",SearchMethod:"Arama Yöntemi",GlobalSearchUniformSelection:"Küresel Arama Standart Seçim",LocalSearchRandomOptimization:"Yerel Arama Rastgele Optimizasyon",PopulationSize:"Popülasyon Boyutu",MaximumGenerations:"Maksimum Nesil",SelectionRate:"Seçim Oranı",CrossoverRate:"Geçiş Oranı",MutationRate:"Mutasyon Oranı",Step:"Adım",SwarmSize:"Sürü Boyutu",MaximumSteps:"Maksimum Adım",MaximumVelocity:"Maksimum Hız",InertiaWeight:"Atalet Ağırlığı",CognitiveCoefficient:"Bilişsel Katsayı",SocialCoefficient:"Sosyal Katsayı",ConvergenceThreshold:"Sonlandırma için Yakınsama Eşiği",LocalSearchRadius:"Yerel Arama Yarıçapı",RowsPerRackRange:"Raf Başına Sıra Aralığı",TiltAngleRange:"Eğim Açısı Aralığı",InterRowSpacingRange:"Sıra Arası Aralık Ranjı",ClickTargetPolygonToActivate:"Etkinleştirmek için Hedef Poligona Tıklayınız",ClickTargetFoundationToActivate:"Etkinleştirmek için Hedef Temele Tıklayınız"},treeMenu:{ShowModel:"Modeli Göster",Flip:"Flip",Type:"Tür",Spread:"Yayılım"},flowerMenu:{Flip:"Flip",Type:"Type",Spread:"Spread"},peopleMenu:{ChangePerson:"Kişi Değiştir",Flip:"Flip",Observer:"Gözlemci",ViewFromThisPerson:" Seçili Kişiye Göre Perspektif"},lightMenu:{Color:"Color",Intensity:"Intensity",Decay:"Decay",MaximumDistance:"Distance",Inside:"Inside"},solarCollectorMenu:{Coordinates:"Coordinates",RelativeXCoordinateOfCenter:"Relative X Coordinate of Center",RelativeYCoordinateOfCenter:"Relative Y Coordinate of Center",RelativeAzimuth:"Göreceli Azimut Açısı",Pole:"Pole",PoleHeight:"Direk Yüksekliği",PoleRadius:"Pole Radius",ExtraPoleHeight:"Ekstra Direk Yüksekliği",ExtraPoleHeightInAdditionToHalfWidth:"Yarım Genişliğe Ek Ekstra Direk Yüksekliği",DrawSunBeam:"Güneş Işını Çiz"},concentratedSolarPowerCollectorMenu:{ReflectorReflectance:"Reflektör Yansıma",ReceiverAbsorptance:"Alıcı Absorbsiyonu",ReflectorOpticalEfficiency:"Reflektör Optik Verimliliği",ReceiverThermalEfficiency:"Alıcı Termal Verimliliği"},solarPanelMenu:{ElectricalProperties:"Electrical Properties",InverterEfficiency:"Inverter Efficiency",InverterEfficiencyExplained:"The efficiency for converting direct current (DC) to alternating current (AC).",DcToAcSizeRatio:"DC-to-AC Size Ratio",DcToAcSizeRatioExplained:"The ratio of the solar panels' DC-rated size to the inverter's AC-rated size.",ChangePvModel:"PV Modelini Değiştir",Orientation:"Oryantasyon",Portrait:"Portre",Landscape:"Peyzaj",FrameColor:"Frame Color",Panels:"Paneller",PanelsWide:"Panel Genişliği",PanelsLong:"Panel Uzunluğu",TiltAngle:"Eğim Açısı",SouthFacingIsPositive:"Güney yönünde açı pozitiftir.",Tracker:"İzleyici",SolarTrackerFollowsSun:"Güneş paneli verimini artırmak için bir güneş izleme sistemi güneşi sürekli takip eder.",PoleSpacing:"Direk Aralığı",NoTracker:"İzleme Sistemi Yok",HorizontalSingleAxisTracker:"Yatay Tek Eksenli İzleme Sistemi",VerticalSingleAxisTracker:"Dikey Tek Eksenli İzleme Sistemi",AltazimuthDualAxisTracker:"Altazimut Çift Eksenli İzleme Sistemi",OnlyThisSolarPanel:"Sadece Seçili Güneş Paneli",AllSolarPanelsOnSurface:"Tüm Güneş Panelleri Aynı Yüzeyde",AllSolarPanelsAboveFoundation:"Tüm Güneş Panelleri Aynı Temel Üzerinde",AllSelectedSolarPanels:"All Selected Solar Panels",AllSolarPanels:"Tüm Güneş Panelleri"},solarWaterHeaterMenu:{OnlyThisSolarWaterHeater:"Only This Solar Water Heater",AllSolarWaterHeatersOnSurface:"All Solar Water Heaters on the Same Surface",AllSolarWaterHeatersAboveFoundation:"All Solar Water Heaters Above the Same Foundation",AllSelectedSolarWaterHeaters:"All Selected Solar Water Heaters",AllSolarWaterHeaters:"All Solar Water Heaters"},pvModelPanel:{SolarPanelSpecs:"Güneş Paneli Özellikleri",General:"General",Electrical:"Electrical",CellCountInXDirection:"Cell Count in X Direction",CellCountInYDirection:"Cell Count in Y Direction",Weight:"Weight",Kilogram:"kg",RatedVoltage:"Rated Voltage",RatedCurrent:"Rated Current",OpenCircuitVoltage:"Open-Circuit Voltage",ShortCircuitCurrent:"Short-Circuit Current",MaximumRatedPower:"Maximum Rated Power",Model:"Model",PanelSize:"Panel Boyutu",Cells:"Hücreler",CellType:"Hücre Tipi",Monocrystalline:"Monokristal",Polycrystalline:"Polikristal",ThinFilm:"İnce Katman",Bifacial:"Bifacial",PowerBifaciality:"Power Bifaciality (Rear/Front)",Black:"Siyah",Blue:"Mavi",ShadeTolerance:"Gölge Toleransı",SolarCellEfficiency:"Güneş Pili Verimliliği",NominalOperatingCellTemperature:"Nominal Çalışma Hücresi Sıcaklığı",TemperatureCoefficientOfPmax:"Pmax Sıcaklık Katsayısı",AddedCustomSolarPanels:"Added",DisplayThisCustomSolarPanel:"Display this custom solar panel",ExportThisCustomSolarPanel:"Export this custom solar panel",ImportCustomSolarPanelFromClipboard:"Import custom solar panel from clipboard",CustomSolarPanelExportedToClipboard:"Custom solar panel exported to Clipboard",DoYouReallyWantToRemoveThisCustomSolarPanel:"Do you really want to remove this custom solar panel",MakeSureThisCustomSolarPanelIsNotUsed:"Make sure this custom solar panel is not used in the current model",ThisCustomSolarPanelIsUsed:"This custom solar panel is used in the current model",DoYouReallyWantToImportCustomSolarPanel:"Do you really want to import a custom solar panel",ExistingSettingsWillBeOverwritten:"The existing settings will be overwritten",CannotAddCustomSolarPanel:"Cannot add custom solar panel",CustomSolarPanelMustHaveModelName:"A custom solar panel must have a model name",CustomSolarPanelExists:"A custom solar panel with this name already exists",FailInImportingDataFromClipboard:"Failed in importing data from the clipboard"},parabolicTroughMenu:{ModuleLength:"Modül Uzunluğu",Modules:"Modüller",ModulesLong:"Modüllerin Uzunluğu",LatusRectum:"Özkiriş",OnlyThisParabolicTrough:"Sadece Seçili Parabolik Oluk",AllParabolicTroughsAboveFoundation:"Aynı Temelin Üzerindeki Tüm Parabolik Oluklar",AllSelectedParabolicTroughs:"All Selected Parabolic Troughs",AllParabolicTroughs:"Tüm Parabolik Oluklar"},fresnelReflectorMenu:{AbsorberPipe:"Soğurucu Boru",SelectAbsorberToReflectSunlightTo:"Güneş Işığı Yansıtılacak Soğurucuyu Seçin",ModuleLength:"Modül Uzunluğu",Modules:"Modüller",ModulesLong:"Modüllerin Uzunluğu",OnlyThisFresnelReflector:"Sadece Seçili Fresnel Reflektör",AllFresnelReflectorsAboveFoundation:"Aynı Temel Üzerindeki Tüm Fresnel Reflektörler",AllSelectedFresnelReflectors:"All Selected Fresnel Reflectors",AllFresnelReflectors:"Tüm Fresnel Reflektörler"},heliostatMenu:{Tower:"Kule",SelectTowerToReflectSunlightTo:"Güneş Işığı Yansıtılacak Kuleyi Seçin",OnlyThisHeliostat:"Sadece Seçili Heliostat",AllHeliostatsAboveFoundation:"Aynı Temel Üzerindeki Tüm Heliostatlar",AllSelectedHeliostats:"All Selected Heliostats",AllHeliostats:"Tüm Heliostatlar"},parabolicDishMenu:{ReceiverStructure:"Alıcı Yapısı",CentralPole:"Merkez Direk",CentralPoleWithTripod:"Tripodlu Merkez Direk",Quadrupod:"Dört Ayaklı",RimDiameter:"Kasnak Çapı",LatusRectum:"Özkiriş",ExtraPoleHeightInAdditionToRadius:"Yarıçapa Ek Olarak Ekstra Direk Yüksekliği",OnlyThisParabolicDish:"Sadece Seçili Parabolik Çanak",AllParabolicDishesAboveFoundation:"Aynı Temel Üzerindeki Tüm Parabolik Çanaklar",AllSelectedParabolicDishes:"All Selected Parabolic Dishes",AllParabolicDishes:"Tüm Parabolik Çanaklar"},windTurbineMenu:{BirdSafeDesign:"Bird-Safe Design",BirdSafeNone:"None",BirdSafeBicolor:"Bicolor",BirdSafeStriped:"Striped",Rotor:"Rotor",BladeNumber:"Blade Number",RotorInitialAngle:"Rotor Initial Angle",RotorBladeDesign:"Rotor Blade Design",RotorBladeRadius:"Rotor Blade Radius",RotorBladePitchAngle:"Rotor Blade Pitch Angle",RelativeYawAngle:"Relative Yaw Angle",MaximumChordLength:"Maximum Chord Length",Tower:"Tower",TowerHeight:"Tower Height",TowerRadius:"Tower Radius",HubDesign:"Hub Design",HubRadius:"Hub Radius",HubLength:"Hub Length",OnlyThisWindTurbine:"Only This Wind Turbine",AllWindTurbinesAboveFoundation:"All Wind Turbines Above the Same Foundation",AllSelectedWindTurbines:"All Selected Wind Turbines",AllWindTurbines:"All Wind Turbines"},wallMenu:{TextureDefault:"Varsayılan",Texture01:"Doku 1",Texture02:"Doku 2",Texture03:"Doku 3",Texture04:"Doku 4",Texture05:"Doku 5",Texture06:"Doku 6",Texture07:"Doku 7",Texture08:"Doku 8",Texture09:"Doku 9",Texture10:"Doku 10",SizeOfWall:"Duvar Boyutu",OnlyThisWall:"Sadece Seçili Duvar",AllConnectedWalls:"All Connected Walls",AllWallsAboveFoundation:" Aynı Temel Üzerindeki Tüm Duvarlar",AllSelectedWalls:"All Selected Walls",AllWalls:"Tüm Duvarlar",Windows:"Pencereler",LockAllUnlockedWindows:"Lock All Unlocked Windows",UnlockAllLockedWindows:"Unlock All Locked Windows",RemoveAllUnlockedWindows:"Kilitlenmemiş Tüm Pencereleri Kaldır",DoYouReallyWantToRemoveAllWindowsOnThisWall:" Seçili duvardaki tüm pencereleri kaldırmak istiyor musunuz?",Doors:"Kapılar",LockAllUnlockedDoors:"Lock All Unlocked Doors",UnlockAllLockedDoors:"Unlock All Locked Doors",RemoveAllUnlockedDoors:"Tüm Kilitlenmemiş Kapıları Kaldır",DoYouReallyWantToRemoveAllDoorsOnThisWall:" Seçili duvardaki tüm kapıları kaldırmak istiyor musun?",SolarPanels:"Güneş Panelleri",LockAllUnlockedSolarPanels:"Lock All Unlocked Solar Panels",UnlockAllLockedSolarPanels:"Unlock All Locked Solar Panels",RemoveAllUnlockedSolarPanels:"Kilitlenmemiş Tüm Güneş Panellerini Kaldır",DoYouReallyWantToRemoveAllSolarPanelsOnThisWall:" Seçili duvardaki tüm güneş panellerini kaldırmak istiyor musunuz?",Sensors:"Sensors",LockAllUnlockedSensors:"Lock All Unlocked Sensors",UnlockAllLockedSensors:"Unlock All Locked Sensors",RemoveAllUnlockedSensors:"Remove All Unlocked Sensors",DoYouReallyWantToRemoveAllSensorsOnThisWall:"Do you really want to remove all the sensors on this wall",Lights:"Lights",LockAllUnlockedLights:"Lock All Unlocked Lights",UnlockAllLockedLights:"Unlock All Locked Lights",RemoveAllUnlockedLights:"Remove All Unlocked Lights",DoYouReallyWantToRemoveAllLightsOnThisWall:"Do you really want to remove all the lights on this wall",Polygons:"Polygons",LockAllUnlockedPolygons:"Lock All Unlocked Polygons",UnlockAllLockedPolygons:"Unlock All Locked Polygons",RemoveAllUnlockedPolygons:"Tüm Kilitlenmemiş Poligonları Kaldır",DoYouReallyWantToRemoveAllPolygonsOnThisWall:"Do you really want to remove all the polygons on this wall",WallStructure:"Duvar Yapısı",DefaultStructure:"Varsayılan",StudStructure:"Ahşap Dikme",PillarStructure:"Pillar",Opacity:"Opaklık",StructureSpacing:"Structure Spacing",StructureWidth:"Structure Width",StructureThickness:"Structure Thickness",StructureColor:"Structure Color",Color:"Wall Color",Height:"Height",Thickness:"Thickness",Texture:"Texture",AllLightsOnWallInside:"All Lights on Wall Inside",AllLightsOnWallOutside:"All Lights on Wall Outside",Fill:"Fill",Full:"Full",Partial:"Partial",Empty:"Empty",OpenToOutside:"Open to Outside",EavesLength:"Eaves Overhang Length",Parapet:"Parapet",ParapetColor:"Parapet Color",ParapetTexture:"Parapet Texture",ParapetHeight:"Parapet Height",CopingsHeight:"Copings Height",CopingsWidth:"Copings Width"},windowMenu:{OnlyThisWindow:"Sadece Bu Pencere",AllWindowsOnSurface:"All Windows on the Same Surface",AllWindowsAboveFoundation:"Aynı Temelin Üzerindeki Tüm Pencereler",AllSelectedWindows:"All Selected Windows",AllWindows:"Tüm Pencereler",Width:"Genişlik",Height:"Yükseklik",Setback:"Setback from Exterior Surface",RelativeToWallThickness:"Relative to wall thickness",Mullion:"Tiriz",HorizontalMullion:"Horizontal Mullion",VerticalMullion:"Vertical Mullion",MullionWidth:"Tiriz Genişliği",HorizontalMullionSpacing:"Horizontal Mullion Spacing",VerticalMullionSpacing:"Vertical Mullion Spacing",MullionColor:"Mullion Color",Tint:"Ton",Opacity:"Opaklık",SolarHeatGainCoefficient:"Solar heat gain coefficient (SHGC) = 1 - opacity",Shutter:"Kepenk",LeftShutter:"Sol Kepenk",RightShutter:"Sağ Kepenk",BothShutters:"Kepenkler",ShutterWidth:"Genişlik",ShutterColor:"Kepenk Rengi",Frame:"Frame",FrameWidth:"Frame Width",SillWidth:"Sill Width",Color:"Frame Color",WindowType:"Window Type",Default:"Default",Arched:"Arched",Polygonal:"Polygonal",Interior:"Interior",Empty:"Empty"},roofMenu:{TextureDefault:"Varsayılan",Texture01:"Doku 1",Texture02:"Doku 2",Texture03:"Doku 3",Texture04:"Doku 4",Texture05:"Doku 5",Texture06:"Doku 6",Texture07:"Doku 7",OnlyThisRoof:"Sadece Seçili Çatı",AllRoofsAboveFoundation:"Aynı Temelin Üzerinde Tüm Çatılar",AllSelectedRoofs:"All Selected Roofs",AllRoofs:"Tüm Çatılar",OnlyThisCeiling:"Only This Ceiling",AllCeilingsAboveFoundation:"All Ceilings Above the Same Foundation",AllCeilings:"All Ceilings",EavesOverhangLength:"Eaves Overhang Length",RafterSpacing:"Mertek Aralığı",RafterWidth:"Mertek Genişliği",RafterThickness:"Mertek Kalınlığı",RafterColor:"Mertek Rengi",RoofColor:"Çatı Rengi",RoofSideColor:"Roof Side Color",GlassTint:"Cam Tonu",Opacity:"Opaklık",RoofStructure:"Çatı Yapısı",DefaultStructure:"Varsayılan",RafterStructure:"Mertek",GlassStructure:"Cam",SolarPanels:"Solar Panels",LockAllUnlockedSolarPanels:"Lock All Unlocked Solar Panels",UnlockAllLockedSolarPanels:"Unlock All Locked Solar Panels",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",DoYouReallyWantToRemoveAllSolarPanelsOnThisRoof:"Do you really want to remove all the solar panels on this roof",Windows:"Windows",LockAllUnlockedWindows:"Lock All Unlocked Windows",UnlockAllLockedWindows:"Unlock All Locked Windows",RemoveAllUnlockedWindows:"Remove All Unlocked Windows",DoYouReallyWantToRemoveAllWindowsOnThisRoof:"Do you really want to remove all the windows on this roof",Sensors:"Sensors",LockAllUnlockedSensors:"Lock All Unlocked Sensors",UnlockAllLockedSensors:"Unlock All Locked Sensors",RemoveAllUnlockedSensors:"Remove All Unlocked Sensors",DoYouReallyWantToRemoveAllSensorsOnThisRoof:"Do you really want to remove all the sensors on this roof",Lights:"Lights",RemoveAllUnlockedLights:"Remove All Unlocked Lights",DoYouReallyWantToRemoveAllLightsOnThisRoof:"Do you really want to remove all the lights on this roof",AllLightsOnRoofInside:"All Lights on Roof Inside",AllLightsOnRoofOutside:"All Lights on Roof Outside",Rise:"Rise",Ceiling:"Ceiling",RoofRValue:"Roof R-Value",CeilingRValue:"Ceiling R-Value"},doorMenu:{TextureDefault:"Varsayılan",Texture01:"Doku 1",Texture02:"Doku 2",Texture03:"Doku 3",Texture04:"Doku 4",Texture05:"Doku 5",Texture06:"Doku 6",Texture07:"Doku 7",Texture08:"Doku 8",Texture09:"Doku 9",Texture10:"Doku 10",Texture11:"Doku 11",Texture12:"Doku 12",Texture13:"Doku 13",Texture14:"Doku 14",Texture15:"Doku 15",Texture16:"Doku 16",Texture17:"Doku 17",OnlyThisDoor:"Sadece Seçili Kapı",AllDoorsOnWall:"Aynı Duvardaki Tüm Kapılar",AllDoorsAboveFoundation:"Aynı Temelin Üstündeki Tüm Kapılar",AllSelectedDoors:"All Selected Doors",AllDoors:"Tüm Kapılar",DoorType:"Door Type",Default:"Default",Arched:"Arched",Filled:"Filled",FrameColor:"Frame Color",Interior:"Interior"},siteInfoPanel:{High:"Yüksek",Low:"Düşük"},designInfoPanel:{NumberOfSelectedHeliostats:"Seçilen heliostat sayısı",NumberOfSelectedSolarPanels:"Seçilen güneş paneli sayısı",ElectricityGeneratedDailyBySolarPanels:"Güneş panellerinin günlük elektrik üretimi",SceneDiameter:"Scene diameter",BuildingArea:"Building area"},visualizationControlPanel:{ColorContrast:"Renk Kontrastı",FluxScale:"Flux Scale",ClickUpOrDownArrowButtonsToChange:"Değiştirmek için yukarı veya aşağı ok butonlarına tıklayınız"},instructionPanel:{Rotate:"Döndürme",DragMouse:"Sol Tık + Sürükle",Zoom:"Yakınlaştırma",MouseWheelOrKeys:"Tekerlek veya Ctrl+[ veya Ctrl+]",MouseWheelOrKeysMac:"Tekerlek veya ⌘+[ veya ⌘+]",Pan:"Ekran Kaydırma",HoldCtrlDragMouse:"Ctrl + Sürükle",HoldMetaDragMouse:"Hold ⌘ and drag mouse",Enter2DMode:"Enter 2D mode",Exit2DMode:"Exit 2D mode",NavigationMode:"Navigation mode",EnableNavigation:"Enable navigation",DisableNavigation:"Disable navigation",MoveForwardBack:"Move forward/back",MoveForwardBackInstruction:"Press W/S",MoveLeftRight:"Move left/right",MoveLeftRightInstruction:"Press A/D",MoveUpDown:"Move up/down",MoveUpDownInstruction:"Press Z/X",Turn:"Turn",TurnInstruction:"Press arrow keys",ResetView:"Yeniden Başlat",AutoRotate:"Otomatik Döndürme",StartOrStop:"Başlat veya Durdur (F4)"},mapPanel:{ImageOnGround:"Yüzey Görünümü",HideAddress:"Hide Address",WeatherStations:"Referans",WeatherStationsNote:"Turn this off to speed up",Coordinates:"Koordinatlar",Zoom:"Büyüt"},visibilityPanel:{SolarPanelVisibility:"Güneş Paneli Görünüm",Observer:"Gözlemci",VantagePoint:"Referans Noktası",ItemizedVisibilityByFields:"Alana Özel Perspektif",TotalVisibility:"Toplam"},sensorPanel:{LightSensor:"Işık Sensörü",WeatherDataFrom:"Hava Durumu"},buildingEnergyPanel:{DailyBuildingEnergy:"Daily Building Energy",YearlyBuildingEnergy:"Yearly Building Energy",Heater:"Heater",AC:"AC",SolarPanel:"Solar Panel",Net:"Net"},solarPanelYieldPanel:{SolarPanelDailyYield:"Güneş Paneli Günlük Üretim",SolarPanelYearlyYield:"Güneş Paneli Yıllık Üretim",Yield:"Üretim",YieldPerHour:"Saatlik Üretim",DailyTotal:"Günlük Toplam",YearlyTotal:"Yıllık Toplam",ShowOutputsOfIndividualSolarPanels:"Herbir güneş panelinin üretimini göster",Profit:"Kazanç",TotalCost:"Total Cost",TotalRevenue:"Total Revenue",TotalYield:"Total Yield",MeanYield:"Mean Yield",ModuleCount:"Module Count"},parabolicTroughYieldPanel:{ParabolicTroughDailyYield:"Parabolik Oluk Günlük Üretim",ParabolicTroughYearlyYield:"Parabolik Oluk Yıllık Üretim",Yield:"Üretim",YieldPerHour:"Saatlik Üretim",DailyTotal:"Günlük Toplam",YearlyTotal:"Yıllık Toplam",ShowOutputsOfIndividualParabolicTroughs:"Herbir parabolik oluğun üretimini göster"},parabolicDishYieldPanel:{ParabolicDishDailyYield:"Parabolik Çanak Günlük Üretim",ParabolicDishYearlyYield:"Parabolik Çanak Yıllık Üretim",Yield:"Üretim",YieldPerHour:"Saatlik Üretim",DailyTotal:"Günlük Toplam",YearlyTotal:"Yıllık Toplam",ShowOutputsOfIndividualParabolicDishes:"Herbir parabolik çanağın üretimini göster"},fresnelReflectorYieldPanel:{FresnelReflectorDailyYield:"Fresnel Reflektör Günlük Üretim",FresnelReflectorYearlyYield:"Fresnel Reflektör Yıllık Üretim",Yield:"Üretim",YieldPerHour:"Saatlik Üretim",DailyTotal:"Günlük Toplam",YearlyTotal:"Yıllık Toplam",ShowOutputsOfIndividualFresnelReflectors:"Herbir Fresnel yansıtıcısının üretimini göster"},heliostatYieldPanel:{HeliostatDailyYield:"Heliostat Günlük Üretim",HeliostatYearlyYield:"Heliostat Yıllık Üretim",Yield:"Üretim",YieldPerHour:"Saatlik Üretim",DailyTotal:"Günlük Toplam",YearlyTotal:"Yıllık Toplam",ShowOutputsOfIndividualHeliostats:"Herbir heliostatın üretimini göster"},updraftTowerYieldPanel:{UpdraftTowerDailyYield:"Solar Updraft Kulesi Günlük Üretimi",UpdraftTowerYearlyYield:"Solar Updraft Kulesi Yıllık Üretimi",ChimneyAirTemperature:"Baca Hava Sıcaklığı",ChimneyWindSpeed:"Baca Rüzgar Hızı",Yield:"Üretim",YieldPerHour:"Saatlik Üretim",DailyTotal:"Günlük Toplam",YearlyTotal:"Yıllık Toplam",ShowOutputsOfIndividualUpdraftTowers:"Herbir updraft kulesinin üretimini göster"},heliodonPanel:{SunAndTimeSettings:"Güneş & Saat Ayarları",SunAngles:"Açılar",TwentyFourHours:"24 Hours"},cloudFilePanel:{CopyTitle:"Copy Title",TitleCopiedToClipBoard:"The title was copied to the clip board",SearchByTitle:"Search by title",MyLikes:"My Likes",MyCloudFiles:"Bulut Dosyalarım",GenerateLink:"Link Oluştur",LinkGeneratedInClipBoard:"Klip Panosunda Oluşturulan Link",DoYouReallyWantToDelete:"Gerçekten silmek istiyor musun?",IfSharedOrPublishedRenamingFileBreaksExistingLinks:"If this file has been shared or published, renaming it breaks existing links"},projectListPanel:{CopyTitle:"Copy Title",TitleCopiedToClipBoard:"The title was copied to the clip board",SearchByTitle:"Search by title",MyProjects:"My Projects",GenerateProjectLink:"Generate Project Link",ProjectLinkGeneratedInClipBoard:"A link to the project was generated in the clip board",DoYouReallyWantToDeleteProject:"Do you really want to delete Project",IfSharedOrPublishedRenamingProjectBreaksExistingLinks:"If this project has been shared or published, renaming it breaks existing links"},projectPanel:{ProjectSettings:"Project Settings",ThumbnailImageSize:"Thumbnail Image Size",ProjectByOtherPeople:"Project by Other People",Project:"Project",ProjectType:"Type",ProjectDescription:"Description",MakeDescriptionEditable:"Make this description editable",MakeDescriptionNonEditable:"Make this description non-editable",DoubleClickToMakeDescriptionEditable:"Double-click to make this description editable",SolarPanelArray:"Solar Panel Array",CurateCurrentDesign:"Curate current design",UpdateSelectedDesign:"Update selected design",RemoveSelectedDesign:"Remove selected design",ClickToFlipSortingOrder:"Click to flip the sorting order",DesignNotShownInSolutionSpaceClickToShow:"This design is not shown in solution space; click to show",DesignShownInSolutionSpaceClickToHide:"This design is shown in solution space; click to hide",SolutionSpace:"Solution Space",ChooseSolutionSpace:"Choose solution space",ChooseDataColoring:"Choose data coloring",SameColorForAllDesigns:"Same color for all designs",OneColorForEachDesign:"One color for each design",SolutionSpaceScreenshot:"Take a screenshot of the solution space",ScatterPlotScreenshot:"Take a screenshot of the scatter plot",SingleClickToSelectDoubleClickToOpen:"Single-click to select, double-click to open.",SingleClickToDeselectDoubleClickToOpen:"Single-click to deselect, double-click to open.",GenerateScatterPlot:"Generate Scatter Plot",SelectXAxis:"Select X Axis",SelectYAxis:"Select Y Axis"},accountSettingsPanel:{MyAccountSettings:"Hesap Ayarlarım",MyID:"Bilgilerim",ClickToCopyMyID:"Bilgilerinizi kopyalamak için tıklayın",IDInClipBoard:"Kişisel bilgileriniz kopyalandı ve yapıştırmaya hazır.",StoreMyNameInMyFilesWhenSaving:"Kaydederken, adımı dosyalarıma ekle",DoYouReallyWantToShowYourNameInYourFiles:"Dosyalarınızda isminizin gösterilmesini istiyor musunuz?",SignFileDisclaimer:"Evet ise, isiminiz dosyalarınıza erişimi olan bütün kişiler tarafından görülebilir.",Likes:"Likes",AllPublished:"All Published",PublishedUnderAliases:"Aliases",UserCount:"Kullanıcı Sayısı",SchoolID:"Okul",ClassID:"Sınıf"},weatherPanel:{SunshineHours:"Gündüz Saatleri"},diurnalTemperaturePanel:{SelectAirTemperatureModel:"Model Seç",Sinusoidal:"Sinüzoidal"},economicsPanel:{EconomicsParameters:"Ekonomik Parametreler",ElectricitySellingPrice:"Elektrik Satış Fiyatı",OperationalCostPerUnit:"Birim Başına İşletme Maliyeti",SellingPrice:"Selling Price",UnitCost:"Unit Cost"},navigationPanel:{NavigationParameters:"Navigation Parameters",MinimumMoveSpeed:"Minimum Move Speed",MinimumTurnSpeed:"Minimum Turn Speed"},shadowSettingsPanel:{ShadowSettings:"Shadow Settings",ShadowCameraFarDistance:"Shadow Camera Far Distance",ShadowMapSize:"Shadow Map Size",Notes:"Notes",RefreshPageNote:"Refresh the page for the new settings to take effect.",MapSizeWarning:"A large shadow map size may cause Aladdin to crash on some computers."},yearlyLightSensorPanel:{SkyClearness:"Gökyüzü Açıklığı",ShowDaylightResults:"Gün Işığı Sonuçlarını Göster",ShowSkyClearnessResults:"Gökyüzü Açıklığı Sonuçlarını Göster",ShowAverageDailySolarRadiation:"Günlük ortalama güneş Işınımını göster"},analysisManager:{NoSensorForCollectingData:"Veri toplamak için sensör yok.",NoSolarPanelForAnalysis:"Analiz için güneş paneli yok.",NoObserverForVisibilityAnalysis:"Görünürlük analizi için gözlemci yok.",NoSolarWaterHeaterForAnalysis:"Analiz için su ısıtıcısı yok",NoParabolicDishForAnalysis:"Analiz için parabolik çanak yok",NoParabolicTroughForAnalysis:"Analiz için parabolik oluk yok.",NoFresnelReflectorForAnalysis:"Analiz için Fresnel reflektörü yok.",NoHeliostatForAnalysis:"Analiz için heliostat yok.",NoSolarUpdraftTowerForAnalysis:"Analiz için Solar Updraft Kulesi yok.",NoBuildingForAnalysis:"There is no building for analysis."},toolbar:{CloudFile:"Bulut Dosyası",Select:"Seç",AddFoundation:"Temel Ekle",AddWall:"Duvar Ekle",AddWindow:"Pencere Ekle",AddDoor:"Kapı Ekle",AddPyramidRoof:"Piramit Çatı Ekle",AddGableRoof:"Beşik Çatı Ekle",AddHipRoof:"Kırma Çatı Ekle",AddGambrelRoof:"Flemenk Çatı Ekle",AddMansardRoof:"Mansart Çatı Ekle",AddCuboid:"Kübik Ekle",AddSensor:"Sensör Ekle",AddSolarPanel:"Güneş Paneli Ekle",AddSolarWaterHeater:"Su Isıtıcı Ekle",AddBatteryStorage:"Add Battery Storage",AddParabolicDish:"Parabolik Çanak Ekle",AddParabolicTrough:"Parabolik Oluk Ekle",AddFresnelReflector:"Fresnel Reflektörü Ekle",AddHeliostat:"Heliostat Ekle",AddWindTurbine:"Add Horizontal Axis Wind Turbine",AddVerticalAxisWindTurbine:"Add Vertical Axis Wind Turbine",AddLight:"Add Light",AddTree:"Ağaç Ekle",AddFlower:"Add Flower",AddPeople:"İnsan Ekle",DoubleClickToLockThisModeForNextAction:"Double-click to lock this mode for next action",ClickToUnlockThisModeForNextAction:"Click to unlock this mode for next action",ManipulateGroup:"Ölçeklendirme",ClearScene:"Herşeyi Sil",ShowSunAndTimeSettings:"Güneş & Zaman Ayarlarını Göster",SpatialAnalysisOfEnergy:"Spatial analysis of energy",DoYouReallyWantToClearContent:"İçeriği silmek istiyor musunuz",ClickForMoreButtons:"Daha fazla buton için tıklayın"},tooltip:{gotoIFI:"Yarının Zekası Enstitüsüne Git",visitAladdinHomePage:"Aladdin Ana Sayfasını Ziyaret Edin",clickToOpenMenu:"Ana Menüyü Açmak İçin Tıklayınız",clickToAccessAccountSettings:"Click to access account settings"},tree:{Apple:"Apple",Birch:"Birch",Coconut:"Coconut",Dogwood:"Kızılcık Ağacı",Elm:"Karaağaç",FanPalm:"Fan Palm",Linden:"Ihlamur Ağacı",Magnolia:"Magnolia",Maple:"Akçaağaç",Oak:"Meşe Ağacı",Pine:"Çam",Spruce:"Alaçam"},flower:{Bellflower:"Bellflower",Boxwood:"Boxwood",CactusCombo1:"Cactus Combo 1",CactusCombo2:"Cactus Combo 2",CactusCombo3:"Cactus Combo 3",CactusCombo4:"Cactus Combo 4",Hibiscus:"Hibiscus",Hosta:"Hosta",Hydrangea:"Hydrangea",Peony:"Peony",RedRose:"Red Rose",Spirea:"Spirea",Sunflower:"Sunflower",TallBush:"Tall Bush",Tulip:"Tulip",WhiteFlower:"White Flower",YellowFlower:"Yellow Flower"},people:{Jaah:"Ata",Jack:"Mete",Jacob:"Jacob",Jacqueline:"Beril",Jade:"Ece",Jamelia:"Bilge",James:"James",Jane:"Jane",Jaya:"Asya",Jaye:"Aylin",Jeanette:"Jeanette",Jedi:"Alp",Jeff:"Kaya",Jena:"Nehir",Jennifer:"Defne",Jess:"Zeynep",Jett:"Umut",Jill:"Jill",Jiya:"Elif",Joan:"Ezgi",Jocelyn:"Jocelyn",Joel:"Cenk",Joey:"Azra",John:"Can",Jonathon:"Jonathon",Jose:"Mert",Joseph:"Joseph",Joshua:"Joshua",Judd:"Ozan",Judy:"Judy",Julia:"Julia",Julio:"Bulut",Jumapili:"Umay",June:"Naz",Juro:"Efe",Justin:"Justin"},compass:{N:"N",S:"S",W:"W",E:"E"},month:{January:"Jan",February:"Feb",March:"Mar",April:"Apr",May:"May",June:"Jun",July:"Jul",August:"Aug",September:"Sep",October:"Oct",November:"Nov",December:"Dec"},modelsMap:{AllTime:"All Time",SearchByPublisher:"Search by publisher",SearchByLabel:"Search by label",MyPublishedModels:"My Published Models",TotalNumberOfUserPublishedModelsInSelectedPeriod:"Total number of user-published models in the selected period",AllTimeTotal:"All-time total",SortFromOldestToNewest:"Sort from oldest to newest",SortFromNewestToOldest:"Sort from newest to oldest",SitesFound:"sites found",ModelsFoundOnThisSite:"models found on this site",ShowModelsPublishedByThisAuthor:"Show the models published by this author"}}},ypt={translation:{name:{IFI:"Інститут Інтелекту Майбутнього",Aladdin:"Aladdin",Tagline:"Aladdin: Переосмислення Дизайну з Пояснювальним Штучним Інтелектом - Інститут Інтелекту Майбутнього"},cookie:{Statement:"Натиснувши «Прийняти», ви погоджуєтеся з використанням файлів cookie для покращення вашого досвіду з Aladdin.",Accept:"Прийняти"},aboutUs:{ProductBroughtToYouBy:"Цей Продукт Було Створено:",TermsOfService:"Умови Використання",PrivacyPolicy:"Політика Конфіденційності",Software:"Програмне Забезпечення",Content:"Матеріали",Research:"Дослідження",Support:"Підтримка",Acknowledgment:"Подяка",FundingInformation:"Національний Науковий Фонд (ННФ, Cполучені Штати Америки) надав фінансову підтримку для дослідження та розробки цього продукту за допомогою грантів №2105695, №2131097, та №#2301164. Однак, будь-які погляди, результати та висновки, висловлені у продукті, належать авторам і можуть не повністю відображати погляди ННФ.",Contact:"Для отримання додаткової інформації, будь ласка, зверніться до Charles Xie (charles@intofuture.org).",Translators:"Переклад"},word:{BrandName:"Brand Name",Name:"Name",Refresh:"Refresh",LastUpdate:"Last Update",Small:"Small",Medium:"Medium",Large:"Large",Design:"Design",Information:"Information",Type:"Type",Text:"Текст",FontSize:"Розмір Шрифту",FontColor:"Колір Шрифту",Model:" Модель",Models:"Моделі",Upload:"Завантажити",ClickCount:"Натисніть Підрахувати",Share:"Поділитись",AlreadyLike:"Вподобано",Like:"Вподобати",MustLogInToLike:"Потрібно Увійти, щоб Вподобати",AllRightsReserved:"Усі Права Захищено",MeterAbbreviation:"м",VoltAbbreviation:"V",AmpereAbbreviation:"A",WattAbbreviation:"W",Version:"Версія",VersionInitial:"В",Options:"Опції",Maximum:"Максимум",Minimum:"Мінімум",MaximumNumber:"Максимальне Число",MinimumNumber:"Мінімальне Число",MaximumValue:"Максимальне Значення",MinimumValue:"Мінімальне Значення",Or:"Або",None:"Жоден",High:"Високий",Partial:"Частковий",Teacher:"Вчитель",Class:"Клас",Total:"Всього",Leaderboard:"Таблиця Лідерів",Latest:"Останнє",Range:"Діапазон",SIUnit:"SI Одиниця",USUnit:"US Одиниця",ThermalTransmittance:"Теплопередача",ThermalResistance:"Термічний Опір",UValue:"U-Значення",RValue:"R-Значення",VolumetricHeatCapacity:"Об'ємна Теплоємність",BuildingHVACSystem:"Побудова Системи Опалення, Вентиляції та Кондиціювання Повітря (ОВК)",ThermostatSetpoint:"Задана Температура Термостата",TemperatureToleranceThreshold:"Порогове Значення Допустимого Відхилення Температури",TemperatureToleranceThresholdExplanation:"Обігрівач не працюватиме, якщо найнижча зовнішня температура дня вища за значення отриманe, якщо від заданої температури відняти порогове значення. Кондиціонер не працюватиме, якщо найвища зовнішня температура дня нижча за значення отримане, якщо від заданої температури відняти порогове значення.",Press:"Натисніть",Open:"Відкрити",Save:"Зберегти",SaveAsImage:"Зберегти як Зображення",SaveAsCsv:"Зберегти як CSV",Update:"Оновити",Paste:"Вставити",Copy:"Копіювати",Cut:"Вирізати",Delete:"Видалити",Add:"Add",Lock:"Заблокувати",Translucent:"Півпрозорий",Transparency:"Transparency",Color:"Колір",Pattern:"Pattern",Texture:"Текстура",Size:"Розмір",Thickness:"Товщина",Yes:"Так",No:"Ні",OK:"ОК",Cancel:"Скасувати",Apply:"Застосувати",Close:"Закрити",ApplyTo:"Застосувати До",Run:"Запустити",Pause:"Пауза",Resume:"Відновити",Clear:"Очистити",Warning:"Попередження",Caution:"Обережно",Reminder:"Нагадування",Length:"Довжина",Width:"Ширина",Height:"Висота",Radius:"Радіус",Angle:"Кут",Azimuth:"Азимут",Coordinates:"Координати",Weather:"Погода",Show:"Показати",Animate:"Анімувати",Date:"Дата",Time:"Час",Title:"Заголовок",Owner:"Власник",Action:"Дія",Rename:"Перейменувати",Location:"Місцезнаходження",Latitude:"Широта",Month:"Місяць",Day:"День",Hour:"Година",Daylight:"Денне світло",Radiation:"Радіаційне Випромінювання",Temperature:"Температура",kWh:"кВт-год",dollar:"долар",MeterPerSecond:"м/с",NorthInitial:"Північ",SouthInitial:"Південь",EastInitial:"Схід",WestInitial:"Захід",Fixed:"Фіксований",Elements:"Елементи",Energy:"Енергія",Unknown:"Невідомо",Label:"Мітка",Description:"Опис",NoDescription:"Без опису",MaximumCharacters:"Максимальна кількість символів",Author:"Автор",Publisher:"Видавець",Building:"Будівля",ResidentialBuilding:"Житлова будівля",CommercialBuilding:"Комерційна будівля",SchoolBuilding:"Шкільна будівля",TouristAttraction:"Туристична визначна пам'ятка",UnderConstruction:"В стадії будівництва",Photovoltaic:"Фотоелектричний",WindPower:"Wind Power",ColocationProjects:"Colocation Projects",Anonymous:"Анонімний",Nickname:"Нікнейм",Pin:"Закріпити",Unpin:"Відкріпити"},shared:{NoTexture:"Без текстури",FoundationElement:"Фундамент",CuboidElement:"Паралелепіпед",PolygonElement:"Багатокутник",SensorElement:"Сенсор",SolarPanelElement:"Сонячна панель",SolarWaterHeaterElement:"Водонагрівач",ParabolicDishElement:"Параболічна тарілка",ParabolicTroughElement:"Параболічний сонячний колектор",FresnelReflectorElement:"Відбивач Френеля",HeliostatElement:"Геліостат",WindTurbineElement:"Вітрова турбіна",LightElement:"Світло",ElementLocked:"Заблоковано",ModelType:"Тип моделі",OutputBreakdown:"Breakdown",MoreResults:"More Results"},message:{NewVersionAvailable:"A new version is available",CalculationMayBeSlowDoYouWantToContinue:"Calculation may be slow. Do you want to continue?",IncreaseSolarRadiationHeatmapGridCellSizeToSpeedUp:"Increase solar radiation heatmap grid cell size to speed up",ModelNotFound:"Модель не знайдено",CannotSignIn:"Не вдається увійти",CannotSignOut:"Не вдається вийти",YourAccountWasCreated:"Ваш обліковий запис був створений",CannotCreateAccount:"Не вдається створити обліковий запис",YourAccountSettingsWereSaved:"Налаштування облікового запису були збережені",CannotSaveYourAccountSettings:"Не вдається зберегти налаштування облікового запису",CannotSaveYourFileToCloud:"Не вдається зберегти ваш файл у хмарному середовищі",CannotCreateNewProject:"Не вдається створити новий проєкт",CannotCreateNewProjectWithoutTitle:"Cannot create a new project without a title",CannotOpenYourProjects:"Не вдається відкрити ваші проєкти",CannotOpenProject:"Cannot open the project",CannotDeleteProject:"Cannot delete the project",CannotRenameProject:"Cannot rename the project",CannotAddDesignToProject:"Cannot add this design to the project",CannotAddDesignToProjectOwnedByOthers:"Cannot add this design to a project owned by others",DesignRemovedFromProject:"The design was successfully removed from the project",CannotRemoveDesignFromProject:"Cannot remove this design from the project",CannotUpdateProject:"Cannot update the project",CannotFetchProjectData:"Cannot fetch project data",TitleUsedChooseDifferentOne:"Ця назва була використана. Виберіть іншу",CloudFileWithTitleExistsDoYouWantToOverwrite:"Хмарний файл з такою ж назвою вже існує. Ви хочете перезаписати його?",CloudFileNotFound:"Файл у хмарному середовищі не знайдено",CannotLoadModelsOnMap:"Не вдається завантажити моделі на карту",CannotLoadLeaderboard:"Не вдається завантажити таблицю лідерів",CannotPublishModelOnMap:"Не вдається опублікувати модель на карті",CannotLikeModelFromMap:"Не вдається оцінити модель з карти",CannotDeleteModelFromMap:"Не вдається видалити модель з карти",ModelDeletedFromMap:"Модель видалена з карти",DoYouWantToDeleteModelFromMap:"Ви бажаєте видалити модель з карти?",CannotOpenCloudFile:"Не вдається відкрити файл у хмарному середовищі",CannotReadCloudFile:"Cannot read the cloud file",CannotWriteCloudFile:"Cannot write the cloud file",CloudFileCopied:"Cloud file copied",CannotOpenCloudFolder:"Не вдається відкрити папку у хмарному середовищі",CannotDeleteCloudFile:"Не вдається видалити файл у хмарному середовищі",CannotRenameCloudFile:"Не вдається перейменувати файл у хмарному середовищі",DoYouWantToSaveChanges:"Бажаєте зберегти зміни?",NotApplicableToSelectedAction:"Не застосовується до обраної дії",ThisElementIsLocked:"Цей елемент заблокований.",ThisCannotBeUndone:"Це не можна скасувати.",AzimuthOfNorthIsZero:"Азимут півночі дорівнює 0°",CounterclockwiseAzimuthIsPositive:"Азимут є позитивним проти годинникової стрілки.",SouthFacingIsZero:"South-facing is 0°",ClockwiseRotationIsPositive:"Clockwise is positive",MoveCancelledBecauseOfOverlap:"Переміщення скасовано через перекриття.",MoveOutsideBoundaryCancelled:"Переміщення за межі скасовано.",RotationCancelledBecauseOfOverlap:"Ротацію скасовано через перекриття.",RotationOutsideBoundaryCancelled:"Ротація за межі скасована.",ResizingCancelledBecauseOfOverlap:"Зміна розміру скасована через перекриття.",ResizingOutsideBoundaryCancelled:"Зміна розміру за межі скасована.",CannotPasteOutsideBoundary:"Не можна вставити за межі.",CannotPasteBecauseOfOverlap:"Не можна вставити через перекриття.",CannotMoveObjectTooFar:"Не можна перемістити об'єкт занадто далеко.",ExistingSolarPanelsWillBeRemovedBeforeApplyingNewLayout:"Існуючі сонячні панелі будуть видалені перед застосуванням нового макету.",DoYouWantToContinue:"Бажаєте продовжити?",SolarPanelsCannotIntersectWithGround:"Сонячні панелі не можуть перетинатися з землею.",SolarPanelsCannotOverlapWithOneAnother:"Сонячні панелі не можуть накладатися одна на одну.",ScreenshotSaved:"Знімок екрана збережено.",CsvFileSaved:"CSV файл збережено.",SimulationStarted:"Розпочато симуляцію.",SimulationCompleted:"Симуляцію завершено.",SimulationAborted:"Симуляцію перервано.",SimulationPaused:"Симуляцію призупинено.",CancelSimulation:"Скасувати симуляцію",PauseSimulation:"Призупинити симуляцію",ResumeSimulation:"Продовжити симуляцію",SimulationWillNotStartDueToErrors:"Симуляція не розпочнеться через помилки",SimulationWillStartDespiteWarnings:"Симуляція розпочнеться незважаючи на попередження.",EvolutionStarted:"Еволюцію розпочато.",EvolutionCompleted:"Еволюцію завершено.",EvolutionAborted:"Еволюцію перервано.",EvolutionPaused:"Еволюцію призупинено.",EncounterEvolutionError:"Сталася помилка еволюції.",CancelEvolution:"Скасувати еволюцію",PauseEvolution:"Призупинити еволюцію",ResumeEvolution:"Продовжити еволюцію",ConvergenceThresholdHasBeenReached:"Досягнуто порогове значення збіжності.",MaximumNumberOfGenerationsHasBeenReached:"Досягнуто максимальну кількість поколінь.",MaximumNumberOfStepsHasBeenReached:"Досягнуто максимальну кількість кроків.",ObjectiveFunctionTypeError:"Поточна цільова функція не підтримується цією операцією. Будь ласка, розпочніть з меню.",WallsAreNotAtSameHeight:"Стіни не знаходяться на однаковій висоті.",WallsAreNotPerpendicular:"Стіни не перпендикулярні.",WallsAreNotConnected:"Стіни не з'єднані.",WallsNumberNeedToBeFour:"Кількість стін має дорівнювати чотири.",BuildingContainsEmptyWall:"Будівля містить одну або кілька порожніх стін.",BuildingRoofMissing:"У будівлі відсутній дах.",UnknownErrors:"Невідомі помилки.",SigningOutAnonymousAccount:"Are you sure you want to sign out? This anonymous account will be lost."},menu:{AnalysisOptions:"Опції аналізу",option:{GridCellSize:"Розмір комірки сітки",SamplingFrequency:"Частота вибірки",TimesPerHour:"Разів на годину",DaysPerYear:"Днів на рік"},mainMenu:"Головне Меню",cloudMenu:"Меню Хмарного Середовища",projectSubMenu:"Проєкт",project:{CreateNewProject:"Створити Новий Проєкт",OpenProject:"Відкрити Проєкт",SaveProject:"Save Project",SaveProjectAs:"Save Project As",YouMustLogInToCreateProject:"Ви повинні увійти, щоб створити новий проєкт",YouMustLogInToOpenProject:"Ви повинні увійти, щоб відкрити проєкт"},fileSubMenu:"Файл",file:{CreateNewFile:"Створити новий",OpenLocalFile:"Відкрити локально",SaveAsLocalFile:"Зберегти як",SavingAbortedMustHaveValidFileName:"Збереження перервано! Вам потрібно мати дійсне ім'я файлу",OpenCloudFile:"Відкрити у хмарному середовищі",SaveCloudFile:"Зберегти у хмарному середовищі",SaveAsCloudFile:"Зберегти у хмарному середовищі",SavingAbortedMustHaveValidTitle:"Збереження перервано! Вам потрібно мати дійсний заголовок для хмарного файлу",ToSaveYourWorkPleaseSignIn:"Щоб зберегти вашу роботу, будь ласка, увійдіть в систему.",TakeScreenshot:"Зробити знімок екрана",UseCloudFileName:"Використовувати ім'я файлу у хмарному середовищі",PublishOnModelsMap:"Опублікувати на карті моделей",PublishedOnModelsMap:"Вашу модель було опубліковано на карті моделей",UpdatedOnModelsMap:"Ваша модель була оновлена на карті моделей",YouMustLogInToPublishYourModel:"Вам потрібно увійти в систему, щоб опублікувати свою модель",YouCannotPublishAModelThatYouDoNotOwn:"Ви не можете опублікувати модель, якою не володієте",YouMustSaveModelOnCloudBeforePublishingIt:"Вам потрібно зберегти модель у хмарному середовищі перед її публікацією"},editSubMenu:"Редагувати",edit:{Undo:"Скасувати",Redo:"Повторити"},viewSubMenu:"Перегляд",view:{NavigationView:"Navigation View",TwoDimensionalView:"2D Вигляд",ResetView:"Скинути",ZoomIn:"Збільшити масштаб",ZoomOut:"Зменшити масштаб",AutoRotate:"Автоматичний поворот",ShowShadow:"Показати тінь",ShowSurfaceShininess:"Показати блиск поверхні",TranslucentFloatingWindows:"Напівпрозорі плаваючі вікна",accessoriesSubMenu:"Додаткові елементи",accessories:{SiteInformation:"Інформація про місце",DesignInformation:"Інформація про дизайн",Instruction:"Інструкція",StickyNote:"Примітка",Note:"Примітка"}},settingsSubMenu:"Налаштування",settings:{WeatherData:"Дані про погоду",DiurnalTemperature:"Добова температура",Heliodon:"Геліодон",SunAndTime:"Сонце та час",CustomSolarPanels:"Custom Solar Panels",CustomizeSolarPanel:"Customize Solar Panel"},benchmarksSubMenu:"Бенчмарки",benchmarks:{SolarRadiationPredictionVsMeasurement:"Прогнозування сонячної радіації порівняно з вимірюванням",BESTESTCase600:"Тестування енергоефективності будівель: BESTEST Case 600",BESTESTCase610:"Тестування енергоефективності будівель: BESTEST Case 610",BESTESTCase620:"Тестування енергоефективності будівель: BESTEST Case 620",BESTESTCase630:"Тестування енергоефективності будівель: BESTEST Case 630"},graph:{LineWidth:"Товщина лінії",SymbolSize:"Розмір символу",BarCategoryGap:"Відступ категорій стовпців",ShowHorizontalGridLines:"Показати горизонтальні лінії сітки",ShowVerticalGridLines:"Показати вертикальні лінії сітки"},analysisSubMenu:"Аналіз",physicsSubMenu:"Фізика",physics:{DailySolarRadiationHeatmap:"Щоденна карта сонячної радіації",SolarRadiationHeatmapOptions:"Параметри карти сонячної радіації",SolarRadiationHeatmapGridCellSize:"Розмір комірки на карті сонячної радіації",SolarRadiationHeatmapMaxValue:"Максимальне значення на карті",SolarRadiationHeatmapNoAnimation:"Немає анімації для статичної моделі",ReflectionHeatmap:"Карта відображень"},sensorSubMenu:"Датчик",sensor:{CollectDailyData:"Збирати щоденні дані",CollectYearlyData:"Збирати щорічні дані",SensorSimulationNoAnimation:"Немає анімації для збору даних датчика"},buildingSubMenu:"Будівля",building:{AnalyzeDailyBuildingEnergy:"Аналізувати щоденну енергію будівлі",AnalyzeYearlyBuildingEnergy:"Аналізувати щорічну енергію будівлі",EnergyAnalysisOptions:"Параметри аналізу енергії",EnergyGridCellSize:"Розмір комірки сітки",BuildingEnergySimulationNoAnimation:"Немає анімації симулювати енергію будівлі"},solarPanelSubMenu:"Сонячна панель",solarPanel:{AnalyzeDailyYield:"Аналізувати щоденний дохід",AnalyzeYearlyYield:"Аналізувати щорічний дохід",AnalyzeVisibility:"Аналізувати видимість",PanelDiscretization:"Дискретизація панелі",Exact:"Точний",Approximate:"Наближений",EnergyGridCellSize:"Розмір комірки сітки енергії",VisibilityGridCellSize:"Розмір комірки сітки коефіцієнта видимості",EnergyAnalysisOptions:"Параметри аналізу енергії",VisibilityAnalysisOptions:"Параметри аналізу видимості",SolarPanelSimulationNoAnimation:"Немає анімації для симуляції сонячної панелі"},parabolicTroughSubMenu:"Параболічний сонячний колектор",parabolicTrough:{AnalyzeDailyYield:"Аналізувати щоденний дохід",AnalyzeYearlyYield:"Аналізувати щорічний дохід"},parabolicDishSubMenu:"Параболічний диск",parabolicDish:{AnalyzeDailyYield:"Аналізувати щоденний дохід",AnalyzeYearlyYield:"Аналізувати щорічний дохід"},fresnelReflectorSubMenu:"Відбивач Френеля",fresnelReflector:{AnalyzeDailyYield:"Аналізувати щоденний дохід",AnalyzeYearlyYield:"Аналізувати щорічний дохід"},heliostatSubMenu:"Геліостат",heliostat:{AnalyzeDailyYield:"Аналізувати щоденний дохід",AnalyzeYearlyYield:"Аналізувати щорічний дохід"},solarUpdraftTowerSubMenu:"Сонячна вежа з використаним повітрям",solarUpdraftTower:{AnalyzeDailyYield:"Аналізувати щоденний дохід",AnalyzeYearlyYield:"Аналізувати щорічний дохід",SolarUpdraftTowerSimulationNoAnimation:"Немає анімації симулювати сонячну вежу з використаним повітрям"},tutorialsSubMenu:"Посібники",solarEnergyScienceSubMenu:"Сонячна наука",solarEnergyScienceTutorials:{SunAngles:"Кути сонця відносно спостерігача на землі",InsolationAndClimate:"Інсоляція та клімат",SolarRadiationToBox:"Сонячна радіація в коробку"},buildingScienceSubMenu:"Наука про будівлі",buildingScienceTutorials:{ThermalEnvelopeVsBuildingEnvelope:"Теплозахисна оболонка проти будівельної оболонки",EffectOfSizeOnBuildingEnergy:"Вплив розміру на енергію будівлі",EffectOfOrientationOnBuildingEnergy:"Вплив орієнтації на енергію будівлі",EffectOfInsulationOnBuildingEnergy:"Вплив інсоляції на енергію будівлі",EffectOfRoofColorOnBuildingEnergy:"Вплив кольору даху на енергію будівлі",EffectOfEavesOverhangLengthOnBuildingEnergy:"Вплив довжини виступу карнизу на енергію будівлі",EffectOfWindowSHGCOnBuildingEnergy:"Вплив коефіцієнта сонячного теплозиску вікна на енергію будівлі",EffectOfThermostatSetpointOnBuildingEnergy:"Вплив заданої температури на термостаті на енергію будівлі",EffectOfSolarPanelsOnBuildingEnergy:"Вплив сонячних панелей на енергію будівлі",EffectOfGroundTemperatureOnBuildingEnergy:"Вплив температури грунту на енергію будівлі",EffectOfTreesOnBuildingEnergy:"Вплив дерев на енергію будівлі"},buildingDesignSubMenu:"Дизайн будівлі",buildingDesignTutorials:{CapeCodStyleHouseWithShedDormer:'Будинок у стилі Кейп Код з пристроєм типу "шед-дормер"',MansardRoofWithDormers:"Мансарда з горизонтальними пристроями",GableRoofVsHipRoof:"Схиловий дах проти двосхилих дахів",ColonialVsSaltbox:"Колоніальний стиль проти стилю Saltbox",GambrelRoofVsMansardRoof:"Півшаровий дах проти мансардного даху",CombinationRoofVsBonnetRoof:"Комбінований дах проти капотного даху",DutchGableRoof:"Голландський дах з рикетом",GableAndValleyRoof:"Схиловий та долинний дах",ClerestoryRoof:"Клересторний дах",MonitorRoof:"Моніторний дах",AFrameHouse:'Будинок у формі літери "А"',HalfTimberedHouse:"Будинок з напівдерев'яними стінами",AllBasicRoofTypes:"Усі основні типи дахів"},photovoltaicSolarPowerSubMenu:"Фотоелектрична сонячна енергія",photovoltaicSolarPowerTutorials:{EffectOfTiltAngleOfSolarPanel:"Вплив кута нахилу сонячної панелі",EffectOfAzimuthOfSolarPanel:"Вплив азимуту сонячної панелі",SolarPanelTypes:"Типи сонячних панелей",DefineYourOwnSolarPanels:"Define Your Own Solar Panels",VerticalBifacialSolarPanels:"Vertical Bifacial Solar Panels",CompareMonofacialAndBifacialSolarPanels:"Monofacial vs. Bifacial Solar Panels",SolarTrackers:"Сонячні трекери",CoveringGroundWithSolarPanels:"Чому просто покриття землі сонячними панелями - не найкраща ідея",InterRowSpacingOfSolarPanelArray:"Вплив міжрядного простору в масиві сонячних панелей",EffectOfOrientationOfSolarPanels:"Вплив орієнтації сонячних панелей",SolarPanelArrayAutomaticLayout:"Автоматичне розміщення масиву сонячних панелей"},concentratedSolarPowerSubMenu:"Концентрована сонячна енергія",concentratedSolarPowerTutorials:{EffectOfAzimuthOfParabolicTrough:"Вплив азимуту параболічного сонячного колектора",EffectOfLatusRectumOfParabolicTrough:"Вплив прямої лінії на параболічний сонячний колектор",FocusSunlightWithParabolicDish:"Фокусування сонячного світла за допомогою параболічного диску",LinearFresnelReflectors:"Лінійні відбивачі Френеля",EffectOfAbsorberPipeHeightForLinearFresnelReflectors:"Вплив висоти поглинаючої трубки на лінійні відбивачі Френеля",EffectOfAzimuthOfLinearFresnelReflectors:"Вплив азимуту на лінійні відбивачі Френеля",LinearFresnelReflectorsWithTwoAbsorbers:"Лінійні відбивачі Френеля з двома поглинаючими елементами",CosineEfficiencyOfHeliostats:"Косинусна ефективність геліостатів",ShadowingAndBlockingOfHeliostats:"Затінення та блокування геліостатів",EffectSolarPowerTowerHeight:"Вплив висоти сонячної вежі з використаним повітрям",SolarPowerTower:"Сонячна вежа з використаним повітрям"},otherTypesOfSolarPowerSubMenu:"Інші типи сонячної енергії",otherTypesOfSolarPowerTutorials:{SolarWaterHeaters:"Solar Water Heaters",SolarUpdraftTower:"Сонячна вежа з використаним повітрям"},windPowerSubMenu:"Wind Power",windPowerTutorials:{EffectOfBladeNumberOfWindTurbine:"Effect of Blade Number of Wind Turbine",EffectOfPitchAngleOfWindTurbineBlades:"Effect of Pitch Angle of Wind Turbine Blades",BirdSafeBladeDesign:"Bird-Safe Blade Design",OffshoreWindFarm:"Offshore Wind Farm"},colocationSubMenu:"Colocation",colocationTutorials:{AgricultureSolarWindColocation:"Agriculture-Solar-Wind Colocation"},generativeDesignSubMenu:"Generative Design",generativeDesignTutorials:{MonofacialSolarPanelArrayTiltAngle:"The Tilt Angle of a Monofacial Solar Panel Array",BifacialSolarPanelArrayTiltAngle:"The Tilt Angle of a Bifacial Solar Panel Array",OutputOfSolarPanelArrayInDifferentPlaces:"The Output of a Solar Panel Array in Different Places",SimpleSolarFarmParetoFront:"The Pareto Front for Designing a Simple Solar Farm"},examplesSubMenu:"Приклади",solarEnergySubMenu:"Сонячна енергія",solarEnergyExamples:{SunBeamAndHeliodon:"Промінь сонця та геліодон",RooftopSolarPanels:"Сонячні панелі на даху",NevadaSolarOneParabolicTroughArray:"Масив параболічних сонячних колекторів Nevada Solar One",TooeleParabolicDishArray:"Масив параболічних тарілок Tooele",PS10SolarPowerTower:"Сонячна енергетична вежа PS10",TucsonLinearFresnelReflectors:"Лінійні відбивачі Френеля в Tucson",SolarCanopyFormFactors:"Форми сонячних козирків",SolarCanopyOverBleachers:"Сонячний козирок над трибунами",SolarCanopyOverGarage:"Сонячний козирок над гаражем",SolarBusStop:"Сонячна автобусна зупинка",SolarFacadeTesla:"Сонячна фасадна панель Tesla",BuildingIntegratedPhotovoltaics:"Вбудовані фотоелектричні системи в будівлі",Floatovoltaics:"Сонячні панелі на плавучих платформах",Agrivoltaics:"Агровольтаїка",VegetativeBuffer:"Вегетативна зона",RainbowSwashSolarFarmBostonMA:"Сонячна ферма Rainbow Swash в Boston, MA",MickeyMouseSolarFarmOrlandoFL:"Сонячна ферма Міккі Мауса в Orlando, FL",SolarPanelsOverCanalBakersfieldCA:"Сонячні панелі над каналом в Bakersfield, CA",SolarNoiseBarrierLexingtonMA:"Сонячний шумовий бар'єр в Lexington, MA",HSATSolarTrackersRaleighNC:"Сонячні трекери з горизонтальною віссю в Raleign, NC",AADATSolarTrackersLancasterCA:"Сонячні трекери з азимутальною-вертикальною віссю в Lancaster, CA",SolarUpdraftTowerInCity:"Сонячна вежа з використаним повітрям у місті"},builtEnvironmentSubMenu:"Забудоване середовище",residentialBuildingsSubMenu:"Житлові будівлі",residentialBuildingExamples:{ColonialHouse:"Колоніальний будинок",DutchColonialHouse:"Голландський колоніальний будинок",TShapedHouse:"Будинок у формі літери Т",CapeCodHouseWithGarage:"Будинок у стилі Cape Cod з гаражем",Solarium:"Солярій",Church1:"Церква 1",Cathedral1:"Собор 1",Cathedral2:"Собор 2",Mosque1:"Мечеть 1",AdobeTaosHouse:"Будинок з адобе в стилі Taos",RanchHouse:"Ranch House",BonnetHouse:"Будинок в стилі Bonnet",BarnStyleHouse:"Будинок у стилі амбара",ModernHouse:"Сучасний будинок",ButterflyRoofHouse:"Будинок з метеликовим дахом"},commercialBuildingsSubMenu:"Комерційні будівлі",commercialBuildingExamples:{WhiteHouse:"Білий Дім",HaroldWashingtonCollege:"Harold Washington College",BilimMersinTurkiye:"Bilim, Mersin, Туреччина",SpanishStyleHotel:"Готель в іспанському стилі",ApartmentBuilding:"Багатоквартирний будинок",OfficeBuilding:"Офісна будівля",Hotel:"Готель"},buildingComplexesSubMenu:"Будівельні комплекси",buildingComplexExamples:{SouthBurlingtonHighSchoolVermont:"South Burlington High School, Vermont",MescaleroApacheSchoolNewMexico:"Mescalero Apache School, New Mexico"},urbanPlanningSubMenu:"Міське планування",urbanPlanningExamples:{CityBlockHeatmap:"City Block Heatmap",ChicagoSkyline:"Chicago Skyline"},otherBuildingsSubMenu:"Інші будівлі",otherBuildingExamples:{Greenhouse:"Теплиця",Pavilion:"Павільйон у парку",OctagonalPagoda:"Восьмикутна пагода",OceanFront:"Будівля біля океану",EgyptianPyramids:"Єгипетські піраміди",MayanPyramid:"Піраміда Мая",SiOSePol:"Si-O-Se-Pol",StackedCuboids:"Стековані кубоїди"},artificialIntelligenceSubMenu:"Штучний інтелект",artificialIntelligenceExamples:{OptimizingTiltAngleOfOneSolarPanelRow:"Оптимізація кута нахилу одного ряду сонячних панелей",OptimizingTiltAnglesOfMultipleSolarPanelRows:"Оптимізація кутів нахилу декількох рядів сонячних панелей",SolarFarmGenerativeDesign:"Генеративний дизайн сонячної ферми",SolarFarmGenerativeDesignWithBlock:"Генеративний дизайн сонячної ферми в присутності перешкоди",FitchburgSolarFarmGenerativeDesign:"Генеративний дизайн сонячної ферми у Fitchburg"},languageSubMenu:"Мова",publicSubMenu:"Загальнодоступно",ModelsGallery:"Галерея моделей",ModelsMap:"Карта моделей",AboutUs:"Про нас"},avatarMenu:{AccountSettings:"Налаштування облікового запису",PrivacyStatementTitle:"User Privacy Protection Statement",PrivacyStatement:"Коли ви увійдете, ваш Google ID використовується для створення та доступу до вашого облікового запису Aladdin. В нашій базі даних зберігається лише випадковий алфавітно-цифровий рядок як посилання. Ми ніколи не збираємо особисто ідентифіковану інформацію, таку як ваше ім'я або електронна пошта. Для отримання додаткової інформації ознайомтесь з нашою ",SignIn:"Увійти",SignInAsMe:"Sign in as me",SignInAnonymously:"Sign in anonymously",SignOut:"Вийти",IfYouAreAStudent:"Якщо ви студент"},skyMenu:{Axes:"Вісі",Theme:"Тематика",ThemeDefault:"За замовчуванням",ThemeDesert:"Пустеля",ThemeDune:"Дюна",ThemeForest:"Ліс",ThemeGrassland:"Степ",ThemeHill:"Пагорб",ThemeLake:"Озеро",ThemeMountain:"Гора",ThemeRural:"Сільська місцевість",SunlightAttenuationCoefficientInAir:"Коефіцієнт затухання сонячного світла у повітрі",ConvectiveCoefficientOfAir:"Коефіцієнт конвекції повітря",HighestTemperatureTimeInMinutes:"Час найвищої температури (хвилини)",SelectSunAnglesToShow:"Виберіть кути сонця, які показати",ShowAzimuthAngle:"Показати азимутний кут",ShowElevationAngle:"Показати висотний кут",ShowZenithAngle:"Показати зенітний кут",DirectLightBrightnessAtNoon:"Direct Light Brightness at Noon",AmbientLightBrightnessAtNoon:"Ambient Light Brightness at Noon"},groundMenu:{MonthlyIrradianceLoss:"Monthly Irradiance Loss",Vegetation:"Рослинність",LeafOutDay:"День розпускання листя",LeafOffDay:"День опадання листя",Albedo:"Альбедо",ImageOnGround:"Зображення на поверхні",WaterSurface:"Поверхня води",RemoveAllUnlockedTrees:"Видалити всі розблоковані дерева",RemoveAllUnlockedFlowers:"Видалити всі розблоковані квіти",RemoveAllUnlockedSolarPanels:"Remove All Unlocked Solar Panels",RemoveAllUnlockedPeople:"Видалити всіх розблокованих людей",RemoveAllUnlockedFoundations:"Видалити всі розблоковані фундаменти",RemoveAllUnlockedCuboids:"Видалити всі розблоковані кубоїди",DoYouReallyWantToRemoveAllPeople:"Ви дійсно хочете видалити всіх людей, що не заблоковані",DoYouReallyWantToRemoveAllTrees:"Ви дійсно хочете видалити всі дерева, що не заблоковані",DoYouReallyWantToRemoveAllFlowers:"Ви дійсно хочете видалити всі квіти, що не заблоковані",DoYouReallyWantToRemoveAllSolarPanels:"Do you really want to remove all the solar panels that are not locked",DoYouReallyWantToRemoveAllFoundations:"Ви дійсно хочете видалити всі фундаменти, що не заблоковані",DoYouReallyWantToRemoveAllCuboids:"Ви дійсно хочете видалити всі кубоїди, що не заблоковані",LockAllUnlockedElements:"Lock All Unlocked Elements",UnlockAllLockedElements:"Unlock All Locked Elements"},labelSubMenu:{Label:"Мітка",LabelText:"Текст мітки",LabelHeight:"Висота мітки",LabelSize:"Розмір мітки",LabelFontSize:"Розмір шрифту",LabelColor:"Колір мітки",KeepShowingLabel:"Залишати видимою мітку"},foundationMenu:{RemoveAllUnlockedSolarPanels:"Видалити всі незаблоковані сонячні панелі",RemoveAllUnlockedParabolicTroughs:"Видалити всі незаблоковані параболічні сонячні колектори",RemoveAllUnlockedParabolicDishes:"Видалити всі незаблоковані параболічні антени",RemoveAllUnlockedFresnelReflectors:"Видалити всі незаблоковані відбивачі Френеля",RemoveAllUnlockedHeliostats:"Видалити всі незаблоковані геліостати",RemoveAllUnlockedWindTurbines:"Remove All Unlocked Wind Turbines",RemoveAllUnlockedSensors:"Видалити всі незаблоковані датчики",RemoveAllUnlockedLights:"Видалити всі незаблоковані освітлювальні прилади",RemoveAllUnlockedWalls:"Видалити всі незаблоковані стіни",RemoveAllUnlockedWindows:"Видалити всі незаблоковані вікна",RemoveAllUnlockedDoors:"Видалити всі незаблоковані двері",RemoveAllUnlockedPolygons:"Видалити всі незаблоковані полігони",RemoveAllUnlockedHumans:"Видалити всіх незаблокованих людей",RemoveAllUnlockedTrees:"Видалити всі незаблоковані дерева",RemoveAllUnlockedFlowers:"Видалити всі незаблоковані квіти",Racks:"Стелажі",Texture01:"Текстура 1",Texture02:"Текстура 2",Texture03:"Текстура 3",Texture04:"Текстура 4",Texture05:"Текстура 5",Texture06:"Текстура 6",Texture07:"Текстура 7",Texture08:"Текстура 8",Texture09:"Текстура 9",Texture10:"Текстура 10",SolarPanels:"Сонячні панелі",SolarPanelArray:"Solar Panel Array",DoYouReallyWantToRemoveAllSolarPanelsOnFoundation:"Ви дійсно бажаєте видалити всі сонячні панелі на цьому фундаменті, які не є заблокованими",ParabolicTroughs:"Параболічні сонячні колектори",DoYouReallyWantToRemoveAllParabolicTroughsOnFoundation:"Ви дійсно бажаєте видалити всі параболічні сонячні колектори на цьому фундаменті, які не є заблокованими",ParabolicDishes:"Параболічні антени",DoYouReallyWantToRemoveAllParabolicDishesOnFoundation:"Ви дійсно бажаєте видалити всі параболічні антени на цьому фундаменті, які не є заблокованими",FresnelReflectors:"Відбивачі Френеля",DoYouReallyWantToRemoveAllFresnelReflectorsOnFoundation:"Ви дійсно бажаєте видалити всі відбивачі Френеля на цьому фундаменті, які не є заблокованими",Heliostats:"Геліостати",DoYouReallyWantToRemoveAllHeliostatsOnFoundation:"Ви дійсно бажаєте видалити всі геліостати на цьому фундаменті, які не є заблокованими",WindTurbines:"Wind Turbines",DoYouReallyWantToRemoveAllWindTurbinesOnFoundation:"Do you really want to remove all the wind turbines on this foundation that are not locked",Sensors:"Датчики",DoYouReallyWantToRemoveAllSensorsOnFoundation:"Ви дійсно бажаєте видалити всі датчики на цьому фундаменті, які не є заблокованими",Lights:"Світильники",DoYouReallyWantToRemoveAllLightsOnFoundation:"Ви дійсно бажаєте видалити всі світильники на цьому фундаменті, які не є заблокованими",Walls:"Стіни",DoYouReallyWantToRemoveAllWallsOnFoundation:"Ви дійсно бажаєте видалити всі стіни на цьому фундаменті, які не є заблокованими",Windows:"Вікна",DoYouReallyWantToRemoveAllWindowsOnFoundation:"Ви дійсно бажаєте видалити всі вікна на цьому фундаменті, які не є заблокованими",Doors:"Двері",DoYouReallyWantToRemoveAllDoorsOnFoundation:"Ви дійсно бажаєте видалити всі двері на цьому фундаменті, які не є заблокованими",Polygons:"Багатокутники",DoYouReallyWantToRemoveAllPolygonsOnFoundation:"Ви дійсно бажаєте видалити всі багатокутники на цьому фундаменті, які не є заблокованими",Humans:"Люди",DoYouReallyWantToRemoveAllHumansOnFoundation:"Ви дійсно бажаєте видалити всіх людей на цьому фундаменті, які не є заблокованими",Trees:"Дерева",DoYouReallyWantToRemoveAllTreesOnFoundation:"Ви дійсно бажаєте видалити всі дерева на цьому фундаменті, які не є заблокованими",Flowers:"Квіти",DoYouReallyWantToRemoveAllFlowersOnFoundation:"Ви дійсно бажаєте видалити всі квіти на цьому фундаменті, які не є заблокованими",OnlyThisFoundation:"Тільки цей фундамент",AllConnectedFoundations:"Всі пов’язані фундаменти",AllSelectedFoundations:"All Selected Foundations",AllFoundations:"Всі фундаменти",AddPolygon:"Додати багатокутник",SolarStructure:"Вибрати сонячну структуру",GroupMaster:"Груповий майстер",LockAllUnlockedElementsOnThisFoundation:"Lock All Unlocked Elements on This Foundation",UnlockAllLockedElementsOnThisFoundation:"Unlock All Locked Elements on This Foundation",GroundFloorRValue:"Теплопровідність перекриття цокольного поверху",OnlyThisGroundFloor:"Тільки цокольний поверх",AllGroundFloors:"Всі цокольні поверхи"},solarPowerTowerMenu:{ReceiverTowerForHeliostats:"Вежа приймача для геліостатів",ReceiverTowerPhysicalProperties:"Фізичні властивості вежі приймача",ReceiverTowerHeight:"Висота вежі приймача",ReceiverTowerRadius:"Радіус вежі приймача",ReceiverAbsorptance:"Поглинання приймача",ReceiverOpticalEfficiency:"Оптична ефективність приймача",ReceiverThermalEfficiency:"Теплова ефективність приймача"},solarAbsorberPipeMenu:{AbsorberPipeForFresnelReflectors:"Трубопровід для відбивачів Френеля",AbsorberPipePhysicalProperties:"Фізичні властивості трубопроводу поглинання",AbsorberHeight:"Висота трубопроводу поглинання",AbsorberApertureWidth:"Ширина отвору трубопроводу поглинання",AbsorberPipePoleNumber:"Кількість полюсів для трубопроводу поглинання",AbsorberAbsorptance:"Сила поглинання",AbsorberOpticalEfficiency:"Оптична ефективність поглинача",AbsorberThermalEfficiency:"Теплова ефективність поглинача"},solarUpdraftTowerMenu:{SolarUpdraftTower:"Сонячна вежа з тяговим потоком",SolarUpdraftTowerPhysicalProperties:"Фізичні властивості сонячної вежі з тяговим потоком",SolarUpdraftTowerChimneyHeight:"Висота димової труби сонячної вежі з тяговим потоком",SolarUpdraftTowerChimneyRadius:"Радіус димової труби сонячної вежі з тяговим потоком",SolarUpdraftTowerCollectorHeight:"Висота колектора сонячної вежі з тяговим потоком",SolarUpdraftTowerCollectorRadius:"Радіус колектора сонячної вежі з тяговим потоком",SolarUpdraftTowerCollectorTransmissivity:"Проникність колектора сонячної вежі з тяговим потоком",SolarUpdraftTowerCollectorEmissivity:"Випромінюваність колектора сонячної вежі з тяговим потоком",SolarUpdraftTowerDischargeCoefficient:"Коефіцієнт викиду сонячної вежі з тяговим потоком",SolarUpdraftTowerTurbineEfficiency:"Ефективність турбіни сонячної вежі з тяговим потоком"},cuboidMenu:{Texture01:"Текстура 1",Texture02:"Текстура 2",Texture03:"Текстура 3",Texture04:"Текстура 4",Texture05:"Текстура 5",Texture06:"Текстура 6",Texture07:"Текстура 7",Texture08:"Текстура 8",Texture09:"Текстура 9",Texture10:"Текстура 10",RemoveAllUnlockedSolarPanels:"Видалити всі розблоковані сонячні панелі",RemoveAllUnlockedSensors:"Видалити всі розблоковані сенсори",RemoveAllUnlockedPolygons:"Видалити всі розблоковані полігони",RemoveAllUnlockedHumans:"Видалити всіх розблокованих людей",RemoveAllUnlockedTrees:"Видалити всі розблоковані дерева",RemoveAllUnlockedFlowers:"Видалити всі розблоковані квіти",RemoveAllUnlockedLights:"Remove All Unlocked Lights",Racks:"Стійки",Lights:"Lights",DoYouReallyWantToRemoveAllLightsOnCuboid:"Do you really want to remove all the lights on this cuboid that are not locked",SolarPanels:"Сонячні панелі",DoYouReallyWantToRemoveAllSolarPanelsOnCuboid:"Ви дійсно бажаєте видалити всі сонячні панелі на цьому кубоїді, які не заблоковані",Sensors:"Сенсори",DoYouReallyWantToRemoveAllSensorsOnCuboid:"Ви дійсно бажаєте видалити всі сенсори на цьому кубоїді, які не заблоковані",Polygons:"Полігони",DoYouReallyWantToRemoveAllPolygonsOnCuboid:"Ви дійсно бажаєте видалити всі полігони на цьому кубоїді, які не заблоковані",Humans:"Люди",DoYouReallyWantToRemoveAllHumansOnCuboid:"Ви дійсно бажаєте видалити всіх людей на цьому кубоїді, які не заблоковані",Trees:"Дерева",DoYouReallyWantToRemoveAllTreesOnCuboid:"Ви дійсно бажаєте видалити всі дерева на цьому кубоїді, які не заблоковані",Flowers:"Квіти",DoYouReallyWantToRemoveAllFlowersOnCuboid:"Ви дійсно бажаєте видалити всі квіти на цьому кубоїді, які не заблоковані",OnlyThisCuboid:"Тільки цей кубоїд",AllCuboidsOnSameSurface:"Усі кубоїди на одній поверхні",AllCuboidsAboveSameBase:"Усі кубоїди над тією ж основою",AllSelectedCuboids:"All Selected Cuboids",AllCuboids:"Всі кубоїди",OnlyThisSide:"Тільки ця сторона",AllSidesOfThisCuboid:"Всі сторони цього кубоїда",AllSidesOfSelectedCuboids:"All Sides of Selected Cuboids",AllSidesOfAllCuboids:"Всі сторони всіх кубоїдів",AddPolygon:"Додати полігон",Stackable:"Стекабельне",GroupMaster:"Майстер групи"},polygonMenu:{Texture01:"Текстура 1",Texture02:"Текстура 2",Texture03:"Текстура 3",Texture04:"Текстура 4",Texture05:"Текстура 5",Texture06:"Текстура 6",Texture07:"Текстура 7",Texture08:"Текстура 8",Texture09:"Текстура 9",Texture10:"Текстура 10",TextBox:"Текстове поле",FontOutlineColor:"Колір контуру шрифту",FontOutlineWidth:"Товщина контуру шрифту",FontStrokeColor:"Колір обводки шрифту",FontStrokeWidth:"Товщина обводки шрифту",NoOutline:"Без контуру",Shiny:"Блискучий",Filled:"Заповнений",FillTexture:"Текстура заповнення",FillColor:"Колір заповнення",Opacity:"Прозорість",LineColor:"Колір лінії",LineWidth:"Товщина лінії",LineStyle:"Стиль лінії",SolidLine:"Суцільна лінія",DashedLine:"Пунктирна лінія",DottedLine:"Точкова лінія",InsertVertexBeforeIndex:"Вставити вершину перед індексом",InsertVertexAfterIndex:"Вставити вершину після індексу",DeleteVertex:"Видалити вершину",OnlyThisPolygon:"Тільки цей полігон",AllPolygonsOnSurface:"Всі полігони на цій поверхні",AllPolygonsAboveFoundation:"Всі полігони вище фундаменту",AllSelectedPolygons:"All Selected Polygons",AllPolygons:"Всі полігони",Layout:"Розташування",SolarPanelArrayLayout:"Розташування сонячних панелей",SolarPanelArrayLayoutParametricDesign:"Розташування сонячних панелей: параметричний дизайн",SolarPanelArrayLayoutGenerativeDesign:"Розташування сонячних панелей: генеративний дизайн",SolarPanelArrayModel:"Модель сонячної панелі",SolarPanelArrayOrientation:"Орієнтація",SolarPanelArrayTiltAngle:"Кут нахилу",SolarPanelArrayRowWidth:"Ширина ряду",SolarPanelArrayInterRowSpacing:"Міжрядковий інтервал",SolarPanelArrayRowSpacing:"Row Spacing",SolarPanelArrayRowAxis:"Вісь ряду",SolarPanelArrayLeftRightRowAxis:"Наліво-Направо (відносне)",SolarPanelArrayUpDownRowAxis:"Вгору-Вниз (відносне)",SolarPanelArrayEastWestRowAxis:"Схід-Захід (абсолютне)",SolarPanelArrayNorthSouthRowAxis:"Північ-Південь (абсолютне)",SolarPanelArrayMargin:"Відступ",SolarPanelArrayPoleHeight:"Висота стовпа",SolarPanelArrayPoleSpacing:"Інтервал між стовпами",SolarPanelArrayTotalYearlyCost:"Total Cost",SolarPanelArrayTotalYearlyRevenue:"Total Revenue",SolarPanelArrayTotalYearlyYield:"Total Yield",SolarPanelArrayMeanYearlyYield:"Mean Yield",SolarPanelArrayYearlyProfit:"Profit",LayoutNotAcceptedCheckYourParameters:"Це розташування не приймається. Будь ласка, перевірте ваші параметри."},optimizationMenu:{Optimization:"Оптимізація",Parameters:"Параметри",Variables:"Змінні",Constants:"Константи",GeneticAlgorithm:"Генетичний алгоритм",GeneticAlgorithmSettings:"Налаштування генетичного алгоритму",ParticleSwarmOptimization:"Оптимізація роєм частинок",ParticleSwarmOptimizationSettings:"Налаштування оптимізації роєм частинок",SolarPanelTiltAngleOptimization:"Оптимізація кута нахилу сонячних панелей",SolarPanelArrayLayout:"Розташування сонячних панелей",Generation:"Покоління",Gene:"Ген",NormalizedVariables:"Нормалізовані змінні",Objective:"Ціль",ObjectiveFunctionDailyTotalYield:"Щоденний загальний дохід",ObjectiveFunctionYearlyTotalYield:"Щорічний загальний дохід",ObjectiveFunctionDailyMeanYield:"Щоденний середній дохід",ObjectiveFunctionYearlyMeanYield:"Щорічний середній дохід",ObjectiveFunctionDailyProfit:"Щоденний прибуток",ObjectiveFunctionYearlyProfit:"Щорічний прибуток",GeneticAlgorithmSelectionMethod:"Метод вибору для генетичного алгоритму",RouletteWheel:"Велосипедне колесо",Tournament:"Турнір",SearchMethod:"Метод пошуку",GlobalSearchUniformSelection:"Глобальний пошук з однорідним вибором",LocalSearchRandomOptimization:"Локальний пошук випадкової оптимізації",PopulationSize:"Розмір населення",MaximumGenerations:"Максимальна кількість поколінь",SelectionRate:"Швидкість відбору",CrossoverRate:"Швидкість схрещування",MutationRate:"Швидкість мутації",Step:"Крок",SwarmSize:"Розмір рою",MaximumSteps:"Максимальна кількість кроків",MaximumVelocity:"Максимальна швидкість",InertiaWeight:"Вага інерції",CognitiveCoefficient:"Коефіцієнт когнітивної функції",SocialCoefficient:"Коефіцієнт соціальної взаємодії",ConvergenceThreshold:"Поріг збіжності для завершення",LocalSearchRadius:"Радіус локального пошуку",RowsPerRackRange:"Діапазон для рядів на стелаж",TiltAngleRange:"Діапазон для кута нахилу",InterRowSpacingRange:"Діапазон для міжрядкового проміжку",ClickTargetPolygonToActivate:"Натисніть на цільовий полігон для активації",ClickTargetFoundationToActivate:"Натисніть на цільовий фундамент для активації"},treeMenu:{ShowModel:"Показати модель",Flip:"Перевернути",Type:"Тип",Spread:"Розповсюдження"},flowerMenu:{Flip:"Перевернути",Type:"Тип",Spread:"Розповсюдження"},peopleMenu:{ChangePerson:"Змінити особу",Flip:"Перевернути",Observer:"Спостерігач",ViewFromThisPerson:"Переглянути з цієї особи"},lightMenu:{Color:"Колір",Intensity:"Інтенсивність",Decay:"Затухання",MaximumDistance:"Максимальна відстань",Inside:"Усередині"},solarCollectorMenu:{Coordinates:"Coordinates",RelativeXCoordinateOfCenter:"Relative X Coordinate of Center",RelativeYCoordinateOfCenter:"Relative Y Coordinate of Center",RelativeAzimuth:"Відносний азимут",Pole:"Стовп",PoleHeight:"Висота стовпа",PoleRadius:"Pole Radius",ExtraPoleHeight:"Додаткова висота стовпа",ExtraPoleHeightInAdditionToHalfWidth:"Додаткова висота стовпа на додаток до половини ширини",DrawSunBeam:"Намалювати промінь сонця"},concentratedSolarPowerCollectorMenu:{ReflectorReflectance:"Відбивання відбивача",ReceiverAbsorptance:"Поглинання приймача",ReflectorOpticalEfficiency:"Оптична ефективність відбивача",ReceiverThermalEfficiency:"Теплова ефективність приймача"},solarWaterHeaterMenu:{OnlyThisSolarWaterHeater:"Only This Solar Water Heater",AllSolarWaterHeatersOnSurface:"All Solar Water Heaters on the Same Surface",AllSolarWaterHeatersAboveFoundation:"All Solar Water Heaters Above the Same Foundation",AllSelectedSolarWaterHeaters:"All Selected Solar Water Heaters",AllSolarWaterHeaters:"All Solar Water Heaters"},solarPanelMenu:{ElectricalProperties:"Electrical Properties",InverterEfficiency:"Inverter Efficiency",InverterEfficiencyExplained:"The efficiency for converting direct current (DC) to alternating current (AC).",DcToAcSizeRatio:"DC-to-AC Size Ratio",DcToAcSizeRatioExplained:"The ratio of the solar panels' DC-rated size to the inverter's AC-rated size.",ChangePvModel:"Змінити модель",Orientation:"Орієнтація",Portrait:"Вертикальна",Landscape:"Горизонтальна",FrameColor:"Колір рамки",Panels:"панелі",PanelsWide:"панелі по ширині",PanelsLong:"панелі по довжині",TiltAngle:"Кут нахилу",SouthFacingIsPositive:"Південь вважається позитивним",Tracker:"Трекер",SolarTrackerFollowsSun:"Трекер слідкує за сонцем для збільшення виходу сонячних панелей.",PoleSpacing:"Відстань між стовпами",NoTracker:"Без трекера",HorizontalSingleAxisTracker:"Трекер з горизонтальною одноосевою орієнтацією",VerticalSingleAxisTracker:"Трекер з вертикальною одноосевою орієнтацією",AltazimuthDualAxisTracker:"Трекер з азимутально-альтазимутальною двоосевою орієнтацією",OnlyThisSolarPanel:"Тільки ця сонячна панель",AllSolarPanelsOnSurface:"Всі сонячні панелі на одній поверхні",AllSolarPanelsAboveFoundation:"Всі сонячні панелі над однією фундаментом",AllSelectedSolarPanels:"All Selected Solar Panels",AllSolarPanels:"Всі сонячні панелі"},pvModelPanel:{SolarPanelSpecs:"Технічні характеристики сонячної панелі",General:"General",Electrical:"Electrical",CellCountInXDirection:"Cell Count in X Direction",CellCountInYDirection:"Cell Count in Y Direction",Weight:"Weight",Kilogram:"kg",RatedVoltage:"Rated Voltage",RatedCurrent:"Rated Current",OpenCircuitVoltage:"Open-Circuit Voltage",ShortCircuitCurrent:"Short-Circuit Current",MaximumRatedPower:"Maximum Rated Power",Model:"Модель",PanelSize:"Розмір панелі",Cells:"Комірки",CellType:"Тип комірок",Monocrystalline:"Монокристалічні",Polycrystalline:"Полікристалічні",ThinFilm:"Тонкоплівкові",Bifacial:"Bifacial",PowerBifaciality:"Power Bifaciality (Rear/Front)",Black:"Чорний",Blue:"Синій",ShadeTolerance:"Стійкість до затінення",SolarCellEfficiency:"Ефективність сонячної комірки",NominalOperatingCellTemperature:"Номінальна робоча температура комірки",TemperatureCoefficientOfPmax:"Температурний коефіцієнт Pmax",AddedCustomSolarPanels:"Added",DisplayThisCustomSolarPanel:"Display this custom solar panel",ExportThisCustomSolarPanel:"Export this custom solar panel",ImportCustomSolarPanelFromClipboard:"Import custom solar panel from clipboard",CustomSolarPanelExportedToClipboard:"Custom solar panel exported to Clipboard",DoYouReallyWantToRemoveThisCustomSolarPanel:"Do you really want to remove this custom solar panel",MakeSureThisCustomSolarPanelIsNotUsed:"Make sure this custom solar panel is not used in the current model",ThisCustomSolarPanelIsUsed:"This custom solar panel is used in the current model",DoYouReallyWantToImportCustomSolarPanel:"Do you really want to import a custom solar panel",ExistingSettingsWillBeOverwritten:"The existing settings will be overwritten",CannotAddCustomSolarPanel:"Cannot add custom solar panel",CustomSolarPanelMustHaveModelName:"A custom solar panel must have a model name",CustomSolarPanelExists:"A custom solar panel with this name already exists",FailInImportingDataFromClipboard:"Failed in importing data from the clipboard"},parabolicTroughMenu:{ModuleLength:"Довжина модуля",Modules:"модулі",ModulesLong:"модулів у довжину",LatusRectum:"Велика піввісь",OnlyThisParabolicTrough:"Тільки цей параболічний сонячний колектор",AllParabolicTroughsAboveFoundation:"Усі параболічні сонячні колектори над цим фундаментом",AllSelectedParabolicTroughs:"All Selected Parabolic Troughs",AllParabolicTroughs:"Усі параболічні сонячні колектори"},fresnelReflectorMenu:{AbsorberPipe:"Труба поглинання",SelectAbsorberToReflectSunlightTo:"Виберіть поглинач, до якого буде відбиватися сонячне світло",ModuleLength:"Довжина модуля",Modules:"модулі",ModulesLong:"модулів у довжину",OnlyThisFresnelReflector:"Тільки цей відбивач Френеля",AllFresnelReflectorsAboveFoundation:"Усі відбивачі Френеля над цим фундаментом",AllSelectedFresnelReflectors:"All Selected Fresnel Reflectors",AllFresnelReflectors:"Усі відбивачі Френеля"},heliostatMenu:{Tower:"Вежа",SelectTowerToReflectSunlightTo:"Виберіть вежу, до якої буде відбиватися сонячне світло",OnlyThisHeliostat:"Тільки цей геліостат",AllHeliostatsAboveFoundation:"Усі геліостати над цим фундаментом",AllSelectedHeliostats:"All Selected Heliostats",AllHeliostats:"Усі геліостати"},parabolicDishMenu:{ReceiverStructure:"Структура приймача",CentralPole:"Центральний стовп",CentralPoleWithTripod:"Центральний стовп з триногою",Quadrupod:"Чотиринога",RimDiameter:"Діаметр ободу",LatusRectum:"Велика піввісь",ExtraPoleHeightInAdditionToRadius:"Додаткова висота стовпа плюс радіус",OnlyThisParabolicDish:"Тільки ця параболічна тарілка",AllParabolicDishesAboveFoundation:"Усі параболічні тарілки над цим фундаментом",AllSelectedParabolicDishes:"All Selected Parabolic Dishes",AllParabolicDishes:"Усі параболічні тарілки"},windTurbineMenu:{BirdSafeDesign:"Bird-Safe Design",BirdSafeNone:"None",BirdSafeBicolor:"Bicolor",BirdSafeStriped:"Striped",Rotor:"Rotor",BladeNumber:"Blade Number",RotorInitialAngle:"Rotor Initial Angle",RotorBladeDesign:"Rotor Blade Design",RotorBladeRadius:"Rotor Blade Radius",RotorBladePitchAngle:"Rotor Blade Pitch Angle",RelativeYawAngle:"Relative Yaw Angle",MaximumChordLength:"Maximum Chord Length",Tower:"Tower",TowerHeight:"Tower Height",TowerRadius:"Tower Radius",HubDesign:"Hub Design",HubRadius:"Hub Radius",HubLength:"Hub Length",OnlyThisWindTurbine:"Only This Wind Turbine",AllWindTurbinesAboveFoundation:"All Wind Turbines Above the Same Foundation",AllSelectedWindTurbines:"All Selected Wind Turbines",AllWindTurbines:"All Wind Turbines"},wallMenu:{TextureDefault:"Типова текстура",Texture01:"Текстура 1",Texture02:"Текстура 2",Texture03:"Текстура 3",Texture04:"Текстура 4",Texture05:"Текстура 5",Texture06:"Текстура 6",Texture07:"Текстура 7",Texture08:"Текстура 8",Texture09:"Текстура 9",Texture10:"Текстура 10",SizeOfWall:"Розмір стіни",OnlyThisWall:"Тільки ця стіна",AllConnectedWalls:"Всі пов'язані стіни",AllWallsAboveFoundation:"Всі стіни над цим фундаментом",AllSelectedWalls:"All Selected Walls",AllWalls:"Всі стіни",Windows:"Вікна",LockAllUnlockedWindows:"Lock All Unlocked Windows",UnlockAllLockedWindows:"Unlock All Locked Windows",RemoveAllUnlockedWindows:"Видалити всі розблоковані вікна",DoYouReallyWantToRemoveAllWindowsOnThisWall:"Ви дійсно бажаєте видалити всі вікна на цій стіні",Doors:"Двері",LockAllUnlockedDoors:"Lock All Unlocked Doors",UnlockAllLockedDoors:"Unlock All Locked Doors",RemoveAllUnlockedDoors:"Видалити всі розблоковані двері",DoYouReallyWantToRemoveAllDoorsOnThisWall:"Ви дійсно бажаєте видалити всі двері на цій стіні",SolarPanels:"Сонячні панелі",LockAllUnlockedSolarPanels:"Lock All Unlocked Solar Panels",UnlockAllLockedSolarPanels:"Unlock All Locked Solar Panels",RemoveAllUnlockedSolarPanels:"Видалити всі розблоковані сонячні панелі",DoYouReallyWantToRemoveAllSolarPanelsOnThisWall:"Ви дійсно бажаєте видалити всі сонячні панелі на цій стіні",Sensors:"Датчики",LockAllUnlockedSensors:"Lock All Unlocked Sensors",UnlockAllLockedSensors:"Unlock All Locked Sensors",RemoveAllUnlockedSensors:"Видалити всі розблоковані датчики",DoYouReallyWantToRemoveAllSensorsOnThisWall:"Ви дійсно бажаєте видалити всі датчики на цій стіні",Lights:"Лампи",LockAllUnlockedLights:"Lock All Unlocked Lights",UnlockAllLockedLights:"Unlock All Locked Lights",RemoveAllUnlockedLights:"Видалити всі розблоковані лампи",DoYouReallyWantToRemoveAllLightsOnThisWall:"Ви дійсно бажаєте видалити всі лампи на цій стіні",Polygons:"Polygons",LockAllUnlockedPolygons:"Lock All Unlocked Polygons",UnlockAllLockedPolygons:"Unlock All Locked Polygons",RemoveAllUnlockedPolygons:"Видалити всі розблоковані полігони",DoYouReallyWantToRemoveAllPolygonsOnThisWall:"Do you really want to remove all the polygons on this wall",WallStructure:"Структура стіни",DefaultStructure:"Типова",StudStructure:"Студ",PillarStructure:"Пілар",Opacity:"Непрозорість",StructureSpacing:"Відстань між структурами",StructureWidth:"Ширина структури",StructureThickness:"Товщина структури",StructureColor:"Колір структури",Color:"Колір стіни",Height:"Висота",Thickness:"Товщина",Texture:"Текстура",AllLightsOnWallInside:"Всі лампи всередині стіни",AllLightsOnWallOutside:"Всі лампи ззовні стіни",Fill:"Заповнення",Full:"Повне",Partial:"Часткове",Empty:"Порожнє",OpenToOutside:"Відкрите на зовнішню сторону",EavesLength:"Довжина карнизу",Parapet:"Перила",ParapetColor:"Колір перил",ParapetTexture:"Текстура перил",ParapetHeight:"Висота перил",CopingsHeight:"Висота паркану",CopingsWidth:"Ширина паркану"},windowMenu:{OnlyThisWindow:"Тільки це вікно",AllWindowsOnSurface:"All Windows on the Same Surface",AllWindowsAboveFoundation:"Всі вікна над однією фундаментом",AllSelectedWindows:"All Selected Windows",AllWindows:"Всі вікна",Width:"Ширина",Height:"Висота",Setback:"Setback from Exterior Surface",RelativeToWallThickness:"Relative to wall thickness",Mullion:"Розділовий стовпець",HorizontalMullion:"Horizontal Mullion",VerticalMullion:"Vertical Mullion",MullionWidth:"Ширина розділового стовпця",HorizontalMullionSpacing:"Horizontal Mullion Spacing",VerticalMullionSpacing:"Vertical Mullion Spacing",MullionColor:"Колір розділового стовпця",Tint:"Відтінок",Opacity:"Непрозорість",SolarHeatGainCoefficient:"Коефіцієнт сонячного теплового навантаження (SHGC) = 1 - непрозорість",Shutter:"Жалюзі",LeftShutter:"Ліве жалюзі",RightShutter:"Праве жалюзі",BothShutters:"Обидві жалюзі",ShutterWidth:"Відносна ширина",ShutterColor:"Колір жалюзі",Frame:"Рамка",FrameWidth:"Ширина рамки",SillWidth:"Ширина підвіконня",Color:"Колір рамки",WindowType:"Тип вікна",Default:"Типове",Arched:"Аркове",Polygonal:"Багатокутне",Interior:"Інтер'єр",Empty:"Порожнє"},roofMenu:{TextureDefault:"Типове",Texture01:"Текстура 1",Texture02:"Текстура 2",Texture03:"Текстура 3",Texture04:"Текстура 4",Texture05:"Текстура 5",Texture06:"Текстура 6",Texture07:"Текстура 7",OnlyThisRoof:"Тільки цей дах",AllRoofsAboveFoundation:"Всі дахи над одним фундаментом",AllSelectedRoofs:"All Selected Roofs",AllRoofs:"Всі дахи",OnlyThisCeiling:"Тільки ця стеля",AllCeilingsAboveFoundation:"Всі стелі над одним фундаментом",AllCeilings:"Всі стелі",EavesOverhangLength:"Довжина виступу карнизу",RafterSpacing:"Відстань між стропилами",RafterWidth:"Ширина стропила",RafterThickness:"Товщина стропила",RafterColor:"Колір стропила",RoofColor:"Колір даху",RoofSideColor:"Колір бокової частини даху",GlassTint:"Колір скла",Opacity:"Непрозорість",RoofStructure:"Структура даху",DefaultStructure:"Типова",RafterStructure:"Стропило",GlassStructure:"Скло",SolarPanels:"Сонячні панелі",LockAllUnlockedSolarPanels:"Lock All Unlocked Solar Panels",UnlockAllLockedSolarPanels:"Unlock All Locked Solar Panels",RemoveAllUnlockedSolarPanels:"Видалити всі розблоковані сонячні панелі",DoYouReallyWantToRemoveAllSolarPanelsOnThisRoof:"Ви дійсно бажаєте видалити всі сонячні панелі на цьому даху",Windows:"Вікна",LockAllUnlockedWindows:"Lock All Unlocked Windows",UnlockAllLockedWindows:"Unlock All Locked Windows",RemoveAllUnlockedWindows:"Видалити всі розблоковані вікна",DoYouReallyWantToRemoveAllWindowsOnThisRoof:"Ви дійсно бажаєте видалити всі вікна на цьому даху",Sensors:"Сенсори",LockAllUnlockedSensors:"Lock All Unlocked Sensors",UnlockAllLockedSensors:"Unlock All Locked Sensors",RemoveAllUnlockedSensors:"Видалити всі розблоковані сенсори",DoYouReallyWantToRemoveAllSensorsOnThisRoof:"Ви дійсно бажаєте видалити всі сенсори на цьому даху",Lights:"Лампи",RemoveAllUnlockedLights:"Видалити всі розблоковані лампи",DoYouReallyWantToRemoveAllLightsOnThisRoof:"Ви дійсно бажаєте видалити всі лампи на цьому даху",AllLightsOnRoofInside:"Всі лампи на даху всередині",AllLightsOnRoofOutside:"Всі лампи на даху ззовні",Rise:"Піднімання",Ceiling:"Стеля",RoofRValue:"Значення R для даху",CeilingRValue:"Значення R для стелі"},doorMenu:{TextureDefault:"За замовчуванням",Texture01:"Текстура 1",Texture02:"Текстура 2",Texture03:"Текстура 3",Texture04:"Текстура 4",Texture05:"Текстура 5",Texture06:"Текстура 6",Texture07:"Текстура 7",Texture08:"Текстура 8",Texture09:"Текстура 9",Texture10:"Текстура 10",Texture11:"Текстура 11",Texture12:"Текстура 12",Texture13:"Текстура 13",Texture14:"Текстура 14",Texture15:"Текстура 15",Texture16:"Текстура 16",Texture17:"Текстура 17",OnlyThisDoor:"Тільки ці двері",AllDoorsOnWall:"Всі двері на цій стіні",AllDoorsAboveFoundation:"Всі двері над тим самим фундаментом",AllSelectedDoors:"All Selected Doors",AllDoors:"Всі двері",DoorType:"Тип дверей",Default:"За замовчуванням",Arched:"Аркові",Filled:"Заповнені",FrameColor:"Колір рамки",Interior:"Інтер'єр"},siteInfoPanel:{High:"Високо",Low:"Низько"},designInfoPanel:{NumberOfSelectedHeliostats:"Кількість вибраних геліостатів",NumberOfSelectedSolarPanels:"Кількість вибраних сонячних панелей",ElectricityGeneratedDailyBySolarPanels:"Електрика, що генерується щоденно цими сонячними панелями",SceneDiameter:"Діаметр сцени",BuildingArea:"Площа будівлі"},visualizationControlPanel:{ColorContrast:"Контраст кольору",FluxScale:"Шкала потоку",ClickUpOrDownArrowButtonsToChange:"Натисніть кнопки зі стрілками вгору або вниз щоб змінити"},instructionPanel:{Rotate:"Повернути",DragMouse:"Перетягніть мишею",Zoom:"Масштабування",MouseWheelOrKeys:"Обертайте колесо миші або натисніть Ctrl+[ або Ctrl+]",MouseWheelOrKeysMac:"Обертайте колесо миші або натисніть ⌘+[ або ⌘+]",Pan:"Переміщення",HoldCtrlDragMouse:"Натисніть і утримуйте Ctrl, перетягніть мишею",HoldMetaDragMouse:"Натисніть і утримуйте ⌘, перетягніть мишею",Enter2DMode:"Ввійти в 2D режим",Exit2DMode:"Вийти з 2D режиму",NavigationMode:"Режим навігації",EnableNavigation:"Увімкнути навігацію",DisableNavigation:"Вимкнути навігацію",MoveForwardBack:"Рухатися вперед/назад",MoveForwardBackInstruction:"Натисніть W/S",MoveLeftRight:"Рухатися вліво/вправо",MoveLeftRightInstruction:"Натисніть A/D",MoveUpDown:"Рухатися вгору/вниз",MoveUpDownInstruction:"Натисніть Z/X",Turn:"Повернути",TurnInstruction:"Натисніть клавіші зі стрілками",ResetView:"Скинути",AutoRotate:"Автоматичний поворот",StartOrStop:"Натисніть F4, щоб почати або зупинити"},mapPanel:{ImageOnGround:"Зображення на землі",HideAddress:"Hide Address",WeatherStations:"Метеостанції",WeatherStationsNote:"Вимкніть це, щоб прискорити",Coordinates:"Координати",Zoom:"Масштабування"},visibilityPanel:{SolarPanelVisibility:"Видимість сонячних панелей",Observer:"Спостерігач",VantagePoint:"Точка огляду",ItemizedVisibilityByFields:"Розгорнутий за полями",TotalVisibility:"Загальна видимість"},sensorPanel:{LightSensor:"Датчик освітленості",WeatherDataFrom:"Метеодані з"},buildingEnergyPanel:{DailyBuildingEnergy:"Щоденна енергія будівлі",YearlyBuildingEnergy:"Річна енергія будівлі",Heater:"Обігрівач",AC:"Кондиціонер",SolarPanel:"Сонячна панель",Net:"Всього"},solarPanelYieldPanel:{SolarPanelDailyYield:"Щоденний дохід сонячних панелей",SolarPanelYearlyYield:"Річний дохід сонячних панелей",Yield:"Дохід",YieldPerHour:"Дохід за годину",DailyTotal:"Щоденний загальний",YearlyTotal:"Річний загальний",ShowOutputsOfIndividualSolarPanels:"Показати дохід окремих сонячних панелей",Profit:"Прибуток",TotalCost:"Total Cost",TotalRevenue:"Total Revenue",TotalYield:"Total Yield",MeanYield:"Mean Yield",ModuleCount:"Module Count"},parabolicTroughYieldPanel:{ParabolicTroughDailyYield:"Щоденний дохід параболічних сонячних колекторів",ParabolicTroughYearlyYield:"Річний дохід параболічних сонячних колекторів",Yield:"Дохід",YieldPerHour:"Дохід за годину",DailyTotal:"Щоденний загальний",YearlyTotal:"Річний загальний",ShowOutputsOfIndividualParabolicTroughs:"Показати дохід окремих параболічних сонячних колекторів"},parabolicDishYieldPanel:{ParabolicDishDailyYield:"Щоденний дохід параболічних тарілок",ParabolicDishYearlyYield:"Річний дохід параболічних тарілок",Yield:"Дохід",YieldPerHour:"Дохід за годину",DailyTotal:"Щоденний загальний",YearlyTotal:"Річний загальний",ShowOutputsOfIndividualParabolicDishes:"Показати дохід окремих параболічних тарілок"},fresnelReflectorYieldPanel:{FresnelReflectorDailyYield:"Щоденний дохід відбивача Френеля",FresnelReflectorYearlyYield:"Річний дохід відбивача Френеля",Yield:"Дохід",YieldPerHour:"Дохід за годину",DailyTotal:"Щоденний загальний",YearlyTotal:"Річний загальний",ShowOutputsOfIndividualFresnelReflectors:"Показати дохід окремих відбивачів Френеля"},heliostatYieldPanel:{HeliostatDailyYield:"Щоденний дохід геліостату",HeliostatYearlyYield:"Річний дохід геліостату",Yield:"Дохід",YieldPerHour:"Дохід за годину",DailyTotal:"Щоденний загальний",YearlyTotal:"Річний загальний",ShowOutputsOfIndividualHeliostats:"Показати дохід окремих геліостатів"},updraftTowerYieldPanel:{UpdraftTowerDailyYield:"Щоденний дохід сонячної вежі",UpdraftTowerYearlyYield:"Річний дохід сонячної вежі",ChimneyAirTemperature:"Температура повітря у димовій трубі",ChimneyWindSpeed:"Швидкість вітру у димовій трубі",Yield:"дохід",YieldPerHour:"Дохід за годину",DailyTotal:"Щоденний загальний",YearlyTotal:"Річний загальний",ShowOutputsOfIndividualUpdraftTowers:"Показати дохід окремих сонячних веж"},heliodonPanel:{SunAndTimeSettings:"Налаштування Сонця та Часу",SunAngles:"Кути Сонця",TwentyFourHours:"24 Години"},cloudFilePanel:{CopyTitle:"Copy Title",TitleCopiedToClipBoard:"The title was copied to the clip board",SearchByTitle:"Пошук за назвою",MyLikes:"Мої вподобання",MyCloudFiles:"Мої файли у хмарному середовищі",GenerateLink:"Створити посилання",LinkGeneratedInClipBoard:"Посилання було створено та скопійовано до буферу обміну",DoYouReallyWantToDelete:"Ви дійсно бажаєте видалити",IfSharedOrPublishedRenamingFileBreaksExistingLinks:"Якщо цей файл було відкрито або опубліковано, зміна його назви порушить наявні посилання"},projectListPanel:{CopyTitle:"Copy Title",TitleCopiedToClipBoard:"The title was copied to the clip board",SearchByTitle:"Пошук за назвою",MyProjects:"My Projects",GenerateProjectLink:"Generate Project Link",ProjectLinkGeneratedInClipBoard:"A link to the project was generated in the clip board",DoYouReallyWantToDeleteProject:"Do you really want to delete Project",IfSharedOrPublishedRenamingProjectBreaksExistingLinks:"If this project has been shared or published, renaming it breaks existing links"},projectPanel:{ProjectSettings:"Project Settings",ThumbnailImageSize:"Thumbnail Image Size",ProjectByOtherPeople:"Project by Other People",Project:"Project",ProjectType:"Тип проєкту",ProjectDescription:"Description",MakeDescriptionEditable:"Make this description editable",MakeDescriptionNonEditable:"Make this description non-editable",DoubleClickToMakeDescriptionEditable:"Double-click to make this description editable",SolarPanelArray:"Solar Panel Array",CurateCurrentDesign:"Curate current design",UpdateSelectedDesign:"Update selected design",RemoveSelectedDesign:"Remove selected design",ClickToFlipSortingOrder:"Click to flip the sorting order",DesignNotShownInSolutionSpaceClickToShow:"This design is not shown in solution space; click to show",DesignShownInSolutionSpaceClickToHide:"This design is shown in solution space; click to hide",SolutionSpace:"Solution Space",ChooseSolutionSpace:"Choose solution space",ChooseDataColoring:"Choose data coloring",SameColorForAllDesigns:"Same color for all designs",OneColorForEachDesign:"One color for each design",SolutionSpaceScreenshot:"Take a screenshot of the solution space",ScatterPlotScreenshot:"Take a screenshot of the scatter plot",SingleClickToSelectDoubleClickToOpen:"Single-click to select, double-click to open.",SingleClickToDeselectDoubleClickToOpen:"Single-click to deselect, double-click to open.",GenerateScatterPlot:"Generate Scatter Plot",SelectXAxis:"Select X Axis",SelectYAxis:"Select Y Axis"},accountSettingsPanel:{MyAccountSettings:"Мої налаштування облікового запису",MyID:"Моє 🆔",ClickToCopyMyID:"Натисніть, щоб скопіювати моє ID",IDInClipBoard:"Ваш ID було скопійоване і готове для вставки.",StoreMyNameInMyFilesWhenSaving:"Зберігати моє ім'я в моїх файлах при збереженні",DoYouReallyWantToShowYourNameInYourFiles:"Ви дійсно бажаєте відображати ваше ім'я в файлах?",SignFileDisclaimer:"Якщо так, ваше ім'я зможе бачити будь-хто, хто матиме доступ до ваших файлів.",Likes:"Вподобання",AllPublished:"Усі опубліковані",PublishedUnderAliases:"Псевдоніми",UserCount:"Кількість користувачів",SchoolID:"ID Школи",ClassID:"ID Класу"},weatherPanel:{SunshineHours:"Сонячні години"},diurnalTemperaturePanel:{SelectAirTemperatureModel:"Виберіть модель повітряної температури",Sinusoidal:"Синусоїдальна"},economicsPanel:{EconomicsParameters:"Параметри економіки",ElectricitySellingPrice:"Ціна продажу електроенергії",OperationalCostPerUnit:"Операційні витрати за одиницю",SellingPrice:"Selling Price",UnitCost:"Unit Cost"},navigationPanel:{NavigationParameters:"Navigation Parameters",MinimumMoveSpeed:"Minimum Move Speed",MinimumTurnSpeed:"Minimum Turn Speed"},shadowSettingsPanel:{ShadowSettings:"Shadow Settings",ShadowCameraFarDistance:"Shadow Camera Far Distance",ShadowMapSize:"Shadow Map Size",Notes:"Notes",RefreshPageNote:"Refresh the page for the new settings to take effect.",MapSizeWarning:"A large shadow map size may cause Aladdin to crash on some computers."},yearlyLightSensorPanel:{SkyClearness:"Ясність неба",ShowDaylightResults:"Показати результати денного освітлення",ShowSkyClearnessResults:"Показати результати ясності неба",ShowAverageDailySolarRadiation:"Показати середню щоденну сонячну радіацію"},analysisManager:{NoSensorForCollectingData:"Немає датчика для збору даних.",NoSolarPanelForAnalysis:"Немає сонячної панелі для аналізу.",NoObserverForVisibilityAnalysis:"Немає спостерігача для аналізу видимості.",NoSolarWaterHeaterForAnalysis:"Немає водонагрівача для аналізу.",NoParabolicDishForAnalysis:"Немає параболічної тарілки для аналізу.",NoParabolicTroughForAnalysis:"Немає параболічного сонячного колектора для аналізу.",NoFresnelReflectorForAnalysis:"Немає відбивача Френеля для аналізу.",NoHeliostatForAnalysis:"Немає геліостата для аналізу.",NoSolarUpdraftTowerForAnalysis:"Немає сонячної вежі для аналізу.",NoBuildingForAnalysis:"Немає будівлі для аналізу."},toolbar:{CloudFile:"Хмарний файл",Select:"Вибрати",AddFoundation:"Додати фундамент",AddWall:"Додати стіну",AddWindow:"Додати вікно",AddDoor:"Додати двері",AddPyramidRoof:"Додати пірамідальний дах",AddGableRoof:"Додати шатровий дах",AddHipRoof:"Додати чотирихилий дах",AddGambrelRoof:"Додати двосхилий дах",AddMansardRoof:"Додати мансардний дах",AddCuboid:"Додати прямокутний паралелепіпед",AddSensor:"Додати датчик",AddSolarPanel:"Додати сонячну панель",AddSolarWaterHeater:"Додати водонагрівач",AddBatteryStorage:"Add Battery Storage",AddParabolicDish:"Додати параболічну тарілку",AddParabolicTrough:"Додати параболічний сонячний колектор",AddFresnelReflector:"Додати відбивач Френеля",AddHeliostat:"Додати геліостат",AddWindTurbine:"Add Horizontal Axis Wind Turbine",AddVerticalAxisWindTurbine:"Add Vertical Axis Wind Turbine",AddLight:"Додати світло",AddTree:"Додати дерево",AddFlower:"Додати квітку",AddPeople:"Додати людей",DoubleClickToLockThisModeForNextAction:"Подвійне клацання, щоб заблокувати цей режим для наступної дії",ClickToUnlockThisModeForNextAction:"Клацніть, щоб розблокувати цей режим для наступної дії",ManipulateGroup:"Маніпулювати групою",ClearScene:"Очистити сцену",ShowSunAndTimeSettings:"Показати налаштування Сонця та Часу",SpatialAnalysisOfEnergy:"Просторовий аналіз енергії",DoYouReallyWantToClearContent:"Ви дійсно бажаєте очистити вміст",ClickForMoreButtons:"Натисніть для додаткових кнопок"},tooltip:{gotoIFI:"Перейти до Інституту Інтелекту Майбутнього",visitAladdinHomePage:"Відвідати домашню сторінку Aladdin",clickToOpenMenu:"Натисність, щоб відкрити Головне Меню",clickToAccessAccountSettings:"Click to access account settings"},tree:{Apple:"Яблуня",Birch:"Береза",Coconut:"Кокос",Dogwood:"Дерен",Elm:"В'яз",FanPalm:"Віяльна пальма",Linden:"Липа",Magnolia:"Магнолія",Maple:"Клен",Oak:"Дуб",Pine:"Сосна",Spruce:"Ялина"},flower:{Bellflower:"Дзвоник",Boxwood:"Самшит",CactusCombo1:"Кактус Комбо 1",CactusCombo2:"Кактус Комбо 2",CactusCombo3:"Кактус Комбо 3",CactusCombo4:"Кактус Комбо 4",Hibiscus:"Гібіскус",Hosta:"Госта",Hydrangea:"Гортензія",Peony:"Півонія",RedRose:"Червона троянда",Spirea:"Спірея",Sunflower:"Соняшник",TallBush:"Високий кущ",Tulip:"Тюльпан",WhiteFlower:"Біла квітка",YellowFlower:"Жовта квітка"},people:{Jaah:"Артем",Jack:"Віталій",Jacob:"Ярослав",Jacqueline:"Олена",Jade:"Ольга",Jamelia:"Олександра",James:"Андрій",Jane:"Вікторія",Jaya:"Ірина",Jaye:"Назар",Jeanette:"Соломія",Jedi:"Євген",Jeff:"Павло",Jena:"Любов",Jennifer:"Тетяна",Jess:"Злата",Jett:"Сергій",Jill:"Надія",Jiya:"Марина",Joan:"Іванна",Jocelyn:"Анастасія",Joel:"Володимир",Joey:"Вероніка",John:"Іван",Jonathon:"Петро",Jose:"Микита",Joseph:"Віктор",Joshua:"Михайло",Judd:"Владислав",Judy:"Марія",Julia:"Юлія",Julio:"Дмитро",Jumapili:"Марта",June:"Анна",Juro:"Юрій",Justin:"Богдан"},compass:{N:"Пн",S:"Пд",W:"Зx",E:"Сх"},month:{January:"Jan",February:"Feb",March:"Mar",April:"Apr",May:"May",June:"Jun",July:"Jul",August:"Aug",September:"Sep",October:"Oct",November:"Nov",December:"Dec"},modelsMap:{AllTime:"All Time",SearchByPublisher:"Пошук за виробником",SearchByLabel:"Пошук за міткою",MyPublishedModels:"Мої опубліковані моделі",TotalNumberOfUserPublishedModelsInSelectedPeriod:"Total number of user-published models in the selected period",AllTimeTotal:"All-time total",SortFromOldestToNewest:"Сортувати від найдавніших до найновіших",SortFromNewestToOldest:"Сортувати від найновіших до найдавніших",SitesFound:"sites found",ModelsFoundOnThisSite:"моделей знайдено на цьому сайті",ShowModelsPublishedByThisAuthor:"Показати моделі, опубліковані цим автором"}}};Y.use(vWe).use(Vht).init({debug:!0,fallbackLng:"en",interpolation:{escapeValue:!1},resources:{en:fpt,zh_cn:hpt,zh_tw:ppt,es:gpt,tr:mpt,ua:ypt}});var m1e={},xWe={exports:{}};(function(t){function e(n){return n&&n.__esModule?n:{default:n}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(xWe);var Id=xWe.exports,nq={};Object.defineProperty(nq,"__esModule",{value:!0});nq.default=void 0;var Apt={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};nq.default=Apt;var oq={},ZL={},rq={};Object.defineProperty(rq,"__esModule",{value:!0});rq.default=void 0;var wpt={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"};rq.default=wpt;var eW={};Object.defineProperty(eW,"__esModule",{value:!0});eW.default=void 0;const vpt={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};eW.default=vpt;var bWe=Id.default;Object.defineProperty(ZL,"__esModule",{value:!0});ZL.default=void 0;var xpt=bWe(rq),bpt=bWe(eW);const Spt={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},xpt.default),timePickerLocale:Object.assign({},bpt.default)};ZL.default=Spt;var Tpt=Id.default;Object.defineProperty(oq,"__esModule",{value:!0});oq.default=void 0;var Ppt=Tpt(ZL);oq.default=Ppt.default;var iq=Id.default;Object.defineProperty(m1e,"__esModule",{value:!0});var y1e=m1e.default=void 0,Cpt=iq(nq),Rpt=iq(oq),Hpt=iq(ZL),Mpt=iq(eW);const D1="${label} is not a valid ${type}",Ipt={locale:"en",Pagination:Cpt.default,DatePicker:Hpt.default,TimePicker:Mpt.default,Calendar:Rpt.default,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:D1,method:D1,array:D1,object:D1,number:D1,date:D1,boolean:D1,integer:D1,float:D1,regexp:D1,email:D1,url:D1,hex:D1},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty"}};y1e=m1e.default=Ipt;const zpt="/aladdin/assets/weather-Cmaoollj.csv",Dpt="/aladdin/assets/solar_radiation_horizontal-XbDP6xhD.csv",Ept="/aladdin/assets/solar_radiation_vertical-CITm3vMC.csv",Fpt="/aladdin/assets/pvmodules-BhZ8sEOG.csv";function Dm(t){for(var e=arguments.length,n=Array(e>1?e-1:0),o=1;o3?e.i-4:e.i:Array.isArray(t)?1:A1e(t)?2:w1e(t)?3:0}function Use(t,e){return PH(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function kpt(t,e){return PH(t)===2?t.get(e):t[e]}function SWe(t,e,n){var o=PH(t);o===2?t.set(e,n):o===3?t.add(n):t[e]=n}function Lpt(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function A1e(t){return Ypt&&t instanceof Map}function w1e(t){return Opt&&t instanceof Set}function md(t){return t.o||t.t}function v1e(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=_pt(t);delete e[ns];for(var n=T1e(e),o=0;o1&&(t.set=t.add=t.clear=t.delete=Wpt),Object.freeze(t),e&&oR(t,function(n,o){return x1e(o,!0)},!0)),t}function Wpt(){Dm(2)}function b1e(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function S9(t){var e=Bse[t];return e||Dm(18,t),e}function Npt(t,e){Bse[t]||(Bse[t]=e)}function $_(){return PF}function Poe(t,e){e&&(S9("Patches"),t.u=[],t.s=[],t.v=e)}function Q_(t){jse(t),t.p.forEach(Upt),t.p=null}function jse(t){t===PF&&(PF=t.l)}function u4e(t){return PF={p:[],l:PF,h:t,m:!0,_:0}}function Upt(t){var e=t[ns];e.i===0||e.i===1?e.j():e.g=!0}function Coe(t,e){e._=e.p.length;var n=e.p[0],o=t!==void 0&&t!==n;return e.h.O||S9("ES5").S(e,t,o),o?(n[ns].P&&(Q_(e),Dm(4)),q6(t)&&(t=Z_(e,t),e.l||eG(e,t)),e.u&&S9("Patches").M(n[ns].t,t,e.u,e.s)):t=Z_(e,n,[]),Q_(e),e.u&&e.v(e.u,e.s),t!==TWe?t:void 0}function Z_(t,e,n){if(b1e(e))return e;var o=e[ns];if(!o)return oR(e,function(l,s){return d4e(t,o,e,l,s,n)},!0),e;if(o.A!==t)return e;if(!o.P)return eG(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var r=o.i===4||o.i===5?o.o=v1e(o.k):o.o,i=r,a=!1;o.i===3&&(i=new Set(r),r.clear(),a=!0),oR(i,function(l,s){return d4e(t,o,r,l,s,n,a)}),eG(t,r,!1),n&&t.u&&S9("Patches").N(o,n,t.u,t.s)}return o.o}function d4e(t,e,n,o,r,i,a){if(nR(r)){var l=Z_(t,r,i&&e&&e.i!==3&&!Use(e.R,o)?i.concat(o):void 0);if(SWe(n,o,l),!nR(l))return;t.m=!1}else a&&n.add(r);if(q6(r)&&!b1e(r)){if(!t.h.D&&t._<1)return;Z_(t,r),e&&e.A.l||eG(t,r)}}function eG(t,e,n){n===void 0&&(n=!1),!t.l&&t.h.D&&t.m&&x1e(e,n)}function Roe(t,e){var n=t[ns];return(n?md(n):t)[e]}function f4e(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var o=Object.getOwnPropertyDescriptor(n,e);if(o)return o;n=Object.getPrototypeOf(n)}}function A6(t){t.P||(t.P=!0,t.l&&A6(t.l))}function Hoe(t){t.o||(t.o=v1e(t.t))}function TF(t,e,n){var o=A1e(e)?S9("MapSet").F(e,n):w1e(e)?S9("MapSet").T(e,n):t.O?function(r,i){var a=Array.isArray(r),l={i:a?1:0,A:i?i.A:$_(),P:!1,I:!1,R:{},l:i,t:r,k:null,o:null,j:null,C:!1},s=l,c=Yse;a&&(s=[l],c=RD);var u=Proxy.revocable(s,c),d=u.revoke,f=u.proxy;return l.k=f,l.j=d,f}(e,n):S9("ES5").J(e,n);return(n?n.A:$_()).p.push(o),o}function jpt(t){return nR(t)||Dm(22,t),function e(n){if(!q6(n))return n;var o,r=n[ns],i=PH(n);if(r){if(!r.P&&(r.i<4||!S9("ES5").K(r)))return r.t;r.I=!0,o=h4e(n,i),r.I=!1}else o=h4e(n,i);return oR(o,function(a,l){r&&kpt(r.t,a)===l||SWe(o,a,e(l))}),i===3?new Set(o):o}(t)}function h4e(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return v1e(t)}function Bpt(){function t(l,s){function c(){this.constructor=l}r(l,s),l.prototype=(c.prototype=s.prototype,new c)}function e(l){l.o||(l.R=new Map,l.o=new Map(l.t))}function n(l){l.o||(l.o=new Set,l.t.forEach(function(s){if(q6(s)){var c=TF(l.A.h,s,l);l.p.set(s,c),l.o.add(c)}else l.o.add(s)}))}function o(l){l.g&&Dm(3,JSON.stringify(md(l)))}var r=function(l,s){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)u.hasOwnProperty(d)&&(c[d]=u[d])})(l,s)},i=function(){function l(c,u){return this[ns]={i:2,l:u,A:u?u.A:$_(),P:!1,I:!1,o:void 0,R:void 0,t:c,k:this,C:!1,g:!1},this}t(l,Map);var s=l.prototype;return Object.defineProperty(s,"size",{get:function(){return md(this[ns]).size}}),s.has=function(c){return md(this[ns]).has(c)},s.set=function(c,u){var d=this[ns];return o(d),md(d).has(c)&&md(d).get(c)===u||(e(d),A6(d),d.R.set(c,!0),d.o.set(c,u),d.R.set(c,!0)),this},s.delete=function(c){if(!this.has(c))return!1;var u=this[ns];return o(u),e(u),A6(u),u.t.has(c)?u.R.set(c,!1):u.R.delete(c),u.o.delete(c),!0},s.clear=function(){var c=this[ns];o(c),md(c).size&&(e(c),A6(c),c.R=new Map,oR(c.t,function(u){c.R.set(u,!1)}),c.o.clear())},s.forEach=function(c,u){var d=this;md(this[ns]).forEach(function(f,p){c.call(u,d.get(p),p,d)})},s.get=function(c){var u=this[ns];o(u);var d=md(u).get(c);if(u.I||!q6(d)||d!==u.t.get(c))return d;var f=TF(u.A.h,d,u);return e(u),u.o.set(c,f),f},s.keys=function(){return md(this[ns]).keys()},s.values=function(){var c,u=this,d=this.keys();return(c={})[gB]=function(){return u.values()},c.next=function(){var f=d.next();return f.done?f:{done:!1,value:u.get(f.value)}},c},s.entries=function(){var c,u=this,d=this.keys();return(c={})[gB]=function(){return u.entries()},c.next=function(){var f=d.next();if(f.done)return f;var p=u.get(f.value);return{done:!1,value:[f.value,p]}},c},s[gB]=function(){return this.entries()},l}(),a=function(){function l(c,u){return this[ns]={i:3,l:u,A:u?u.A:$_(),P:!1,I:!1,o:void 0,t:c,k:this,p:new Map,g:!1,C:!1},this}t(l,Set);var s=l.prototype;return Object.defineProperty(s,"size",{get:function(){return md(this[ns]).size}}),s.has=function(c){var u=this[ns];return o(u),u.o?!!u.o.has(c)||!(!u.p.has(c)||!u.o.has(u.p.get(c))):u.t.has(c)},s.add=function(c){var u=this[ns];return o(u),this.has(c)||(n(u),A6(u),u.o.add(c)),this},s.delete=function(c){if(!this.has(c))return!1;var u=this[ns];return o(u),n(u),A6(u),u.o.delete(c)||!!u.p.has(c)&&u.o.delete(u.p.get(c))},s.clear=function(){var c=this[ns];o(c),md(c).size&&(n(c),A6(c),c.o.clear())},s.values=function(){var c=this[ns];return o(c),n(c),c.o.values()},s.entries=function(){var c=this[ns];return o(c),n(c),c.o.entries()},s.keys=function(){return this.values()},s[gB]=function(){return this.values()},s.forEach=function(c,u){for(var d=this.values(),f=d.next();!f.done;)c.call(u,f.value,f.value,this),f=d.next()},l}();Npt("MapSet",{F:function(l,s){return new i(l,s)},T:function(l,s){return new a(l,s)}})}var p4e,PF,S1e=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Ypt=typeof Map<"u",Opt=typeof Set<"u",g4e=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",TWe=S1e?Symbol.for("immer-nothing"):((p4e={})["immer-nothing"]=!0,p4e),qm=S1e?Symbol.for("immer-draftable"):"__$immer_draftable",ns=S1e?Symbol.for("immer-state"):"__$immer_state",gB=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",Vpt=""+Object.prototype.constructor,T1e=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,_pt=Object.getOwnPropertyDescriptors||function(t){var e={};return T1e(t).forEach(function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)}),e},Bse={},Yse={get:function(t,e){if(e===ns)return t;var n=md(t);if(!Use(n,e))return function(r,i,a){var l,s=f4e(i,a);return s?"value"in s?s.value:(l=s.get)===null||l===void 0?void 0:l.call(r.k):void 0}(t,n,e);var o=n[e];return t.I||!q6(o)?o:o===Roe(t.t,e)?(Hoe(t),t.o[e]=TF(t.A.h,o,t)):o},has:function(t,e){return e in md(t)},ownKeys:function(t){return Reflect.ownKeys(md(t))},set:function(t,e,n){var o=f4e(md(t),e);if(o!=null&&o.set)return o.set.call(t.k,n),!0;if(!t.P){var r=Roe(md(t),e),i=r==null?void 0:r[ns];if(i&&i.t===n)return t.o[e]=n,t.R[e]=!1,!0;if(Lpt(n,r)&&(n!==void 0||Use(t.t,e)))return!0;Hoe(t),A6(t)}return t.o[e]===n&&(n!==void 0||e in t.o)||Number.isNaN(n)&&Number.isNaN(t.o[e])||(t.o[e]=n,t.R[e]=!0),!0},deleteProperty:function(t,e){return Roe(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Hoe(t),A6(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=md(t),o=Reflect.getOwnPropertyDescriptor(n,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:n[e]}},defineProperty:function(){Dm(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Dm(12)}},RD={};oR(Yse,function(t,e){RD[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),RD.deleteProperty=function(t,e){return RD.set.call(this,t,e,void 0)},RD.set=function(t,e,n){return Yse.set.call(this,t[0],e,n,t[0])};var Gpt=function(){function t(n){var o=this;this.O=g4e,this.D=!0,this.produce=function(r,i,a){if(typeof r=="function"&&typeof i!="function"){var l=i;i=r;var s=o;return function(A){var y=this;A===void 0&&(A=l);for(var S=arguments.length,C=Array(S>1?S-1:0),P=1;P1?u-1:0),f=1;f=0;r--){var i=o[r];if(i.path.length===0&&i.op==="replace"){n=i.value;break}}r>-1&&(o=o.slice(r+1));var a=S9("Patches").$;return nR(n)?a(n,o):this.produce(n,function(l){return a(l,o)})},t}(),Hg=new Gpt,JP=Hg.produce;Hg.produceWithPatches.bind(Hg);Hg.setAutoFreeze.bind(Hg);Hg.setUseProxies.bind(Hg);Hg.applyPatches.bind(Hg);Hg.createDraft.bind(Hg);Hg.finishDraft.bind(Hg);/** * @license * Copyright 2010-2023 Three.js Authors * SPDX-License-Identifier: MIT @@ -6962,7 +6962,7 @@ Content-Type: `+c.contentType+`\r background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0)); background: linear-gradient(to top, #000, rgba(0,0,0,0)); } - `),be.createElement("div",{style:u.white,className:"saturation-white"},be.createElement("div",{style:u.black,className:"saturation-black"}),be.createElement("div",{style:u.pointer},this.props.pointer?be.createElement(this.props.pointer,this.props):be.createElement("div",{style:u.circle}))))}}]),e}(m.PureComponent||m.Component);function Uco(t,e){for(var n=-1,o=t==null?0:t.length;++n=0,i=!n&&r&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return i?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(o=this.toRgbString()),e==="prgb"&&(o=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(o=this.toHexString()),e==="hex3"&&(o=this.toHexString(!0)),e==="hex4"&&(o=this.toHex8String(!0)),e==="hex8"&&(o=this.toHex8String()),e==="name"&&(o=this.toName()),e==="hsl"&&(o=this.toHslString()),e==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},clone:function(){return Zr(this.toString())},_applyModification:function(e,n){var o=e.apply(null,[this].concat([].slice.call(n)));return this._r=o._r,this._g=o._g,this._b=o._b,this.setAlpha(o._a),this},lighten:function(){return this._applyModification(r0o,arguments)},brighten:function(){return this._applyModification(i0o,arguments)},darken:function(){return this._applyModification(a0o,arguments)},desaturate:function(){return this._applyModification(t0o,arguments)},saturate:function(){return this._applyModification(n0o,arguments)},greyscale:function(){return this._applyModification(o0o,arguments)},spin:function(){return this._applyModification(l0o,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(u0o,arguments)},complement:function(){return this._applyCombination(s0o,arguments)},monochromatic:function(){return this._applyCombination(d0o,arguments)},splitcomplement:function(){return this._applyCombination(c0o,arguments)},triad:function(){return this._applyCombination(iHe,[3])},tetrad:function(){return this._applyCombination(iHe,[4])}};Zr.fromRatio=function(t,e){if(cJ(t)=="object"){var n={};for(var o in t)t.hasOwnProperty(o)&&(o==="a"?n[o]=t[o]:n[o]=GD(t[o]));t=n}return Zr(t,e)};function qco(t){var e={r:0,g:0,b:0},n=1,o=null,r=null,i=null,a=!1,l=!1;return typeof t=="string"&&(t=m0o(t)),cJ(t)=="object"&&(u6(t.r)&&u6(t.g)&&u6(t.b)?(e=$co(t.r,t.g,t.b),a=!0,l=String(t.r).substr(-1)==="%"?"prgb":"rgb"):u6(t.h)&&u6(t.s)&&u6(t.v)?(o=GD(t.s),r=GD(t.v),e=Zco(t.h,o,r),a=!0,l="hsv"):u6(t.h)&&u6(t.s)&&u6(t.l)&&(o=GD(t.s),i=GD(t.l),e=Qco(t.h,o,i),a=!0,l="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=crt(n),{ok:a,format:t.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}function $co(t,e,n){return{r:Wc(t,255)*255,g:Wc(e,255)*255,b:Wc(n,255)*255}}function tHe(t,e,n){t=Wc(t,255),e=Wc(e,255),n=Wc(n,255);var o=Math.max(t,e,n),r=Math.min(t,e,n),i,a,l=(o+r)/2;if(o==r)i=a=0;else{var s=o-r;switch(a=l>.5?s/(2-o-r):s/(o+r),o){case t:i=(e-n)/s+(e1&&(d-=1),d<1/6?c+(u-c)*6*d:d<1/2?u:d<2/3?c+(u-c)*(2/3-d)*6:c}if(e===0)o=r=i=n;else{var l=n<.5?n*(1+e):n+e-n*e,s=2*n-l;o=a(s,l,t+1/3),r=a(s,l,t),i=a(s,l,t-1/3)}return{r:o*255,g:r*255,b:i*255}}function nHe(t,e,n){t=Wc(t,255),e=Wc(e,255),n=Wc(n,255);var o=Math.max(t,e,n),r=Math.min(t,e,n),i,a,l=o,s=o-r;if(a=o===0?0:s/o,o==r)i=0;else{switch(o){case t:i=(e-n)/s+(e>1)+720)%360;--e;)o.h=(o.h+r)%360,i.push(Zr(o));return i}function d0o(t,e){e=e||6;for(var n=Zr(t).toHsv(),o=n.h,r=n.s,i=n.v,a=[],l=1/e;e--;)a.push(Zr({h:o,s:r,v:i})),i=(i+l)%1;return a}Zr.mix=function(t,e,n){n=n===0?0:n||50;var o=Zr(t).toRgb(),r=Zr(e).toRgb(),i=n/100,a={r:(r.r-o.r)*i+o.r,g:(r.g-o.g)*i+o.g,b:(r.b-o.b)*i+o.b,a:(r.a-o.a)*i+o.a};return Zr(a)};Zr.readability=function(t,e){var n=Zr(t),o=Zr(e);return(Math.max(n.getLuminance(),o.getLuminance())+.05)/(Math.min(n.getLuminance(),o.getLuminance())+.05)};Zr.isReadable=function(t,e,n){var o=Zr.readability(t,e),r,i;switch(i=!1,r=y0o(n),r.level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7;break}return i};Zr.mostReadable=function(t,e,n){var o=null,r=0,i,a,l,s;n=n||{},a=n.includeFallbackColors,l=n.level,s=n.size;for(var c=0;cr&&(r=i,o=Zr(e[c]));return Zr.isReadable(t,o,{level:l,size:s})||!a?o:(n.includeFallbackColors=!1,Zr.mostReadable(t,["#fff","#000"],n))};var pfe=Zr.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},f0o=Zr.hexNames=h0o(pfe);function h0o(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function crt(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Wc(t,e){p0o(t)&&(t="100%");var n=g0o(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function gee(t){return Math.min(1,Math.max(0,t))}function J1(t){return parseInt(t,16)}function p0o(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function g0o(t){return typeof t=="string"&&t.indexOf("%")!=-1}function P2(t){return t.length==1?"0"+t:""+t}function GD(t){return t<=1&&(t=t*100+"%"),t}function urt(t){return Math.round(parseFloat(t)*255).toString(16)}function aHe(t){return J1(t)/255}var n2=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+o),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+o),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+o),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function u6(t){return!!n2.CSS_UNIT.exec(t)}function m0o(t){t=t.replace(Jco,"").replace(Kco,"").toLowerCase();var e=!1;if(pfe[t])t=pfe[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=n2.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=n2.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=n2.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=n2.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=n2.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=n2.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=n2.hex8.exec(t))?{r:J1(n[1]),g:J1(n[2]),b:J1(n[3]),a:aHe(n[4]),format:e?"name":"hex8"}:(n=n2.hex6.exec(t))?{r:J1(n[1]),g:J1(n[2]),b:J1(n[3]),format:e?"name":"hex"}:(n=n2.hex4.exec(t))?{r:J1(n[1]+""+n[1]),g:J1(n[2]+""+n[2]),b:J1(n[3]+""+n[3]),a:aHe(n[4]+""+n[4]),format:e?"name":"hex8"}:(n=n2.hex3.exec(t))?{r:J1(n[1]+""+n[1]),g:J1(n[2]+""+n[2]),b:J1(n[3]+""+n[3]),format:e?"name":"hex"}:!1}function y0o(t){var e,n;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:e,size:n}}var lHe=function(e){var n=["r","g","b","a","h","s","l","v"],o=0,r=0;return Xco(n,function(i){if(e[i]&&(o+=1,isNaN(e[i])||(r+=1),i==="s"||i==="l")){var a=/^\d+%$/;a.test(e[i])&&(r+=1)}}),o===r?e:!1},XD=function(e,n){var o=e.hex?Zr(e.hex):Zr(e),r=o.toHsl(),i=o.toHsv(),a=o.toRgb(),l=o.toHex();r.s===0&&(r.h=n||0,i.h=n||0);var s=l==="000000"&&a.a===0;return{hsl:r,hex:s?"transparent":"#"+l,rgb:a,hsv:i,oldHue:e.h||n||r.h,source:e.source}},Qw=function(e){if(e==="transparent")return!0;var n=String(e).charAt(0)==="#"?1:0;return e.length!==4+n&&e.length<7+n&&Zr(e).isValid()},A9e=function(e){if(!e)return"#fff";var n=XD(e);if(n.hex==="transparent")return"rgba(0,0,0,0.4)";var o=(n.rgb.r*299+n.rgb.g*587+n.rgb.b*114)/1e3;return o>=128?"#000":"#fff"},Yae=function(e,n){var o=e.replace("°","");return Zr(n+" ("+o+")")._ok},tD=Object.assign||function(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:"span";return function(o){P0o(r,o);function r(){var i,a,l,s;T0o(this,r);for(var c=arguments.length,u=Array(c),d=0;dl))return!1;var c=i.get(t),u=i.get(e);if(c&&u)return c==e&&u==t;var d=-1,f=!0,p=n&W0o?new uJ:void 0;for(i.set(t,e),i.set(e,t);++d=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}var BO=24,Zuo=vrt.default=function(t){var e=t.fill,n=e===void 0?"currentColor":e,o=t.width,r=o===void 0?BO:o,i=t.height,a=i===void 0?BO:i,l=t.style,s=l===void 0?{}:l,c=Quo(t,["fill","width","height","style"]);return PHe.default.createElement("svg",THe({viewBox:"0 0 "+BO+" "+BO,style:THe({fill:n,width:r,height:a},s)},c),PHe.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},edo=function(){function t(e,n){for(var o=0;o1&&(r.a=1),o.props.onChange({h:o.props.hsl.h,s:o.props.hsl.s,l:o.props.hsl.l,a:Math.round(r.a*100)/100,source:"rgb"},i)):(r.h||r.s||r.l)&&(typeof r.s=="string"&&r.s.includes("%")&&(r.s=r.s.replace("%","")),typeof r.l=="string"&&r.l.includes("%")&&(r.l=r.l.replace("%","")),r.s==1?r.s=.01:r.l==1&&(r.l=.01),o.props.onChange({h:r.h||o.props.hsl.h,s:Number(SHe(r.s)?o.props.hsl.s:r.s),l:Number(SHe(r.l)?o.props.hsl.l:r.l),source:"hsl"},i))},o.showHighlight=function(r){r.currentTarget.style.background="#eee"},o.hideHighlight=function(r){r.currentTarget.style.background="transparent"},n.hsl.a!==1&&n.view==="hex"?o.state={view:"rgb"}:o.state={view:n.view},o}return edo(e,[{key:"render",value:function(){var o=this,r=$i({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),i=void 0;return this.state.view==="hex"?i=be.createElement("div",{style:r.fields,className:"flexbox-fix"},be.createElement("div",{style:r.field},be.createElement(cl,{style:{input:r.input,label:r.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?i=be.createElement("div",{style:r.fields,className:"flexbox-fix"},be.createElement("div",{style:r.field},be.createElement(cl,{style:{input:r.input,label:r.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),be.createElement("div",{style:r.field},be.createElement(cl,{style:{input:r.input,label:r.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),be.createElement("div",{style:r.field},be.createElement(cl,{style:{input:r.input,label:r.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),be.createElement("div",{style:r.alpha},be.createElement(cl,{style:{input:r.input,label:r.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(i=be.createElement("div",{style:r.fields,className:"flexbox-fix"},be.createElement("div",{style:r.field},be.createElement(cl,{style:{input:r.input,label:r.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),be.createElement("div",{style:r.field},be.createElement(cl,{style:{input:r.input,label:r.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),be.createElement("div",{style:r.field},be.createElement(cl,{style:{input:r.input,label:r.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),be.createElement("div",{style:r.alpha},be.createElement(cl,{style:{input:r.input,label:r.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),be.createElement("div",{style:r.wrap,className:"flexbox-fix"},i,be.createElement("div",{style:r.toggle},be.createElement("div",{style:r.icon,onClick:this.toggleViews,ref:function(l){return o.icon=l}},be.createElement(Zuo,{style:r.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(o,r){return o.hsl.a!==1&&r.view==="hex"?{view:"rgb"}:null}}]),e}(be.Component);xrt.defaultProps={view:"hex"};var CHe=function(){var e=$i({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return be.createElement("div",{style:e.picker})},rdo=function(){var e=$i({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return be.createElement("div",{style:e.picker})},T9e=function(e){var n=e.width,o=e.onChange,r=e.disableAlpha,i=e.rgb,a=e.hsl,l=e.hsv,s=e.hex,c=e.renderers,u=e.styles,d=u===void 0?{}:u,f=e.className,p=f===void 0?"":f,g=e.defaultView,A=$i(h1({default:{picker:{width:n,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},d),{disableAlpha:r});return be.createElement("div",{style:A.picker,className:"chrome-picker "+p},be.createElement("div",{style:A.saturation},be.createElement(pee,{style:A.Saturation,hsl:a,hsv:l,pointer:rdo,onChange:o})),be.createElement("div",{style:A.body},be.createElement("div",{style:A.controls,className:"flexbox-fix"},be.createElement("div",{style:A.color},be.createElement("div",{style:A.swatch},be.createElement("div",{style:A.active}),be.createElement(TM,{renderers:c}))),be.createElement("div",{style:A.toggles},be.createElement("div",{style:A.hue},be.createElement(PM,{style:A.Hue,hsl:a,pointer:CHe,onChange:o})),be.createElement("div",{style:A.alpha},be.createElement(u9e,{style:A.Alpha,rgb:i,hsl:a,pointer:CHe,renderers:c,onChange:o})))),be.createElement(xrt,{rgb:i,hsl:a,hex:s,view:g,onChange:o,disableAlpha:r})))};T9e.propTypes={width:mo.oneOfType([mo.string,mo.number]),disableAlpha:mo.bool,styles:mo.object,defaultView:mo.oneOf(["hex","rgb","hsl"])};T9e.defaultProps={width:225,disableAlpha:!1,styles:{}};p1(T9e);var ido=function(e){var n=e.color,o=e.onClick,r=o===void 0?function(){}:o,i=e.onSwatchHover,a=e.active,l=$i({default:{color:{background:n,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:A9e(n),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:a,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return be.createElement(sS,{style:l.color,color:n,onClick:r,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},be.createElement("div",{style:l.dot}))},ado=function(e){var n=e.hex,o=e.rgb,r=e.onChange,i=$i({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:n},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),a=function(s,c){s.r||s.g||s.b?r({r:s.r||o.r,g:s.g||o.g,b:s.b||o.b,source:"rgb"},c):r({hex:s.hex,source:"hex"},c)};return be.createElement("div",{style:i.fields,className:"flexbox-fix"},be.createElement("div",{style:i.active}),be.createElement(cl,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:n,onChange:a}),be.createElement(cl,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:o.r,onChange:a}),be.createElement(cl,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:o.g,onChange:a}),be.createElement(cl,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:o.b,onChange:a}))},P9e=function(e){var n=e.onChange,o=e.onSwatchHover,r=e.colors,i=e.hex,a=e.rgb,l=e.styles,s=l===void 0?{}:l,c=e.className,u=c===void 0?"":c,d=$i(h1({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},s)),f=function(g,A){g.hex?Qw(g.hex)&&n({hex:g.hex,source:"hex"},A):n(g,A)};return be.createElement(eU,{style:d.Compact,styles:s},be.createElement("div",{style:d.compact,className:"compact-picker "+u},be.createElement("div",null,cS(r,function(p){return be.createElement(ido,{key:p,color:p,active:p.toLowerCase()===i,onClick:f,onSwatchHover:o})}),be.createElement("div",{style:d.clear})),be.createElement(ado,{hex:i,rgb:a,onChange:f})))};P9e.propTypes={colors:mo.arrayOf(mo.string),styles:mo.object};P9e.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};const Ld=p1(P9e);var ldo=function(e){var n=e.hover,o=e.color,r=e.onClick,i=e.onSwatchHover,a={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},l=$i({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:n});return be.createElement("div",{style:l.swatch},be.createElement(sS,{color:o,onClick:r,onHover:i,focusStyle:a}))};const sdo=c9e(ldo);var C9e=function(e){var n=e.width,o=e.colors,r=e.onChange,i=e.onSwatchHover,a=e.triangle,l=e.styles,s=l===void 0?{}:l,c=e.className,u=c===void 0?"":c,d=$i(h1({default:{card:{width:n,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},s),{"hide-triangle":a==="hide","top-left-triangle":a==="top-left","top-right-triangle":a==="top-right","bottom-left-triangle":a==="bottom-left","bottom-right-triangle":a==="bottom-right"}),f=function(g,A){return r({hex:g,source:"hex"},A)};return be.createElement("div",{style:d.card,className:"github-picker "+u},be.createElement("div",{style:d.triangleShadow}),be.createElement("div",{style:d.triangle}),cS(o,function(p){return be.createElement(sdo,{color:p,key:p,onClick:f,onSwatchHover:i})}))};C9e.propTypes={width:mo.oneOfType([mo.string,mo.number]),colors:mo.arrayOf(mo.string),triangle:mo.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:mo.object};C9e.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};p1(C9e);var cdo=function(e){var n=e.direction,o=$i({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return be.createElement("div",{style:o.picker})},udo=Object.assign||function(t){for(var e=1;e.5});return be.createElement("div",{style:o.picker})},pdo=function(){var e=$i({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return be.createElement("div",{style:e.pointer},be.createElement("div",{style:e.left},be.createElement("div",{style:e.leftInside})),be.createElement("div",{style:e.right},be.createElement("div",{style:e.rightInside})))},RHe=function(e){var n=e.onClick,o=e.label,r=e.children,i=e.active,a=$i({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return be.createElement("div",{style:a.button,onClick:n},o||r)},gdo=function(e){var n=e.rgb,o=e.currentColor,r=$i({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+n.r+","+n.g+", "+n.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:o,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return be.createElement("div",null,be.createElement("div",{style:r.label},"new"),be.createElement("div",{style:r.swatches},be.createElement("div",{style:r.new}),be.createElement("div",{style:r.current})),be.createElement("div",{style:r.label},"current"))},mdo=function(){function t(e,n){for(var o=0;o100&&(u.a=100),u.a/=100,n({h:r.h,s:r.s,l:r.l,a:u.a,source:"rgb"},d))};return be.createElement("div",{style:l.fields,className:"flexbox-fix"},be.createElement("div",{style:l.double},be.createElement(cl,{style:{input:l.input,label:l.label},label:"hex",value:i.replace("#",""),onChange:s})),be.createElement("div",{style:l.single},be.createElement(cl,{style:{input:l.input,label:l.label},label:"r",value:o.r,onChange:s,dragLabel:"true",dragMax:"255"})),be.createElement("div",{style:l.single},be.createElement(cl,{style:{input:l.input,label:l.label},label:"g",value:o.g,onChange:s,dragLabel:"true",dragMax:"255"})),be.createElement("div",{style:l.single},be.createElement(cl,{style:{input:l.input,label:l.label},label:"b",value:o.b,onChange:s,dragLabel:"true",dragMax:"255"})),be.createElement("div",{style:l.alpha},be.createElement(cl,{style:{input:l.input,label:l.label},label:"a",value:Math.round(o.a*100),onChange:s,dragLabel:"true",dragMax:"100"})))},xdo=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}var YO=24,Hdo=Srt.default=function(t){var e=t.fill,n=e===void 0?"currentColor":e,o=t.width,r=o===void 0?YO:o,i=t.height,a=i===void 0?YO:i,l=t.style,s=l===void 0?{}:l,c=Rdo(t,["fill","width","height","style"]);return MHe.default.createElement("svg",HHe({viewBox:"0 0 "+YO+" "+YO,style:HHe({fill:n,width:r,height:a},s)},c),MHe.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},Mdo=function(e){var n=e.color,o=e.onClick,r=o===void 0?function(){}:o,i=e.onSwatchHover,a=e.first,l=e.last,s=e.active,c=$i({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:A9e(n),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:a,last:l,active:s,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return be.createElement(sS,{color:n,style:c.color,onClick:r,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},be.createElement("div",{style:c.check},be.createElement(Hdo,null)))},Ido=function(e){var n=e.onClick,o=e.onSwatchHover,r=e.group,i=e.active,a=$i({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return be.createElement("div",{style:a.group},cS(r,function(l,s){return be.createElement(Mdo,{key:l,color:l,active:l.toLowerCase()===i,first:s===0,last:s===r.length-1,onClick:n,onSwatchHover:o})}))},z9e=function(e){var n=e.width,o=e.height,r=e.onChange,i=e.onSwatchHover,a=e.colors,l=e.hex,s=e.styles,c=s===void 0?{}:s,u=e.className,d=u===void 0?"":u,f=$i(h1({default:{picker:{width:n,height:o},overflow:{height:o,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},c)),p=function(A,y){return r({hex:A,source:"hex"},y)};return be.createElement("div",{style:f.picker,className:"swatches-picker "+d},be.createElement(eU,null,be.createElement("div",{style:f.overflow},be.createElement("div",{style:f.body},cS(a,function(g){return be.createElement(Ido,{key:g.toString(),group:g,active:l,onClick:p,onSwatchHover:i})}),be.createElement("div",{style:f.clear})))))};z9e.propTypes={width:mo.oneOfType([mo.string,mo.number]),height:mo.oneOfType([mo.string,mo.number]),colors:mo.arrayOf(mo.arrayOf(mo.string)),styles:mo.object};z9e.defaultProps={width:320,height:240,colors:[[yP[900],yP[700],yP[500],yP[300],yP[100]],[AP[900],AP[700],AP[500],AP[300],AP[100]],[wP[900],wP[700],wP[500],wP[300],wP[100]],[vP[900],vP[700],vP[500],vP[300],vP[100]],[xP[900],xP[700],xP[500],xP[300],xP[100]],[bP[900],bP[700],bP[500],bP[300],bP[100]],[SP[900],SP[700],SP[500],SP[300],SP[100]],[TP[900],TP[700],TP[500],TP[300],TP[100]],[PP[900],PP[700],PP[500],PP[300],PP[100]],["#194D33",JD[700],JD[500],JD[300],JD[100]],[CP[900],CP[700],CP[500],CP[300],CP[100]],[RP[900],RP[700],RP[500],RP[300],RP[100]],[HP[900],HP[700],HP[500],HP[300],HP[100]],[MP[900],MP[700],MP[500],MP[300],MP[100]],[IP[900],IP[700],IP[500],IP[300],IP[100]],[zP[900],zP[700],zP[500],zP[300],zP[100]],[DP[900],DP[700],DP[500],DP[300],DP[100]],[EP[900],EP[700],EP[500],EP[300],EP[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};p1(z9e);var D9e=function(e){var n=e.onChange,o=e.onSwatchHover,r=e.hex,i=e.colors,a=e.width,l=e.triangle,s=e.styles,c=s===void 0?{}:s,u=e.className,d=u===void 0?"":u,f=$i(h1({default:{card:{width:a,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},c),{"hide-triangle":l==="hide","top-left-triangle":l==="top-left","top-right-triangle":l==="top-right"}),p=function(A,y){Qw(A)&&n({hex:A,source:"hex"},y)};return be.createElement("div",{style:f.card,className:"twitter-picker "+d},be.createElement("div",{style:f.triangleShadow}),be.createElement("div",{style:f.triangle}),be.createElement("div",{style:f.body},cS(i,function(g,A){return be.createElement(sS,{key:A,color:g,hex:g,style:f.swatch,onClick:p,onHover:o,focusStyle:{boxShadow:"0 0 4px "+g}})}),be.createElement("div",{style:f.hash},"#"),be.createElement(cl,{label:null,style:{input:f.input},value:r.replace("#",""),onChange:p}),be.createElement("div",{style:f.clear})))};D9e.propTypes={width:mo.oneOfType([mo.string,mo.number]),triangle:mo.oneOf(["hide","top-left","top-right"]),colors:mo.arrayOf(mo.string),styles:mo.object};D9e.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};p1(D9e);var E9e=function(e){var n=$i({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(e.hsl.s*100)+"%, "+Math.round(e.hsl.l*100)+"%)"}}});return be.createElement("div",{style:n.picker})};E9e.propTypes={hsl:mo.shape({h:mo.number,s:mo.number,l:mo.number,a:mo.number})};E9e.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var F9e=function(e){var n=$i({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return be.createElement("div",{style:n.picker})};F9e.propTypes={hsl:mo.shape({h:mo.number,s:mo.number,l:mo.number,a:mo.number})};F9e.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var zdo=function(e){var n=e.onChange,o=e.rgb,r=e.hsl,i=e.hex,a=e.hsv,l=function(p,g){if(p.hex)Qw(p.hex)&&n({hex:p.hex,source:"hex"},g);else if(p.rgb){var A=p.rgb.split(",");Yae(p.rgb,"rgb")&&n({r:A[0],g:A[1],b:A[2],a:1,source:"rgb"},g)}else if(p.hsv){var y=p.hsv.split(",");Yae(p.hsv,"hsv")&&(y[2]=y[2].replace("%",""),y[1]=y[1].replace("%",""),y[0]=y[0].replace("°",""),y[1]==1?y[1]=.01:y[2]==1&&(y[2]=.01),n({h:Number(y[0]),s:Number(y[1]),v:Number(y[2]),source:"hsv"},g))}else if(p.hsl){var S=p.hsl.split(",");Yae(p.hsl,"hsl")&&(S[2]=S[2].replace("%",""),S[1]=S[1].replace("%",""),S[0]=S[0].replace("°",""),d[1]==1?d[1]=.01:d[2]==1&&(d[2]=.01),n({h:Number(S[0]),s:Number(S[1]),v:Number(S[2]),source:"hsl"},g))}},s=$i({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),c=o.r+", "+o.g+", "+o.b,u=Math.round(r.h)+"°, "+Math.round(r.s*100)+"%, "+Math.round(r.l*100)+"%",d=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.v*100)+"%";return be.createElement("div",{style:s.wrap,className:"flexbox-fix"},be.createElement("div",{style:s.fields},be.createElement("div",{style:s.double},be.createElement(cl,{style:{input:s.input,label:s.label},label:"hex",value:i,onChange:l})),be.createElement("div",{style:s.column},be.createElement("div",{style:s.single},be.createElement(cl,{style:{input:s.input2,label:s.label2},label:"rgb",value:c,onChange:l})),be.createElement("div",{style:s.single},be.createElement(cl,{style:{input:s.input2,label:s.label2},label:"hsv",value:d,onChange:l})),be.createElement("div",{style:s.single},be.createElement(cl,{style:{input:s.input2,label:s.label2},label:"hsl",value:u,onChange:l})))))},k9e=function(e){var n=e.width,o=e.onChange,r=e.rgb,i=e.hsl,a=e.hsv,l=e.hex,s=e.header,c=e.styles,u=c===void 0?{}:c,d=e.className,f=d===void 0?"":d,p=$i(h1({default:{picker:{width:n,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+r.r+", "+r.g+", "+r.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},u));return be.createElement("div",{style:p.picker,className:"google-picker "+f},be.createElement("div",{style:p.head},s),be.createElement("div",{style:p.swatch}),be.createElement("div",{style:p.saturation},be.createElement(pee,{hsl:i,hsv:a,pointer:E9e,onChange:o})),be.createElement("div",{style:p.body},be.createElement("div",{style:p.controls,className:"flexbox-fix"},be.createElement("div",{style:p.hue},be.createElement(PM,{style:p.Hue,hsl:i,radius:"4px",pointer:F9e,onChange:o}))),be.createElement(zdo,{rgb:r,hsl:i,hex:l,hsv:a,onChange:o})))};k9e.propTypes={width:mo.oneOfType([mo.string,mo.number]),styles:mo.object,header:mo.string};k9e.defaultProps={width:652,styles:{},header:"Color picker"};p1(k9e);const Ddo=({setDialogVisible:t})=>{const e=M(pn),n=M(dYe),o=M(Jn),r=M(fYe),i=M(En),a=M($s),l=M(Qn),s=uo(z.Foundation),[c,u]=m.useState((s==null?void 0:s.color)??"#808080"),d=$t(),f=S=>{switch(a){case re.AllSelectedObjectsOfThisType:{for(const C of M.getState().elements)if(C.type===z.Foundation&&!C.locked&&M.getState().selectedElementIdSet.has(C.id)&&S!==C.color)return!0;break}case re.AllObjectsOfThisType:for(const C of M.getState().elements)if(C.type===z.Foundation&&!C.locked&&S!==C.color)return!0;break;default:if(S!==(s==null?void 0:s.color))return!0}return!1},p=(S,C)=>{M.getState().set(P=>{for(const v of P.elements)if(v.type===z.Foundation&&S.has(v.id))if(C!==void 0)v.color=C;else{const T=S.get(v.id);T!==void 0&&(v.color=T)}})},g=S=>{if(s&&f(S)){switch(a){case re.AllSelectedObjectsOfThisType:{const C=new Map;for(const v of M.getState().elements)v.type===z.Foundation&&M.getState().selectedElementIdSet.has(v.id)&&C.set(v.id,v.color??"#808080");const P={name:"Set Color for Selected Foundations",timestamp:Date.now(),oldValues:C,newValue:S,undo:()=>{p(P.oldValues)},redo:()=>{p(P.oldValues,P.newValue)}};i(P),p(C,S),l(M.getState().applyCount+1);break}case re.AllObjectsOfThisType:{const C=new Map;for(const v of M.getState().elements)v.type===z.Foundation&&C.set(v.id,v.color??"#808080");const P={name:"Set Color for All Foundations",timestamp:Date.now(),oldValues:C,newValue:S,undo:()=>{for(const[v,T]of P.oldValues.entries())n(v,T)},redo:()=>{r(z.Foundation,P.newValue)}};i(P),r(z.Foundation,S),l(M.getState().applyCount+1);break}default:{const C=o(s.id),P=C?C.color:s.color,v={name:"Set Color of Selected Foundation",timestamp:Date.now(),oldValue:P,newValue:S,changedElementId:s.id,changedElementType:s.type,undo:()=>{n(v.changedElementId,v.oldValue)},redo:()=>{n(v.changedElementId,v.newValue)}};i(v),n(s.id,S),l(M.getState().applyCount+1);break}}e(C=>{C.actionState.foundationColor=S})}},A=()=>{g(c)},y=()=>{t(!1)};return h.jsx(so,{width:600,title:Y.t("word.Color",d),onApply:A,onClose:y,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:h.jsx(Ld,{color:c,onChangeComplete:S=>{u(S.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:12,children:h.jsx(Le.Group,{onChange:S=>M.getState().setFoundationActionScope(S.target.value),value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",d)})]})})})]})})},Edo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(cYe),r=M(d3),i=M(vW),a=M(kw),l=M(kH),s=M(u3),c=M(En),u=M($s),d=M(pn),f=M(no),p=M(Qn),g=M(Xi),A=uo(z.Foundation),[y,S]=m.useState((A==null?void 0:A.lx)??.1),C=m.useRef(new Map),P=m.useRef(new Map),v=m.useRef(new Map),T=m.useRef(new Map),w=m.useRef(new Map),x=m.useRef(new Map),b=m.useRef(new Map),R=m.useRef(new Map),H=m.useRef(!1),F=m.useRef(),E=$t(),N=se=>{if(A){switch(u){case re.AllSelectedObjectsOfThisType:{for(const Z of e)if(Z.type===z.Foundation&&M.getState().selectedElementIdSet.has(Z.id)){const ee=Z,te=l(ee.id);if(te.length>0&&!ye.doesNewSizeContainAllChildren(ee,te,se,ee.ly))return!1}break}case re.AllObjectsOfThisType:{for(const Z of e)if(Z.type===z.Foundation){const ee=Z,te=l(ee.id);if(te.length>0&&!ye.doesNewSizeContainAllChildren(ee,te,se,ee.ly))return!1}break}default:{const Z=l(A.id);if(Z.length>0)return ye.doesNewSizeContainAllChildren(A,Z,se,A.ly);break}}return!0}},U=se=>!N(se),W=se=>{if(A){switch(u){case re.AllSelectedObjectsOfThisType:for(const Z of e)if(Z.type===z.Foundation&&!Z.locked&&M.getState().selectedElementIdSet.has(Z.id)&&Math.abs(Z.lx-se)>Et)return!0;break;case re.AllObjectsOfThisType:for(const Z of e)if(Z.type===z.Foundation&&!Z.locked&&Math.abs(Z.lx-se)>Et)return!0;break;default:if(Math.abs((A==null?void 0:A.lx)-se)>Et)return!0}return!1}},k=(se,Z)=>{if(se==null)return null;for(const ee of se.children)if(ee.name.includes(`${Z}`))return ee;return null},D=(se,Z,ee)=>{var te,oe;if(se){for(const de of se.children)if(de.name.includes(`${ee.id}`)){(oe=(te=kn.getState().contentRef)==null?void 0:te.current)==null||oe.add(de);break}d(de=>{for(const he of de.elements)if(he.id===ee.id){he.parentId=Zo;const pe=new Kt(he.cx,he.cy).rotateAround(ai,Z.rotation[2]).add(new Kt(Z.cx,Z.cy));he.cx=pe.x,he.cy=pe.y,he.cz=0,T.current.set(he.id,new ae(pe.x,pe.y,0)),P.current.set(he.id,Zo);break}})}},L=(se,Z)=>{const ee=l(se.id),te=se.rotation[2];if(w.current.clear(),R.current.clear(),ee.length>0)for(const oe of ee)switch(oe.type){case z.Wall:break;case z.SolarPanel:case z.ParabolicTrough:case z.ParabolicDish:case z.FresnelReflector:case z.Heliostat:case z.Sensor:{const de=new Kt(oe.cx*se.lx,oe.cy*se.ly).rotateAround(ai,te);w.current.set(oe.id,de),v.current.set(oe.id,new ae(oe.cx,oe.cy));break}case z.Polygon:{const de=oe,he=[];for(const pe of de.vertices)he.push(new Kt(pe.x*se.lx,pe.y*se.ly).rotateAround(ai,te));R.current.set(oe.id,he),x.current.set(oe.id,de.vertices.map(pe=>({...pe})));break}case z.Human:case z.Tree:{v.current.set(oe.id,new ae(oe.cx,oe.cy,oe.cz));break}}if(r(se.id,Z),ee.length>0)for(const oe of ee)switch(oe.type){case z.Wall:break;case z.SolarPanel:case z.ParabolicTrough:case z.ParabolicDish:case z.FresnelReflector:case z.Heliostat:case z.Sensor:{const de=w.current.get(oe.id);if(de){const pe=new Kt(de.x,de.y).rotateAround(ai,-te).x/Z;o(oe.id,pe),T.current.set(oe.id,new ae(pe,oe.cy))}break}case z.Polygon:{const de=R.current.get(oe.id);if(de){const he=[];for(const pe of de){const me=pe.rotateAround(ai,-te),le=me.x/Z,Te=me.y/se.ly;he.push({x:le,y:Te})}a(oe.id,he),b.current.set(oe.id,he.map(pe=>({...pe})))}break}case z.Human:case z.Tree:{if(T.current.set(oe.id,new ae(oe.cx,oe.cy,oe.cz)),C.current.set(oe.id,se.id),Math.abs(oe.cz-se.lz/2)0){const de=kn.getState().contentRef,he=k(de==null?void 0:de.current,se.id);D(he,se,oe)}}else if(Math.abs(Math.abs(oe.cx)-se.lx/2)0?Z:-Z)/2;o(oe.id,de),T.current.set(oe.id,new ae(de,oe.cy,oe.cz))}break}}},j=(se,Z,ee)=>{if(!se||!Z)return;const te=kn.getState().contentRef,oe=k(te==null?void 0:te.current,Z),de=k(Z===Zo?te==null?void 0:te.current:oe,ee);if(de&&(te!=null&&te.current)){if(se===Zo)te.current.add(de);else{const he=k(te.current,se);he==null||he.add(de)}op()}},B=(se,Z)=>{se&&d(ee=>{for(const te of ee.elements)if(te.id===Z){te.parentId=se;break}})},O=(se,Z)=>{M.getState().set(ee=>{for(const te of ee.elements)if(se.has(te.id))if(Z!==void 0)te.lx=Z;else{const oe=se.get(te.id);oe!==void 0&&(te.lx=oe)}})},V=se=>{if(!A||!W(se))return;const Z=n(A.id),ee=Z?Z.lx:A.lx;if(F.current=void 0,H.current=U(se),H.current)F.current=se,S(ee);else switch(v.current.clear(),T.current.clear(),x.current.clear(),b.current.clear(),u){case re.AllSelectedObjectsOfThisType:{const te=new Map;for(const de of e)de.type===z.Foundation&&M.getState().selectedElementIdSet.has(de.id)&&te.set(de.id,de.lx);for(const de of e)de.type===z.Foundation&&M.getState().selectedElementIdSet.has(de.id)&&L(de,se);const oe={name:"Set Length for Selected Foundations",timestamp:Date.now(),oldSizes:te,newSize:se,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var de,he;if(O(oe.oldSizes),oe.oldChildrenPositionsMap&&oe.oldChildrenPositionsMap.size>0)for(const[pe,me]of oe.oldChildrenPositionsMap.entries()){s(pe,me.x,me.y,me.z);const le=(de=oe.oldChildrenParentIdMap)==null?void 0:de.get(pe),Te=(he=oe.newChildrenParentIdMap)==null?void 0:he.get(pe);le&&Te&&le!==Te&&(j(le,Te,pe),B(le,pe))}if(oe.oldChildrenVerticesMap&&oe.oldChildrenVerticesMap.size>0)for(const[pe,me]of oe.oldChildrenVerticesMap.entries())a(pe,me)},redo:()=>{var de,he;if(O(oe.oldSizes,oe.newSize),oe.newChildrenPositionsMap&&oe.newChildrenPositionsMap.size>0)for(const[pe,me]of oe.newChildrenPositionsMap.entries()){s(pe,me.x,me.y,me.z);const le=(de=oe.oldChildrenParentIdMap)==null?void 0:de.get(pe),Te=(he=oe.newChildrenParentIdMap)==null?void 0:he.get(pe);le&&Te&&le!==Te&&(j(Te,le,pe),B(Te,pe))}if(oe.newChildrenVerticesMap&&oe.newChildrenVerticesMap.size>0)for(const[pe,me]of oe.newChildrenVerticesMap.entries())a(pe,me)}};c(oe),p(f+1);break}case re.AllObjectsOfThisType:{const te=new Map;for(const de of e)de.type===z.Foundation&&te.set(de.id,de.lx);for(const de of e)de.type===z.Foundation&&L(de,se);const oe={name:"Set Length for All Foundations",timestamp:Date.now(),oldSizes:te,newSize:se,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var de,he;for(const[pe,me]of oe.oldSizes.entries())r(pe,me);if(oe.oldChildrenPositionsMap&&oe.oldChildrenPositionsMap.size>0)for(const[pe,me]of oe.oldChildrenPositionsMap.entries()){s(pe,me.x,me.y,me.z);const le=(de=oe.oldChildrenParentIdMap)==null?void 0:de.get(pe),Te=(he=oe.newChildrenParentIdMap)==null?void 0:he.get(pe);le&&Te&&le!==Te&&(j(le,Te,pe),B(le,pe))}if(oe.oldChildrenVerticesMap&&oe.oldChildrenVerticesMap.size>0)for(const[pe,me]of oe.oldChildrenVerticesMap.entries())a(pe,me)},redo:()=>{var de,he;if(i(z.Foundation,oe.newSize),oe.newChildrenPositionsMap&&oe.newChildrenPositionsMap.size>0)for(const[pe,me]of oe.newChildrenPositionsMap.entries()){s(pe,me.x,me.y,me.z);const le=(de=oe.oldChildrenParentIdMap)==null?void 0:de.get(pe),Te=(he=oe.newChildrenParentIdMap)==null?void 0:he.get(pe);le&&Te&&le!==Te&&(j(Te,le,pe),B(Te,pe))}if(oe.newChildrenVerticesMap&&oe.newChildrenVerticesMap.size>0)for(const[pe,me]of oe.newChildrenVerticesMap.entries())a(pe,me)}};c(oe),p(f+1);break}default:{L(A,se);const te={name:"Set Foundation Length",timestamp:Date.now(),oldSize:ee,newSize:se,resizedElementId:A.id,resizedElementType:A.type,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var oe,de;if(r(A.id,te.oldSize),te.oldChildrenPositionsMap&&te.oldChildrenPositionsMap.size>0)for(const[he,pe]of te.oldChildrenPositionsMap.entries()){s(he,pe.x,pe.y,pe.z);const me=(oe=te.oldChildrenParentIdMap)==null?void 0:oe.get(he),le=(de=te.newChildrenParentIdMap)==null?void 0:de.get(he);me&&le&&me!==le&&(j(me,le,he),B(me,he))}if(te.oldChildrenVerticesMap&&te.oldChildrenVerticesMap.size>0)for(const[he,pe]of te.oldChildrenVerticesMap.entries())a(he,pe)},redo:()=>{var oe,de;if(r(A.id,te.newSize),te.newChildrenPositionsMap&&te.newChildrenPositionsMap.size>0)for(const[he,pe]of te.newChildrenPositionsMap.entries()){s(he,pe.x,pe.y,pe.z);const me=(oe=te.oldChildrenParentIdMap)==null?void 0:oe.get(he),le=(de=te.newChildrenParentIdMap)==null?void 0:de.get(he);me&&le&&me!==le&&(j(le,me,he),B(le,he))}if(te.newChildrenVerticesMap&&te.newChildrenVerticesMap.size>0)for(const[he,pe]of te.newChildrenVerticesMap.entries())a(he,pe)}};c(te),p(f+1);break}}},G=()=>{t(!1)},Q=()=>{G(),g()},$=()=>{V(y),H.current||(t(!1),p(0))},ie=()=>{V(y)},q=H.current?": "+Y.t("message.NotApplicableToSelectedAction",E)+(F.current!==void 0?" ("+F.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("word.Length",E),rejectedMessage:q,onApply:ie,onClose:G,onClickCancel:Q,onClickOk:$,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:1e3,style:{width:120},step:.5,precision:2,value:y,onChange:se=>{se!==null&&S(se)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",E),": [0.1, 1000] ",Y.t("word.MeterAbbreviation",E)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",E)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:se=>M.getState().setFoundationActionScope(se.target.value),value:u,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",E)})]})})})]})})},Fdo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(u3),r=M(uYe),i=M(Fw),a=M(xW),l=M(kw),s=M(kH),c=M(En),u=M($s),d=M(pn),f=M(no),p=M(Qn),g=M(Xi),A=uo(z.Foundation),[y,S]=m.useState((A==null?void 0:A.ly)??.1),C=m.useRef(new Map),P=m.useRef(new Map),v=m.useRef(new Map),T=m.useRef(new Map),w=m.useRef(new Map),x=m.useRef(new Map),b=m.useRef(new Map),R=m.useRef(new Map),H=m.useRef(!1),F=m.useRef(),E=$t(),N=q=>{if(A){switch(u){case re.AllSelectedObjectsOfThisType:{for(const se of e)if(se.type===z.Foundation&&M.getState().selectedElementIdSet.has(se.id)){const Z=se,ee=s(Z.id);if(ee.length>0&&!ye.doesNewSizeContainAllChildren(Z,ee,Z.lx,q))return!1}break}case re.AllObjectsOfThisType:{for(const se of e)if(se.type===z.Foundation){const Z=se,ee=s(Z.id);if(ee.length>0&&!ye.doesNewSizeContainAllChildren(Z,ee,Z.lx,q))return!1}break}default:{const se=s(A.id);if(se.length>0)return ye.doesNewSizeContainAllChildren(A,se,A.lx,q);break}}return!0}},U=q=>!N(q),W=q=>{if(A){switch(u){case re.AllSelectedObjectsOfThisType:for(const se of e)if(se.type===z.Foundation&&!se.locked&&M.getState().selectedElementIdSet.has(se.id)&&Math.abs(se.ly-q)>Et)return!0;break;case re.AllObjectsOfThisType:for(const se of e)if(se.type===z.Foundation&&!se.locked&&Math.abs(se.ly-q)>Et)return!0;break;default:if(Math.abs((A==null?void 0:A.ly)-q)>Et)return!0}return!1}},k=(q,se)=>{if(q==null)return null;for(const Z of q.children)if(Z.name.includes(`${se}`))return Z;return null},D=(q,se,Z)=>{var ee,te;if(q){for(const oe of q.children)if(oe.name.includes(`${Z.id}`)){(te=(ee=kn.getState().contentRef)==null?void 0:ee.current)==null||te.add(oe);break}d(oe=>{for(const de of oe.elements)if(de.id===Z.id){de.parentId=Zo;const he=new Kt(de.cx,de.cy).rotateAround(ai,se.rotation[2]).add(new Kt(se.cx,se.cy));de.cx=he.x,de.cy=he.y,de.cz=0,T.current.set(de.id,new ae(he.x,he.y,0)),P.current.set(de.id,Zo);break}})}},L=(q,se)=>{const Z=s(q.id),ee=q.rotation[2];if(w.current.clear(),R.current.clear(),Z.length>0)for(const te of Z)switch(te.type){case z.Wall:break;case z.SolarPanel:case z.ParabolicTrough:case z.ParabolicDish:case z.FresnelReflector:case z.Heliostat:case z.Sensor:{const oe=new Kt(te.cx*q.lx,te.cy*q.ly).rotateAround(ai,ee);w.current.set(te.id,oe),v.current.set(te.id,new ae(te.cx,te.cy));break}case z.Polygon:{const oe=te,de=[];for(const he of oe.vertices)de.push(new Kt(he.x*q.lx,he.y*q.ly).rotateAround(ai,ee));R.current.set(te.id,de),x.current.set(te.id,oe.vertices.map(he=>({...he})));break}case z.Human:case z.Tree:{v.current.set(te.id,new ae(te.cx,te.cy,te.cz));break}}if(i(q.id,se),Z.length>0)for(const te of Z)switch(te.type){case z.Wall:break;case z.SolarPanel:case z.ParabolicTrough:case z.ParabolicDish:case z.FresnelReflector:case z.Heliostat:case z.Sensor:{const oe=w.current.get(te.id);if(oe){const he=new Kt(oe.x,oe.y).rotateAround(ai,-ee).y/se;r(te.id,he),T.current.set(te.id,new ae(te.cx,he))}break}case z.Polygon:{const oe=R.current.get(te.id);if(oe){const de=[];for(const he of oe){const pe=he.rotateAround(ai,-ee),me=pe.x/q.lx,le=pe.y/se;de.push({x:me,y:le})}l(te.id,de),b.current.set(te.id,de.map(he=>({...he})))}break}case z.Human:case z.Tree:{if(T.current.set(te.id,new ae(te.cx,te.cy,te.cz)),C.current.set(te.id,q.id),Math.abs(te.cz-q.lz/2)0){const oe=kn.getState().contentRef,de=k(oe==null?void 0:oe.current,q.id);D(de,q,te)}}else if(Math.abs(Math.abs(te.cy)-q.ly/2)0?se:-se)/2;r(te.id,oe),T.current.set(te.id,new ae(te.cz,oe,te.cz))}break}}},j=(q,se,Z)=>{if(!q||!se)return;const ee=kn.getState().contentRef,te=k(ee==null?void 0:ee.current,se),oe=k(se===Zo?ee==null?void 0:ee.current:te,Z);if(oe&&(ee!=null&&ee.current)){if(q===Zo)ee.current.add(oe);else{const de=k(ee.current,q);de==null||de.add(oe)}op()}},B=(q,se)=>{q&&d(Z=>{for(const ee of Z.elements)if(ee.id===se){ee.parentId=q;break}})},O=q=>{if(!A||!W(q))return;const se=n(A.id),Z=se?se.ly:A.ly;if(F.current=void 0,H.current=U(q),H.current)F.current=q,S(Z);else switch(v.current.clear(),T.current.clear(),x.current.clear(),b.current.clear(),u){case re.AllSelectedObjectsOfThisType:{const ee=new Map;for(const oe of e)oe.type===z.Foundation&&M.getState().selectedElementIdSet.has(oe.id)&&ee.set(oe.id,oe.ly);for(const oe of e)oe.type===z.Foundation&&M.getState().selectedElementIdSet.has(oe.id)&&L(oe,q);const te={name:"Set Width for Selected Foundations",timestamp:Date.now(),oldSizes:ee,newSize:q,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var oe,de;for(const[he,pe]of te.oldSizes.entries())i(he,pe);if(te.oldChildrenPositionsMap&&te.oldChildrenPositionsMap.size>0)for(const[he,pe]of te.oldChildrenPositionsMap.entries()){o(he,pe.x,pe.y,pe.z);const me=(oe=te.oldChildrenParentIdMap)==null?void 0:oe.get(he),le=(de=te.newChildrenParentIdMap)==null?void 0:de.get(he);me&&le&&me!==le&&(j(me,le,he),B(me,he))}if(te.oldChildrenVerticesMap&&te.oldChildrenVerticesMap.size>0)for(const[he,pe]of te.oldChildrenVerticesMap.entries())l(he,pe)},redo:()=>{var oe,de;for(const[he,pe]of te.oldSizes.entries())i(he,te.newSize);if(te.newChildrenPositionsMap&&te.newChildrenPositionsMap.size>0)for(const[he,pe]of te.newChildrenPositionsMap.entries()){o(he,pe.x,pe.y,pe.z);const me=(oe=te.oldChildrenParentIdMap)==null?void 0:oe.get(he),le=(de=te.newChildrenParentIdMap)==null?void 0:de.get(he);me&&le&&me!==le&&(j(le,me,he),B(le,he))}if(te.newChildrenVerticesMap&&te.newChildrenVerticesMap.size>0)for(const[he,pe]of te.newChildrenVerticesMap.entries())l(he,pe)}};c(te),p(f+1);break}case re.AllObjectsOfThisType:{const ee=new Map;for(const oe of e)oe.type===z.Foundation&&ee.set(oe.id,oe.ly);for(const oe of e)oe.type===z.Foundation&&L(oe,q);const te={name:"Set Width for All Foundations",timestamp:Date.now(),oldSizes:ee,newSize:q,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var oe,de;for(const[he,pe]of te.oldSizes.entries())i(he,pe);if(te.oldChildrenPositionsMap&&te.oldChildrenPositionsMap.size>0)for(const[he,pe]of te.oldChildrenPositionsMap.entries()){o(he,pe.x,pe.y,pe.z);const me=(oe=te.oldChildrenParentIdMap)==null?void 0:oe.get(he),le=(de=te.newChildrenParentIdMap)==null?void 0:de.get(he);me&&le&&me!==le&&(j(me,le,he),B(me,he))}if(te.oldChildrenVerticesMap&&te.oldChildrenVerticesMap.size>0)for(const[he,pe]of te.oldChildrenVerticesMap.entries())l(he,pe)},redo:()=>{var oe,de;if(a(z.Foundation,te.newSize),te.newChildrenPositionsMap&&te.newChildrenPositionsMap.size>0)for(const[he,pe]of te.newChildrenPositionsMap.entries()){o(he,pe.x,pe.y,pe.z);const me=(oe=te.oldChildrenParentIdMap)==null?void 0:oe.get(he),le=(de=te.newChildrenParentIdMap)==null?void 0:de.get(he);me&&le&&me!==le&&(j(le,me,he),B(le,he))}if(te.newChildrenVerticesMap&&te.newChildrenVerticesMap.size>0)for(const[he,pe]of te.newChildrenVerticesMap.entries())l(he,pe)}};c(te),p(f+1);break}default:{L(A,q);const ee={name:"Set Foundation Width",timestamp:Date.now(),oldSize:Z,newSize:q,resizedElementId:A.id,resizedElementType:A.type,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var te,oe;if(i(A.id,ee.oldSize),ee.oldChildrenPositionsMap&&ee.oldChildrenPositionsMap.size>0)for(const[de,he]of ee.oldChildrenPositionsMap.entries()){o(de,he.x,he.y,he.z);const pe=(te=ee.oldChildrenParentIdMap)==null?void 0:te.get(de),me=(oe=ee.newChildrenParentIdMap)==null?void 0:oe.get(de);pe&&me&&pe!==me&&(j(pe,me,de),B(pe,de))}if(ee.oldChildrenVerticesMap&&ee.oldChildrenVerticesMap.size>0)for(const[de,he]of ee.oldChildrenVerticesMap.entries())l(de,he)},redo:()=>{var te,oe;if(i(A.id,ee.newSize),ee.newChildrenPositionsMap&&ee.newChildrenPositionsMap.size>0)for(const[de,he]of ee.newChildrenPositionsMap.entries()){o(de,he.x,he.y,he.z);const pe=(te=ee.oldChildrenParentIdMap)==null?void 0:te.get(de),me=(oe=ee.newChildrenParentIdMap)==null?void 0:oe.get(de);pe&&me&&pe!==me&&(j(me,pe,de),B(me,de))}if(ee.newChildrenVerticesMap&&ee.newChildrenVerticesMap.size>0)for(const[de,he]of ee.newChildrenVerticesMap.entries())l(de,he)}};c(ee),p(f+1);break}}},V=()=>{t(!1)},G=()=>{V(),g()},Q=()=>{O(y),H.current||(t(!1),p(0))},$=()=>{O(y)},ie=H.current?": "+Y.t("message.NotApplicableToSelectedAction",E)+(F.current!==void 0?" ("+F.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("word.Width",E),rejectedMessage:ie,onApply:$,onClickCancel:G,onClickOk:Q,onClose:V,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:1e3,style:{width:120},step:.5,precision:2,value:y,onChange:q=>{q!==null&&S(q)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",E),": [0.1, 1000] ",Y.t("word.MeterAbbreviation",E)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",E)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:q=>M.getState().setFoundationActionScope(q.target.value),value:u,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",E)})]})})})]})})},kdo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(u3),l=M(no),s=M(Qn),c=uo(z.Foundation),[u,d]=m.useState((c==null?void 0:c.lz)??.1),f=m.useRef(new Map),p=m.useRef(new Map),g=m.useRef(new Map),A=m.useRef(new Map),y=$t(),S=(N,U)=>{e(W=>{const k=W.elements.find(D=>D.id===N);k&&(k.lz=U,k.cz=U/2)})},C=(N,U)=>{e(W=>{for(const k of W.elements)k.type===N&&!k.locked&&(k.lz=U,k.cz=U/2)})},P=N=>{if(c){switch(i){case re.AllSelectedObjectsOfThisType:{for(const U of n)if(U.type===z.Foundation&&!U.locked&&M.getState().selectedElementIdSet.has(U.id)&&Math.abs(U.lz-N)>Et)return!0;break}case re.AllObjectsOfThisType:for(const U of n)if(U.type===z.Foundation&&!U.locked&&Math.abs(U.lz-N)>Et)return!0;break;default:if(Math.abs((c==null?void 0:c.lz)-N)>Et)return!0}return!1}},v=(N,U)=>{if(N==null)return null;for(const W of N.children)if(W.name.includes(`${U}`))return W;return null},T=(N,U,W)=>{var k,D;if(N){for(const j of N.children)if(j.name.includes(`${W.id}`)){(D=(k=kn.getState().contentRef)==null?void 0:k.current)==null||D.add(j);break}W.parentId=Zo;const L=new Kt(W.cx,W.cy).rotateAround(ai,-U.rotation[2]).add(new Kt(U.cx,U.cy));W.cx=L.x,W.cy=L.y,W.cz=0,A.current.set(W.id,new ae(L.x,L.y,0)),p.current.set(W.id,Zo)}},w=(N,U,W)=>{e(k=>{for(const D of k.elements)if(D.parentId===N.id)if(f.current.set(D.id,N.id),g.current.set(D.id,new ae(D.cx,D.cy,D.cz)),ye.isPlantOrHuman(D))if(Math.abs(D.cz-N.lz/2)U/2){const j=kn.getState().contentRef,B=v(j==null?void 0:j.current,N.id);T(B,N,D)}else D.cz=L,A.current.set(D.id,new ae(D.cx,D.cy,L))}else D.type===z.SolarPanel&&(D.cz=U/2,A.current.set(D.id,new ae(D.cx,D.cy,U/2)));else D.foundationId===N.id&&D.type===z.SolarPanel&&D.parentType==z.Roof&&W!==void 0&&(g.current.set(D.id,new ae(D.cx,D.cy,D.cz)),D.cz=D.cz-W/2+U/2,A.current.set(D.id,new ae(D.cx,D.cy,D.cz)))})},x=(N,U,W)=>{if(!N||!U)return;const k=kn.getState().contentRef,D=v(k==null?void 0:k.current,U),L=v(U===Zo?k==null?void 0:k.current:D,W);if(L&&(k!=null&&k.current)){if(N===Zo)k.current.add(L);else{const j=v(k.current,N);j==null||j.add(L)}op()}},b=(N,U)=>{N&&e(W=>{for(const k of W.elements)if(k.id===U){k.parentId=N;break}})},R=(N,U)=>{M.getState().set(W=>{for(const k of W.elements)if(N.has(k.id))if(U!==void 0)k.lz=U,k.cz=U/2;else{const D=N.get(k.id);D!==void 0&&(k.lz=D,k.cz=D/2)}})},H=N=>{if(c&&P(N)){switch(i){case re.AllSelectedObjectsOfThisType:{const U=new Map;for(const k of n)k.type===z.Foundation&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&U.set(k.id,k.lz);for(const k of n)k.type===z.Foundation&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&w(k,N,U.get(k.id));const W={name:"Set Height for Selected Foundations",timestamp:Date.now(),oldValues:U,newValue:N,oldChildrenPositionsMap:new Map(g.current),newChildrenPositionsMap:new Map(A.current),oldChildrenParentIdMap:new Map(f.current),newChildrenParentIdMap:new Map(p.current),undo:()=>{var k,D;if(R(W.oldValues),W.oldChildrenPositionsMap&&W.oldChildrenPositionsMap.size>0)for(const[L,j]of W.oldChildrenPositionsMap.entries()){a(L,j.x,j.y,j.z);const B=(k=W.oldChildrenParentIdMap)==null?void 0:k.get(L),O=(D=W.newChildrenParentIdMap)==null?void 0:D.get(L);B&&O&&B!==O&&(x(B,O,L),b(B,L))}},redo:()=>{var D,L;const k=W.newValue;if(R(W.oldValues,k),W.newChildrenPositionsMap&&W.newChildrenPositionsMap.size>0)for(const[j,B]of W.newChildrenPositionsMap.entries()){a(j,B.x,B.y,B.z);const O=(D=W.oldChildrenParentIdMap)==null?void 0:D.get(j),V=(L=W.newChildrenParentIdMap)==null?void 0:L.get(j);O&&V&&O!==V&&(x(V,O,j),b(V,j))}}};r(W),R(U,N),s(l+1);break}case re.AllObjectsOfThisType:{const U=new Map;for(const k of n)k.type===z.Foundation&&U.set(k.id,k.lz);for(const k of n)k.type===z.Foundation&&w(k,N,U.get(k.id));const W={name:"Set Height for All Foundations",timestamp:Date.now(),oldValues:U,newValue:N,oldChildrenPositionsMap:new Map(g.current),newChildrenPositionsMap:new Map(A.current),oldChildrenParentIdMap:new Map(f.current),newChildrenParentIdMap:new Map(p.current),undo:()=>{var k,D;for(const[L,j]of W.oldValues.entries())S(L,j);if(W.oldChildrenPositionsMap&&W.oldChildrenPositionsMap.size>0)for(const[L,j]of W.oldChildrenPositionsMap.entries()){a(L,j.x,j.y,j.z);const B=(k=W.oldChildrenParentIdMap)==null?void 0:k.get(L),O=(D=W.newChildrenParentIdMap)==null?void 0:D.get(L);B&&O&&B!==O&&(x(B,O,L),b(B,L))}},redo:()=>{var D,L;const k=W.newValue;if(C(z.Foundation,k),W.newChildrenPositionsMap&&W.newChildrenPositionsMap.size>0)for(const[j,B]of W.newChildrenPositionsMap.entries()){a(j,B.x,B.y,B.z);const O=(D=W.oldChildrenParentIdMap)==null?void 0:D.get(j),V=(L=W.newChildrenParentIdMap)==null?void 0:L.get(j);O&&V&&O!==V&&(x(V,O,j),b(V,j))}}};r(W),C(z.Foundation,N),s(l+1);break}default:{const U=o(c.id),W=U?U.lz:c.lz;w(c,N,W),S(c.id,N);const k={name:"Set Foundation Height",timestamp:Date.now(),oldValue:W,newValue:N,oldChildrenPositionsMap:new Map(g.current),newChildrenPositionsMap:new Map(A.current),oldChildrenParentIdMap:new Map(f.current),newChildrenParentIdMap:new Map(p.current),changedElementId:c.id,changedElementType:c.type,undo:()=>{var D,L;if(S(k.changedElementId,k.oldValue),k.oldChildrenPositionsMap&&k.oldChildrenPositionsMap.size>0)for(const[j,B]of k.oldChildrenPositionsMap.entries()){a(j,B.x,B.y,B.z);const O=(D=k.oldChildrenParentIdMap)==null?void 0:D.get(j),V=(L=k.newChildrenParentIdMap)==null?void 0:L.get(j);O&&V&&O!==V&&(x(O,V,j),b(O,j))}},redo:()=>{var D,L;if(S(k.changedElementId,k.newValue),k.newChildrenPositionsMap&&k.newChildrenPositionsMap.size>0)for(const[j,B]of k.newChildrenPositionsMap.entries()){a(j,B.x,B.y,B.z);const O=(D=k.oldChildrenParentIdMap)==null?void 0:D.get(j),V=(L=k.newChildrenParentIdMap)==null?void 0:L.get(j);O&&V&&O!==V&&(x(V,O,j),b(V,j))}}};r(k),s(l+1);break}}e(U=>{U.actionState.foundationHeight=N})}},F=()=>{t(!1)},E=()=>{H(u)};return h.jsx(so,{width:550,title:Y.t("word.Height",y),onApply:E,onClose:F,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:10,style:{width:120},step:.1,precision:2,value:u,onChange:N=>{N!==null&&d(N)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",y),": [0.1, 10] ",Y.t("word.MeterAbbreviation",y)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",y)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:N=>M.getState().setFoundationActionScope(N.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",y)})]})})})]})})},Ldo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(Bge),r=M(i7t),i=M(En),a=M($s),l=M(no),s=M(Qn),c=uo(z.Foundation),[u,d]=m.useState(c?-(c==null?void 0:c.rotation[2]):0),f=$t(),p=C=>{if(c){switch(a){case re.AllSelectedObjectsOfThisType:{for(const P of e)if(P.type===z.Foundation&&!P.locked&&M.getState().selectedElementIdSet.has(P.id)&&Math.abs(-P.rotation[2]-C)>Et)return!0;break}case re.AllObjectsOfThisType:for(const P of e)if(P.type===z.Foundation&&!P.locked&&Math.abs(-P.rotation[2]-C)>Et)return!0;break;default:if(Math.abs(-(c==null?void 0:c.rotation[2])-C)>Et)return!0}return!1}},g=(C,P)=>{M.getState().set(v=>{for(const T of v.elements)if(C.has(T.id))if(P!==void 0)T.rotation[2]=P;else{const w=C.get(T.id);w!==void 0&&(T.rotation[2]=-w)}})},A=C=>{if(c&&p(C))switch(a){case re.AllSelectedObjectsOfThisType:{const P=new Map;for(const T of e)T.type===z.Foundation&&M.getState().selectedElementIdSet.has(T.id)&&P.set(T.id,-T.rotation[2]);const v={name:"Set Azimuth for All Selected Foundations",timestamp:Date.now(),oldValues:P,newValue:C,undo:()=>{g(v.oldValues)},redo:()=>{g(v.oldValues,-v.newValue)}};i(v),g(P,-C),s(l+1);break}case re.AllObjectsOfThisType:{const P=new Map;for(const T of e)T.type===z.Foundation&&P.set(T.id,-T.rotation[2]);const v={name:"Set Azimuth for All Foundations",timestamp:Date.now(),oldValues:P,newValue:C,undo:()=>{for(const[T,w]of v.oldValues.entries())o(T,0,0,-w)},redo:()=>{r(z.Foundation,0,0,-v.newValue)}};i(v),r(z.Foundation,0,0,-C),s(l+1);break}default:{const P=n(c.id),v=P?-P.rotation[2]:-c.rotation[2],T={name:"Set Foundation Azimuth",timestamp:Date.now(),oldValue:v,newValue:C,changedElementId:c.id,changedElementType:c.type,undo:()=>{o(T.changedElementId,0,0,-T.oldValue)},redo:()=>{o(T.changedElementId,0,0,-T.newValue)}};i(T),o(c.id,0,0,-C),s(l+1);break}}},y=()=>{t(!1)},S=()=>{A(u)};return h.jsx(so,{width:500,title:Y.t("word.Azimuth",f),onApply:S,onClose:y,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:-180,max:180,style:{width:120},step:.5,precision:2,value:parseFloat(ye.toDegrees(u).toFixed(2)),formatter:C=>`${C}°`,onChange:C=>{C!==null&&d(ye.toRadians(C))}}),h.jsxs("div",{style:{paddingTop:"20px",paddingRight:"6px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [-180°, 180°]",h.jsx("br",{}),Y.t("message.AzimuthOfNorthIsZero",f),h.jsx("br",{}),Y.t("message.CounterclockwiseAzimuthIsPositive",f)]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:C=>M.getState().setFoundationActionScope(C.target.value),value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Wdo=({setDialogVisible:t})=>{const e=M(Kn),n=M(c3),o=M(En),r=M($s),i=M(a7t),a=M(no),l=M(Qn),s=M(Xi),c=M(Jn),u=M(pn),d=M(k=>{if(n){for(const D of k.elements)if(D.id===n.id)return D}return null}),[f,p]=m.useState((d==null?void 0:d.rValue)??i8),[g,A]=m.useState(ye.toRValueInUS(f)),[y,S]=m.useState(!1),[C,P]=m.useState({left:0,top:0,bottom:0,right:0}),v=m.useRef(null),T=$t();m.useEffect(()=>{d&&p((d==null?void 0:d.rValue)??i8)},[d==null?void 0:d.rValue]);const w=k=>{switch(r){case re.AllObjectsOfThisType:for(const D of e)if(D.type===z.Foundation&&!D.locked){const L=D;if(L.rValue===void 0||Math.abs(L.rValue-k)>Et)return!0}break;default:if((d==null?void 0:d.rValue)===void 0||Math.abs((d==null?void 0:d.rValue)-k)>Et)return!0}return!1},x=(k,D)=>{u(L=>{for(const j of L.elements)if(j.id===k){j.rValue=D;break}})},b=k=>{for(const[D,L]of k.entries())x(D,L)},R=(k,D)=>{for(const L of k.keys())x(L,D)},H=k=>{if(d&&w(k)){switch(r){case re.AllObjectsOfThisType:{const D=new Map;u(j=>{for(const B of j.elements)if(B.type===z.Foundation&&!B.locked){const O=B;D.set(B.id,O.rValue??i8),O.rValue=k}});const L={name:"Set R-Value for All Ground Floors",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{b(L.oldValues)},redo:()=>{R(L.oldValues,L.newValue)}};o(L),l(a+1);break}default:{if(d){const L=c(d.id).rValue??d.rValue??i8,j={name:"Set Ground Floor R-Value",timestamp:Date.now(),oldValue:L,newValue:k,changedElementId:d.id,changedElementType:d.type,undo:()=>{x(j.changedElementId,j.oldValue)},redo:()=>{x(j.changedElementId,j.newValue)}};o(j),x(d.id,k),l(a+1)}break}}u(D=>{D.actionState.groundFloorRValue=k})}},F=(k,D)=>{if(v.current){const{clientWidth:L,clientHeight:j}=window.document.documentElement,B=v.current.getBoundingClientRect();P({left:-B.left+D.x,right:L-(B.right-D.x),top:-B.top+D.y,bottom:j-((B==null?void 0:B.bottom)-D.y)})}},E=()=>{p((d==null?void 0:d.rValue)??i8),t(!1)},N=()=>{E(),s()},U=()=>{H(f),t(!1),l(0)},W=()=>{H(f)};return h.jsx(h.Fragment,{children:h.jsx(xi,{width:550,open:!0,title:h.jsxs("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>S(!0),onMouseOut:()=>S(!1),children:[Y.t("word.RValue",T)+" ","(",Y.t("word.ThermalResistance",T),")"]}),footer:[h.jsx(io,{onClick:W,children:Y.t("word.Apply",T)},"Apply"),h.jsx(io,{onClick:N,children:Y.t("word.Cancel",T)},"Cancel"),h.jsx(io,{type:"primary",onClick:U,children:Y.t("word.OK",T)},"OK")],onCancel:E,maskClosable:!1,destroyOnClose:!1,modalRender:k=>h.jsx(Bi,{disabled:!y,bounds:C,onStart:(D,L)=>F(D,L),children:h.jsx("div",{ref:v,children:k})}),children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:f,formatter:k=>Number(k).toFixed(2),onChange:k=>{k!==null&&(p(k),A(ye.toRValueInUS(k)))},onPressEnter:U}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",T),": [0.01, 100]",h.jsx("br",{}),Y.t("word.SIUnit",T),": m²·℃/W"]}),h.jsx("br",{}),h.jsx(Sn,{min:ye.toRValueInUS(.01),max:ye.toRValueInUS(100),style:{width:120},step:.01,precision:2,value:g,formatter:k=>Number(k).toFixed(2),onChange:k=>{k!==null&&(A(k),p(ye.toRValueInSI(k)))},onPressEnter:U}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",T),": [",ye.toRValueInUS(.01).toFixed(3),", ",ye.toRValueInUS(100).toFixed(1),"]",h.jsx("br",{}),Y.t("word.USUnit",T),": h·ft²·℉/Btu"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:k=>i(k.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisGroundFloor",T)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllGroundFloors",T)})]})})})]})})})},Ndo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarAbsorberPipe,[u,d]=m.useState((c==null?void 0:c.absorberHeight)??10),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.absorberHeight=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusPipe&&(x.solarAbsorberPipe||(x.solarAbsorberPipe={}),x.solarAbsorberPipe.absorberHeight=v)}})},A=(v,T)=>{M.getState().set(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.absorberHeight=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.absorberHeight===void 0||Math.abs(w.solarAbsorberPipe.absorberHeight-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.absorberHeight===void 0||Math.abs(w.solarAbsorberPipe.absorberHeight-v)>Et))return!0}break;default:if((c==null?void 0:c.absorberHeight)===void 0||Math.abs((c==null?void 0:c.absorberHeight)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.absorberHeight??10)}const w={name:"Set Absorber Height for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.absorberHeight??10)}const w={name:"Set Absorber Height for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarAbsorberPipe?T.solarAbsorberPipe.absorberHeight??10:c.absorberHeight??10;p(s.id,v);const x={name:"Set Absorber Height on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:550,title:Y.t("solarAbsorberPipeMenu.AbsorberHeight",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:50,style:{width:120},step:.5,precision:2,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [1, 50] ",Y.t("word.MeterAbbreviation",f)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",f)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Udo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarAbsorberPipe,[u,d]=m.useState((c==null?void 0:c.apertureWidth)??.6),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.apertureWidth=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusPipe&&(x.solarAbsorberPipe||(x.solarAbsorberPipe={}),x.solarAbsorberPipe.apertureWidth=v)}})},A=(v,T)=>{M.getState().set(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.apertureWidth=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.apertureWidth===void 0||Math.abs(w.solarAbsorberPipe.apertureWidth-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.apertureWidth===void 0||Math.abs(w.solarAbsorberPipe.apertureWidth-v)>Et))return!0}break;default:if((c==null?void 0:c.apertureWidth)===void 0||Math.abs((c==null?void 0:c.apertureWidth)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.apertureWidth??.6)}const w={name:"Set Absorber Aperture Width for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.apertureWidth??.6)}const w={name:"Set Absorber Aperture Width for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarAbsorberPipe?T.solarAbsorberPipe.apertureWidth??.6:c.apertureWidth??.6;p(s.id,v);const x={name:"Set Absorber Aperture Width on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:550,title:Y.t("solarAbsorberPipeMenu.AbsorberApertureWidth",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:2,style:{width:120},step:.01,precision:2,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0.1, 2] ",Y.t("word.MeterAbbreviation",f)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",f)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},jdo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarAbsorberPipe,[u,d]=m.useState((c==null?void 0:c.poleNumber)??5),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.poleNumber=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusPipe&&(x.solarAbsorberPipe||(x.solarAbsorberPipe={}),x.solarAbsorberPipe.poleNumber=v)}})},A=(v,T)=>{M.getState().set(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.poleNumber=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.poleNumber===void 0||w.solarAbsorberPipe.poleNumber!==v))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.poleNumber===void 0||w.solarAbsorberPipe.poleNumber!==v))return!0}break;default:if((c==null?void 0:c.poleNumber)===void 0||(c==null?void 0:c.poleNumber)!==v)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.poleNumber??5)}const w={name:"Set Absorber Pipe Pole Number for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.poleNumber??5)}const w={name:"Set Absorber Pipe Pole Number for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarAbsorberPipe?T.solarAbsorberPipe.poleNumber??5:c.poleNumber??5;p(s.id,v);const x={name:"Set Absorber Pipe Pole Number on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:550,title:Y.t("solarAbsorberPipeMenu.AbsorberPipePoleNumber",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:1,max:100,style:{width:120},step:1,precision:0,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [1, 100]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Bdo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarAbsorberPipe,[u,d]=m.useState((c==null?void 0:c.absorberAbsorptance)??.95),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.absorberAbsorptance=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusPipe&&(x.solarAbsorberPipe||(x.solarAbsorberPipe={}),x.solarAbsorberPipe.absorberAbsorptance=v)}})},A=(v,T)=>{M.getState().set(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.absorberAbsorptance=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.absorberAbsorptance===void 0||Math.abs(w.solarAbsorberPipe.absorberAbsorptance-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.absorberAbsorptance===void 0||Math.abs(w.solarAbsorberPipe.absorberAbsorptance-v)>Et))return!0}break;default:if((c==null?void 0:c.absorberAbsorptance)===void 0||Math.abs((c==null?void 0:c.absorberAbsorptance)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.absorberAbsorptance??.95)}const w={name:"Set Absorber Pipe Absorptance for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.absorberAbsorptance??.95)}const w={name:"Set Absorber Pipe Absorptance for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarAbsorberPipe?T.solarAbsorberPipe.absorberAbsorptance??.95:c.absorberAbsorptance??.95;p(s.id,v);const x={name:"Set Absorber Pipe Absorptance on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:500,title:Y.t("solarAbsorberPipeMenu.AbsorberAbsorptance",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:8,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.01,precision:2,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Ydo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarAbsorberPipe,[u,d]=m.useState((c==null?void 0:c.absorberOpticalEfficiency)??.7),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.absorberOpticalEfficiency=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusPipe&&(x.solarAbsorberPipe||(x.solarAbsorberPipe={}),x.solarAbsorberPipe.absorberOpticalEfficiency=v)}})},A=(v,T)=>{M.getState().set(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.absorberOpticalEfficiency=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.absorberOpticalEfficiency===void 0||Math.abs(w.solarAbsorberPipe.absorberOpticalEfficiency-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.absorberOpticalEfficiency===void 0||Math.abs(w.solarAbsorberPipe.absorberOpticalEfficiency-v)>Et))return!0}break;default:if((c==null?void 0:c.absorberOpticalEfficiency)===void 0||Math.abs((c==null?void 0:c.absorberOpticalEfficiency)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.absorberOpticalEfficiency??.7)}const w={name:"Set Absorber Optical Efficiency for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.absorberOpticalEfficiency??.7)}const w={name:"Set Absorber Optical Efficiency for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarAbsorberPipe?T.solarAbsorberPipe.absorberOpticalEfficiency??.7:c.absorberOpticalEfficiency??.7;p(s.id,v);const x={name:"Set Absorber Optical Efficiency on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:500,title:Y.t("solarAbsorberPipeMenu.AbsorberOpticalEfficiency",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:8,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.01,precision:2,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Odo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarAbsorberPipe,[u,d]=m.useState((c==null?void 0:c.absorberThermalEfficiency)??.3),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.absorberThermalEfficiency=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusPipe&&(x.solarAbsorberPipe||(x.solarAbsorberPipe={}),x.solarAbsorberPipe.absorberThermalEfficiency=v)}})},A=(v,T)=>{M.getState().set(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.absorberThermalEfficiency=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.absorberThermalEfficiency===void 0||Math.abs(w.solarAbsorberPipe.absorberThermalEfficiency-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.absorberThermalEfficiency===void 0||Math.abs(w.solarAbsorberPipe.absorberThermalEfficiency-v)>Et))return!0}break;default:if((c==null?void 0:c.absorberThermalEfficiency)===void 0||Math.abs((c==null?void 0:c.absorberThermalEfficiency)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.absorberThermalEfficiency??.3)}const w={name:"Set Absorber Thermal Efficiency for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.absorberThermalEfficiency??.3)}const w={name:"Set Absorber Thermal Efficiency for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarAbsorberPipe?T.solarAbsorberPipe.absorberThermalEfficiency??.3:c.absorberThermalEfficiency??.3;p(s.id,v);const x={name:"Set Absorber Thermal Efficiency on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:500,title:Y.t("solarAbsorberPipeMenu.AbsorberThermalEfficiency",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:8,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.01,precision:2,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Vdo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarPowerTower,[u,d]=m.useState((c==null?void 0:c.towerHeight)??20),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.towerHeight=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusTower&&(x.solarPowerTower||(x.solarPowerTower={}),x.solarPowerTower.towerHeight=v)}})},A=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.towerHeight=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.towerHeight===void 0||Math.abs(w.solarPowerTower.towerHeight-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.towerHeight===void 0||Math.abs(w.solarPowerTower.towerHeight-v)>Et))return!0}break;default:if((c==null?void 0:c.towerHeight)===void 0||Math.abs((c==null?void 0:c.towerHeight)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.towerHeight??20)}const w={name:"Set Tower Height for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.towerHeight??20)}const w={name:"Set Tower Height for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarPowerTower?T.solarPowerTower.towerHeight??20:c.towerHeight??20;p(s.id,v);const x={name:"Set Tower Height on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:550,title:Y.t("solarPowerTowerMenu.ReceiverTowerHeight",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:10,max:500,style:{width:120},step:1,precision:1,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [10, 500] ",Y.t("word.MeterAbbreviation",f)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",f)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},_do=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarPowerTower,[u,d]=m.useState((c==null?void 0:c.towerRadius)??1),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.towerRadius=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusTower&&(x.solarPowerTower||(x.solarPowerTower={}),x.solarPowerTower.towerRadius=v)}})},A=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.towerRadius=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.towerRadius===void 0||Math.abs(w.solarPowerTower.towerRadius-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.towerRadius===void 0||Math.abs(w.solarPowerTower.towerRadius-v)>Et))return!0}break;default:if((c==null?void 0:c.towerRadius)===void 0||Math.abs((c==null?void 0:c.towerRadius)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.towerRadius??1)}const w={name:"Set Tower Radius for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.towerRadius??1)}const w={name:"Set Tower Radius for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarPowerTower?T.solarPowerTower.towerRadius??1:c.towerRadius??1;p(s.id,v);const x={name:"Set Tower Radius on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:550,title:Y.t("solarPowerTowerMenu.ReceiverTowerRadius",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.5,max:10,style:{width:120},step:.5,precision:1,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0.5, 10] ",Y.t("word.MeterAbbreviation",f)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",f)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Gdo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarPowerTower,[u,d]=m.useState((c==null?void 0:c.receiverAbsorptance)??.95),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.receiverAbsorptance=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusTower&&(x.solarPowerTower||(x.solarPowerTower={}),x.solarPowerTower.receiverAbsorptance=v)}})},A=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.receiverAbsorptance=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.receiverAbsorptance===void 0||Math.abs(w.solarPowerTower.receiverAbsorptance-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.receiverAbsorptance===void 0||Math.abs(w.solarPowerTower.receiverAbsorptance-v)>Et))return!0}break;default:if((c==null?void 0:c.receiverAbsorptance)===void 0||Math.abs((c==null?void 0:c.receiverAbsorptance)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.receiverAbsorptance??.95)}const w={name:"Set Receiver Absorptance for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.receiverAbsorptance??.95)}const w={name:"Set Receiver Absorptance for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarPowerTower?T.solarPowerTower.receiverAbsorptance??.95:c.receiverAbsorptance??.95;p(s.id,v);const x={name:"Set Receiver Absorptance on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:500,title:Y.t("solarPowerTowerMenu.ReceiverAbsorptance",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:8,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.01,precision:2,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Xdo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarPowerTower,[u,d]=m.useState((c==null?void 0:c.receiverThermalEfficiency)??.3),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.receiverThermalEfficiency=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusTower&&(x.solarPowerTower||(x.solarPowerTower={}),x.solarPowerTower.receiverThermalEfficiency=v)}})},A=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.receiverThermalEfficiency=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.receiverThermalEfficiency===void 0||Math.abs(w.solarPowerTower.receiverThermalEfficiency-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.receiverThermalEfficiency===void 0||Math.abs(w.solarPowerTower.receiverThermalEfficiency-v)>Et))return!0}break;default:if((c==null?void 0:c.receiverThermalEfficiency)===void 0||Math.abs((c==null?void 0:c.receiverThermalEfficiency)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.receiverThermalEfficiency??.3)}const w={name:"Set Receiver Thermal Efficiency for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.receiverThermalEfficiency??.3)}const w={name:"Set Receiver Thermal Efficiency for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarPowerTower?T.solarPowerTower.receiverThermalEfficiency??.3:c.receiverThermalEfficiency??.3;p(s.id,v);const x={name:"Set Receiver Thermal Efficiency on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:550,title:Y.t("solarPowerTowerMenu.ReceiverThermalEfficiency",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:8,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.01,precision:2,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Jdo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarPowerTower,[u,d]=m.useState((c==null?void 0:c.receiverOpticalEfficiency)??.7),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.receiverOpticalEfficiency=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusTower&&(x.solarPowerTower||(x.solarPowerTower={}),x.solarPowerTower.receiverOpticalEfficiency=v)}})},A=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.receiverOpticalEfficiency=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.receiverOpticalEfficiency===void 0||Math.abs(w.solarPowerTower.receiverOpticalEfficiency-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.receiverOpticalEfficiency===void 0||Math.abs(w.solarPowerTower.receiverOpticalEfficiency-v)>Et))return!0}break;default:if((c==null?void 0:c.receiverOpticalEfficiency)===void 0||Math.abs((c==null?void 0:c.receiverOpticalEfficiency)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.receiverOpticalEfficiency??.7)}const w={name:"Set Receiver Optical Efficiency for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.receiverOpticalEfficiency??.7)}const w={name:"Set Receiver Optical Efficiency for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarPowerTower?T.solarPowerTower.receiverOpticalEfficiency??.7:c.receiverOpticalEfficiency??.7;p(s.id,v);const x={name:"Set Receiver Optical Efficiency on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:500,title:Y.t("solarPowerTowerMenu.ReceiverOpticalEfficiency",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:8,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.01,precision:2,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Kdo=({setDialogVisible:t})=>{var P;const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),[c,u]=m.useState(((P=s==null?void 0:s.solarUpdraftTower)==null?void 0:P.chimneyHeight)??Math.max((s==null?void 0:s.lx)??0,(s==null?void 0:s.ly)??0)),d=$t(),f=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.chimneyHeight=T);break}})},p=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.UpdraftTower&&(x.solarUpdraftTower||(x.solarUpdraftTower={}),x.solarUpdraftTower.chimneyHeight=v)}})},g=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.chimneyHeight=T)}})},A=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.chimneyHeight===void 0||Math.abs(w.solarUpdraftTower.chimneyHeight-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.chimneyHeight===void 0||Math.abs(w.solarUpdraftTower.chimneyHeight-v)>Et))return!0}break;default:if(s&&s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower&&(s.solarUpdraftTower.chimneyHeight===void 0||Math.abs(s.solarUpdraftTower.chimneyHeight-v)>Et))return!0}return!1},y=v=>{var T,w;if(s&&A(v))switch(i){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)if(R.type===z.Foundation&&M.getState().selectedElementIdSet.has(R.id)){const H=R;H.solarStructure===Dn.UpdraftTower&&H.solarUpdraftTower&&x.set(R.id,((T=H.solarUpdraftTower)==null?void 0:T.chimneyHeight)??Math.max(H.lx,H.ly))}const b={name:"Set Solar Chimney Height for Selected Foundations",timestamp:Date.now(),oldValues:x,newValue:v,undo:()=>{for(const[R,H]of b.oldValues.entries())f(R,H)},redo:()=>{g(b.oldValues,b.newValue)}};r(b),g(x,v),l(a+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)if(R.type===z.Foundation){const H=R;H.solarStructure===Dn.UpdraftTower&&H.solarUpdraftTower&&x.set(R.id,((w=H.solarUpdraftTower)==null?void 0:w.chimneyHeight)??Math.max(H.lx,H.ly))}const b={name:"Set Solar Chimney Height for All Foundations",timestamp:Date.now(),oldValues:x,newValue:v,undo:()=>{for(const[R,H]of b.oldValues.entries())f(R,H)},redo:()=>{p(b.newValue)}};r(b),p(v),l(a+1);break}default:{if(s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower){const x=o(s.id),b=x&&x.solarUpdraftTower?x.solarUpdraftTower.chimneyHeight??Math.max(x.lx,x.ly):s.solarUpdraftTower.chimneyHeight??Math.max(s.lx,s.ly);f(s.id,v);const R={name:"Set Solar Chimney Height on Foundation",timestamp:Date.now(),oldValue:b,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(R.changedElementId,R.oldValue)},redo:()=>{f(R.changedElementId,R.newValue)}};r(R),l(a+1)}break}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerChimneyHeight",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:1e3,style:{width:120},step:1,precision:1,value:c,onChange:v=>{v!==null&&u(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [1, 1000] ",Y.t("word.MeterAbbreviation",d)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",d)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",d)})]})})})]})})},qdo=({setDialogVisible:t})=>{var P;const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),[c,u]=m.useState(((P=s==null?void 0:s.solarUpdraftTower)==null?void 0:P.chimneyRadius)??Math.max(1,.025*Math.min((s==null?void 0:s.lx)??0,(s==null?void 0:s.ly)??0))),d=$t(),f=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.chimneyRadius=T);break}})},p=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.UpdraftTower&&(x.solarUpdraftTower||(x.solarUpdraftTower={}),x.solarUpdraftTower.chimneyRadius=v)}})},g=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.chimneyRadius=T)}})},A=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.chimneyRadius===void 0||Math.abs(w.solarUpdraftTower.chimneyRadius-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.chimneyRadius===void 0||Math.abs(w.solarUpdraftTower.chimneyRadius-v)>Et))return!0}break;default:if(s&&s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower&&(s.solarUpdraftTower.chimneyRadius===void 0||Math.abs(s.solarUpdraftTower.chimneyRadius-v)>Et))return!0}return!1},y=v=>{var T,w;if(s&&A(v))switch(i){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)if(R.type===z.Foundation&&M.getState().selectedElementIdSet.has(R.id)){const H=R;H.solarStructure===Dn.UpdraftTower&&H.solarUpdraftTower&&x.set(R.id,((T=H.solarUpdraftTower)==null?void 0:T.chimneyRadius)??Math.max(1,.025*Math.min(H.lx,H.ly)))}const b={name:"Set Solar Chimney Radius for Selected Foundations",timestamp:Date.now(),oldValues:x,newValue:v,undo:()=>{for(const[R,H]of b.oldValues.entries())f(R,H)},redo:()=>{g(b.oldValues,b.newValue)}};r(b),g(x,v),l(a+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)if(R.type===z.Foundation){const H=R;H.solarStructure===Dn.UpdraftTower&&H.solarUpdraftTower&&x.set(R.id,((w=H.solarUpdraftTower)==null?void 0:w.chimneyRadius)??Math.max(1,.025*Math.min(H.lx,H.ly)))}const b={name:"Set Solar Chimney Radius for All Foundations",timestamp:Date.now(),oldValues:x,newValue:v,undo:()=>{for(const[R,H]of b.oldValues.entries())f(R,H)},redo:()=>{p(b.newValue)}};r(b),p(v),l(a+1);break}default:{if(s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower){const x=o(s.id),b=x&&x.solarUpdraftTower?x.solarUpdraftTower.chimneyRadius??Math.max(1,.025*Math.min(x.lx,x.ly)):s.solarUpdraftTower.chimneyRadius??Math.max(1,.025*Math.min(s.lx,s.ly));f(s.id,v);const R={name:"Set Solar Chimney Radius on Foundation",timestamp:Date.now(),oldValue:b,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(R.changedElementId,R.oldValue)},redo:()=>{f(R.changedElementId,R.newValue)}};r(R),l(a+1)}break}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerChimneyRadius",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:10,style:{width:120},step:1,precision:1,value:c,onChange:v=>{v!==null&&u(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [0.1, 10] ",Y.t("word.MeterAbbreviation",d)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",d)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",d)})]})})})]})})},$do=({setDialogVisible:t})=>{var S;const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=uo(z.Foundation),[l,s]=m.useState(((S=a==null?void 0:a.solarUpdraftTower)==null?void 0:S.collectorHeight)??Math.max(3,10*((a==null?void 0:a.lz)??0))),c=$t(),u=(C,P)=>{e(v=>{for(const T of v.elements)if(T.type===z.Foundation&&T.id===C&&!T.locked){const w=T;w.solarStructure===Dn.UpdraftTower&&(w.solarUpdraftTower||(w.solarUpdraftTower={}),w.solarUpdraftTower.collectorHeight=P);break}})},d=C=>{e(P=>{for(const v of P.elements)if(v.type===z.Foundation&&!v.locked){const T=v;T.solarStructure===Dn.UpdraftTower&&(T.solarUpdraftTower||(T.solarUpdraftTower={}),T.solarUpdraftTower.collectorHeight=C)}})},f=(C,P)=>{e(v=>{for(const T of v.elements)if(T.type===z.Foundation&&!T.locked&&C.has(T.id)){const w=T;w.solarStructure===Dn.UpdraftTower&&(w.solarUpdraftTower||(w.solarUpdraftTower={}),w.solarUpdraftTower.collectorHeight=P)}})},p=C=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const P of n)if(P.type===z.Foundation&&!P.locked&&M.getState().selectedElementIdSet.has(P.id)){const v=P;if(v.solarStructure===Dn.UpdraftTower&&v.solarUpdraftTower&&(v.solarUpdraftTower.collectorHeight===void 0||Math.abs(v.solarUpdraftTower.collectorHeight-C)>Et))return!0}break;case re.AllObjectsOfThisType:for(const P of n)if(P.type===z.Foundation&&!P.locked){const v=P;if(v.solarStructure===Dn.UpdraftTower&&v.solarUpdraftTower&&(v.solarUpdraftTower.collectorHeight===void 0||Math.abs(v.solarUpdraftTower.collectorHeight-C)>Et))return!0}break;default:if(a&&a.solarStructure===Dn.UpdraftTower&&a.solarUpdraftTower&&(a.solarUpdraftTower.collectorHeight===void 0||Math.abs(a.solarUpdraftTower.collectorHeight-C)>Et))return!0}return!1},g=C=>{if(a&&p(C))switch(i){case re.AllSelectedObjectsOfThisType:{const P=new Map;for(const T of n)if(T.type===z.Foundation&&M.getState().selectedElementIdSet.has(T.id)){const w=T;w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&P.set(T.id,w.solarUpdraftTower.collectorHeight??Math.max(3,10*w.lz))}const v={name:"Set Solar Collector Height for Selected Foundations",timestamp:Date.now(),oldValues:P,newValue:C,undo:()=>{for(const[T,w]of v.oldValues.entries())u(T,w)},redo:()=>{f(v.oldValues,v.newValue)}};r(v),f(P,C);break}case re.AllObjectsOfThisType:{const P=new Map;for(const T of n)if(T.type===z.Foundation){const w=T;w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&P.set(T.id,w.solarUpdraftTower.collectorHeight??Math.max(3,10*w.lz))}const v={name:"Set Solar Collector Height for All Foundations",timestamp:Date.now(),oldValues:P,newValue:C,undo:()=>{for(const[T,w]of v.oldValues.entries())u(T,w)},redo:()=>{d(v.newValue)}};r(v),d(C);break}default:{if(a.solarStructure===Dn.UpdraftTower&&a.solarUpdraftTower){const P=o(a.id),v=P&&P.solarUpdraftTower?P.solarUpdraftTower.collectorHeight??Math.max(3,10*P.lz):a.solarUpdraftTower.collectorHeight??Math.max(3,10*a.lz);u(a.id,C);const T={name:"Set Solar Collector Height on Foundation",timestamp:Date.now(),oldValue:v,newValue:C,changedElementId:a.id,changedElementType:a.type,undo:()=>{u(T.changedElementId,T.oldValue)},redo:()=>{u(T.changedElementId,T.newValue)}};r(T)}break}}},A=()=>{t(!1)},y=()=>{g(l)};return h.jsx(so,{width:550,title:Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerCollectorHeight",c),onApply:y,onClose:A,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:20,style:{width:120},step:1,precision:1,value:l,onChange:C=>{C!==null&&s(C)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",c),": [0.1, 20] ",Y.t("word.MeterAbbreviation",c)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",c)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:C=>M.getState().setFoundationActionScope(C.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",c)})]})})})]})})},Qdo=({setDialogVisible:t})=>{var P;const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),[c,u]=m.useState(((P=s==null?void 0:s.solarUpdraftTower)==null?void 0:P.collectorRadius)??Math.max(10,.5*Math.min((s==null?void 0:s.lx)??0,(s==null?void 0:s.ly)??0))),d=$t(),f=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.collectorRadius=T);break}})},p=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.UpdraftTower&&(x.solarUpdraftTower||(x.solarUpdraftTower={}),x.solarUpdraftTower.collectorRadius=v)}})},g=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.collectorRadius=T)}})},A=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.collectorRadius===void 0||Math.abs(w.solarUpdraftTower.collectorRadius-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.collectorRadius===void 0||Math.abs(w.solarUpdraftTower.collectorRadius-v)>Et))return!0}break;default:if(s&&s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower&&(s.solarUpdraftTower.collectorRadius===void 0||Math.abs(s.solarUpdraftTower.collectorRadius-v)>Et))return!0}return!1},y=v=>{if(s&&A(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.collectorRadius??Math.max(10,.5*Math.min(b.lx,b.ly)))}const w={name:"Set Solar Collector Radius for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{g(w.oldValues,w.newValue)}};r(w),g(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.collectorRadius??Math.max(10,.5*Math.min(b.lx,b.ly)))}const w={name:"Set Solar Collector Radius for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{p(w.newValue)}};r(w),p(v),l(a+1);break}default:{if(s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower){const T=o(s.id),w=T&&T.solarUpdraftTower?T.solarUpdraftTower.collectorRadius??Math.max(10,.5*Math.min(T.lx,T.ly)):s.solarUpdraftTower.collectorRadius??Math.max(10,.5*Math.min(s.lx,s.ly));f(s.id,v);const x={name:"Set Solar Collector Radius on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(x.changedElementId,x.oldValue)},redo:()=>{f(x.changedElementId,x.newValue)}};r(x),l(a+1)}break}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerCollectorRadius",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:1e3,style:{width:120},step:1,precision:1,value:c,onChange:v=>{v!==null&&u(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [1, 1000] ",Y.t("word.MeterAbbreviation",d)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",d)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",d)})]})})})]})})},Zdo=({setDialogVisible:t})=>{var P;const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),[c,u]=m.useState(((P=s==null?void 0:s.solarUpdraftTower)==null?void 0:P.collectorTransmissivity)??.9),d=$t(),f=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.collectorTransmissivity=T);break}})},p=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.UpdraftTower&&(x.solarUpdraftTower||(x.solarUpdraftTower={}),x.solarUpdraftTower.collectorTransmissivity=v)}})},g=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.collectorTransmissivity=T)}})},A=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.collectorTransmissivity===void 0||Math.abs(w.solarUpdraftTower.collectorTransmissivity-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.collectorTransmissivity===void 0||Math.abs(w.solarUpdraftTower.collectorTransmissivity-v)>Et))return!0}break;default:if(s&&s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower&&(s.solarUpdraftTower.collectorTransmissivity===void 0||Math.abs(s.solarUpdraftTower.collectorTransmissivity-v)>Et))return!0}return!1},y=v=>{if(s&&A(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.collectorTransmissivity??.9)}const w={name:"Set Solar Collector Transmissivity for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{g(w.oldValues,w.newValue)}};r(w),g(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.collectorTransmissivity??.9)}const w={name:"Set Solar Collector Transmissivity for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{p(w.newValue)}};r(w),p(v),l(a+1);break}default:{if(s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower){const T=o(s.id),w=T&&T.solarUpdraftTower?T.solarUpdraftTower.collectorTransmissivity??.9:s.solarUpdraftTower.collectorTransmissivity??.9;f(s.id,v);const x={name:"Set Solar Collector Transmissivity on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(x.changedElementId,x.oldValue)},redo:()=>{f(x.changedElementId,x.newValue)}};r(x),l(a+1)}break}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:540,title:Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerCollectorTransmissivity",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.01,precision:2,value:c,onChange:v=>{v!==null&&u(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",marginLeft:"16px",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",d)})]})})})]})})},efo=({setDialogVisible:t})=>{var P;const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),[c,u]=m.useState(((P=s==null?void 0:s.solarUpdraftTower)==null?void 0:P.collectorEmissivity)??.95),d=$t(),f=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.collectorEmissivity=T);break}})},p=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.UpdraftTower&&(x.solarUpdraftTower||(x.solarUpdraftTower={}),x.solarUpdraftTower.collectorEmissivity=v)}})},g=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.collectorEmissivity=T)}})},A=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.collectorEmissivity===void 0||Math.abs(w.solarUpdraftTower.collectorEmissivity-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.collectorEmissivity===void 0||Math.abs(w.solarUpdraftTower.collectorEmissivity-v)>Et))return!0}break;default:if(s&&s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower&&(s.solarUpdraftTower.collectorEmissivity===void 0||Math.abs(s.solarUpdraftTower.collectorEmissivity-v)>Et))return!0}return!1},y=v=>{if(s&&A(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.collectorEmissivity??.95)}const w={name:"Set Solar Collector Emissivity for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{g(w.oldValues,w.newValue)}};r(w),g(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.collectorEmissivity??.95)}const w={name:"Set Solar Collector Emissivity for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{p(w.newValue)}};r(w),p(v),l(a+1);break}default:{if(s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower){const T=o(s.id),w=T&&T.solarUpdraftTower?T.solarUpdraftTower.collectorEmissivity??.95:s.solarUpdraftTower.collectorEmissivity??.95;f(s.id,v);const x={name:"Set Solar Collector Emissivity on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(x.changedElementId,x.oldValue)},redo:()=>{f(x.changedElementId,x.newValue)}};r(x),l(a+1)}break}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:540,title:Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerCollectorEmissivity",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.01,max:1,style:{width:120},step:.01,precision:2,value:c,onChange:v=>{v!==null&&u(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",marginLeft:"16px",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",d)})]})})})]})})},tfo=({setDialogVisible:t})=>{var P;const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),[c,u]=m.useState(((P=s==null?void 0:s.solarUpdraftTower)==null?void 0:P.dischargeCoefficient)??.65),d=$t(),f=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.dischargeCoefficient=T);break}})},p=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.UpdraftTower&&(x.solarUpdraftTower||(x.solarUpdraftTower={}),x.solarUpdraftTower.dischargeCoefficient=v)}})},g=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.dischargeCoefficient=T)}})},A=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.dischargeCoefficient===void 0||Math.abs(w.solarUpdraftTower.dischargeCoefficient-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.dischargeCoefficient===void 0||Math.abs(w.solarUpdraftTower.dischargeCoefficient-v)>Et))return!0}break;default:if(s&&s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower&&(s.solarUpdraftTower.dischargeCoefficient===void 0||Math.abs(s.solarUpdraftTower.dischargeCoefficient-v)>Et))return!0}return!1},y=v=>{if(s&&A(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.dischargeCoefficient??.65)}const w={name:"Set Solar Chimney Discharge Coefficient for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{g(w.oldValues,w.newValue)}};r(w),g(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.dischargeCoefficient??.65)}const w={name:"Set Solar Chimney Discharge Coefficient for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{p(w.newValue)}};r(w),p(v),l(a+1);break}default:{if(s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower){const T=o(s.id),w=T&&T.solarUpdraftTower?T.solarUpdraftTower.dischargeCoefficient??.65:s.solarUpdraftTower.dischargeCoefficient??.65;f(s.id,v);const x={name:"Set Solar Chimney Discharge Coefficient on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(x.changedElementId,x.oldValue)},redo:()=>{f(x.changedElementId,x.newValue)}};r(x),l(a+1)}break}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:540,title:Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerDischargeCoefficient",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.65,max:.7,style:{width:120},step:.01,precision:2,value:c,onChange:v=>{v!==null&&u(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [0.65, 0.70]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",marginLeft:"16px",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",d)})]})})})]})})},nfo=({setDialogVisible:t})=>{var P;const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),[c,u]=m.useState(((P=s==null?void 0:s.solarUpdraftTower)==null?void 0:P.turbineEfficiency)??.3),d=$t(),f=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.turbineEfficiency=T);break}})},p=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.UpdraftTower&&(x.solarUpdraftTower||(x.solarUpdraftTower={}),x.solarUpdraftTower.turbineEfficiency=v)}})},g=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.turbineEfficiency=T)}})},A=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.turbineEfficiency===void 0||Math.abs(w.solarUpdraftTower.turbineEfficiency-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.turbineEfficiency===void 0||Math.abs(w.solarUpdraftTower.turbineEfficiency-v)>Et))return!0}break;default:if(s&&s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower&&(s.solarUpdraftTower.turbineEfficiency===void 0||Math.abs(s.solarUpdraftTower.turbineEfficiency-v)>Et))return!0}return!1},y=v=>{if(s&&A(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.turbineEfficiency??.3)}const w={name:"Set Solar Updraft Tower Turbine Efficiency for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{g(w.oldValues,w.newValue)}};r(w),g(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.turbineEfficiency??.3)}const w={name:"Set Solar Updraft Tower Turbine Efficiency for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{p(w.newValue)}};r(w),p(v),l(a+1);break}default:{if(s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower){const T=o(s.id),w=T&&T.solarUpdraftTower?T.solarUpdraftTower.turbineEfficiency??.3:s.solarUpdraftTower.turbineEfficiency??.3;f(s.id,v);const x={name:"Set Solar Updraft Tower Turbine Efficiency on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(x.changedElementId,x.oldValue)},redo:()=>{f(x.changedElementId,x.newValue)}};r(x),l(a+1)}break}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:540,title:Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerTurbineEfficiency",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.2,max:1,style:{width:120},step:.01,precision:2,value:c,onChange:v=>{v!==null&&u(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [0.2, 1.0]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",marginLeft:"16px",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",d)})]})})})]})})},{Option:QT}=Uo,ofo=({setDialogVisible:t})=>{const e=M(pn),n=M(oa),o=M(m0),r=dt(n5),[i,a]=m.useState(!1),[l,s]=m.useState(!1),[c,u]=m.useState({left:0,top:0,bottom:0,right:0}),d=m.useRef(null),f=M(bA).geneticAlgorithmParams,p=m.useRef(f.selectionMethod),g=m.useRef(f.searchMethod),A=m.useRef(Math.min(f.objectiveFunctionType,Po.YEARLY_TOTAL_OUTPUT)),y=m.useRef(f.populationSize),S=m.useRef(f.maximumGenerations),C=m.useRef(f.mutationRate),P=m.useRef(f.selectionRate??.5),v=m.useRef(f.crossoverRate??.5),T=m.useRef(f.convergenceThreshold),w=m.useRef(f.localSearchRadius),x=m.useRef(null);m.useEffect(()=>{var N;(N=x.current)==null||N.focus()},[]);const b={lng:o},R=(N,U)=>{if(d.current){const{clientWidth:W,clientHeight:k}=window.document.documentElement,D=d.current.getBoundingClientRect();u({left:-D.left+U.x,right:W-(D.right-U.x),top:-D.top+U.y,bottom:k-((D==null?void 0:D.bottom)-U.y)})}},H=()=>{e(N=>{N.evolutionaryAlgorithmState.geneticAlgorithmParams.problem=Ri.SOLAR_PANEL_TILT_ANGLE,N.evolutionaryAlgorithmState.geneticAlgorithmParams.objectiveFunctionType=A.current,N.evolutionaryAlgorithmState.geneticAlgorithmParams.selectionMethod=p.current,N.evolutionaryAlgorithmState.geneticAlgorithmParams.searchMethod=g.current,N.evolutionaryAlgorithmState.geneticAlgorithmParams.populationSize=y.current,N.evolutionaryAlgorithmState.geneticAlgorithmParams.maximumGenerations=S.current,N.evolutionaryAlgorithmState.geneticAlgorithmParams.selectionRate=P.current,N.evolutionaryAlgorithmState.geneticAlgorithmParams.crossoverRate=v.current,N.evolutionaryAlgorithmState.geneticAlgorithmParams.mutationRate=C.current,N.evolutionaryAlgorithmState.geneticAlgorithmParams.convergenceThreshold=T.current,N.evolutionaryAlgorithmState.geneticAlgorithmParams.localSearchRadius=w.current})},F=()=>{r||gn(E("message.EvolutionStarted",b)),H(),setTimeout(()=>{dt.getState().set(N=>{N.runEvolution=!N.runEvolution}),e(N=>{N.evolutionMethod=_s.GENETIC_ALGORITHM,N.evolutionaryAlgorithmState.geneticAlgorithmParams.problem=Ri.SOLAR_PANEL_TILT_ANGLE,n&&(N.actionInfo={name:"Run Genetic Algorithm for Solar Panel Tilt Angle",timestamp:new Date().getTime()})})},100)},{t:E}=Xl();return h.jsx(h.Fragment,{children:h.jsxs(xi,{width:640,open:!0,title:h.jsxs("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>s(!0),onMouseOut:()=>s(!1),children:[E("optimizationMenu.SolarPanelTiltAngleOptimization",b)+": ",E("optimizationMenu.GeneticAlgorithmSettings",b)]}),footer:[h.jsx(io,{onClick:()=>{t(!1)},children:E("word.Cancel",b)},"Cancel"),h.jsx(io,{type:"primary",ref:x,onClick:()=>{F(),t(!1)},children:E("word.Run",b)},"Run")],onCancel:()=>{t(!1)},maskClosable:!1,destroyOnClose:!1,modalRender:N=>h.jsx(Bi,{disabled:!l,bounds:c,onStart:(U,W)=>R(U,W),children:h.jsx("div",{ref:d,children:N})}),children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.Objective",b)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:A.current,style:{width:"100%"},value:A.current,onChange:N=>{A.current=N,a(!i)},children:[h.jsx(QT,{value:Po.DAILY_TOTAL_OUTPUT,children:E("optimizationMenu.ObjectiveFunctionDailyTotalYield",b)},Po.DAILY_TOTAL_OUTPUT),h.jsx(QT,{value:Po.YEARLY_TOTAL_OUTPUT,children:E("optimizationMenu.ObjectiveFunctionYearlyTotalYield",b)},Po.YEARLY_TOTAL_OUTPUT)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.GeneticAlgorithmSelectionMethod",b)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:p.current,style:{width:"100%"},value:p.current,onChange:N=>{p.current=N,a(!i)},children:[h.jsx(QT,{value:Wm.ROULETTE_WHEEL,children:E("optimizationMenu.RouletteWheel",b)},Wm.ROULETTE_WHEEL),h.jsx(QT,{value:Wm.TOURNAMENT,children:E("optimizationMenu.Tournament",b)},Wm.TOURNAMENT)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.PopulationSize",b)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:10,max:100,style:{width:"100%"},precision:0,formatter:N=>Number(N).toFixed(0),value:y.current,step:1,onChange:N=>{N!==null&&(y.current=Number(N),a(!i))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.MaximumGenerations",b)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:5,max:100,step:1,style:{width:"100%"},precision:0,formatter:N=>Number(N).toFixed(0),value:S.current,onChange:N=>{N!==null&&(S.current=Number(N),a(!i))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.SelectionRate",b)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:P.current,step:.01,onChange:N=>{N!==null&&(P.current=Number(N),a(!i))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.CrossoverRate",b)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:v.current,step:.01,onChange:N=>{N!==null&&(v.current=Number(N),a(!i))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.MutationRate",b)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:C.current,step:.01,onChange:N=>{N!==null&&(C.current=Number(N),a(!i))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.ConvergenceThreshold",b)+" [0, 0.1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:.001,max:.1,style:{width:"100%"},precision:3,value:T.current,step:.001,onChange:N=>{N!==null&&(T.current=Number(N),a(!i))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.SearchMethod",b)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:g.current,style:{width:"100%"},value:g.current,onChange:N=>{g.current=Number(N),a(!i)},children:[h.jsx(QT,{value:ds.GLOBAL_SEARCH_UNIFORM_SELECTION,children:E("optimizationMenu.GlobalSearchUniformSelection",b)},ds.GLOBAL_SEARCH_UNIFORM_SELECTION),h.jsx(QT,{value:ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION,children:E("optimizationMenu.LocalSearchRandomOptimization",b)},ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION)]})})]}),g.current===ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION&&h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.LocalSearchRadius",b)+" ([0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:w.current,step:.01,onChange:N=>{N!==null&&(w.current=Number(N),a(!i))}})})]})]})})},{Option:OO}=Uo,rfo=({setDialogVisible:t})=>{const e=M(pn),n=M(oa),o=M(m0),r=dt(n5),i=M(bA).particleSwarmOptimizationParams,[a,l]=m.useState(!1),[s,c]=m.useState(!1),[u,d]=m.useState({left:0,top:0,bottom:0,right:0}),f=m.useRef(null),p=m.useRef(Math.min(i.objectiveFunctionType,Po.YEARLY_TOTAL_OUTPUT)),g=m.useRef(i.searchMethod),A=m.useRef(i.swarmSize),y=m.useRef(i.maximumSteps),S=m.useRef(i.vmax??.01),C=m.useRef(i.inertia??.8),P=m.useRef(i.cognitiveCoefficient??.1),v=m.useRef(i.socialCoefficient??.1),T=m.useRef(i.convergenceThreshold),w=m.useRef(i.localSearchRadius),x=m.useRef(null);m.useEffect(()=>{var N;(N=x.current)==null||N.focus()},[]);const b={lng:o},R=(N,U)=>{if(f.current){const{clientWidth:W,clientHeight:k}=window.document.documentElement,D=f.current.getBoundingClientRect();d({left:-D.left+U.x,right:W-(D.right-U.x),top:-D.top+U.y,bottom:k-((D==null?void 0:D.bottom)-U.y)})}},H=()=>{e(N=>{N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.problem=Ri.SOLAR_PANEL_TILT_ANGLE,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.objectiveFunctionType=p.current,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.searchMethod=g.current,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.swarmSize=A.current,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.maximumSteps=y.current,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.cognitiveCoefficient=P.current,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.socialCoefficient=v.current,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.vmax=S.current,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.inertia=C.current,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.convergenceThreshold=T.current,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.localSearchRadius=w.current})},F=()=>{r||gn(E("message.EvolutionStarted",b)),H(),setTimeout(()=>{dt.getState().set(N=>{N.runEvolution=!N.runEvolution}),e(N=>{N.evolutionMethod=_s.PARTICLE_SWARM_OPTIMIZATION,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.problem=Ri.SOLAR_PANEL_TILT_ANGLE,n&&(N.actionInfo={name:"Run Particle Swarm Optimization for Solar Panel Tilt Angle",timestamp:new Date().getTime()})})},100)},{t:E}=Xl();return h.jsx(h.Fragment,{children:h.jsxs(xi,{width:640,open:!0,title:h.jsxs("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>c(!0),onMouseOut:()=>c(!1),children:[E("optimizationMenu.SolarPanelTiltAngleOptimization",b)+": ",E("optimizationMenu.ParticleSwarmOptimizationSettings",b)]}),footer:[h.jsx(io,{onClick:()=>{t(!1)},children:E("word.Cancel",b)},"Cancel"),h.jsx(io,{type:"primary",ref:x,onClick:()=>{F(),t(!1)},children:E("word.Run",b)},"Run")],onCancel:()=>{t(!1)},maskClosable:!1,destroyOnClose:!1,modalRender:N=>h.jsx(Bi,{disabled:!s,bounds:u,onStart:(U,W)=>R(U,W),children:h.jsx("div",{ref:f,children:N})}),children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.Objective",b)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:p.current,style:{width:"100%"},value:p.current,onChange:N=>{p.current=N,l(!a)},children:[h.jsx(OO,{value:Po.DAILY_TOTAL_OUTPUT,children:E("optimizationMenu.ObjectiveFunctionDailyTotalYield",b)},Po.DAILY_TOTAL_OUTPUT),h.jsx(OO,{value:Po.YEARLY_TOTAL_OUTPUT,children:E("optimizationMenu.ObjectiveFunctionYearlyTotalYield",b)},Po.YEARLY_TOTAL_OUTPUT)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.SwarmSize",b)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:10,max:100,style:{width:"100%"},precision:0,value:A.current,step:1,formatter:N=>Number(N).toFixed(0),onChange:N=>{A.current=Number(N),l(!a)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.MaximumSteps",b)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:5,max:100,step:1,style:{width:"100%"},precision:0,value:y.current,formatter:N=>Number(N).toFixed(0),onChange:N=>{y.current=Number(N),l(!a)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.CognitiveCoefficient",b)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:P.current,step:.01,onChange:N=>{P.current=Number(N),l(!a)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.SocialCoefficient",b)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:v.current,step:.01,onChange:N=>{v.current=Number(N),l(!a)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.InertiaWeight",b)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:C.current,step:.01,onChange:N=>{C.current=Number(N),l(!a)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.MaximumVelocity",b)+" [0.001, 0.1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:.001,max:.1,style:{width:"100%"},precision:3,value:S.current,step:.001,onChange:N=>{S.current=Number(N),l(!a)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.ConvergenceThreshold",b)+" [0, 0.1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:.001,max:.1,style:{width:"100%"},precision:3,value:T.current,step:.001,onChange:N=>{T.current=Number(N),l(!a)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.SearchMethod",b)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:g.current,style:{width:"100%"},value:g.current,onChange:N=>{g.current=Number(N),l(!a)},children:[h.jsx(OO,{value:ds.GLOBAL_SEARCH_UNIFORM_SELECTION,children:E("optimizationMenu.GlobalSearchUniformSelection",b)},ds.GLOBAL_SEARCH_UNIFORM_SELECTION),h.jsx(OO,{value:ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION,children:E("optimizationMenu.LocalSearchRandomOptimization",b)},ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION)]})})]}),g.current===ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION&&h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.LocalSearchRadius",b)+" ([0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:w.current,step:.01,onChange:N=>{w.current=Number(N),l(!a)}})})]})]})})},hy=({children:t,width:e="90px"})=>h.jsx("div",{style:{width:e},children:t}),ifo=({element:t})=>{const e=aot(t),n=$t();return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:!!(t!=null&&t.showLabel),onChange:e,children:Y.t("labelSubMenu.KeepShowingLabel",n)})})},afo=({element:t})=>{const{labelText:e,setLabelText:n}=iot(t),o=lot(t,e),r=$t();return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(jl,{addonBefore:h.jsx(hy,{children:Y.t("labelSubMenu.LabelText",r)+":"}),value:e,onChange:i=>n(i.target.value),onPressEnter:o,onBlur:o})})},lfo=({element:t})=>{const e=EXn(t),n=$t();return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Sn,{addonBefore:h.jsx(hy,{children:Y.t("labelSubMenu.LabelHeight",n)+":"}),min:t.lz/2+.2,max:100,step:1,precision:1,value:t.labelHeight??t.lz/2+.2,onChange:o=>e(o)})})},sfo=({element:t})=>{const e=IXn(t),n=$t();return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Sn,{addonBefore:h.jsx(hy,{children:Y.t("labelSubMenu.LabelFontSize",n)+":"}),min:10,max:100,step:1,precision:0,value:t.labelFontSize??20,onChange:o=>e(o)})})},cfo=({element:t})=>{const e=zXn(t),n=$t();return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Sn,{addonBefore:h.jsx(hy,{children:Y.t("labelSubMenu.LabelSize",n)+":"}),min:.2,max:5,step:.1,precision:1,value:t.labelSize??.2,onChange:o=>e(o)})})},ufo=({element:t})=>{const e=DXn(t),n=$t();return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(jl,{addonBefore:h.jsx(hy,{children:Y.t("labelSubMenu.LabelColor",n)+":"}),value:t.labelColor??"#ffffff",onChange:o=>e(o.target.value)})})},v3=t=>[{key:`${t.type}-show-label`,label:h.jsx(ifo,{element:t})},{key:`${t.type}-label-text`,label:h.jsx(afo,{element:t})},{key:`${t.type}-label-height`,label:h.jsx(lfo,{element:t})},{key:`${t.type}-label-font-size`,label:h.jsx(sfo,{element:t})},{key:`${t.type}-label-size`,label:h.jsx(cfo,{element:t})},{key:`${t.type}-label-color`,label:h.jsx(ufo,{element:t})}],dfo=[{key:"windowCount",objectType:z.Window},{key:"doorCount",objectType:z.Door},{key:"sensorCount",objectType:z.Sensor},{key:"outsideLightCount",objectType:z.Light},{key:"parabolicTroughCount",objectType:z.ParabolicTrough},{key:"parabolicDishCount",objectType:z.ParabolicDish},{key:"fresnelReflectorCount",objectType:z.FresnelReflector},{key:"heliostatCount",objectType:z.Heliostat},{key:"windTurbineCount",objectType:z.WindTurbine},{key:"polygonCount",objectType:z.Polygon},{key:"humanCount",objectType:z.Human},{key:"treeCount",objectType:z.Tree},{key:"flowerCount",objectType:z.Flower}],IHe=(t,e)=>{const n={lng:M.getState().language};let o="",r="";switch(t){case z.Wall:{o=`${Y.t("foundationMenu.RemoveAllUnlockedWalls",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllWallsOnFoundation",n)} (${e} ${Y.t("foundationMenu.Walls",n)})`;break}case z.Window:{o=`${Y.t("foundationMenu.RemoveAllUnlockedWindows",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllWindowsOnFoundation",n)} (${e} ${Y.t("foundationMenu.Windows",n)})`;break}case z.Door:{o=`${Y.t("foundationMenu.RemoveAllUnlockedDoors",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllDoorsOnFoundation",n)} (${e} ${Y.t("foundationMenu.Doors",n)})`;break}case z.Sensor:{o=`${Y.t("foundationMenu.RemoveAllUnlockedSensors",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllSensorsOnFoundation",n)} (${e} ${Y.t("foundationMenu.Sensors",n)})`;break}case z.Light:{o=`${Y.t("foundationMenu.RemoveAllUnlockedLights",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllLightsOnFoundation",n)} (${e} ${Y.t("foundationMenu.Lights",n)})`;break}case z.ParabolicTrough:{o=`${Y.t("foundationMenu.RemoveAllUnlockedParabolicTroughs",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllParabolicTroughsOnFoundation",n)} (${e} ${Y.t("foundationMenu.ParabolicTroughs",n)})`;break}case z.ParabolicDish:{o=`${Y.t("foundationMenu.RemoveAllUnlockedParabolicDishes",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllParabolicDishesOnFoundation",n)} (${e} ${Y.t("foundationMenu.ParabolicDishes",n)})`;break}case z.FresnelReflector:{o=`${Y.t("foundationMenu.RemoveAllUnlockedFresnelReflectors",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllFresnelReflectorsOnFoundation",n)} (${e} ${Y.t("foundationMenu.FresnelReflectors",n)})`;break}case z.Heliostat:{o=`${Y.t("foundationMenu.RemoveAllUnlockedHeliostats",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllHeliostatsOnFoundation",n)} (${e} ${Y.t("foundationMenu.Heliostats",n)})`;break}case z.WindTurbine:{o=`${Y.t("foundationMenu.RemoveAllUnlockedWindTurbines",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllWindTurbinesOnFoundation",n)} (${e} ${Y.t("foundationMenu.WindTurbines",n)})`;break}case z.Polygon:{o=`${Y.t("foundationMenu.RemoveAllUnlockedPolygons",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllPolygonsOnFoundation",n)} (${e} ${Y.t("foundationMenu.Polygons",n)})`;break}case z.Human:{o=`${Y.t("foundationMenu.RemoveAllUnlockedHumans",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllHumansOnFoundation",n)} (${e} ${Y.t("foundationMenu.Humans",n)})`;break}case z.Tree:{o=`${Y.t("foundationMenu.RemoveAllUnlockedTrees",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllTreesOnFoundation",n)} (${e} ${Y.t("foundationMenu.Trees",n)})`;break}case z.Flower:{o=`${Y.t("foundationMenu.RemoveAllUnlockedFlowers",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllFlowersOnFoundation",n)} (${e} ${Y.t("foundationMenu.Flowers",n)})`;break}}return{itemLabel:o,modalTitle:r}},ffo=(t,e,n)=>n===z.Light?t.insideLightCount+t.outsideLightCount:t[e],hfo=t=>{const e=M.getState().set,n=new Set;M.getState().elements.forEach(a=>{!a.locked&&a.type===z.Wall&&(a.parentId===t.id||a.foundationId===t.id)&&n.add(a.id)});const o=M.getState().elements.filter(a=>n.has(a.id)||n.has(a.parentId));e(a=>{a.elements=a.elements.filter(l=>!n.has(l.id)&&!n.has(l.parentId))});const r=JSON.parse(JSON.stringify(o)),i={name:"Remove All Walls on Foundation",timestamp:Date.now(),parentId:t.id,removedElements:r,undo:()=>{e(a=>{a.elements.push(...i.removedElements),a.updateWallMapOnFoundationFlag=!a.updateWallMapOnFoundationFlag})},redo:()=>{const a=new Set;M.getState().elements.forEach(l=>{!l.locked&&l.type===z.Wall&&l.parentId===i.parentId&&a.add(l.id)}),e(l=>{l.elements=l.elements.filter(s=>!a.has(s.id)&&!a.has(s.parentId))})}};M.getState().addUndoable(i)},pfo=(t,e,n)=>{const o=[],r={lng:M.getState().language};if(e.unlockedCount>0&&o.push({key:"lock-all-offsprings",label:h.jsx(qCe,{foundation:t,lock:!0,count:e.unlockedCount})}),e.lockedCount>0&&o.push({key:"unlock-all-offsprings",label:h.jsx(qCe,{foundation:t,lock:!1,count:e.lockedCount})}),n.wallCount>0){const{itemLabel:i,modalTitle:a}=IHe(z.Wall,n.wallCount);o.push({key:"remove-all-walls-on-foundation",label:h.jsx(Dae,{foundation:t,objectType:z.Wall,modalTitle:a,onClickOk:()=>hfo(t),children:i})})}if(n.solarPanelCount>0){const i=Y.t("foundationMenu.DoYouReallyWantToRemoveAllSolarPanelsOnFoundation",r)+" ("+n.solarPanelModuleCount+" "+Y.t("foundationMenu.SolarPanels",r)+", "+n.solarPanelCount+" "+Y.t("foundationMenu.Racks",r)+")?";o.push({key:"remove-all-solar-panels-on-foundation",label:h.jsxs(Dae,{foundation:t,objectType:z.SolarPanel,modalTitle:i,children:[Y.t("foundationMenu.RemoveAllUnlockedSolarPanels",r),"  (",n.solarPanelModuleCount," ",Y.t("foundationMenu.SolarPanels",r),", ",n.solarPanelCount," ",Y.t("foundationMenu.Racks",r),")"]})})}return dfo.forEach(({key:i,objectType:a})=>{const l=ffo(n,i,a);if(typeof l=="number"&&l>0){const{itemLabel:s,modalTitle:c}=IHe(a,l),u=a.replaceAll(" ","");o.push({key:`remove-all-${u}s-on-foundation`,label:h.jsx(Dae,{foundation:t,objectType:a,modalTitle:c,children:s})})}}),o},gfo=()=>{const t=M.getState().elementsToPaste;if(t&&t.length>0){const e=t[0];if(e.type===z.Human||e.type===z.Tree||e.type===z.Flower||e.type===z.Polygon||e.type===z.Sensor||e.type===z.Light||e.type===z.SolarPanel||e.type===z.SolarWaterHeater||e.type===z.ParabolicDish||e.type===z.Heliostat||e.type===z.FresnelReflector||e.type===z.ParabolicTrough||e.type===z.WindTurbine||e.type===z.Wall)return!0}return!1},mfo=t=>{const e=[];if(t.type!==z.Foundation)return{items:e};const n=t,o={lng:M.getState().language},r=!n.locked,i=!n.notBuilding&&ye.getBuildingCompletionStatus(n,M.getState().elements)===Uc.COMPLETE,a=M.getState().countAllOffspringsByTypeAtOnce(n.id,!0),l=M.getState().countAllOffspringsByTypeAtOnce(n.id,!1);return gfo()&&e.push({key:"foundation-paste",label:h.jsx(nM,{})}),e.push({key:"foundation-copy",label:h.jsx(Fd,{})}),r&&e.push({key:"foundation-cut",label:h.jsx(kd,{})}),e.push({key:"foundation-lock",label:h.jsx(Ku,{selectedElement:n})}),r&&e.push({key:"foundation-group-master",label:h.jsx(LQe,{groupableElement:n})}),e.push({key:"building",label:h.jsx(TXn,{foundation:n})}),a.gotSome()&&e.push({key:"lock-unlock-clear-on-foundation",label:h.jsx(an,{children:Y.t("word.Elements",o)}),children:pfo(n,a,l)}),r&&((!n.textureType||n.textureType===_i.NoTexture)&&e.push({key:"foundation-color",label:h.jsxs(eo,{Dialog:Ddo,children:[Y.t("word.Color",o)," ..."]})}),e.push({key:"foundation-texture",label:h.jsxs(eo,{Dialog:FXn,children:[Y.t("word.Texture",o)," ..."]})}),e.push({key:"foundation-length",label:h.jsxs(eo,{Dialog:Edo,children:[Y.t("word.Length",o)," ..."]})}),e.push({key:"foundation-width",label:h.jsxs(eo,{Dialog:Fdo,children:[Y.t("word.Width",o)," ..."]})}),e.push({key:"foundation-height",label:h.jsxs(eo,{Dialog:kdo,children:[Y.t("word.Height",o)," ..."]})}),e.push({key:"foundation-azimuth",label:h.jsxs(eo,{Dialog:Ldo,children:[Y.t("word.Azimuth",o)," ..."]})}),i&&e.push({key:"ground-floor-r-value",label:h.jsxs(eo,{Dialog:Wdo,children:[Y.t("foundationMenu.GroundFloorRValue",o)," ..."]})})),e.push({key:"add-polygon-on-foundation",label:h.jsx(PXn,{foundation:n})}),!n.notBuilding&&a.wallCount>0&&e.push({key:"building-hvac-system",label:h.jsx(an,{children:Y.t("word.BuildingHVACSystem",o)}),children:[{key:"hvac-system-id",label:h.jsx(CXn,{foundation:n})},{key:"thermostat-temperature",label:h.jsx(RXn,{foundation:n})},{key:"tolerance-threshold",label:h.jsx(HXn,{foundation:n})}]}),r&&(e.push({key:"select-solar-structure",label:h.jsx(an,{children:Y.t("foundationMenu.SolarStructure",o)}),children:[{key:"select-solar-structure-submenu",label:h.jsx(MXn,{foundation:n}),style:{backgroundColor:"white"}}]}),n.solarStructure===Dn.FocusPipe&&e.push({key:"solar-absorber-pipe-physical-properties",label:h.jsx(an,{children:Y.t("solarAbsorberPipeMenu.AbsorberPipePhysicalProperties",o)}),children:[{key:"solar-absorber-pipe-height",label:h.jsxs(eo,{noPadding:!0,Dialog:Ndo,children:[Y.t("solarAbsorberPipeMenu.AbsorberHeight",o)," ..."]})},{key:"solar-absorber-pipe-aperture-width",label:h.jsxs(eo,{noPadding:!0,Dialog:Udo,children:[Y.t("solarAbsorberPipeMenu.AbsorberApertureWidth",o)," ..."]})},{key:"foundation-solar-receiver-pipe-pole-number",label:h.jsxs(eo,{noPadding:!0,Dialog:jdo,children:[Y.t("solarAbsorberPipeMenu.AbsorberPipePoleNumber",o)," ..."]})},{key:"solar-absorber-pipe-absorptance",label:h.jsxs(eo,{noPadding:!0,Dialog:Bdo,children:[Y.t("solarAbsorberPipeMenu.AbsorberAbsorptance",o)," ..."]})},{key:"solar-absorber-optical-efficiency",label:h.jsxs(eo,{noPadding:!0,Dialog:Ydo,children:[Y.t("solarAbsorberPipeMenu.AbsorberOpticalEfficiency",o)," ..."]})},{key:"solar-absorber-thermal-efficiency",label:h.jsxs(eo,{noPadding:!0,Dialog:Odo,children:[Y.t("solarAbsorberPipeMenu.AbsorberThermalEfficiency",o)," ..."]})}]}),n.solarStructure===Dn.FocusTower&&e.push({key:"solar-power-tower-physical-properties",label:h.jsx(an,{children:Y.t("solarPowerTowerMenu.ReceiverTowerPhysicalProperties",o)}),children:[{key:"solar-power-tower-height",label:h.jsxs(eo,{noPadding:!0,Dialog:Vdo,children:[Y.t("solarPowerTowerMenu.ReceiverTowerHeight",o)," ..."]})},{key:"solar-power-tower-radius",label:h.jsxs(eo,{noPadding:!0,Dialog:_do,children:[Y.t("solarPowerTowerMenu.ReceiverTowerRadius",o)," ..."]})},{key:"solar-power-tower-receiver-absorptance",label:h.jsxs(eo,{noPadding:!0,Dialog:Gdo,children:[Y.t("solarPowerTowerMenu.ReceiverAbsorptance",o)," ..."]})},{key:"solar-power-tower-receiver-optical-efficiency",label:h.jsxs(eo,{noPadding:!0,Dialog:Jdo,children:[Y.t("solarPowerTowerMenu.ReceiverOpticalEfficiency",o)," ..."]})},{key:"solar-power-tower-receiver-thermal-efficiency",label:h.jsxs(eo,{noPadding:!0,Dialog:Xdo,children:[Y.t("solarPowerTowerMenu.ReceiverThermalEfficiency",o)," ..."]})}]}),n.solarStructure===Dn.UpdraftTower&&e.push({key:"solar-updraft-tower-physical-properties",label:h.jsx(an,{children:Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerPhysicalProperties",o)}),children:[{key:"solar-updraft-tower-chimney-height",label:h.jsxs(eo,{noPadding:!0,Dialog:Kdo,children:[Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerChimneyHeight",o)," ..."]})},{key:"solar-updraft-tower-chimney-radius",label:h.jsxs(eo,{noPadding:!0,Dialog:qdo,children:[Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerChimneyRadius",o)," ..."]})},{key:"solar-updraft-tower-collector-height",label:h.jsxs(eo,{noPadding:!0,Dialog:$do,children:[Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerCollectorHeight",o)," ..."]})},{key:"solar-updraft-tower-collector-radius",label:h.jsxs(eo,{noPadding:!0,Dialog:Qdo,children:[Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerCollectorRadius",o)," ..."]})},{key:"solar-updraft-tower-collector-transmissivity",label:h.jsxs(eo,{noPadding:!0,Dialog:Zdo,children:[Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerCollectorTransmissivity",o)," ..."]})},{key:"solar-updraft-tower-collector-emissivity",label:h.jsxs(eo,{noPadding:!0,Dialog:efo,children:[Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerCollectorEmissivity",o)," ..."]})},{key:"solar-updraft-tower-discharge-coefficient",label:h.jsxs(eo,{noPadding:!0,Dialog:tfo,children:[Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerDischargeCoefficient",o)," ..."]})},{key:"solar-updraft-tower-turbine-efficiency",label:h.jsxs(eo,{noPadding:!0,Dialog:nfo,children:[Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerTurbineEfficiency",o)," ..."]})}]})),e.push({key:"optimization",label:h.jsx(an,{children:Y.t("optimizationMenu.Optimization",o)}),children:[{key:"genetic-algorithms",label:h.jsx(an,{noPadding:!0,children:Y.t("optimizationMenu.GeneticAlgorithm",o)}),disabled:l.solarPanelCount===0,children:[{key:"solar-panel-tilt-angle-ga-optimizer",label:h.jsxs(eo,{noPadding:!0,Dialog:ofo,children:[Y.t("optimizationMenu.SolarPanelTiltAngleOptimization",o),"..."]})}]},{key:"particle-swarm-optimization",label:h.jsx(an,{noPadding:!0,children:Y.t("optimizationMenu.ParticleSwarmOptimization",o)}),disabled:l.solarPanelCount===0,children:[{key:"solar-panel-tilt-angle-pso-optimizer",label:h.jsxs(eo,{noPadding:!0,Dialog:rfo,children:[Y.t("optimizationMenu.SolarPanelTiltAngleOptimization",o),"..."]})}]}]}),r&&e.push({key:"foundation-label",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",o)}),children:v3(n)}),{items:e}},yfo=be.memo(({cuboid:t})=>{const e=$t(),n=()=>{M.getState().set(o=>{for(const r of o.elements)if(r.id===t.id&&r.type===z.Cuboid){const i=r,a=!i.stackable;i.stackable=a,o.actionState.cuboidStackable=a;break}})};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.stackable,onChange:n,children:Y.t("cuboidMenu.Stackable",e)})})}),Afo=be.memo(({cuboid:t,selectedSideIndex:e})=>{const n=$t(),o=M.getState().set,r=()=>{o(c=>{c.objectTypeToAdd=z.Polygon});const{pos:i}=ye.getWorldDataById(t.id);let a;switch(e){case 0:a=Op;break;case 1:a=Vp;break;case 2:a=Yc;break;case 3:a=_p;break;default:a=ko,i.z=t.lz}const l=M.getState().addElement(t,i,a),s={name:"Add",timestamp:Date.now(),addedElement:l,undo:()=>{M.getState().removeElementById(s.addedElement.id,!1)},redo:()=>{o(c=>{c.elements.push(s.addedElement),c.selectedElement=s.addedElement})}};M.getState().addUndoable(s),o(c=>{c.objectTypeToAdd=z.None})};return h.jsx(an,{onClick:r,children:Y.t("cuboidMenu.AddPolygon",n)})}),zHe=be.memo(({cuboid:t,objectType:e,modalTitle:n,onClickOk:o,children:r})=>{const i=M.getState().removeAllChildElementsByType,a=()=>{const s=M.getState().elements.filter(d=>!d.locked&&d.type===e&&d.parentId===t.id);i(t.id,e);const c=JSON.parse(JSON.stringify(s)),u={name:`Remove All ${e}s on Cuboid`,timestamp:Date.now(),parentId:t.id,removedElements:c,undo:()=>{M.getState().set(d=>{d.elements.push(...u.removedElements)})},redo:()=>{i(u.parentId,e)}};M.getState().addUndoable(u)},l=()=>{const s=o??a;xi.confirm({title:n,icon:h.jsx(ny,{}),onOk:s})};return h.jsx(an,{noPadding:!0,onClick:l,children:r})}),wfo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(Eb),i=M(Fb),a=M(sYe),l=M(no),s=M(Qn),c=uo(z.Cuboid),[u,d]=m.useState((c==null?void 0:c.color)??"#808080"),[f,p]=m.useState(!1),g=$t();m.useEffect(()=>{P()},[c,a]);const A=(R,H,F)=>{e(E=>{for(const N of E.elements)if(N.type===z.Cuboid&&N.id===H&&!N.locked){const U=N;U.faceColors||(U.faceColors=new Array(6),U.faceColors.fill(U.color??F)),U.faceColors[R]=F;break}})},y=(R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.Cuboid&&E.id===R&&!E.locked){E.color=H;const N=E;N.faceColors||(N.faceColors=new Array(6));for(let U=0;U<4;U++)N.faceColors[U]=H;break}})},S=R=>{e(H=>{for(const F of H.elements)if(F.type===z.Cuboid&&!F.locked){F.color=R;const E=F;E.faceColors||(E.faceColors=new Array(6));for(let N=0;N<4;N++)E.faceColors[N]=R}})},C=R=>{i(R.target.value),p(!f)},P=()=>{c&&(a>=0&&c.faceColors?d(c.faceColors[a]):d(c.color??"#808080"))},v=R=>{if(c){switch(r){case re.AllSelectedObjectsOfThisType:for(const H of n)if(H.type===z.Cuboid&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)){const F=H;if(F.faceColors){for(let E=0;E<4;E++)if(R!==F.faceColors[E])return!0}else if(R!==F.color)return!0}break;case re.AllObjectsOfThisType:for(const H of n)if(H.type===z.Cuboid&&!H.locked){const F=H;if(F.faceColors){for(let E=0;E<4;E++)if(R!==F.faceColors[E])return!0}else if(R!==F.color)return!0}break;case re.OnlyThisObject:if(c.faceColors){for(let H=0;H<4;H++)if(R!==c.faceColors[H])return!0}else if(R!==(c==null?void 0:c.color))return!0;break;default:if(a>=0){const H=c!=null&&c.faceColors?c==null?void 0:c.faceColors[a]:c==null?void 0:c.color;if(R!==H)return!0}else if(R!==(c==null?void 0:c.color))return!0}return!1}},T=R=>{if(c&&v(R)){switch(r){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of n)if(E.type===z.Cuboid&&M.getState().selectedElementIdSet.has(E.id)){const N=E;if(N.faceColors)H.set(E.id,[...N.faceColors]);else{const U=N.color??"#808080";H.set(E.id,[U,U,U,U,U,U])}}const F={name:"Set Color for Selected Cuboids",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())if(N&&Array.isArray(N))for(let U=0;U{for(const[E,N]of F.oldValues.entries())if(N&&Array.isArray(N))for(let U=0;U{E.actionState.cuboidFaceColors||(E.actionState.cuboidFaceColors=["#808080","#808080","#808080","#808080","#808080","#808080"]);for(let N=0;N<4;N++)E.actionState.cuboidFaceColors[N]=R});break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of n)if(E.type===z.Cuboid){const N=E;if(N.faceColors)H.set(E.id,[...N.faceColors]);else{const U=N.color??"#808080";H.set(E.id,[U,U,U,U,U,U])}}const F={name:"Set Color for All Cuboids",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())if(N&&Array.isArray(N))for(let U=0;U{S(F.newValue)}};o(F),S(R),s(l+1),e(E=>{E.actionState.cuboidFaceColors||(E.actionState.cuboidFaceColors=["#808080","#808080","#808080","#808080","#808080","#808080"]);for(let N=0;N<4;N++)E.actionState.cuboidFaceColors[N]=R});break}case re.OnlyThisObject:{let H;if(c.faceColors)H=[...c.faceColors];else{const E=c.color??"#808080";H=[E,E,E,E,E,E]}const F={name:"Set Color for All Sides of Selected Cuboid",timestamp:Date.now(),oldValue:H,newValue:R,changedElementId:c.id,changedElementType:c.type,undo:()=>{if(F.oldValue&&Array.isArray(F.oldValue))for(let E=0;E{y(F.changedElementId,F.newValue)}};o(F),y(c.id,R),s(l+1),e(E=>{E.actionState.cuboidFaceColors||(E.actionState.cuboidFaceColors=["#808080","#808080","#808080","#808080","#808080","#808080"]);for(let N=0;N<4;N++)E.actionState.cuboidFaceColors[N]=R});break}default:{if(a>=0){const H=c.faceColors?c.faceColors[a]:c.color,F={name:"Set Color for Selected Side of Cuboid",timestamp:Date.now(),oldValue:H,newValue:R,changedElementId:c.id,changedElementType:c.type,changedSideIndex:a,undo:()=>{F.changedSideIndex!==void 0&&A(F.changedSideIndex,F.changedElementId,F.oldValue)},redo:()=>{F.changedSideIndex!==void 0&&A(F.changedSideIndex,F.changedElementId,F.newValue)}};o(F),A(a,c.id,R),s(l+1),e(E=>{E.actionState.cuboidFaceColors||(E.actionState.cuboidFaceColors=["#808080","#808080","#808080","#808080","#808080","#808080"]),E.actionState.cuboidFaceColors[a]=R})}break}}p(!f)}},w=()=>{P(),t(!1)},x=()=>{T(u),t(!1),s(0)},b=a>=0&&(c!=null&&c.faceColors)?c.faceColors[a]:(c==null?void 0:c.color)??"#808080";return h.jsx(so,{width:600,title:Y.t("word.Color",g),onApply:x,onClose:w,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:h.jsx(Ld,{color:u??b,onChangeComplete:R=>{d(R.hex),p(!f)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:12,children:h.jsx(Le.Group,{onChange:C,value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("cuboidMenu.OnlyThisSide",g)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("cuboidMenu.AllSidesOfThisCuboid",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("cuboidMenu.AllSidesOfSelectedCuboids",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("cuboidMenu.AllSidesOfAllCuboids",g)})]})})})]})})},vfo="/aladdin/assets/building_facade_01_menu-BAm4EVGn.png",xfo="/aladdin/assets/building_facade_02_menu-BylQ9E0j.png",bfo="/aladdin/assets/building_facade_03_menu-DfU_cdlP.png",Sfo="/aladdin/assets/building_facade_04_menu-Bz2bcbq0.png",Tfo="/aladdin/assets/building_facade_05_menu-hF6OsAF0.png",Pfo="/aladdin/assets/building_facade_06_menu-CUmtyI19.png",Cfo="/aladdin/assets/building_facade_07_menu-B8_DYqYz.png",Rfo="/aladdin/assets/building_facade_08_menu-CTA_rxim.png",Hfo="/aladdin/assets/building_facade_09_menu-BpQDoLbY.png",Mfo="/aladdin/assets/building_facade_10_menu-z_jZrQMT.png",Ifo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(Eb),i=M(Fb),a=M(sYe),l=M(no),s=M(Qn),c=uo(z.Cuboid),[u,d]=m.useState(c&&c.textureTypes&&a>=0?c.textureTypes[a]:Ro.NoTexture),f=$t(),{Option:p}=Uo;m.useEffect(()=>{c&&d(c.textureTypes&&a>=0?c.textureTypes[a]:Ro.NoTexture)},[c,a]);const g=(x,b,R)=>{e(H=>{for(const F of H.elements)if(F.type===z.Cuboid&&F.id===b&&!F.locked){const E=F;E.textureTypes||(E.textureTypes=new Array(6),E.textureTypes.fill(Ro.NoTexture)),E.textureTypes[x]=R;break}})},A=(x,b)=>{e(R=>{for(const H of R.elements)if(H.type===z.Cuboid&&H.id===x&&!H.locked){const F=H;F.textureTypes||(F.textureTypes=new Array(6),F.textureTypes.fill(Ro.NoTexture));for(let E=0;E<4;E++)F.textureTypes[E]=b;break}})},y=(x,b)=>{e(R=>{for(const H of R.elements)if(H.type===z.Cuboid&&!H.locked&&x.has(H.id)){const F=H;if(F.textureTypes||(F.textureTypes=new Array(6),F.textureTypes.fill(Ro.NoTexture)),b!==void 0)for(let E=0;E<4;E++)F.textureTypes[E]=b;else{const E=x.get(H.id);if(E&&E.length>=4)for(let N=0;N<4;N++)F.textureTypes[N]=E[N]}}})},S=x=>{e(b=>{for(const R of b.elements)if(R.type===z.Cuboid&&!R.locked){const H=R;H.textureTypes||(H.textureTypes=new Array(6),H.textureTypes.fill(Ro.NoTexture));for(let F=0;F<4;F++)H.textureTypes[F]=x}})},C=x=>{i(x.target.value)},P=x=>{if(c){switch(r){case re.AllSelectedObjectsOfThisType:for(const b of n)if(b.type===z.Cuboid&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)){const R=b;if(R.textureTypes){for(let H=0;H<4;H++)if(x!==R.textureTypes[H])return!0}}break;case re.AllObjectsOfThisType:for(const b of n)if(b.type===z.Cuboid&&!b.locked){const R=b;if(R.textureTypes){for(let H=0;H<4;H++)if(x!==R.textureTypes[H])return!0}}break;case re.OnlyThisObject:if(c.textureTypes){for(let b=0;b<4;b++)if(x!==c.textureTypes[b])return!0}break;default:if(a>=0&&c.textureTypes&&x!==c.textureTypes[a])return!0}return!1}},v=x=>{if(c&&P(x))switch(r){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of n)if(H.type===z.Cuboid&&M.getState().selectedElementIdSet.has(H.id)){const F=H;b.set(H.id,F.textureTypes?[...F.textureTypes]:void 0)}const R={name:"Set Texture for Selected Cuboids",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())if(F&&Array.isArray(F))for(let E=0;E{y(R.oldValues,R.newValue)}};o(R),y(b,x),s(l+1),e(H=>{H.actionState.cuboidFaceTextures||(H.actionState.cuboidFaceTextures=[Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture]);for(let F=0;F<4;F++)H.actionState.cuboidFaceTextures[F]=x});break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of n)if(H.type===z.Cuboid){const F=H;b.set(H.id,F.textureTypes?[...F.textureTypes]:void 0)}const R={name:"Set Texture for All Cuboids",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())if(F&&Array.isArray(F))for(let E=0;E{S(R.newValue)}};o(R),S(x),s(l+1),e(H=>{H.actionState.cuboidFaceTextures||(H.actionState.cuboidFaceTextures=[Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture]);for(let F=0;F<4;F++)H.actionState.cuboidFaceTextures[F]=x});break}case re.OnlyThisObject:{const b=c.textureTypes?[...c.textureTypes]:void 0,R={name:"Set Texture for All Sides of Selected Cuboid",timestamp:Date.now(),oldValue:b,newValue:x,changedElementId:c.id,changedElementType:c.type,undo:()=>{if(R.oldValue&&Array.isArray(R.oldValue))for(let H=0;H{A(R.changedElementId,R.newValue)}};o(R),A(c.id,x),s(l+1),e(H=>{H.actionState.cuboidFaceTextures||(H.actionState.cuboidFaceTextures=[Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture]);for(let F=0;F<4;F++)H.actionState.cuboidFaceTextures[F]=x});break}default:{if(a>=0){const b=c.textureTypes?c.textureTypes[a]:Ro.NoTexture,R={name:"Set Texture for Selected Side of Cuboid",timestamp:Date.now(),oldValue:b,newValue:x,changedElementId:c.id,changedElementType:c.type,changedSideIndex:a,undo:()=>{R.changedSideIndex!==void 0&&g(R.changedSideIndex,R.changedElementId,R.oldValue)},redo:()=>{R.changedSideIndex!==void 0&&g(R.changedSideIndex,R.changedElementId,R.newValue)}};o(R),g(a,c.id,x),s(l+1),e(H=>{H.actionState.cuboidFaceTextures||(H.actionState.cuboidFaceTextures=[Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture]),H.actionState.cuboidFaceTextures[a]=x})}break}}},T=()=>{c!=null&&c.textureTypes&&a>=0&&d(c.textureTypes[a]),t(!1)},w=()=>{v(u)};return h.jsx(so,{width:600,title:Y.t("word.Texture",f),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:h.jsxs(Uo,{style:{width:"150px"},value:u,onChange:d,children:[h.jsxs(p,{value:Ro.NoTexture,children:[h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"12px",width:"32px",height:"20px",border:"1px dashed dimGray"},children:" "}),Y.t("shared.NoTexture",f)]},Ro.NoTexture),h.jsxs(p,{value:Ro.Facade01,children:[h.jsx("img",{alt:Ro.Facade01,src:vfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture01",f)]},Ro.Facade01),h.jsxs(p,{value:Ro.Facade02,children:[h.jsx("img",{alt:Ro.Facade02,src:xfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture02",f)]},Ro.Facade02),h.jsxs(p,{value:Ro.Facade03,children:[h.jsx("img",{alt:Ro.Facade03,src:bfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture03",f)]},Ro.Facade03),h.jsxs(p,{value:Ro.Facade04,children:[h.jsx("img",{alt:Ro.Facade04,src:Sfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture04",f)]},Ro.Facade04),h.jsxs(p,{value:Ro.Facade05,children:[h.jsx("img",{alt:Ro.Facade05,src:Tfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture05",f)]},Ro.Facade05),h.jsxs(p,{value:Ro.Facade06,children:[h.jsx("img",{alt:Ro.Facade06,src:Pfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture06",f)]},Ro.Facade06),h.jsxs(p,{value:Ro.Facade07,children:[h.jsx("img",{alt:Ro.Facade07,src:Cfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture07",f)]},Ro.Facade07),h.jsxs(p,{value:Ro.Facade08,children:[h.jsx("img",{alt:Ro.Facade08,src:Rfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture08",f)]},Ro.Facade08),h.jsxs(p,{value:Ro.Facade09,children:[h.jsx("img",{alt:Ro.Facade09,src:Hfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture09",f)]},Ro.Facade09),h.jsxs(p,{value:Ro.Facade10,children:[h.jsx("img",{alt:Ro.Facade10,src:Mfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture10",f)]},Ro.Facade10)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:12,children:h.jsx(Le.Group,{onChange:C,value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("cuboidMenu.OnlyThisSide",f)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("cuboidMenu.AllSidesOfThisCuboid",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("cuboidMenu.AllSidesOfSelectedCuboids",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("cuboidMenu.AllSidesOfAllCuboids",f)})]})})})]})})},zfo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(kH),r=M(cYe),i=M(d3),a=M(kw),l=M(u3),s=M(En),c=M(Eb),u=M(Fb),d=M(pn),f=M(no),p=M(Qn),g=M(Xi),A=uo(z.Cuboid),[y,S]=m.useState((A==null?void 0:A.lx)??0),C=m.useRef(new Map),P=m.useRef(new Map),v=m.useRef(new Map),T=m.useRef(new Map),w=m.useRef(new Map),x=m.useRef(new Map),b=m.useRef(new Map),R=m.useRef(new Map),H=m.useRef(!1),F=m.useRef(),E=$t(),N=Z=>{u(Z.target.value)},U=Z=>{if(A){switch(c){case re.AllSelectedObjectsOfThisType:{for(const ee of e)if(ee.type===z.Cuboid&&M.getState().selectedElementIdSet.has(ee.id)){const te=ee,oe=o(te.id);if(oe.length>0&&!ye.doesNewSizeContainAllChildren(te,oe,Z,te.ly))return!1}break}case re.AllObjectsOfThisType:{for(const ee of e)if(ee.type===z.Cuboid){const te=ee,oe=o(te.id);if(oe.length>0&&!ye.doesNewSizeContainAllChildren(te,oe,Z,te.ly))return!1}break}default:{const ee=o(A.id);if(ee.length>0)return ye.doesNewSizeContainAllChildren(A,ee,Z,A.ly);break}}return!0}},W=Z=>!U(Z),k=Z=>{if(A){switch(c){case re.AllSelectedObjectsOfThisType:for(const ee of e)if(ee.type===z.Cuboid&&!ee.locked&&M.getState().selectedElementIdSet.has(ee.id)&&Math.abs(ee.lx-Z)>Et)return!0;break;case re.AllObjectsOfThisType:for(const ee of e)if(ee.type===z.Cuboid&&!ee.locked&&Math.abs(ee.lx-Z)>Et)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const ee of e)if(ee.type===z.Cuboid&&ee.parentId===(A==null?void 0:A.parentId)&&!ee.locked&&Math.abs(ee.lx-Z)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:break;default:if(Math.abs((A==null?void 0:A.lx)-Z)>Et)return!0}return!1}},D=(Z,ee)=>{if(Z==null)return null;for(const te of Z.children)if(te.name.includes(`${ee}`))return te;return null},L=(Z,ee,te)=>{var oe,de;if(Z){for(const he of Z.children)if(he.name.includes(`${te.id}`)){(de=(oe=kn.getState().contentRef)==null?void 0:oe.current)==null||de.add(he);break}d(he=>{for(const pe of he.elements)if(pe.id===te.id){pe.parentId=Zo;const me=new Kt(pe.cx,pe.cy).rotateAround(ai,ee.rotation[2]).add(new Kt(ee.cx,ee.cy));pe.cx=me.x,pe.cy=me.y,pe.cz=0,T.current.set(pe.id,new ae(me.x,me.y,0)),P.current.set(pe.id,Zo);break}})}},j=Z=>{for(const ee of e)ee.type===z.Cuboid&&!ee.locked&&ee.parentId===(A==null?void 0:A.parentId)&&B(ee,Z)},B=(Z,ee)=>{const te=o(Z.id),oe=Z.rotation[2];if(w.current.clear(),R.current.clear(),te.length>0)for(const de of te){if(ye.isIdentical(de.normal,as))switch(de.type){case z.Sensor:{const he=new Kt(de.cx*Z.lx,de.cy*Z.ly).rotateAround(ai,oe);w.current.set(de.id,he),v.current.set(de.id,new ae(de.cx,de.cy));break}case z.Polygon:{const he=de,pe=[];for(const me of he.vertices)pe.push(new Kt(me.x*Z.lx,me.y*Z.ly).rotateAround(ai,oe));R.current.set(de.id,pe),x.current.set(de.id,he.vertices.map(me=>({...me})));break}}else de.type===z.SolarPanel&&(ye.isEqual(de.normal[0],-1)||ye.isEqual(de.normal[0],1))&&v.current.set(de.id,new ae(de.cx,de.cy,de.cz));ye.isPlantOrHuman(de)&&v.current.set(de.id,new ae(de.cx,de.cy,de.cz))}if(i(Z.id,ee),te.length>0)for(const de of te){if(ye.isIdentical(de.normal,as))switch(de.type){case z.Sensor:{const he=w.current.get(de.id);if(he){const me=new Kt(he.x,he.y).rotateAround(ai,-oe).x/ee;r(de.id,me),T.current.set(de.id,new ae(me,de.cy))}break}case z.Polygon:{const he=R.current.get(de.id);if(he){const pe=[];for(const me of he){const le=me.rotateAround(ai,-oe),Te=le.x/ee,ge=le.y/Z.ly;pe.push({x:Te,y:ge})}a(de.id,pe),b.current.set(de.id,pe.map(me=>({...me})))}break}}else de.type===z.SolarPanel&&(ye.isEqual(de.normal[0],-1)&&(r(de.id,-ee/2),T.current.set(de.id,new ae(-ee/2,de.cy,de.cz))),ye.isEqual(de.normal[0],1)&&(r(de.id,ee/2),T.current.set(de.id,new ae(ee/2,de.cy,de.cz))));if(ye.isPlantOrHuman(de)){if(T.current.set(de.id,new ae(de.cx,de.cy,de.cz)),C.current.set(de.id,Z.id),Math.abs(de.cz-Z.lz/2)0){const he=kn.getState().contentRef,pe=D(he==null?void 0:he.current,Z.id);L(pe,Z,de)}}else if(Math.abs(Math.abs(de.cx)-Z.lx/2)0?ee:-ee)/2;r(de.id,he),T.current.set(de.id,new ae(he,de.cy,de.cz))}}}},O=(Z,ee,te)=>{if(!Z||!ee)return;const oe=kn.getState().contentRef,de=D(oe==null?void 0:oe.current,ee),he=D(ee===Zo?oe==null?void 0:oe.current:de,te);if(he&&(oe!=null&&oe.current)){if(Z===Zo)oe.current.add(he);else{const pe=D(oe.current,Z);pe==null||pe.add(he)}op()}},V=(Z,ee)=>{Z&&d(te=>{for(const oe of te.elements)if(oe.id===ee){oe.parentId=Z;break}})},G=Z=>{if(!A||!k(Z))return;const ee=n(A.id),te=ee?ee.lx:A.lx;if(F.current=void 0,H.current=W(Z),H.current)F.current=Z,S(te);else switch(c){case re.AllSelectedObjectsOfThisType:{const oe=new Map;for(const he of e)he.type===z.Cuboid&&!he.locked&&M.getState().selectedElementIdSet.has(he.id)&&(oe.set(he.id,he.lx),B(he,Z));const de={name:"Set Length for Selected Cuboids",timestamp:Date.now(),oldSizes:oe,newSize:Z,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())i(me,le);if(de.oldChildrenPositionsMap&&de.oldChildrenPositionsMap.size>0)for(const[me,le]of de.oldChildrenPositionsMap.entries()){l(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(Te,ge,me),V(Te,me))}if(de.oldChildrenVerticesMap&&de.oldChildrenVerticesMap.size>0)for(const[me,le]of de.oldChildrenVerticesMap.entries())a(me,le)},redo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())i(me,de.newSize);if(de.newChildrenPositionsMap&&de.newChildrenPositionsMap.size>0)for(const[me,le]of de.newChildrenPositionsMap.entries()){l(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(ge,Te,me),V(ge,me))}if(de.newChildrenVerticesMap&&de.newChildrenVerticesMap.size>0)for(const[me,le]of de.newChildrenVerticesMap.entries())a(me,le)}};s(de),p(f+1);break}case re.AllObjectsOfThisTypeOnSurface:{const oe=new Map;for(const he of e)he.type===z.Cuboid&&he.parentId===A.parentId&&!he.locked&&(oe.set(he.id,he.lx),B(he,Z));const de={name:"Set Length for All Cuboids on Surface",timestamp:Date.now(),oldSizes:oe,newSize:Z,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())i(me,le);if(de.oldChildrenPositionsMap&&de.oldChildrenPositionsMap.size>0)for(const[me,le]of de.oldChildrenPositionsMap.entries()){l(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(Te,ge,me),V(Te,me))}if(de.oldChildrenVerticesMap&&de.oldChildrenVerticesMap.size>0)for(const[me,le]of de.oldChildrenVerticesMap.entries())a(me,le)},redo:()=>{var he,pe;if(j(de.newSize),de.newChildrenPositionsMap&&de.newChildrenPositionsMap.size>0)for(const[me,le]of de.newChildrenPositionsMap.entries()){l(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(ge,Te,me),V(ge,me))}if(de.newChildrenVerticesMap&&de.newChildrenVerticesMap.size>0)for(const[me,le]of de.newChildrenVerticesMap.entries())a(me,le)}};s(de),p(f+1);break}case re.AllObjectsOfThisType:{const oe=new Map;for(const he of e)he.type===z.Cuboid&&!he.locked&&(oe.set(he.id,he.lx),B(he,Z));const de={name:"Set Length for All Cuboids",timestamp:Date.now(),oldSizes:oe,newSize:Z,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())i(me,le);if(de.oldChildrenPositionsMap&&de.oldChildrenPositionsMap.size>0)for(const[me,le]of de.oldChildrenPositionsMap.entries()){l(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(Te,ge,me),V(Te,me))}if(de.oldChildrenVerticesMap&&de.oldChildrenVerticesMap.size>0)for(const[me,le]of de.oldChildrenVerticesMap.entries())a(me,le)},redo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())i(me,de.newSize);if(de.newChildrenPositionsMap&&de.newChildrenPositionsMap.size>0)for(const[me,le]of de.newChildrenPositionsMap.entries()){l(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(ge,Te,me),V(ge,me))}if(de.newChildrenVerticesMap&&de.newChildrenVerticesMap.size>0)for(const[me,le]of de.newChildrenVerticesMap.entries())a(me,le)}};s(de),p(f+1);break}case re.AllObjectsOfThisTypeAboveFoundation:break;default:{B(A,Z);const oe={name:"Set Cuboid Length",timestamp:Date.now(),oldSize:te,newSize:Z,resizedElementId:A.id,resizedElementType:A.type,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var de,he;if(i(A.id,oe.oldSize),oe.oldChildrenPositionsMap&&oe.oldChildrenPositionsMap.size>0)for(const[pe,me]of oe.oldChildrenPositionsMap.entries()){l(pe,me.x,me.y,me.z);const le=(de=oe.oldChildrenParentIdMap)==null?void 0:de.get(pe),Te=(he=oe.newChildrenParentIdMap)==null?void 0:he.get(pe);le&&Te&&le!==Te&&(O(le,Te,pe),V(le,pe))}if(oe.oldChildrenVerticesMap&&oe.oldChildrenVerticesMap.size>0)for(const[pe,me]of oe.oldChildrenVerticesMap.entries())a(pe,me)},redo:()=>{var de,he;if(i(A.id,oe.newSize),oe.newChildrenPositionsMap&&oe.newChildrenPositionsMap.size>0)for(const[pe,me]of oe.newChildrenPositionsMap.entries()){l(pe,me.x,me.y,me.z);const le=(de=oe.oldChildrenParentIdMap)==null?void 0:de.get(pe),Te=(he=oe.newChildrenParentIdMap)==null?void 0:he.get(pe);le&&Te&&le!==Te&&(O(Te,le,pe),V(Te,pe))}if(oe.newChildrenVerticesMap&&oe.newChildrenVerticesMap.size>0)for(const[pe,me]of oe.newChildrenVerticesMap.entries())a(pe,me)}};s(oe),p(f+1);break}}},Q=()=>{t(!1)},$=()=>{Q(),g()},ie=()=>{G(y),H.current||(t(!1),p(0))},q=()=>{G(y)},se=H.current?": "+Y.t("message.NotApplicableToSelectedAction",E)+(F.current!==void 0?" ("+F.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("word.Length",E),rejectedMessage:se,onApply:q,onClose:Q,onClickCancel:$,onClickOk:ie,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:500,style:{width:120},step:.5,precision:2,value:y,onChange:Z=>{Z!==null&&S(Z)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",E),": [0.1, 500] ",Y.t("word.MeterAbbreviation",E)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",E)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:N,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("cuboidMenu.OnlyThisCuboid",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("cuboidMenu.AllCuboidsOnSameSurface",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("cuboidMenu.AllSelectedCuboids",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("cuboidMenu.AllCuboids",E)})]})})})]})})},Dfo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(kH),r=M(u3),i=M(uYe),a=M(Fw),l=M(kw),s=M(En),c=M(Eb),u=M(Fb),d=M(pn),f=M(no),p=M(Qn),g=M(Xi),A=uo(z.Cuboid),[y,S]=m.useState((A==null?void 0:A.ly)??0),C=m.useRef(new Map),P=m.useRef(new Map),v=m.useRef(new Map),T=m.useRef(new Map),w=m.useRef(new Map),x=m.useRef(new Map),b=m.useRef(new Map),R=m.useRef(new Map),H=m.useRef(!1),F=m.useRef(),E=$t(),N=Z=>{u(Z.target.value)},U=Z=>{if(A){switch(c){case re.AllSelectedObjectsOfThisType:{for(const ee of e)if(ee.type===z.Cuboid&&M.getState().selectedElementIdSet.has(ee.id)){const te=ee,oe=o(te.id);if(oe.length>0&&!ye.doesNewSizeContainAllChildren(te,oe,te.lx,Z))return!1}break}case re.AllObjectsOfThisType:{for(const ee of e)if(ee.type===z.Cuboid){const te=ee,oe=o(te.id);if(oe.length>0&&!ye.doesNewSizeContainAllChildren(te,oe,te.lx,Z))return!1}break}default:{const ee=o(A.id);if(ee.length>0)return ye.doesNewSizeContainAllChildren(A,ee,A.lx,Z);break}}return!0}},W=Z=>!U(Z),k=Z=>{if(A){switch(c){case re.AllSelectedObjectsOfThisType:for(const ee of e)if(ee.type===z.Cuboid&&!ee.locked&&M.getState().selectedElementIdSet.has(ee.id)&&Math.abs(ee.ly-Z)>Et)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const ee of e)if(ee.type===z.Cuboid&&ee.parentId===(A==null?void 0:A.parentId)&&!ee.locked&&Math.abs(ee.ly-Z)>Et)return!0;break;case re.AllObjectsOfThisType:{for(const ee of e)if(ee.type===z.Cuboid&&!ee.locked&&Math.abs(ee.ly-Z)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:break;default:if(Math.abs((A==null?void 0:A.ly)-Z)>Et)return!0}return!1}},D=(Z,ee)=>{if(Z==null)return null;for(const te of Z.children)if(te.name.includes(`${ee}`))return te;return null},L=(Z,ee,te)=>{var oe,de;if(Z){for(const he of Z.children)if(he.name.includes(`${te.id}`)){(de=(oe=kn.getState().contentRef)==null?void 0:oe.current)==null||de.add(he);break}d(he=>{for(const pe of he.elements)if(pe.id===te.id){pe.parentId=Zo;const me=new Kt(pe.cx,pe.cy).rotateAround(ai,ee.rotation[2]).add(new Kt(ee.cx,ee.cy));pe.cx=me.x,pe.cy=me.y,pe.cz=0,T.current.set(pe.id,new ae(me.x,me.y,0)),P.current.set(pe.id,Zo);break}})}},j=Z=>{for(const ee of e)ee.type===z.Cuboid&&!ee.locked&&ee.parentId===(A==null?void 0:A.parentId)&&B(ee,Z)},B=(Z,ee)=>{const te=o(Z.id),oe=Z.rotation[2];if(w.current.clear(),R.current.clear(),te.length>0)for(const de of te){if(ye.isIdentical(de.normal,as))switch(de.type){case z.Sensor:{const he=new Kt(de.cx*Z.lx,de.cy*Z.ly).rotateAround(ai,oe);w.current.set(de.id,he),v.current.set(de.id,new ae(de.cx,de.cy));break}case z.Polygon:{const he=de,pe=[];for(const me of he.vertices)pe.push(new Kt(me.x*Z.lx,me.y*Z.ly).rotateAround(ai,oe));R.current.set(de.id,pe),x.current.set(de.id,he.vertices.map(me=>({...me})));break}}else de.type===z.SolarPanel&&(ye.isEqual(de.normal[1],-1)||ye.isEqual(de.normal[1],1))&&v.current.set(de.id,new ae(de.cx,de.cy,de.cz));ye.isPlantOrHuman(de)&&v.current.set(de.id,new ae(de.cx,de.cy,de.cz))}if(a(Z.id,ee),te.length>0)for(const de of te){if(ye.isIdentical(de.normal,as))switch(de.type){case z.Sensor:{const he=w.current.get(de.id);if(he){const me=new Kt(he.x,he.y).rotateAround(ai,-oe).y/ee;i(de.id,me),T.current.set(de.id,new ae(de.cx,me))}break}case z.Polygon:{const he=R.current.get(de.id);if(he){const pe=[];for(const me of he){const le=me.rotateAround(ai,-oe),Te=le.x/Z.lx,ge=le.y/ee;pe.push({x:Te,y:ge})}l(de.id,pe),b.current.set(de.id,pe.map(me=>({...me})))}break}}else de.type===z.SolarPanel&&(ye.isEqual(de.normal[1],-1)&&(i(de.id,-ee/2),T.current.set(de.id,new ae(de.cx,-ee/2,de.cz))),ye.isEqual(de.normal[1],1)&&(i(de.id,ee/2),T.current.set(de.id,new ae(de.cx,ee/2,de.cz))));if(ye.isPlantOrHuman(de)){if(T.current.set(de.id,new ae(de.cx,de.cy,de.cz)),C.current.set(de.id,Z.id),Math.abs(de.cz-Z.lz/2)0){const he=kn.getState().contentRef,pe=D(he==null?void 0:he.current,Z.id);L(pe,Z,de)}}else if(Math.abs(Math.abs(de.cy)-Z.ly/2)0?ee:-ee)/2;i(de.id,he),T.current.set(de.id,new ae(de.cz,he,de.cz))}}}},O=(Z,ee,te)=>{if(!Z||!ee)return;const oe=kn.getState().contentRef,de=D(oe==null?void 0:oe.current,ee),he=D(ee===Zo?oe==null?void 0:oe.current:de,te);if(he&&(oe!=null&&oe.current)){if(Z===Zo)oe.current.add(he);else{const pe=D(oe.current,Z);pe==null||pe.add(he)}op()}},V=(Z,ee)=>{Z&&d(te=>{for(const oe of te.elements)if(oe.id===ee){oe.parentId=Z;break}})},G=Z=>{if(!A||!k(Z))return;const ee=n(A.id),te=ee?ee.ly:A.ly;if(F.current=void 0,H.current=W(Z),H.current)F.current=Z,S(te);else switch(v.current.clear(),T.current.clear(),x.current.clear(),b.current.clear(),c){case re.AllSelectedObjectsOfThisType:{const oe=new Map;for(const he of e)he.type===z.Cuboid&&!he.locked&&M.getState().selectedElementIdSet.has(he.id)&&(oe.set(he.id,he.ly),B(he,Z));const de={name:"Set Width for Selected Cuboids on Surface",timestamp:Date.now(),oldSizes:oe,newSize:Z,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())a(me,le);if(de.oldChildrenPositionsMap&&de.oldChildrenPositionsMap.size>0)for(const[me,le]of de.oldChildrenPositionsMap.entries()){r(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(Te,ge,me),V(Te,me))}if(de.oldChildrenVerticesMap&&de.oldChildrenVerticesMap.size>0)for(const[me,le]of de.oldChildrenVerticesMap.entries())l(me,le)},redo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())a(me,de.newSize);if(de.newChildrenPositionsMap&&de.newChildrenPositionsMap.size>0)for(const[me,le]of de.newChildrenPositionsMap.entries()){r(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(ge,Te,me),V(ge,me))}if(de.newChildrenVerticesMap&&de.newChildrenVerticesMap.size>0)for(const[me,le]of de.newChildrenVerticesMap.entries())l(me,le)}};s(de),p(f+1);break}case re.AllObjectsOfThisTypeOnSurface:{const oe=new Map;for(const he of e)he.type===z.Cuboid&&he.parentId===A.parentId&&!he.locked&&(oe.set(he.id,he.ly),B(he,Z));const de={name:"Set Width for All Cuboids on Surface",timestamp:Date.now(),oldSizes:oe,newSize:Z,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())a(me,le);if(de.oldChildrenPositionsMap&&de.oldChildrenPositionsMap.size>0)for(const[me,le]of de.oldChildrenPositionsMap.entries()){r(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(Te,ge,me),V(Te,me))}if(de.oldChildrenVerticesMap&&de.oldChildrenVerticesMap.size>0)for(const[me,le]of de.oldChildrenVerticesMap.entries())l(me,le)},redo:()=>{var he,pe;if(j(de.newSize),de.newChildrenPositionsMap&&de.newChildrenPositionsMap.size>0)for(const[me,le]of de.newChildrenPositionsMap.entries()){r(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(ge,Te,me),V(ge,me))}if(de.newChildrenVerticesMap&&de.newChildrenVerticesMap.size>0)for(const[me,le]of de.newChildrenVerticesMap.entries())l(me,le)}};s(de),p(f+1);break}case re.AllObjectsOfThisType:{const oe=new Map;for(const he of e)he.type===z.Cuboid&&!he.locked&&(oe.set(he.id,he.ly),B(he,Z));const de={name:"Set Width for All Cuboids on Surface",timestamp:Date.now(),oldSizes:oe,newSize:Z,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())a(me,le);if(de.oldChildrenPositionsMap&&de.oldChildrenPositionsMap.size>0)for(const[me,le]of de.oldChildrenPositionsMap.entries()){r(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(Te,ge,me),V(Te,me))}if(de.oldChildrenVerticesMap&&de.oldChildrenVerticesMap.size>0)for(const[me,le]of de.oldChildrenVerticesMap.entries())l(me,le)},redo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())a(me,de.newSize);if(de.newChildrenPositionsMap&&de.newChildrenPositionsMap.size>0)for(const[me,le]of de.newChildrenPositionsMap.entries()){r(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(ge,Te,me),V(ge,me))}if(de.newChildrenVerticesMap&&de.newChildrenVerticesMap.size>0)for(const[me,le]of de.newChildrenVerticesMap.entries())l(me,le)}};s(de),p(f+1);break}case re.AllObjectsOfThisTypeAboveFoundation:break;default:{B(A,Z);const oe={name:"Set Cuboid Width",timestamp:Date.now(),oldSize:te,newSize:Z,resizedElementId:A.id,resizedElementType:A.type,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var de,he;if(a(A.id,oe.oldSize),oe.oldChildrenPositionsMap&&oe.oldChildrenPositionsMap.size>0)for(const[pe,me]of oe.oldChildrenPositionsMap.entries()){r(pe,me.x,me.y,me.z);const le=(de=oe.oldChildrenParentIdMap)==null?void 0:de.get(pe),Te=(he=oe.newChildrenParentIdMap)==null?void 0:he.get(pe);le&&Te&&le!==Te&&(O(le,Te,pe),V(le,pe))}if(oe.oldChildrenVerticesMap&&oe.oldChildrenVerticesMap.size>0)for(const[pe,me]of oe.oldChildrenVerticesMap.entries())l(pe,me)},redo:()=>{var de,he;if(a(A.id,oe.newSize),oe.newChildrenPositionsMap&&oe.newChildrenPositionsMap.size>0)for(const[pe,me]of oe.newChildrenPositionsMap.entries()){r(pe,me.x,me.y,me.z);const le=(de=oe.oldChildrenParentIdMap)==null?void 0:de.get(pe),Te=(he=oe.newChildrenParentIdMap)==null?void 0:he.get(pe);le&&Te&&le!==Te&&(O(Te,le,pe),V(Te,pe))}if(oe.newChildrenVerticesMap&&oe.newChildrenVerticesMap.size>0)for(const[pe,me]of oe.newChildrenVerticesMap.entries())l(pe,me)}};s(oe),p(f+1);break}}},Q=()=>{t(!1)},$=()=>{Q(),g()},ie=()=>{G(y),H.current||(t(!1),p(0))},q=()=>{G(y)},se=H.current?": "+Y.t("message.NotApplicableToSelectedAction",E)+(F.current!==void 0?" ("+F.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("word.Width",E),rejectedMessage:se,onApply:q,onClose:Q,onClickCancel:$,onClickOk:ie,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:500,style:{width:120},step:.5,precision:2,value:y,onChange:Z=>{Z!==null&&S(Z)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",E),": [0.1, 500] ",Y.t("word.MeterAbbreviation",E)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",E)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:N,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("cuboidMenu.OnlyThisCuboid",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("cuboidMenu.AllCuboidsOnSameSurface",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("cuboidMenu.AllSelectedCuboids",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("cuboidMenu.AllCuboids",E)})]})})})]})})},Efo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Gr),r=M(Jn),i=M(jge),a=M(Gwt),l=M(Jwt),s=M(Xwt),c=M(En),u=M(Eb),d=M(Fb),f=M(u3),p=M(no),g=M(Qn),A=uo(z.Cuboid),[y,S]=m.useState((A==null?void 0:A.lz)??0),C=m.useRef(new Map),P=m.useRef(new Map),v=m.useRef(new Map),T=m.useRef(new Map),w=$t(),x=O=>{d(O.target.value)},b=(O,V)=>{i(O,V),a(O,V/2)},R=O=>{if(!A)return;const V=o(A);if(V)for(const G of n)G.type===z.Cuboid&&!G.locked&&G.parentId===V.id&&(i(G.id,O),a(G.id,O/2))},H=O=>{if(!A)return;const V=ye.getBaseId(A.id);if(V)for(const G of n)G.type===z.Cuboid&&!G.locked&&ye.getBaseId(G.id)===V&&(i(G.id,O),a(G.id,O/2))},F=O=>{if(A){switch(u){case re.AllSelectedObjectsOfThisType:{for(const V of n)if(V.type===z.Cuboid&&!V.locked&&M.getState().selectedElementIdSet.has(V.id)&&Math.abs(V.lz-O)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const V of n)if(V.type===z.Cuboid&&!V.locked&&Math.abs(V.lz-O)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{const V=ye.getBaseId(A==null?void 0:A.id);if(V&&V!==Zo){for(const G of n)if(G.type===z.Cuboid&&G.parentId&&G.parentId!==Zo&&!G.locked){const Q=G;if(V===ye.getBaseId(Q.id)&&Math.abs(Q.lz-O)>Et)return!0}}break}case re.AllObjectsOfThisTypeOnSurface:{for(const V of n)if(V.type===z.Cuboid&&V.parentId!==Zo&&V.parentId===(A==null?void 0:A.parentId)&&!V.locked&&Math.abs(V.lz-O)>Et)return!0;break}default:{if(Math.abs((A==null?void 0:A.lz)-O)>Et)return!0;break}}return!1}},E=(O,V)=>{if(O==null)return null;for(const G of O.children)if(G.name.includes(`${V}`))return G;return null},N=(O,V,G)=>{var Q,$;if(O){for(const q of O.children)if(q.name.includes(`${G.id}`)){($=(Q=kn.getState().contentRef)==null?void 0:Q.current)==null||$.add(q);break}G.parentId=Zo;const ie=new Kt(G.cx,G.cy).rotateAround(ai,-V.rotation[2]).add(new Kt(V.cx,V.cy));G.cx=ie.x,G.cy=ie.y,G.cz=0,T.current.set(G.id,new ae(ie.x,ie.y,0)),P.current.set(G.id,Zo)}},U=(O,V)=>{e(G=>{for(const Q of G.elements)if(Q.parentId===O.id)if(C.current.set(Q.id,O.id),v.current.set(Q.id,new ae(Q.cx,Q.cy,Q.cz)),ye.isPlantOrHuman(Q))if(Math.abs(Q.cz-O.lz/2)V/2){const ie=kn.getState().contentRef,q=E(ie==null?void 0:ie.current,O.id);N(q,O,Q)}else Q.cz=$,T.current.set(Q.id,new ae(Q.cx,Q.cy,$))}else Q.type===z.SolarPanel&&ye.isEqual(Q.normal[2],1)&&(Q.cz=V/2,T.current.set(Q.id,new ae(Q.cx,Q.cy,V/2)))})},W=(O,V,G)=>{if(!O||!V)return;const Q=kn.getState().contentRef,$=E(Q==null?void 0:Q.current,V),ie=E(V===Zo?Q==null?void 0:Q.current:$,G);if(ie&&(Q!=null&&Q.current)){if(O===Zo)Q.current.add(ie);else{const q=E(Q.current,O);q==null||q.add(ie)}op()}},k=(O,V)=>{O&&e(G=>{for(const Q of G.elements)if(Q.id===V){Q.parentId=O;break}})},D=(O,V)=>{M.getState().set(G=>{for(const Q of G.elements)if(O.has(Q.id))if(V!==void 0)Q.lz=V,Q.cz=V/2;else{const $=O.get(Q.id);$!==void 0&&(Q.lz=$,Q.cz=$/2)}})},L=O=>{if(A&&F(O)){switch(u){case re.AllSelectedObjectsOfThisType:{const V=new Map;for(const Q of n)Q.type===z.Cuboid&&M.getState().selectedElementIdSet.has(Q.id)&&(V.set(Q.id,Q.lz),U(Q,O));const G={name:"Set Height for Selected Cuboids",timestamp:Date.now(),oldValues:V,newValue:O,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var Q,$;if(D(G.oldValues),G.oldChildrenPositionsMap&&G.oldChildrenPositionsMap.size>0)for(const[ie,q]of G.oldChildrenPositionsMap.entries()){f(ie,q.x,q.y,q.z);const se=(Q=G.oldChildrenParentIdMap)==null?void 0:Q.get(ie),Z=($=G.newChildrenParentIdMap)==null?void 0:$.get(ie);se&&Z&&se!==Z&&(W(se,Z,ie),k(se,ie))}},redo:()=>{var $,ie;const Q=G.newValue;if(D(G.oldValues,Q),G.newChildrenPositionsMap&&G.newChildrenPositionsMap.size>0)for(const[q,se]of G.newChildrenPositionsMap.entries()){f(q,se.x,se.y,se.z);const Z=($=G.oldChildrenParentIdMap)==null?void 0:$.get(q),ee=(ie=G.newChildrenParentIdMap)==null?void 0:ie.get(q);Z&&ee&&Z!==ee&&(W(ee,Z,q),k(ee,q))}}};c(G),D(V,O),g(p+1);break}case re.AllObjectsOfThisType:{const V=new Map;for(const Q of n)Q.type===z.Cuboid&&(V.set(Q.id,Q.lz),U(Q,O));const G={name:"Set Height for All Cuboids",timestamp:Date.now(),oldValues:V,newValue:O,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var Q,$;for(const[ie,q]of G.oldValues.entries())b(ie,q);if(G.oldChildrenPositionsMap&&G.oldChildrenPositionsMap.size>0)for(const[ie,q]of G.oldChildrenPositionsMap.entries()){f(ie,q.x,q.y,q.z);const se=(Q=G.oldChildrenParentIdMap)==null?void 0:Q.get(ie),Z=($=G.newChildrenParentIdMap)==null?void 0:$.get(ie);se&&Z&&se!==Z&&(W(se,Z,ie),k(se,ie))}},redo:()=>{var $,ie;const Q=G.newValue;if(l(z.Cuboid,Q),s(z.Cuboid,Q/2),G.newChildrenPositionsMap&&G.newChildrenPositionsMap.size>0)for(const[q,se]of G.newChildrenPositionsMap.entries()){f(q,se.x,se.y,se.z);const Z=($=G.oldChildrenParentIdMap)==null?void 0:$.get(q),ee=(ie=G.newChildrenParentIdMap)==null?void 0:ie.get(q);Z&&ee&&Z!==ee&&(W(ee,Z,q),k(ee,q))}}};c(G),l(z.Cuboid,O),s(z.Cuboid,O/2),g(p+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{const V=new Map,G=ye.getBaseId(A.id);for(const $ of n)$.type===z.Cuboid&&ye.getBaseId($.id)===G&&(V.set($.id,$.lz),U($,O));const Q={name:"Set Height for All Cuboids Above Same Base",timestamp:Date.now(),oldValues:V,newValue:O,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var $,ie;for(const[q,se]of Q.oldValues.entries())b(q,se);if(Q.oldChildrenPositionsMap&&Q.oldChildrenPositionsMap.size>0)for(const[q,se]of Q.oldChildrenPositionsMap.entries()){f(q,se.x,se.y,se.z);const Z=($=Q.oldChildrenParentIdMap)==null?void 0:$.get(q),ee=(ie=Q.newChildrenParentIdMap)==null?void 0:ie.get(q);Z&&ee&&Z!==ee&&(W(Z,ee,q),k(Z,q))}},redo:()=>{var ie,q;const $=Q.newValue;if(H($),Q.newChildrenPositionsMap&&Q.newChildrenPositionsMap.size>0)for(const[se,Z]of Q.newChildrenPositionsMap.entries()){f(se,Z.x,Z.y,Z.z);const ee=(ie=Q.oldChildrenParentIdMap)==null?void 0:ie.get(se),te=(q=Q.newChildrenParentIdMap)==null?void 0:q.get(se);ee&&te&&ee!==te&&(W(te,ee,se),k(te,se))}}};c(Q),H(O),g(p+1);break}case re.AllObjectsOfThisTypeOnSurface:{const V=new Map;for(const Q of n)Q.type===z.Cuboid&&Q.parentId===A.parentId&&(V.set(Q.id,Q.lz),U(Q,O));const G={name:"Set Height for All Cuboids on Same Surface",timestamp:Date.now(),oldValues:V,newValue:O,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var Q,$;for(const[ie,q]of G.oldValues.entries())b(ie,q);if(G.oldChildrenPositionsMap&&G.oldChildrenPositionsMap.size>0)for(const[ie,q]of G.oldChildrenPositionsMap.entries()){f(ie,q.x,q.y,q.z);const se=(Q=G.oldChildrenParentIdMap)==null?void 0:Q.get(ie),Z=($=G.newChildrenParentIdMap)==null?void 0:$.get(ie);se&&Z&&se!==Z&&(W(se,Z,ie),k(se,ie))}},redo:()=>{var $,ie;const Q=G.newValue;if(R(Q),G.newChildrenPositionsMap&&G.newChildrenPositionsMap.size>0)for(const[q,se]of G.newChildrenPositionsMap.entries()){f(q,se.x,se.y,se.z);const Z=($=G.oldChildrenParentIdMap)==null?void 0:$.get(q),ee=(ie=G.newChildrenParentIdMap)==null?void 0:ie.get(q);Z&&ee&&Z!==ee&&(W(ee,Z,q),k(ee,q))}}};c(G),R(O),g(p+1);break}default:{const V=r(A.id),G=V?V.lz:A.lz;U(A,O),b(A.id,O);const Q={name:"Set Cuboid Width",timestamp:Date.now(),oldValue:G,newValue:O,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),changedElementId:A.id,changedElementType:A.type,undo:()=>{var $,ie;if(b(Q.changedElementId,Q.oldValue),Q.oldChildrenPositionsMap&&Q.oldChildrenPositionsMap.size>0)for(const[q,se]of Q.oldChildrenPositionsMap.entries()){f(q,se.x,se.y,se.z);const Z=($=Q.oldChildrenParentIdMap)==null?void 0:$.get(q),ee=(ie=Q.newChildrenParentIdMap)==null?void 0:ie.get(q);Z&&ee&&Z!==ee&&(W(Z,ee,q),k(Z,q))}},redo:()=>{var $,ie;if(b(Q.changedElementId,Q.newValue),Q.newChildrenPositionsMap&&Q.newChildrenPositionsMap.size>0)for(const[q,se]of Q.newChildrenPositionsMap.entries()){f(q,se.x,se.y,se.z);const Z=($=Q.oldChildrenParentIdMap)==null?void 0:$.get(q),ee=(ie=Q.newChildrenParentIdMap)==null?void 0:ie.get(q);Z&&ee&&Z!==ee&&(W(ee,Z,q),k(ee,q))}}};c(Q),g(p+1);break}}e(V=>{V.actionState.cuboidHeight=O})}},j=()=>{t(!1)},B=()=>{L(y)};return h.jsx(so,{width:550,title:Y.t("word.Height",w),onApply:B,onClose:j,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:1e3,style:{width:120},step:.5,precision:2,value:y,onChange:O=>{O!==null&&S(O)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",w),": [0.1, 1000] ",Y.t("word.MeterAbbreviation",w)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",w)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:x,value:u,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("cuboidMenu.OnlyThisCuboid",w)}),(A==null?void 0:A.parentId)!==Zo&&h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("cuboidMenu.AllCuboidsOnSameSurface",w)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("cuboidMenu.AllCuboidsAboveSameBase",w)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("cuboidMenu.AllSelectedCuboids",w)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("cuboidMenu.AllCuboids",w)})]})})})]})})},Ffo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(Bge),r=M(En),i=M(Eb),a=M(Fb),l=M(no),s=M(Qn),c=uo(z.Cuboid),[u,d]=m.useState(c?-c.rotation[2]:0),f=$t(),p=v=>{a(v.target.value)},g=v=>{for(const T of e)T.type===z.Cuboid&&!T.locked&&T.parentId===(c==null?void 0:c.parentId)&&o(T.id,0,0,-v)},A=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of e)if(T.type===z.Cuboid&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)&&Math.abs(-T.rotation[2]-v)>Et)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const T of e)if(T.type===z.Cuboid&&T.parentId===(c==null?void 0:c.parentId)&&!T.locked&&Math.abs(-T.rotation[2]-v)>Et)return!0;break;case re.AllObjectsOfThisType:{for(const T of e)if(T.type===z.Cuboid&&!T.locked&&Math.abs(-T.rotation[2]-v)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:break;default:if(Math.abs((c?-c.rotation[2]:0)-v)>Et)return!0}return!1},y=(v,T)=>{M.getState().set(w=>{for(const x of w.elements)if(v.has(x.id))if(T!==void 0)x.rotation[2]=T;else{const b=v.get(x.id);b!==void 0&&(x.rotation[2]=-b)}})},S=v=>{if(c&&A(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of e)x.type===z.Cuboid&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&T.set(x.id,-x.rotation[2]);const w={name:"Set Azimuth for Selected Cuboids",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{y(w.oldValues)},redo:()=>{y(w.oldValues,-w.newValue)}};r(w),y(T,-v),s(l+1);break}case re.AllObjectsOfThisTypeOnSurface:{const T=new Map;for(const x of e)x.type===z.Cuboid&&x.parentId===c.parentId&&!x.locked&&T.set(x.id,-x.rotation[2]);const w={name:"Set Azimuth for All Cuboids on Surface",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())o(x,0,0,-b)},redo:()=>{g(w.newValue)}};r(w),g(v),s(l+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of e)x.type===z.Cuboid&&!x.locked&&T.set(x.id,-x.rotation[2]);const w={name:"Set Azimuth for All Cuboids",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{y(w.oldValues)},redo:()=>{y(w.oldValues,-w.newValue)}};r(w),y(T,-v),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:break;default:{const T=n(c.id),w=T?-T.rotation[2]:-c.rotation[2],x={name:"Set Cuboid Azimuth",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:c.id,changedElementType:c.type,undo:()=>{o(x.changedElementId,0,0,-x.oldValue)},redo:()=>{o(x.changedElementId,0,0,-x.newValue)}};r(x),o(c.id,0,0,-v),s(l+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:550,title:Y.t("word.Azimuth",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:-180,max:180,style:{width:120},step:.5,precision:2,value:parseFloat(ye.toDegrees(u).toFixed(2)),formatter:v=>`${v}°`,onChange:v=>{v!==null&&d(ye.toRadians(v))}}),h.jsxs("div",{style:{paddingTop:"20px",paddingRight:"6px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [-180°, 180°]",h.jsx("br",{}),Y.t("message.AzimuthOfNorthIsZero",f),h.jsx("br",{}),Y.t("message.CounterclockwiseAzimuthIsPositive",f)]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:p,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("cuboidMenu.OnlyThisCuboid",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("cuboidMenu.AllCuboidsOnSameSurface",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("cuboidMenu.AllSelectedCuboids",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("cuboidMenu.AllCuboids",f)})]})})})]})})},kfo=[{key:"sensorCount",objectType:z.Sensor},{key:"polygonCount",objectType:z.Polygon},{key:"humanCount",objectType:z.Human},{key:"treeCount",objectType:z.Tree},{key:"flowerCount",objectType:z.Flower},{key:"outsideLightCount",objectType:z.Light}],Lfo=(t,e)=>{const n={lng:M.getState().language};let o="",r="";switch(t){case z.Light:{o=`${Y.t("cuboidMenu.RemoveAllUnlockedLights",n)} (${e})`,r=`${Y.t("cuboidMenu.DoYouReallyWantToRemoveAllLightsOnCuboid",n)} (${e} ${Y.t("cuboidMenu.Lights",n)})`;break}case z.Sensor:{o=`${Y.t("cuboidMenu.RemoveAllUnlockedSensors",n)} (${e})`,r=`${Y.t("cuboidMenu.DoYouReallyWantToRemoveAllSensorsOnCuboid",n)} (${e} ${Y.t("cuboidMenu.Sensors",n)})`;break}case z.Polygon:{o=`${Y.t("cuboidMenu.RemoveAllUnlockedPolygons",n)} (${e})`,r=`${Y.t("cuboidMenu.DoYouReallyWantToRemoveAllPolygonsOnCuboid",n)} (${e} ${Y.t("cuboidMenu.Polygons",n)})`;break}case z.Human:{o=`${Y.t("cuboidMenu.RemoveAllUnlockedHumans",n)} (${e})`,r=`${Y.t("cuboidMenu.DoYouReallyWantToRemoveAllHumansOnCuboid",n)} (${e} ${Y.t("cuboidMenu.Humans",n)})`;break}case z.Tree:{o=`${Y.t("cuboidMenu.RemoveAllUnlockedTrees",n)} (${e})`,r=`${Y.t("cuboidMenu.DoYouReallyWantToRemoveAllTreesOnCuboid",n)} (${e} ${Y.t("cuboidMenu.Trees",n)})`;break}case z.Flower:{o=`${Y.t("cuboidMenu.RemoveAllUnlockedFlowers",n)} (${e})`,r=`${Y.t("cuboidMenu.DoYouReallyWantToRemoveAllFlowersOnCuboid",n)} (${e} ${Y.t("cuboidMenu.Flowers",n)})`;break}}return{itemLabel:o,modalTitle:r}},Wfo=(t,e)=>{const n=[],o={lng:M.getState().language};if(e.solarPanelCount>0){const r=Y.t("cuboidMenu.DoYouReallyWantToRemoveAllSolarPanelsOnCuboid",o)+" ("+e.solarPanelModuleCount+" "+Y.t("cuboidMenu.SolarPanels",o)+", "+e.solarPanelCount+" "+Y.t("cuboidMenu.Racks",o)+")?";n.push({key:"remove-all-solar-panels-on-cuboid",label:h.jsxs(zHe,{cuboid:t,objectType:z.SolarPanel,modalTitle:r,children:[Y.t("cuboidMenu.RemoveAllUnlockedSolarPanels",o),"  (",e.solarPanelModuleCount," ",Y.t("cuboidMenu.SolarPanels",o),",",e.solarPanelCount," ",Y.t("cuboidMenu.Racks",o),")"]})})}return kfo.forEach(({key:r,objectType:i})=>{const a=e[r];if(typeof a=="number"&&a>0){const{itemLabel:l,modalTitle:s}=Lfo(i,a),c=i.replaceAll(" ","");n.push({key:`remove-all-${c}s-on-cuboid`,label:h.jsx(zHe,{cuboid:t,objectType:i,modalTitle:s,children:l})})}}),n},Nfo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(Eb),a=M(Fb),l=M(no),s=M(Qn),c=uo(z.Cuboid),[u,d]=m.useState((c==null?void 0:c.transparency)??0),f=$t(),p=(T,w)=>{e(x=>{for(const b of x.elements)if(b.type===z.Cuboid&&b.id===T&&!b.locked){b.transparency=w;break}})},g=T=>{for(const w of n)w.type===z.Cuboid&&!w.locked&&w.parentId===(c==null?void 0:c.parentId)&&p(w.id,T)},A=(T,w)=>{e(x=>{for(const b of x.elements)if(b.type===z.Cuboid&&T.has(b.id))if(w!==void 0)b.transparency=w;else{const R=T.get(b.id);R!==void 0&&(b.transparency=R)}})},y=T=>{a(T.target.value)},S=T=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const w of n)if(w.type===z.Cuboid&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)&&Math.abs((w.transparency??0)-T)>Et)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const w of n)if(w.type===z.Cuboid&&w.parentId===(c==null?void 0:c.parentId)&&!w.locked&&Math.abs((w.transparency??0)-T)>Et)return!0;break;case re.AllObjectsOfThisType:{for(const w of n)if(w.type===z.Cuboid&&!w.locked&&Math.abs((w.transparency??0)-T)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:break;default:if(Math.abs(((c==null?void 0:c.transparency)??0)-T)>Et)return!0}return!1},C=T=>{if(c&&S(T))switch(i){case re.AllSelectedObjectsOfThisType:{const w=new Map;for(const b of n)b.type===z.Cuboid&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&w.set(b.id,b.transparency??0);const x={name:"Set Transparency for Selected Cuboids",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{A(x.oldValues,-x.newValue)}};r(x),A(w,T),s(l+1);break}case re.AllObjectsOfThisTypeOnSurface:{const w=new Map;for(const b of n)b.type===z.Cuboid&&b.parentId===c.parentId&&!b.locked&&w.set(b.id,b.transparency??0);const x={name:"Set Transparency for All Cuboids on Surface",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())p(b,R)},redo:()=>{g(x.newValue)}};r(x),g(T),s(l+1);break}case re.AllObjectsOfThisType:{const w=new Map;for(const b of n)b.type===z.Cuboid&&!b.locked&&w.set(b.id,b.transparency??0);const x={name:"Set Transparency for All Cuboids",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{A(x.oldValues,-x.newValue)}};r(x),A(w,T),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:break;default:{const w=o(c.id),x=w?w.transparency:c.transparency,b={name:"Set Cuboid Transparency",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:c.id,changedElementType:c.type,undo:()=>{p(b.changedElementId,b.oldValue)},redo:()=>{p(b.changedElementId,b.newValue)}};r(b),p(c.id,T),s(l+1);break}}},P=()=>{t(!1)},v=()=>{C(u)};return h.jsx(so,{width:550,title:Y.t("word.Transparency",f),onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.1,precision:2,value:u,onChange:T=>{T!==null&&d(T)}}),h.jsxs("div",{style:{paddingTop:"20px",paddingRight:"6px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("cuboidMenu.OnlyThisCuboid",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("cuboidMenu.AllCuboidsOnSameSurface",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("cuboidMenu.AllSelectedCuboids",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("cuboidMenu.AllCuboids",f)})]})})})]})})},Ufo=()=>{const t=M.getState().elementsToPaste;if(t&&t.length>0){const e=t[0];if(e.type===z.Human||e.type===z.Tree||e.type===z.Flower||e.type===z.Polygon||e.type===z.Sensor||e.type===z.SolarPanel||e.type===z.Cuboid)return!0}return!1},jfo=t=>{const e=[];if(t.type!==z.Cuboid)return{items:e};const n=t,o=M.getState().selectedSideIndex,r={lng:M.getState().language},i=M.getState().countAllOffspringsByTypeAtOnce(n.id,!1),a=!(n!=null&&n.locked),l=!n.textureTypes||o>=0&&n.textureTypes[o]===Ro.NoTexture;return Ufo()&&e.push({key:"cuboid-paste",label:h.jsx(nM,{})}),e.push({key:"cuboid-copy",label:h.jsx(Fd,{})}),a&&e.push({key:"cuboid-cut",label:h.jsx(kd,{})}),e.push({key:"cuboid-lock",label:h.jsx(Ku,{selectedElement:n})}),e.push({key:"cuboid-group-master",label:h.jsx(LQe,{groupableElement:n})}),e.push({key:"cuboid-stackable",label:h.jsx(yfo,{cuboid:n})}),i.gotSome()&&e.push({key:"cuboid-clear",label:h.jsx(an,{children:Y.t("word.Clear",r)}),children:Wfo(n,i)}),a&&(l&&e.push({key:"cuboid-color",label:h.jsxs(eo,{Dialog:wfo,children:[Y.t("word.Color",r)," ..."]})}),e.push({key:"cuboid-texture",label:h.jsxs(eo,{Dialog:Ifo,children:[Y.t("word.Texture",r)," ..."]})}),e.push({key:"cuboid-length",label:h.jsxs(eo,{Dialog:zfo,children:[Y.t("word.Length",r)," ..."]})}),e.push({key:"cuboid-width",label:h.jsxs(eo,{Dialog:Dfo,children:[Y.t("word.Width",r)," ..."]})}),e.push({key:"cuboid-height",label:h.jsxs(eo,{Dialog:Efo,children:[Y.t("word.Height",r)," ..."]})}),e.push({key:"cuboid-azimuth",label:h.jsxs(eo,{Dialog:Ffo,children:[Y.t("word.Azimuth",r)," ..."]})}),e.push({key:"cuboid-transparency",label:h.jsxs(eo,{Dialog:Nfo,children:[Y.t("word.Transparency",r)," ..."]})})),e.push({key:"add-polygon-on-cuboid",label:h.jsx(Afo,{cuboid:n,selectedSideIndex:o})}),a&&e.push({key:"cuboid-label",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",r)}),children:v3(n)}),{items:e}},Bfo=()=>{const t=M(mA),e=$t(),n=r=>{M.getState().set(i=>{i.viewState.groundImage=r,i.viewState.groundImageType=i.viewState.mapType})},o=r=>{const i=r.target.checked,a={name:"Show Ground Image",timestamp:Date.now(),checked:i,undo:()=>{n(!a.checked)},redo:()=>{n(a.checked)}};M.getState().addUndoable(a),n(i)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t,onChange:o,children:Y.t("groundMenu.ImageOnGround",e)})})},Yfo=()=>{const t=M(IBe),e=$t(),n=r=>{M.getState().set(i=>{i.viewState.waterSurface=r})},o=r=>{const i=r.target.checked,a={name:"Water Surface",timestamp:Date.now(),checked:i,undo:()=>{n(!a.checked)},redo:()=>{n(a.checked)}};M.getState().addUndoable(a),n(i)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,update:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t,onChange:o,children:Y.t("groundMenu.WaterSurface",e)})})},Ofo=()=>{const t=M(MBe),e=o=>{M.getState().set(r=>{r.viewState.groundColor=o})},n=o=>{const r=t,i=o.hex,a={name:"Set Ground Color",timestamp:Date.now(),oldValue:r,newValue:i,undo:()=>{e(a.oldValue)},redo:()=>{e(a.newValue)}};M.getState().addUndoable(a),e(i)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Ld,{color:t,onChangeComplete:n})})},Vfo=()=>{const t=M(Pge)??Nq,n=M(s0)>0,o=$t(),r=s=>{M.getState().set(c=>{c.world.leafDayOfYear1=s})},i=s=>{if(s===null)return;const c=t,u=s,d={name:"Set Leaf Day 1",timestamp:Date.now(),oldValue:c,newValue:u,undo:()=>{r(d.oldValue)},redo:()=>{r(d.newValue)}};M.getState().addUndoable(d),r(u)},a=()=>h.jsx("div",{style:{width:"80px"},children:Y.t(n?"groundMenu.LeafOffDay":"groundMenu.LeafOutDay",o)}),l=()=>h.jsx("div",{style:{width:"60px"},children:"(1-150)"});return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Sn,{addonBefore:h.jsx(a,{}),addonAfter:h.jsx(l,{}),style:{width:"300px"},min:1,max:150,step:1,precision:0,value:t,onChange:i})})},_fo=()=>{const t=M(Cge)??Uq,n=M(s0)>0,o=$t(),r=s=>{M.getState().set(c=>{c.world.leafDayOfYear2=s})},i=s=>{if(s===null)return;const c=t,u=s,d={name:"Set Leaf Day 2",timestamp:Date.now(),oldValue:c,newValue:u,undo:()=>{r(d.oldValue)},redo:()=>{r(d.newValue)}};M.getState().addUndoable(d),r(u)},a=()=>h.jsx("div",{style:{width:"80px"},children:Y.t(n?"groundMenu.LeafOffDay":"groundMenu.LeafOutDay",o)}),l=()=>h.jsx("div",{style:{width:"60px"},children:"(215-365)"});return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Sn,{addonBefore:h.jsx(a,{}),addonAfter:h.jsx(l,{}),style:{width:"300px"},min:215,max:365,step:1,precision:0,value:t,onChange:i})})},DHe=({monthIndex:t})=>{const e=M(i=>i.world.monthlyIrradianceLosses?i.world.monthlyIrradianceLosses[t]:.05)??.05,n=$t(),o=i=>{M.getState().set(a=>{a.world.monthlyIrradianceLosses||(a.world.monthlyIrradianceLosses=new Array(12).fill(.05)),a.world.monthlyIrradianceLosses[t]=i})},r=i=>{if(i===null)return;const a=e,l=i,s={name:"Set Irradiance Loss in "+swe[t],timestamp:Date.now(),oldValue:a,newValue:l,undo:()=>{o(s.oldValue)},redo:()=>{o(s.newValue)}};M.getState().addUndoable(s),o(l)};return h.jsx(Sn,{addonBefore:h.jsx("span",{style:{fontFamily:"monospace"},children:Y.t(`month.${swe[t]}`,n)}),style:{width:"120px"},min:0,max:1,step:.01,precision:2,value:e,onChange:r})},Gfo=()=>{const t=M(r=>r.world.ground.albedo),e=$t(),n=r=>{M.getState().set(i=>{i.world.ground.albedo=r})},o=r=>{if(r===null)return;const i=t,a=r,l={name:"Set Ground Albedo",timestamp:Date.now(),oldValue:i,newValue:a,undo:()=>{n(l.oldValue)},redo:()=>{n(l.newValue)}};M.getState().addUndoable(l),n(a)};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsxs(on,{style:{width:"60px"},children:[Y.t("groundMenu.Albedo",e),":"]}),h.jsx(Sn,{min:.05,max:1,step:.01,precision:2,value:t,onChange:o})]})},Xfo=({itemLabel:t,modalTitle:e,objectType:n})=>{const o=M.getState().removeElementsByType,r=()=>{const a=M.getState().elements.filter(c=>!c.locked&&c.type===n);o(n);const l=JSON.parse(JSON.stringify(a)),s={name:"Remove All "+n+"s",timestamp:Date.now(),removedElements:l,undo:()=>{M.getState().set(c=>{c.elements.push(...s.removedElements)})},redo:()=>{o(n)}};M.getState().addUndoable(s),dt.getState().updateContextMenu()},i=()=>{xi.confirm({title:e,onOk:r,icon:h.jsx(ny,{})})};return h.jsx(an,{onClick:i,children:t})},EHe=({lock:t,count:e,label:n})=>{const o=M.getState().updateAllElementLocks,r=()=>{const i=new Map;for(const c of M.getState().elements)i.set(c.id,!!c.locked);const s={name:`${t?"Lock":"Unlock"} All ${t?"Unlocked":"Locked"} Elements`,timestamp:Date.now(),oldValues:i,newValue:!0,undo:()=>{for(const[c,u]of s.oldValues.entries())M.getState().updateElementLockById(c,u)},redo:()=>{o(t)}};M.getState().addUndoable(s),o(t)};return h.jsxs(an,{update:!0,onClick:r,children:[n," (",e,")"]})},Jfo=[{key:"humanCount",type:z.Human,itemLabel:"groundMenu.RemoveAllUnlockedPeople",modalTitle:"groundMenu.DoYouReallyWantToRemoveAllPeople"},{key:"treeCount",type:z.Tree,itemLabel:"groundMenu.RemoveAllUnlockedTrees",modalTitle:"groundMenu.DoYouReallyWantToRemoveAllTrees"},{key:"flowerCount",type:z.Flower,itemLabel:"groundMenu.RemoveAllUnlockedFlowers",modalTitle:"groundMenu.DoYouReallyWantToRemoveAllFlowers"},{key:"solarPanelCount",type:z.SolarPanel,itemLabel:"groundMenu.RemoveAllUnlockedSolarPanels",modalTitle:"groundMenu.DoYouReallyWantToRemoveAllSolarPanels"},{key:"foundationCount",type:z.Foundation,itemLabel:"groundMenu.RemoveAllUnlockedFoundations",modalTitle:"groundMenu.DoYouReallyWantToRemoveAllFoundations"},{key:"cuboidCount",type:z.Cuboid,itemLabel:"groundMenu.RemoveAllUnlockedCuboids",modalTitle:"groundMenu.DoYouReallyWantToRemoveAllCuboids"}],Kfo=()=>{const t=M.getState().elementsToPaste;if(!t||t.length===0)return!1;const e=t[0];return e.type===z.Human||e.type===z.Tree||e.type===z.Flower||e.type===z.Cuboid||e.type===z.Foundation},qfo=()=>zs.slice().reduce((t,e,n,o)=>(t&&n%2!==0&&t.push({key:`${o[n-1]}-${o[n]}`,label:h.jsxs(an,{stayAfterClick:!0,noPadding:!0,children:[h.jsx(DHe,{monthIndex:n-1}),h.jsx(DHe,{monthIndex:n})]})}),t),[]),$fo=()=>{const t={lng:M.getState().language},e=M.getState().countAllElementsByType(!0),n=[];return Kfo()&&n.push({key:"ground-paste",label:h.jsx(nM,{})}),Jfo.forEach(({key:o,type:r,itemLabel:i,modalTitle:a})=>{const l=e[o];typeof l=="number"&&l>0&&n.push({key:`ground-remove-all-${r}s`,label:h.jsx(Xfo,{objectType:r,itemLabel:`${Y.t(i,t)} (${l})`,modalTitle:`${Y.t(a,t)} (${l})?`})})}),e.unlockedCount>0&&n.push({key:"lock-all-elements",label:h.jsx(EHe,{lock:!0,count:e.unlockedCount,label:Y.t("groundMenu.LockAllUnlockedElements",t)})}),e.lockedCount>0&&M.getState().elements.length>0&&n.push({key:"unlock-all-elements",label:h.jsx(EHe,{lock:!1,count:e.lockedCount,label:Y.t("groundMenu.UnlockAllLockedElements",t)})}),n.push({key:"image-on-ground",label:h.jsx(Bfo,{})}),n.push({key:"water-surface",label:h.jsx(Yfo,{})}),M.getState().viewState.waterSurface||n.push({key:"ground-color-submenu",label:h.jsx(an,{children:Y.t("word.Color",t)}),children:[{key:"ground-color-picker",label:h.jsx(Ofo,{}),style:{backgroundColor:"white"}}]}),n.push({key:"vegetation-submenu",label:h.jsx(an,{children:Y.t("groundMenu.Vegetation",t)}),children:[{key:"leaf-out-day",label:h.jsx(Vfo,{})},{key:"leaf-shed-day",label:h.jsx(_fo,{})}]}),n.push({key:"monthly-irradiance-loss-submenu",label:h.jsx(an,{children:Y.t("groundMenu.MonthlyIrradianceLoss",t)}),children:qfo()}),n.push({key:"ground-albedo",label:h.jsx(Gfo,{})}),{items:n}};var YE={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return .5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return t===0?0:Math.pow(1024,t-1)},Out:function(t){return t===1?1:1-Math.pow(2,-10*t)},InOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return t===0?0:t===1?1:-Math.pow(2,10*(t-1))*Math.sin((t-1.1)*5*Math.PI)},Out:function(t){return t===0?0:t===1?1:Math.pow(2,-10*t)*Math.sin((t-.1)*5*Math.PI)+1},InOut:function(t){return t===0?0:t===1?1:(t*=2,t<1?-.5*Math.pow(2,10*(t-1))*Math.sin((t-1.1)*5*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin((t-1.1)*5*Math.PI)+1)}},Back:{In:function(t){var e=1.70158;return t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-YE.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?YE.Bounce.In(t*2)*.5:YE.Bounce.Out(t*2-1)*.5+.5}}},KD;typeof self>"u"&&typeof process<"u"&&process.hrtime?KD=function(){var t=process.hrtime();return t[0]*1e3+t[1]/1e6}:typeof self<"u"&&self.performance!==void 0&&self.performance.now!==void 0?KD=self.performance.now.bind(self.performance):Date.now!==void 0?KD=Date.now:KD=function(){return new Date().getTime()};var FP=KD,Qfo=function(){function t(){this._tweens={},this._tweensAddedDuringUpdate={}}return t.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(n){return e._tweens[n]})},t.prototype.removeAll=function(){this._tweens={}},t.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},t.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},t.prototype.update=function(e,n){e===void 0&&(e=FP()),n===void 0&&(n=!1);var o=Object.keys(this._tweens);if(o.length===0)return!1;for(;o.length>0;){this._tweensAddedDuringUpdate={};for(var r=0;r1?i(t[n],t[n-1],n-o):i(t[r],t[r+1>n?n:r+1],o-r)},Bezier:function(t,e){for(var n=0,o=t.length-1,r=Math.pow,i=qD.Utils.Bernstein,a=0;a<=o;a++)n+=r(1-e,o-a)*r(e,a)*t[a]*i(o,a);return n},CatmullRom:function(t,e){var n=t.length-1,o=n*e,r=Math.floor(o),i=qD.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(r=Math.floor(o=n*(1+e))),i(t[(r-1+n)%n],t[r],t[(r+1)%n],t[(r+2)%n],o-r)):e<0?t[0]-(i(t[0],t[0],t[1],t[1],-o)-t[0]):e>1?t[n]-(i(t[n],t[n],t[n-1],t[n-1],o-n)-t[n]):i(t[r?r-1:0],t[r],t[n1;o--)n*=o;return t[e]=n,n}}(),CatmullRom:function(t,e,n,o,r){var i=(n-t)*.5,a=(o-e)*.5,l=r*r,s=r*l;return(2*e-2*n+i+a)*s+(-3*e+3*n-2*i-a)*l+i*r+e}}},Zfo=function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t}(),Trt=new Qfo,eho=function(){function t(e,n){n===void 0&&(n=Trt),this._object=e,this._group=n,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=YE.Linear.None,this._interpolationFunction=qD.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=Zfo.nextId(),this._isChainStopped=!1,this._goToEnd=!1}return t.prototype.getId=function(){return this._id},t.prototype.isPlaying=function(){return this._isPlaying},t.prototype.isPaused=function(){return this._isPaused},t.prototype.to=function(e,n){return this._valuesEnd=Object.create(e),n!==void 0&&(this._duration=n),this},t.prototype.duration=function(e){return this._duration=e,this},t.prototype.start=function(e){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e!==void 0?typeof e=="string"?FP()+parseFloat(e):e:FP(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},t.prototype._setupProperties=function(e,n,o,r){for(var i in o){var a=e[i],l=Array.isArray(a),s=l?"array":typeof a,c=!l&&Array.isArray(o[i]);if(!(s==="undefined"||s==="function")){if(c){var u=o[i];if(u.length===0)continue;u=u.map(this._handleRelativeValue.bind(this,a)),o[i]=[a].concat(u)}if((s==="object"||l)&&a&&!c){n[i]=l?[]:{};for(var d in a)n[i][d]=a[d];r[i]=l?[]:{},this._setupProperties(a,n[i],o[i],r[i])}else typeof n[i]>"u"&&(n[i]=a),l||(n[i]*=1),c?r[i]=o[i].slice().reverse():r[i]=n[i]||0}}},t.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},t.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},t.prototype.pause=function(e){return e===void 0&&(e=FP()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this),this)},t.prototype.resume=function(e){return e===void 0&&(e=FP()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},t.prototype.stopChainedTweens=function(){for(var e=0,n=this._chainedTweens.length;ei)return!1;n&&this.start(e)}if(this._goToEnd=!1,e1?1:r;var a=this._easingFunction(r);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,a),this._onUpdateCallback&&this._onUpdateCallback(this._object,r),r===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(o in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[o]=="string"&&(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(this._valuesEnd[o])),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var l=0,s=this._chainedTweens.length;l{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.id===r&&(l.type===z.Human||l.type===z.Tree||l.type===z.Flower)){const s=l;s.flip=i;break}})},o=r=>{const i=r.target.checked,a={name:`Flip ${t.type}`,timestamp:Date.now(),checked:i,selectedElementId:t.id,selectedElementType:z.Human,undo:()=>{n(t.id,!a.checked)},redo:()=>{n(t.id,a.checked)}};M.getState().addUndoable(a),n(t.id,i)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.flip,onChange:o,children:Y.t("peopleMenu.Flip",e)})})}),nho=be.memo(({human:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.type===z.Human&&l.id===r){l.observer=i;break}})},o=r=>{const i=r.target.checked,a={name:"Set Observer",timestamp:Date.now(),checked:i,selectedElementId:t.id,selectedElementType:z.Human,undo:()=>{n(t.id,!a.checked)},redo:()=>{n(t.id,a.checked)}};M.getState().addUndoable(a),n(t.id,i)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.observer,onChange:o,children:Y.t("peopleMenu.Observer",e)})})}),oho=be.memo(({human:t})=>{const e=$t(),[n,o]=m.useState(!1),r=m.useRef(0),i=m.useRef(-1),a=m.useRef(!0),l=m.useRef(!1);m.useEffect(()=>{if(l.current){if(a.current)return r.current=requestAnimationFrame(c),u(),()=>{cancelAnimationFrame(r.current)};a.current=!0}},[n]);const s=(f,p,g)=>{const A=kn.getState().orbitControlsRef;A!=null&&A.current&&(A.current.object.position.set(f,p,g),A.current.update(),M.getState().set(y=>{const S=y.viewState;S.cameraPosition=[f,p,g]}))},c=()=>{requestAnimationFrame(c);const f=Date.now();f-i.current>100&&(tho(),i.current=f)},u=()=>{if(!t)return;let f=t.cx,p=t.cy,g=t.cz+t.lz;const A=M.getState().getParent(t);if(A){const C=ye.absoluteHumanOrTreeCoordinates(f,p,g,A);f=C.x,p=C.y,g=C.z}const y=M.getState().cameraDirection.clone().normalize().multiplyScalar(.5);f+=y.x,p+=y.y;const S=[...M.getState().viewState.cameraPosition];new eho(S).to([f,p,g],1e3).easing(YE.Quadratic.In).onUpdate(C=>{s(C[0],C[1],C[2])}).onComplete(()=>{M.getState().selectNone()}).start()},d=()=>{o(!n),l.current=!0};return h.jsx(an,{onClick:d,children:Y.t("peopleMenu.ViewFromThisPerson",e)})}),rho=be.memo(({tree:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.type===z.Tree&&l.id===r){l.showModel=i;break}})},o=r=>{const i={name:"Show Tree Model",timestamp:Date.now(),checked:r,selectedElementId:t.id,selectedElementType:z.Tree,undo:()=>{n(t.id,!i.checked)},redo:()=>{n(t.id,i.checked)}};M.getState().addUndoable(i),n(t.id,r)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:(t==null?void 0:t.showModel)&&(t==null?void 0:t.type)===z.Tree,onChange:r=>o(r.target.checked),children:Y.t("treeMenu.ShowModel",e)})})}),iho=be.memo(({tree:t})=>{const e=M.getState().updateElementLxById,n=$t(),o=t.lx??1,r=i=>{if(i===null||i===o)return;const a={name:"Set Tree Spread",timestamp:Date.now(),oldValue:o,newValue:i,changedElementId:t.id,changedElementType:t.type,undo:()=>{e(a.changedElementId,a.oldValue)},redo:()=>{e(a.changedElementId,a.newValue)}};M.getState().addUndoable(a),e(t.id,i),M.getState().set(l=>{l.actionState.treeSpread=i})};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsxs(on,{style:{width:"100px"},children:[Y.t("treeMenu.Spread",n)+" ("+Y.t("word.MeterAbbreviation",n)+")",":"]}),h.jsx(Sn,{style:{width:"160px"},min:1,max:50,step:1,precision:1,value:o,onChange:r})]})}),aho=be.memo(({tree:t})=>{const e=M.getState().updateElementLzById,n=$t(),o=t.lz??1,r=i=>{if(i===null||i===o)return;const a={name:"Set Tree Height",timestamp:Date.now(),oldValue:o,newValue:i,changedElementId:t.id,changedElementType:t.type,undo:()=>{e(a.changedElementId,a.oldValue)},redo:()=>{e(a.changedElementId,a.newValue)}};M.getState().addUndoable(a),e(t.id,i),M.getState().set(l=>{l.actionState.treeHeight=i})};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsxs(on,{style:{width:"100px"},children:[Y.t("word.Height",n)+" ("+Y.t("word.MeterAbbreviation",n)+")",":"]}),h.jsx(Sn,{style:{width:"160px"},min:1,max:30,step:1,precision:1,value:o,onChange:r})]})}),{Option:Xa}=Uo,lho=be.memo(({human:t})=>{const e=M(pn),n=M(En),[o,r]=m.useState(!1),i=$t(),a=(l,s)=>{e(c=>{for(const u of c.elements)if(u.type===z.Human&&u.id===l){const d=u;d.name=s,d.lx=kp.fetchWidth(s),d.lz=kp.fetchHeight(s);break}})};return h.jsxs(Uo,{style:{width:"140px"},value:(t==null?void 0:t.name)??Vt.Jack,onChange:l=>{if(t){const s=t.name;if(s!==l){const c={name:"Change People",timestamp:Date.now(),oldValue:s,newValue:l,changedElementId:t.id,changedElementType:t.type,undo:()=>{a(c.changedElementId,c.oldValue)},redo:()=>{a(c.changedElementId,c.newValue)}};n(c),a(t.id,l),e(u=>{u.actionState.humanName=l}),r(!o)}}},children:[h.jsxs(Xa,{value:Vt.Jack,children:[h.jsx("img",{alt:Vt.Jack,src:Hje,height:20,style:{paddingRight:"21px"}})," ",Y.t("people.Jack",i)]},Vt.Jack),h.jsxs(Xa,{value:Vt.Jacob,children:[h.jsx("img",{alt:Vt.Jacob,src:Mje,height:20,style:{paddingRight:"16px"}})," ",Y.t("people.Jacob",i)]},Vt.Jacob),h.jsxs(Xa,{value:Vt.Jacqueline,children:[h.jsx("img",{alt:Vt.Jacqueline,src:Ije,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Jacqueline",i)]},Vt.Jacqueline),h.jsxs(Xa,{value:Vt.Jaah,children:[h.jsx("img",{alt:Vt.Jaah,src:Rje,height:20,style:{paddingRight:"19px"}})," ",Y.t("people.Jaah",i)]},Vt.Jaah),h.jsxs(Xa,{value:Vt.Jade,children:[h.jsx("img",{alt:Vt.Jade,src:zje,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Jade",i)]},Vt.Jade),h.jsxs(Xa,{value:Vt.Jamelia,children:[h.jsx("img",{alt:Vt.Jamelia,src:Dje,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Jamelia",i)]},Vt.Jamelia),h.jsxs(Xa,{value:Vt.James,children:[h.jsx("img",{alt:Vt.James,src:Eje,height:20,style:{paddingRight:"21px"}})," ",Y.t("people.James",i)]},Vt.James),h.jsxs(Xa,{value:Vt.Jane,children:[h.jsx("img",{alt:Vt.Jane,src:Fje,height:20,style:{paddingRight:"21px"}})," ",Y.t("people.Jane",i)]},Vt.Jane),h.jsxs(Xa,{value:Vt.Jaya,children:[h.jsx("img",{alt:Vt.Jaya,src:kje,height:20,style:{paddingRight:"19px"}})," ",Y.t("people.Jaya",i)]},Vt.Jaya),h.jsxs(Xa,{value:Vt.Jaye,children:[h.jsx("img",{alt:Vt.Jaye,src:Lje,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Jaye",i)]},Vt.Jaye),h.jsxs(Xa,{value:Vt.Jeanette,children:[h.jsx("img",{alt:Vt.Jeanette,src:Wje,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Jeanette",i)]},Vt.Jeanette),h.jsxs(Xa,{value:Vt.Jedi,children:[h.jsx("img",{alt:Vt.Jedi,src:Nje,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Jedi",i)]},Vt.Jedi),h.jsxs(Xa,{value:Vt.Jeff,children:[h.jsx("img",{alt:Vt.Jeff,src:Uje,height:20,style:{paddingRight:"19px"}})," ",Y.t("people.Jeff",i)]},Vt.Jeff),h.jsxs(Xa,{value:Vt.Jena,children:[h.jsx("img",{alt:Vt.Jena,src:jje,height:20,style:{paddingRight:"19px"}})," ",Y.t("people.Jena",i)]},Vt.Jena),h.jsxs(Xa,{value:Vt.Jennifer,children:[h.jsx("img",{alt:Vt.Jennifer,src:Bje,height:20,style:{paddingRight:"21px"}})," ",Y.t("people.Jennifer",i)]},Vt.Jennifer),h.jsxs(Xa,{value:Vt.Jess,children:[h.jsx("img",{alt:Vt.Jess,src:Yje,height:20,style:{paddingRight:"21px"}})," ",Y.t("people.Jess",i)]},Vt.Jess),h.jsxs(Xa,{value:Vt.Jett,children:[h.jsx("img",{alt:Vt.Jett,src:Oje,height:20,style:{paddingRight:"21px"}})," ",Y.t("people.Jett",i)]},Vt.Jett),h.jsxs(Xa,{value:Vt.Jill,children:[h.jsx("img",{alt:Vt.Jill,src:Vje,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Jill",i)]},Vt.Jill),h.jsxs(Xa,{value:Vt.Jiya,children:[h.jsx("img",{alt:Vt.Jiya,src:_je,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Jiya",i)]},Vt.Jiya),h.jsxs(Xa,{value:Vt.Joan,children:[h.jsx("img",{alt:Vt.Joan,src:Gje,height:20,style:{paddingRight:"8px"}})," ",Y.t("people.Joan",i)]},Vt.Joan),h.jsxs(Xa,{value:Vt.Jocelyn,children:[h.jsx("img",{alt:Vt.Jocelyn,src:Xje,height:20,style:{paddingRight:"23px"}})," ",Y.t("people.Jocelyn",i)]},Vt.Jocelyn),h.jsxs(Xa,{value:Vt.Joel,children:[h.jsx("img",{alt:Vt.Joel,src:Jje,height:20,style:{paddingRight:"7px"}})," ",Y.t("people.Joel",i)]},Vt.Joel),h.jsxs(Xa,{value:Vt.Joey,children:[h.jsx("img",{alt:Vt.Joey,src:Kje,height:20,style:{paddingRight:"22px"}})," ",Y.t("people.Joey",i)]},Vt.Joey),h.jsxs(Xa,{value:Vt.John,children:[h.jsx("img",{alt:Vt.John,src:qje,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.John",i)]},Vt.John),h.jsxs(Xa,{value:Vt.Jonathon,children:[h.jsx("img",{alt:Vt.Jonathon,src:$je,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Jonathon",i)]},Vt.Jonathon),h.jsxs(Xa,{value:Vt.Jose,children:[h.jsx("img",{alt:Vt.Jose,src:Qje,height:20,style:{paddingRight:"5px"}})," ",Y.t("people.Jose",i)]},Vt.Jose),h.jsxs(Xa,{value:Vt.Joseph,children:[h.jsx("img",{alt:Vt.Joseph,src:Zje,height:20,style:{paddingRight:"22px"}})," ",Y.t("people.Joseph",i)]},Vt.Joseph),h.jsxs(Xa,{value:Vt.Joshua,children:[h.jsx("img",{alt:Vt.Joshua,src:eBe,height:20,style:{paddingRight:"22px"}})," ",Y.t("people.Joshua",i)]},Vt.Joshua),h.jsxs(Xa,{value:Vt.Judd,children:[h.jsx("img",{alt:Vt.Judd,src:tBe,height:20,style:{paddingRight:"21px"}})," ",Y.t("people.Judd",i)]},Vt.Judd),h.jsxs(Xa,{value:Vt.Judy,children:[h.jsx("img",{alt:Vt.Judy,src:nBe,height:20,style:{paddingRight:"21px"}})," ",Y.t("people.Judy",i)]},Vt.Judy),h.jsxs(Xa,{value:Vt.Julia,children:[h.jsx("img",{alt:Vt.Julia,src:oBe,height:20,style:{paddingRight:"22px"}})," ",Y.t("people.Julia",i)]},Vt.Julia),h.jsxs(Xa,{value:Vt.Julio,children:[h.jsx("img",{alt:Vt.Julio,src:rBe,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Julio",i)]},Vt.Julio),h.jsxs(Xa,{value:Vt.Jumapili,children:[h.jsx("img",{alt:Vt.Jumapili,src:iBe,height:20,style:{paddingRight:"16px"}})," ",Y.t("people.Jumapili",i)]},Vt.Jumapili),h.jsxs(Xa,{value:Vt.June,children:[h.jsx("img",{alt:Vt.June,src:aBe,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.June",i)]},Vt.June),h.jsxs(Xa,{value:Vt.Juro,children:[h.jsx("img",{alt:Vt.Juro,src:lBe,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Juro",i)]},Vt.Juro),h.jsxs(Xa,{value:Vt.Justin,children:[h.jsx("img",{alt:Vt.Justin,src:sBe,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Justin",i)]},Vt.Justin)]})}),sho=t=>{const e=[];if(t.type!==z.Human)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language},i=M.getState().viewState.orthographic??!1;return e.push({key:"human-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"human-cut",label:h.jsx(kd,{})}),e.push({key:"human-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&e.push({key:"human-flip",label:h.jsx(L9e,{billboardModel:n})}),i||e.push({key:"human-move-view",label:h.jsx(oho,{human:n})}),o&&(e.push({key:"human-obserber",label:h.jsx(nho,{human:n})}),e.push({key:"human-selection",label:h.jsxs(an,{stayAfterClick:!0,children:[h.jsxs(on,{style:{width:"120px"},children:[Y.t("peopleMenu.ChangePerson",r),": "]}),h.jsx(lho,{human:n})]})})),{items:e}},{Option:Zd}=Uo,cho=be.memo(({flower:t})=>{const e=M(pn),n=M(En),[o,r]=m.useState(!1),i=$t(),a=(l,s)=>{e(c=>{for(const u of c.elements)if(u.type===z.Flower&&u.id===l){const d=u;d.name=s,d.lx=A8.fetchSpread(s),d.lz=A8.fetchHeight(s);break}})};return h.jsxs(Uo,{style:{width:"200px"},value:(t==null?void 0:t.name)??ro.WhiteFlower,onChange:l=>{if(t){const s=t.name;if(s!==l){const c={name:"Change Flower",timestamp:Date.now(),oldValue:s,newValue:l,changedElementId:t.id,changedElementType:t.type,undo:()=>{a(c.changedElementId,c.oldValue)},redo:()=>{a(c.changedElementId,c.newValue)}};n(c),a(t.id,l),e(u=>{u.actionState.flowerType=l}),r(!o)}}},children:[h.jsxs(Zd,{value:ro.WhiteFlower,children:[h.jsx("img",{alt:ro.WhiteFlower,src:ABe,height:20,style:{paddingRight:"17px"}})," ",Y.t("flower.WhiteFlower",i)]},ro.WhiteFlower),h.jsxs(Zd,{value:ro.YellowFlower,children:[h.jsx("img",{alt:ro.YellowFlower,src:wBe,height:20,style:{paddingRight:"16px"}})," ",Y.t("flower.YellowFlower",i)]},ro.YellowFlower),h.jsxs(Zd,{value:ro.Hibiscus,children:[h.jsx("img",{alt:ro.Hibiscus,src:uBe,height:20,style:{paddingRight:"19px"}})," ",Y.t("flower.Hibiscus",i)]},ro.Hibiscus),h.jsxs(Zd,{value:ro.Hydrangea,children:[h.jsx("img",{alt:ro.Hydrangea,src:dBe,height:20,style:{paddingRight:"18px"}})," ",Y.t("flower.Hydrangea",i)]},ro.Hydrangea),h.jsxs(Zd,{value:ro.Spirea,children:[h.jsx("img",{alt:ro.Spirea,src:gBe,height:20,style:{paddingRight:"18px"}})," ",Y.t("flower.Spirea",i)]},ro.Spirea),h.jsxs(Zd,{value:ro.Hosta,children:[h.jsx("img",{alt:ro.Hosta,src:fBe,height:20,style:{paddingRight:"18px"}})," ",Y.t("flower.Hosta",i)]},ro.Hosta),h.jsxs(Zd,{value:ro.Peony,children:[h.jsx("img",{alt:ro.Peony,src:hBe,height:20,style:{paddingRight:"17px"}})," ",Y.t("flower.Peony",i)]},ro.Peony),h.jsxs(Zd,{value:ro.Boxwood,children:[h.jsx("img",{alt:ro.Boxwood,src:Gce,height:20,style:{paddingRight:"23px"}})," ",Y.t("flower.Boxwood",i)]},ro.Boxwood),h.jsxs(Zd,{value:ro.TallBush,children:[h.jsx("img",{alt:ro.TallBush,src:$ce,height:20,style:{paddingRight:"32px"}})," ",Y.t("flower.TallBush",i)]},ro.TallBush),h.jsxs(Zd,{value:ro.CactusCombo1,children:[h.jsx("img",{alt:ro.CactusCombo1,src:Xce,height:20,style:{paddingRight:"26px"}})," ",Y.t("flower.CactusCombo1",i)]},ro.CactusCombo1),h.jsxs(Zd,{value:ro.CactusCombo2,children:[h.jsx("img",{alt:ro.CactusCombo2,src:Jce,height:20,style:{paddingRight:"26px"}})," ",Y.t("flower.CactusCombo2",i)]},ro.CactusCombo2),h.jsxs(Zd,{value:ro.CactusCombo3,children:[h.jsx("img",{alt:ro.CactusCombo3,src:Kce,height:20,style:{paddingRight:"26px"}})," ",Y.t("flower.CactusCombo3",i)]},ro.CactusCombo3),h.jsxs(Zd,{value:ro.CactusCombo4,children:[h.jsx("img",{alt:ro.CactusCombo4,src:qce,height:20,style:{paddingRight:"26px"}})," ",Y.t("flower.CactusCombo4",i)]},ro.CactusCombo4),h.jsxs(Zd,{value:ro.RedRose,children:[h.jsx("img",{alt:ro.RedRose,src:pBe,height:20,style:{paddingRight:"26px"}})," ",Y.t("flower.RedRose",i)]},ro.RedRose),h.jsxs(Zd,{value:ro.Bellflower,children:[h.jsx("img",{alt:ro.Bellflower,src:cBe,height:20,style:{paddingRight:"20px"}})," ",Y.t("flower.Bellflower",i)]},ro.Bellflower),h.jsxs(Zd,{value:ro.Sunflower,children:[h.jsx("img",{alt:ro.Sunflower,src:mBe,height:20,style:{paddingRight:"32px"}})," ",Y.t("flower.Sunflower",i)]},ro.Sunflower),h.jsxs(Zd,{value:ro.Tulip,children:[h.jsx("img",{alt:ro.Tulip,src:yBe,height:20,style:{paddingRight:"24px"}})," ",Y.t("flower.Tulip",i)]},ro.Tulip)]})}),uho=t=>{const e=[];if(t.type!==z.Flower)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language};return e.push({key:"flower-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"flower-cut",label:h.jsx(kd,{})}),e.push({key:"flower-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&e.push({key:"flower-flip",label:h.jsx(L9e,{billboardModel:n})}),o&&e.push({key:"flower-change-type",label:h.jsxs(an,{stayAfterClick:!0,children:[h.jsxs(on,{style:{width:"60px"},children:[Y.t("flowerMenu.Type",r),": "]}),h.jsx(cho,{flower:n})]})}),{items:e}},dho=({polygon:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.type===z.Polygon&&l.id===r){l.filled=i;break}})},o=r=>{const i={name:"Fill Polygon",timestamp:Date.now(),checked:!t.filled,selectedElementId:t.id,selectedElementType:z.Polygon,undo:()=>{n(t.id,!i.checked)},redo:()=>{n(t.id,i.checked)}};M.getState().addUndoable(i),n(t.id,r.target.checked)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.filled,onChange:o,children:Y.t("polygonMenu.Filled",e)})})},fho=({polygon:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.type===z.Polygon&&l.id===r){l.shininess=i;break}})},o=r=>{const a={name:"Shiny Polygon",timestamp:Date.now(),checked:((t==null?void 0:t.shininess)??0)>0,selectedElementId:t.id,selectedElementType:z.Polygon,undo:()=>{n(t.id,a.checked?0:100)},redo:()=>{n(t.id,a.checked?100:0)}};M.getState().addUndoable(a),n(t.id,r.target.checked?100:0)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:!!t.shininess,onChange:o,children:Y.t("polygonMenu.Shiny",e)})})},hho=({polygon:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.type===z.Polygon&&l.id===r){l.noOutline=i;break}})},o=r=>{const i={name:"No Outline for Polygon",timestamp:Date.now(),checked:!t.noOutline,selectedElementId:t.id,selectedElementType:z.Polygon,undo:()=>{n(t.id,!i.checked)},redo:()=>{n(t.id,i.checked)}};M.getState().addUndoable(i),n(t.id,r.target.checked)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.noOutline,onChange:o,children:Y.t("polygonMenu.NoOutline",e)})})},pho=({polygon:t})=>{const e=$t(),[n,o]=m.useState((t==null?void 0:t.text)??""),r=(a,l)=>{M.getState().set(s=>{for(const c of s.elements)if(c.id===a){!c.locked&&c.type===z.Polygon&&(c.text=l);break}})},i=()=>{const a={name:"Set Text for Polygon",timestamp:Date.now(),oldValue:t.text??"",newValue:n,changedElementId:t.id,changedElementType:z.Polygon,undo:()=>{r(t.id,a.oldValue)},redo:()=>{r(t.id,a.newValue)}};M.getState().addUndoable(a),r(t.id,n)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(jl,{addonBefore:h.jsxs(hy,{width:"120px",children:[Y.t("word.Text",e),":"]}),value:n,onChange:a=>o(a.target.value),onPressEnter:i,onBlur:i})})},gho=({polygon:t})=>{const e=$t(),[n,o]=m.useState((t==null?void 0:t.fontSize)??1),r=(a,l)=>{M.getState().set(s=>{for(const c of s.elements)if(c.id===a){!c.locked&&c.type===z.Polygon&&(c.fontSize=l);break}})},i=()=>{const a={name:"Set Font Size for Polygon",timestamp:Date.now(),oldValue:t.fontSize??1,newValue:n,changedElementId:t.id,changedElementType:z.Polygon,undo:()=>{r(t.id,a.oldValue)},redo:()=>{r(t.id,a.newValue)}};M.getState().addUndoable(a),r(t.id,n)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Sn,{addonBefore:h.jsxs(hy,{width:"120px",children:[Y.t("word.FontSize",e),":"]}),min:.1,max:5,step:.01,precision:2,value:n,onChange:a=>o(a),onPressEnter:i,onBlur:i})})},mho=({polygon:t})=>{const e=$t(),[n,o]=m.useState((t==null?void 0:t.fontColor)??"black"),r=(a,l)=>{M.getState().set(s=>{for(const c of s.elements)if(c.id===a){!c.locked&&c.type===z.Polygon&&(c.fontColor=l);break}})},i=()=>{const a={name:"Set Font Color for Polygon",timestamp:Date.now(),oldValue:t.fontColor??"black",newValue:n,changedElementId:t.id,changedElementType:z.Polygon,undo:()=>{r(t.id,a.oldValue)},redo:()=>{r(t.id,a.newValue)}};M.getState().addUndoable(a),r(t.id,n)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(jl,{addonBefore:h.jsxs(hy,{width:"120px",children:[Y.t("word.FontColor",e),":"]}),value:n,onChange:a=>o(a.target.value),onPressEnter:i,onBlur:i})})},yho=({polygon:t})=>{const e=$t(),[n,o]=m.useState((t==null?void 0:t.fontOutlineColor)??"white"),r=(a,l)=>{M.getState().set(s=>{for(const c of s.elements)if(c.id===a){!c.locked&&c.type===z.Polygon&&(c.fontOutlineColor=l);break}})},i=()=>{const a={name:"Set Font Outline Color for Polygon",timestamp:Date.now(),oldValue:t.fontOutlineColor??"white",newValue:n,changedElementId:t.id,changedElementType:z.Polygon,undo:()=>{r(t.id,a.oldValue)},redo:()=>{r(t.id,a.newValue)}};M.getState().addUndoable(a),r(t.id,n)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(jl,{addonBefore:h.jsxs(hy,{width:"120px",children:[Y.t("polygonMenu.FontOutlineColor",e),":"]}),value:n,onChange:a=>o(a.target.value),onPressEnter:i,onBlur:i})})},Aho=({polygon:t})=>{const e=$t(),[n,o]=m.useState((t==null?void 0:t.fontOutlineWidth)??0),r=(a,l)=>{M.getState().set(s=>{for(const c of s.elements)if(c.id===a){!c.locked&&c.type===z.Polygon&&(c.fontOutlineWidth=l);break}})},i=()=>{const a={name:"Set Font Outline Width for Polygon",timestamp:Date.now(),oldValue:t.fontOutlineWidth??0,newValue:n,changedElementId:t.id,changedElementType:z.Polygon,undo:()=>{r(t.id,a.oldValue)},redo:()=>{r(t.id,a.newValue)}};M.getState().addUndoable(a),r(t.id,n)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Sn,{addonBefore:h.jsxs(hy,{width:"120px",children:[Y.t("polygonMenu.FontOutlineWidth",e),":"]}),min:0,max:1,step:.01,precision:2,value:n,onChange:a=>o(a),onPressEnter:i,onBlur:i})})},who=({polygon:t})=>{const e=$t(),[n,o]=m.useState((t==null?void 0:t.fontStrokeColor)??"black"),r=(a,l)=>{M.getState().set(s=>{for(const c of s.elements)if(c.id===a){!c.locked&&c.type===z.Polygon&&(c.fontStrokeColor=l);break}})},i=()=>{const a={name:"Set Font Stroke Color for Polygon",timestamp:Date.now(),oldValue:t.fontStrokeColor??"black",newValue:n,changedElementId:t.id,changedElementType:z.Polygon,undo:()=>{r(t.id,a.oldValue)},redo:()=>{r(t.id,a.newValue)}};M.getState().addUndoable(a),r(t.id,n)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(jl,{addonBefore:h.jsxs(hy,{width:"120px",children:[Y.t("polygonMenu.FontStrokeColor",e),":"]}),value:n,onChange:a=>o(a.target.value),onPressEnter:i,onBlur:i})})},vho=({polygon:t})=>{const e=$t(),[n,o]=m.useState((t==null?void 0:t.fontStrokeWidth)??0),r=(a,l)=>{M.getState().set(s=>{for(const c of s.elements)if(c.id===a){!c.locked&&c.type===z.Polygon&&(c.fontStrokeWidth=l);break}})},i=()=>{const a={name:"Set Font Stroke Width for Polygon",timestamp:Date.now(),oldValue:t.fontStrokeWidth??0,newValue:n,changedElementId:t.id,changedElementType:z.Polygon,undo:()=>{r(t.id,a.oldValue)},redo:()=>{r(t.id,a.newValue)}};M.getState().addUndoable(a),r(t.id,n)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Sn,{addonBefore:h.jsxs(hy,{width:"120px",children:[Y.t("polygonMenu.FontStrokeWidth",e),":"]}),min:0,max:1,step:.01,precision:2,value:n,onChange:a=>o(a),onPressEnter:i,onBlur:i})})},xho=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(Gr),r=M($wt),i=M(Qwt),a=M(Zwt),l=M(e7t),s=M(En),c=M(LH),u=M(WH),d=M(no),f=M(Qn),p=uo(z.Polygon),[g,A]=m.useState((p==null?void 0:p.lineColor)??"black"),y=$t(),S=x=>{u(x.target.value)},C=x=>{if(p){switch(c){case re.AllSelectedObjectsOfThisType:for(const b of e)if(b.type===z.Polygon&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&x!==b.lineColor)return!0;break;case re.AllObjectsOfThisType:for(const b of e)if(b.type===z.Polygon&&!b.locked&&x!==b.lineColor)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const b of e)if(b.type===z.Polygon&&b.parentId===p.parentId&&ye.isIdentical(b.normal,p.normal)&&!b.locked&&b.lineColor!==x)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const b of e)if(b.type===z.Polygon&&b.foundationId===(p==null?void 0:p.foundationId)&&!b.locked&&b.lineColor!==x)return!0;break;default:if(x!==(p==null?void 0:p.lineColor))return!0}return!1}},P=(x,b)=>{M.getState().set(R=>{for(const H of R.elements)H.type===z.Polygon&&!H.locked&&x.has(H.id)&&(H.lineColor=b)})},v=x=>{if(p&&C(x))switch(c){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of e)H.type===z.Polygon&&M.getState().selectedElementIdSet.has(H.id)&&b.set(H.id,H.lineColor??"black");const R={name:"Set Line Color for Selected Polygons",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{P(R.oldValues,R.newValue)}};s(R),P(b,x),f(d+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of e)H.type===z.Polygon&&b.set(H.id,H.lineColor??"black");const R={name:"Set Line Color for All Polygons",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{l(z.Polygon,R.newValue)}};s(R),l(z.Polygon,x),f(d+1);break}case re.AllObjectsOfThisTypeOnSurface:{if(o(p)){const R=new Map;for(const F of e)F.type===z.Polygon&&F.parentId===p.parentId&&ye.isIdentical(F.normal,p.normal)&&R.set(F.id,F.lineColor??"gray");const H={name:"Set Line Color for All Polygons on Same Surface",timestamp:Date.now(),oldValues:R,newValue:x,groupId:p.parentId,normal:p.normal,undo:()=>{for(const[F,E]of H.oldValues.entries())r(F,E)},redo:()=>{H.groupId&&i(z.Polygon,H.groupId,H.normal,H.newValue)}};s(H),i(z.Polygon,p.parentId,p.normal,x),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(p.foundationId){const b=new Map;for(const H of e)H.type===z.Polygon&&H.foundationId===p.foundationId&&b.set(H.id,H.lineColor??"black");const R={name:"Set Line Color for All Polygons Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:p.foundationId,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{R.groupId&&a(z.Polygon,R.groupId,R.newValue)}};s(R),a(z.Polygon,p.foundationId,x),f(d+1)}break}default:{const b=n(p.id),R=b?b.lineColor:p.lineColor,H={name:"Set Line Color of Selected Polygon",timestamp:Date.now(),oldValue:R,newValue:x,changedElementId:p.id,changedElementType:p.type,undo:()=>{r(H.changedElementId,H.oldValue)},redo:()=>{r(H.changedElementId,H.newValue)}};s(H),r(p.id,x),f(d+1);break}}},T=()=>{t(!1)},w=()=>{v(g)};return h.jsx(so,{width:600,title:Y.t("polygonMenu.LineColor",y),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:h.jsx(Ld,{color:g??(p==null?void 0:p.lineColor)??"black",onChangeComplete:x=>{A(x.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:12,children:h.jsx(Le.Group,{onChange:S,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("polygonMenu.OnlyThisPolygon",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("polygonMenu.AllPolygonsOnSurface",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("polygonMenu.AllPolygonsAboveFoundation",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("polygonMenu.AllSelectedPolygons",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("polygonMenu.AllPolygons",y)})]})})})]})})},bho=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(En),a=M(LH),l=M(WH),s=M(no),c=M(Qn),u=uo(z.Polygon),[d,f]=m.useState((u==null?void 0:u.lineStyle)??Xh.Solid),p=$t(),{Option:g}=Uo,A=(R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.Polygon&&E.id===R){E.lineStyle=H;break}})},y=(R,H,F)=>{e(E=>{for(const N of E.elements)N.type===z.Polygon&&N.parentId===R&&ye.isIdentical(N.normal,H)&&!N.locked&&(N.lineStyle=F)})},S=(R,H)=>{e(F=>{for(const E of F.elements)E.type===z.Polygon&&E.foundationId===R&&!E.locked&&(E.lineStyle=H)})},C=R=>{e(H=>{for(const F of H.elements)F.type===z.Polygon&&!F.locked&&(F.lineStyle=R)})},P=R=>{l(R.target.value)},v=R=>{if(u){switch(a){case re.AllSelectedObjectsOfThisType:for(const H of n)if(H.type===z.Polygon&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&R!==H.lineStyle)return!0;break;case re.AllObjectsOfThisType:for(const H of n)if(H.type===z.Polygon&&!H.locked&&R!==H.lineStyle)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const H of n)if(H.type===z.Polygon&&H.parentId===u.parentId&&ye.isIdentical(H.normal,u.normal)&&!H.locked&&R!==H.lineStyle)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const H of n)if(H.type===z.Polygon&&H.foundationId===(u==null?void 0:u.foundationId)&&!H.locked&&R!==H.lineStyle)return!0;break;default:if(R!==(u==null?void 0:u.lineStyle))return!0}return!1}},T=(R,H)=>{M.getState().set(F=>{for(const E of F.elements)E.type===z.Polygon&&!E.locked&&R.has(E.id)&&(E.lineStyle=H)})},w=R=>{if(u&&v(R))switch(a){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.Polygon&&M.getState().selectedElementIdSet.has(E.id)&&H.set(E.id,E.lineStyle??Xh.Solid);const F={name:"Set Line Style for Selected Polygons",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())A(E,N)},redo:()=>{T(F.oldValues,F.newValue)}};i(F),T(H,R),c(s+1);break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.Polygon&&H.set(E.id,E.lineStyle??Xh.Solid);const F={name:"Set Line Style for All Polygons",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())A(E,N)},redo:()=>{C(F.newValue)}};i(F),C(R),c(s+1);break}case re.AllObjectsOfThisTypeOnSurface:{if(r(u)){const F=new Map;for(const N of n)N.type===z.Polygon&&N.parentId===u.parentId&&ye.isIdentical(N.normal,u.normal)&&F.set(N.id,N.lineStyle??Xh.Solid);const E={name:"Set Line Style for All Polygons on Same Surface",timestamp:Date.now(),oldValues:F,newValue:R,groupId:u.parentId,normal:u.normal,undo:()=>{for(const[N,U]of E.oldValues.entries())A(N,U)},redo:()=>{E.groupId&&y(E.groupId,E.normal,E.newValue)}};i(E),y(u.parentId,u.normal,R),c(s+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const H=new Map;for(const E of n)E.type===z.Polygon&&E.foundationId===u.foundationId&&H.set(E.id,E.lineStyle??Xh.Solid);const F={name:"Set Line Style for All Polygons Above Foundation",timestamp:Date.now(),oldValues:H,newValue:R,groupId:u.foundationId,undo:()=>{for(const[E,N]of F.oldValues.entries())A(E,N)},redo:()=>{F.groupId&&S(F.groupId,F.newValue)}};i(F),S(u.foundationId,R),c(s+1)}break}default:{const H=o(u.id),F=H?H.lineStyle:u.lineStyle,E={name:"Set Line Style of Selected Polygon",timestamp:Date.now(),oldValue:F,newValue:R,changedElementId:u.id,changedElementType:u.type,undo:()=>{A(E.changedElementId,E.oldValue)},redo:()=>{A(E.changedElementId,E.newValue)}};i(E),A(u.id,R),c(s+1);break}}},x=()=>{t(!1)},b=()=>{w(d)};return h.jsx(so,{width:600,title:Y.t("polygonMenu.LineStyle",p),onApply:b,onClose:x,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:10,children:h.jsxs(Uo,{style:{width:"200px"},value:d,onChange:R=>f(R),children:[h.jsxs(g,{value:Xh.Solid,children:[h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"12px",width:"48px",height:"1px",border:"1px solid dimGray"},children:" "}),Y.t("polygonMenu.SolidLine",p)]},Xh.Solid),h.jsxs(g,{value:Xh.Dashed,children:[h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"12px",width:"48px",height:"1px",border:"1px dashed dimGray"},children:" "}),Y.t("polygonMenu.DashedLine",p)]},Xh.Dashed),h.jsxs(g,{value:Xh.Dotted,children:[h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"12px",width:"48px",height:"1px",border:"1px dotted dimGray"},children:" "}),Y.t("polygonMenu.DottedLine",p)]},Xh.Dotted)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:14,children:h.jsx(Le.Group,{onChange:P,value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("polygonMenu.OnlyThisPolygon",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("polygonMenu.AllPolygonsOnSurface",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("polygonMenu.AllPolygonsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("polygonMenu.AllSelectedPolygons",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("polygonMenu.AllPolygons",p)})]})})})]})})},Sho=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(Gr),r=M(t7t),i=M(n7t),a=M(o7t),l=M(r7t),s=M(En),c=M(LH),u=M(WH),d=M(no),f=M(Qn),p=uo(z.Polygon),[g,A]=m.useState((p==null?void 0:p.lineWidth)??1),y=$t(),{Option:S}=Uo,C=b=>{u(b.target.value)},P=b=>{if(p){switch(c){case re.AllSelectedObjectsOfThisType:for(const R of e)if(R.type===z.Polygon&&!R.locked&&M.getState().selectedElementIdSet.has(R.id)&&b!==R.lineWidth)return!0;break;case re.AllObjectsOfThisType:for(const R of e)if(R.type===z.Polygon&&!R.locked&&b!==R.lineWidth)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const R of e)if(R.type===z.Polygon&&R.parentId===p.parentId&&ye.isIdentical(R.normal,p.normal)&&!R.locked&&R.lineWidth!==b)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const R of e)if(R.type===z.Polygon&&R.foundationId===(p==null?void 0:p.foundationId)&&!R.locked&&R.lineWidth!==b)return!0;break;default:if(b!==(p==null?void 0:p.lineWidth))return!0}return!1}},v=(b,R)=>{M.getState().set(H=>{for(const F of H.elements)F.type===z.Polygon&&!F.locked&&b.has(F.id)&&(F.lineWidth=R)})},T=b=>{if(p&&P(b))switch(c){case re.AllSelectedObjectsOfThisType:{const R=new Map;for(const F of e)F.type===z.Polygon&&M.getState().selectedElementIdSet.has(F.id)&&R.set(F.id,F.lineWidth??1);const H={name:"Set Line Width for Selected Polygons",timestamp:Date.now(),oldValues:R,newValue:b,undo:()=>{for(const[F,E]of H.oldValues.entries())r(F,E)},redo:()=>{v(H.oldValues,H.newValue)}};s(H),v(R,b),f(d+1);break}case re.AllObjectsOfThisType:{const R=new Map;for(const F of e)F.type===z.Polygon&&R.set(F.id,F.lineWidth??1);const H={name:"Set Line Width for All Polygons",timestamp:Date.now(),oldValues:R,newValue:b,undo:()=>{for(const[F,E]of H.oldValues.entries())r(F,E)},redo:()=>{l(z.Polygon,H.newValue)}};s(H),l(z.Polygon,b),f(d+1);break}case re.AllObjectsOfThisTypeOnSurface:{if(o(p)){const H=new Map;for(const E of e)E.type===z.Polygon&&E.parentId===p.parentId&&ye.isIdentical(E.normal,p.normal)&&H.set(E.id,E.lineWidth??1);const F={name:"Set Line Width for All Polygons on Same Surface",timestamp:Date.now(),oldValues:H,newValue:b,groupId:p.parentId,normal:p.normal,undo:()=>{for(const[E,N]of F.oldValues.entries())r(E,N)},redo:()=>{F.groupId&&i(z.Polygon,F.groupId,F.normal,F.newValue)}};s(F),i(z.Polygon,p.parentId,p.normal,b),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(p.foundationId){const R=new Map;for(const F of e)F.type===z.Polygon&&F.foundationId===p.foundationId&&R.set(F.id,F.lineWidth??1);const H={name:"Set Line Width for All Polygons Above Foundation",timestamp:Date.now(),oldValues:R,newValue:b,groupId:p.foundationId,undo:()=>{for(const[F,E]of H.oldValues.entries())r(F,E)},redo:()=>{H.groupId&&a(z.Polygon,H.groupId,H.newValue)}};s(H),a(z.Polygon,p.foundationId,b),f(d+1)}break}default:{const R=n(p.id),H=R?R.lineWidth:p.lineWidth,F={name:"Set Line Width of Selected Polygon",timestamp:Date.now(),oldValue:H,newValue:b,changedElementId:p.id,changedElementType:p.type,undo:()=>{r(F.changedElementId,F.oldValue)},redo:()=>{r(F.changedElementId,F.newValue)}};s(F),r(p.id,b),f(d+1);break}}},w=()=>{t(!1)},x=()=>{T(g),t(!1),f(0)};return h.jsx(so,{width:560,title:Y.t("polygonMenu.LineWidth",y),onApply:x,onClose:w,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:10,children:h.jsxs(Uo,{style:{width:"200px"},value:g,onChange:b=>A(b),children:[h.jsx(S,{value:$y.One,children:h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"24px",width:"100%",height:"1px",border:"1px solid dimGray"}})},$y.One),h.jsx(S,{value:$y.Two,children:h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"24px",width:"100%",height:"1px",border:"2px solid dimGray"}})},$y.Two),h.jsx(S,{value:$y.Three,children:h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"24px",width:"100%",height:"1px",border:"3px solid dimGray"}})},$y.Three),h.jsx(S,{value:$y.Four,children:h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"24px",width:"100%",height:"1px",border:"4px solid dimGray"}})},$y.Four),h.jsx(S,{value:$y.Five,children:h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"24px",width:"100%",height:"1px",border:"5px solid dimGray"}})},$y.Five)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:14,children:h.jsx(Le.Group,{onChange:C,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("polygonMenu.OnlyThisPolygon",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("polygonMenu.AllPolygonsOnSurface",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("polygonMenu.AllPolygonsAboveFoundation",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("polygonMenu.AllSelectedPolygons",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("polygonMenu.AllPolygons",y)})]})})})]})})},Tho=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(Gr),r=M(dYe),i=M(Kwt),a=M(qwt),l=M(fYe),s=M(En),c=M(LH),u=M(WH),d=M(no),f=M(Qn),p=uo(z.Polygon),[g,A]=m.useState((p==null?void 0:p.color)??"gray"),y=$t(),S=x=>{u(x.target.value)},C=x=>{if(p){switch(c){case re.AllSelectedObjectsOfThisType:for(const b of e)if(b.type===z.Polygon&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&x!==b.color)return!0;break;case re.AllObjectsOfThisType:for(const b of e)if(b.type===z.Polygon&&!b.locked&&x!==b.color)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const b of e)if(b.type===z.Polygon&&b.foundationId===p.foundationId&&!b.locked&&b.color!==x)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const b of e)if(b.type===z.Polygon&&b.parentId===p.parentId&&ye.isIdentical(b.normal,p.normal)&&!b.locked&&b.color!==x)return!0;break;default:if(x!==p.color)return!0}return!1}},P=(x,b)=>{M.getState().set(R=>{for(const H of R.elements)H.type===z.Polygon&&!H.locked&&x.has(H.id)&&(H.color=b)})},v=x=>{if(p&&C(x))switch(c){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of e)H.type===z.Polygon&&M.getState().selectedElementIdSet.has(H.id)&&b.set(H.id,H.color??"gray");const R={name:"Set Fill Color for Selected Polygons",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{P(R.oldValues,R.newValue)}};s(R),P(b,x),f(d+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of e)H.type===z.Polygon&&b.set(H.id,H.color??"gray");const R={name:"Set Fill Color for All Polygons",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{l(z.Polygon,R.newValue)}};s(R),l(z.Polygon,x),f(d+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(p.foundationId){const b=new Map;for(const H of e)H.type===z.Polygon&&H.foundationId===p.foundationId&&b.set(H.id,H.color??"gray");const R={name:"Set Fill Color for All Polygons Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:p.foundationId,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{R.groupId&&a(z.Polygon,R.groupId,R.newValue)}};s(R),a(z.Polygon,p.foundationId,x),f(d+1)}break}case re.AllObjectsOfThisTypeOnSurface:{if(o(p)){const R=new Map;for(const F of e)F.type===z.Polygon&&F.parentId===p.parentId&&ye.isIdentical(F.normal,p.normal)&&R.set(F.id,F.color??"gray");const H={name:"Set Fill Color for All Polygons on Same Surface",timestamp:Date.now(),oldValues:R,newValue:x,groupId:p.parentId,normal:p.normal,undo:()=>{for(const[F,E]of H.oldValues.entries())r(F,E)},redo:()=>{H.groupId&&i(z.Polygon,H.groupId,H.normal,H.newValue)}};s(H),i(z.Polygon,p.parentId,p.normal,x),f(d+1)}break}default:{const b=n(p.id),R=b?b.color:p.color,H={name:"Set Fill Color of Selected Polygon",timestamp:Date.now(),oldValue:R,newValue:x,changedElementId:p.id,changedElementType:p.type,undo:()=>{r(H.changedElementId,H.oldValue)},redo:()=>{r(H.changedElementId,H.newValue)}};s(H),r(p.id,x),f(d+1);break}}},T=()=>{t(!1)},w=()=>{v(g)};return h.jsx(so,{width:600,title:Y.t("polygonMenu.FillColor",y),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:h.jsx(Ld,{color:g??(p==null?void 0:p.color)??"gray",onChangeComplete:x=>{A(x.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:12,children:h.jsx(Le.Group,{onChange:S,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("polygonMenu.OnlyThisPolygon",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("polygonMenu.AllPolygonsOnSurface",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("polygonMenu.AllPolygonsAboveFoundation",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("polygonMenu.AllSelectedPolygons",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("polygonMenu.AllPolygons",y)})]})})})]})})},Pho="/aladdin/assets/polygon_08_menu-RpvWW3pg.png",Cho="/aladdin/assets/polygon_09_menu-CCH8lYni.png",Rho="/aladdin/assets/polygon_10_menu-BYFeRpsw.png",Hho=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(En),a=M(LH),l=M(WH),s=M(no),c=M(Qn),u=uo(z.Polygon),[d,f]=m.useState((u==null?void 0:u.textureType)??Kr.NoTexture),p=$t(),{Option:g}=Uo,A=(R,H)=>{e(F=>{for(const E of F.elements)if(E.id===R&&E.type===z.Polygon&&!E.locked){E.textureType=H;break}})},y=(R,H,F)=>{e(E=>{for(const N of E.elements)N.type===z.Polygon&&N.parentId===R&&ye.isIdentical(N.normal,H)&&!N.locked&&(N.textureType=F)})},S=(R,H)=>{e(F=>{for(const E of F.elements)E.type===z.Polygon&&E.foundationId===R&&!E.locked&&(E.textureType=H)})},C=R=>{e(H=>{for(const F of H.elements)F.type===z.Polygon&&!F.locked&&(F.textureType=R)})},P=R=>{l(R.target.value)},v=R=>{if(u){switch(a){case re.AllSelectedObjectsOfThisType:for(const H of n)if(H.type===z.Polygon&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&R!==H.textureType)return!0;break;case re.AllObjectsOfThisType:for(const H of n)if(H.type===z.Polygon&&!H.locked&&R!==H.textureType)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const H of n)if(H.type===z.Polygon&&H.parentId===u.parentId&&ye.isIdentical(H.normal,u.normal)&&!H.locked&&H.textureType!==R)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const H of n)if(H.type===z.Polygon&&H.foundationId===u.foundationId&&!H.locked&&H.textureType!==R)return!0;break;default:if(R!==(u==null?void 0:u.textureType))return!0}return!1}},T=(R,H)=>{M.getState().set(F=>{for(const E of F.elements)E.type===z.Polygon&&!E.locked&&R.has(E.id)&&(E.textureType=H)})},w=R=>{if(u&&v(R))switch(a){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.Polygon&&M.getState().selectedElementIdSet.has(E.id)&&H.set(E.id,E.textureType??Kr.NoTexture);const F={name:"Set Texture for Selected Polygons",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())A(E,N)},redo:()=>{T(F.oldValues,F.newValue)}};i(F),T(H,R),c(s+1);break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.Polygon&&H.set(E.id,E.textureType??Kr.NoTexture);const F={name:"Set Texture for All Polygons",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())A(E,N)},redo:()=>{C(F.newValue)}};i(F),C(R),c(s+1);break}case re.AllObjectsOfThisTypeOnSurface:{if(r(u)){const F=new Map;for(const N of n)N.type===z.Polygon&&N.parentId===u.parentId&&ye.isIdentical(N.normal,u.normal)&&F.set(N.id,N.textureType??Kr.NoTexture);const E={name:"Set Texture for All Polygons on Same Surface",timestamp:Date.now(),oldValues:F,newValue:R,groupId:u.parentId,normal:u.normal,undo:()=>{for(const[N,U]of E.oldValues.entries())A(N,U)},redo:()=>{E.groupId&&y(E.groupId,E.normal,E.newValue)}};i(E),y(u.parentId,u.normal,R),c(s+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const H=new Map;for(const E of n)E.type===z.Polygon&&E.foundationId===u.foundationId&&H.set(E.id,E.textureType??Kr.NoTexture);const F={name:"Set Texture for All Polygons Above Foundation",timestamp:Date.now(),oldValues:H,newValue:R,groupId:u.foundationId,undo:()=>{for(const[E,N]of F.oldValues.entries())A(E,N)},redo:()=>{F.groupId&&S(F.groupId,F.newValue)}};i(F),S(u.foundationId,R),c(s+1)}break}default:{const H=o(u.id),F=H?H.textureType:u.textureType,E={name:"Set Texture of Selected Polygon",timestamp:Date.now(),oldValue:F,newValue:R,changedElementId:u.id,changedElementType:u.type,undo:()=>{A(E.changedElementId,E.oldValue)},redo:()=>{A(E.changedElementId,E.newValue)}};i(E),A(u.id,R),c(s+1);break}}},x=()=>{t(!1)},b=()=>{w(d)};return h.jsx(so,{width:500,title:Y.t("polygonMenu.FillTexture",p),onApply:b,onClose:x,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:10,children:h.jsxs(Uo,{style:{width:"150px"},value:d,onChange:R=>f(R),children:[h.jsxs(g,{value:Kr.NoTexture,children:[h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"12px",width:"32px",height:"20px",border:"1px dashed dimGray"},children:" "}),Y.t("shared.NoTexture",p)]},Kr.NoTexture),h.jsxs(g,{value:Kr.Texture01,children:[h.jsx("img",{alt:Kr.Texture01,src:Qnt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture01",p)]},Kr.Texture01),h.jsxs(g,{value:Kr.Texture02,children:[h.jsx("img",{alt:Kr.Texture02,src:Znt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture02",p)]},Kr.Texture02),h.jsxs(g,{value:Kr.Texture03,children:[h.jsx("img",{alt:Kr.Texture03,src:eot,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture03",p)]},Kr.Texture03),h.jsxs(g,{value:Kr.Texture04,children:[h.jsx("img",{alt:Kr.Texture04,src:tot,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture04",p)]},Kr.Texture04),h.jsxs(g,{value:Kr.Texture05,children:[h.jsx("img",{alt:Kr.Texture05,src:not,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture05",p)]},Kr.Texture05),h.jsxs(g,{value:Kr.Texture06,children:[h.jsx("img",{alt:Kr.Texture06,src:oot,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture06",p)]},Kr.Texture06),h.jsxs(g,{value:Kr.Texture07,children:[h.jsx("img",{alt:Kr.Texture07,src:rot,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture07",p)]},Kr.Texture07),h.jsxs(g,{value:Kr.Texture08,children:[h.jsx("img",{alt:Kr.Texture08,src:Pho,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture08",p)]},Kr.Texture08),h.jsxs(g,{value:Kr.Texture09,children:[h.jsx("img",{alt:Kr.Texture09,src:Cho,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture09",p)]},Kr.Texture09),h.jsxs(g,{value:Kr.Texture10,children:[h.jsx("img",{alt:Kr.Texture10,src:Rho,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture10",p)]},Kr.Texture10)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:14,children:h.jsx(Le.Group,{onChange:P,value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("polygonMenu.OnlyThisPolygon",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("polygonMenu.AllPolygonsOnSurface",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("polygonMenu.AllPolygonsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("polygonMenu.AllSelectedPolygons",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("polygonMenu.AllPolygons",p)})]})})})]})})},Mho=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(LH),r=M(WH),i=M(no),a=M(Qn),l=M(Jn),s=M(pn),c=uo(z.Polygon),[u,d]=m.useState((c==null?void 0:c.opacity)!==void 0?c.opacity:1),f=$t(),p=(v,T)=>{s(w=>{for(const x of w.elements)if(x.id===v){x.opacity=T;break}})},g=v=>{for(const[T,w]of v.entries())p(T,w)},A=(v,T)=>{for(const w of v.keys())p(w,T)},y=v=>{if(c){switch(o){case re.AllSelectedObjectsOfThisType:for(const T of e)if(T.type===z.Polygon&&v!==T.opacity&&!T.locked&&M.getState().selectedElementIdSet.has(T.id))return!0;break;case re.AllObjectsOfThisType:for(const T of e)if(T.type===z.Polygon&&v!==T.opacity&&!T.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const T of e)if(T.type===z.Polygon&&T.foundationId===c.foundationId&&v!==T.opacity&&!T.locked)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const T of e)if(T.type===z.Polygon&&T.parentId===c.parentId&&ye.isIdentical(T.normal,c.normal)&&v!==T.opacity&&!T.locked)return!0;break;default:if(v!==(c==null?void 0:c.opacity))return!0;break}return!1}},S=v=>{if(c&&y(v))switch(o){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of e)if(x.type===z.Polygon&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)){const b=x;T.set(x.id,b.opacity),p(b.id,v)}const w={name:"Set Opacity for Selected Polygons",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{g(w.oldValues)},redo:()=>{A(w.oldValues,w.newValue)}};n(w),a(i+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of e)if(x.type===z.Polygon&&!x.locked){const b=x;T.set(x.id,b.opacity),p(b.id,v)}const w={name:"Set Opacity for All Polygons",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{g(w.oldValues)},redo:()=>{A(w.oldValues,w.newValue)}};n(w),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(c.foundationId){const T=new Map;for(const x of e)if(x.type===z.Polygon&&x.foundationId===c.foundationId&&!x.locked){const b=x;T.set(x.id,b.opacity),p(b.id,v)}const w={name:"Set Opacity for All Polygons Above Foundation",timestamp:Date.now(),oldValues:T,newValue:v,groupId:c.foundationId,undo:()=>{g(w.oldValues)},redo:()=>{A(w.oldValues,w.newValue)}};n(w),a(i+1)}break}case re.AllObjectsOfThisTypeOnSurface:{if(c.parentId){const T=new Map;for(const x of e)if(x.type===z.Polygon&&x.parentId===c.parentId&&ye.isIdentical(x.normal,c.normal)&&!x.locked){const b=x;T.set(x.id,b.opacity),p(b.id,v)}const w={name:"Set Opacity for All Polygons Above Foundation",timestamp:Date.now(),oldValues:T,newValue:v,groupId:c.foundationId,undo:()=>{g(w.oldValues)},redo:()=>{A(w.oldValues,w.newValue)}};n(w),a(i+1)}break}default:if(c){const T=l(c.id),w=T.opacity!==void 0?T.opacity:c.opacity!==void 0?c.opacity:1,x={name:"Set Polygon Opacity",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:c.id,changedElementType:c.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};n(x),p(c.id,v),a(i+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:550,title:Y.t("polygonMenu.Opacity",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.1,precision:1,value:u,formatter:v=>Number(v).toFixed(1),onChange:v=>d(v)}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>r(v.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("polygonMenu.OnlyThisPolygon",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("polygonMenu.AllPolygonsOnSurface",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("polygonMenu.AllPolygonsAboveFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("polygonMenu.AllSelectedPolygons",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("polygonMenu.AllPolygons",f)})]})})})]})})};class qR{static create(e,n,o,r,i,a,l,s,c,u,d){if(n.type!==z.Foundation&&n.type!==z.Cuboid)throw new Error("base must be a foundation or cuboid");const f=[],p=ye.calculatePolygonBounds(e.vertices),g=(r===vr.portrait?o.length:o.width)*a;if(s===El.upDown){const A=Math.floor(((p.maxX()-p.minX())*n.lx-g)/l),y=p.minX()+g/(2*n.lx)+d/n.lx,S=l/n.lx,C=.5*Math.abs(Math.cos(i))*g/n.lx,P={x:0,y:-.5},v={x:0,y:.5},T=void 0;for(let w=0;w<=A;w++){const x=y+w*S;P.x=v.x=x-C;const b=ye.polygonIntersections(P,v,e.vertices).sort((F,E)=>F.y-E.y);P.x=v.x=x+C;const R=ye.polygonIntersections(P,v,e.vertices).sort((F,E)=>F.y-E.y),H=Math.max(b.length,R.length)/2;if(H>0)for(let F=0;FF.x-E.x);P.y=v.y=x+C;const R=ye.polygonIntersections(P,v,e.vertices).sort((F,E)=>F.x-E.x),H=Math.max(b.length,R.length)/2;if(H>0)for(let F=0;F0)return Va.makeSolarPanel(s,c,a*s.lx,(A+y)/2*s.ly,s.cz,vr.portrait,d,f,u,Qt,ko,i,void 0,S*s.ly,l)}static makeLeftRightSegment(e,n,o,r,i,a,l,s,c,u,d,f,p){const g=Math.abs(e.x-n.x)0)return Va.makeSolarPanel(s,c,(A+y)/2*s.lx,a*s.ly,s.cz,vr.portrait,d,f,u,0,ko,i,void 0,S*s.lx,l)}}class Iho{static create(e,n,o,r,i,a,l,s,c,u,d){if(n.type!==z.Foundation&&n.type!==z.Cuboid)throw new Error("base must be a foundation or cuboid");const f=[],p=!ye.isZero(n.rotation[2]),g=[];for(const P of e.vertices)g.push({x:P.x*n.lx+n.cx,y:P.y*n.ly+n.cy});const A=p?ye.rotatePolygon(g,n.cx,n.cy,n.rotation[2]):g,y=ye.calculatePolygonBounds(A),S=(r===vr.portrait?o.length:o.width)*a,C=.5*Math.abs(Math.cos(i))*S;if(s===El.eastWest){const P=y.maxY()-y.minY(),v=Math.floor((P-2*d-S)/l),T=y.minY()+S/2+d,w={x:y.minX(),y:0},x={x:y.maxX(),y:0};for(let b=0;b<=v;b++){const R=T+b*l;w.y=x.y=R-C;const H=ye.polygonIntersections(w,x,A).sort((N,U)=>N.x-U.x);w.y=x.y=R+C;const F=ye.polygonIntersections(w,x,A).sort((N,U)=>N.x-U.x),E=Math.max(H.length,F.length)/2;if(E>0)for(let N=0;N0){const $=ye.relativeCoordinates((B+O)/2,R,0,n),ie=Va.makeSolarPanel(n,o,$.x*n.lx,$.y*n.ly,n.cz,vr.portrait,c,u,i,-n.rotation[2],ko,[0,0,0],void 0,Q,S);ie.referenceId=e.id,ye.changeOrientation(ie,o,r),f.push(ie)}}}}else if(s===El.northSouth){const P=y.maxX()-y.minX(),v=Math.floor((P-2*d-S)/l),T=y.minX()+S/2+d,w={x:0,y:y.minY()},x={x:0,y:y.maxY()};for(let b=0;b<=v;b++){const R=T+b*l;w.x=x.x=R-C;const H=ye.polygonIntersections(w,x,A).sort((N,U)=>N.y-U.y);w.x=x.x=R+C;const F=ye.polygonIntersections(w,x,A).sort((N,U)=>N.y-U.y),E=Math.max(H.length,F.length)/2;if(E>0)for(let N=0;N0){const $=ye.relativeCoordinates(R,(V+G)/2,0,n),ie=Va.makeSolarPanel(n,o,$.x*n.lx,$.y*n.ly,n.cz,vr.portrait,c,u,i,-n.rotation[2]+Qt,ko,[0,0,0],void 0,Q,S);ie.referenceId=e.id,ye.changeOrientation(ie,o,r),f.push(ie)}}}}return f}}const{Option:nv}=Uo,zho=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M.getState().solarPanelArrayLayoutParams,r=M(Db),i=M(Gr),a=M(yW),l=M(DH),s=M(t5),c=M(Owt),u=M(m7t),d=M(Vge),f=M(g7t),p=M(En),g=M(no),A=M(Qn),y=M(Xi),[S,C]=m.useState(!1),[P,v]=m.useState(!1),[T,w]=m.useState(!1),[x,b]=m.useState({left:0,top:0,bottom:0,right:0}),R=m.useRef(null),H=m.useRef(!0),F=m.useRef(null),E=m.useRef(null),N=m.useRef(!1),U=m.useRef(M(x4t)),W=m.useRef(M(b4t)),k=m.useRef(M(M4t)),D=m.useRef(M(H4t)),L=m.useRef(M(S4t)),j=m.useRef(M(T4t)),B=m.useRef(M(P4t)??0),O=m.useRef(M(C4t)),V=m.useRef(M(R4t)),G=$t(),Q=s(U.current),$=r(),ie=m.useMemo(()=>({...l,...a}),[a,l]);m.useEffect(()=>{var ge;(ge=F.current)==null||ge.focus()},[]),m.useEffect(()=>{var ge;P&&((ge=E.current)==null||ge.focus())},[P]);const q=(ge,Se)=>{if(R.current){const{clientWidth:Re,clientHeight:De}=window.document.documentElement,Ae=R.current.getBoundingClientRect();b({left:-Ae.left+Se.x,right:Re-(Ae.right-Se.x),top:-Ae.top+Se.y,bottom:De-((Ae==null?void 0:Ae.bottom)-Se.y)})}},se=()=>{const ge=(k.current===vr.portrait?Q.length:Q.width)*L.current;return .5*(ge*Math.abs(Math.sin(D.current)))>O.current?(co(Y.t("message.SolarPanelsCannotIntersectWithGround",G)),!1):ge>j.current?(co(Y.t("message.SolarPanelsCannotOverlapWithOneAnother",G)),!1):!0},Z=ge=>{const Se=n.filter(Re=>Re.type===z.SolarPanel&&Re.parentId===ge.parentId);if(Se.length>0)for(const Re of Se)Re.referenceId!==ge.id&&ye.isPointInside(Re.cx,Re.cy,ge.vertices)&&c(Re.id,ge.id)},ee=()=>{if(($==null?void 0:$.type)===z.Polygon){const ge=i($);if(ge){const Se=[],De=W.current===El.eastWest||W.current===El.northSouth?Iho.create($,ge,Q,k.current,D.current,L.current,j.current,W.current,O.current,V.current,B.current):qR.create($,ge,Q,k.current,D.current,L.current,j.current,W.current,O.current,V.current,B.current);if(De.length>0){for(const ue of De)Se.push(JSON.parse(JSON.stringify(ue))),e(fe=>{fe.elements.push(ue)});const Ae={name:"Solar Panel Array Layout",timestamp:Date.now(),oldElements:M.getState().deletedElements,newElements:Se,oldParams:{pvModelName:o.pvModelName,rowAxis:o.rowAxis,orientation:o.orientation,tiltAngle:o.tiltAngle,rowsPerRack:o.rowsPerRack,interRowSpacing:o.interRowSpacing,poleHeight:o.poleHeight,poleSpacing:o.poleSpacing,margin:o.margin},newParams:{pvModelName:U.current,rowAxis:W.current,orientation:k.current,tiltAngle:D.current,rowsPerRack:L.current,interRowSpacing:j.current,poleHeight:O.current,poleSpacing:V.current,margin:B.current},referenceId:$.id,undo:()=>{d(Ae.referenceId,!1),Ae.oldElements.length>0&&e(ue=>{for(const fe of Ae.oldElements)ue.elements.push(fe)}),te(Ae.oldParams),oe()},redo:()=>{d(Ae.referenceId,!1),Ae.newElements.length>0&&e(ue=>{for(const fe of Ae.newElements)ue.elements.push(fe)}),te(Ae.newParams),oe()}};p(Ae),A(g+1)}}H.current=!1,oe()}},te=ge=>{U.current=ge.pvModelName,W.current=ge.rowAxis,k.current=ge.orientation,D.current=ge.tiltAngle,L.current=ge.rowsPerRack,j.current=ge.interRowSpacing,O.current=ge.poleHeight,V.current=ge.poleSpacing,B.current=ge.margin??0},oe=()=>{e(ge=>{ge.solarPanelArrayLayoutParams.pvModelName=U.current,ge.solarPanelArrayLayoutParams.rowAxis=W.current,ge.solarPanelArrayLayoutParams.orientation=k.current,ge.solarPanelArrayLayoutParams.tiltAngle=D.current,ge.solarPanelArrayLayoutParams.rowsPerRack=L.current,ge.solarPanelArrayLayoutParams.interRowSpacing=j.current,ge.solarPanelArrayLayoutParams.poleHeight=O.current,ge.solarPanelArrayLayoutParams.poleSpacing=V.current,ge.solarPanelArrayLayoutParams.margin=B.current})},de=()=>{H.current&&(se()?$&&(Z($),u($.id)>0?v(!0):(f(),ee())):co(Y.t("polygonMenu.LayoutNotAcceptedCheckYourParameters",G)))},he=()=>{de(),N.current=!1},pe=()=>{t(!1),y(),H.current=!0,N.current=!1},me=()=>{H.current?(de(),N.current=!0):t(!1)},le=()=>{v(!1)},Te=()=>{$&&(d($.id,!0),ee(),N.current&&(t(!1),A(0))),v(!1)};return h.jsxs(h.Fragment,{children:[P&&h.jsx(xi,{width:400,open:P,title:h.jsx("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>w(!0),onMouseOut:()=>w(!1),children:Y.t("word.Reminder",G)}),footer:[h.jsx(io,{onClick:le,children:Y.t("word.Cancel",G)},"Cancel"),h.jsx(io,{type:"primary",ref:E,onClick:Te,children:Y.t("word.OK",G)},"OK")],children:Y.t("message.ExistingSolarPanelsWillBeRemovedBeforeApplyingNewLayout",G)+" "+Y.t("message.DoYouWantToContinue",G)}),h.jsxs(xi,{width:640,open:!0,title:h.jsx("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>w(!0),onMouseOut:()=>w(!1),children:Y.t("polygonMenu.SolarPanelArrayLayoutParametricDesign",G)}),footer:[h.jsx(io,{disabled:!H.current,onClick:he,children:Y.t("word.Apply",G)},"Apply"),h.jsx(io,{onClick:pe,children:Y.t("word.Cancel",G)},"Cancel"),h.jsx(io,{type:"primary",ref:F,onClick:me,children:Y.t("word.OK",G)},"OK")],onCancel:()=>{t(!1),H.current=!0},maskClosable:!1,destroyOnClose:!1,modalRender:ge=>h.jsx(Bi,{disabled:!T,bounds:x,onStart:(Se,Re)=>q(Se,Re),children:h.jsx("div",{ref:R,children:ge})}),children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px",paddingTop:"10px"},children:[h.jsx(Ke,{span:13,children:Y.t("polygonMenu.SolarPanelArrayModel",G)+" ("+Object.keys(ie).length+" "+Y.t("word.Options",G)+"):"}),h.jsx(Ke,{span:11,children:h.jsx(Uo,{defaultValue:"Custom",style:{width:"100%"},value:U.current,onChange:ge=>{ge!==null&&(U.current=ge,H.current=!0,C(!S))},children:Object.keys(ie).map(ge=>h.jsx(nv,{value:ge,children:ge+(ie[ge].bifacialityFactor>0?" ("+Y.t("pvModelPanel.Bifacial",G)+")":"")},ge))})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("polygonMenu.SolarPanelArrayRowAxis",G)+":"}),h.jsx(Ke,{span:11,children:h.jsxs(Uo,{style:{width:"100%"},value:W.current,onChange:ge=>{ge!==null&&(W.current=ge,H.current=!0,C(!S))},children:[h.jsx(nv,{value:El.leftRight,children:Y.t("polygonMenu.SolarPanelArrayLeftRightRowAxis",G)},El.leftRight),h.jsx(nv,{value:El.upDown,children:Y.t("polygonMenu.SolarPanelArrayUpDownRowAxis",G)},El.upDown),h.jsx(nv,{value:El.eastWest,children:Y.t("polygonMenu.SolarPanelArrayEastWestRowAxis",G)},El.eastWest),h.jsx(nv,{value:El.northSouth,children:Y.t("polygonMenu.SolarPanelArrayNorthSouthRowAxis",G)},El.northSouth)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("polygonMenu.SolarPanelArrayOrientation",G)+":"}),h.jsx(Ke,{span:11,children:h.jsxs(Uo,{style:{width:"100%"},value:k.current,onChange:ge=>{ge!==null&&(k.current=ge,H.current=!0,C(!S))},children:[h.jsx(nv,{value:vr.portrait,children:Y.t("solarPanelMenu.Portrait",G)},vr.portrait),h.jsx(nv,{value:vr.landscape,children:Y.t("solarPanelMenu.Landscape",G)},vr.landscape)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("polygonMenu.SolarPanelArrayTiltAngle",G)+" ([-90°, 90°]): "}),h.jsx(Ke,{span:11,children:h.jsx(Sn,{min:-90,max:90,style:{width:"100%"},precision:2,value:parseFloat(ye.toDegrees(D.current).toFixed(2)),step:1,formatter:ge=>`${ge}°`,onChange:ge=>{ge!==null&&(D.current=ye.toRadians(ge),H.current=!0,C(!S))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("polygonMenu.SolarPanelArrayRowWidth",G)+" ([1-100] "+Y.t("solarPanelMenu.Panels",G)+"): "}),h.jsx(Ke,{span:11,children:h.jsx(Sn,{min:1,max:100,step:1,style:{width:"100%"},precision:0,formatter:ge=>Number(ge).toFixed(0),value:L.current,onChange:ge=>{ge!==null&&(L.current=ge,H.current=!0,C(!S))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("polygonMenu.SolarPanelArrayInterRowSpacing",G)+" ([1, 20] "+Y.t("word.MeterAbbreviation",G)+"): "}),h.jsx(Ke,{span:11,children:h.jsx(Sn,{min:1,max:20,style:{width:"100%"},precision:2,value:j.current,step:.5,onChange:ge=>{ge!==null&&(j.current=ge,H.current=!0,C(!S))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("polygonMenu.SolarPanelArrayMargin",G)+" ([0, 5] "+Y.t("word.MeterAbbreviation",G)+"): "}),h.jsx(Ke,{span:11,children:h.jsx(Sn,{min:0,max:5,style:{width:"100%"},precision:1,value:B.current,step:.1,onChange:ge=>{ge!==null&&(B.current=ge,H.current=!0,C(!S))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("polygonMenu.SolarPanelArrayPoleHeight",G)+" ([0, 10] "+Y.t("word.MeterAbbreviation",G)+"): "}),h.jsx(Ke,{span:11,children:h.jsx(Sn,{min:0,max:10,style:{width:"100%"},precision:2,value:O.current,step:.1,onChange:ge=>{ge!==null&&(O.current=ge,H.current=!0,C(!S))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("polygonMenu.SolarPanelArrayPoleSpacing",G)+" ([2, 50] "+Y.t("word.MeterAbbreviation",G)+"): "}),h.jsx(Ke,{span:11,children:h.jsx(Sn,{min:2,max:50,style:{width:"100%"},precision:2,value:V.current,step:.5,onChange:ge=>{ge!==null&&(V.current=ge,H.current=!0,C(!S))}})})]})]})]})},{Option:Yh}=Uo,Dho=({setDialogVisible:t})=>{const e=M(pn),n=M(oa),o=M(m0),r=dt(n5),i=M(yW),a=M(DH),l=M(c3),s=M(Gr),c=M(s3),u=M(bA).geneticAlgorithmParams,d=M(c$),f=M(xxt),p=M(a$),[g,A]=m.useState(!1),[y,S]=m.useState(!1),[C,P]=m.useState({left:0,top:0,bottom:0,right:0}),v=m.useRef(null),T=m.useRef(u.objectiveFunctionType),w=m.useRef(u.selectionMethod),x=m.useRef(u.searchMethod),b=m.useRef(u.populationSize),R=m.useRef(u.maximumGenerations),H=m.useRef(u.mutationRate),F=m.useRef(u.selectionRate??.5),E=m.useRef(u.crossoverRate??.5),N=m.useRef(u.convergenceThreshold),U=m.useRef(u.localSearchRadius),W=m.useRef(d.minimumTiltAngle??-Qt),k=m.useRef(d.maximumTiltAngle??Qt),D=m.useRef(d.minimumRowsPerRack),L=m.useRef(d.maximumRowsPerRack),j=m.useRef(d.minimumInterRowSpacing),B=m.useRef(d.maximumInterRowSpacing),O=m.useRef(null),V=m.useMemo(()=>({...a,...i}),[i,a]);m.useEffect(()=>{var ge;(ge=O.current)==null||ge.focus()},[]);const G={lng:o},Q=m.useRef(d.rowAxis??El.leftRight),$=l?s(l):void 0,ie=$?c(z.SolarPanel,$.id):void 0,q=m.useRef(ie&&ie.length>0?ie[0].pvModelName:d.pvModelName??"CS6X-355P-FG"),se=m.useRef(ie&&ie.length>0?ie[0].orientation:d.orientation??vr.landscape),Z=m.useRef(ie&&ie.length>0?ie[0].poleHeight:d.poleHeight??1),ee=m.useRef(ie&&ie.length>0?ie[0].poleSpacing:d.poleSpacing??3),te=m.useRef(d.margin??0),oe=m.useRef(p.electricitySellingPrice),de=m.useRef(p.operationalCostPerUnit);m.useEffect(()=>{oe.current=p.electricitySellingPrice},[p.electricitySellingPrice]),m.useEffect(()=>{de.current=p.operationalCostPerUnit},[p.operationalCostPerUnit]);const he=(ge,Se)=>{if(v.current){const{clientWidth:Re,clientHeight:De}=window.document.documentElement,Ae=v.current.getBoundingClientRect();P({left:-Ae.left+Se.x,right:Re-(Ae.right-Se.x),top:-Ae.top+Se.y,bottom:De-((Ae==null?void 0:Ae.bottom)-Se.y)})}},pe=()=>{e(ge=>{ge.evolutionaryAlgorithmState.geneticAlgorithmParams.problem=Ri.SOLAR_PANEL_ARRAY,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.objectiveFunctionType=T.current,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.selectionMethod=w.current,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.searchMethod=x.current,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.populationSize=b.current,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.maximumGenerations=R.current,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.selectionRate=F.current,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.crossoverRate=E.current,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.mutationRate=H.current,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.convergenceThreshold=N.current,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.localSearchRadius=U.current,ge.solarPanelArrayLayoutConstraints||(ge.solarPanelArrayLayoutConstraints=new mX),ge.solarPanelArrayLayoutConstraints.minimumRowsPerRack=D.current,ge.solarPanelArrayLayoutConstraints.maximumRowsPerRack=L.current,ge.solarPanelArrayLayoutConstraints.minimumTiltAngle=W.current,ge.solarPanelArrayLayoutConstraints.maximumTiltAngle=k.current,ge.solarPanelArrayLayoutConstraints.minimumInterRowSpacing=j.current,ge.solarPanelArrayLayoutConstraints.maximumInterRowSpacing=B.current,ge.solarPanelArrayLayoutConstraints.poleHeight=Z.current,ge.solarPanelArrayLayoutConstraints.poleSpacing=ee.current,ge.solarPanelArrayLayoutConstraints.pvModelName=q.current,ge.solarPanelArrayLayoutConstraints.rowAxis=Q.current,ge.solarPanelArrayLayoutConstraints.orientation=se.current,ge.solarPanelArrayLayoutConstraints.margin=te.current,ge.economicsParams.operationalCostPerUnit=de.current,ge.economicsParams.electricitySellingPrice=oe.current})},me=()=>{r||gn(le("message.EvolutionStarted",G)),pe(),setTimeout(()=>{dt.getState().set(ge=>{ge.runEvolution=!ge.runEvolution}),e(ge=>{ge.evolutionMethod=_s.GENETIC_ALGORITHM,n&&(ge.actionInfo={name:"Run Genetic Algorithm for Solar Panel Array Layout",timestamp:new Date().getTime(),details:{...M.getState().evolutionaryAlgorithmState.geneticAlgorithmParams,...M.getState().solarPanelArrayLayoutConstraints,...M.getState().economicsParams}})})},100)},{t:le}=Xl(),Te=[{key:"1",label:le("optimizationMenu.Parameters",G),children:h.jsxs(h.Fragment,{children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.Objective",G)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:T.current,style:{width:"100%"},value:T.current,onChange:ge=>{T.current=ge,A(!g)},children:[h.jsx(Yh,{value:Po.DAILY_TOTAL_OUTPUT,children:le("optimizationMenu.ObjectiveFunctionDailyTotalYield",G)},Po.DAILY_TOTAL_OUTPUT),h.jsx(Yh,{value:Po.YEARLY_TOTAL_OUTPUT,children:le("optimizationMenu.ObjectiveFunctionYearlyTotalYield",G)},Po.YEARLY_TOTAL_OUTPUT),h.jsx(Yh,{value:Po.DAILY_AVERAGE_OUTPUT,children:le("optimizationMenu.ObjectiveFunctionDailyMeanYield",G)},Po.DAILY_AVERAGE_OUTPUT),h.jsx(Yh,{value:Po.YEARLY_AVERAGE_OUTPUT,children:le("optimizationMenu.ObjectiveFunctionYearlyMeanYield",G)},Po.YEARLY_AVERAGE_OUTPUT),h.jsx(Yh,{value:Po.DAILY_PROFIT,children:le("optimizationMenu.ObjectiveFunctionDailyProfit",G)},Po.DAILY_PROFIT),h.jsx(Yh,{value:Po.YEARLY_PROFIT,children:le("optimizationMenu.ObjectiveFunctionYearlyProfit",G)},Po.YEARLY_PROFIT)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.GeneticAlgorithmSelectionMethod",G)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:w.current,style:{width:"100%"},value:w.current,onChange:ge=>{w.current=ge,A(!g)},children:[h.jsx(Yh,{value:Wm.ROULETTE_WHEEL,children:le("optimizationMenu.RouletteWheel",G)},Wm.ROULETTE_WHEEL),h.jsx(Yh,{value:Wm.TOURNAMENT,children:le("optimizationMenu.Tournament",G)},Wm.TOURNAMENT)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.PopulationSize",G)+" [10, 100]:"}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:10,max:100,style:{width:"100%"},precision:0,value:b.current,step:1,formatter:ge=>Number(ge).toFixed(0),onChange:ge=>{ge!==null&&(b.current=Number(ge),A(!g))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.MaximumGenerations",G)+" [5, 100]:"}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:5,max:100,step:1,style:{width:"100%"},precision:0,value:R.current,formatter:ge=>Number(ge).toFixed(0),onChange:ge=>{ge!==null&&(R.current=Number(ge),A(!g))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.SelectionRate",G)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:F.current,step:.01,onChange:ge=>{ge!==null&&(F.current=Number(ge),A(!g))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.CrossoverRate",G)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:E.current,step:.01,onChange:ge=>{ge!==null&&(E.current=Number(ge),A(!g))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.MutationRate",G)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:H.current,step:.01,onChange:ge=>{ge!==null&&(H.current=Number(ge),A(!g))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.ConvergenceThreshold",G)+" (0, 0.1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:.001,max:.1,style:{width:"100%"},precision:3,value:N.current,step:.001,onChange:ge=>{ge!==null&&(N.current=Number(ge),A(!g))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.SearchMethod",G)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:x.current,style:{width:"100%"},value:x.current,onChange:ge=>{x.current=Number(ge),A(!g)},children:[h.jsx(Yh,{value:ds.GLOBAL_SEARCH_UNIFORM_SELECTION,children:le("optimizationMenu.GlobalSearchUniformSelection",G)},ds.GLOBAL_SEARCH_UNIFORM_SELECTION),h.jsx(Yh,{value:ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION,children:le("optimizationMenu.LocalSearchRandomOptimization",G)},ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION)]})})]}),x.current===ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION&&h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.LocalSearchRadius",G)+" ([0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:U.current,step:.01,onChange:ge=>{ge!==null&&(U.current=Number(ge),A(!g))}})})]})]})},{key:"2",label:le("optimizationMenu.Variables",G),children:h.jsxs(h.Fragment,{children:[h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.TiltAngleRange",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{range:!0,onChange:ge=>{W.current=ye.toRadians(ge[0]),k.current=ye.toRadians(ge[1]),A(!g)},min:-90,max:90,defaultValue:[ye.toDegrees(W.current),ye.toDegrees(k.current)],marks:{"-90":{style:{fontSize:"10px"},label:"-90°"},"-45":{style:{fontSize:"10px"},label:"-45°"},0:{style:{fontSize:"10px"},label:"0°"},45:{style:{fontSize:"10px"},label:"45°"},90:{style:{fontSize:"10px"},label:"90°"}}})})]}),h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.RowsPerRackRange",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{range:!0,onChange:ge=>{D.current=ge[0],L.current=ge[1],A(!g)},min:1,max:9,defaultValue:[D.current,L.current],marks:{1:{style:{fontSize:"10px"},label:1},2:{style:{fontSize:"10px"},label:2},3:{style:{fontSize:"10px"},label:3},4:{style:{fontSize:"10px"},label:4},5:{style:{fontSize:"10px"},label:5},6:{style:{fontSize:"10px"},label:6},7:{style:{fontSize:"10px"},label:7},8:{style:{fontSize:"10px"},label:8},9:{style:{fontSize:"10px"},label:9}}})})]}),h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.InterRowSpacingRange",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{range:!0,onChange:ge=>{j.current=ge[0],B.current=ge[1],A(!g)},min:1,max:10,defaultValue:[j.current,B.current],marks:{1:{style:{fontSize:"10px"},label:"1m"},3:{style:{fontSize:"10px"},label:"3m"},5:{style:{fontSize:"10px"},label:"5m"},7:{style:{fontSize:"10px"},label:"7m"},9:{style:{fontSize:"10px"},label:"9m"}}})})]})]})},{key:"3",label:le("optimizationMenu.Constants",G),children:h.jsxs(h.Fragment,{children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"6px",paddingTop:"0px"},children:[h.jsx(Ke,{span:12,children:le("polygonMenu.SolarPanelArrayModel",G)+" ("+Object.keys(V).length+" "+le("word.Options",G)+"):"}),h.jsx(Ke,{span:12,children:h.jsx(Uo,{defaultValue:"Custom",style:{width:"100%"},value:q.current,onChange:ge=>{q.current=ge,A(!g)},children:Object.keys(V).map(ge=>h.jsx(Yh,{value:ge,children:ge+(V[ge].bifacialityFactor>0?" ("+le("pvModelPanel.Bifacial",G)+")":"")},ge))})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"6px",paddingTop:"8px"},children:[h.jsx(Ke,{span:12,children:le("polygonMenu.SolarPanelArrayRowAxis",G)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{style:{width:"100%"},value:Q.current,onChange:ge=>{Q.current=ge,A(!g)},children:[h.jsx(Yh,{value:El.leftRight,children:le("polygonMenu.SolarPanelArrayLeftRightRowAxis",G)},El.leftRight),h.jsx(Yh,{value:El.upDown,children:le("polygonMenu.SolarPanelArrayUpDownRowAxis",G)},El.upDown)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"6px",paddingTop:"8px"},children:[h.jsx(Ke,{span:12,children:le("polygonMenu.SolarPanelArrayOrientation",G)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{style:{width:"100%"},value:se.current,onChange:ge=>{se.current=ge,A(!g)},children:[h.jsx(Yh,{value:vr.portrait,children:le("solarPanelMenu.Portrait",G)},vr.portrait),h.jsx(Yh,{value:vr.landscape,children:le("solarPanelMenu.Landscape",G)},vr.landscape)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("polygonMenu.SolarPanelArrayMargin",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{te.current=ge,A(!g)},min:0,max:5,step:.1,defaultValue:te.current,marks:{0:{style:{fontSize:"10px"},label:"0m"},1:{style:{fontSize:"10px"},label:"1m"},2:{style:{fontSize:"10px"},label:"2m"},3:{style:{fontSize:"10px"},label:"3m"},4:{style:{fontSize:"10px"},label:"4m"},5:{style:{fontSize:"10px"},label:"5m"}}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("solarCollectorMenu.PoleHeight",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{Z.current=ge,A(!g)},min:0,max:10,step:.1,defaultValue:Z.current,marks:{0:{style:{fontSize:"10px"},label:"0m"},2:{style:{fontSize:"10px"},label:"2m"},4:{style:{fontSize:"10px"},label:"4m"},6:{style:{fontSize:"10px"},label:"6m"},8:{style:{fontSize:"10px"},label:"8m"},10:{style:{fontSize:"10px"},label:"10m"}}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("solarPanelMenu.PoleSpacing",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{ee.current=ge,A(!g)},min:2,max:10,step:.1,defaultValue:ee.current,marks:{2:{style:{fontSize:"10px"},label:"2m"},4:{style:{fontSize:"10px"},label:"4m"},6:{style:{fontSize:"10px"},label:"6m"},8:{style:{fontSize:"10px"},label:"8m"},10:{style:{fontSize:"10px"},label:"10m"}}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("economicsPanel.OperationalCostPerUnit",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{de.current=ge,A(!g)},min:.1,max:1,step:.01,defaultValue:de.current,marks:{.1:{style:{fontSize:"10px"},label:"10¢"},.3:{style:{fontSize:"10px"},label:"30¢"},.5:{style:{fontSize:"10px"},label:"50¢"},.7:{style:{fontSize:"10px"},label:"70¢"},.9:{style:{fontSize:"10px"},label:"90¢"}}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("economicsPanel.ElectricitySellingPrice",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{oe.current=ge,A(!g)},min:.1,max:1,step:.01,defaultValue:oe.current,marks:{.1:{style:{fontSize:"10px"},label:"10¢"},.3:{style:{fontSize:"10px"},label:"30¢"},.5:{style:{fontSize:"10px"},label:"50¢"},.7:{style:{fontSize:"10px"},label:"70¢"},.9:{style:{fontSize:"10px"},label:"90¢"}}})})]})]})}];return h.jsx(h.Fragment,{children:h.jsx(xi,{width:640,open:!0,title:h.jsx("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>S(!0),onMouseOut:()=>S(!1),children:le("optimizationMenu.SolarPanelArrayLayout",G)+": "+le("optimizationMenu.GeneticAlgorithmSettings",G)}),footer:[h.jsx(io,{onClick:()=>{t(!1)},children:le("word.Cancel",G)},"Cancel"),h.jsx(io,{type:"primary",ref:O,onClick:()=>{me(),t(!1)},children:le("word.Run",G)},"Run")],onCancel:()=>{t(!1)},maskClosable:!1,destroyOnClose:!1,modalRender:ge=>h.jsx(Bi,{disabled:!y,bounds:C,onStart:(Se,Re)=>he(Se,Re),children:h.jsx("div",{ref:v,children:ge})}),children:h.jsx(hQ,{defaultActiveKey:f,items:Te,type:"card",onChange:ge=>{e(Se=>{Se.geneticAlgorithmWizardSelectedTab=ge})}})})})},{Option:O1}=Uo,Eho=({setDialogVisible:t})=>{const e=M(pn),n=M(oa),o=M(m0),r=dt(n5),i=M(yW),a=M(DH),l=M(c3),s=M(Gr),c=M(s3),u=M(bA).particleSwarmOptimizationParams,d=M(c$),f=M(bxt),p=M(a$),[g,A]=m.useState(!1),[y,S]=m.useState(!1),[C,P]=m.useState({left:0,top:0,bottom:0,right:0}),v=m.useRef(null),T=m.useRef(u.objectiveFunctionType),w=m.useRef(u.searchMethod),x=m.useRef(u.swarmSize),b=m.useRef(u.maximumSteps),R=m.useRef(u.vmax??.01),H=m.useRef(u.inertia??.8),F=m.useRef(u.cognitiveCoefficient??.1),E=m.useRef(u.socialCoefficient??.1),N=m.useRef(u.convergenceThreshold),U=m.useRef(u.localSearchRadius),W=m.useRef(d.minimumTiltAngle??-Qt),k=m.useRef(d.maximumTiltAngle??Qt),D=m.useRef(d.minimumRowsPerRack),L=m.useRef(d.maximumRowsPerRack),j=m.useRef(d.minimumInterRowSpacing),B=m.useRef(d.maximumInterRowSpacing),O=m.useRef(null),V=m.useMemo(()=>({...a,...i}),[i,a]);m.useEffect(()=>{var ge;(ge=O.current)==null||ge.focus()},[]);const G={lng:o},Q=m.useRef(d.rowAxis??El.leftRight),$=l?s(l):void 0,ie=$?c(z.SolarPanel,$.id):void 0,q=m.useRef(ie&&ie.length>0?ie[0].pvModelName:d.pvModelName??"CS6X-355P-FG"),se=m.useRef(ie&&ie.length>0?ie[0].orientation:d.orientation??vr.landscape),Z=m.useRef(ie&&ie.length>0?ie[0].poleHeight:d.poleHeight??1),ee=m.useRef(ie&&ie.length>0?ie[0].poleSpacing:d.poleSpacing??3),te=m.useRef(d.margin??0),oe=m.useRef(p.electricitySellingPrice),de=m.useRef(p.operationalCostPerUnit);m.useEffect(()=>{oe.current=p.electricitySellingPrice},[p.electricitySellingPrice]),m.useEffect(()=>{de.current=p.operationalCostPerUnit},[p.operationalCostPerUnit]);const he=(ge,Se)=>{if(v.current){const{clientWidth:Re,clientHeight:De}=window.document.documentElement,Ae=v.current.getBoundingClientRect();P({left:-Ae.left+Se.x,right:Re-(Ae.right-Se.x),top:-Ae.top+Se.y,bottom:De-((Ae==null?void 0:Ae.bottom)-Se.y)})}},pe=()=>{e(ge=>{ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.problem=Ri.SOLAR_PANEL_ARRAY,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.objectiveFunctionType=T.current,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.searchMethod=w.current,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.swarmSize=x.current,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.maximumSteps=b.current,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.cognitiveCoefficient=F.current,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.socialCoefficient=E.current,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.vmax=R.current,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.inertia=H.current,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.convergenceThreshold=N.current,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.localSearchRadius=U.current,ge.solarPanelArrayLayoutConstraints||(ge.solarPanelArrayLayoutConstraints=new mX),ge.solarPanelArrayLayoutConstraints.minimumRowsPerRack=D.current,ge.solarPanelArrayLayoutConstraints.maximumRowsPerRack=L.current,ge.solarPanelArrayLayoutConstraints.minimumTiltAngle=W.current,ge.solarPanelArrayLayoutConstraints.maximumTiltAngle=k.current,ge.solarPanelArrayLayoutConstraints.minimumInterRowSpacing=j.current,ge.solarPanelArrayLayoutConstraints.maximumInterRowSpacing=B.current,ge.solarPanelArrayLayoutConstraints.poleHeight=Z.current,ge.solarPanelArrayLayoutConstraints.poleSpacing=ee.current,ge.solarPanelArrayLayoutConstraints.pvModelName=q.current,ge.solarPanelArrayLayoutConstraints.rowAxis=Q.current,ge.solarPanelArrayLayoutConstraints.orientation=se.current,ge.solarPanelArrayLayoutConstraints.margin=te.current,ge.economicsParams.operationalCostPerUnit=de.current,ge.economicsParams.electricitySellingPrice=oe.current})},me=()=>{r||gn(le("message.EvolutionStarted",G)),pe(),setTimeout(()=>{dt.getState().set(ge=>{ge.runEvolution=!ge.runEvolution}),e(ge=>{ge.evolutionMethod=_s.PARTICLE_SWARM_OPTIMIZATION,n&&(ge.actionInfo={name:"Run Particle Swarm Optimization for Solar Panel Array Layout",timestamp:new Date().getTime(),details:{...M.getState().evolutionaryAlgorithmState.particleSwarmOptimizationParams,...M.getState().solarPanelArrayLayoutConstraints,...M.getState().economicsParams}})})},100)},{t:le}=Xl(),Te=[{key:"1",label:le("optimizationMenu.Parameters",G),children:h.jsxs(h.Fragment,{children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.Objective",G)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:T.current,style:{width:"100%"},value:T.current,onChange:ge=>{T.current=ge,A(!g)},children:[h.jsx(O1,{value:Po.DAILY_TOTAL_OUTPUT,children:le("optimizationMenu.ObjectiveFunctionDailyTotalYield",G)},Po.DAILY_TOTAL_OUTPUT),h.jsx(O1,{value:Po.YEARLY_TOTAL_OUTPUT,children:le("optimizationMenu.ObjectiveFunctionYearlyTotalYield",G)},Po.YEARLY_TOTAL_OUTPUT),h.jsx(O1,{value:Po.DAILY_AVERAGE_OUTPUT,children:le("optimizationMenu.ObjectiveFunctionDailyMeanYield",G)},Po.DAILY_AVERAGE_OUTPUT),h.jsx(O1,{value:Po.YEARLY_AVERAGE_OUTPUT,children:le("optimizationMenu.ObjectiveFunctionYearlyMeanYield",G)},Po.YEARLY_AVERAGE_OUTPUT),h.jsx(O1,{value:Po.DAILY_PROFIT,children:le("optimizationMenu.ObjectiveFunctionDailyProfit",G)},Po.DAILY_PROFIT),h.jsx(O1,{value:Po.YEARLY_PROFIT,children:le("optimizationMenu.ObjectiveFunctionYearlyProfit",G)},Po.YEARLY_PROFIT)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.SwarmSize",G)+" [10, 100]:"}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:10,max:100,style:{width:"100%"},precision:0,value:x.current,step:1,formatter:ge=>Number(ge).toFixed(0),onChange:ge=>{x.current=Number(ge),A(!g)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.MaximumSteps",G)+" [5, 100]:"}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:5,max:100,step:1,style:{width:"100%"},precision:0,value:b.current,formatter:ge=>Number(ge).toFixed(0),onChange:ge=>{b.current=Number(ge),A(!g)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.CognitiveCoefficient",G)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:F.current,step:.01,onChange:ge=>{F.current=Number(ge),A(!g)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.SocialCoefficient",G)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:E.current,step:.01,onChange:ge=>{E.current=Number(ge),A(!g)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.InertiaWeight",G)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:H.current,step:.01,onChange:ge=>{H.current=Number(ge),A(!g)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.MaximumVelocity",G)+" [0.001, 0.1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:.001,max:.1,style:{width:"100%"},precision:3,value:R.current,step:.001,onChange:ge=>{R.current=Number(ge),A(!g)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.ConvergenceThreshold",G)+" (0, 0.1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:.001,max:.1,style:{width:"100%"},precision:3,value:N.current,step:.001,onChange:ge=>{N.current=Number(ge),A(!g)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.SearchMethod",G)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:w.current,style:{width:"100%"},value:w.current,onChange:ge=>{w.current=Number(ge),A(!g)},children:[h.jsx(O1,{value:ds.GLOBAL_SEARCH_UNIFORM_SELECTION,children:le("optimizationMenu.GlobalSearchUniformSelection",G)},ds.GLOBAL_SEARCH_UNIFORM_SELECTION),h.jsx(O1,{value:ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION,children:le("optimizationMenu.LocalSearchRandomOptimization",G)},ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION)]})})]}),w.current===ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION&&h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.LocalSearchRadius",G)+" ([0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:U.current,step:.01,onChange:ge=>{U.current=Number(ge),A(!g)}})})]})]})},{key:"2",label:le("optimizationMenu.Variables",G),children:h.jsxs(h.Fragment,{children:[h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.TiltAngleRange",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{range:!0,onChange:ge=>{W.current=ye.toRadians(ge[0]),k.current=ye.toRadians(ge[1]),A(!g)},min:-90,max:90,defaultValue:[ye.toDegrees(W.current),ye.toDegrees(k.current)],marks:{"-90":{style:{fontSize:"10px"},label:"-90°"},"-45":{style:{fontSize:"10px"},label:"-45°"},0:{style:{fontSize:"10px"},label:"0°"},45:{style:{fontSize:"10px"},label:"45°"},90:{style:{fontSize:"10px"},label:"90°"}}})})]}),h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.RowsPerRackRange",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{range:!0,onChange:ge=>{D.current=ge[0],L.current=ge[1],A(!g)},min:1,max:9,defaultValue:[D.current,L.current],marks:{1:{style:{fontSize:"10px"},label:1},2:{style:{fontSize:"10px"},label:2},3:{style:{fontSize:"10px"},label:3},4:{style:{fontSize:"10px"},label:4},5:{style:{fontSize:"10px"},label:5},6:{style:{fontSize:"10px"},label:6},7:{style:{fontSize:"10px"},label:7},8:{style:{fontSize:"10px"},label:8},9:{style:{fontSize:"10px"},label:9}}})})]}),h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.InterRowSpacingRange",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{range:!0,onChange:ge=>{j.current=ge[0],B.current=ge[1],A(!g)},min:2,max:10,defaultValue:[j.current,B.current],marks:{2:{style:{fontSize:"10px"},label:"2m"},4:{style:{fontSize:"10px"},label:"4m"},6:{style:{fontSize:"10px"},label:"6m"},8:{style:{fontSize:"10px"},label:"8m"},10:{style:{fontSize:"10px"},label:"10m"}}})})]})]})},{key:"3",label:le("optimizationMenu.Constants",G),children:h.jsxs(h.Fragment,{children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"6px",paddingTop:"0px"},children:[h.jsx(Ke,{span:12,children:le("polygonMenu.SolarPanelArrayModel",G)+" ("+Object.keys(V).length+" "+le("word.Options",G)+"):"}),h.jsx(Ke,{span:12,children:h.jsx(Uo,{defaultValue:"Custom",style:{width:"100%"},value:q.current,onChange:ge=>{q.current=ge,A(!g)},children:Object.keys(V).map(ge=>h.jsx(O1,{value:ge,children:ge+(V[ge].bifacialityFactor>0?" ("+le("pvModelPanel.Bifacial",G)+")":"")},ge))})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"6px",paddingTop:"8px"},children:[h.jsx(Ke,{span:12,children:le("polygonMenu.SolarPanelArrayRowAxis",G)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{style:{width:"100%"},value:Q.current,onChange:ge=>{Q.current=ge,A(!g)},children:[h.jsx(O1,{value:El.leftRight,children:le("polygonMenu.SolarPanelArrayLeftRightRowAxis",G)},El.leftRight),h.jsx(O1,{value:El.upDown,children:le("polygonMenu.SolarPanelArrayUpDownRowAxis",G)},El.upDown)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"6px",paddingTop:"8px"},children:[h.jsx(Ke,{span:12,children:le("polygonMenu.SolarPanelArrayOrientation",G)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{style:{width:"100%"},value:se.current,onChange:ge=>{se.current=ge,A(!g)},children:[h.jsx(O1,{value:vr.portrait,children:le("solarPanelMenu.Portrait",G)},vr.portrait),h.jsx(O1,{value:vr.landscape,children:le("solarPanelMenu.Landscape",G)},vr.landscape)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("polygonMenu.SolarPanelArrayMargin",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{te.current=ge,A(!g)},min:0,max:5,step:.1,defaultValue:te.current,marks:{0:{style:{fontSize:"10px"},label:"0m"},1:{style:{fontSize:"10px"},label:"1m"},2:{style:{fontSize:"10px"},label:"2m"},3:{style:{fontSize:"10px"},label:"3m"},4:{style:{fontSize:"10px"},label:"4m"},5:{style:{fontSize:"10px"},label:"5m"}}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("solarCollectorMenu.PoleHeight",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{Z.current=ge,A(!g)},min:0,max:10,step:.1,defaultValue:Z.current,marks:{0:{style:{fontSize:"10px"},label:"0m"},2:{style:{fontSize:"10px"},label:"2m"},4:{style:{fontSize:"10px"},label:"4m"},6:{style:{fontSize:"10px"},label:"6m"},8:{style:{fontSize:"10px"},label:"8m"},10:{style:{fontSize:"10px"},label:"10m"}}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("solarPanelMenu.PoleSpacing",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{ee.current=ge,A(!g)},min:2,max:10,step:.1,defaultValue:ee.current,marks:{2:{style:{fontSize:"10px"},label:"2m"},4:{style:{fontSize:"10px"},label:"4m"},6:{style:{fontSize:"10px"},label:"6m"},8:{style:{fontSize:"10px"},label:"8m"},10:{style:{fontSize:"10px"},label:"10m"}}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("economicsPanel.OperationalCostPerUnit",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{de.current=ge,A(!g)},min:.1,max:1,step:.01,defaultValue:de.current,marks:{.1:{style:{fontSize:"10px"},label:"10¢"},.3:{style:{fontSize:"10px"},label:"30¢"},.5:{style:{fontSize:"10px"},label:"50¢"},.7:{style:{fontSize:"10px"},label:"70¢"},.9:{style:{fontSize:"10px"},label:"90¢"}}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("economicsPanel.ElectricitySellingPrice",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{oe.current=ge,A(!g)},min:.1,max:1,step:.01,defaultValue:oe.current,marks:{.1:{style:{fontSize:"10px"},label:"10¢"},.3:{style:{fontSize:"10px"},label:"30¢"},.5:{style:{fontSize:"10px"},label:"50¢"},.7:{style:{fontSize:"10px"},label:"70¢"},.9:{style:{fontSize:"10px"},label:"90¢"}}})})]})]})}];return h.jsx(h.Fragment,{children:h.jsx(xi,{width:640,open:!0,title:h.jsx("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>S(!0),onMouseOut:()=>S(!1),children:le("optimizationMenu.SolarPanelArrayLayout",G)+": "+le("optimizationMenu.ParticleSwarmOptimizationSettings",G)}),footer:[h.jsx(io,{onClick:()=>{t(!1)},children:le("word.Cancel",G)},"Cancel"),h.jsx(io,{type:"primary",ref:O,onClick:()=>{me(),t(!1)},children:le("word.Run",G)},"Run")],onCancel:()=>{t(!1)},maskClosable:!1,destroyOnClose:!1,modalRender:ge=>h.jsx(Bi,{disabled:!y,bounds:C,onStart:(Se,Re)=>he(Se,Re),children:h.jsx("div",{ref:v,children:ge})}),children:h.jsx(hQ,{defaultActiveKey:f,items:Te,type:"card",onChange:ge=>{e(Se=>{Se.particleSwarmOptimizationWizardSelectedTab=ge})}})})})},Fho=t=>{const e=[];if(t.type!==z.Polygon)return{items:e};const n=t,o=M.getState().getParent(n),r={lng:M.getState().language},i=!n.locked;return e.push({key:"polygon-paste",label:h.jsx(nM,{})}),e.push({key:"polygon-copy",label:h.jsx(Fd,{})}),i&&e.push({key:"polygon-cut",label:h.jsx(kd,{})}),o&&(o.type===z.Foundation||o.type===z.Cuboid)&&e.push({key:"polygon-layout-submenu",label:h.jsx(an,{children:Y.t("polygonMenu.Layout",r)}),children:[{key:"solar-panel-layout-wizard",label:h.jsxs(eo,{noPadding:!0,Dialog:zho,children:[Y.t("polygonMenu.SolarPanelArrayLayoutParametricDesign",r)," ..."]})},{key:"solar-panel-layout-ai",label:h.jsx(an,{noPadding:!0,children:Y.t("polygonMenu.SolarPanelArrayLayoutGenerativeDesign",r)}),children:[{key:"solar-panel-layout-ga",label:h.jsxs(eo,{noPadding:!0,Dialog:Dho,children:[Y.t("optimizationMenu.GeneticAlgorithm",r)," ..."]})},{key:"solar-panel-layout-pso",label:h.jsxs(eo,{noPadding:!0,Dialog:Eho,children:[Y.t("optimizationMenu.ParticleSwarmOptimization",r)," ..."]})}]}]}),e.push({key:"polygon-lock",label:h.jsx(Ku,{selectedElement:n})}),i&&(e.push({key:"polygon-filled",label:h.jsx(dho,{polygon:n})}),n.filled&&e.push({key:"polygon-shiny",label:h.jsx(fho,{polygon:n})}),e.push({key:"polygon-no-outline",label:h.jsx(hho,{polygon:n})})),i&&(e.push({key:"polygon-line-color",label:h.jsxs(eo,{Dialog:xho,children:[Y.t("polygonMenu.LineColor",r)," ..."]})},{key:"polygon-line-style",label:h.jsxs(eo,{Dialog:bho,children:[Y.t("polygonMenu.LineStyle",r)," ..."]})},{key:"polygon-line-width",label:h.jsxs(eo,{Dialog:Sho,children:[Y.t("polygonMenu.LineWidth",r)," ..."]})}),n.filled&&((!n.textureType||n.textureType===Kr.NoTexture)&&e.push({key:"polygon-fill-color",label:h.jsxs(eo,{Dialog:Tho,children:[Y.t("polygonMenu.FillColor",r)," ..."]})}),e.push({key:"polygon-texture",label:h.jsxs(eo,{Dialog:Hho,children:[Y.t("polygonMenu.FillTexture",r)," ..."]})},{key:"polygon-opacity",label:h.jsxs(eo,{Dialog:Mho,children:[Y.t("polygonMenu.Opacity",r)," ..."]})})),e.push({key:"polygon-text-box",label:h.jsx(an,{children:Y.t("polygonMenu.TextBox",r)}),children:[{key:"polygon-text",label:h.jsx(pho,{polygon:n})},{key:"polygon-font-size",label:h.jsx(gho,{polygon:n})},{key:"polygon-font-color",label:h.jsx(mho,{polygon:n})},{key:"polygon-font-outline-color",label:h.jsx(yho,{polygon:n})},{key:"polygon-font-outline-width",label:h.jsx(Aho,{polygon:n})},{key:"polygon-font-stroke-color",label:h.jsx(who,{polygon:n})},{key:"polygon-font-stroke-width",label:h.jsx(vho,{polygon:n})}]})),{items:e}},kho=(t,e)=>{M.getState().set(n=>{for(const o of n.elements)if(o.type===z.Polygon&&o.id===t){o.vertices.splice(e,1);break}})},Lho=(t,e)=>{M.getState().set(n=>{for(const o of n.elements)if(o.type===z.Polygon&&o.id===t){const r=o,i=r.vertices.length;if(e>0&&e{M.getState().set(n=>{for(const o of n.elements)if(o.type===z.Polygon&&o.id===t){const r=o,i=r.vertices.length;if(e>=0&&e{if(t.selectedIndex>=0){const n=t.vertices.map(i=>({...i}));switch(e){case hx.Delete:kho(t.id,t.selectedIndex);break;case hx.InsertBeforeIndex:Lho(t.id,t.selectedIndex);break;case hx.InsertAfterIndex:Who(t.id,t.selectedIndex);break}const o=M.getState().getElementById(t.id).vertices.map(i=>({...i})),r={name:e,timestamp:Date.now(),changedElementId:t.id,changedElementType:t.type,oldValue:n,newValue:o,undo:()=>{r.oldValue&&Array.isArray(r.oldValue)&&M.getState().updatePolygonVerticesById(r.changedElementId,n)},redo:()=>{M.getState().updatePolygonVerticesById(r.changedElementId,o)}};M.getState().addUndoable(r)}},Nho=t=>{const e=[];if(t.type!==z.Polygon)return{items:e};const n=t,o={lng:M.getState().language};return e.push({key:"polygon-vertex-insert-before-index",label:h.jsx(an,{noPadding:!0,children:Y.t("polygonMenu.InsertVertexBeforeIndex",o)})},{key:"polygon-vertex-insert-after-index",label:h.jsx(an,{noPadding:!0,children:Y.t("polygonMenu.InsertVertexAfterIndex",o)})}),n.vertices.length>3&&e.push({key:"polygon-vertex-delete",label:h.jsx(an,{noPadding:!0,children:Y.t("polygonMenu.DeleteVertex",o)})}),{items:e,onClick:({key:i})=>{switch(i){case"polygon-vertex-insert-before-index":Vae(n,hx.InsertBeforeIndex);break;case"polygon-vertex-insert-after-index":Vae(n,hx.InsertAfterIndex);break;case"polygon-vertex-delete":Vae(n,hx.Delete);break}}}},Uho=({sensor:t})=>{const e=$t(),n=aot(t);return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:!!t.showLabel,onChange:n,children:Y.t("labelSubMenu.KeepShowingLabel",e)})})},jho=({sensor:t})=>{const e=$t(),{labelText:n,setLabelText:o}=iot(t),r=lot(t,n);return h.jsxs(an,{stayAfterClick:!0,children:[h.jsx(on,{style:{width:"80px"},children:Y.t("labelSubMenu.LabelText",e)+":"}),h.jsx(jl,{style:{width:"150px"},value:n,onChange:i=>o(i.target.value),onPressEnter:r,onBlur:r})]})},Bho=t=>{const e=[];if(t.type!==z.Sensor)return{items:e};const n=t,o=!n.locked;return e.push({key:"sensor-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"sensor-cut",label:h.jsx(kd,{})}),e.push({key:"sensor-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&(e.push({key:"sensor-show-label",label:h.jsx(Uho,{sensor:n})}),e.push({key:"sensor-label-text",label:h.jsx(jho,{sensor:n})})),{items:e}},Yho=({light:t})=>{const e=$t(),n=M.getState().updateInsideLightById,o=r=>{const i=r.target.checked,a={name:"Inside Light",timestamp:Date.now(),checked:i,undo:()=>{n(t.id,!a.checked)},redo:()=>{n(t.id,a.checked)}};M.getState().addUndoable(a),n(t.id,i)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.inside,onChange:o,children:Y.t("lightMenu.Inside",e)})})},Oho=({light:t})=>{const e=$t(),n=t.intensity??3,o=(i,a)=>{M.getState().set(l=>{for(const s of l.elements)if(s.type===z.Light&&s.id===i){s.intensity=a;break}})},r=i=>{if(i===null||i===n)return;const a={name:"Set Light Intensity",timestamp:Date.now(),oldValue:n,newValue:i,changedElementId:t.id,undo:()=>{o(a.changedElementId,a.oldValue)},redo:()=>{o(a.changedElementId,a.newValue)}};M.getState().addUndoable(a),o(t.id,i),M.getState().set(l=>{l.actionState.lightIntensity=i})};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsxs(on,{style:{width:"80px"},children:[Y.t("lightMenu.Intensity",e),":"]}),h.jsx(Sn,{min:.1,max:10,step:.1,precision:1,value:n,onChange:r})]})},Vho=({light:t})=>{const e=$t(),n=t.distance??5,o=(i,a)=>{M.getState().set(l=>{for(const s of l.elements)if(s.type===z.Light&&s.id===i){s.distance=a;break}})},r=i=>{if(i===null||i===n)return;const a={name:"Set Light Distance",timestamp:Date.now(),oldValue:n,newValue:i,changedElementId:t.id,undo:()=>{o(a.changedElementId,a.oldValue)},redo:()=>{o(a.changedElementId,a.newValue)}};M.getState().addUndoable(a),o(t.id,i),M.getState().set(l=>{l.actionState.lightDistance=i})};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsxs(on,{style:{width:"80px"},children:[Y.t("lightMenu.MaximumDistance",e),":"]}),h.jsx(Sn,{min:1,max:10,step:1,precision:1,value:n,onChange:r})]})},_ho=({light:t})=>{const e=t.color??"#ffff99",n=(o,r)=>{M.getState().set(i=>{for(const a of i.elements)if(a.type===z.Light&&a.id===o){a.color=r;break}})};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Ld,{color:e,onChangeComplete:o=>{const r=t.color,i=o.hex,a={name:"Set Light Color",timestamp:Date.now(),oldValue:r,newValue:i,undo:()=>{n(t.id,a.oldValue)},redo:()=>{n(t.id,a.newValue)}};M.getState().addUndoable(a),n(t.id,i),M.getState().set(l=>{l.actionState.lightColor=i})}})})},Gho=t=>{const e=[];if(t.type!==z.Light)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language},i=n.parentId?M.getState().getParent(n):void 0;return e.push({key:"light-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"light-cut",label:h.jsx(kd,{})}),e.push({key:"light-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&i&&(i.type===z.Roof||i.type===z.Wall)&&e.push({key:"light-inside",label:h.jsx(Yho,{light:n})}),o&&e.push({key:"light-intensity",label:h.jsx(Oho,{light:n})},{key:"light-distance",label:h.jsx(Vho,{light:n})},{key:"light-color",label:h.jsx(an,{children:Y.t("word.Color",r)}),children:[{key:"light-color-picker",label:h.jsx(_ho,{light:n}),style:{backgroundColor:"white"}}]}),{items:e}},Xho=()=>{const t=M(bge),e=$t(),n=r=>{M.getState().set(i=>{i.viewState.axes=r})},o=r=>{const i=r.target.checked,a={name:"Show Axes",timestamp:Date.now(),checked:i,undo:()=>{n(!a.checked)},redo:()=>{n(a.checked)}};M.getState().addUndoable(a),n(i)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t,onChange:o,children:Y.t("skyMenu.Axes",e)})})},Jho=()=>{const t=M(SBe),e=$t(),n=i=>{M.getState().set(a=>{a.viewState.theme=i})},o=i=>{const a=t,l=i.target.value,s={name:"Select Theme",timestamp:Date.now(),oldValue:a,newValue:l,undo:()=>{n(s.oldValue)},redo:()=>{n(s.newValue)}};M.getState().addUndoable(s),n(l)},r=[{value:Os.Default,label:"skyMenu.ThemeDefault"},{value:Os.Desert,label:"skyMenu.ThemeDesert"},{value:Os.Dune,label:"skyMenu.ThemeDune"},{value:Os.Forest,label:"skyMenu.ThemeForest"},{value:Os.Grassland,label:"skyMenu.ThemeGrassland"},{value:Os.Hill,label:"skyMenu.ThemeHill"},{value:Os.Lake,label:"skyMenu.ThemeLake"},{value:Os.Mountain,label:"skyMenu.ThemeMountain"},{value:Os.Rural,label:"skyMenu.ThemeRural"}];return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Le.Group,{value:t,onChange:o,children:h.jsx(on,{direction:"vertical",children:r.map((i,a)=>h.jsx(Le,{style:{width:"100%"},value:i.value,children:Y.t(i.label,e)},`${a}-${i.value}`))})})})},Kho=()=>{const t=M(TBe)??!0,e=$t(),n=r=>{M.getState().set(i=>{i.viewState.showAzimuthAngle=r})},o=r=>{const i=t,a=r.target.checked,l={name:"Show Azimuth Angle "+a,timestamp:Date.now(),oldValue:i,newValue:a,undo:()=>{n(l.oldValue)},redo:()=>{n(l.newValue)}};M.getState().addUndoable(l),n(a)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t,onChange:o,children:Y.t("skyMenu.ShowAzimuthAngle",e)})})},qho=()=>{const t=M(PBe)??!0,e=$t(),n=r=>{M.getState().set(i=>{i.viewState.showElevationAngle=r})},o=r=>{const i=t,a=r.target.checked,l={name:"Show Elevation Angle "+a,timestamp:Date.now(),oldValue:i,newValue:a,undo:()=>{n(l.oldValue)},redo:()=>{n(l.newValue)}};M.getState().addUndoable(l),n(a)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t,onChange:o,children:Y.t("skyMenu.ShowElevationAngle",e)})})},$ho=()=>{const t=M(CBe)??!0,e=$t(),n=r=>{M.getState().set(i=>{i.viewState.showZenithAngle=r})},o=r=>{const i=t,a=r.target.checked,l={name:"Show Zenith Angle "+a,timestamp:Date.now(),oldValue:i,newValue:a,undo:()=>{n(l.oldValue)},redo:()=>{n(l.newValue)}};M.getState().addUndoable(l),n(a)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t,onChange:o,children:Y.t("skyMenu.ShowZenithAngle",e)})})},Qho=()=>{const t=M(bBe)??3.5,e=$t(),n=r=>{M.getState().set(i=>{i.viewState.directLightIntensity=r})},o=r=>{if(r===null)return;const i=t,a=r,l={name:"Set Direct Light Intensity",timestamp:Date.now(),oldValue:i,newValue:a,undo:()=>{n(l.oldValue)},redo:()=>{n(l.newValue)}};M.getState().addUndoable(l),n(a)};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsx(on,{style:{width:"270px"},children:Y.t("skyMenu.DirectLightBrightnessAtNoon",e)+" [0.1-10]:"}),h.jsx(Sn,{min:.1,max:10,step:.1,precision:2,value:t,onChange:o})]})},Zho=()=>{const t=M(xBe)??.2,e=$t(),n=r=>{M.getState().set(i=>{i.viewState.ambientLightIntensity=r})},o=r=>{if(r===null)return;const i=t,a=r,l={name:"Set Ambient Light Intensity",timestamp:Date.now(),oldValue:i,newValue:a,undo:()=>{n(l.oldValue)},redo:()=>{n(l.newValue)}};M.getState().addUndoable(l),n(a)};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsx(on,{style:{width:"270px"},children:Y.t("skyMenu.AmbientLightBrightnessAtNoon",e)+" [0.01-1]:"}),h.jsx(Sn,{min:.01,max:1,step:.01,precision:2,value:t,onChange:o})]})},epo=()=>{const t=M(T8t)??.01,e=$t(),n=r=>{M.getState().set(i=>{i.world.airAttenuationCoefficient=r})},o=r=>{if(r===null)return;const i=t,a=r,l={name:"Set Sunlight Attenuation Coefficient of Air",timestamp:Date.now(),oldValue:i,newValue:a,undo:()=>{n(l.oldValue)},redo:()=>{n(l.newValue)}};M.getState().addUndoable(l),n(a)};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsx(on,{style:{width:"270px"},children:Y.t("skyMenu.SunlightAttenuationCoefficientInAir",e)+":"}),h.jsx(Sn,{min:0,max:.1,step:.001,precision:3,value:t,onChange:o})]})},tpo=()=>{const t=M(P8t)??5,e=$t(),n=r=>{M.getState().set(i=>{i.world.airConvectiveCoefficient=r})},o=r=>{if(r===null)return;const i=t,a=r,l={name:"Set Convective Coefficient of Air",timestamp:Date.now(),oldValue:i,newValue:a,undo:()=>{n(l.oldValue)},redo:()=>{n(l.newValue)}};M.getState().addUndoable(l),n(a)};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsx(on,{style:{width:"270px"},children:Y.t("skyMenu.ConvectiveCoefficientOfAir",e)+" [W/(m²×K)]:"}),h.jsx(Sn,{min:2.5,max:20,step:.1,precision:2,value:t,onChange:o})]})},npo=()=>{const t=M(pW)??900,e=M.getState().world,n=$t(),o=m.useMemo(()=>dl(new Date(e.date),e.latitude),[e.date,e.latitude]),r=a=>{M.getState().set(l=>{l.world.highestTemperatureTimeInMinutes=a})},i=a=>{if(a===null)return;const l=t,s=a,c={name:"Set Time of Highest Temperature in Minutes",timestamp:Date.now(),oldValue:l,newValue:s,undo:()=>{r(c.oldValue)},redo:()=>{r(c.newValue)}};M.getState().addUndoable(c),r(s)};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsx(on,{style:{width:"270px"},children:Y.t("skyMenu.HighestTemperatureTimeInMinutes",n)+":"}),h.jsx(Sn,{min:720,max:o.sunset,step:5,precision:0,value:t,onChange:i})]})},opo=()=>{const t={lng:M.getState().language},e=[];return e.push({key:"axes",label:h.jsx(Xho,{})}),e.push({key:"theme-submenu",label:h.jsx(an,{children:Y.t("skyMenu.Theme",t)}),children:[{key:"theme-radio-group",label:h.jsx(Jho,{}),style:{backgroundColor:"white"}}]}),e.push({key:"sun-angles-submenu",label:h.jsx(an,{children:Y.t("skyMenu.SelectSunAnglesToShow",t)}),children:[{key:"show-azimuth-angle",label:h.jsx(Kho,{})},{key:"ShowElevationAngle",label:h.jsx(qho,{})},{key:"ShowZenithAngle",label:h.jsx($ho,{})}]}),e.push({key:"direct-light-intensity",label:h.jsx(Qho,{})}),e.push({key:"ambient-light-intensity",label:h.jsx(Zho,{})}),e.push({key:"air-attenuation-coefficient",label:h.jsx(epo,{})}),e.push({key:"air-convective-coefficient",label:h.jsx(tpo,{})}),e.push({key:"highest-temperature-time-in-minutes",label:h.jsx(npo,{})}),{items:e}},DK=class DK{constructor(){this.n=14,this.nominalStrings=new Array(this.n),this.nominalWidths=new Array(this.n),this.nominalHeights=new Array(this.n),this.cellNx=new Array(this.n),this.cellNy=new Array(this.n),this.nominalWidths[0]=.99,this.nominalHeights[0]=1.65,this.cellNx[0]=6,this.cellNy[0]=10,this.nominalWidths[1]=.99,this.nominalHeights[1]=1.96,this.cellNx[1]=6,this.cellNy[1]=12,this.nominalWidths[2]=1.05,this.nominalHeights[2]=1.56,this.cellNx[2]=8,this.cellNy[2]=12,this.nominalWidths[3]=1.31,this.nominalHeights[3]=1.96,this.cellNx[3]=8,this.cellNy[3]=12,this.nominalWidths[4]=1.07,this.nominalHeights[4]=2.07,this.cellNx[4]=8,this.cellNy[4]=16,this.nominalWidths[5]=.6,this.nominalHeights[5]=1.2,this.cellNx[5]=10,this.cellNy[5]=20,this.nominalWidths[6]=1.2,this.nominalHeights[6]=2,this.cellNx[6]=10,this.cellNy[6]=20,this.nominalWidths[7]=1,this.nominalHeights[7]=2.07,this.cellNx[7]=6,this.cellNy[7]=12,this.nominalWidths[8]=.8,this.nominalHeights[8]=1.56,this.cellNx[8]=6,this.cellNy[8]=12,this.nominalWidths[9]=.83,this.nominalHeights[9]=1.58,this.cellNx[9]=6,this.cellNy[9]=12,this.nominalWidths[10]=.99,this.nominalHeights[10]=1.31,this.cellNx[10]=6,this.cellNy[10]=8,this.nominalWidths[11]=.99,this.nominalHeights[11]=1.5,this.cellNx[11]=6,this.cellNy[11]=9,this.nominalWidths[12]=1.05,this.nominalHeights[12]=1.81,this.cellNx[12]=8,this.cellNy[12]=14,this.nominalWidths[13]=1.05,this.nominalHeights[13]=1.69,this.cellNx[13]=8,this.cellNy[13]=13;for(let e=0;e{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(yW),a=M(DH),l=M(t5),s=M(En),c=M(vh),u=M(xh),d=M(no),f=M(Qn),p=uo(),[g,A]=m.useState((p==null?void 0:p.pvModelName)??"SPR-X21-335-BLK"),[y,S]=m.useState(),C=$t(),P=m.useMemo(()=>({...a,...i}),[i,a]),v=l(g??"SPR-X21-335-BLK");m.useEffect(()=>{S(v.nominalWidth.toFixed(2)+"m×"+v.nominalLength.toFixed(2)+"m ("+v.n+"×"+v.m+" "+Y.t("pvModelPanel.Cells",C)+")")},[v]);const T=(W,k)=>{e(D=>{for(const L of D.elements)if(L.type===z.SolarPanel&&L.id===W&&!L.locked){const j=L;j.pvModelName=k;let B=D.supportedPvModules[k];if(B||(B=D.customPvModules[k]),j.orientation===vr.portrait){const O=Math.max(1,Math.round(j.lx/B.width)),V=Math.max(1,Math.round(j.ly/B.length));j.lx=O*B.width,j.ly=V*B.length}else{const O=Math.max(1,Math.round(j.lx/B.length)),V=Math.max(1,Math.round(j.ly/B.width));j.lx=O*B.length,j.ly=V*B.width}break}})},w=(W,k)=>{e(D=>{let L=D.supportedPvModules[k];L||(L=D.customPvModules[k]);for(const j of D.elements)if(j.type===z.SolarPanel&&j.foundationId===W&&!j.locked){const B=j;if(B.pvModelName=k,B.orientation===vr.portrait){const O=Math.max(1,Math.round(B.lx/L.width)),V=Math.max(1,Math.round(B.ly/L.length));B.lx=O*L.width,B.ly=V*L.length}else{const O=Math.max(1,Math.round(B.lx/L.length)),V=Math.max(1,Math.round(B.ly/L.width));B.lx=O*L.length,B.ly=V*L.width}}})},x=(W,k,D)=>{e(L=>{let j=L.supportedPvModules[D];j||(j=L.customPvModules[D]);for(const B of L.elements)if(B.type===z.SolarPanel&&!B.locked){let O;if(k?O=B.parentId===W&&ye.isIdentical(B.normal,k):O=B.parentId===W,O){const V=B;if(V.pvModelName=D,V.orientation===vr.portrait){const G=Math.max(1,Math.round(V.lx/j.width)),Q=Math.max(1,Math.round(V.ly/j.length));V.lx=G*j.width,V.ly=Q*j.length}else{const G=Math.max(1,Math.round(V.lx/j.length)),Q=Math.max(1,Math.round(V.ly/j.width));V.lx=G*j.length,V.ly=Q*j.width}}}})},b=W=>{e(k=>{let D=k.supportedPvModules[W];D||(D=k.customPvModules[W]);for(const L of k.elements)if(L.type===z.SolarPanel&&!L.locked){const j=L;if(j.pvModelName=W,j.orientation===vr.portrait){const B=Math.max(1,Math.round(j.lx/D.width)),O=Math.max(1,Math.round(j.ly/D.length));j.lx=B*D.width,j.ly=O*D.length}else{const B=Math.max(1,Math.round(j.lx/D.length)),O=Math.max(1,Math.round(j.ly/D.width));j.lx=B*D.length,j.ly=O*D.width}}})},R=(W,k)=>{M.getState().set(D=>{let L=D.supportedPvModules[k];L||(L=D.customPvModules[k]);for(const j of D.elements)if(j.type===z.SolarPanel&&!j.locked&&W.has(j.id)){const B=j;if(B.pvModelName=k,B.orientation===vr.portrait){const O=Math.max(1,Math.round(B.lx/L.width)),V=Math.max(1,Math.round(B.ly/L.length));B.lx=O*L.width,B.ly=V*L.length}else{const O=Math.max(1,Math.round(B.lx/L.length)),V=Math.max(1,Math.round(B.ly/L.width));B.lx=O*L.length,B.ly=V*L.width}}})},H=W=>{u(W.target.value)},F=W=>{if(p){switch(c){case re.AllSelectedObjectsOfThisType:{for(const k of n)if(k.type===z.SolarPanel&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&k.pvModelName!==W)return!0;break}case re.AllObjectsOfThisType:{for(const k of n)if(k.type===z.SolarPanel&&!k.locked&&k.pvModelName!==W)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const k of n)if(k.type===z.SolarPanel&&k.foundationId===(p==null?void 0:p.foundationId)&&!k.locked&&k.pvModelName!==W)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const k=r(p);if(k){if(k.type===z.Cuboid){for(const L of n)if(L.type===z.SolarPanel&&L.parentId===p.parentId&&ye.isIdentical(L.normal,p.normal)&&!L.locked&&L.pvModelName!==W)return!0}else for(const L of n)if(L.type===z.SolarPanel&&L.parentId===p.parentId&&!L.locked&&L.pvModelName!==W)return!0}break}default:{if((p==null?void 0:p.pvModelName)!==W)return!0;break}}return!1}},E=W=>{if(p&&F(W)){switch(c){case re.AllSelectedObjectsOfThisType:{const k=new Map;for(const L of n)L.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.pvModelName);const D={name:"Set Model for Selected Solar Panels",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())T(L,j)},redo:()=>{R(D.oldValues,D.newValue)}};s(D),R(k,W),f(d+1);break}case re.AllObjectsOfThisType:{const k=new Map;for(const L of n)L.type===z.SolarPanel&&k.set(L.id,L.pvModelName);const D={name:"Set Model for All Solar Panels",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())T(L,j)},redo:()=>{b(D.newValue)}};s(D),b(W),f(d+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(p.foundationId){const k=new Map;for(const L of n)L.type===z.SolarPanel&&L.foundationId===p.foundationId&&k.set(L.id,L.pvModelName);const D={name:"Set Model for All Solar Panels Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:p.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())T(L,j)},redo:()=>{D.groupId&&w(D.groupId,D.newValue)}};s(D),w(p.foundationId,W),f(d+1)}break}case re.AllObjectsOfThisTypeOnSurface:{const k=r(p);if(k){const D=new Map,L=k.type===z.Cuboid;if(L)for(const O of n)O.type===z.SolarPanel&&O.parentId===p.parentId&&ye.isIdentical(O.normal,p.normal)&&D.set(O.id,O.pvModelName);else for(const O of n)O.type===z.SolarPanel&&O.parentId===p.parentId&&D.set(O.id,O.pvModelName);const j=L?p.normal:void 0,B={name:"Set Model for All Solar Panels on Surface",timestamp:Date.now(),oldValues:D,newValue:W,groupId:p.parentId,normal:j,undo:()=>{for(const[O,V]of B.oldValues.entries())T(O,V)},redo:()=>{B.groupId&&x(B.groupId,B.normal,B.newValue)}};s(B),x(p.parentId,j,W),f(d+1)}break}default:{const k=o(p.id),D=k?k.pvModelName:p.pvModelName,L={name:"Set Model for Selected Solar Panel",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:p.id,changedElementType:p.type,undo:()=>{T(L.changedElementId,L.oldValue)},redo:()=>{T(L.changedElementId,L.newValue)}};s(L),T(p.id,W),f(d+1);break}}e(k=>{k.actionState.solarPanelModelName=W})}},N=()=>{t(!1)},U=()=>{E(g)};return h.jsxs(so,{width:640,title:Y.t("pvModelPanel.SolarPanelSpecs",C),onApply:U,onClose:N,children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("pvModelPanel.Model",C)+" ("+Object.keys(P).length+" "+Y.t("word.Options",C)+"):"}),h.jsx(Ke,{span:11,children:h.jsx(Uo,{defaultValue:"Custom",style:{width:"100%"},value:g,onChange:A,children:Object.keys(P).map(W=>h.jsx(ov,{value:W,children:W+(P[W].bifacialityFactor>0?" ("+Y.t("pvModelPanel.Bifacial",C)+")":"")},W))})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("pvModelPanel.PanelSize",C)+":"}),h.jsx(Ke,{span:11,children:h.jsx(Uo,{disabled:!0,style:{width:"100%"},value:y,onChange:W=>{},children:wfe.instance.nominalStrings.map(W=>h.jsx(ov,{value:W,children:W},W))})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("pvModelPanel.CellType",C)+":"}),h.jsx(Ke,{span:11,children:h.jsxs(Uo,{disabled:!0,style:{width:"100%"},value:v.cellType,onChange:W=>{},children:[h.jsx(ov,{value:"Monocrystalline",children:Y.t("pvModelPanel.Monocrystalline",C)},"Monocrystalline"),h.jsx(ov,{value:"Polycrystalline",children:Y.t("pvModelPanel.Polycrystalline",C)},"Polycrystalline"),h.jsx(ov,{value:"Thin Film",children:Y.t("pvModelPanel.ThinFilm",C)},"Thin Film")]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("pvModelPanel.BifacialityFactor",C)+":"}),h.jsx(Ke,{span:11,children:h.jsx(Sn,{disabled:!0,style:{width:"100%"},precision:2,value:v.bifacialityFactor,onChange:W=>{}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("word.Color",C)+":"}),h.jsx(Ke,{span:11,children:h.jsxs(Uo,{disabled:!0,style:{width:"100%"},value:v.color,onChange:W=>{},children:[h.jsx(ov,{value:"Black",children:Y.t("pvModelPanel.Black",C)},"Black"),h.jsx(ov,{value:"Blue",children:Y.t("pvModelPanel.Blue",C)},"Blue")]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("pvModelPanel.SolarCellEfficiency",C)+" (%):"}),h.jsx(Ke,{span:11,children:h.jsx(Sn,{disabled:!0,style:{width:"100%"},precision:2,value:100*v.efficiency,onChange:W=>{}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("pvModelPanel.NominalOperatingCellTemperature",C)+" (°C):"}),h.jsx(Ke,{span:11,children:h.jsx(Sn,{disabled:!0,style:{width:"100%"},precision:1,value:v.noct,onChange:W=>{}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("pvModelPanel.TemperatureCoefficientOfPmax",C)+" (%/°C):"}),h.jsx(Ke,{span:11,children:h.jsx(jl,{disabled:!0,style:{width:"100%"},value:v.pmaxTC,onChange:W=>{}})})]}),h.jsxs(nn,{gutter:6,style:{border:"2px dashed #ccc",marginTop:"6px",marginLeft:"0",marginRight:"0",paddingLeft:"8px",paddingTop:"8px",paddingBottom:"8px"},children:[h.jsx(Ke,{span:3,children:Y.t("word.ApplyTo",C)+":"}),h.jsx(Ke,{span:21,children:h.jsx(Le.Group,{onChange:H,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",C)})]})})})]})]})},{Option:FHe}=Uo,ipo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(t5),i=M(Gr),a=M(Uge),l=M(En),s=M(vh),c=M(xh),u=M(no),d=M(Qn),f=M(Xi),p=uo(),[g,A]=m.useState((p==null?void 0:p.orientation)??vr.portrait),y=m.useRef(!1),S=m.useRef(),C=$t(),P=(j,B)=>{e(O=>{for(const V of O.elements)if(V.type===z.SolarPanel&&V.id===j&&!V.locked){const G=V;let Q=O.supportedPvModules[G.pvModelName];Q||(Q=O.customPvModules[G.pvModelName]),O.setSolarPanelOrientation(G,Q,B);break}})},v=(j,B)=>{e(O=>{for(const V of O.elements)if(V.type===z.SolarPanel&&V.foundationId===j&&!V.locked){const G=V;let Q=O.supportedPvModules[G.pvModelName];Q||(Q=O.customPvModules[G.pvModelName]),O.setSolarPanelOrientation(G,Q,B)}})},T=(j,B,O)=>{e(V=>{for(const G of V.elements)if(G.type===z.SolarPanel&&!G.locked){let Q;if(B?Q=G.parentId===j&&ye.isIdentical(G.normal,B):Q=G.parentId===j,Q){const $=G;let ie=V.supportedPvModules[$.pvModelName];ie||(ie=V.customPvModules[$.pvModelName]),V.setSolarPanelOrientation($,ie,O)}}})},w=j=>{e(B=>{for(const O of B.elements)if(O.type===z.SolarPanel&&!O.locked){const V=O;let G=B.supportedPvModules[V.pvModelName];G||(G=B.customPvModules[V.pvModelName]),B.setSolarPanelOrientation(V,G,j)}})},x=(j,B)=>{M.getState().set(O=>{for(const V of O.elements)if(V.type===z.SolarPanel&&!V.locked&&j.has(V.id)){const G=V;let Q=O.supportedPvModules[G.pvModelName];Q||(Q=O.customPvModules[G.pvModelName]),O.setSolarPanelOrientation(G,Q,B)}})},b=j=>{c(j.target.value)},R=j=>{if(p){const B=r(p.pvModelName);if(j===vr.portrait){const O=Math.max(1,Math.round(p.lx/B.width)),V=Math.max(1,Math.round(p.ly/B.length));a(p.id,O*B.width,V*B.length)}else{const O=Math.max(1,Math.round(p.lx/B.length)),V=Math.max(1,Math.round(p.ly/B.width));a(p.id,O*B.length,V*B.width)}P(p.id,j)}},H=(j,B)=>{const O=i(j);if(O){if(O.type===z.Cuboid&&!ye.isIdentical(j.normal,as))return!0;const V=JSON.parse(JSON.stringify(j));V.orientation=B;const G=r(V.pvModelName);if(B===vr.portrait){const Q=Math.max(1,Math.round(V.lx/G.width)),$=Math.max(1,Math.round(V.ly/G.length));V.lx=Q*G.width,V.ly=$*G.length}else{const Q=Math.max(1,Math.round(V.lx/G.length)),$=Math.max(1,Math.round(V.ly/G.width));V.lx=Q*G.length,V.ly=$*G.width}return O.type===z.Wall?ye.checkElementOnWallState(V,O)===pa.Valid:O.type===z.Roof?ye.checkElementOnRoofState(V,O)===pa.Valid:ye.isSolarCollectorWithinHorizontalSurface(V,O)}return!1},F=(j,B)=>!H(j,B),E=j=>{if(p){switch(s){case re.AllSelectedObjectsOfThisType:{for(const B of n)if(B.type===z.SolarPanel&&!B.locked&&M.getState().selectedElementIdSet.has(B.id)&&B.orientation!==j)return!0;break}case re.AllObjectsOfThisType:{for(const B of n)if(B.type===z.SolarPanel&&!B.locked&&B.orientation!==j)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const B of n)if(B.type===z.SolarPanel&&B.foundationId===(p==null?void 0:p.foundationId)&&!B.locked&&B.orientation!==j)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const B=i(p);if(B){if(B.type===z.Cuboid){for(const V of n)if(V.type===z.SolarPanel&&V.parentId===p.parentId&&ye.isIdentical(V.normal,p.normal)&&!V.locked&&V.orientation!==j)return!0}else for(const V of n)if(V.type===z.SolarPanel&&V.parentId===p.parentId&&!V.locked&&V.orientation!==j)return!0}break}default:{if((p==null?void 0:p.orientation)!==j)return!0;break}}return!1}},N=j=>{if(p&&E(j)){switch(S.current=void 0,s){case re.AllSelectedObjectsOfThisType:{y.current=!1;for(const B of n)if(B.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(B.id)&&F(B,j)){y.current=!0;break}if(y.current)S.current=j,A(p.orientation);else{const B=new Map;for(const V of n)V.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(V.id)&&B.set(V.id,V.orientation);const O={name:"Set Orientation for Selected Solar Panels",timestamp:Date.now(),oldValues:B,newValue:j,undo:()=>{for(const[V,G]of O.oldValues.entries())P(V,G)},redo:()=>{x(O.oldValues,O.newValue)}};l(O),x(B,j),d(u+1)}break}case re.AllObjectsOfThisType:{y.current=!1;for(const B of n)if(B.type===z.SolarPanel&&F(B,j)){y.current=!0;break}if(y.current)S.current=j,A(p.orientation);else{const B=new Map;for(const V of n)V.type===z.SolarPanel&&B.set(V.id,V.orientation);const O={name:"Set Orientation for All Solar Panels",timestamp:Date.now(),oldValues:B,newValue:j,undo:()=>{for(const[V,G]of O.oldValues.entries())P(V,G)},redo:()=>{w(O.newValue)}};l(O),w(j),d(u+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(p.foundationId){y.current=!1;for(const B of n)if(B.type===z.SolarPanel&&B.foundationId===p.foundationId&&F(B,j)){y.current=!0;break}if(y.current)S.current=j,A(p.orientation);else{const B=new Map;for(const V of n)V.type===z.SolarPanel&&V.foundationId===p.foundationId&&B.set(V.id,V.orientation);const O={name:"Set Orientation for All Solar Panels Above Foundation",timestamp:Date.now(),oldValues:B,newValue:j,groupId:p.foundationId,undo:()=>{for(const[V,G]of O.oldValues.entries())P(V,G)},redo:()=>{O.groupId&&v(O.groupId,O.newValue)}};l(O),v(p.foundationId,j),d(u+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{const B=i(p);if(B){if(y.current=!1,B.type===z.Cuboid){for(const V of n)if(V.type===z.SolarPanel&&V.parentId===p.parentId&&ye.isIdentical(V.normal,p.normal)&&F(V,j)){y.current=!0;break}}else for(const V of n)if(V.type===z.SolarPanel&&V.parentId===p.parentId&&F(V,j)){y.current=!0;break}if(y.current)S.current=j,A(p.orientation);else{const V=new Map,G=B.type===z.Cuboid;if(G)for(const ie of n)ie.type===z.SolarPanel&&ie.parentId===p.parentId&&ye.isIdentical(ie.normal,p.normal)&&V.set(ie.id,ie.orientation);else for(const ie of n)ie.type===z.SolarPanel&&ie.parentId===p.parentId&&V.set(ie.id,ie.orientation);const Q=G?p.normal:void 0,$={name:"Set Orientation for All Solar Panels on Surface",timestamp:Date.now(),oldValues:V,newValue:j,groupId:p.parentId,normal:Q,undo:()=>{for(const[ie,q]of $.oldValues.entries())P(ie,q)},redo:()=>{$.groupId&&T($.groupId,$.normal,$.newValue)}};l($),T(p.parentId,Q,j),d(u+1)}}break}default:{const B=o(p.id),O=B?B.orientation:p.orientation;if(y.current=!1,y.current)S.current=j,A(O);else{const V={name:"Set Orientation of Selected Solar Panel",timestamp:Date.now(),oldValue:O,newValue:j,changedElementId:p.id,changedElementType:p.type,undo:()=>{R(V.oldValue)},redo:()=>{R(V.newValue)}};l(V),R(j),d(u+1)}break}}e(B=>{B.actionState.solarPanelOrientation=j})}},U=()=>{p&&(A(p.orientation),y.current=!1,t(!1))},W=()=>{U(),f()},k=()=>{N(g),y.current||(t(!1),d(0))},D=()=>{N(g)},L=y.current?": "+Y.t("message.NotApplicableToSelectedAction",C)+(S.current?" ("+(S.current===vr.portrait?Y.t("solarPanelMenu.Portrait",C):Y.t("solarPanelMenu.Landscape",C))+")":""):"";return h.jsx(so,{width:550,title:Y.t("solarPanelMenu.Orientation",C),rejectedMessage:L,onApply:D,onClose:U,onClickCancel:W,onClickOk:k,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:8,children:h.jsxs(Uo,{style:{width:"150px"},value:g,onChange:j=>A(j),children:[h.jsx(FHe,{value:vr.portrait,children:Y.t("solarPanelMenu.Portrait",C)},vr.portrait),h.jsx(FHe,{value:vr.landscape,children:Y.t("solarPanelMenu.Landscape",C)},vr.landscape)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:b,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",C)})]})})})]})})},apo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(t5),i=M(Gr),a=M(En),l=M(vh),s=M(xh),c=M(no),u=M(Qn),d=M(Xi),f=uo(z.SolarPanel),[p,g]=m.useState((f==null?void 0:f.lx)??1),[A,y]=m.useState(0),S=m.useRef(!1),C=m.useRef(),P=$t();m.useEffect(()=>{if(f){const B=r(f.pvModelName)??r("SPR-X21-335-BLK");y(f.orientation===vr.portrait?B.width:B.length)}},[f]);const v=(B,O)=>{e(V=>{for(const G of V.elements)if(G.type===z.SolarPanel&&G.id===B&&!G.locked){const Q=G,$=V.getPvModule(Q.pvModelName);G.lx=ye.panelizeLx(Q,$,O);break}})},T=(B,O)=>{e(V=>{for(const G of V.elements)if(G.type===z.SolarPanel&&G.foundationId===B&&!G.locked){const Q=G,$=V.getPvModule(Q.pvModelName);G.lx=ye.panelizeLx(Q,$,O)}})},w=(B,O,V)=>{e(G=>{for(const Q of G.elements)if(Q.type===z.SolarPanel&&!Q.locked){let $;if(O?$=Q.parentId===B&&ye.isIdentical(Q.normal,O):$=Q.parentId===B,$){const ie=Q,q=G.getPvModule(ie.pvModelName);Q.lx=ye.panelizeLx(ie,q,V)}}})},x=B=>{e(O=>{for(const V of O.elements)if(V.type===z.SolarPanel&&!V.locked){const G=V,Q=O.getPvModule(G.pvModelName);V.lx=ye.panelizeLx(G,Q,B)}})},b=(B,O)=>{M.getState().set(V=>{for(const G of V.elements)if(G.type===z.SolarPanel&&!G.locked&&B.has(G.id)){const Q=G,$=V.getPvModule(Q.pvModelName);G.lx=ye.panelizeLx(Q,$,O)}})},R=B=>{s(B.target.value)},H=(B,O)=>{const V=i(B);if(V){if(V.type===z.Cuboid&&!ye.isIdentical(B.normal,as))return!0;const G=JSON.parse(JSON.stringify(B));return G.lx=O,V.type===z.Wall?ye.checkElementOnWallState(G,V)===pa.Valid:V.type===z.Roof?ye.checkElementOnRoofState(G,V)===pa.Valid:ye.isSolarCollectorWithinHorizontalSurface(G,V)}return!1},F=(B,O)=>!H(B,O),E=B=>{if(f){switch(l){case re.AllSelectedObjectsOfThisType:{for(const O of n)if(O.type===z.SolarPanel&&!O.locked&&M.getState().selectedElementIdSet.has(O.id)&&Math.abs(O.lx-B)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const O of n)if(O.type===z.SolarPanel&&!O.locked&&Math.abs(O.lx-B)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const O of n)if(O.type===z.SolarPanel&&O.foundationId===(f==null?void 0:f.foundationId)&&!O.locked&&Math.abs(O.lx-B)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const O=i(f);if(O){if(O.type===z.Cuboid){for(const G of n)if(G.type===z.SolarPanel&&G.parentId===f.parentId&&ye.isIdentical(G.normal,f.normal)&&!G.locked&&Math.abs(G.lx-B)>Et)return!0}else for(const G of n)if(G.type===z.SolarPanel&&G.parentId===f.parentId&&!G.locked&&Math.abs(G.lx-B)>Et)return!0}break}default:{if(Math.abs((f==null?void 0:f.lx)-B)>Et)return!0;break}}return!1}},N=B=>{if(f&&E(B))switch(C.current=void 0,l){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const O of n)if(O.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(O.id)&&F(O,B)){S.current=!0;break}if(S.current)C.current=B,g(f.lx);else{const O=new Map;for(const G of n)G.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(G.id)&&O.set(G.id,G.lx);const V={name:"Set Length for Selected Solar Panel Arrays",timestamp:Date.now(),oldValues:O,newValue:B,undo:()=>{for(const[G,Q]of V.oldValues.entries())v(G,Q)},redo:()=>{b(V.oldValues,V.newValue)}};a(V),b(O,B),u(c+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const O of n)if(O.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(O.id)&&F(O,B)){S.current=!0;break}if(S.current)C.current=B,g(f.lx);else{const O=new Map;for(const G of n)G.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(G.id)&&O.set(G.id,G.lx);const V={name:"Set Length for All Solar Panel Arrays",timestamp:Date.now(),oldValues:O,newValue:B,undo:()=>{for(const[G,Q]of V.oldValues.entries())v(G,Q)},redo:()=>{x(V.newValue)}};a(V),x(B),u(c+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){S.current=!1;for(const O of n)if(O.type===z.SolarPanel&&O.foundationId===f.foundationId&&F(O,B)){S.current=!0;break}if(S.current)C.current=B,g(f.lx);else{const O=new Map;for(const G of n)G.type===z.SolarPanel&&G.foundationId===f.foundationId&&O.set(G.id,G.lx);const V={name:"Set Length for All Solar Panel Arrays Above Foundation",timestamp:Date.now(),oldValues:O,newValue:B,groupId:f.foundationId,undo:()=>{for(const[G,Q]of V.oldValues.entries())v(G,Q)},redo:()=>{V.groupId&&T(V.groupId,V.newValue)}};a(V),T(f.foundationId,B),u(c+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{const O=i(f);if(O){if(S.current=!1,O.type===z.Cuboid){for(const G of n)if(G.type===z.SolarPanel&&G.parentId===f.parentId&&ye.isIdentical(G.normal,f.normal)&&F(G,B)){S.current=!0;break}}else for(const G of n)if(G.type===z.SolarPanel&&G.parentId===f.parentId&&F(G,B)){S.current=!0;break}if(S.current)C.current=B,g(f.lx);else{const G=new Map,Q=O.type===z.Cuboid;if(Q)for(const q of n)q.type===z.SolarPanel&&q.parentId===f.parentId&&ye.isIdentical(q.normal,f.normal)&&G.set(q.id,q.lx);else for(const q of n)q.type===z.SolarPanel&&q.parentId===f.parentId&&G.set(q.id,q.lx);const $=Q?f.normal:void 0,ie={name:"Set Length for All Solar Panel Arrays on Surface",timestamp:Date.now(),oldValues:G,newValue:B,groupId:f.parentId,normal:$,undo:()=>{for(const[q,se]of ie.oldValues.entries())v(q,se)},redo:()=>{ie.groupId&&w(ie.groupId,ie.normal,ie.newValue)}};a(ie),w(f.parentId,$,B),u(c+1)}}break}default:{const O=o(f.id),V=O?O.lx:f.lx;if(S.current=F(f,B),S.current)C.current=B,g(V);else{const G={name:"Set Solar Panel Array Length",timestamp:Date.now(),oldValue:V,newValue:B,changedElementId:f.id,changedElementType:f.type,undo:()=>{v(G.changedElementId,G.oldValue)},redo:()=>{v(G.changedElementId,G.newValue)}};a(G),v(f.id,B),u(c+1)}break}}},U=B=>{let O=B??1;return O=Math.max(1,Math.ceil((O-A/2)/A))*A,O},W=()=>{S.current=!1,t(!1)},k=()=>{W(),d()},D=()=>{N(p),S.current||(t(!1),u(0))},L=()=>{N(p)},j=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("word.Length",P),rejectedMessage:j,onApply:L,onClose:W,onClickCancel:k,onClickOk:D,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:A,max:100*A,step:A,style:{width:120},precision:2,value:p,onChange:B=>{B!==null&&g(U(B))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Math.round(p/A)+" "+Y.t("solarPanelMenu.PanelsWide",P),h.jsx("br",{}),Y.t("word.MaximumNumber",P),": 100 ",Y.t("solarPanelMenu.Panels",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:R,value:l,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",P)})]})})})]})})},lpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(t5),i=M(Gr),a=M(En),l=M(vh),s=M(xh),c=M(no),u=M(Qn),d=M(Xi),f=uo(z.SolarPanel),[p,g]=m.useState((f==null?void 0:f.ly)??2),[A,y]=m.useState(0),S=m.useRef(!1),C=m.useRef(),P=$t();m.useEffect(()=>{if(f){const B=r(f.pvModelName)??r("SPR-X21-335-BLK");y(f.orientation===vr.portrait?B.length:B.width),g(f.ly)}},[f]);const v=(B,O)=>{e(V=>{for(const G of V.elements)if(G.type===z.SolarPanel&&G.id===B&&!G.locked){const Q=G,$=V.getPvModule(Q.pvModelName);G.ly=ye.panelizeLy(Q,$,O);break}})},T=(B,O)=>{e(V=>{for(const G of V.elements)if(G.type===z.SolarPanel&&G.foundationId===B&&!G.locked){const Q=G,$=V.getPvModule(Q.pvModelName);G.ly=ye.panelizeLy(Q,$,O)}})},w=(B,O,V)=>{e(G=>{for(const Q of G.elements)if(Q.type===z.SolarPanel&&!Q.locked){let $;if(O?$=Q.parentId===B&&ye.isIdentical(Q.normal,O):$=Q.parentId===B,$){const ie=Q,q=G.getPvModule(ie.pvModelName);Q.ly=ye.panelizeLy(ie,q,V)}}})},x=B=>{e(O=>{for(const V of O.elements)if(V.type===z.SolarPanel&&!V.locked){const G=V,Q=O.getPvModule(G.pvModelName);V.ly=ye.panelizeLy(G,Q,B)}})},b=(B,O)=>{M.getState().set(V=>{for(const G of V.elements)if(G.type===z.SolarPanel&&!G.locked&&B.has(G.id)){const Q=G,$=V.getPvModule(Q.pvModelName);G.ly=ye.panelizeLy(Q,$,O)}})},R=B=>{s(B.target.value)},H=(B,O)=>{const V=i(B);if(V){if(V.type===z.Cuboid&&!ye.isIdentical(B.normal,as))return!0;const G=JSON.parse(JSON.stringify(B));return G.ly=O,V.type===z.Wall?ye.checkElementOnWallState(G,V)===pa.Valid:V.type===z.Roof?ye.checkElementOnRoofState(G,V)===pa.Valid:ye.isSolarCollectorWithinHorizontalSurface(G,V)}return!1},F=(B,O)=>B.tiltAngle!==0&&.5*O*Math.abs(Math.sin(B.tiltAngle))>B.poleHeight||!H(B,O),E=B=>{if(f){switch(l){case re.AllSelectedObjectsOfThisType:{for(const O of n)if(O.type===z.SolarPanel&&!O.locked&&M.getState().selectedElementIdSet.has(O.id)&&Math.abs(O.ly-B)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const O of n)if(O.type===z.SolarPanel&&!O.locked&&Math.abs(O.ly-B)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const O of n)if(O.type===z.SolarPanel&&O.foundationId===(f==null?void 0:f.foundationId)&&!O.locked&&Math.abs(O.ly-B)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const O=i(f);if(O){if(O.type===z.Cuboid){for(const G of n)if(G.type===z.SolarPanel&&G.parentId===f.parentId&&ye.isIdentical(G.normal,f.normal)&&!G.locked&&Math.abs(G.ly-B)>Et)return!0}else for(const G of n)if(G.type===z.SolarPanel&&G.parentId===f.parentId&&!G.locked&&Math.abs(G.ly-B)>Et)return!0}break}default:{if(Math.abs((f==null?void 0:f.ly)-B)>Et)return!0;break}}return!1}},N=B=>{if(f&&E(B))switch(C.current=void 0,l){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const O of n)if(O.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(O.id)&&F(O,B)){S.current=!0;break}if(S.current)C.current=B,g(f.ly);else{const O=new Map;for(const G of n)G.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(G.id)&&O.set(G.id,G.ly);const V={name:"Set Width for Selected Solar Panel Arrays",timestamp:Date.now(),oldValues:O,newValue:B,undo:()=>{for(const[G,Q]of V.oldValues.entries())v(G,Q)},redo:()=>{b(V.oldValues,V.newValue)}};a(V),b(O,B),u(c+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const O of n)if(O.type===z.SolarPanel&&F(O,B)){S.current=!0;break}if(S.current)C.current=B,g(f.ly);else{const O=new Map;for(const G of n)G.type===z.SolarPanel&&O.set(G.id,G.ly);const V={name:"Set Width for All Solar Panel Arrays",timestamp:Date.now(),oldValues:O,newValue:B,undo:()=>{for(const[G,Q]of V.oldValues.entries())v(G,Q)},redo:()=>{x(V.newValue)}};a(V),x(B),u(c+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){S.current=!1;for(const O of n)if(O.type===z.SolarPanel&&O.foundationId===f.foundationId&&F(O,B)){S.current=!0;break}if(S.current)C.current=B,g(f.ly);else{const O=new Map;for(const G of n)G.type===z.SolarPanel&&G.foundationId===f.foundationId&&O.set(G.id,G.ly);const V={name:"Set Width for All Solar Panel Arrays Above Foundation",timestamp:Date.now(),oldValues:O,newValue:B,groupId:f.foundationId,undo:()=>{for(const[G,Q]of V.oldValues.entries())v(G,Q)},redo:()=>{V.groupId&&T(V.groupId,V.newValue)}};a(V),T(f.foundationId,B),u(c+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{const O=i(f);if(O){if(S.current=!1,O.type===z.Cuboid){for(const G of n)if(G.type===z.SolarPanel&&G.parentId===f.parentId&&ye.isIdentical(G.normal,f.normal)&&F(G,B)){S.current=!0;break}}else for(const G of n)if(G.type===z.SolarPanel&&G.parentId===f.parentId&&F(G,B)){S.current=!0;break}if(S.current)C.current=B,g(f.ly);else{const G=new Map,Q=O.type===z.Cuboid;if(Q)for(const q of n)q.type===z.SolarPanel&&q.parentId===f.parentId&&ye.isIdentical(q.normal,f.normal)&&G.set(q.id,q.ly);else for(const q of n)q.type===z.SolarPanel&&q.parentId===f.parentId&&G.set(q.id,q.ly);const $=Q?f.normal:void 0,ie={name:"Set Width for All Solar Panel Arrays on Surface",timestamp:Date.now(),oldValues:G,newValue:B,groupId:f.parentId,normal:$,undo:()=>{for(const[q,se]of ie.oldValues.entries())v(q,se)},redo:()=>{ie.groupId&&w(ie.groupId,ie.normal,ie.newValue)}};a(ie),w(f.parentId,$,B),u(c+1)}}break}default:{const O=o(f.id),V=O?O.ly:f.ly;if(S.current=F(f,B),S.current)C.current=B,g(V);else{const G={name:"Set Solar Panel Array Width",timestamp:Date.now(),oldValue:V,newValue:B,changedElementId:f.id,changedElementType:f.type,undo:()=>{v(G.changedElementId,G.oldValue)},redo:()=>{v(G.changedElementId,G.newValue)}};a(G),v(f.id,B),u(c+1)}break}}},U=()=>{S.current=!1,t(!1)},W=()=>{U(),d()},k=()=>{N(p),S.current||(t(!1),u(0))},D=B=>{let O=B??1;return O=Math.max(1,Math.ceil((O-A/2)/A))*A,O},L=()=>{N(p)},j=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("word.Width",P),rejectedMessage:j,onApply:L,onClose:U,onClickCancel:W,onClickOk:k,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:A,max:100*A,step:A,style:{width:120},precision:2,value:p,onChange:B=>{B!==null&&g(D(B))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Math.round(p/A)+" "+Y.t("solarPanelMenu.PanelsLong",P),h.jsx("br",{}),Y.t("word.MaximumNumber",P),": 100 ",Y.t("solarPanelMenu.Panels",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:R,value:l,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",P)})]})})})]})})},spo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(En),a=M(vh),l=M(xh),s=M(no),c=M(Qn),u=M(b=>b.elements.find(R=>R.selected&&R.type===z.SolarPanel)),[d,f]=m.useState((u==null?void 0:u.inverterEfficiency)??.95),p=$t(),g=(b,R)=>{e(H=>{for(const F of H.elements)if(F.type===z.SolarPanel&&F.id===b&&!F.locked){F.inverterEfficiency=R;break}})},A=(b,R)=>{e(H=>{for(const F of H.elements)F.type===z.SolarPanel&&F.foundationId===b&&!F.locked&&(F.inverterEfficiency=R)})},y=(b,R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.SolarPanel&&!E.locked){let N;R?N=E.parentId===b&&ye.isIdentical(E.normal,R):N=E.parentId===b,N&&(E.inverterEfficiency=H)}})},S=b=>{e(R=>{for(const H of R.elements)H.type===z.SolarPanel&&!H.locked&&(H.inverterEfficiency=b)})},C=(b,R)=>{M.getState().set(H=>{for(const F of H.elements)F.type===z.SolarPanel&&!F.locked&&b.has(F.id)&&(F.inverterEfficiency=R)})},P=b=>{l(b.target.value)},v=b=>{switch(a){case re.AllSelectedObjectsOfThisType:{for(const R of n)if(R.type===z.SolarPanel&&!R.locked&&M.getState().selectedElementIdSet.has(R.id)&&Math.abs((R.inverterEfficiency??.95)-b)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const R of n)if(R.type===z.SolarPanel&&!R.locked&&Math.abs((R.inverterEfficiency??.95)-b)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const R of n)if(R.type===z.SolarPanel&&R.foundationId===(u==null?void 0:u.foundationId)&&!R.locked&&Math.abs((R.inverterEfficiency??.95)-b)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const R=r(u);if(R){if(R.type===z.Cuboid){for(const F of n)if(F.type===z.SolarPanel&&F.parentId===u.parentId&&ye.isIdentical(F.normal,u.normal)&&!F.locked&&Math.abs((F.inverterEfficiency??.95)-b)>Et)return!0}else for(const F of n)if(F.type===z.SolarPanel&&F.parentId===u.parentId&&!F.locked&&Math.abs((F.inverterEfficiency??.95)-b)>Et)return!0}break}default:{if(Math.abs(((u==null?void 0:u.inverterEfficiency)??.95)-b)>Et)return!0;break}}return!1},T=b=>{if(u&&v(b))switch(a){case re.AllSelectedObjectsOfThisType:{const R=new Map;for(const F of n)F.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(F.id)&&R.set(F.id,F.inverterEfficiency??.95);const H={name:"Set Inverter Efficiency for Selected Solar Panel Arrays",timestamp:Date.now(),oldValues:R,newValue:b,undo:()=>{for(const[F,E]of H.oldValues.entries())g(F,E)},redo:()=>{C(H.oldValues,H.newValue)}};i(H),C(R,b),c(s+1);break}case re.AllObjectsOfThisType:{const R=new Map;for(const F of n)F.type===z.SolarPanel&&R.set(F.id,F.inverterEfficiency??.95);const H={name:"Set Inverter Efficiency for All Solar Panel Arrays",timestamp:Date.now(),oldValues:R,newValue:b,undo:()=>{for(const[F,E]of H.oldValues.entries())g(F,E)},redo:()=>{S(H.newValue)}};i(H),S(b),c(s+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const R=new Map;for(const F of n)F.type===z.SolarPanel&&F.foundationId===u.foundationId&&R.set(F.id,F.inverterEfficiency??.95);const H={name:"Set Inverter Efficiency for All Solar Panel Arrays Above Foundation",timestamp:Date.now(),oldValues:R,newValue:b,groupId:u.foundationId,undo:()=>{for(const[F,E]of H.oldValues.entries())g(F,E)},redo:()=>{H.groupId&&A(H.groupId,H.newValue)}};i(H),A(u.foundationId,b),c(s+1)}break}case re.AllObjectsOfThisTypeOnSurface:{const R=r(u);if(R){const H=new Map,F=R.type===z.Cuboid;if(F)for(const U of n)U.type===z.SolarPanel&&U.parentId===u.parentId&&ye.isIdentical(U.normal,u.normal)&&H.set(U.id,U.inverterEfficiency??.95);else for(const U of n)U.type===z.SolarPanel&&U.parentId===u.parentId&&H.set(U.id,U.inverterEfficiency??.95);const E=F?u.normal:void 0,N={name:"Set Inverter Efficiency for All Solar Panel Arrays on Surface",timestamp:Date.now(),oldValues:H,newValue:b,groupId:u.parentId,normal:E,undo:()=>{for(const[U,W]of N.oldValues.entries())g(U,W)},redo:()=>{N.groupId&&y(N.groupId,N.normal,N.newValue)}};i(N),y(u.parentId,E,b),c(s+1)}break}default:{const R=o(u.id),H=R?R.inverterEfficiency??.95:u.inverterEfficiency??.95,F={name:"Set Solar Panel Array Inverter Efficiency",timestamp:Date.now(),oldValue:H,newValue:b,changedElementId:u.id,changedElementType:u.type,undo:()=>{g(F.changedElementId,F.oldValue)},redo:()=>{g(F.changedElementId,F.newValue)}};i(F),g(u.id,b),c(s+1);break}}},w=()=>{t(!1)},x=()=>{T(d)};return h.jsx(so,{width:550,title:Y.t("solarPanelMenu.InverterEfficiency",p),onApply:x,onClose:w,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.5,max:1,step:.01,style:{width:120},precision:2,value:d,onChange:b=>{b!==null&&f(b)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:["[0.5, 1.0]",h.jsx("br",{}),Y.t("solarPanelMenu.InverterEfficiencyExplained",p)]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P,value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",p)})]})})})]})})},cpo=({setDialogVisible:t})=>{const e=M(pn),n=M(m0),o=M(Kn),r=M(Jn),i=M(Gr),a=M(En),l=M(vh),s=M(xh),c=M(no),u=M(Qn),d=M(Xi),f=M(L=>L.elements.find(j=>j.selected&&j.type===z.SolarPanel)),[p,g]=m.useState(!1),[A,y]=m.useState(!1),[S,C]=m.useState({left:0,top:0,bottom:0,right:0}),P=m.useRef(null),v=m.useRef((f==null?void 0:f.dcToAcRatio)??1),T={lng:n};m.useEffect(()=>{f&&(v.current=f.dcToAcRatio??1)},[f.dcToAcRatio]);const w=(L,j)=>{e(B=>{for(const O of B.elements)if(O.type===z.SolarPanel&&O.id===L&&!O.locked){O.dcToAcRatio=j;break}})},x=(L,j)=>{e(B=>{for(const O of B.elements)O.type===z.SolarPanel&&O.foundationId===L&&!O.locked&&(O.dcToAcRatio=j)})},b=(L,j,B)=>{e(O=>{for(const V of O.elements)if(V.type===z.SolarPanel&&!V.locked){let G;j?G=V.parentId===L&&ye.isIdentical(V.normal,j):G=V.parentId===L,G&&(V.dcToAcRatio=B)}})},R=L=>{e(j=>{for(const B of j.elements)B.type===z.SolarPanel&&!B.locked&&(B.dcToAcRatio=L)})},H=(L,j)=>{M.getState().set(B=>{for(const O of B.elements)O.type===z.SolarPanel&&!O.locked&&L.has(O.id)&&(O.dcToAcRatio=j)})},F=L=>{s(L.target.value),g(!p)},E=L=>{switch(l){case re.AllSelectedObjectsOfThisType:{for(const j of o)if(j.type===z.SolarPanel&&!j.locked&&M.getState().selectedElementIdSet.has(j.id)&&Math.abs((j.dcToAcRatio??1)-L)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const j of o)if(j.type===z.SolarPanel&&!j.locked&&Math.abs((j.dcToAcRatio??1)-L)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const j of o)if(j.type===z.SolarPanel&&j.foundationId===(f==null?void 0:f.foundationId)&&!j.locked&&Math.abs((j.dcToAcRatio??1)-L)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const j=i(f);if(j){if(j.type===z.Cuboid){for(const O of o)if(O.type===z.SolarPanel&&O.parentId===f.parentId&&ye.isIdentical(O.normal,f.normal)&&!O.locked&&Math.abs((O.dcToAcRatio??1)-L)>Et)return!0}else for(const O of o)if(O.type===z.SolarPanel&&O.parentId===f.parentId&&!O.locked&&Math.abs((O.dcToAcRatio??1)-L)>Et)return!0}break}default:{if(Math.abs(((f==null?void 0:f.dcToAcRatio)??1)-L)>Et)return!0;break}}return!1},N=L=>{if(f&&E(L)){switch(l){case re.AllSelectedObjectsOfThisType:{const j=new Map;for(const O of o)O.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(O.id)&&j.set(O.id,O.dcToAcRatio??1);const B={name:"Set DC-AC Ratio for Selected Solar Panel Arrays",timestamp:Date.now(),oldValues:j,newValue:L,undo:()=>{for(const[O,V]of B.oldValues.entries())w(O,V)},redo:()=>{H(B.oldValues,B.newValue)}};a(B),H(j,L),u(c+1);break}case re.AllObjectsOfThisType:{const j=new Map;for(const O of o)O.type===z.SolarPanel&&j.set(O.id,O.dcToAcRatio??1);const B={name:"Set DC-AC Ratio for All Solar Panel Arrays",timestamp:Date.now(),oldValues:j,newValue:L,undo:()=>{for(const[O,V]of B.oldValues.entries())w(O,V)},redo:()=>{R(B.newValue)}};a(B),R(L),u(c+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const j=new Map;for(const O of o)O.type===z.SolarPanel&&O.foundationId===f.foundationId&&j.set(O.id,O.dcToAcRatio??1);const B={name:"Set DC-AC Ratio for All Solar Panel Arrays Above Foundation",timestamp:Date.now(),oldValues:j,newValue:L,groupId:f.foundationId,undo:()=>{for(const[O,V]of B.oldValues.entries())w(O,V)},redo:()=>{B.groupId&&x(B.groupId,B.newValue)}};a(B),x(f.foundationId,L),u(c+1)}break}case re.AllObjectsOfThisTypeOnSurface:{const j=i(f);if(j){const B=new Map,O=j.type===z.Cuboid;if(O)for(const Q of o)Q.type===z.SolarPanel&&Q.parentId===f.parentId&&ye.isIdentical(Q.normal,f.normal)&&B.set(Q.id,Q.dcToAcRatio??1);else for(const Q of o)Q.type===z.SolarPanel&&Q.parentId===f.parentId&&B.set(Q.id,Q.dcToAcRatio??1);const V=O?f.normal:void 0,G={name:"Set DC-AC Ratio for All Solar Panel Arrays on Surface",timestamp:Date.now(),oldValues:B,newValue:L,groupId:f.parentId,normal:V,undo:()=>{for(const[Q,$]of G.oldValues.entries())w(Q,$)},redo:()=>{G.groupId&&b(G.groupId,G.normal,G.newValue)}};a(G),b(f.parentId,V,L),u(c+1)}break}default:{const j=r(f.id),B=j?j.dcToAcRatio??1:f.dcToAcRatio??1,O={name:"Set Solar Panel Array DC-AC Ratio",timestamp:Date.now(),oldValue:B,newValue:L,changedElementId:f.id,changedElementType:f.type,undo:()=>{w(O.changedElementId,O.oldValue)},redo:()=>{w(O.changedElementId,O.newValue)}};a(O),w(f.id,L),u(c+1);break}}g(!p)}},U=(L,j)=>{if(P.current){const{clientWidth:B,clientHeight:O}=window.document.documentElement,V=P.current.getBoundingClientRect();C({left:-V.left+j.x,right:B-(V.right-j.x),top:-V.top+j.y,bottom:O-((V==null?void 0:V.bottom)-j.y)})}},W=()=>{v.current=f.dcToAcRatio??1,t(!1)},k=()=>{W(),d()},D=()=>{N(v.current),t(!1),u(0)};return h.jsx(h.Fragment,{children:h.jsx(xi,{width:550,open:!0,title:h.jsx("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>y(!0),onMouseOut:()=>y(!1),children:Y.t("solarPanelMenu.DcToAcSizeRatio",T)}),footer:[h.jsx(io,{onClick:()=>{N(v.current)},children:Y.t("word.Apply",T)},"Apply"),h.jsx(io,{onClick:k,children:Y.t("word.Cancel",T)},"Cancel"),h.jsx(io,{type:"primary",onClick:D,children:Y.t("word.OK",T)},"OK")],onCancel:W,maskClosable:!1,destroyOnClose:!1,modalRender:L=>h.jsx(Bi,{disabled:!A,bounds:S,onStart:(j,B)=>U(j,B),children:h.jsx("div",{ref:P,children:L})}),children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:2,step:.01,style:{width:120},precision:2,value:v.current,onChange:L=>{L!==null&&(v.current=L,g(!p))},onPressEnter:D}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:["[1.0, 2.0]",h.jsx("br",{}),Y.t("solarPanelMenu.DcToAcSizeRatioExplained",T)]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:F,value:l,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",T)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",T)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",T)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",T)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",T)})]})})})]})})})},kHe=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(l7t),i=M(Gr),a=M(En),l=M(vh),s=M(xh),c=M(no),u=M(Qn),d=M(Xi),f=uo(z.SolarPanel),p=(f==null?void 0:f.tiltAngle)??0,g=(f==null?void 0:f.parentType)===z.Wall,[A,y]=m.useState(g?-p:p),S=m.useRef(!1),C=m.useRef(),P=$t(),v=(k,D,L)=>{e(j=>{for(const B of j.elements)if(B.type===z.SolarPanel&&B.foundationId===k&&!B.locked){const O=B;O.parentType===z.Wall?O.tiltAngle=Math.min(0,L?-D:D):O.tiltAngle=D}})},T=(k,D,L)=>{e(j=>{for(const B of j.elements)if(B.type===z.SolarPanel&&!B.locked){let O;if(D?O=B.parentId===k&&ye.isIdentical(B.normal,D):O=B.parentId===k,O){const V=B;V.tiltAngle=L}}})},w=(k,D)=>{e(L=>{for(const j of L.elements)if(j.type===z.SolarPanel&&!j.locked){const B=j;B.parentType===z.Wall?B.tiltAngle=Math.min(0,D?-k:k):B.tiltAngle=k}})},x=(k,D,L)=>{M.getState().set(j=>{for(const B of j.elements)if(B.type===z.SolarPanel&&!B.locked&&k.has(B.id)){const O=B;O.parentType===z.Wall?O.tiltAngle=Math.min(0,L?-D:D):O.tiltAngle=D}})},b=k=>{s(k.target.value)},R=k=>{if(f){switch(l){case re.AllSelectedObjectsOfThisType:{for(const D of n)if(D.type===z.SolarPanel&&!D.locked&&M.getState().selectedElementIdSet.has(D.id)&&Math.abs(D.tiltAngle-k)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const D of n)if(D.type===z.SolarPanel&&!D.locked&&Math.abs(D.tiltAngle-k)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const D of n)if(D.type===z.SolarPanel&&D.foundationId===(f==null?void 0:f.foundationId)&&!D.locked&&Math.abs(D.tiltAngle-k)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const D=i(f);if(D){if(D.type===z.Cuboid){for(const j of n)if(j.type===z.SolarPanel&&j.parentId===f.parentId&&ye.isIdentical(j.normal,f.normal)&&!j.locked&&Math.abs(j.tiltAngle-k)>Et)return!0}else for(const j of n)if(j.type===z.SolarPanel&&j.parentId===f.parentId&&!j.locked&&Math.abs(j.tiltAngle-k)>Et)return!0}break}default:{if(Math.abs((f==null?void 0:f.tiltAngle)-k)>Et)return!0;break}}return!1}},H=k=>{if(g&&(k=-k),!!f&&R(k)){switch(C.current=void 0,l){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const D of n)if(D.type===z.SolarPanel&&D.parentType!==z.Wall&&M.getState().selectedElementIdSet.has(D.id)&&.5*D.ly*Math.abs(Math.sin(k))>D.poleHeight){S.current=!0;break}if(S.current)C.current=k,y(f.tiltAngle);else{const D=new Map;for(const j of n)j.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(j.id)&&D.set(j.id,j.tiltAngle);const L={name:"Set Tilt Angle for Selected Solar Panel Arrays",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())r(j,B)},redo:()=>{x(L.oldValues,L.newValue,!g)}};a(L),x(D,k,!g),u(c+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const D of n)if(D.type===z.SolarPanel&&D.parentType!==z.Wall&&.5*D.ly*Math.abs(Math.sin(k))>D.poleHeight){S.current=!0;break}if(S.current)C.current=k,y(f.tiltAngle);else{const D=new Map;for(const j of n)j.type===z.SolarPanel&&D.set(j.id,j.tiltAngle);const L={name:"Set Tilt Angle for All Solar Panel Arrays",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())r(j,B)},redo:()=>{w(L.newValue,!g)}};a(L),w(k,!g),u(c+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){S.current=!1;for(const D of n)if(D.type===z.SolarPanel&&D.foundationId===f.foundationId&&D.parentType!==z.Wall&&.5*D.ly*Math.abs(Math.sin(k))>D.poleHeight){S.current=!0;break}if(S.current)C.current=k,y(f.tiltAngle);else{const D=new Map;for(const j of n)j.type===z.SolarPanel&&j.foundationId===f.foundationId&&D.set(j.id,j.tiltAngle);const L={name:"Set Tilt Angle for All Solar Panel Arrays Above Foundation",timestamp:Date.now(),oldValues:D,newValue:k,groupId:f.foundationId,undo:()=>{for(const[j,B]of L.oldValues.entries())r(j,B)},redo:()=>{L.groupId&&v(L.groupId,L.newValue,!g)}};a(L),v(f.foundationId,k,!g),u(c+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{const D=i(f);if(D){S.current=!1;const L=D.type===z.Cuboid;if(L){for(const j of n)if(j.type===z.SolarPanel&&j.parentId===f.parentId&&ye.isIdentical(j.normal,f.normal)&&.5*j.ly*Math.abs(Math.sin(k))>j.poleHeight){S.current=!0;break}}else if(f.parentType===z.Wall)S.current=!1;else for(const j of n)if(j.type===z.SolarPanel&&j.parentId===f.parentId&&.5*j.ly*Math.abs(Math.sin(k))>j.poleHeight){S.current=!0;break}if(S.current)C.current=k,y(f.tiltAngle);else{const j=new Map;if(L)for(const V of n)V.type===z.SolarPanel&&V.parentId===f.parentId&&ye.isIdentical(V.normal,f.normal)&&j.set(V.id,V.tiltAngle);else for(const V of n)V.type===z.SolarPanel&&V.parentId===f.parentId&&j.set(V.id,V.tiltAngle);const B=L?f.normal:void 0,O={name:"Set Tilt Angle for All Solar Panel Arrays on Surface",timestamp:Date.now(),oldValues:j,newValue:k,groupId:f.parentId,normal:B,undo:()=>{for(const[V,G]of O.oldValues.entries())r(V,G)},redo:()=>{O.groupId&&T(O.groupId,O.normal,O.newValue)}};a(O),T(f.parentId,B,k),u(c+1)}}break}default:{const D=o(f.id),L=D?D.tiltAngle:f.tiltAngle;if(S.current=.5*f.ly*Math.abs(Math.sin(k))>f.poleHeight,f.parentType===z.Wall&&(S.current=!1),S.current)C.current=k,y(L);else{const j={name:"Set Solar Panel Array Tilt Angle",timestamp:Date.now(),oldValue:L,newValue:k,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(j.changedElementId,j.oldValue)},redo:()=>{r(j.changedElementId,j.newValue)}};a(j),r(f.id,k),u(c+1)}break}}e(D=>{D.actionState.solarPanelTiltAngle=k})}},F=()=>{S.current=!1,t(!1)},E=()=>{F(),d()},N=()=>{H(A),S.current||(t(!1),u(0))},U=()=>{H(A)},W=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+ye.toDegrees(C.current).toFixed(1)+"°)":null):null;return h.jsx(so,{width:550,title:Y.t("solarPanelMenu.TiltAngle",P),rejectedMessage:W,onApply:U,onClose:F,onClickCancel:E,onClickOk:N,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:g?0:-90,max:90,style:{width:120},precision:2,value:parseFloat(ye.toDegrees(A).toFixed(2)),step:1,formatter:k=>`${k}°`,onChange:k=>{k!==null&&y(ye.toRadians(k))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",P),": [",g?"0°":"-90°",", 90°]",h.jsx("br",{}),Y.t("solarPanelMenu.SouthFacingIsPositive",P)]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:18,children:h.jsx(Le.Group,{onChange:b,value:l,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",P)})]})})})]})})},upo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Qq),i=M(yYe),a=M(AYe),l=M(wYe),s=M(Gr),c=M(En),u=M(vh),d=M(xh),f=M(no),p=M(Qn),g=M(Xi),A=uo(z.SolarPanel),y=m.useRef(!1),S=m.useRef(),[C,P]=m.useState(A?-A.relativeAzimuth:0),v=$t(),T=k=>{d(k.target.value)},w=(k,D)=>{const L=s(k);if(L){if(L.type===z.Cuboid&&!ye.isIdentical(k.normal,as))return!0;const j=JSON.parse(JSON.stringify(k));return j.relativeAzimuth=-D,L.type===z.Roof?ye.checkElementOnRoofState(j,L)===pa.Valid:ye.isSolarCollectorWithinHorizontalSurface(j,L)}return!1},x=(k,D)=>!w(k,D),b=k=>{if(A){switch(u){case re.AllSelectedObjectsOfThisType:for(const D of n)if(D.type===z.SolarPanel&&!D.locked&&D.parentType!==z.Wall&&M.getState().selectedElementIdSet.has(D.id)&&Math.abs(-D.relativeAzimuth-k)>Et)return!0;break;case re.AllObjectsOfThisType:for(const D of n)if(D.type===z.SolarPanel&&!D.locked&&D.parentType!==z.Wall&&Math.abs(-D.relativeAzimuth-k)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const D of n)if(D.type===z.SolarPanel&&D.foundationId===(A==null?void 0:A.foundationId)&&!D.locked&&D.parentType!==z.Wall&&Math.abs(-D.relativeAzimuth-k)>Et)return!0;break;case re.AllObjectsOfThisTypeOnSurface:if(A!=null&&A.parentId){const D=s(A);if(D){if(D.type===z.Cuboid){for(const j of n)if(j.type===z.SolarPanel&&j.parentId===A.parentId&&ye.isIdentical(j.normal,A.normal)&&!j.locked&&Math.abs(-j.relativeAzimuth-k)>Et)return!0}else for(const j of n)if(j.type===z.SolarPanel&&j.parentId===A.parentId&&!j.locked&&Math.abs(-j.relativeAzimuth-k)>Et)return!0}}break;default:if(Math.abs(-(A==null?void 0:A.relativeAzimuth)-k)>Et)return!0}return!1}},R=(k,D)=>{M.getState().set(L=>{for(const j of L.elements)if(j.type===z.SolarPanel&&!j.locked&&k.has(j.id)){const B=j;B.relativeAzimuth=D}})},H=k=>{if(A&&b(k)){switch(S.current=void 0,u){case re.AllSelectedObjectsOfThisType:{y.current=!1;for(const D of n)if(D.type===z.SolarPanel&&D.parentType!==z.Wall&&M.getState().selectedElementIdSet.has(D.id)&&x(D,k)){y.current=!0;break}if(y.current)S.current=k,P(-A.relativeAzimuth);else{const D=new Map;for(const j of n)j.type===z.SolarPanel&&j.parentType!==z.Wall&&M.getState().selectedElementIdSet.has(j.id)&&D.set(j.id,-j.relativeAzimuth);const L={name:"Set Relative Azimuth for Selected Solar Panel Arrays",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())r(j,-B)},redo:()=>{R(L.oldValues,L.newValue)}};c(L),R(D,-k),p(f+1)}break}case re.AllObjectsOfThisType:{y.current=!1;for(const D of n)if(D.type===z.SolarPanel&&D.parentType!==z.Wall&&x(D,k)){y.current=!0;break}if(y.current)S.current=k,P(-A.relativeAzimuth);else{const D=new Map;for(const j of n)j.type===z.SolarPanel&&j.parentType!==z.Wall&&D.set(j.id,-j.relativeAzimuth);const L={name:"Set Relative Azimuth for All Solar Panel Arrays",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())r(j,-B)},redo:()=>{l(z.SolarPanel,-L.newValue)}};c(L),l(z.SolarPanel,-k),p(f+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(A.foundationId){y.current=!1;for(const D of n)if(D.type===z.SolarPanel&&D.foundationId===A.foundationId&&D.parentType!==z.Wall&&x(D,k)){y.current=!0;break}if(y.current)S.current=k,P(-A.relativeAzimuth);else{const D=new Map;for(const j of n)j.type===z.SolarPanel&&j.foundationId===A.foundationId&&j.parentType!==z.Wall&&D.set(j.id,-j.relativeAzimuth);const L={name:"Set Relative Azimuth for All Solar Panel Arrays Above Foundation",timestamp:Date.now(),oldValues:D,newValue:k,groupId:A.foundationId,undo:()=>{for(const[j,B]of L.oldValues.entries())r(j,-B)},redo:()=>{L.groupId&&a(z.SolarPanel,L.groupId,-L.newValue)}};c(L),a(z.SolarPanel,A.foundationId,-k),p(f+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{if(A.parentId){const D=s(A);if(D){if(y.current=!1,D.type===z.Cuboid){for(const j of n)if(j.type===z.SolarPanel&&j.parentId===A.parentId&&ye.isIdentical(j.normal,A.normal)&&x(j,k)){y.current=!0;break}}else for(const j of n)if(j.type===z.SolarPanel&&j.parentId===A.parentId&&x(j,k)){y.current=!0;break}if(y.current)S.current=k,P(-A.relativeAzimuth);else{const j=new Map,B=D.type===z.Cuboid;if(B)for(const G of n)G.type===z.SolarPanel&&G.parentId===A.parentId&&ye.isIdentical(G.normal,A.normal)&&j.set(G.id,-G.relativeAzimuth);else for(const G of n)G.type===z.SolarPanel&&G.parentId===A.parentId&&j.set(G.id,-G.relativeAzimuth);const O=B?A.normal:void 0,V={name:"Set Relative Azimuth for All Solar Panel Arrays on Surface",timestamp:Date.now(),oldValues:j,newValue:k,groupId:A.parentId,normal:O,undo:()=>{for(const[G,Q]of V.oldValues.entries())r(G,-Q)},redo:()=>{V.groupId&&i(z.SolarPanel,V.groupId,V.normal,-V.newValue)}};c(V),i(z.SolarPanel,A.parentId,O,-k),p(f+1)}}}break}default:{const D=o(A.id),L=D?-D.relativeAzimuth:-A.relativeAzimuth;if(y.current=x(A,k),y.current)S.current=k,P(L);else{const j={name:"Set Solar Panel Array Relative Azimuth",timestamp:Date.now(),oldValue:L,newValue:k,changedElementId:A.id,changedElementType:A.type,undo:()=>{r(j.changedElementId,-j.oldValue)},redo:()=>{r(j.changedElementId,-j.newValue)}};c(j),r(A.id,-k),p(f+1)}break}}e(D=>{D.actionState.solarPanelRelativeAzimuth=-k})}},F=()=>{y.current=!1,t(!1)},E=()=>{F(),g()},N=()=>{H(C),y.current||(t(!1),p(0))},U=()=>{H(C)},W=y.current?": "+Y.t("message.NotApplicableToSelectedAction",v)+(S.current!==void 0?" ("+ye.toDegrees(S.current).toFixed(1)+"°)":null):null;return h.jsx(so,{width:550,title:Y.t("solarCollectorMenu.RelativeAzimuth",v),rejectedMessage:W,onApply:U,onClose:F,onClickCancel:E,onClickOk:N,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:-180,max:180,style:{width:120},precision:2,step:1,value:parseFloat(ye.toDegrees(C).toFixed(2)),formatter:k=>`${k}°`,onChange:k=>{k!==null&&P(ye.toRadians(k))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",v),": [-180°, 180°]",h.jsx("br",{}),Y.t("message.AzimuthOfNorthIsZero",v),h.jsx("br",{}),Y.t("message.CounterclockwiseAzimuthIsPositive",v)]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:18,children:h.jsx(Le.Group,{onChange:T,value:u,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",v)})]})})})]})})},dpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(En),a=M(vh),l=M(xh),s=M(no),c=M(Qn),u=uo(),[d,f]=m.useState((u==null?void 0:u.trackerType)??Ll.NO_TRACKER),p=$t(),{Option:g}=Uo,A=(R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.SolarPanel&&E.id===R&&!E.locked){E.trackerType=H;break}})},y=(R,H)=>{e(F=>{for(const E of F.elements)E.type===z.SolarPanel&&E.foundationId===R&&!E.locked&&(E.trackerType=H)})},S=(R,H,F)=>{e(E=>{for(const N of E.elements)if(N.type===z.SolarPanel&&!N.locked){let U;H?U=N.parentId===R&&ye.isIdentical(N.normal,H):U=N.parentId===R,U&&(N.trackerType=F)}})},C=R=>{e(H=>{for(const F of H.elements)F.type===z.SolarPanel&&!F.locked&&(F.trackerType=R)})},P=(R,H)=>{M.getState().set(F=>{for(const E of F.elements)E.type===z.SolarPanel&&!E.locked&&R.has(E.id)&&(E.trackerType=H)})},v=R=>{l(R.target.value)},T=R=>{if(u){switch(a){case re.AllSelectedObjectsOfThisType:{for(const H of n)if(H.type===z.SolarPanel&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&H.trackerType!==R)return!0;break}case re.AllObjectsOfThisType:{for(const H of n)if(H.type===z.SolarPanel&&!H.locked&&H.trackerType!==R)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const H of n)if(H.type===z.SolarPanel&&H.foundationId===(u==null?void 0:u.foundationId)&&!H.locked&&H.trackerType!==R)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const H=r(u);if(H){if(H.type===z.Cuboid){for(const E of n)if(E.type===z.SolarPanel&&E.parentId===u.parentId&&ye.isIdentical(E.normal,u.normal)&&!E.locked&&E.trackerType!==R)return!0}else for(const E of n)if(E.type===z.SolarPanel&&E.parentId===u.parentId&&!E.locked&&E.trackerType!==R)return!0}break}default:{if((u==null?void 0:u.trackerType)!==R)return!0;break}}return!1}},w=R=>{if(u&&T(R))switch(a){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(E.id)&&H.set(E.id,E.trackerType);const F={name:"Set Tracker Type for Selected Solar Panel Arrays",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())A(E,N)},redo:()=>{P(F.oldValues,F.newValue)}};i(F),P(H,R),c(s+1);break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.SolarPanel&&H.set(E.id,E.trackerType);const F={name:"Set Tracker Type for All Solar Panel Arrays",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())A(E,N)},redo:()=>{C(F.newValue)}};i(F),C(R),c(s+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const H=new Map;for(const E of n)E.type===z.SolarPanel&&E.foundationId===u.foundationId&&H.set(E.id,E.trackerType);const F={name:"Set Tracker Type for All Solar Panel Arrays Above Foundation",timestamp:Date.now(),oldValues:H,newValue:R,groupId:u.foundationId,undo:()=>{for(const[E,N]of F.oldValues.entries())A(E,N)},redo:()=>{F.groupId&&y(F.groupId,F.newValue)}};i(F),y(u.foundationId,R),c(s+1)}break}case re.AllObjectsOfThisTypeOnSurface:{const H=r(u);if(H){const F=new Map,E=H.type===z.Cuboid;if(E)for(const W of n)W.type===z.SolarPanel&&W.parentId===u.parentId&&ye.isIdentical(W.normal,u.normal)&&F.set(W.id,W.trackerType);else for(const W of n)W.type===z.SolarPanel&&W.parentId===u.parentId&&F.set(W.id,W.trackerType);const N=E?u.normal:void 0,U={name:"Set Tracker Type for All Solar Panel Arrays on Surface",timestamp:Date.now(),oldValues:F,newValue:R,groupId:u.parentId,normal:N,undo:()=>{for(const[W,k]of U.oldValues.entries())A(W,k)},redo:()=>{U.groupId&&S(U.groupId,U.normal,U.newValue)}};i(U),S(u.parentId,N,R),c(s+1)}break}default:{const H=o(u.id),F=H?H.trackerType:u.trackerType,E={name:"Set Solar Panel Array Tracker Type",timestamp:Date.now(),oldValue:F,newValue:R,changedElementId:u.id,changedElementType:u.type,undo:()=>{A(E.changedElementId,E.oldValue)},redo:()=>{A(E.changedElementId,E.newValue)}};i(E),A(u.id,R),c(s+1);break}}},x=()=>{t(!1)},b=()=>{w(d)};return h.jsx(so,{width:550,title:Y.t("solarPanelMenu.Tracker",p),onApply:b,onClose:x,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsxs(Uo,{style:{width:"120px"},value:d,onChange:R=>f(R),children:[h.jsx(g,{value:Ll.NO_TRACKER,title:Y.t("solarPanelMenu.NoTracker",p),children:Y.t("word.None",p)},"NONE"),h.jsx(g,{value:Ll.HORIZONTAL_SINGLE_AXIS_TRACKER,title:Y.t("solarPanelMenu.HorizontalSingleAxisTracker",p),children:"HSAT"},"HSAT"),h.jsx(g,{value:Ll.VERTICAL_SINGLE_AXIS_TRACKER,title:Y.t("solarPanelMenu.VerticalSingleAxisTracker",p),children:"VSAT"},"VSAT"),h.jsx(g,{value:Ll.ALTAZIMUTH_DUAL_AXIS_TRACKER,title:Y.t("solarPanelMenu.AltazimuthDualAxisTracker",p),children:"AADAT"},"AADAT")]}),h.jsx("div",{style:{paddingTop:"20px",paddingRight:"10px",textAlign:"left",fontSize:"11px"},children:Y.t("solarPanelMenu.SolarTrackerFollowsSun",p)})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",p)})]})})})]})})},fpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(En),a=M(vh),l=M(xh),s=M(no),c=M(Qn),u=uo(z.SolarPanel),[d,f]=m.useState((u==null?void 0:u.frameColor)??"white"),p=$t(),g=(b,R)=>{e(H=>{for(const F of H.elements)if(F.type===z.SolarPanel&&F.id===b&&!F.locked){F.frameColor=R;break}})},A=(b,R)=>{e(H=>{for(const F of H.elements)F.type===z.SolarPanel&&F.foundationId===b&&!F.locked&&(F.frameColor=R)})},y=(b,R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.SolarPanel&&!E.locked){let N;R?N=E.parentId===b&&ye.isIdentical(E.normal,R):N=E.parentId===b,N&&(E.frameColor=H)}})},S=b=>{e(R=>{for(const H of R.elements)H.type===z.SolarPanel&&!H.locked&&(H.frameColor=b)})},C=(b,R)=>{M.getState().set(H=>{for(const F of H.elements)F.type===z.SolarPanel&&!F.locked&&b.has(F.id)&&(F.frameColor=R)})},P=b=>{l(b.target.value)},v=b=>{if(u){switch(a){case re.AllSelectedObjectsOfThisType:{for(const R of n)if(R.type===z.SolarPanel&&!R.locked&&M.getState().selectedElementIdSet.has(R.id)&&R.frameColor!==b)return!0;break}case re.AllObjectsOfThisType:{for(const R of n)if(R.type===z.SolarPanel&&!R.locked&&R.frameColor!==b)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const R of n)if(R.type===z.SolarPanel&&R.foundationId===(u==null?void 0:u.foundationId)&&!R.locked&&R.frameColor!==b)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const R=r(u);if(R){if(R.type===z.Cuboid){for(const F of n)if(F.type===z.SolarPanel&&F.parentId===u.parentId&&ye.isIdentical(F.normal,u.normal)&&!F.locked&&F.frameColor!==b)return!0}else for(const F of n)if(F.type===z.SolarPanel&&F.parentId===u.parentId&&!F.locked&&F.frameColor!==b)return!0}break}default:{if((u==null?void 0:u.frameColor)!==b)return!0;break}}return!1}},T=b=>{if(u&&v(b)){switch(a){case re.AllSelectedObjectsOfThisType:{const R=new Map;for(const F of n)F.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(F.id)&&R.set(F.id,F.frameColor??"white");const H={name:"Set Frame Color for Selected Solar Panels",timestamp:Date.now(),oldValues:R,newValue:b,undo:()=>{for(const[F,E]of H.oldValues.entries())g(F,E)},redo:()=>{C(H.oldValues,H.newValue)}};i(H),C(R,b),c(s+1);break}case re.AllObjectsOfThisType:{const R=new Map;for(const F of n)F.type===z.SolarPanel&&R.set(F.id,F.frameColor??"white");const H={name:"Set Frame Color for All Solar Panels",timestamp:Date.now(),oldValues:R,newValue:b,undo:()=>{for(const[F,E]of H.oldValues.entries())g(F,E)},redo:()=>{S(H.newValue)}};i(H),S(b),c(s+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const R=new Map;for(const F of n)F.type===z.SolarPanel&&F.foundationId===u.foundationId&&R.set(F.id,F.frameColor??"white");const H={name:"Set Frame Color for All Solar Panels Above Foundation",timestamp:Date.now(),oldValues:R,newValue:b,groupId:u.foundationId,undo:()=>{for(const[F,E]of H.oldValues.entries())g(F,E)},redo:()=>{H.groupId&&A(H.groupId,H.newValue)}};i(H),A(u.foundationId,b),c(s+1)}break}case re.AllObjectsOfThisTypeOnSurface:{const R=r(u);if(R){const H=new Map,F=R.type===z.Cuboid;if(F)for(const U of n)U.type===z.SolarPanel&&U.parentId===u.parentId&&ye.isIdentical(U.normal,u.normal)&&H.set(U.id,U.frameColor??"white");else for(const U of n)U.type===z.SolarPanel&&U.parentId===u.parentId&&H.set(U.id,U.frameColor??"white");const E=F?u.normal:void 0,N={name:"Set Frame Color for All Solar Panels on Surface",timestamp:Date.now(),oldValues:H,newValue:b,groupId:u.parentId,normal:E,undo:()=>{for(const[U,W]of N.oldValues.entries())g(U,W)},redo:()=>{N.groupId&&y(N.groupId,N.normal,N.newValue)}};i(N),y(u.parentId,E,b),c(s+1)}break}default:{const R=o(u.id),H=R?R.frameColor:u.frameColor,F={name:"Set Frame Color of Selected Solar Panel",timestamp:Date.now(),oldValue:H,newValue:b,changedElementId:u.id,changedElementType:u.type,undo:()=>{g(u.id,F.oldValue)},redo:()=>{g(u.id,F.newValue)}};i(F),g(u.id,b),c(s+1);break}}e(R=>{R.actionState.solarPanelFrameColor=b})}},w=()=>{t(!1)},x=()=>{T(d)};return h.jsx(so,{width:680,title:Y.t("solarPanelMenu.FrameColor",p),onApply:x,onClose:w,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:10,children:h.jsx(Ld,{color:d??(u==null?void 0:u.color)??"white",onChangeComplete:b=>{f(b.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:14,children:h.jsx(Le.Group,{onChange:P,value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",p)})]})})})]})})},hpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(TW),i=M(p7t),a=M(PW),l=M(CW),s=M(Gr),c=M(En),u=M(vh),d=M(xh),f=M(no),p=M(Qn),g=M(Xi),A=uo(z.SolarPanel),[y,S]=m.useState((A==null?void 0:A.poleHeight)??0),C=m.useRef(!1),P=m.useRef(),v=$t(),T=U=>{d(U.target.value)},w=U=>{if(A){switch(u){case re.AllSelectedObjectsOfThisType:{for(const W of n)if(W.type===z.SolarPanel&&!W.locked&&M.getState().selectedElementIdSet.has(W.id)&&Math.abs(W.poleHeight-U)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const W of n)if(W.type===z.SolarPanel&&!W.locked&&Math.abs(W.poleHeight-U)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const W of n)if(W.type===z.SolarPanel&&W.foundationId===(A==null?void 0:A.foundationId)&&!W.locked&&Math.abs(W.poleHeight-U)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const W=s(A);if(W){if(W.type===z.Cuboid){for(const D of n)if(D.type===z.SolarPanel&&D.parentId===A.parentId&&ye.isIdentical(D.normal,A.normal)&&!D.locked&&Math.abs(D.poleHeight-U)>Et)return!0}else for(const D of n)if(D.type===z.SolarPanel&&D.parentId===A.parentId&&!D.locked&&Math.abs(D.poleHeight-U)>Et)return!0}break}default:{if(Math.abs((A==null?void 0:A.poleHeight)-U)>Et)return!0;break}}return!1}},x=(U,W)=>{M.getState().set(k=>{for(const D of k.elements)if(D.type===z.SolarPanel&&!D.locked&&U.has(D.id)){const L=D;L.poleHeight=W}})},b=U=>{if(A&&w(U)){switch(P.current=void 0,u){case re.AllSelectedObjectsOfThisType:{C.current=!1;for(const W of n)if(W.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(W.id)&&.5*W.ly*Math.abs(Math.sin(W.tiltAngle))>U){C.current=!0;break}if(C.current)P.current=U,S(A.poleHeight);else{const W=new Map;for(const D of n)D.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(D.id)&&W.set(D.id,D.poleHeight);const k={name:"Set Pole Height for Selected Solar Panel Arrays",timestamp:Date.now(),oldValues:W,newValue:U,undo:()=>{for(const[D,L]of k.oldValues.entries())r(D,L)},redo:()=>{x(k.oldValues,k.newValue)}};c(k),x(W,U),p(f+1)}break}case re.AllObjectsOfThisType:{C.current=!1;for(const W of n)if(W.type===z.SolarPanel&&.5*W.ly*Math.abs(Math.sin(W.tiltAngle))>U){C.current=!0;break}if(C.current)P.current=U,S(A.poleHeight);else{const W=new Map;for(const D of n)D.type===z.SolarPanel&&W.set(D.id,D.poleHeight);const k={name:"Set Pole Height for All Solar Panel Arrays",timestamp:Date.now(),oldValues:W,newValue:U,undo:()=>{for(const[D,L]of k.oldValues.entries())r(D,L)},redo:()=>{l(z.SolarPanel,k.newValue)}};c(k),l(z.SolarPanel,U),p(f+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(A.foundationId){C.current=!1;for(const W of n)if(W.type===z.SolarPanel&&W.foundationId===A.foundationId&&.5*W.ly*Math.abs(Math.sin(W.tiltAngle))>U){C.current=!0;break}if(C.current)P.current=U,S(A.poleHeight);else{const W=new Map;for(const D of n)D.type===z.SolarPanel&&D.foundationId===A.foundationId&&W.set(D.id,D.poleHeight);const k={name:"Set Pole Height for All Solar Panel Arrays Above Foundation",timestamp:Date.now(),oldValues:W,newValue:U,groupId:A.foundationId,undo:()=>{for(const[D,L]of k.oldValues.entries())r(D,L)},redo:()=>{k.groupId&&a(z.SolarPanel,k.groupId,k.newValue)}};c(k),a(z.SolarPanel,A.foundationId,U),p(f+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{const W=s(A);if(W){if(C.current=!1,W.type===z.Cuboid){for(const D of n)if(D.type===z.SolarPanel&&D.parentId===A.parentId&&ye.isIdentical(D.normal,A.normal)&&.5*D.ly*Math.abs(Math.sin(D.tiltAngle))>U){C.current=!0;break}}else for(const D of n)if(D.type===z.SolarPanel&&D.parentId===A.parentId&&.5*D.ly*Math.abs(Math.sin(D.tiltAngle))>U){C.current=!0;break}if(C.current)P.current=U,S(A.poleHeight);else{const D=new Map,L=W.type===z.Cuboid;if(L)for(const O of n)O.type===z.SolarPanel&&O.parentId===A.parentId&&ye.isIdentical(O.normal,A.normal)&&D.set(O.id,O.poleHeight);else for(const O of n)O.type===z.SolarPanel&&O.parentId===A.parentId&&D.set(O.id,O.poleHeight);const j=L?A.normal:void 0,B={name:"Set Pole Height for All Solar Panel Arrays on Surface",timestamp:Date.now(),oldValues:D,newValue:U,groupId:A.parentId,normal:j,undo:()=>{for(const[O,V]of B.oldValues.entries())r(O,V)},redo:()=>{B.groupId&&i(z.SolarPanel,B.groupId,B.normal,B.newValue)}};c(B),i(z.SolarPanel,A.parentId,j,U),p(f+1)}}break}default:{const W=o(A.id),k=W?W.poleHeight:A.poleHeight;if(C.current=.5*A.ly*Math.abs(Math.sin(A.tiltAngle))>U,C.current)P.current=U,S(k);else{const D={name:"Set Solar Panel Array Pole Height",timestamp:Date.now(),oldValue:k,newValue:U,changedElementId:A.id,changedElementType:A.type,undo:()=>{r(D.changedElementId,D.oldValue)},redo:()=>{r(D.changedElementId,D.newValue)}};c(D),r(A.id,U),p(f+1)}break}}e(W=>{W.actionState.solarPanelPoleHeight=U})}},R=()=>{C.current=!1,t(!1)},H=()=>{R(),g()},F=()=>{b(y),C.current||(t(!1),p(0))},E=()=>{b(y)},N=C.current?": "+Y.t("message.NotApplicableToSelectedAction",v)+(P.current!==void 0?" ("+P.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("solarCollectorMenu.PoleHeight",v),rejectedMessage:N,onApply:E,onClose:R,onClickCancel:H,onClickOk:F,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:0,max:10,style:{width:120},step:.1,precision:2,value:y,onChange:U=>{U!==null&&S(U)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",v),": [0, 10] ",Y.t("word.MeterAbbreviation",v)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",v)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:T,value:u,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",v)})]})})})]})})},ppo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(En),a=M(vh),l=M(xh),s=M(no),c=M(Qn),u=uo(z.SolarPanel),[d,f]=m.useState((u==null?void 0:u.poleSpacing)??0),p=$t(),g=(b,R)=>{e(H=>{for(const F of H.elements)if(F.type===z.SolarPanel&&F.id===b&&!F.locked){const E=F;E.poleSpacing=R;break}})},A=(b,R)=>{e(H=>{for(const F of H.elements)if(F.type===z.SolarPanel&&F.foundationId===b&&!F.locked){const E=F;E.poleSpacing=R}})},y=(b,R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.SolarPanel&&!E.locked){let N;if(R?N=E.parentId===b&&ye.isIdentical(E.normal,R):N=E.parentId===b,N){const U=E;U.poleSpacing=H}}})},S=b=>{e(R=>{for(const H of R.elements)if(H.type===z.SolarPanel&&!H.locked){const F=H;F.poleSpacing=b}})},C=(b,R)=>{M.getState().set(H=>{for(const F of H.elements)if(F.type===z.SolarPanel&&!F.locked&&b.has(F.id)){const E=F;E.poleSpacing=R}})},P=b=>{l(b.target.value)},v=b=>{if(u){switch(a){case re.AllSelectedObjectsOfThisType:{for(const R of n)if(R.type===z.SolarPanel&&!R.locked&&M.getState().selectedElementIdSet.has(R.id)&&Math.abs(R.poleSpacing-b)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const R of n)if(R.type===z.SolarPanel&&!R.locked&&Math.abs(R.poleSpacing-b)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const R of n)if(R.type===z.SolarPanel&&R.foundationId===(u==null?void 0:u.foundationId)&&!R.locked&&Math.abs(R.poleSpacing-b)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const R=r(u);if(R){if(R.type===z.Cuboid){for(const F of n)if(F.type===z.SolarPanel&&F.parentId===u.parentId&&ye.isIdentical(F.normal,u.normal)&&!F.locked&&Math.abs(F.poleSpacing-b)>Et)return!0}else for(const F of n)if(F.type===z.SolarPanel&&F.parentId===u.parentId&&!F.locked&&Math.abs(F.poleSpacing-b)>Et)return!0}break}default:{if(Math.abs((u==null?void 0:u.poleSpacing)-b)>Et)return!0;break}}return!1}},T=b=>{if(u&&v(b)){switch(a){case re.AllSelectedObjectsOfThisType:{const R=new Map;for(const F of n)F.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(F.id)&&R.set(F.id,F.poleSpacing);const H={name:"Set Pole Spacing for Selected Solar Panel Arrays",timestamp:Date.now(),oldValues:R,newValue:b,undo:()=>{for(const[F,E]of H.oldValues.entries())g(F,E)},redo:()=>{C(H.oldValues,H.newValue)}};i(H),C(R,b),c(s+1);break}case re.AllObjectsOfThisType:{const R=new Map;for(const F of n)F.type===z.SolarPanel&&R.set(F.id,F.poleSpacing);const H={name:"Set Pole Spacing for All Solar Panel Arrays",timestamp:Date.now(),oldValues:R,newValue:b,undo:()=>{for(const[F,E]of H.oldValues.entries())g(F,E)},redo:()=>{S(H.newValue)}};i(H),S(b),c(s+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const R=new Map;for(const F of n)F.type===z.SolarPanel&&F.foundationId===u.foundationId&&R.set(F.id,F.poleSpacing);const H={name:"Set Pole Spacing for All Solar Panel Arrays Above Foundation",timestamp:Date.now(),oldValues:R,newValue:b,groupId:u.foundationId,undo:()=>{for(const[F,E]of H.oldValues.entries())g(F,E)},redo:()=>{H.groupId&&A(H.groupId,H.newValue)}};i(H),A(u.foundationId,b),c(s+1)}break}case re.AllObjectsOfThisTypeOnSurface:{const R=r(u);if(R){const H=new Map,F=R.type===z.Cuboid;if(F)for(const U of n)U.type===z.SolarPanel&&U.parentId===u.parentId&&ye.isIdentical(U.normal,u.normal)&&H.set(U.id,U.poleSpacing);else for(const U of n)U.type===z.SolarPanel&&U.parentId===u.parentId&&H.set(U.id,U.poleSpacing);const E=F?u.normal:void 0,N={name:"Set Pole Spacing for All Solar Panel Arrays on Surface",timestamp:Date.now(),oldValues:H,newValue:b,groupId:u.parentId,normal:E,undo:()=>{for(const[U,W]of N.oldValues.entries())g(U,W)},redo:()=>{N.groupId&&y(N.groupId,N.normal,N.newValue)}};i(N),y(u.parentId,E,b),c(s+1)}break}default:{const R=o(u.id),H=R?R.poleSpacing:u.poleSpacing,F={name:"Set Solar Panel Array Pole Spacing",timestamp:Date.now(),oldValue:H,newValue:b,changedElementId:u.id,changedElementType:u.type,undo:()=>{g(F.changedElementId,F.oldValue)},redo:()=>{g(F.changedElementId,F.newValue)}};i(F),g(u.id,b),c(s+1);break}}e(R=>{R.actionState.solarPanelPoleSpacing=b})}},w=()=>{t(!1)},x=()=>{T(d),t(!1),c(0)};return h.jsx(so,{width:550,title:Y.t("solarPanelMenu.PoleSpacing",p),onApply:x,onClose:w,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:10,step:1,style:{width:120},precision:2,value:d,onChange:b=>{b!==null&&f(b)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [1, 10] ",Y.t("word.MeterAbbreviation",p)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",p)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P,value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",p)})]})})})]})})},gpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Gr),r=M(Jn),i=M(s7t),a=M(c7t),l=M(u7t),s=M(En),c=M(vh),u=M(xh),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.SolarPanel),[A,y]=m.useState((g==null?void 0:g.cx)??0),S=m.useRef(!1),C=m.useRef(),P=$t(),v=U=>{u(U.target.value)},T=U=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const W of n)if(W.type===z.SolarPanel&&!W.locked&&Math.abs(W.cx-U)>Et)return!0;break;case re.AllObjectsOfThisType:for(const W of n)if(W.type===z.SolarPanel&&!W.locked&&M.getState().selectedElementIdSet.has(W.id)&&Math.abs(W.cx-U)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const W of n)if(W.type===z.SolarPanel&&W.foundationId===(g==null?void 0:g.foundationId)&&!W.locked&&Math.abs(W.cx-U)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.cx)-U)>Et)return!0}return!1}},w=(U,W)=>{M.getState().set(k=>{for(const D of k.elements)if(D.type===z.SolarPanel&&!D.locked&&U.has(D.id)){const L=D;L.cx=W}})},x=(U,W,k)=>U+.5*W/k<.5&&U-.5*W/k>-.5,b=U=>{if(!g||!T(U))return;C.current=void 0;const W=o(g);if(W){switch(c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(k.id)&&!x(U,g.lx,W.lx)){S.current=!0;break}if(S.current)C.current=U,y(g.cx);else{const k=new Map;for(const L of n)L.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.cx);const D={name:"Set Center X for Selected Solar Panel",timestamp:Date.now(),oldValues:k,newValue:U,undo:()=>{for(const[L,j]of D.oldValues.entries())i(L,j)},redo:()=>{w(D.oldValues,D.newValue)}};s(D),w(k,U),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.SolarPanel&&!x(U,g.lx,W.lx)){S.current=!0;break}if(S.current)C.current=U,y(g.cx);else{const k=new Map;for(const L of n)L.type===z.SolarPanel&&k.set(L.id,L.cx);const D={name:"Set Center X for All Solar Panels",timestamp:Date.now(),oldValues:k,newValue:U,undo:()=>{for(const[L,j]of D.oldValues.entries())i(L,j)},redo:()=>{l(z.SolarPanel,D.newValue)}};s(D),l(z.SolarPanel,U),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.SolarPanel&&k.foundationId===g.foundationId&&!x(U,g.lx,W.lx)){S.current=!0;break}if(S.current)C.current=U,y(g.cx);else{const k=new Map;for(const L of n)L.type===z.SolarPanel&&L.foundationId===g.foundationId&&k.set(L.id,L.cx);const D={name:"Set Center X for All Solar Panels Above Foundation",timestamp:Date.now(),oldValues:k,newValue:U,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())i(L,j)},redo:()=>{D.groupId&&a(z.SolarPanel,D.groupId,D.newValue)}};s(D),a(z.SolarPanel,g.foundationId,U),f(d+1)}}break}default:{const k=r(g.id),D=k?k.cx:g.cx;if(S.current=!x(U,g.lx,W.lx),S.current)C.current=U,y(D);else{const L={name:"Set Solar Panel Center X",timestamp:Date.now(),oldValue:D,newValue:U,changedElementId:g.id,changedElementType:g.type,undo:()=>{i(L.changedElementId,L.oldValue)},redo:()=>{i(L.changedElementId,L.newValue)}};s(L),i(g.id,U),f(d+1)}break}}e(k=>{k.actionState.solarPanelCx=U})}},R=()=>{S.current=!1,t(!1)},H=()=>{R(),p()},F=()=>{b(A),S.current||(t(!1),f(0))},E=()=>{b(A)},N=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("solarCollectorMenu.RelativeXCoordinateOfCenter",P),rejectedMessage:N,onApply:E,onClose:R,onClickCancel:H,onClickOk:F,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:-.5,max:.5,style:{width:120},step:.01,precision:2,value:A,onChange:U=>{U!==null&&y(U)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",P),": [-0.5, 0.5]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",P)})]})})})]})})},mpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Gr),r=M(Jn),i=M(d7t),a=M(f7t),l=M(h7t),s=M(En),c=M(vh),u=M(xh),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.SolarPanel),[A,y]=m.useState((g==null?void 0:g.cy)??0),S=m.useRef(!1),C=m.useRef(),P=$t(),v=U=>{u(U.target.value)},T=U=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const W of n)if(W.type===z.SolarPanel&&!W.locked&&Math.abs(W.cy-U)>Et)return!0;break;case re.AllObjectsOfThisType:for(const W of n)if(W.type===z.SolarPanel&&!W.locked&&M.getState().selectedElementIdSet.has(W.id)&&Math.abs(W.cy-U)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const W of n)if(W.type===z.SolarPanel&&W.foundationId===(g==null?void 0:g.foundationId)&&!W.locked&&Math.abs(W.cy-U)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.cy)-U)>Et)return!0}return!1}},w=(U,W)=>{M.getState().set(k=>{for(const D of k.elements)if(D.type===z.SolarPanel&&!D.locked&&U.has(D.id)){const L=D;L.cy=W}})},x=(U,W,k)=>U+.5*W/k<.5&&U-.5*W/k>-.5,b=U=>{if(!g||!T(U))return;C.current=void 0;const W=o(g);if(W){switch(c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(k.id)&&!x(U,g.ly,W.ly)){S.current=!0;break}if(S.current)C.current=U,y(g.cy);else{const k=new Map;for(const L of n)L.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.cy);const D={name:"Set Center Y for Selected Solar Panel",timestamp:Date.now(),oldValues:k,newValue:U,undo:()=>{for(const[L,j]of D.oldValues.entries())i(L,j)},redo:()=>{w(D.oldValues,D.newValue)}};s(D),w(k,U),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.SolarPanel&&!x(U,g.ly,W.ly)){S.current=!0;break}if(S.current)C.current=U,y(g.cy);else{const k=new Map;for(const L of n)L.type===z.SolarPanel&&k.set(L.id,L.cy);const D={name:"Set Center Y for All Solar Panels",timestamp:Date.now(),oldValues:k,newValue:U,undo:()=>{for(const[L,j]of D.oldValues.entries())i(L,j)},redo:()=>{l(z.SolarPanel,D.newValue)}};s(D),l(z.SolarPanel,U),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.SolarPanel&&k.foundationId===g.foundationId&&!x(U,g.ly,W.ly)){S.current=!0;break}if(S.current)C.current=U,y(g.cy);else{const k=new Map;for(const L of n)L.type===z.SolarPanel&&L.foundationId===g.foundationId&&k.set(L.id,L.cy);const D={name:"Set Center Y for All Solar Panels Above Foundation",timestamp:Date.now(),oldValues:k,newValue:U,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())i(L,j)},redo:()=>{D.groupId&&a(z.SolarPanel,D.groupId,D.newValue)}};s(D),a(z.SolarPanel,g.foundationId,U),f(d+1)}}break}default:{const k=r(g.id),D=k?k.cy:g.cy;if(S.current=!x(U,g.ly,W.ly),S.current)C.current=U,y(D);else{const L={name:"Set Solar Panel Center Y",timestamp:Date.now(),oldValue:D,newValue:U,changedElementId:g.id,changedElementType:g.type,undo:()=>{i(L.changedElementId,L.oldValue)},redo:()=>{i(L.changedElementId,L.newValue)}};s(L),i(g.id,U),f(d+1)}break}}e(k=>{k.actionState.solarPanelCy=U})}},R=()=>{S.current=!1,t(!1)},H=()=>{R(),p()},F=()=>{b(A),S.current||(t(!1),f(0))},E=()=>{b(A)},N=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("solarCollectorMenu.RelativeYCoordinateOfCenter",P),rejectedMessage:N,onApply:E,onClose:R,onClickCancel:H,onClickOk:F,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:-.5,max:.5,style:{width:120},step:.01,precision:2,value:A,onChange:U=>{U!==null&&y(U)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",P),": [-0.5, 0.5]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",P)})]})})})]})})},ypo=t=>{const e=[];if(t.type!==z.SolarPanel)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language},i=t.type===z.SolarPanel&&ye.isIdentical(n.normal,as);return e.push({key:"solar-panel-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"solar-panel-cut",label:h.jsx(kd,{})}),e.push({key:"solar-panel-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&(e.push({key:"solar-panel-model-change",label:h.jsxs(eo,{Dialog:rpo,children:[Y.t("solarPanelMenu.ChangePvModel",r)," (",n.pvModelName,") ..."]})},{key:"solar-panel-orientation",label:h.jsxs(eo,{Dialog:ipo,children:[Y.t("solarPanelMenu.Orientation",r)," ..."]})},{key:"solar-panel-length",label:h.jsxs(eo,{Dialog:apo,children:[Y.t("word.Length",r)," ..."]})},{key:"solar-panel-width",label:h.jsxs(eo,{Dialog:lpo,children:[Y.t("word.Width",r)," ..."]})}),e.push({key:"solar-panel-coordinates-submenu",label:h.jsx(an,{children:Y.t("solarCollectorMenu.Coordinates",r)}),children:[{key:"solar-panel-center-x",label:h.jsxs(eo,{Dialog:gpo,children:[Y.t("solarCollectorMenu.RelativeXCoordinateOfCenter",r)," ..."]})},{key:"solar-panel-center-y",label:h.jsxs(eo,{Dialog:mpo,children:[Y.t("solarCollectorMenu.RelativeYCoordinateOfCenter",r)," ..."]})}]}),n.parentType===z.Wall&&e.push({key:"solar-panel-tilt-angle-on-wall",label:h.jsxs(eo,{Dialog:kHe,children:[Y.t("solarPanelMenu.TiltAngle",r)," ..."]})}),i&&(n.trackerType===Ll.NO_TRACKER&&e.push({key:"solar-panel-tilt-angle",label:h.jsxs(eo,{Dialog:kHe,children:[Y.t("solarPanelMenu.TiltAngle",r)," ..."]})}),e.push({key:"solar-panel-relative-azimuth",label:h.jsxs(eo,{Dialog:upo,children:[Y.t("solarCollectorMenu.RelativeAzimuth",r)," ..."]})}),n.parentType!==z.Roof&&e.push({key:"solar-panel-tracker",label:h.jsxs(eo,{Dialog:dpo,children:[Y.t("solarPanelMenu.Tracker",r)," ..."]})})),e.push({key:"solar-panel-frame-color",label:h.jsxs(eo,{Dialog:fpo,children:[Y.t("solarPanelMenu.FrameColor",r)," ..."]})}),e.push({key:"solar-panel-draw-sun-beam",label:h.jsx(a2e,{solarCollector:n})}),e.push({key:"solar-panel-electrical-submenu",label:h.jsx(an,{children:Y.t("solarPanelMenu.ElectricalProperties",r)}),children:[{key:"solar-panel-inverter-efficiency",label:h.jsxs(eo,{Dialog:spo,children:[Y.t("solarPanelMenu.InverterEfficiency",r)," ..."]})},{key:"solar-panel-dc-ac-ratio",label:h.jsxs(eo,{Dialog:cpo,children:[Y.t("solarPanelMenu.DcToAcSizeRatio",r)," ..."]})}]}),e.push({key:"solar-panel-pole-submenu",label:h.jsx(an,{children:Y.t("solarCollectorMenu.Pole",r)}),children:[{key:"solar-panel-pole-height",label:h.jsxs(eo,{noPadding:!0,Dialog:hpo,children:[Y.t("solarCollectorMenu.PoleHeight",r)," ..."]})},{key:"solar-panel-pole-spacing",label:h.jsxs(eo,{noPadding:!0,Dialog:ppo,children:[Y.t("solarPanelMenu.PoleSpacing",r)," ..."]})}]}),e.push({key:"solar-panel-label",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",r)}),children:v3(n)})),{items:e}},Apo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(Fw),r=M($q),i=M(xW),a=M(Gr),l=M(En),s=M(AA),c=M(wA),u=M(no),d=M(Qn),f=M(Xi),p=uo(z.ParabolicTrough),[g,A]=m.useState((p==null?void 0:p.ly)??9),y=m.useRef(!1),S=m.useRef(),C=$t(),P=W=>{c(W.target.value)},v=(W,k)=>{const D=a(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.ly=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},T=(W,k)=>!v(W,k),w=W=>{if(p){switch(s){case re.AllSelectedObjectsOfThisType:for(const k of e)if(k.type===z.ParabolicTrough&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.ly-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of e)if(k.type===z.ParabolicTrough&&!k.locked&&Math.abs(k.ly-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of e)if(k.type===z.ParabolicTrough&&k.foundationId===(p==null?void 0:p.foundationId)&&!k.locked&&Math.abs(k.ly-W)>Et)return!0;break;default:if(Math.abs((p==null?void 0:p.ly)-W)>Et)return!0}return!1}},x=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.ParabolicTrough&&!L.locked&&W.has(L.id)&&(L.ly=k)})},b=W=>{if(p&&w(W))switch(S.current=void 0,s){case re.AllSelectedObjectsOfThisType:{y.current=!1;for(const k of e)if(k.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(k.id)&&T(k,W)){y.current=!0;break}if(y.current)S.current=W,A(p.ly);else{const k=new Map;for(const L of e)L.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.ly);const D={name:"Set Length for Selected Parabolic Troughs",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())o(L,j)},redo:()=>{x(D.oldValues,D.newValue)}};l(D),x(k,W),d(u+1)}break}case re.AllObjectsOfThisType:{y.current=!1;for(const k of e)if(k.type===z.ParabolicTrough&&T(k,W)){y.current=!0;break}if(y.current)S.current=W,A(p.ly);else{const k=new Map;for(const L of e)L.type===z.ParabolicTrough&&k.set(L.id,L.ly);const D={name:"Set Length for All Parabolic Troughs",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())o(L,j)},redo:()=>{i(z.ParabolicTrough,D.newValue)}};l(D),i(z.ParabolicTrough,W),d(u+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(p.foundationId){y.current=!1;for(const k of e)if(k.type===z.ParabolicTrough&&k.foundationId===p.foundationId&&T(k,W)){y.current=!0;break}if(y.current)S.current=W,A(p.ly);else{const k=new Map;for(const L of e)L.type===z.ParabolicTrough&&L.foundationId===p.foundationId&&k.set(L.id,L.ly);const D={name:"Set Length for All Parabolic Troughs Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:p.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())o(L,j)},redo:()=>{D.groupId&&r(z.ParabolicTrough,D.groupId,D.newValue)}};l(D),r(z.ParabolicTrough,p.foundationId,W),d(u+1)}}break}default:{const k=n(p.id),D=k?k.ly:p.ly;if(y.current=T(p,W),y.current)S.current=W,A(D);else{const L={name:"Set Parabolic Trough Length",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:p.id,changedElementType:p.type,undo:()=>{o(L.changedElementId,L.oldValue)},redo:()=>{o(L.changedElementId,L.newValue)}};l(L),o(p.id,W),d(u+1)}break}}},R=()=>{y.current=!1,t(!1)},H=()=>{R(),f()},F=()=>{b(g),y.current||(t(!1),d(0))},E=W=>{if(!p)return 1;let k=W??1;return k=Math.max(1,Math.ceil((k-p.moduleLength/2)/p.moduleLength))*p.moduleLength,k},N=()=>{b(g)};if((p==null?void 0:p.type)!==z.ParabolicTrough)return null;const U=y.current?": "+Y.t("message.NotApplicableToSelectedAction",C)+(S.current!==void 0?" ("+S.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("word.Length",C),rejectedMessage:U,onApply:N,onClose:R,onClickCancel:H,onClickOk:F,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:p.moduleLength,max:100*p.moduleLength,step:p.moduleLength,precision:2,style:{width:120},value:g,onChange:W=>{A(E(W))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("parabolicTroughMenu.ModuleLength",C)+": "+p.moduleLength.toFixed(1)+" "+Y.t("word.MeterAbbreviation",C),h.jsx("br",{}),Math.round(g/p.moduleLength)+" "+Y.t("parabolicTroughMenu.ModulesLong",C),h.jsx("br",{}),Y.t("word.Maximum",C),": 100 ",Y.t("parabolicTroughMenu.Modules",C)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",C)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicTroughMenu.OnlyThisParabolicTrough",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicTroughMenu.AllParabolicTroughsAboveFoundation",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllSelectedParabolicTroughs",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllParabolicTroughs",C)})]})})})]})})},wpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(d3),i=M(qq),a=M(vW),l=M(Gr),s=M(En),c=M(AA),u=M(wA),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.ParabolicTrough),[A,y]=m.useState((g==null?void 0:g.lx)??2),S=m.useRef(!1),C=m.useRef(),P=$t(),v=W=>{u(W.target.value)},T=(W,k)=>{const D=l(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.lx=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},w=(W,k)=>!T(W,k),x=W=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const k of n)if(k.type===z.ParabolicTrough&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.lx-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of n)if(k.type===z.ParabolicTrough&&!k.locked&&Math.abs(k.lx-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of n)if(k.type===z.ParabolicTrough&&k.foundationId===(g==null?void 0:g.foundationId)&&!k.locked&&Math.abs(k.lx-W)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.lx)-W)>Et)return!0}return!1}},b=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.ParabolicTrough&&!L.locked&&W.has(L.id)&&(L.lx=k)})},R=W=>{if(g&&x(W)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(k.id)&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.lx);else{const k=new Map;for(const L of n)L.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.lx);const D={name:"Set Width for Selected Parabolic Troughs",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{b(D.oldValues,D.newValue)}};s(D),b(k,W),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.ParabolicTrough&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.lx);else{const k=new Map;for(const L of n)L.type===z.ParabolicTrough&&k.set(L.id,L.lx);const D={name:"Set Width for All Parabolic Troughs",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{a(z.ParabolicTrough,D.newValue)}};s(D),a(z.ParabolicTrough,W),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.ParabolicTrough&&k.foundationId===g.foundationId&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.lx);else{const k=new Map;for(const L of n)L.type===z.ParabolicTrough&&L.foundationId===g.foundationId&&k.set(L.id,L.lx);const D={name:"Set Width for All Parabolic Troughs Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{D.groupId&&i(z.ParabolicTrough,D.groupId,D.newValue)}};s(D),i(z.ParabolicTrough,g.foundationId,W),f(d+1)}}break}default:{const k=o(g.id),D=k?k.lx:g.lx;if(S.current=w(g,W),S.current)C.current=W,y(D);else{const L={name:"Set Parabolic Trough Width",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(L.changedElementId,L.oldValue)},redo:()=>{r(L.changedElementId,L.newValue)}};s(L),r(g.id,W),f(d+1)}break}}e(k=>{k.actionState.parabolicTroughWidth=W})}},H=()=>{S.current=!1,t(!1)},F=()=>{H(),p()},E=()=>{S.current||(t(!1),f(0))},N=()=>{R(A)};if((g==null?void 0:g.type)!==z.ParabolicTrough)return null;const U=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("word.Width",P),rejectedMessage:U,onApply:N,onClose:H,onClickCancel:F,onClickOk:E,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:10,step:.5,precision:2,style:{width:120},value:A,onChange:W=>{W!==null&&y(W)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.MinimumValue",P),": 1 ",Y.t("word.MeterAbbreviation",P),h.jsx("br",{}),Y.t("word.MaximumValue",P),": 10 ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicTroughMenu.OnlyThisParabolicTrough",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicTroughMenu.AllParabolicTroughsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllSelectedParabolicTroughs",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllParabolicTroughs",P)})]})})})]})})},vpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(NYe),i=M(UYe),a=M(jYe),l=M(Gr),s=M(En),c=M(AA),u=M(wA),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.ParabolicTrough),[A,y]=m.useState((g==null?void 0:g.moduleLength)??3),S=m.useRef(!1),C=m.useRef(),P=$t(),v=W=>{u(W.target.value)},T=(W,k)=>{const D=l(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.moduleLength=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},w=(W,k)=>!T(W,k),x=W=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const k of n)if(k.type===z.ParabolicTrough&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.moduleLength-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of n)if(k.type===z.ParabolicTrough&&!k.locked&&Math.abs(k.moduleLength-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of n)if(k.type===z.ParabolicTrough&&k.foundationId===(g==null?void 0:g.foundationId)&&!k.locked&&Math.abs(k.moduleLength-W)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.moduleLength)-W)>Et)return!0}return!1}},b=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.ParabolicTrough&&!L.locked&&W.has(L.id)&&(L.moduleLength=k)})},R=W=>{if(g&&x(W)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(k.id)&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.moduleLength);else{const k=new Map;for(const L of n)L.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.moduleLength);const D={name:"Set Module Length for Selected Parabolic Troughs",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{b(D.oldValues,D.newValue)}};s(D),b(k,W),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.ParabolicTrough&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.moduleLength);else{const k=new Map;for(const L of n)L.type===z.ParabolicTrough&&k.set(L.id,L.moduleLength);const D={name:"Set Module Length for All Parabolic Troughs",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{a(z.ParabolicTrough,D.newValue)}};s(D),a(z.ParabolicTrough,W),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.ParabolicTrough&&k.foundationId===g.foundationId&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.moduleLength);else{const k=new Map;for(const L of n)L.type===z.ParabolicTrough&&L.foundationId===g.foundationId&&k.set(L.id,L.moduleLength);const D={name:"Set Module Length for All Parabolic Troughs Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{D.groupId&&i(z.ParabolicTrough,D.groupId,D.newValue)}};s(D),i(z.ParabolicTrough,g.foundationId,W),f(d+1)}}break}default:{const k=o(g.id),D=k?k.moduleLength:g.moduleLength;if(S.current=w(g,W),S.current)C.current=W,y(D);else{const L={name:"Set Parabolic Trough Module Length",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(L.changedElementId,L.oldValue)},redo:()=>{r(L.changedElementId,L.newValue)}};s(L),r(g.id,W),f(d+1)}break}}e(k=>{k.actionState.parabolicTroughModuleLength=W})}},H=()=>{S.current=!1,t(!1)},F=()=>{H(),p()},E=()=>{R(A),S.current||(t(!1),f(0))},N=()=>{R(A)};if((g==null?void 0:g.type)!==z.ParabolicTrough)return null;const U=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("parabolicTroughMenu.LatusRectum",P),rejectedMessage:U,onApply:N,onClose:H,onClickCancel:F,onClickOk:E,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:10,step:.5,style:{width:120},precision:2,value:A,onChange:W=>{W!==null&&y(W)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.MinimumValue",P),": 1 ",Y.t("word.MeterAbbreviation",P),h.jsx("br",{}),Y.t("word.MaximumValue",P),": 10 ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicTroughMenu.OnlyThisParabolicTrough",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicTroughMenu.AllParabolicTroughsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllSelectedParabolicTroughs",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllParabolicTroughs",P)})]})})})]})})},xpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(kYe),i=M(LYe),a=M(WYe),l=M(Gr),s=M(En),c=M(AA),u=M(wA),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.ParabolicTrough),[A,y]=m.useState((g==null?void 0:g.latusRectum)??2),S=m.useRef(!1),C=m.useRef(),P=$t(),v=W=>{u(W.target.value)},T=(W,k)=>{const D=l(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.latusRectum=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},w=(W,k)=>!T(W,k),x=W=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const k of n)if(k.type===z.ParabolicTrough&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.latusRectum-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of n)if(k.type===z.ParabolicTrough&&!k.locked&&Math.abs(k.latusRectum-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of n)if(k.type===z.ParabolicTrough&&k.foundationId===(g==null?void 0:g.foundationId)&&!k.locked&&Math.abs(k.latusRectum-W)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.latusRectum)-W)>Et)return!0}return!1}},b=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.ParabolicTrough&&!L.locked&&W.has(L.id)&&(L.latusRectum=k)})},R=W=>{if(g&&x(W)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(k.id)&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.latusRectum);else{const k=new Map;for(const L of n)L.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.latusRectum);const D={name:"Set Latus Rectum for Selected Parabolic Troughs",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{b(D.oldValues,D.newValue)}};s(D),b(k,W),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.ParabolicTrough&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.latusRectum);else{const k=new Map;for(const L of n)L.type===z.ParabolicTrough&&k.set(L.id,L.latusRectum);const D={name:"Set Latus Rectum for All Parabolic Troughs",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{a(z.ParabolicTrough,D.newValue)}};s(D),a(z.ParabolicTrough,W),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.ParabolicTrough&&k.foundationId===g.foundationId&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.latusRectum);else{const k=new Map;for(const L of n)L.type===z.ParabolicTrough&&L.foundationId===g.foundationId&&k.set(L.id,L.latusRectum);const D={name:"Set Latus Rectum for All Parabolic Troughs Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{D.groupId&&i(z.ParabolicTrough,D.groupId,D.newValue)}};s(D),i(z.ParabolicTrough,g.foundationId,W),f(d+1)}}break}default:{const k=o(g.id),D=k?k.latusRectum:g.latusRectum;if(S.current=w(g,W),S.current)C.current=W,y(D);else{const L={name:"Set Parabolic Trough Latus Rectum",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(L.changedElementId,L.oldValue)},redo:()=>{r(L.changedElementId,L.newValue)}};s(L),r(g.id,W),f(d+1)}break}}e(k=>{k.actionState.parabolicTroughLatusRectum=W})}},H=()=>{S.current=!1,t(!1)},F=()=>{H(),p()},E=()=>{R(A),S.current||(t(!1),f(0))},N=()=>{R(A)};if((g==null?void 0:g.type)!==z.ParabolicTrough)return null;const U=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("parabolicTroughMenu.LatusRectum",P),rejectedMessage:U,onApply:N,onClose:H,onClickCancel:F,onClickOk:E,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:20,step:.5,precision:2,style:{width:120},value:A,onChange:W=>{W!==null&&y(W)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.MinimumValue",P),": 1 ",Y.t("word.MeterAbbreviation",P),h.jsx("br",{}),Y.t("word.MaximumValue",P),": 20 ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicTroughMenu.OnlyThisParabolicTrough",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicTroughMenu.AllParabolicTroughsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllSelectedParabolicTroughs",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllParabolicTroughs",P)})]})})})]})})},bpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(TW),i=M(PW),a=M(CW),l=M(Gr),s=M(En),c=M(AA),u=M(wA),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.ParabolicTrough),[A,y]=m.useState((g==null?void 0:g.poleHeight)??1),S=m.useRef(!1),C=m.useRef(),P=$t(),v=N=>{u(N.target.value)},T=N=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:{for(const U of n)if(U.type===z.ParabolicTrough&&!U.locked&&M.getState().selectedElementIdSet.has(U.id)&&Math.abs(U.poleHeight-N)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const U of n)if(U.type===z.ParabolicTrough&&!U.locked&&Math.abs(U.poleHeight-N)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const U of n)if(U.type===z.ParabolicTrough&&U.foundationId===(g==null?void 0:g.foundationId)&&!U.locked&&Math.abs(U.poleHeight-N)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{if(l(g)){for(const W of n)if(W.type===z.ParabolicTrough&&W.parentId===g.parentId&&!W.locked&&Math.abs(W.poleHeight-N)>Et)return!0}break}default:{if(Math.abs((g==null?void 0:g.poleHeight)-N)>Et)return!0;break}}return!1}},w=(N,U)=>{M.getState().set(W=>{for(const k of W.elements)k.type===z.ParabolicTrough&&!k.locked&&N.has(k.id)&&(k.tiltAngle=U)})},x=N=>{if(g&&T(N)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const U of n)if(U.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(U.id)&&.5*U.ly*Math.abs(Math.sin(U.tiltAngle))>N){S.current=!0;break}if(S.current)C.current=N,y(g.poleHeight);else{const U=new Map;for(const k of n)k.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(k.id)&&U.set(k.id,k.poleHeight);const W={name:"Set Pole Height for Selected Parabolic Troughs",timestamp:Date.now(),oldValues:U,newValue:N,undo:()=>{for(const[k,D]of W.oldValues.entries())r(k,D)},redo:()=>{w(W.oldValues,W.newValue)}};s(W),w(U,N),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const U of n)if(U.type===z.ParabolicTrough&&.5*U.ly*Math.abs(Math.sin(U.tiltAngle))>N){S.current=!0;break}if(S.current)C.current=N,y(g.poleHeight);else{const U=new Map;for(const k of n)k.type===z.ParabolicTrough&&U.set(k.id,k.poleHeight);const W={name:"Set Pole Height for All Parabolic Troughs",timestamp:Date.now(),oldValues:U,newValue:N,undo:()=>{for(const[k,D]of W.oldValues.entries())r(k,D)},redo:()=>{a(z.ParabolicTrough,W.newValue)}};s(W),a(z.ParabolicTrough,N),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const U of n)if(U.type===z.ParabolicTrough&&U.foundationId===g.foundationId&&.5*U.ly*Math.abs(Math.sin(U.tiltAngle))>N){S.current=!0;break}if(S.current)C.current=N,y(g.poleHeight);else{const U=new Map;for(const k of n)k.type===z.ParabolicTrough&&k.foundationId===g.foundationId&&U.set(k.id,k.poleHeight);const W={name:"Set Pole Height for All Parabolic Troughs Above Foundation",timestamp:Date.now(),oldValues:U,newValue:N,groupId:g.foundationId,undo:()=>{for(const[k,D]of W.oldValues.entries())r(k,D)},redo:()=>{W.groupId&&i(z.ParabolicTrough,W.groupId,W.newValue)}};s(W),i(z.ParabolicTrough,g.foundationId,N),f(d+1)}}break}default:{const U=o(g.id),W=U?U.poleHeight:g.poleHeight;if(S.current=.5*g.lx*Math.abs(Math.sin(g.tiltAngle))>N,S.current)C.current=N,y(W);else{const k={name:"Set Parabolic Trough Pole Height",timestamp:Date.now(),oldValue:W,newValue:N,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(k.changedElementId,k.oldValue)},redo:()=>{r(k.changedElementId,k.newValue)}};s(k),r(g.id,N),f(d+1)}break}}e(U=>{U.actionState.parabolicTroughPoleHeight=N})}},b=()=>{S.current=!1,t(!1)},R=()=>{b(),p()},H=()=>{x(A),S.current||(t(!1),f(0))},F=()=>{x(A)};if((g==null?void 0:g.type)!==z.ParabolicTrough)return null;const E=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("solarCollectorMenu.ExtraPoleHeightInAdditionToHalfWidth",P),rejectedMessage:E,onApply:F,onClose:b,onClickCancel:R,onClickOk:H,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:0,max:5,style:{width:120},step:.1,precision:2,value:A,onChange:N=>{N!==null&&y(N)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",P),": [0, 5] ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicTroughMenu.OnlyThisParabolicTrough",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicTroughMenu.AllParabolicTroughsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllSelectedParabolicTroughs",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllParabolicTroughs",P)})]})})})]})})},Spo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Zq),i=M(e$),a=M(t$),l=M(En),s=M(AA),c=M(wA),u=M(no),d=M(Qn),f=uo(z.ParabolicTrough),[p,g]=m.useState((f==null?void 0:f.reflectance)??.9),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicTrough&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.reflectance-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicTrough&&!x.locked&&Math.abs(x.reflectance-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.ParabolicTrough&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.reflectance-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.reflectance)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.ParabolicTrough&&!R.locked&&w.has(R.id)&&(R.reflectance=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for Selected Parabolic Troughs",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for All Parabolic Troughs",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.ParabolicTrough,b.newValue)}};l(b),a(z.ParabolicTrough,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&R.foundationId===f.foundationId&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for All Parabolic Troughs Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.ParabolicTrough,b.groupId,b.newValue)}};l(b),i(z.ParabolicTrough,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.reflectance:f.reflectance,R={name:"Set Parabolic Trough Reflectance",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.parabolicTroughReflectance=w})}},v=()=>{t(!1)},T=()=>{P(p)};return(f==null?void 0:f.type)!==z.ParabolicTrough?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReflectorReflectance",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,step:.01,value:p,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicTroughMenu.OnlyThisParabolicTrough",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicTroughMenu.AllParabolicTroughsAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllSelectedParabolicTroughs",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllParabolicTroughs",A)})]})})})]})})},Tpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(SYe),i=M(TYe),a=M(PYe),l=M(En),s=M(AA),c=M(wA),u=M(no),d=M(Qn),f=uo(z.ParabolicTrough),[p,g]=m.useState((f==null?void 0:f.absorptance)??.95),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicTrough&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.absorptance-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicTrough&&!x.locked&&Math.abs(x.absorptance-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.ParabolicTrough&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.absorptance-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.absorptance)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.ParabolicTrough&&!R.locked&&w.has(R.id)&&(R.absorptance=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.absorptance);const b={name:"Set Absorptance for Selected Parabolic Troughs",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&x.set(R.id,R.absorptance);const b={name:"Set Absorptance for All Parabolic Troughs",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.ParabolicTrough,b.newValue)}};l(b),a(z.ParabolicTrough,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&R.foundationId===f.foundationId&&x.set(R.id,R.absorptance);const b={name:"Set Absorptance for All Parabolic Troughs Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.ParabolicTrough,b.groupId,b.newValue)}};l(b),i(z.ParabolicTrough,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.absorptance:f.absorptance,R={name:"Set Parabolic Trough Absorptance",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.parabolicTroughAbsorptance=w})}},v=()=>{t(!1)},T=()=>{P(p)};return(f==null?void 0:f.type)!==z.ParabolicTrough?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReceiverAbsorptance",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,step:.01,value:p,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicTroughMenu.OnlyThisParabolicTrough",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicTroughMenu.AllParabolicTroughsAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllSelectedParabolicTroughs",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllParabolicTroughs",A)})]})})})]})})},Ppo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(CYe),i=M(RYe),a=M(HYe),l=M(En),s=M(AA),c=M(wA),u=M(no),d=M(Qn),f=uo(z.ParabolicTrough),[p,g]=m.useState((f==null?void 0:f.opticalEfficiency)??.7),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicTrough&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.opticalEfficiency-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicTrough&&!x.locked&&Math.abs(x.opticalEfficiency-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.ParabolicTrough&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.opticalEfficiency-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.opticalEfficiency)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.ParabolicTrough&&!R.locked&&w.has(R.id)&&(R.opticalEfficiency=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.opticalEfficiency);const b={name:"Set Optical Efficiency for Selected Parabolic Troughs",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&x.set(R.id,R.opticalEfficiency);const b={name:"Set Optical Efficiency for All Parabolic Troughs",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.ParabolicTrough,b.newValue)}};l(b),a(z.ParabolicTrough,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&R.foundationId===f.foundationId&&x.set(R.id,R.opticalEfficiency);const b={name:"Set Optical Efficiency for All Parabolic Troughs Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.ParabolicTrough,b.groupId,b.newValue)}};l(b),i(z.ParabolicTrough,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.opticalEfficiency:f.opticalEfficiency,R={name:"Set Parabolic Trough Optical Efficiency",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.parabolicTroughOpticalEfficiency=w})}},v=()=>{t(!1)},T=()=>{P(p)};return(f==null?void 0:f.type)!==z.ParabolicTrough?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReflectorOpticalEfficiency",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,step:.01,value:p,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicTroughMenu.OnlyThisParabolicTrough",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicTroughMenu.AllParabolicTroughsAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllSelectedParabolicTroughs",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllParabolicTroughs",A)})]})})})]})})},Cpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(MYe),i=M(IYe),a=M(zYe),l=M(En),s=M(AA),c=M(wA),u=M(no),d=M(Qn),f=uo(z.ParabolicTrough),[p,g]=m.useState((f==null?void 0:f.thermalEfficiency)??.3),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicTrough&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.thermalEfficiency-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicTrough&&!x.locked&&Math.abs(x.thermalEfficiency-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.ParabolicTrough&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.thermalEfficiency-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.thermalEfficiency)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.ParabolicTrough&&!R.locked&&w.has(R.id)&&(R.thermalEfficiency=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.thermalEfficiency);const b={name:"Set Thermal Efficiency for Selected Parabolic Troughs",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&x.set(R.id,R.thermalEfficiency);const b={name:"Set Thermal Efficiency for All Parabolic Troughs",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.ParabolicTrough,b.newValue)}};l(b),a(z.ParabolicTrough,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&R.foundationId===f.foundationId&&x.set(R.id,R.thermalEfficiency);const b={name:"Set Thermal Efficiency for All Parabolic Troughs Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.ParabolicTrough,b.groupId,b.newValue)}};l(b),i(z.ParabolicTrough,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.thermalEfficiency:f.thermalEfficiency,R={name:"Set Parabolic Trough Thermal Efficiency",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.parabolicTroughThermalEfficiency=w})}},v=()=>{t(!1)},T=()=>{P(p)};return(f==null?void 0:f.type)!==z.ParabolicTrough?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReceiverThermalEfficiency",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,step:.01,value:p,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicTroughMenu.OnlyThisParabolicTrough",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicTroughMenu.AllParabolicTroughsAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllSelectedParabolicTroughs",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllParabolicTroughs",A)})]})})})]})})},Rpo=t=>{const e=[];if(t.type!==z.ParabolicTrough)return{items:e};const n=t,o={lng:M.getState().language},r=!n.locked;return e.push({key:"parabolic-trough-copy",label:h.jsx(Fd,{})}),r&&e.push({key:"parabolic-trough-cut",label:h.jsx(kd,{})}),e.push({key:"parabolic-trough-lock",label:h.jsx(Ku,{selectedElement:n})}),r&&e.push({key:"parabolic-trough-length",label:h.jsxs(eo,{Dialog:Apo,children:[Y.t("word.Length",o)," ..."]})},{key:"parabolic-trough-width",label:h.jsxs(eo,{Dialog:wpo,children:[Y.t("word.Width",o)," ..."]})},{key:"parabolic-trough-module-length",label:h.jsxs(eo,{Dialog:vpo,children:[Y.t("parabolicTroughMenu.ModuleLength",o)," ..."]})},{key:"parabolic-trough-latus-rectum",label:h.jsxs(eo,{Dialog:xpo,children:[Y.t("parabolicTroughMenu.LatusRectum",o)," ..."]})},{key:"parabolic-trough-pole-height",label:h.jsxs(eo,{Dialog:bpo,children:[Y.t("solarCollectorMenu.ExtraPoleHeight",o)," ..."]})},{key:"parabolic-trough-reflectance",label:h.jsxs(eo,{Dialog:Spo,children:[Y.t("concentratedSolarPowerCollectorMenu.ReflectorReflectance",o)," ..."]})},{key:"parabolic-trough-absorptance",label:h.jsxs(eo,{Dialog:Tpo,children:[Y.t("concentratedSolarPowerCollectorMenu.ReceiverAbsorptance",o)," ..."]})},{key:"parabolic-trough-optical-efficiency",label:h.jsxs(eo,{Dialog:Ppo,children:[Y.t("concentratedSolarPowerCollectorMenu.ReflectorOpticalEfficiency",o)," ..."]})},{key:"parabolic-trough-thermal-efficiency",label:h.jsxs(eo,{Dialog:Cpo,children:[Y.t("concentratedSolarPowerCollectorMenu.ReceiverThermalEfficiency",o)," ..."]})},{key:"parabolic-dish-draw-sun-beam",label:h.jsx(a2e,{solarCollector:n})},{key:"parabolic-trough-label-submenu",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",o)}),children:v3(n)}),{items:e}},Hpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(d3),i=M(Fw),a=M(qq),l=M($q),s=M(vW),c=M(xW),u=M(Gr),d=M(En),f=M(vA),p=M(xA),g=M(no),A=M(Qn),y=M(Xi),S=uo(z.ParabolicDish),[C,P]=m.useState((S==null?void 0:S.lx)??2),v=m.useRef(!1),T=m.useRef(),w=$t(),x=L=>{p(L.target.value)},b=(L,j)=>{const B=u(L);if(B){const O=JSON.parse(JSON.stringify(L));return O.lx=j,ye.isSolarCollectorWithinHorizontalSurface(O,B)}return!1},R=(L,j)=>!b(L,j),H=L=>{if(S){switch(f){case re.AllSelectedObjectsOfThisType:for(const j of n)if(j.type===z.ParabolicDish&&!j.locked&&M.getState().selectedElementIdSet.has(j.id)&&Math.abs(j.lx-L)>Et)return!0;break;case re.AllObjectsOfThisType:for(const j of n)if(j.type===z.ParabolicDish&&!j.locked&&Math.abs(j.lx-L)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const j of n)if(j.type===z.ParabolicDish&&j.foundationId===(S==null?void 0:S.foundationId)&&!j.locked&&Math.abs(j.lx-L)>Et)return!0;break;default:if(Math.abs((S==null?void 0:S.lx)-L)>Et)return!0}return!1}},F=(L,j)=>{M.getState().set(B=>{for(const O of B.elements)O.type===z.ParabolicDish&&!O.locked&&L.has(O.id)&&(O.lx=j,O.ly=j)})},E=L=>{if(S&&H(L)){switch(T.current=void 0,f){case re.AllSelectedObjectsOfThisType:{v.current=!1;for(const j of n)if(j.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(j.id)&&R(j,L)){v.current=!0;break}if(v.current)T.current=L,P(S.lx);else{const j=new Map;for(const O of n)O.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(O.id)&&j.set(O.id,O.lx);const B={name:"Set Diameter for Selected Parabolic Dishes",timestamp:Date.now(),oldValues:j,newValue:L,undo:()=>{for(const[O,V]of B.oldValues.entries())r(O,V),i(O,V)},redo:()=>{F(B.oldValues,B.newValue)}};d(B),F(j,L),A(g+1)}break}case re.AllObjectsOfThisType:{v.current=!1;for(const j of n)if(j.type===z.ParabolicDish&&R(j,L)){v.current=!0;break}if(v.current)T.current=L,P(S.lx);else{const j=new Map;for(const O of n)O.type===z.ParabolicDish&&j.set(O.id,O.lx);const B={name:"Set Diameter for All Parabolic Dishes",timestamp:Date.now(),oldValues:j,newValue:L,undo:()=>{for(const[O,V]of B.oldValues.entries())r(O,V),i(O,V)},redo:()=>{s(z.ParabolicDish,B.newValue),c(z.ParabolicDish,B.newValue)}};d(B),s(z.ParabolicDish,L),c(z.ParabolicDish,L),A(g+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(S.foundationId){v.current=!1;for(const j of n)if(j.type===z.ParabolicDish&&j.foundationId===S.foundationId&&R(j,L)){v.current=!0;break}if(v.current)T.current=L,P(S.lx);else{const j=new Map;for(const O of n)O.type===z.ParabolicDish&&O.foundationId===S.foundationId&&j.set(O.id,O.lx);const B={name:"Set Diameter for All Parabolic Dishes Above Foundation",timestamp:Date.now(),oldValues:j,newValue:L,groupId:S.foundationId,undo:()=>{for(const[O,V]of B.oldValues.entries())r(O,V),i(O,V)},redo:()=>{B.groupId&&(a(z.ParabolicDish,B.groupId,B.newValue),l(z.ParabolicDish,B.groupId,B.newValue))}};d(B),a(z.ParabolicDish,S.foundationId,L),l(z.ParabolicDish,S.foundationId,L),A(g+1)}}break}default:{const j=o(S.id),B=j?j.lx:S.lx;if(v.current=R(S,L),v.current)T.current=L,P(B);else{const O={name:"Set Parabolic Dish Diameter",timestamp:Date.now(),oldValue:B,newValue:L,changedElementId:S.id,changedElementType:S.type,undo:()=>{r(O.changedElementId,O.oldValue),i(O.changedElementId,O.oldValue)},redo:()=>{r(O.changedElementId,O.newValue),i(O.changedElementId,O.newValue)}};d(O),r(S.id,L),i(S.id,L),A(g+1)}break}}e(j=>{j.actionState.parabolicDishRimDiameter=L})}},N=()=>{v.current=!1,t(!1)},U=()=>{N(),y()},W=()=>{E(C),v.current||(t(!1),A(0))},k=()=>{E(C)};if((S==null?void 0:S.type)!==z.ParabolicDish)return null;const D=v.current?": "+Y.t("message.NotApplicableToSelectedAction",w)+(T.current!==void 0?" ("+T.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("parabolicDishMenu.RimDiameter",w),rejectedMessage:D,onApply:k,onClose:N,onClickCancel:U,onClickOk:W,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:10,step:.5,precision:2,style:{width:120},value:C,onChange:L=>{L!==null&&P(L)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.MinimumValue",w),": 1 ",Y.t("word.MeterAbbreviation",w),h.jsx("br",{}),Y.t("word.MaximumValue",w),": 10 ",Y.t("word.MeterAbbreviation",w)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",w)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:x,value:f,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicDishMenu.OnlyThisParabolicDish",w)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicDishMenu.AllParabolicDishesAboveFoundation",w)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicDishMenu.AllSelectedParabolicDishes",w)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicDishMenu.AllParabolicDishes",w)})]})})})]})})},Mpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(kYe),i=M(LYe),a=M(WYe),l=M(Gr),s=M(En),c=M(vA),u=M(xA),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.ParabolicDish),[A,y]=m.useState((g==null?void 0:g.latusRectum)??2),S=m.useRef(!1),C=m.useRef(),P=$t(),v=W=>{u(W.target.value)},T=(W,k)=>{const D=l(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.latusRectum=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},w=(W,k)=>!T(W,k),x=W=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const k of n)if(k.type===z.ParabolicDish&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.latusRectum-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of n)if(k.type===z.ParabolicDish&&!k.locked&&Math.abs(k.latusRectum-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of n)if(k.type===z.ParabolicDish&&k.foundationId===(g==null?void 0:g.foundationId)&&!k.locked&&Math.abs(k.latusRectum-W)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.latusRectum)-W)>Et)return!0}return!1}},b=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.ParabolicDish&&!L.locked&&W.has(L.id)&&(L.latusRectum=k)})},R=W=>{if(g&&x(W)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(k.id)&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.latusRectum);else{const k=new Map;for(const L of n)L.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.latusRectum);const D={name:"Set Latus Rectum for Selected Parabolic Dishes",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{b(D.oldValues,D.newValue)}};s(D),b(k,W),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.ParabolicDish&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.latusRectum);else{const k=new Map;for(const L of n)L.type===z.ParabolicDish&&k.set(L.id,L.latusRectum);const D={name:"Set Latus Rectum for All Parabolic Dishes",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{a(z.ParabolicDish,D.newValue)}};s(D),a(z.ParabolicDish,W),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.ParabolicDish&&k.foundationId===g.foundationId&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.latusRectum);else{const k=new Map;for(const L of n)L.type===z.ParabolicDish&&L.foundationId===g.foundationId&&k.set(L.id,L.latusRectum);const D={name:"Set Latus Rectum for All Parabolic Dishes Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{D.groupId&&i(z.ParabolicDish,D.groupId,D.newValue)}};s(D),i(z.ParabolicDish,g.foundationId,W),f(d+1)}}break}default:{const k=o(g.id),D=k?k.latusRectum:g.latusRectum;if(S.current=w(g,W),S.current)C.current=W,y(D);else{const L={name:"Set Parabolic Dish Latus Rectum",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(L.changedElementId,L.oldValue)},redo:()=>{r(L.changedElementId,L.newValue)}};s(L),r(g.id,W),f(d+1)}break}}e(k=>{k.actionState.parabolicDishLatusRectum=W})}},H=()=>{S.current=!1,t(!1)},F=()=>{H(),p()},E=()=>{R(A),S.current||(t(!1),f(0))},N=()=>{R(A)};if((g==null?void 0:g.type)!==z.ParabolicDish)return null;const U=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("parabolicDishMenu.LatusRectum",P),rejectedMessage:U,onApply:N,onClose:H,onClickCancel:F,onClickOk:E,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:20,step:.5,style:{width:120},precision:2,value:A,onChange:W=>{W!==null&&y(W)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.MinimumValue",P),": 1 ",Y.t("word.MeterAbbreviation",P),h.jsx("br",{}),Y.t("word.MaximumValue",P),": 20 ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicDishMenu.OnlyThisParabolicDish",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicDishMenu.AllParabolicDishesAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicDishMenu.AllSelectedParabolicDishes",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicDishMenu.AllParabolicDishes",P)})]})})})]})})},Ipo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(vA),a=M(xA),l=M(no),s=M(Qn),c=uo(z.ParabolicDish),[u,d]=m.useState((c==null?void 0:c.structureType)??sf.CentralPole),f=$t(),{Option:p}=Uo,g=(x,b)=>{e(R=>{for(const H of R.elements)if(H.id===x&&!H.locked&&H.type===z.ParabolicDish){H.structureType=b;break}})},A=(x,b)=>{e(R=>{for(const H of R.elements)H.foundationId===x&&!H.locked&&H.type===z.ParabolicDish&&(H.structureType=b)})},y=x=>{e(b=>{for(const R of b.elements)R.locked||R.type===z.ParabolicDish&&(R.structureType=x)})},S=x=>{a(x.target.value)},C=x=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const b of n)if(b.type===z.ParabolicDish&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&b.structureType!==x)return!0;break;case re.AllObjectsOfThisType:for(const b of n)if(b.type===z.ParabolicDish&&!b.locked&&b.structureType!==x)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const b of n)if(b.type===z.ParabolicDish&&b.foundationId===(c==null?void 0:c.foundationId)&&!b.locked&&b.structureType!==x)return!0;break;default:if((c==null?void 0:c.structureType)!==x)return!0}return!1},P=(x,b)=>{M.getState().set(R=>{for(const H of R.elements)H.type===z.ParabolicDish&&!H.locked&&x.has(H.id)&&(H.structureType=b)})},v=x=>{if(c&&C(x)){switch(i){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(H.id)&&b.set(H.id,H.structureType);const R={name:"Set Structure Type for Selected Parabolic Dishes",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())g(H,F)},redo:()=>{P(R.oldValues,R.newValue)}};r(R),P(b,x),s(l+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.ParabolicDish&&b.set(H.id,H.structureType);const R={name:"Set Structure Type for All Parabolic Dishes",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())g(H,F)},redo:()=>{y(R.newValue)}};r(R),y(x),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(c.foundationId){const b=new Map;for(const H of n)H.type===z.ParabolicDish&&H.foundationId===c.foundationId&&b.set(H.id,H.structureType);const R={name:"Set Structure Type for All Parabolic Dishes Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:c.foundationId,undo:()=>{for(const[H,F]of R.oldValues.entries())g(H,F)},redo:()=>{R.groupId&&A(R.groupId,R.newValue)}};r(R),A(c.foundationId,x),s(l+1)}break}default:{const b=o(c.id),R=b?b.structureType:c.structureType,H={name:"Set Parabolic Dish Structure Type",timestamp:Date.now(),oldValue:R,newValue:x,changedElementId:c.id,changedElementType:c.type,undo:()=>{g(H.changedElementId,H.oldValue)},redo:()=>{g(H.changedElementId,H.newValue)}};r(H),g(c.id,x),s(l+1);break}}e(b=>{b.actionState.parabolicDishReceiverStructure=x})}},T=()=>{t(!1)},w=()=>{v(u)};return(c==null?void 0:c.type)!==z.ParabolicDish?null:h.jsx(so,{width:640,title:Y.t("parabolicDishMenu.ReceiverStructure",f),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:8,children:h.jsxs(Uo,{value:u,onChange:x=>d(x),children:[h.jsx(p,{value:sf.CentralPole,children:Y.t("parabolicDishMenu.CentralPole",f)},sf.CentralPole),h.jsx(p,{value:sf.CentralPoleWithTripod,children:Y.t("parabolicDishMenu.CentralPoleWithTripod",f)},sf.CentralPoleWithTripod),h.jsx(p,{value:sf.Quadrupod,children:Y.t("parabolicDishMenu.Quadrupod",f)},sf.Quadrupod)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:S,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicDishMenu.OnlyThisParabolicDish",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicDishMenu.AllParabolicDishesAboveFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicDishMenu.AllSelectedParabolicDishes",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicDishMenu.AllParabolicDishes",f)})]})})})]})})},zpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(TW),i=M(PW),a=M(CW),l=M(Gr),s=M(En),c=M(vA),u=M(xA),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.ParabolicDish),[A,y]=m.useState((g==null?void 0:g.poleHeight)??1),S=m.useRef(!1),C=m.useRef(),P=$t(),v=N=>{u(N.target.value)},T=N=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:{for(const U of n)if(U.type===z.ParabolicDish&&!U.locked&&M.getState().selectedElementIdSet.has(U.id)&&Math.abs(U.poleHeight-N)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const U of n)if(U.type===z.ParabolicDish&&!U.locked&&Math.abs(U.poleHeight-N)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const U of n)if(U.type===z.ParabolicDish&&U.foundationId===(g==null?void 0:g.foundationId)&&!U.locked&&Math.abs(U.poleHeight-N)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{if(l(g)){for(const W of n)if(W.type===z.ParabolicDish&&W.parentId===g.parentId&&!W.locked&&Math.abs(W.poleHeight-N)>Et)return!0}break}default:{if(Math.abs((g==null?void 0:g.poleHeight)-N)>Et)return!0;break}}return!1}},w=(N,U)=>{M.getState().set(W=>{for(const k of W.elements)k.type===z.ParabolicDish&&!k.locked&&N.has(k.id)&&(k.tiltAngle=U)})},x=N=>{if(g&&T(N)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const U of n)if(U.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(U.id)&&.5*U.ly*Math.abs(Math.sin(U.tiltAngle))>N){S.current=!0;break}if(S.current)C.current=N,y(g.poleHeight);else{const U=new Map;for(const k of n)k.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(k.id)&&U.set(k.id,k.poleHeight);const W={name:"Set Pole Height for Selected Parabolic Dishes",timestamp:Date.now(),oldValues:U,newValue:N,undo:()=>{for(const[k,D]of W.oldValues.entries())r(k,D)},redo:()=>{w(W.oldValues,W.newValue)}};s(W),w(U,N),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const U of n)if(U.type===z.ParabolicDish&&.5*U.ly*Math.abs(Math.sin(U.tiltAngle))>N){S.current=!0;break}if(S.current)C.current=N,y(g.poleHeight);else{const U=new Map;for(const k of n)k.type===z.ParabolicDish&&U.set(k.id,k.poleHeight);const W={name:"Set Pole Height for All Parabolic Dishes",timestamp:Date.now(),oldValues:U,newValue:N,undo:()=>{for(const[k,D]of W.oldValues.entries())r(k,D)},redo:()=>{a(z.ParabolicDish,W.newValue)}};s(W),a(z.ParabolicDish,N),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const U of n)if(U.type===z.ParabolicDish&&U.foundationId===g.foundationId&&.5*U.ly*Math.abs(Math.sin(U.tiltAngle))>N){S.current=!0;break}if(S.current)C.current=N,y(g.poleHeight);else{const U=new Map;for(const k of n)k.type===z.ParabolicDish&&k.foundationId===g.foundationId&&U.set(k.id,k.poleHeight);const W={name:"Set Pole Height for All Parabolic Dishes Above Foundation",timestamp:Date.now(),oldValues:U,newValue:N,groupId:g.foundationId,undo:()=>{for(const[k,D]of W.oldValues.entries())r(k,D)},redo:()=>{W.groupId&&i(z.ParabolicDish,W.groupId,W.newValue)}};s(W),i(z.ParabolicDish,g.foundationId,N),f(d+1)}}break}default:{const U=o(g.id),W=U?U.poleHeight:g.poleHeight;if(S.current=.5*g.lx*Math.abs(Math.sin(g.tiltAngle))>N,S.current)C.current=N,y(W);else{const k={name:"Set Parabolic Dish Pole Height",timestamp:Date.now(),oldValue:W,newValue:N,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(k.changedElementId,k.oldValue)},redo:()=>{r(k.changedElementId,k.newValue)}};s(k),r(g.id,N),f(d+1)}break}}e(U=>{U.actionState.parabolicDishPoleHeight=N})}},b=()=>{S.current=!1,t(!1)},R=()=>{b(),p()},H=()=>{x(A),S.current||(t(!1),f(0))},F=()=>{x(A)};if((g==null?void 0:g.type)!==z.ParabolicDish)return null;const E=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("parabolicDishMenu.ExtraPoleHeightInAdditionToRadius",P),rejectedMessage:E,onApply:F,onClose:b,onClickCancel:R,onClickOk:H,children:h.jsxs(nn,{children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:0,max:5,style:{width:120},step:.1,precision:2,value:A,onChange:N=>{N!==null&&y(N)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",P),": [0, 5] ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicDishMenu.OnlyThisParabolicDish",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicDishMenu.AllParabolicDishesAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicDishMenu.AllSelectedParabolicDishes",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicDishMenu.AllParabolicDishes",P)})]})})})]})})},Dpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(vYe),i=M(xYe),a=M(bYe),l=M(Gr),s=M(En),c=M(vA),u=M(xA),d=M(no),f=M(Qn),p=uo(z.ParabolicDish),[g,A]=m.useState((p==null?void 0:p.poleRadius)??.1),y=$t(),S=x=>{u(x.target.value)},C=x=>{if(p){switch(c){case re.AllSelectedObjectsOfThisType:{for(const b of n)if(b.type===z.ParabolicDish&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&Math.abs(b.poleRadius-x)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const b of n)if(b.type===z.ParabolicDish&&!b.locked&&Math.abs(b.poleRadius-x)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const b of n)if(b.type===z.ParabolicDish&&b.foundationId===(p==null?void 0:p.foundationId)&&!b.locked&&Math.abs(b.poleRadius-x)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{if(l(p)){for(const R of n)if(R.type===z.ParabolicDish&&R.parentId===p.parentId&&!R.locked&&Math.abs(R.poleRadius-x)>Et)return!0}break}default:{if(Math.abs((p==null?void 0:p.poleRadius)-x)>Et)return!0;break}}return!1}},P=(x,b)=>{M.getState().set(R=>{for(const H of R.elements)H.type===z.ParabolicDish&&!H.locked&&x.has(H.id)&&(H.poleRadius=b)})},v=x=>{if(p&&C(x)){switch(c){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(H.id)&&b.set(H.id,H.poleRadius);const R={name:"Set Pole Radius for Selected Parabolic Dishes",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{P(R.oldValues,R.newValue)}};s(R),P(b,x),f(d+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.ParabolicDish&&b.set(H.id,H.poleRadius);const R={name:"Set Pole Radius for All Parabolic Dishes",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{a(z.ParabolicDish,R.newValue)}};s(R),a(z.ParabolicDish,x),f(d+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(p.foundationId){const b=new Map;for(const H of n)H.type===z.ParabolicDish&&H.foundationId===p.foundationId&&b.set(H.id,H.poleRadius);const R={name:"Set Pole Radius for All Parabolic Dishes Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:p.foundationId,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{R.groupId&&i(z.ParabolicDish,R.groupId,R.newValue)}};s(R),i(z.ParabolicDish,p.foundationId,x),f(d+1)}break}default:{const b=o(p.id),R=b?b.poleRadius:p.poleRadius,H={name:"Set Parabolic Dish Pole Radius",timestamp:Date.now(),oldValue:R,newValue:x,changedElementId:p.id,changedElementType:p.type,undo:()=>{r(H.changedElementId,H.oldValue)},redo:()=>{r(H.changedElementId,H.newValue)}};s(H),r(p.id,x),f(d+1);break}}e(b=>{b.actionState.parabolicDishPoleRadius=x})}},T=()=>{t(!1)},w=()=>{v(g)};return(p==null?void 0:p.type)!==z.ParabolicDish?null:h.jsx(so,{width:600,title:Y.t("solarCollectorMenu.PoleRadius",y),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:.5,style:{width:120},step:.01,precision:2,value:g,onChange:x=>{x!==null&&A(x)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",y),": [0.1, 0.5] ",Y.t("word.MeterAbbreviation",y)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",y)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:S,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicDishMenu.OnlyThisParabolicDish",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicDishMenu.AllParabolicDishesAboveFoundation",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicDishMenu.AllSelectedParabolicDishes",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicDishMenu.AllParabolicDishes",y)})]})})})]})})},Epo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Zq),i=M(e$),a=M(t$),l=M(En),s=M(vA),c=M(xA),u=M(no),d=M(Qn),f=uo(z.ParabolicDish),[p,g]=m.useState((f==null?void 0:f.reflectance)??.9),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicDish&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.reflectance-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicDish&&!x.locked&&Math.abs(x.reflectance-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.ParabolicDish&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.reflectance-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.reflectance)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.ParabolicDish&&!R.locked&&w.has(R.id)&&(R.reflectance=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for Selected Parabolic Dishes",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicDish&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for All Parabolic Dishes",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.ParabolicDish,b.newValue)}};l(b),a(z.ParabolicDish,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.ParabolicDish&&R.foundationId===f.foundationId&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for All Parabolic Dishes Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.ParabolicDish,b.groupId,b.newValue)}};l(b),i(z.ParabolicDish,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.reflectance:f.reflectance,R={name:"Set Parabolic Dish Reflectance",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.parabolicDishReflectance=w})}},v=()=>{t(!1)},T=()=>{P(p)};return(f==null?void 0:f.type)!==z.ParabolicDish?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReflectorReflectance",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,step:.01,value:p,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicDishMenu.OnlyThisParabolicDish",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicDishMenu.AllParabolicDishesAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicDishMenu.AllSelectedParabolicDishes",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicDishMenu.AllParabolicDishes",A)})]})})})]})})},Fpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(SYe),i=M(TYe),a=M(PYe),l=M(En),s=M(vA),c=M(xA),u=M(no),d=M(Qn),f=uo(z.ParabolicDish),[p,g]=m.useState((f==null?void 0:f.absorptance)??.95),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicDish&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.absorptance-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicDish&&!x.locked&&Math.abs(x.absorptance-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.ParabolicDish&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.absorptance-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.absorptance)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.ParabolicDish&&!R.locked&&w.has(R.id)&&(R.absorptance=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.absorptance);const b={name:"Set Absorptance for Selected Parabolic Dishes",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicDish&&x.set(R.id,R.absorptance);const b={name:"Set Absorptance for All Parabolic Dishes",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.ParabolicDish,b.newValue)}};l(b),a(z.ParabolicDish,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.ParabolicDish&&R.foundationId===f.foundationId&&x.set(R.id,R.absorptance);const b={name:"Set Absorptance for All Parabolic Dishes Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.ParabolicDish,b.groupId,b.newValue)}};l(b),i(z.ParabolicDish,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.absorptance:f.absorptance,R={name:"Set Parabolic Dish Absorptance",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.parabolicDishAbsorptance=w})}},v=()=>{t(!1)},T=()=>{P(p)};return(f==null?void 0:f.type)!==z.ParabolicDish?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReceiverAbsorptance",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,step:.01,value:p,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicDishMenu.OnlyThisParabolicDish",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicDishMenu.AllParabolicDishesAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicDishMenu.AllSelectedParabolicDishes",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicDishMenu.AllParabolicDishes",A)})]})})})]})})},kpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(CYe),i=M(RYe),a=M(HYe),l=M(En),s=M(vA),c=M(xA),u=M(no),d=M(Qn),f=uo(z.ParabolicDish),[p,g]=m.useState((f==null?void 0:f.opticalEfficiency)??.7),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicDish&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.opticalEfficiency-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicDish&&!x.locked&&Math.abs(x.opticalEfficiency-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.ParabolicDish&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.opticalEfficiency-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.opticalEfficiency)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.ParabolicDish&&!R.locked&&w.has(R.id)&&(R.opticalEfficiency=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.opticalEfficiency);const b={name:"Set Optical Efficiency for Selected Parabolic Dishes",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicDish&&x.set(R.id,R.opticalEfficiency);const b={name:"Set Optical Efficiency for All Parabolic Dishes",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.ParabolicDish,b.newValue)}};l(b),a(z.ParabolicDish,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.ParabolicDish&&R.foundationId===f.foundationId&&x.set(R.id,R.opticalEfficiency);const b={name:"Set Optical Efficiency for All Parabolic Dishes Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.ParabolicDish,b.groupId,b.newValue)}};l(b),i(z.ParabolicDish,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.opticalEfficiency:f.opticalEfficiency,R={name:"Set Parabolic Dish Optical Efficiency",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.parabolicDishOpticalEfficiency=w})}},v=()=>{t(!1)},T=()=>{P(p),t(!1),d(0)};return(f==null?void 0:f.type)!==z.ParabolicDish?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReflectorOpticalEfficiency",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,step:.01,value:p,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicDishMenu.OnlyThisParabolicDish",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicDishMenu.AllParabolicDishesAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicDishMenu.AllSelectedParabolicDishes",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicDishMenu.AllParabolicDishes",A)})]})})})]})})},Lpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(MYe),i=M(IYe),a=M(zYe),l=M(En),s=M(vA),c=M(xA),u=M(no),d=M(Qn),f=uo(z.ParabolicDish),[p,g]=m.useState((f==null?void 0:f.thermalEfficiency)??.3),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicDish&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.thermalEfficiency-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicDish&&!x.locked&&Math.abs(x.thermalEfficiency-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.ParabolicDish&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.thermalEfficiency-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.thermalEfficiency)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.ParabolicDish&&!R.locked&&w.has(R.id)&&(R.thermalEfficiency=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.thermalEfficiency);const b={name:"Set Thermal Efficiency for Selected Parabolic Dishes",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicDish&&x.set(R.id,R.thermalEfficiency);const b={name:"Set Thermal Efficiency for All Parabolic Dishes",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.ParabolicDish,b.newValue)}};l(b),a(z.ParabolicDish,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.ParabolicDish&&R.foundationId===f.foundationId&&x.set(R.id,R.thermalEfficiency);const b={name:"Set Thermal Efficiency for All Parabolic Dishes Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.ParabolicDish,b.groupId,b.newValue)}};l(b),i(z.ParabolicDish,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.thermalEfficiency:f.thermalEfficiency,R={name:"Set Parabolic Dish Thermal Efficiency",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.parabolicDishThermalEfficiency=w})}},v=()=>{t(!1)},T=()=>{P(p)};return(f==null?void 0:f.type)!==z.ParabolicDish?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReceiverThermalEfficiency",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,step:.01,value:p,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicDishMenu.OnlyThisParabolicDish",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicDishMenu.AllParabolicDishesAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicDishMenu.AllSelectedParabolicDishes",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicDishMenu.AllParabolicDishes",A)})]})})})]})})},Wpo=t=>{const e=[];if(t.type!==z.ParabolicDish)return{items:e};const n=t,o={lng:M.getState().language},r=!n.locked;return e.push({key:"parabolic-dish-copy",label:h.jsx(Fd,{})}),r&&e.push({key:"parabolic-dish-cut",label:h.jsx(kd,{})}),e.push({key:"parabolic-dish-lock",label:h.jsx(Ku,{selectedElement:n})}),r&&e.push({key:"parabolic-dish-radius",label:h.jsxs(eo,{Dialog:Hpo,children:[Y.t("parabolicDishMenu.RimDiameter",o)," ..."]})},{key:"parabolic-dish-latus-rectum",label:h.jsxs(eo,{Dialog:Mpo,children:[Y.t("parabolicDishMenu.LatusRectum",o)," ..."]})},{key:"parabolic-dish-structure-type",label:h.jsxs(eo,{Dialog:Ipo,children:[Y.t("parabolicDishMenu.ReceiverStructure",o)," ..."]})},{key:"parabolic-dish-pole-height",label:h.jsxs(eo,{Dialog:zpo,children:[Y.t("solarCollectorMenu.ExtraPoleHeight",o)," ..."]})},{key:"parabolic-dish-pole-radius",label:h.jsxs(eo,{Dialog:Dpo,children:[Y.t("solarCollectorMenu.PoleRadius",o)," ..."]})},{key:"parabolic-dish-reflectance",label:h.jsxs(eo,{Dialog:Epo,children:[Y.t("concentratedSolarPowerCollectorMenu.ReflectorReflectance",o)," ..."]})},{key:"parabolic-dish-absorptance",label:h.jsxs(eo,{Dialog:Fpo,children:[Y.t("concentratedSolarPowerCollectorMenu.ReceiverAbsorptance",o)," ..."]})},{key:"parabolic-dish-optical-efficiency",label:h.jsxs(eo,{Dialog:kpo,children:[Y.t("concentratedSolarPowerCollectorMenu.ReflectorOpticalEfficiency",o)," ..."]})},{key:"parabolic-dish-thermal-efficiency",label:h.jsxs(eo,{Dialog:Lpo,children:[Y.t("concentratedSolarPowerCollectorMenu.ReceiverThermalEfficiency",o)," ..."]})},{key:"parabolic-dish-draw-sun-beam",label:h.jsx(a2e,{solarCollector:n})},{key:"parabolic-dish-label-submenu",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",o)}),children:v3(n)}),{items:e}},Npo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(pYe),r=M(gYe),i=M(mYe),a=M(En),l=M(kb),s=M(Lb),c=M(no),u=M(Qn),d=uo(z.FresnelReflector),[f,p]=m.useState(!!(d!=null&&d.drawSunBeam)),g=$t(),A=T=>{s(T.target.value)},y=T=>{switch(l){case re.AllSelectedObjectsOfThisType:for(const w of e)if(w.type===z.FresnelReflector&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)&&w.drawSunBeam!==T)return!0;break;case re.AllObjectsOfThisType:for(const w of e)if(w.type===z.FresnelReflector&&!w.locked&&w.drawSunBeam!==T)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const w of e)if(w.type===z.FresnelReflector&&w.foundationId===(d==null?void 0:d.foundationId)&&!w.locked&&w.drawSunBeam!==T)return!0;break;default:if((d==null?void 0:d.drawSunBeam)!==T)return!0}return!1},S=(T,w)=>{M.getState().set(x=>{for(const b of x.elements)ye.isSolarCollectorType(b.type)&&!b.locked&&b.type===z.FresnelReflector&&T.has(b.id)&&(b.drawSunBeam=w)})},C=T=>{if(d&&y(T))switch(l){case re.AllSelectedObjectsOfThisType:{const w=new Map;for(const b of e)b.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(b.id)&&w.set(b.id,b.drawSunBeam);const x={name:"Draw Sun Beam for Selected Fresnel Reflectors",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())o(b,R)},redo:()=>{S(x.oldValues,x.newValue)}};a(x),S(w,T),u(c+1);break}case re.AllObjectsOfThisType:{const w=new Map;for(const b of e)b.type===z.FresnelReflector&&w.set(b.id,b.drawSunBeam);const x={name:"Draw Sun Beam for All Fresnel Reflectors",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())o(b,R)},redo:()=>{i(z.FresnelReflector,x.newValue)}};a(x),i(z.FresnelReflector,T),u(c+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(d.foundationId){const w=new Map;for(const b of e)b.type===z.FresnelReflector&&b.foundationId===d.foundationId&&w.set(b.id,b.drawSunBeam);const x={name:"Draw Sun Beam for All Fresnel Reflectors Above Foundation",timestamp:Date.now(),oldValues:w,newValue:T,groupId:d.foundationId,undo:()=>{for(const[b,R]of x.oldValues.entries())o(b,R)},redo:()=>{x.groupId&&r(z.FresnelReflector,x.groupId,x.newValue)}};a(x),r(z.FresnelReflector,d.foundationId,T),u(c+1)}break}default:{const w=n(d.id),x=w?w.drawSunBeam:d.drawSunBeam,b={name:"Draw Sun Beam for Fresnel Reflector",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:d.id,changedElementType:d.type,undo:()=>{o(b.changedElementId,b.oldValue)},redo:()=>{o(b.changedElementId,b.newValue)}};a(b),o(d.id,T),u(c+1);break}}},P=()=>{t(!1)},v=()=>{C(f)};return(d==null?void 0:d.type)!==z.FresnelReflector?null:h.jsx(so,{width:500,title:Y.t("solarCollectorMenu.DrawSunBeam",g),onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:4,children:h.jsx(vc,{checked:f,onChange:T=>{p(T)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:20,children:h.jsx(Le.Group,{onChange:A,value:l,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("fresnelReflectorMenu.OnlyThisFresnelReflector",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("fresnelReflectorMenu.AllFresnelReflectorsAboveFoundation",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllSelectedFresnelReflectors",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllFresnelReflectors",g)})]})})})]})})},{Option:Upo}=Uo,jpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(DYe),i=M(EYe),a=M(FYe),l=M(En),s=M(kb),c=M(Lb),u=M(no),d=M(Qn),f=uo(z.FresnelReflector),[p,g]=m.useState((f==null?void 0:f.receiverId)??"None"),A=$t(),y=m.useMemo(()=>{const x=[];for(const b of n)if(b.type===z.Foundation){const R=b;R.solarStructure===Dn.FocusPipe&&x.push(R.id)}return x},[n]);m.useEffect(()=>{if(g("None"),f)if(f.receiverId)g(f.receiverId);else{const x=o(f.parentId);x&&x.type===z.Foundation&&x.solarStructure===Dn.FocusPipe&&g(x.id)}},[f]);const S=x=>{c(x.target.value)},C=x=>{switch(s){case re.AllSelectedObjectsOfThisType:for(const b of n)if(b.type===z.FresnelReflector&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&b.receiverId!==x)return!0;break;case re.AllObjectsOfThisType:for(const b of n)if(b.type===z.FresnelReflector&&!b.locked&&b.receiverId!==x)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const b of n)if(b.type===z.FresnelReflector&&b.foundationId===(f==null?void 0:f.foundationId)&&!b.locked&&b.receiverId!==x)return!0;break;default:if((f==null?void 0:f.receiverId)!==x)return!0}return!1},P=(x,b)=>{e(R=>{for(const H of R.elements)ye.isHeliostatOrFresnelReflector(H.type)&&!H.locked&&x.has(H.id)&&(H.type===z.Heliostat?H.towerId=b:H.type===z.FresnelReflector&&(H.receiverId=b))})},v=x=>{if(f&&C(x)){switch(s){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(H.id)&&b.set(H.id,H.receiverId);const R={name:"Set Receiver for Selected Fresnel Reflectors",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{P(R.oldValues,R.newValue)}};l(R),P(b,x),d(u+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.FresnelReflector&&b.set(H.id,H.receiverId);const R={name:"Set Receiver for All Fresnel Reflectors",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{a(z.FresnelReflector,R.newValue)}};l(R),a(z.FresnelReflector,x),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const b=new Map;for(const H of n)H.type===z.FresnelReflector&&H.foundationId===f.foundationId&&b.set(H.id,H.receiverId);const R={name:"Set Receiver for All Fresnel Reflectors Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:f.foundationId,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{R.groupId&&i(z.FresnelReflector,R.groupId,R.newValue)}};l(R),i(z.FresnelReflector,f.foundationId,x),d(u+1)}break}default:{const b=o(f.id),R=b?b.receiverId:f.receiverId,H={name:"Set Receiver for Fresnel Reflector",timestamp:Date.now(),oldValue:R,newValue:x,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(H.changedElementId,H.oldValue)},redo:()=>{r(H.changedElementId,H.newValue)}};l(H),r(f.id,x),d(u+1);break}}e(b=>{b.actionState.fresnelReflectorReceiver=x})}},T=()=>{t(!1)},w=()=>{p&&v(p)};return(f==null?void 0:f.type)!==z.FresnelReflector?null:h.jsx(so,{width:640,title:Y.t("fresnelReflectorMenu.SelectAbsorberToReflectSunlightTo",A),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:9,children:h.jsx(Uo,{style:{width:"160px"},value:p,onChange:x=>{g(x)},children:y.map((x,b)=>h.jsx(Upo,{value:x,children:Y.t("fresnelReflectorMenu.AbsorberPipe",A)+" "+(b+1)},b))})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:15,children:h.jsx(Le.Group,{onChange:S,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("fresnelReflectorMenu.OnlyThisFresnelReflector",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("fresnelReflectorMenu.AllFresnelReflectorsAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllSelectedFresnelReflectors",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllFresnelReflectors",A)})]})})})]})})},Bpo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(Fw),r=M($q),i=M(xW),a=M(Gr),l=M(En),s=M(kb),c=M(Lb),u=M(no),d=M(Qn),f=M(Xi),p=uo(z.FresnelReflector),[g,A]=m.useState((p==null?void 0:p.ly)??9),y=m.useRef(!1),S=m.useRef(),C=$t(),P=W=>{c(W.target.value)},v=(W,k)=>{const D=a(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.ly=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},T=(W,k)=>!v(W,k),w=W=>{if(p){switch(s){case re.AllSelectedObjectsOfThisType:for(const k of e)if(k.type===z.FresnelReflector&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.ly-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of e)if(k.type===z.FresnelReflector&&!k.locked&&Math.abs(k.ly-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of e)if(k.type===z.FresnelReflector&&k.foundationId===(p==null?void 0:p.foundationId)&&!k.locked&&Math.abs(k.ly-W)>Et)return!0;break;default:if(Math.abs((p==null?void 0:p.ly)-W)>Et)return!0}return!1}},x=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.FresnelReflector&&!L.locked&&W.has(L.id)&&(L.ly=k)})},b=W=>{if(p&&w(W))switch(S.current=void 0,s){case re.AllSelectedObjectsOfThisType:{y.current=!1;for(const k of e)if(k.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(k.id)&&T(k,W)){y.current=!0;break}if(y.current)S.current=W,A(p.ly);else{const k=new Map;for(const L of e)L.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.ly);const D={name:"Set Length for Selected Fresnel Reflectors",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())o(L,j)},redo:()=>{x(D.oldValues,D.newValue)}};l(D),x(k,W),d(u+1)}break}case re.AllObjectsOfThisType:{y.current=!1;for(const k of e)if(k.type===z.FresnelReflector&&T(k,W)){y.current=!0;break}if(y.current)S.current=W,A(p.ly);else{const k=new Map;for(const L of e)L.type===z.FresnelReflector&&k.set(L.id,L.ly);const D={name:"Set Length for All Fresnel Reflectors",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())o(L,j)},redo:()=>{i(z.FresnelReflector,D.newValue)}};l(D),i(z.FresnelReflector,W),d(u+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(p.foundationId){y.current=!1;for(const k of e)if(k.type===z.FresnelReflector&&k.foundationId===p.foundationId&&T(k,W)){y.current=!0;break}if(y.current)S.current=W,A(p.ly);else{const k=new Map;for(const L of e)L.type===z.FresnelReflector&&L.foundationId===p.foundationId&&k.set(L.id,L.ly);const D={name:"Set Length for All Fresnel Reflectors Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:p.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())o(L,j)},redo:()=>{D.groupId&&r(z.FresnelReflector,D.groupId,D.newValue)}};l(D),r(z.FresnelReflector,p.foundationId,W),d(u+1)}}break}default:{const k=n(p.id),D=k?k.ly:p.ly;if(y.current=T(p,W),y.current)S.current=W,A(D);else{const L={name:"Set Fresnel Reflector Length",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:p.id,changedElementType:p.type,undo:()=>{o(L.changedElementId,L.oldValue)},redo:()=>{o(L.changedElementId,L.newValue)}};l(L),o(p.id,W),d(u+1)}break}}},R=()=>{y.current=!1,t(!1)},H=()=>{R(),f()},F=()=>{b(g),y.current||(t(!1),d(0))},E=W=>{if(!p)return 1;let k=W??1;return k=Math.max(1,Math.ceil((k-p.moduleLength/2)/p.moduleLength))*p.moduleLength,k},N=()=>{b(g)};if((p==null?void 0:p.type)!==z.FresnelReflector)return null;const U=y.current?": "+Y.t("message.NotApplicableToSelectedAction",C)+(S.current!==void 0?" ("+S.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("word.Length",C),rejectedMessage:U,onApply:N,onClose:R,onClickCancel:H,onClickOk:F,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:p.moduleLength,max:200*p.moduleLength,step:p.moduleLength,style:{width:120},precision:2,value:g,onChange:W=>{W!==null&&A(E(W))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("fresnelReflectorMenu.ModuleLength",C)+": "+p.moduleLength.toFixed(1)+" "+Y.t("word.MeterAbbreviation",C),h.jsx("br",{}),Math.round(g/p.moduleLength)+" "+Y.t("fresnelReflectorMenu.ModulesLong",C),h.jsx("br",{}),Y.t("word.Maximum",C),": 200 ",Y.t("fresnelReflectorMenu.Modules",C)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",C)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("fresnelReflectorMenu.OnlyThisFresnelReflector",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("fresnelReflectorMenu.AllFresnelReflectorsAboveFoundation",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllSelectedFresnelReflectors",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllFresnelReflectors",C)})]})})})]})})},Ypo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(d3),i=M(qq),a=M(vW),l=M(Gr),s=M(En),c=M(kb),u=M(Lb),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.FresnelReflector),[A,y]=m.useState((g==null?void 0:g.lx)??2),S=m.useRef(!1),C=m.useRef(),P=$t(),v=W=>{u(W.target.value)},T=(W,k)=>{const D=l(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.lx=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},w=(W,k)=>!T(W,k),x=W=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const k of n)if(k.type===z.FresnelReflector&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.lx-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of n)if(k.type===z.FresnelReflector&&!k.locked&&Math.abs(k.lx-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of n)if(k.type===z.FresnelReflector&&k.foundationId===(g==null?void 0:g.foundationId)&&!k.locked&&Math.abs(k.lx-W)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.lx)-W)>Et)return!0}return!1}},b=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.FresnelReflector&&!L.locked&&W.has(L.id)&&(L.lx=k)})},R=W=>{if(g&&x(W)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(k.id)&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.lx);else{const k=new Map;for(const L of n)L.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.lx);const D={name:"Set Width for Selected Fresnel Reflectors",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{b(D.oldValues,D.newValue)}};s(D),b(k,W),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.FresnelReflector&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.lx);else{const k=new Map;for(const L of n)L.type===z.FresnelReflector&&k.set(L.id,L.lx);const D={name:"Set Width for All Fresnel Reflectors",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{a(z.FresnelReflector,D.newValue)}};s(D),a(z.FresnelReflector,W),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.FresnelReflector&&k.foundationId===g.foundationId&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.lx);else{const k=new Map;for(const L of n)L.type===z.FresnelReflector&&L.foundationId===g.foundationId&&k.set(L.id,L.lx);const D={name:"Set Width for All Fresnel Reflectors Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{D.groupId&&i(z.FresnelReflector,D.groupId,D.newValue)}};s(D),i(z.FresnelReflector,g.foundationId,W),f(d+1)}}break}default:{const k=o(g.id),D=k?k.lx:g.lx;if(S.current=w(g,W),S.current)C.current=W,y(D);else{const L={name:"Set Fresnel Reflector Width",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(L.changedElementId,L.oldValue)},redo:()=>{r(L.changedElementId,L.newValue)}};s(L),r(g.id,W),f(d+1)}break}}e(k=>{k.actionState.fresnelReflectorWidth=W})}},H=()=>{S.current=!1,t(!1)},F=()=>{H(),p()},E=()=>{R(A),S.current||(t(!1),f(0))},N=()=>{R(A)};if((g==null?void 0:g.type)!==z.FresnelReflector)return null;const U=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("word.Width",P),rejectedMessage:U,onApply:N,onClose:H,onClickCancel:F,onClickOk:E,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:10,step:.5,style:{width:120},precision:2,value:A,onChange:W=>{W!==null&&y(W)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.MinimumValue",P),": 1 ",Y.t("word.MeterAbbreviation",P),h.jsx("br",{}),Y.t("word.MaximumValue",P),": 10 ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("fresnelReflectorMenu.OnlyThisFresnelReflector",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("fresnelReflectorMenu.AllFresnelReflectorsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllSelectedFresnelReflectors",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllFresnelReflectors",P)})]})})})]})})},Opo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(NYe),i=M(UYe),a=M(jYe),l=M(Gr),s=M(En),c=M(kb),u=M(Lb),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.FresnelReflector),[A,y]=m.useState((g==null?void 0:g.moduleLength)??3),S=m.useRef(!1),C=m.useRef(),P=$t(),v=W=>{u(W.target.value)},T=(W,k)=>{const D=l(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.moduleLength=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},w=(W,k)=>!T(W,k),x=W=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const k of n)if(k.type===z.FresnelReflector&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.moduleLength-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of n)if(k.type===z.FresnelReflector&&!k.locked&&Math.abs(k.moduleLength-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of n)if(k.type===z.FresnelReflector&&k.foundationId===(g==null?void 0:g.foundationId)&&!k.locked&&Math.abs(k.moduleLength-W)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.moduleLength)-W)>Et)return!0}return!1}},b=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.FresnelReflector&&!L.locked&&W.has(L.id)&&(L.moduleLength=k)})},R=W=>{if(g&&x(W)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(k.id)&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.moduleLength);else{const k=new Map;for(const L of n)L.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.moduleLength);const D={name:"Set Module Length for Selected Fresnel Reflectors",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{b(D.oldValues,D.newValue)}};s(D),b(k,W),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.FresnelReflector&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.moduleLength);else{const k=new Map;for(const L of n)L.type===z.FresnelReflector&&k.set(L.id,L.moduleLength);const D={name:"Set Module Length for All Fresnel Reflectors",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{a(z.FresnelReflector,D.newValue)}};s(D),a(z.FresnelReflector,W),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.FresnelReflector&&k.foundationId===g.foundationId&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.moduleLength);else{const k=new Map;for(const L of n)L.type===z.FresnelReflector&&L.foundationId===g.foundationId&&k.set(L.id,L.moduleLength);const D={name:"Set Module Length for All Fresnel Reflectors Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{D.groupId&&i(z.FresnelReflector,D.groupId,D.newValue)}};s(D),i(z.FresnelReflector,g.foundationId,W),f(d+1)}}break}default:{const k=o(g.id),D=k?k.moduleLength:g.moduleLength;if(S.current=w(g,W),S.current)C.current=W,y(D);else{const L={name:"Set Fresnel Reflector Module Length",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(L.changedElementId,L.oldValue)},redo:()=>{r(L.changedElementId,L.newValue)}};s(L),r(g.id,W),f(d+1)}break}}e(k=>{k.actionState.fresnelReflectorModuleLength=W})}},H=()=>{S.current=!1,t(!1)},F=()=>{H(),p()},E=()=>{R(A),S.current||(t(!1),f(0))},N=()=>{R(A)};if((g==null?void 0:g.type)!==z.FresnelReflector)return null;const U=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("fresnelReflectorMenu.ModuleLength",P),rejectedMessage:U,onApply:N,onClose:H,onClickCancel:F,onClickOk:E,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:20,step:.5,style:{width:120},precision:2,value:A,onChange:W=>{W!==null&&y(W)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.MinimumValue",P),": 1 ",Y.t("word.MeterAbbreviation",P),h.jsx("br",{}),Y.t("word.MaximumValue",P),": 10 ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("fresnelReflectorMenu.OnlyThisFresnelReflector",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("fresnelReflectorMenu.AllFresnelReflectorsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllSelectedFresnelReflectors",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllFresnelReflectors",P)})]})})})]})})},Vpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(TW),i=M(PW),a=M(CW),l=M(Gr),s=M(En),c=M(kb),u=M(Lb),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.FresnelReflector),[A,y]=m.useState((g==null?void 0:g.poleHeight)??1),S=m.useRef(!1),C=m.useRef(),P=m.useRef((g==null?void 0:g.poleHeight)??1),v=$t(),T=U=>{u(U.target.value)},w=U=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:{for(const W of n)if(W.type===z.FresnelReflector&&!W.locked&&M.getState().selectedElementIdSet.has(W.id)&&Math.abs(W.poleHeight-U)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const W of n)if(W.type===z.FresnelReflector&&!W.locked&&Math.abs(W.poleHeight-U)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const W of n)if(W.type===z.FresnelReflector&&W.foundationId===(g==null?void 0:g.foundationId)&&!W.locked&&Math.abs(W.poleHeight-U)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{if(l(g)){for(const k of n)if(k.type===z.FresnelReflector&&k.parentId===g.parentId&&!k.locked&&Math.abs(k.poleHeight-U)>Et)return!0}break}default:{if(Math.abs((g==null?void 0:g.poleHeight)-U)>Et)return!0;break}}return!1}},x=(U,W)=>{M.getState().set(k=>{for(const D of k.elements)D.type===z.FresnelReflector&&!D.locked&&U.has(D.id)&&(D.poleHeight=W)})},b=U=>{if(g&&w(U)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const W of n)if(W.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(W.id)&&.5*W.ly*Math.abs(Math.sin(W.tiltAngle))>U){S.current=!0;break}if(S.current)C.current=U,P.current=g.poleHeight;else{const W=new Map;for(const D of n)D.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(D.id)&&W.set(D.id,D.poleHeight);const k={name:"Set Pole Height for Selected Fresnel Reflectors",timestamp:Date.now(),oldValues:W,newValue:U,undo:()=>{for(const[D,L]of k.oldValues.entries())r(D,L)},redo:()=>{x(k.oldValues,k.newValue)}};s(k),x(W,U),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const W of n)if(W.type===z.FresnelReflector&&.5*W.ly*Math.abs(Math.sin(W.tiltAngle))>U){S.current=!0;break}if(S.current)C.current=U,P.current=g.poleHeight;else{const W=new Map;for(const D of n)D.type===z.FresnelReflector&&W.set(D.id,D.poleHeight);const k={name:"Set Pole Height for All Fresnel Reflectors",timestamp:Date.now(),oldValues:W,newValue:U,undo:()=>{for(const[D,L]of k.oldValues.entries())r(D,L)},redo:()=>{a(z.FresnelReflector,k.newValue)}};s(k),a(z.FresnelReflector,U),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const W of n)if(W.type===z.FresnelReflector&&W.foundationId===g.foundationId&&.5*W.ly*Math.abs(Math.sin(W.tiltAngle))>U){S.current=!0;break}if(S.current)C.current=U,P.current=g.poleHeight;else{const W=new Map;for(const D of n)D.type===z.FresnelReflector&&D.foundationId===g.foundationId&&W.set(D.id,D.poleHeight);const k={name:"Set Pole Height for All Fresnel Reflectors Above Foundation",timestamp:Date.now(),oldValues:W,newValue:U,groupId:g.foundationId,undo:()=>{for(const[D,L]of k.oldValues.entries())r(D,L)},redo:()=>{k.groupId&&i(z.FresnelReflector,k.groupId,k.newValue)}};s(k),i(z.FresnelReflector,g.foundationId,U),f(d+1)}}break}default:{const W=o(g.id),k=W?W.poleHeight:g.poleHeight;if(S.current=.5*g.lx*Math.abs(Math.sin(g.tiltAngle))>U,S.current)C.current=U,P.current=k;else{const D={name:"Set Fresnel Reflector Pole Height",timestamp:Date.now(),oldValue:k,newValue:U,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(D.changedElementId,D.oldValue)},redo:()=>{r(D.changedElementId,D.newValue)}};s(D),r(g.id,U),f(d+1)}break}}e(W=>{W.actionState.fresnelReflectorPoleHeight=U})}},R=()=>{t(!1)},H=()=>{R(),p()},F=()=>{b(A),S.current||(t(!1),f(0))},E=()=>{b(A)};if((g==null?void 0:g.type)!==z.FresnelReflector)return null;const N=S.current?": "+Y.t("message.NotApplicableToSelectedAction",v)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("solarCollectorMenu.ExtraPoleHeightInAdditionToHalfWidth",v),rejectedMessage:N,onApply:E,onClose:R,onClickCancel:H,onClickOk:F,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:0,max:5,style:{width:120},step:.1,precision:2,value:A,onChange:U=>{U!==null&&y(U)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",v),": [0, 5] ",Y.t("word.MeterAbbreviation",v)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",v)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:T,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("fresnelReflectorMenu.OnlyThisFresnelReflector",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("fresnelReflectorMenu.AllFresnelReflectorsAboveFoundation",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllSelectedFresnelReflectors",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllFresnelReflectors",v)})]})})})]})})},_po=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Zq),i=M(e$),a=M(t$),l=M(En),s=M(kb),c=M(Lb),u=M(no),d=M(Qn),f=uo(z.FresnelReflector),[p,g]=m.useState((f==null?void 0:f.reflectance)??.9),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.FresnelReflector&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.reflectance-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.FresnelReflector&&!x.locked&&Math.abs(x.reflectance-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.FresnelReflector&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.reflectance-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.reflectance)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.FresnelReflector&&!R.locked&&w.has(R.id)&&(R.reflectance=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for Selected Fresnel Reflectors",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.FresnelReflector&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for All Fresnel Reflectors",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.FresnelReflector,b.newValue)}};l(b),a(z.FresnelReflector,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.FresnelReflector&&R.foundationId===f.foundationId&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for All Fresnel Reflectors Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.FresnelReflector,b.groupId,b.newValue)}};l(b),i(z.FresnelReflector,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.reflectance:f.reflectance,R={name:"Set Fresnel Reflector Reflectance",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.fresnelReflectorReflectance=w})}},v=()=>{t(!1)},T=()=>{P(p)};return(f==null?void 0:f.type)!==z.FresnelReflector?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReflectorReflectance",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,value:p,step:.01,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("fresnelReflectorMenu.OnlyThisFresnelReflector",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("fresnelReflectorMenu.AllFresnelReflectorsAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllSelectedFresnelReflectors",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllFresnelReflectors",A)})]})})})]})})},Gpo=t=>{const e=[];if(t.type!==z.FresnelReflector)return{items:e};const n=t,o={lng:M.getState().language},r=!n.locked;return e.push({key:"fresnel-reflector-copy",label:h.jsx(Fd,{})}),r&&e.push({key:"fresnel-reflector-cut",label:h.jsx(kd,{})}),e.push({key:"fresnel-reflector-lock",label:h.jsx(Ku,{selectedElement:n})}),r&&e.push({key:"fresnel-reflector-receiver",label:h.jsxs(eo,{Dialog:jpo,children:[Y.t("fresnelReflectorMenu.SelectAbsorberToReflectSunlightTo",o)," ..."]})},{key:"fresnel-reflector-length",label:h.jsxs(eo,{Dialog:Bpo,children:[Y.t("word.Length",o)," ..."]})},{key:"fresnel-reflector-width",label:h.jsxs(eo,{Dialog:Ypo,children:[Y.t("word.Width",o)," ..."]})},{key:"fresnel-reflector-module-length",label:h.jsxs(eo,{Dialog:Opo,children:[Y.t("fresnelReflectorMenu.ModuleLength",o)," ..."]})},{key:"fresnel-reflector-pole-height",label:h.jsxs(eo,{Dialog:Vpo,children:[Y.t("solarCollectorMenu.ExtraPoleHeight",o)," ..."]})},{key:"fresnel-reflector-reflectance",label:h.jsxs(eo,{Dialog:_po,children:[Y.t("concentratedSolarPowerCollectorMenu.ReflectorReflectance",o)," ..."]})},{key:"fresnel-reflector-draw-sun-beam",label:h.jsxs(eo,{Dialog:Npo,children:[Y.t("solarCollectorMenu.DrawSunBeam",o)," ..."]})},{key:"fresnel-reflector-label-submenu",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",o)}),children:v3(n)}),{items:e}},Xpo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(pYe),r=M(gYe),i=M(mYe),a=M(En),l=M(Wb),s=M(Nb),c=M(no),u=M(Qn),d=uo(z.Heliostat),[f,p]=m.useState(!!(d!=null&&d.drawSunBeam)),g=$t(),A=T=>{s(T.target.value)},y=T=>{switch(l){case re.AllSelectedObjectsOfThisType:for(const w of e)if(w.type===z.Heliostat&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)&&w.drawSunBeam!==T)return!0;break;case re.AllObjectsOfThisType:for(const w of e)if(w.type===z.Heliostat&&!w.locked&&w.drawSunBeam!==T)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const w of e)if(w.type===z.Heliostat&&w.foundationId===(d==null?void 0:d.foundationId)&&!w.locked&&w.drawSunBeam!==T)return!0;break;default:if((d==null?void 0:d.drawSunBeam)!==T)return!0}return!1},S=(T,w)=>{M.getState().set(x=>{for(const b of x.elements)b.type===z.Heliostat&&!b.locked&&T.has(b.id)&&(b.drawSunBeam=w)})},C=T=>{if(d&&y(T))switch(l){case re.AllSelectedObjectsOfThisType:{const w=new Map;for(const b of e)b.type===z.Heliostat&&M.getState().selectedElementIdSet.has(b.id)&&w.set(b.id,b.drawSunBeam);const x={name:"Draw Sun Beam for Selected Heliostats",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())o(b,R)},redo:()=>{S(x.oldValues,x.newValue)}};a(x),S(w,T),u(c+1);break}case re.AllObjectsOfThisType:{const w=new Map;for(const b of e)b.type===z.Heliostat&&w.set(b.id,b.drawSunBeam);const x={name:"Draw Sun Beam for All Heliostats",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())o(b,R)},redo:()=>{i(z.Heliostat,x.newValue)}};a(x),i(z.Heliostat,T),u(c+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(d.foundationId){const w=new Map;for(const b of e)b.type===z.Heliostat&&b.foundationId===d.foundationId&&w.set(b.id,b.drawSunBeam);const x={name:"Draw Sun Beam for All Heliostats Above Foundation",timestamp:Date.now(),oldValues:w,newValue:T,groupId:d.foundationId,undo:()=>{for(const[b,R]of x.oldValues.entries())o(b,R)},redo:()=>{x.groupId&&r(z.Heliostat,x.groupId,x.newValue)}};a(x),r(z.Heliostat,d.foundationId,T),u(c+1)}break}default:{const w=n(d.id),x=w?w.drawSunBeam:d.drawSunBeam,b={name:"Draw Sun Beam for Heliostat",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:d.id,changedElementType:d.type,undo:()=>{o(b.changedElementId,b.oldValue)},redo:()=>{o(b.changedElementId,b.newValue)}};a(b),o(d.id,T),u(c+1);break}}},P=()=>{t(!1)},v=()=>{C(f)};return(d==null?void 0:d.type)!==z.Heliostat?null:h.jsx(so,{width:500,title:Y.t("solarCollectorMenu.DrawSunBeam",g),onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:4,children:h.jsx(vc,{checked:f,onChange:p})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:20,children:h.jsx(Le.Group,{onChange:A,value:l,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("heliostatMenu.OnlyThisHeliostat",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("heliostatMenu.AllHeliostatsAboveFoundation",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("heliostatMenu.AllSelectedHeliostats",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("heliostatMenu.AllHeliostats",g)})]})})})]})})},{Option:Jpo}=Uo,Kpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(DYe),i=M(EYe),a=M(FYe),l=M(En),s=M(Wb),c=M(Nb),u=M(no),d=M(Qn),f=uo(z.Heliostat),[p,g]=m.useState((f==null?void 0:f.towerId)??"None"),A=$t(),y=m.useMemo(()=>{const x=[];for(const b of n)if(b.type===z.Foundation){const R=b;R.solarStructure===Dn.FocusTower&&x.push(R.id)}return x},[n]);m.useEffect(()=>{if(g("None"),f)if(f.towerId)g(f.towerId);else{const x=o(f.parentId);x&&x.type===z.Foundation&&x.solarStructure===Dn.FocusTower&&g(x.id)}},[f]);const S=x=>{c(x.target.value)},C=x=>{switch(s){case re.AllSelectedObjectsOfThisType:for(const b of n)if(b.type===z.Heliostat&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&b.towerId!==x)return!0;break;case re.AllObjectsOfThisType:for(const b of n)if(b.type===z.Heliostat&&!b.locked&&b.towerId!==x)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const b of n)if(b.type===z.Heliostat&&b.foundationId===(f==null?void 0:f.foundationId)&&!b.locked&&b.towerId!==x)return!0;break;default:if((f==null?void 0:f.towerId)!==x)return!0}return!1},P=(x,b)=>{M.getState().set(R=>{for(const H of R.elements)H.type===z.Heliostat&&!H.locked&&x.has(H.id)&&(H.towerId=b)})},v=x=>{if(f&&C(x)){switch(s){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.Heliostat&&M.getState().selectedElementIdSet.has(H.id)&&b.set(H.id,H.towerId);const R={name:"Set Tower for Selected Heliostats",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{P(R.oldValues,R.newValue)}};l(R),P(b,x),d(u+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.Heliostat&&b.set(H.id,H.towerId);const R={name:"Set Tower for All Heliostats",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{a(z.Heliostat,R.newValue)}};l(R),a(z.Heliostat,x),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const b=new Map;for(const H of n)H.type===z.Heliostat&&H.foundationId===f.foundationId&&b.set(H.id,H.towerId);const R={name:"Set Tower for All Heliostats Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:f.foundationId,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{R.groupId&&i(z.Heliostat,R.groupId,R.newValue)}};l(R),i(z.Heliostat,f.foundationId,x),d(u+1)}break}default:{const b=o(f.id),R=b?b.towerId:f.towerId,H={name:"Set Tower for Heliostat",timestamp:Date.now(),oldValue:R,newValue:x,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(H.changedElementId,H.oldValue)},redo:()=>{r(H.changedElementId,H.newValue)}};l(H),r(f.id,x),d(u+1);break}}e(b=>{b.actionState.heliostatTower=x})}},T=()=>{t(!1)},w=()=>{p&&v(p),t(!1),d(0)};return(f==null?void 0:f.type)!==z.Heliostat?null:h.jsx(so,{width:600,title:Y.t("heliostatMenu.SelectTowerToReflectSunlightTo",A),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:8,children:h.jsx(Uo,{style:{width:"120px"},value:p,onChange:g,children:y.map((x,b)=>h.jsx(Jpo,{value:x,children:Y.t("heliostatMenu.Tower",A)+" "+(b+1)},b))})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:S,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("heliostatMenu.OnlyThisHeliostat",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("heliostatMenu.AllHeliostatsAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("heliostatMenu.AllSelectedHeliostats",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("heliostatMenu.AllHeliostats",A)})]})})})]})})},qpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(d3),i=M(qq),a=M(vW),l=M(Gr),s=M(En),c=M(Wb),u=M(Nb),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.Heliostat),[A,y]=m.useState((g==null?void 0:g.lx)??2),S=m.useRef(!1),C=m.useRef(),P=$t(),v=W=>{u(W.target.value)},T=(W,k)=>{const D=l(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.lx=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},w=(W,k)=>!T(W,k),x=W=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const k of n)if(k.type===z.Heliostat&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.lx-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of n)if(k.type===z.Heliostat&&!k.locked&&Math.abs(k.lx-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of n)if(k.type===z.Heliostat&&k.foundationId===(g==null?void 0:g.foundationId)&&!k.locked&&Math.abs(k.lx-W)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.lx)-W)>Et)return!0}return!1}},b=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.Heliostat&&!L.locked&&W.has(L.id)&&(L.lx=k)})},R=W=>{if(g&&x(W)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.Heliostat&&M.getState().selectedElementIdSet.has(k.id)&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.lx);else{const k=new Map;for(const L of n)L.type===z.Heliostat&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.lx);const D={name:"Set Length for Selected Heliostats",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{b(D.oldValues,D.newValue)}};s(D),b(k,W),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.Heliostat&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.lx);else{const k=new Map;for(const L of n)L.type===z.Heliostat&&k.set(L.id,L.lx);const D={name:"Set Length for All Heliostats",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{a(z.Heliostat,D.newValue)}};s(D),a(z.Heliostat,W),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.Heliostat&&k.foundationId===g.foundationId&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.lx);else{const k=new Map;for(const L of n)L.type===z.Heliostat&&L.foundationId===g.foundationId&&k.set(L.id,L.lx);const D={name:"Set Length for All Heliostats Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{D.groupId&&i(z.Heliostat,D.groupId,D.newValue)}};s(D),i(z.Heliostat,g.foundationId,W),f(d+1)}}break}default:{const k=o(g.id),D=k?k.lx:g.lx;if(S.current=w(g,W),S.current)C.current=W,y(D);else{const L={name:"Set Heliostat Length",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(L.changedElementId,L.oldValue)},redo:()=>{r(L.changedElementId,L.newValue)}};s(L),r(g.id,W),f(d+1)}break}}e(k=>{k.actionState.heliostatLength=W})}},H=()=>{S.current=!1,t(!1)},F=()=>{H(),p()},E=()=>{R(A),S.current||(t(!1),f(0))},N=()=>{R(A)};if((g==null?void 0:g.type)!==z.Heliostat)return null;const U=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("word.Length",P),rejectedMessage:U,onApply:N,onClose:H,onClickCancel:F,onClickOk:E,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:20,step:.5,style:{width:120},precision:2,value:A,onChange:W=>{W!==null&&y(W)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.MinimumValue",P),": 1 ",Y.t("word.MeterAbbreviation",P),h.jsx("br",{}),Y.t("word.MaximumValue",P),": 20 ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("heliostatMenu.OnlyThisHeliostat",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("heliostatMenu.AllHeliostatsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("heliostatMenu.AllSelectedHeliostats",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("heliostatMenu.AllHeliostats",P)})]})})})]})})},$po=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Fw),i=M($q),a=M(xW),l=M(Gr),s=M(En),c=M(Wb),u=M(Nb),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.Heliostat),[A,y]=m.useState((g==null?void 0:g.ly)??4),S=m.useRef(!1),C=m.useRef(),P=$t(),v=W=>{u(W.target.value)},T=(W,k)=>{const D=l(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.ly=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},w=(W,k)=>!T(W,k),x=W=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const k of n)if(k.type===z.Heliostat&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.ly-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of n)if(k.type===z.Heliostat&&!k.locked&&Math.abs(k.ly-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of n)if(k.type===z.Heliostat&&k.foundationId===(g==null?void 0:g.foundationId)&&!k.locked&&Math.abs(k.ly-W)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.ly)-W)>Et)return!0}return!1}},b=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.Heliostat&&!L.locked&&W.has(L.id)&&(L.ly=k)})},R=W=>{if(g&&x(W)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.Heliostat&&M.getState().selectedElementIdSet.has(k.id)&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.ly);else{const k=new Map;for(const L of n)L.type===z.Heliostat&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.ly);const D={name:"Set Width for Selected Heliostats",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{b(D.oldValues,D.newValue)}};s(D),b(k,W),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.Heliostat&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.ly);else{const k=new Map;for(const L of n)L.type===z.Heliostat&&k.set(L.id,L.ly);const D={name:"Set Width for All Heliostats",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{a(z.Heliostat,D.newValue)}};s(D),a(z.Heliostat,W),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.Heliostat&&k.foundationId===g.foundationId&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.ly);else{const k=new Map;for(const L of n)L.type===z.Heliostat&&L.foundationId===g.foundationId&&k.set(L.id,L.ly);const D={name:"Set Width for All Heliostats Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{D.groupId&&i(z.Heliostat,D.groupId,D.newValue)}};s(D),i(z.Heliostat,g.foundationId,W),f(d+1)}}break}default:{const k=o(g.id),D=k?k.ly:g.ly;if(S.current=w(g,W),S.current)C.current=W,y(D);else{const L={name:"Set Heliostat Width",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(L.changedElementId,L.oldValue)},redo:()=>{r(L.changedElementId,L.newValue)}};s(L),r(g.id,W),f(d+1)}break}}e(k=>{k.actionState.heliostatWidth=W})}},H=()=>{S.current=!1,t(!1)},F=()=>{H(),p()},E=()=>{R(A),S.current||(t(!1),f(0))},N=()=>{R(A)};if((g==null?void 0:g.type)!==z.Heliostat)return null;const U=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("word.Width",P),rejectedMessage:U,onApply:N,onClose:H,onClickCancel:F,onClickOk:E,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:20,step:.5,precision:2,style:{width:120},value:A,onChange:W=>{W!==null&&y(W)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.MinimumValue",P),": 1 ",Y.t("word.MeterAbbreviation",P),h.jsx("br",{}),Y.t("word.MaximumValue",P),": 20 ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("heliostatMenu.OnlyThisHeliostat",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("heliostatMenu.AllHeliostatsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("heliostatMenu.AllSelectedHeliostats",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("heliostatMenu.AllHeliostats",P)})]})})})]})})},Qpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(TW),i=M(PW),a=M(CW),l=M(Gr),s=M(En),c=M(Wb),u=M(Nb),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.Heliostat),[A,y]=m.useState((g==null?void 0:g.poleHeight)??1),S=m.useRef(!1),C=m.useRef(),P=$t(),v=N=>{u(N.target.value)},T=N=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:{for(const U of n)if(U.type===z.Heliostat&&!U.locked&&M.getState().selectedElementIdSet.has(U.id)&&Math.abs(U.poleHeight-N)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const U of n)if(U.type===z.Heliostat&&!U.locked&&Math.abs(U.poleHeight-N)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const U of n)if(U.type===z.Heliostat&&U.foundationId===(g==null?void 0:g.foundationId)&&!U.locked&&Math.abs(U.poleHeight-N)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{if(l(g)){for(const W of n)if(W.type===z.Heliostat&&W.parentId===g.parentId&&!W.locked&&Math.abs(W.poleHeight-N)>Et)return!0}break}default:{if(Math.abs((g==null?void 0:g.poleHeight)-N)>Et)return!0;break}}return!1}},w=(N,U)=>{M.getState().set(W=>{for(const k of W.elements)k.type===z.Heliostat&&!k.locked&&N.has(k.id)&&(k.poleHeight=U)})},x=N=>{if(g&&T(N)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const U of n)if(U.type===z.Heliostat&&M.getState().selectedElementIdSet.has(U.id)&&.5*Math.max(U.lx,U.ly)*Math.abs(Math.sin(U.tiltAngle))>N){S.current=!0;break}if(S.current)C.current=N,y(g.poleHeight);else{const U=new Map;for(const k of n)k.type===z.Heliostat&&M.getState().selectedElementIdSet.has(k.id)&&U.set(k.id,k.poleHeight);const W={name:"Set Pole Height for Selected Heliostats",timestamp:Date.now(),oldValues:U,newValue:N,undo:()=>{for(const[k,D]of W.oldValues.entries())r(k,D)},redo:()=>{w(W.oldValues,W.newValue)}};s(W),w(U,N),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const U of n)if(U.type===z.Heliostat&&.5*Math.max(U.lx,U.ly)*Math.abs(Math.sin(U.tiltAngle))>N){S.current=!0;break}if(S.current)C.current=N,y(g.poleHeight);else{const U=new Map;for(const k of n)k.type===z.Heliostat&&U.set(k.id,k.poleHeight);const W={name:"Set Pole Height for All Heliostats",timestamp:Date.now(),oldValues:U,newValue:N,undo:()=>{for(const[k,D]of W.oldValues.entries())r(k,D)},redo:()=>{a(z.Heliostat,W.newValue)}};s(W),a(z.Heliostat,N),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const U of n)if(U.type===z.Heliostat&&U.foundationId===g.foundationId&&.5*Math.max(U.lx,U.ly)*Math.abs(Math.sin(U.tiltAngle))>N){S.current=!0;break}if(S.current)C.current=N,y(g.poleHeight);else{const U=new Map;for(const k of n)k.type===z.Heliostat&&k.foundationId===g.foundationId&&U.set(k.id,k.poleHeight);const W={name:"Set Pole Height for All Heliostats Above Foundation",timestamp:Date.now(),oldValues:U,newValue:N,groupId:g.foundationId,undo:()=>{for(const[k,D]of W.oldValues.entries())r(k,D)},redo:()=>{W.groupId&&i(z.Heliostat,W.groupId,W.newValue)}};s(W),i(z.Heliostat,g.foundationId,N),f(d+1)}}break}default:{const U=o(g.id),W=U?U.poleHeight:g.poleHeight;if(S.current=.5*Math.max(g.lx,g.ly)*Math.abs(Math.sin(g.tiltAngle))>N,S.current)C.current=N,y(W);else{const k={name:"Set Heliostat Pole Height",timestamp:Date.now(),oldValue:W,newValue:N,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(k.changedElementId,k.oldValue)},redo:()=>{r(k.changedElementId,k.newValue)}};s(k),r(g.id,N),f(d+1)}break}}e(U=>{U.actionState.heliostatPoleHeight=N})}},b=()=>{S.current=!1,t(!1)},R=()=>{b(),p()},H=()=>{x(A),S.current||(t(!1),f(0))},F=()=>{x(A)};if((g==null?void 0:g.type)!==z.Heliostat)return null;const E=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("solarCollectorMenu.ExtraPoleHeightInAdditionToHalfWidth",P),rejectedMessage:E,onApply:F,onClose:b,onClickCancel:R,onClickOk:H,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:0,max:5,style:{width:120},step:.1,precision:2,value:A,onChange:N=>{N!==null&&y(N)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",P),": [0, 5] ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("heliostatMenu.OnlyThisHeliostat",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("heliostatMenu.AllHeliostatsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("heliostatMenu.AllSelectedHeliostats",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("heliostatMenu.AllHeliostats",P)})]})})})]})})},Zpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(vYe),i=M(xYe),a=M(bYe),l=M(Gr),s=M(En),c=M(Wb),u=M(Nb),d=M(no),f=M(Qn),p=uo(z.Heliostat),[g,A]=m.useState((p==null?void 0:p.poleRadius)??.1),y=$t(),S=x=>{u(x.target.value)},C=x=>{if(p){switch(c){case re.AllSelectedObjectsOfThisType:{for(const b of n)if(b.type===z.Heliostat&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&Math.abs(b.poleRadius-x)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const b of n)if(b.type===z.Heliostat&&!b.locked&&Math.abs(b.poleRadius-x)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const b of n)if(b.type===z.Heliostat&&b.foundationId===(p==null?void 0:p.foundationId)&&!b.locked&&Math.abs(b.poleRadius-x)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{if(l(p)){for(const R of n)if(R.type===z.Heliostat&&R.parentId===p.parentId&&!R.locked&&Math.abs(R.poleRadius-x)>Et)return!0}break}default:{if(Math.abs((p==null?void 0:p.poleRadius)-x)>Et)return!0;break}}return!1}},P=(x,b)=>{M.getState().set(R=>{for(const H of R.elements)H.type===z.Heliostat&&!H.locked&&x.has(H.id)&&(H.poleRadius=b)})},v=x=>{if(p&&C(x)){switch(c){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.Heliostat&&M.getState().selectedElementIdSet.has(H.id)&&b.set(H.id,H.poleRadius);const R={name:"Set Pole Radius for Selected Heliostats",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{P(R.oldValues,R.newValue)}};s(R),P(b,x),f(d+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.Heliostat&&b.set(H.id,H.poleRadius);const R={name:"Set Pole Radius for All Heliostats",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{a(z.Heliostat,R.newValue)}};s(R),a(z.Heliostat,x),f(d+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(p.foundationId){const b=new Map;for(const H of n)H.type===z.Heliostat&&H.foundationId===p.foundationId&&b.set(H.id,H.poleRadius);const R={name:"Set Pole Radius for All Heliostats Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:p.foundationId,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{R.groupId&&i(z.Heliostat,R.groupId,R.newValue)}};s(R),i(z.Heliostat,p.foundationId,x),f(d+1)}break}default:{const b=o(p.id),R=b?b.poleRadius:p.poleRadius,H={name:"Set Heliostat Pole Radius",timestamp:Date.now(),oldValue:R,newValue:x,changedElementId:p.id,changedElementType:p.type,undo:()=>{r(H.changedElementId,H.oldValue)},redo:()=>{r(H.changedElementId,H.newValue)}};s(H),r(p.id,x),f(d+1);break}}e(b=>{b.actionState.heliostatPoleRadius=x})}},T=()=>{t(!1)},w=()=>{v(g)};return(p==null?void 0:p.type)!==z.Heliostat?null:h.jsx(so,{width:600,title:Y.t("solarCollectorMenu.PoleRadius",y),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:.5,style:{width:120},step:.01,precision:2,value:g,onChange:x=>{x!==null&&A(x)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",y),": [0.1, 0.5] ",Y.t("word.MeterAbbreviation",y)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",y)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:S,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("heliostatMenu.OnlyThisHeliostat",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("heliostatMenu.AllHeliostatsAboveFoundation",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("heliostatMenu.AllSelectedHeliostats",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("heliostatMenu.AllHeliostats",y)})]})})})]})})},e1o=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Zq),i=M(e$),a=M(t$),l=M(En),s=M(Wb),c=M(Nb),u=M(no),d=M(Qn),f=uo(z.Heliostat),[p,g]=m.useState((f==null?void 0:f.reflectance)??.9),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.Heliostat&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.reflectance-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.Heliostat&&!x.locked&&Math.abs(x.reflectance-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.Heliostat&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.reflectance-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.reflectance)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.Heliostat&&!R.locked&&w.has(R.id)&&(R.reflectance=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.Heliostat&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for Selected Heliostats",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.Heliostat&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for All Heliostats",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.Heliostat,b.newValue)}};l(b),a(z.Heliostat,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.Heliostat&&R.foundationId===f.foundationId&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for All Heliostats Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.Heliostat,b.groupId,b.newValue)}};l(b),i(z.Heliostat,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.reflectance:f.reflectance,R={name:"Set Heliostat Reflectance",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.heliostatReflectance=w})}},v=()=>{t(!1)},T=()=>{P(p),t(!1),d(0)};return(f==null?void 0:f.type)!==z.Heliostat?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReflectorReflectance",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,step:.01,value:p,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("heliostatMenu.OnlyThisHeliostat",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("heliostatMenu.AllHeliostatsAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("heliostatMenu.AllSelectedHeliostats",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("heliostatMenu.AllHeliostats",A)})]})})})]})})},t1o=t=>{const e=[];if(t.type!==z.Heliostat)return{items:e};const n=t,o={lng:M.getState().language},r=!n.locked;return e.push({key:"heliostat-copy",label:h.jsx(Fd,{})}),r&&e.push({key:"heliostat-cut",label:h.jsx(kd,{})}),e.push({key:"heliostat-lock",label:h.jsx(Ku,{selectedElement:n})}),r&&e.push({key:"heliostat-tower",label:h.jsxs(eo,{Dialog:Kpo,children:[Y.t("heliostatMenu.SelectTowerToReflectSunlightTo",o)," ..."]})},{key:"heliostat-length",label:h.jsxs(eo,{Dialog:qpo,children:[Y.t("word.Length",o)," ..."]})},{key:"heliostat-width",label:h.jsxs(eo,{Dialog:$po,children:[Y.t("word.Width",o)," ..."]})},{key:"heliostat-pole-height",label:h.jsxs(eo,{Dialog:Qpo,children:[Y.t("solarCollectorMenu.ExtraPoleHeight",o)," ..."]})},{key:"heliostat-pole-radius",label:h.jsxs(eo,{Dialog:Zpo,children:[Y.t("solarCollectorMenu.PoleRadius",o)," ..."]})},{key:"heliostat-reflectance",label:h.jsxs(eo,{Dialog:e1o,children:[Y.t("concentratedSolarPowerCollectorMenu.ReflectorReflectance",o)," ..."]})},{key:"heliostat-draw-sun-beam",label:h.jsxs(eo,{Dialog:Xpo,children:[Y.t("solarCollectorMenu.DrawSunBeam",o)," ..."]})},{key:"heliostat-label-submenu",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",o)}),children:v3(n)}),{items:e}},{Option:mm}=Uo,n1o=be.memo(({tree:t})=>{const e=M(pn),n=M(En),[o,r]=m.useState(!1),i=$t(),a=(l,s)=>{e(c=>{for(const u of c.elements)if(u.type===z.Tree&&u.id===l){u.name=s;break}})};return h.jsxs(Uo,{style:{width:"160px"},value:(t==null?void 0:t.name)??pr.Pine,onChange:l=>{if(t){const s=t.name;if(s!==l){const c={name:"Change Tree",timestamp:Date.now(),oldValue:s,newValue:l,changedElementId:t.id,changedElementType:t.type,undo:()=>{a(c.changedElementId,c.oldValue)},redo:()=>{a(c.changedElementId,c.newValue)}};n(c),a(t.id,l),e(u=>{u.actionState.treeType=l}),r(!o)}}},children:[h.jsxs(mm,{value:pr.Apple,children:[h.jsx("img",{alt:pr.Apple,src:dde,height:20,style:{paddingRight:"8px"}})," ",Y.t("tree.Apple",i)]},pr.Apple),h.jsxs(mm,{value:pr.Birch,children:[h.jsx("img",{alt:pr.Birch,src:fde,height:20,style:{paddingRight:"20px"}})," ",Y.t("tree.Birch",i)]},pr.Birch),h.jsxs(mm,{value:pr.Coconut,children:[h.jsx("img",{alt:pr.Coconut,src:aQe,height:20,style:{paddingRight:"18px"}})," ",Y.t("tree.Coconut",i)]},pr.Coconut),h.jsxs(mm,{value:pr.Dogwood,children:[h.jsx("img",{alt:pr.Dogwood,src:hde,height:20,style:{paddingRight:"10px"}})," ",Y.t("tree.Dogwood",i)]},pr.Dogwood),h.jsxs(mm,{value:pr.Elm,children:[h.jsx("img",{alt:pr.Elm,src:pde,height:20,style:{paddingRight:"20px"}}),Y.t("tree.Elm",i)]},pr.Elm),h.jsxs(mm,{value:pr.FanPalm,children:[h.jsx("img",{alt:pr.FanPalm,src:lQe,height:20,style:{paddingRight:"18px"}})," ",Y.t("tree.FanPalm",i)]},pr.FanPalm),h.jsxs(mm,{value:pr.Linden,children:[h.jsx("img",{alt:pr.Linden,src:gde,height:20,style:{paddingRight:"10px"}})," ",Y.t("tree.Linden",i)]},pr.Linden),h.jsxs(mm,{value:pr.Magnolia,children:[h.jsx("img",{alt:pr.Magnolia,src:mde,height:20,style:{paddingRight:"10px"}})," ",Y.t("tree.Magnolia",i)]},pr.Magnolia),h.jsxs(mm,{value:pr.Maple,children:[h.jsx("img",{alt:pr.Maple,src:yde,height:20,style:{paddingRight:"12px"}})," ",Y.t("tree.Maple",i)]},pr.Maple),h.jsxs(mm,{value:pr.Oak,children:[h.jsx("img",{alt:pr.Oak,src:Ade,height:20,style:{paddingRight:"17px"}}),Y.t("tree.Oak",i)]},pr.Oak),h.jsxs(mm,{value:pr.Pine,children:[h.jsx("img",{alt:pr.Pine,src:sQe,height:20,style:{paddingRight:"18px"}})," ",Y.t("tree.Pine",i)]},pr.Pine),h.jsxs(mm,{value:pr.Spruce,children:[h.jsx("img",{alt:pr.Spruce,src:cQe,height:20,style:{paddingRight:"20px"}})," ",Y.t("tree.Spruce",i)]},pr.Spruce)]})}),o1o=t=>{const e=[];if(t.type!==z.Tree)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language};return e.push({key:"tree-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"tree-cut",label:h.jsx(kd,{})}),e.push({key:"tree-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&(e.push({key:"tree-show-model",label:h.jsx(rho,{tree:n})},{key:"tree-flip",label:h.jsx(L9e,{billboardModel:n})}),e.push({key:"tree-change-type",label:h.jsxs(an,{stayAfterClick:!0,children:[h.jsxs(on,{style:{width:"100px"},children:[Y.t("treeMenu.Type",r),": "]}),h.jsx(n1o,{tree:n})]})},{key:"tree-spread",label:h.jsx(iho,{tree:n})},{key:"tree-height",label:h.jsx(aho,{tree:n})},{key:"tree-label-submenu",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",r)}),children:v3(n)})),{items:e}},r1o=({wall:t,objectType:e,modalTitle:n,onClickOk:o,children:r})=>{const i=M.getState().removeAllChildElementsByType,a=()=>{const s=M.getState().elements.filter(d=>!d.locked&&d.type===e&&d.parentId===t.id);i(t.id,e);const c=JSON.parse(JSON.stringify(s)),u={name:`Remove All ${e}s on Wall`,timestamp:Date.now(),parentId:t.id,removedElements:c,undo:()=>{M.getState().set(d=>{d.elements.push(...u.removedElements)})},redo:()=>{i(u.parentId,e)}};M.getState().addUndoable(u)},l=()=>{const s=o??a;xi.confirm({title:n,icon:h.jsx(ny,{}),onOk:s})};return h.jsx(an,{update:!0,noPadding:!0,onClick:l,children:r})},LHe=({wall:t,objectType:e,lock:n,children:o})=>{const r=M.getState().updateElementLockById,i=M.getState().updateElementLockByParentId,a=()=>{const l=e.replaceAll(" ",""),s=new Map;for(const d of M.getState().elements)d.parentId===t.id&&d.type===e&&s.set(d.id,!!d.locked);i(t.id,e,n);const u={name:n?`Lock All Unlocked ${l} on Wall`:`Unlock All Locked ${l} on Wall`,timestamp:Date.now(),oldValues:s,newValue:!0,undo:()=>{for(const[d,f]of u.oldValues.entries())r(d,f)},redo:()=>{i(t.id,e,n)}};M.getState().addUndoable(u)};return h.jsx(an,{stayAfterClick:!0,update:!0,noPadding:!0,onClick:a,children:o})},i1o=({wall:t})=>{const e=$t(),n=M.getState().set,o=(i,a)=>{n(l=>{const s=l.elements.find(c=>c.id===i&&c.type===z.Wall);s&&(s.parapet.display=a)})},r=i=>{const a=i.target.checked,l={name:"Parapet",timestamp:Date.now(),checked:a,selectedElementId:t.id,selectedElementType:t.type,undo:()=>{o(t.id,!l.checked)},redo:()=>{o(t.id,l.checked)}};M.getState().addUndoable(l),o(t.id,a),n(s=>{s.actionState.wallParapet.display=a})};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.parapet.display,onChange:r,children:Y.t("wallMenu.Parapet",e)})})},a1o=({wall:t})=>{const e=$t(),n=(i,a)=>{M.getState().set(l=>{for(const s of l.elements)if(s.id===i&&s.type===z.Wall){const c=s;c.wallStructure=a,(a===gc.Stud||a===gc.Pillar)&&(c.opacity=0);break}})},o=i=>{const a={name:"Select Wall Structure",timestamp:Date.now(),oldValue:t.wallStructure,newValue:i.target.value,changedElementId:t.id,changedElementType:t.type,undo:()=>{n(a.changedElementId,a.oldValue)},redo:()=>{n(a.changedElementId,a.newValue)}};M.getState().addUndoable(a),n(t.id,i.target.value),M.getState().set(l=>{l.actionState.wallStructure=i.target.value,(l.actionState.wallStructure===gc.Stud||l.actionState.wallStructure===gc.Pillar)&&(l.actionState.wallOpacity=0)})},r=t.wallStructure??gc.Default;return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Le.Group,{value:r,onChange:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:gc.Default,children:Y.t("wallMenu.DefaultStructure",e)}),h.jsx(Le,{style:{width:"100%"},value:gc.Stud,children:Y.t("wallMenu.StudStructure",e)}),h.jsx(Le,{style:{width:"100%"},value:gc.Pillar,children:Y.t("wallMenu.PillarStructure",e)})]})})})},l1o=({wall:t})=>{const e=M.getState().set,n=$t(),o=(i,a,l)=>{const{cx:s,cy:c,cz:u}=a,d=l?l.rotation[2]+a.relativeAngle:a.relativeAngle;if(l&&d!==void 0){const f=ye.wallAbsolutePosition(new ae(s,c,u),l).setZ(a.lz/2+l.lz);return new ae().subVectors(i,f).applyEuler(new ln(0,0,-d))}return new ae},r=()=>{const i=M.getState().getFoundation(t);if(!i)return;const a=o(M.getState().pastePoint,t,i),l=Va.makePolygon(t,-a.x/t.lx,0,-a.z/t.lz,new ae(0,0,1),[0,0,0],z.Wall);e(c=>{c.elements.push(l),c.objectTypeToAdd=z.None});const s={name:"Add",timestamp:Date.now(),addedElement:l,undo:()=>{M.getState().removeElementById(s.addedElement.id,!1)},redo:()=>{e(c=>{c.elements.push(s.addedElement),c.selectedElement=s.addedElement})}};M.getState().addUndoable(s)};return h.jsx(an,{onClick:r,children:Y.t("foundationMenu.AddPolygon",n)})},s1o=({wall:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.id===r&&l.type===z.Wall){l.fill=i;break}})},o=r=>{const i={name:"Select Wall Fill",timestamp:Date.now(),oldValue:t.fill,newValue:r.target.value,changedElementId:t.id,changedElementType:t.type,undo:()=>{n(i.changedElementId,i.oldValue)},redo:()=>{n(i.changedElementId,i.newValue)}};M.getState().addUndoable(i),n(t.id,r.target.value)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Le.Group,{value:t.fill,onChange:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:Fl.Full,children:Y.t("wallMenu.Full",e)}),h.jsx(Le,{style:{width:"100%"},value:Fl.Partial,children:Y.t("wallMenu.Partial",e)}),h.jsx(Le,{style:{width:"100%"},value:Fl.Empty,children:Y.t("wallMenu.Empty",e)})]})})})},c1o=({wall:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.id===r&&l.type===z.Wall){l.openToOutside=i;break}})},o=r=>{const i={name:"Set Open to Outside",timestamp:Date.now(),oldValue:!!t.openToOutside,newValue:r.target.checked,changedElementId:t.id,changedElementType:t.type,undo:()=>{n(i.changedElementId,i.oldValue)},redo:()=>{n(i.changedElementId,i.newValue)}};M.getState().addUndoable(i),n(t.id,r.target.checked)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:!!t.openToOutside,onChange:o,children:Y.t("wallMenu.OpenToOutside",e)})})},_ae=[{key:"solarPanelCount",lockedKey:"lockedSolarPanelCount",objectType:z.SolarPanel},{key:"windowCount",lockedKey:"lockedWindowCount",objectType:z.Window},{key:"doorCount",lockedKey:"lockedDoorCount",objectType:z.Door},{key:"sensorCount",lockedKey:"lockedSensorCount",objectType:z.Sensor},{key:"polygonCount",lockedKey:"lockedPolygonCount",objectType:z.Polygon},{key:"outsideLightCount",lockedKey:"lockedLightCount",objectType:z.Light}],u1o=(t,e)=>{const n={lng:M.getState().language};let o="",r="";switch(t){case z.SolarPanel:{o=`${Y.t("wallMenu.RemoveAllUnlockedSolarPanels",n)} (${e})`,r=`${Y.t("wallMenu.DoYouReallyWantToRemoveAllSolarPanelsOnThisWall",n)} (${e} ${Y.t("wallMenu.SolarPanels",n)})`;break}case z.Window:{o=`${Y.t("wallMenu.RemoveAllUnlockedWindows",n)} (${e})`,r=`${Y.t("wallMenu.DoYouReallyWantToRemoveAllWindowsOnThisWall",n)} (${e} ${Y.t("wallMenu.Windows",n)})`;break}case z.Door:{o=`${Y.t("wallMenu.RemoveAllUnlockedDoors",n)} (${e})`,r=`${Y.t("wallMenu.DoYouReallyWantToRemoveAllDoorsOnThisWall",n)} (${e} ${Y.t("wallMenu.Doors",n)})`;break}case z.Sensor:{o=`${Y.t("wallMenu.RemoveAllUnlockedSensors",n)} (${e})`,r=`${Y.t("wallMenu.DoYouReallyWantToRemoveAllSensorsOnThisWall",n)} (${e} ${Y.t("wallMenu.Sensors",n)})`;break}case z.Light:{o=`${Y.t("wallMenu.RemoveAllUnlockedLights",n)} (${e})`,r=`${Y.t("wallMenu.DoYouReallyWantToRemoveAllLightsOnThisWall",n)} (${e} ${Y.t("wallMenu.Lights",n)})`;break}case z.Polygon:{o=`${Y.t("wallMenu.RemoveAllUnlockedPolygons",n)} (${e})`,r=`${Y.t("wallMenu.DoYouReallyWantToRemoveAllPolygonsOnThisWall",n)} (${e} ${Y.t("wallMenu.Polygons",n)})`;break}}return{itemLabel:o,modalTitle:r}},Gae=(t,e,n,o)=>n===z.Light?o?t.lockedLightCount:t.insideLightCount+t.outsideLightCount:t[e],d1o=(t,e,n)=>{const o=[],r={lng:M.getState().language};return _ae.forEach(({key:i,objectType:a})=>{const l=Gae(n,i,a);if(typeof l=="number"&&l>0){const{itemLabel:s,modalTitle:c}=u1o(a,l),u=a.replaceAll(" ","");o.push({key:`remove-all-${u}s-on-wall`,label:h.jsx(r1o,{wall:t,objectType:a,modalTitle:c,children:s})})}}),_ae.forEach(({key:i,objectType:a})=>{const l=Gae(n,i,a);if(typeof l=="number"&&l>0){const s=a.replaceAll(" ","");o.push({key:`lock-all-${s}s-on-wall`,label:h.jsxs(LHe,{wall:t,objectType:a,lock:!0,children:[Y.t(`wallMenu.LockAllUnlocked${s}s`,r)," (",l,")"]})})}}),_ae.forEach(({lockedKey:i,objectType:a})=>{const l=Gae(e,i,a,!0);if(typeof l=="number"&&l>0){const s=a.replaceAll(" ","");o.push({key:`unlock-all-${s}s-on-wall`,label:h.jsxs(LHe,{wall:t,objectType:a,lock:!1,children:[Y.t(`wallMenu.UnlockAllLocked${s}s`,r)," (",l,")"]})})}}),e.outsideLightCount>0&&o.push({key:"inside-lights-on-wall",label:h.jsxs(wX,{element:t,inside:!0,children:[Y.t("wallMenu.AllLightsOnWallInside",r)," (",e.outsideLightCount,")"]})}),e.insideLightCount>0&&o.push({key:"outside-lights-on-wall",label:h.jsxs(wX,{element:t,inside:!1,children:[Y.t("wallMenu.AllLightsOnWallOutside",r)," (",e.insideLightCount,")"]})}),o},f1o=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(g3),i=M(no),a=M(Qn),l=M(Jn),s=uo(z.Wall),c=$t(),[u,d]=ZZ((s==null?void 0:s.parapet.color)??"#ffffff"),f=(T,w)=>{e(x=>{for(const b of x.elements)if(b.id===T&&b.type===z.Wall&&!b.locked){b.parapet.color=w;break}})},p=T=>{if(!s)return;const w=ye.getAllConnectedWalls(s);w.length!==0&&e(x=>{for(const b of w)if(!b.locked)for(const R of x.elements)R.id===b.id&&R.type===z.Wall&&(R.parapet.color=T)})},g=(T,w)=>{e(x=>{for(const b of x.elements)b.parentId===T&&b.type===z.Wall&&!b.locked&&(b.parapet.color=w)})},A=T=>{e(w=>{for(const x of w.elements)x.type===z.Wall&&!x.locked&&(x.parapet.color=T)})},y=(T,w)=>{e(x=>{for(const b of x.elements)b.type===z.Wall&&!b.locked&&T.has(b.id)&&(b.parapet.color=w)})},S=T=>{if(s){switch(r){case re.AllSelectedObjectsOfThisType:{for(const w of n)if(w.type===z.Wall&&T!==w.parapet.color&&!w.locked&&M.getState().selectedElementIdSet.has(w.id))return!0;break}case re.AllObjectsOfThisType:{for(const w of n)if(w.type===z.Wall&&T!==w.parapet.color&&!w.locked)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const w of n)if(w.type===z.Wall&&w.foundationId===s.foundationId&&T!==w.parapet.color&&!w.locked)return!0;break}case re.AllConnectedObjects:{const w=ye.getAllConnectedWalls(s);for(const x of w)if(T!==x.parapet.color&&!x.locked)return!0;break}default:{if(T!==(s==null?void 0:s.parapet.color))return!0;break}}return!1}},C=T=>{if(s&&S(T)){switch(r){case re.AllSelectedObjectsOfThisType:{const w=new Map;for(const b of n)b.type===z.Wall&&M.getState().selectedElementIdSet.has(b.id)&&w.set(b.id,b.parapet.color??"#ffffff");const x={name:"Set Parapet Color for Selected Walls",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())f(b,R)},redo:()=>{y(x.oldValues,x.newValue)}};o(x),y(w,T),a(i+1);break}case re.AllObjectsOfThisType:{const w=new Map;for(const b of n)b.type===z.Wall&&w.set(b.id,b.parapet.color??"#ffffff");const x={name:"Set Parapet Color for All Walls",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())f(b,R)},redo:()=>{A(x.newValue)}};o(x),A(T),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const w=new Map;for(const b of n)b.type===z.Wall&&b.foundationId===s.foundationId&&w.set(b.id,b.parapet.color??"#ffffff");const x={name:"Set Parapet Color for All Walls Above Foundation",timestamp:Date.now(),oldValues:w,newValue:T,groupId:s.foundationId,undo:()=>{for(const[b,R]of x.oldValues.entries())f(b,R)},redo:()=>{x.groupId&&g(x.groupId,x.newValue)}};o(x),g(s.foundationId,T),a(i+1)}break;case re.AllConnectedObjects:if(s){const w=ye.getAllConnectedWalls(s),x=new Map;for(const R of w)x.set(R.id,R.color??"#ffffff");const b={name:"Set Parapet Color for All Connected Walls",timestamp:Date.now(),oldValues:x,newValue:T,undo:()=>{for(const[R,H]of b.oldValues.entries())f(R,H)},redo:()=>{p(b.newValue)}};o(b),p(T),a(i+1)}break;default:if(s){const w=l(s.id),x=(w==null?void 0:w.parapet.color)??s.parapet.color??"#ffffff",b={name:"Set Parapet Color of Selected Wall",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(b.changedElementId,b.oldValue)},redo:()=>{f(b.changedElementId,b.newValue)}};o(b),f(s.id,T),a(i+1)}}e(w=>{w.actionState.wallParapet.color=T})}},P=()=>{C(u)},v=()=>{t(!1)};return h.jsx(so,{width:640,title:Y.t("wallMenu.ParapetColor",c),onApply:P,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:u,onChangeComplete:d})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:T=>M.getState().setWallActionScope(T.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("wallMenu.OnlyThisWall",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllConnectedObjects,children:Y.t("wallMenu.AllConnectedWalls",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("wallMenu.AllWallsAboveFoundation",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("wallMenu.AllSelectedWalls",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("wallMenu.AllWalls",c)})]})})})]})})},Prt="/aladdin/assets/wall_01_menu-BlJdKfby.png",Crt="/aladdin/assets/wall_02_menu-DfsmvvWJ.png",Rrt="/aladdin/assets/wall_03_menu-B95_FEuA.png",Hrt="/aladdin/assets/wall_04_menu-D-Kn25E7.png",Mrt="/aladdin/assets/wall_05_menu-DGgjaMY9.png",Irt="/aladdin/assets/wall_06_menu-EOIch2eu.png",zrt="/aladdin/assets/wall_07_menu-DvXS_qn2.png",Drt="/aladdin/assets/wall_08_menu-CfftE2pF.png",Ert="/aladdin/assets/wall_09_menu-_O8A0WOE.png",Frt="/aladdin/assets/wall_10_menu-B5QfhD3g.png",h1o=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(g3),i=M(no),a=M(Qn),l=M(Jn),s=uo(z.Wall),[c,u]=m.useState((s==null?void 0:s.parapet.textureType)??Bo.Default),d=$t(),{Option:f}=Uo,p=(w,x)=>{e(b=>{for(const R of b.elements)if(R.type===z.Wall&&R.id===w&&!R.locked){R.parapet.textureType=x;break}})},g=w=>{if(!s)return;const x=ye.getAllConnectedWalls(s);x.length!==0&&e(b=>{for(const R of x)if(!R.locked)for(const H of b.elements)H.id===R.id&&H.type===z.Wall&&(H.parapet.textureType=w)})},A=(w,x)=>{e(b=>{for(const R of b.elements)R.type===z.Wall&&R.foundationId===w&&!R.locked&&(R.parapet.textureType=x)})},y=w=>{e(x=>{for(const b of x.elements)b.type===z.Wall&&!b.locked&&(b.parapet.textureType=w)})},S=(w,x)=>{e(b=>{for(const R of b.elements)R.type===z.Wall&&!R.locked&&w.has(R.id)&&(R.parapet.textureType=x)})},C=w=>{if(s){switch(r){case re.AllSelectedObjectsOfThisType:{for(const x of n)if(x.type===z.Wall&&w!==x.parapet.textureType&&!x.locked&&M.getState().selectedElementIdSet.has(x.id))return!0;break}case re.AllObjectsOfThisType:{for(const x of n)if(x.type===z.Wall&&w!==x.parapet.textureType&&!x.locked)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const x of n)if(x.type===z.Wall&&x.foundationId===s.foundationId&&w!==x.parapet.textureType&&!x.locked)return!0;break}case re.AllConnectedObjects:{const x=ye.getAllConnectedWalls(s);for(const b of x)if(w!==b.parapet.textureType&&!b.locked)return!0;break}default:{if(w!==(s==null?void 0:s.parapet.textureType))return!0;break}}return!1}},P=w=>{if(s&&C(w)){switch(r){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.Wall&&!R.locked&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.parapet.textureType??Bo.Default);const b={name:"Set Parapet Texture for Selected Walls",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())p(R,H)},redo:()=>{S(b.oldValues,b.newValue)}};o(b),S(x,w),a(i+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.Wall&&!R.locked&&x.set(R.id,R.parapet.textureType??Bo.Default);const b={name:"Set Parapet Texture for All Walls",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())p(R,H)},redo:()=>{y(b.newValue)}};o(b),y(w),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const x=new Map;for(const R of n)R.type===z.Wall&&R.foundationId===s.foundationId&&!R.locked&&x.set(R.id,R.parapet.textureType);const b={name:"Set Parapet Texture for All Walls Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:s.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())p(R,H)},redo:()=>{b.groupId&&A(b.groupId,b.newValue)}};o(b),A(s.foundationId,w),a(i+1)}break;case re.AllConnectedObjects:if(s){const x=ye.getAllConnectedWalls(s),b=new Map;for(const H of x)b.set(H.id,H.parapet.textureType);const R={name:"Set Parapet Texture for All Connected Walls",timestamp:Date.now(),oldValues:b,newValue:w,undo:()=>{for(const[H,F]of R.oldValues.entries())p(H,F)},redo:()=>{g(R.newValue)}};o(R),g(w),a(i+1)}break;default:if(s){const x=l(s.id),b=(x==null?void 0:x.parapet.textureType)??s.parapet.textureType,R={name:"Set Parapet Texture of Selected Wall",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(R.changedElementId,R.oldValue)},redo:()=>{p(R.changedElementId,R.newValue)}};o(R),p(s.id,w),a(i+1)}}e(x=>{x.actionState.wallParapet.textureType=w})}},v=()=>{t(!1)},T=()=>{P(c)};return h.jsx(so,{width:550,title:Y.t("word.Texture",d),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:9,children:h.jsxs(Uo,{style:{width:"150px"},value:c,onChange:u,children:[h.jsxs(f,{value:Bo.NoTexture,children:[h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"12px",width:"32px",height:"20px",border:"1px dashed dimGray"},children:" "}),Y.t("shared.NoTexture",d)]},Bo.NoTexture),h.jsxs(f,{value:Bo.Default,children:[h.jsx("img",{alt:Bo.Default,src:Uye,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.TextureDefault",d)]},Bo.Default),h.jsxs(f,{value:Bo.Texture01,children:[h.jsx("img",{alt:Bo.Texture01,src:Prt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture01",d)]},Bo.Texture01),h.jsxs(f,{value:Bo.Texture02,children:[h.jsx("img",{alt:Bo.Texture02,src:Crt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture02",d)]},Bo.Texture02),h.jsxs(f,{value:Bo.Texture03,children:[h.jsx("img",{alt:Bo.Texture03,src:Rrt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture03",d)]},Bo.Texture03),h.jsxs(f,{value:Bo.Texture04,children:[h.jsx("img",{alt:Bo.Texture04,src:Hrt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture04",d)]},Bo.Texture04),h.jsxs(f,{value:Bo.Texture05,children:[h.jsx("img",{alt:Bo.Texture05,src:Mrt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture05",d)]},Bo.Texture05),h.jsxs(f,{value:Bo.Texture06,children:[h.jsx("img",{alt:Bo.Texture06,src:Irt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture06",d)]},Bo.Texture06),h.jsxs(f,{value:Bo.Texture07,children:[h.jsx("img",{alt:Bo.Texture07,src:zrt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture07",d)]},Bo.Texture07),h.jsxs(f,{value:Bo.Texture08,children:[h.jsx("img",{alt:Bo.Texture08,src:Drt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture08",d)]},Bo.Texture08),h.jsxs(f,{value:Bo.Texture09,children:[h.jsx("img",{alt:Bo.Texture09,src:Ert,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture09",d)]},Bo.Texture09),h.jsxs(f,{value:Bo.Texture10,children:[h.jsx("img",{alt:Bo.Texture10,src:Frt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture10",d)]},Bo.Texture10)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:15,children:h.jsx(Le.Group,{onChange:w=>M.getState().setWallActionScope(w.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("wallMenu.OnlyThisWall",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllConnectedObjects,children:Y.t("wallMenu.AllConnectedWalls",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("wallMenu.AllWallsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("wallMenu.AllSelectedWalls",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("wallMenu.AllWalls",d)})]})})})]})})},Xae=({wall:t,dataType:e,attributeKey:n,range:o,step:r,unit:i,setDialogVisible:a})=>{const l=M(Kn),s=M(En),c=M(g3),u=M(no),d=M(Qn),f=M(pn),p=m.useRef(t.parapet[n]),g=$t(),A=R=>{f(H=>{switch(n){case"copingsHeight":H.actionState.wallParapet.copingsHeight=R;break;case"copingsWidth":H.actionState.wallParapet.copingsWidth=R;break;case"parapetHeight":H.actionState.wallParapet.parapetHeight=R;break}})},y=(R,H)=>{f(F=>{for(const E of F.elements)if(E.id===R&&E.type===z.Wall&&!E.locked){E.parapet[n]=H;break}}),A(H)},S=R=>{const H=ye.getAllConnectedWalls(t);H.length!==0&&(f(F=>{for(const E of H)if(!E.locked)for(const N of F.elements)N.id===E.id&&N.type===z.Wall&&(N.parapet[n]=R)}),A(R))},C=(R,H)=>{f(F=>{for(const E of F.elements)E.parentId===R&&E.type===z.Wall&&!E.locked&&(E.parapet[n]=H)}),A(H)},P=R=>{f(H=>{for(const F of H.elements)F.type===z.Wall&&!F.locked&&(F.parapet[n]=R)}),A(R)},v=(R,H)=>{f(F=>{for(const E of F.elements)E.type===z.Wall&&!E.locked&&R.has(E.id)&&(E.parapet[n]=H)}),A(H)},T=R=>{switch(c){case re.AllSelectedObjectsOfThisType:{for(const H of l)if(H.type===z.Wall&&R!==H.parapet[n]&&!H.locked&&M.getState().selectedElementIdSet.has(H.id))return!0;break}case re.AllObjectsOfThisType:{for(const H of l)if(H.type===z.Wall&&R!==H.parapet[n]&&!H.locked)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const H of l)if(H.type===z.Wall&&H.foundationId===t.foundationId&&R!==H.parapet[n]&&!H.locked)return!0;break}case re.AllConnectedObjects:{const H=ye.getAllConnectedWalls(t);for(const F of H)if(R!==F.parapet[n]&&!F.locked)return!0;break}default:{if(R!==t.parapet[n])return!0;break}}return!1},w=R=>{if(t&&T(R))switch(c){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of l)E.type===z.Wall&&M.getState().selectedElementIdSet.has(E.id)&&H.set(E.id,E.parapet[n]);const F={name:`Set ${e} for Selected Walls`,timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{v(F.oldValues,F.newValue)}};s(F),v(H,R),d(u+1);break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of l)E.type===z.Wall&&H.set(E.id,E.parapet[n]);const F={name:`Set ${e} for All Walls`,timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{P(F.newValue)}};s(F),P(R),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(t.foundationId){const H=new Map;for(const E of l)E.type===z.Wall&&E.foundationId===t.foundationId&&H.set(E.id,E.parapet[n]);const F={name:`Set ${e} for All Walls Above Foundation`,timestamp:Date.now(),oldValues:H,newValue:R,groupId:t.foundationId,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{F.groupId&&C(F.groupId,F.newValue)}};s(F),C(t.foundationId,R),d(u+1)}break;case re.AllConnectedObjects:if(t){const H=ye.getAllConnectedWalls(t),F=new Map;for(const N of H)F.set(N.id,N.parapet[n]);const E={name:`Set ${e} for All Connected Walls`,timestamp:Date.now(),oldValues:F,newValue:R,undo:()=>{for(const[N,U]of E.oldValues.entries())y(N,U)},redo:()=>{S(E.newValue)}};s(E),S(R),d(u+1)}break;default:if(t){const H=t.parapet[n],F={name:`Set Wall ${e}`,timestamp:Date.now(),oldValue:H,newValue:R,changedElementId:t.id,changedElementType:t.type,undo:()=>{y(F.changedElementId,F.oldValue)},redo:()=>{y(F.changedElementId,F.newValue)}};s(F),y(t.id,R),d(u+1)}}},x=()=>{a(!1)},b=()=>{w(p.current)};return h.jsx(so,{width:550,title:Y.t(`wallMenu.${e}`,g),onApply:b,onClose:x,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:o[0],max:o[1],style:{width:120},step:r,precision:2,defaultValue:t.parapet[n],onChange:R=>p.current=R}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",g),": [",o.toString(),"] ",i]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:i??" "}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:R=>M.getState().setWallActionScope(R.target.value),value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("wallMenu.OnlyThisWall",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllConnectedObjects,children:Y.t("wallMenu.AllConnectedWalls",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("wallMenu.AllWallsAboveFoundation",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("wallMenu.AllSelectedWalls",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("wallMenu.AllWalls",g)})]})})})]})})};var w_=(t=>(t.ParapetHeight="ParapetHeight",t.CopingsHeight="CopingsHeight",t.CopingsWidth="CopingsWidth",t))(w_||{});const p1o={ParapetHeight:{attributeKey:"parapetHeight",range:[0,5],step:.01,unit:"word.MeterAbbreviation"},CopingsHeight:{attributeKey:"copingsHeight",range:[0,1],step:.01,unit:"word.MeterAbbreviation"},CopingsWidth:{attributeKey:"copingsWidth",range:[0,3],step:.01,unit:"word.MeterAbbreviation"}},Jae=({Dialog:t,wall:e,dataType:n,children:o})=>{const r=$t(),[i,a]=m.useState(!1),l=()=>{M.getState().setApplyCount(0),a(!0)},s=p1o[n];return h.jsxs(h.Fragment,{children:[h.jsx(an,{noPadding:!0,onClick:l,children:o}),i&&h.jsx(t,{wall:e,dataType:n,attributeKey:s.attributeKey,range:s.range,step:s.step,unit:s.unit?Y.t(s.unit,r):void 0,setDialogVisible:a})]})},g1o=t=>{const e={lng:M.getState().language},n=[];return n.push({key:"parapet-checkbox",label:h.jsx(i1o,{wall:t})}),t.parapet.display&&n.push({type:"divider"},{key:"parapet-color",label:h.jsxs(eo,{noPadding:!0,Dialog:f1o,children:[Y.t("wallMenu.ParapetColor",e)," ..."]})},{key:"parapet-texture",label:h.jsxs(eo,{noPadding:!0,Dialog:h1o,children:[Y.t("wallMenu.ParapetTexture",e)," ..."]})},{key:"parapet-height",label:h.jsxs(Jae,{wall:t,dataType:w_.ParapetHeight,Dialog:Xae,children:[Y.t("wallMenu.ParapetHeight",e)," ..."]})},{key:"copings-height",label:h.jsxs(Jae,{wall:t,dataType:w_.CopingsHeight,Dialog:Xae,children:[Y.t("wallMenu.CopingsHeight",e)," ..."]})},{key:"copings-width",label:h.jsxs(Jae,{wall:t,dataType:w_.CopingsWidth,Dialog:Xae,children:[Y.t("wallMenu.CopingsWidth",e)," ..."]})}),n},dC=({wall:t,dataType:e,attributeKey:n,range:o,step:r,unit:i,setDialogVisible:a})=>{const l=M(Kn),s=M(En),c=M(g3),u=M(no),d=M(Qn),f=M(pn),p=m.useRef(t[n]),g=$t(),A=R=>{f(H=>{switch(n){case"ly":H.actionState.wallThickness=R;break;case"lz":H.actionState.wallHeight=R;break;case"opacity":H.actionState.wallOpacity=R;break;case"structureSpacing":H.actionState.wallStructureSpacing=R;break;case"structureWidth":H.actionState.wallStructureWidth=R;break;case"eavesLength":H.actionState.wallEavesLength=R;break}})},y=(R,H)=>{f(F=>{for(const E of F.elements)if(E.id===R&&E.type===z.Wall&&!E.locked){E[n]=H;break}}),A(H)},S=R=>{const H=ye.getAllConnectedWalls(t);H.length!==0&&(f(F=>{for(const E of H)if(!E.locked)for(const N of F.elements)N.id===E.id&&N.type===z.Wall&&(N[n]=R)}),A(R))},C=(R,H)=>{f(F=>{for(const E of F.elements)E.parentId===R&&E.type===z.Wall&&!E.locked&&(E[n]=H)}),A(H)},P=R=>{f(H=>{for(const F of H.elements)F.type===z.Wall&&!F.locked&&(F[n]=R)}),A(R)},v=(R,H)=>{f(F=>{for(const E of F.elements)E.type===z.Wall&&!E.locked&&R.has(E.id)&&(E[n]=H)}),A(H)},T=R=>{switch(c){case re.AllSelectedObjectsOfThisType:{for(const H of l)if(H.type===z.Wall&&R!==H[n]&&!H.locked&&M.getState().selectedElementIdSet.has(H.id))return!0;break}case re.AllObjectsOfThisType:{for(const H of l)if(H.type===z.Wall&&R!==H[n]&&!H.locked)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const H of l)if(H.type===z.Wall&&H.foundationId===t.foundationId&&R!==H[n]&&!H.locked)return!0;break}case re.AllConnectedObjects:{const H=ye.getAllConnectedWalls(t);for(const F of H)if(R!==F[n]&&!F.locked)return!0;break}default:{if(R!==t[n])return!0;break}}return!1},w=R=>{if(t&&T(R))switch(c){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of l)E.type===z.Wall&&M.getState().selectedElementIdSet.has(E.id)&&H.set(E.id,E[n]);const F={name:`Set ${e} for Selected Walls`,timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{v(F.oldValues,F.newValue)}};s(F),v(H,R),d(u+1);break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of l)E.type===z.Wall&&H.set(E.id,E[n]);const F={name:`Set ${e} for All Walls`,timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{P(F.newValue)}};s(F),P(R),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(t.foundationId){const H=new Map;for(const E of l)E.type===z.Wall&&E.foundationId===t.foundationId&&H.set(E.id,E[n]);const F={name:`Set ${e} for All Walls Above Foundation`,timestamp:Date.now(),oldValues:H,newValue:R,groupId:t.foundationId,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{F.groupId&&C(F.groupId,F.newValue)}};s(F),C(t.foundationId,R),d(u+1)}break;case re.AllConnectedObjects:if(t){const H=ye.getAllConnectedWalls(t),F=new Map;for(const N of H)F.set(N.id,N[n]);const E={name:`Set ${e} for All Connected Walls`,timestamp:Date.now(),oldValues:F,newValue:R,undo:()=>{for(const[N,U]of E.oldValues.entries())y(N,U)},redo:()=>{S(E.newValue)}};s(E),S(R),d(u+1)}break;default:if(t){const H=t[n],F={name:`Set Wall ${e}`,timestamp:Date.now(),oldValue:H,newValue:R,changedElementId:t.id,changedElementType:t.type,undo:()=>{y(F.changedElementId,F.oldValue)},redo:()=>{y(F.changedElementId,F.newValue)}};s(F),y(t.id,R),d(u+1)}}},x=()=>{p.current=t[n],a(!1)},b=()=>{w(p.current)};return h.jsx(so,{width:550,title:Y.t(`wallMenu.${e}`,g),onApply:b,onClose:x,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:o[0],max:o[1],style:{width:120},step:r,precision:2,defaultValue:t[n],onChange:R=>p.current=R}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",g),": [",o.toString(),"] ",i]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:i??" "}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:R=>M.getState().setWallActionScope(R.target.value),value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("wallMenu.OnlyThisWall",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllConnectedObjects,children:Y.t("wallMenu.AllConnectedWalls",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("wallMenu.AllWallsAboveFoundation",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("wallMenu.AllSelectedWalls",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("wallMenu.AllWalls",g)})]})})})]})})},fC=({Dialog:t,noPadding:e,dataType:n,children:o})=>{const r=$t(),[i,a]=m.useState(!1),l=uo(z.Wall),s=()=>{M.getState().setApplyCount(0),a(!0)},c=S1o[n];return h.jsxs(h.Fragment,{children:[h.jsx(an,{noPadding:e,onClick:s,children:o}),i&&l&&h.jsx(t,{wall:l,dataType:n,attributeKey:c.attributeKey,range:c.range,step:c.step,unit:c.unit?Y.t(c.unit,r):void 0,setDialogVisible:a})]})},m1o=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(g3),i=M(no),a=M(Qn),l=M(Jn),s=uo(z.Wall),[c,u]=ZZ((s==null?void 0:s.structureColor)??"#ffffff"),d=$t(),f=(T,w)=>{e(x=>{for(const b of x.elements)if(b.id===T&&b.type===z.Wall&&!b.locked){b.structureColor=w;break}})},p=T=>{if(!s)return;const w=ye.getAllConnectedWalls(s);w.length!==0&&e(x=>{for(const b of w)if(!b.locked)for(const R of x.elements)R.id===b.id&&R.type===z.Wall&&(R.structureColor=T)})},g=(T,w)=>{e(x=>{for(const b of x.elements)b.parentId===T&&b.type===z.Wall&&!b.locked&&(b.structureColor=w)})},A=T=>{e(w=>{for(const x of w.elements)x.type===z.Wall&&!x.locked&&(x.structureColor=T)})},y=(T,w)=>{e(x=>{for(const b of x.elements)b.type===z.Wall&&!b.locked&&T.has(b.id)&&(b.color=w)})},S=T=>{if(s){switch(r){case re.AllSelectedObjectsOfThisType:{for(const w of n)if(w.type===z.Wall&&T!==w.structureColor&&!w.locked&&M.getState().selectedElementIdSet.has(w.id))return!0;break}case re.AllObjectsOfThisType:{for(const w of n)if(w.type===z.Wall&&T!==w.structureColor&&!w.locked)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const w of n)if(w.type===z.Wall&&w.foundationId===s.foundationId&&T!==w.structureColor&&!w.locked)return!0;break}case re.AllConnectedObjects:{const w=ye.getAllConnectedWalls(s);for(const x of w)if(T!==x.structureColor&&!x.locked)return!0;break}default:{if(T!==(s==null?void 0:s.structureColor))return!0;break}}return!1}},C=T=>{if(s&&S(T)){switch(r){case re.AllSelectedObjectsOfThisType:{const w=new Map;for(const b of n)b.type===z.Wall&&M.getState().selectedElementIdSet.has(b.id)&&w.set(b.id,b.structureColor??"#ffffff");const x={name:"Set Structure Color for Selected Walls",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())f(b,R)},redo:()=>{y(x.oldValues,x.newValue)}};o(x),y(w,T),a(i+1);break}case re.AllObjectsOfThisType:{const w=new Map;for(const b of n)b.type===z.Wall&&w.set(b.id,b.structureColor??"#ffffff");const x={name:"Set Structure Color for All Walls",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())f(b,R)},redo:()=>{A(x.newValue)}};o(x),A(T),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const w=new Map;for(const b of n)b.type===z.Wall&&b.foundationId===s.foundationId&&w.set(b.id,b.structureColor??"#ffffff");const x={name:"Set Structure Color for All Walls Above Foundation",timestamp:Date.now(),oldValues:w,newValue:T,groupId:s.foundationId,undo:()=>{for(const[b,R]of x.oldValues.entries())f(b,R)},redo:()=>{x.groupId&&g(x.groupId,x.newValue)}};o(x),g(s.foundationId,T),a(i+1)}break;case re.AllConnectedObjects:if(s){const w=ye.getAllConnectedWalls(s),x=new Map;for(const R of w)x.set(R.id,R.color??"#ffffff");const b={name:"Set Structure Color for All Connected Walls",timestamp:Date.now(),oldValues:x,newValue:T,undo:()=>{for(const[R,H]of b.oldValues.entries())f(R,H)},redo:()=>{p(b.newValue)}};o(b),p(T),a(i+1)}break;default:if(s){const w=l(s.id),x=(w==null?void 0:w.structureColor)??s.structureColor??"#ffffff",b={name:"Set Structure Color of Selected Wall",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(b.changedElementId,b.oldValue)},redo:()=>{f(b.changedElementId,b.newValue)}};o(b),f(s.id,T),a(i+1)}}e(w=>{w.actionState.wallStructureColor=T})}},P=()=>{t(!1)},v=()=>{C(c)};return h.jsx(so,{width:640,title:Y.t("wallMenu.StructureColor",d),onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:c,onChangeComplete:u})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:T=>M.getState().setWallActionScope(T.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("wallMenu.OnlyThisWall",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllConnectedObjects,children:Y.t("wallMenu.AllConnectedWalls",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("wallMenu.AllWallsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("wallMenu.AllSelectedWalls",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("wallMenu.AllWalls",d)})]})})})]})})};var eg=(t=>(t.Height="Height",t.Opacity="Opacity",t.StructureSpacing="StructureSpacing",t.StructureWidth="StructureWidth",t.Thickness="Thickness",t.EavesLength="EavesLength",t))(eg||{});const y1o=t=>{const e=[],n={lng:M.getState().language};return e.push({key:"wall-structure-submenu-radio-group",label:h.jsx(a1o,{wall:t}),style:{backgroundColor:"white"}}),t.wallStructure!==gc.Default&&e.push({type:"divider"},{key:"wall-structure-spacing",label:h.jsxs(fC,{noPadding:!0,dataType:eg.StructureSpacing,Dialog:dC,children:[Y.t(`wallMenu.${eg.StructureSpacing}`,n)," ..."]})},{key:"wall-structure-width",label:h.jsxs(fC,{noPadding:!0,dataType:eg.StructureWidth,Dialog:dC,children:[Y.t(`wallMenu.${eg.StructureWidth}`,n)," ..."]})},{key:"wall-structure-color",label:h.jsxs(eo,{noPadding:!0,Dialog:m1o,children:[Y.t("wallMenu.StructureColor",n)," ..."]})}),e},A1o=t=>{const e=[];return e.push({key:"wall-fill-radio-group",label:h.jsx(s1o,{wall:t}),style:{backgroundColor:"white"}}),t.fill!==Fl.Full&&e.push({type:"divider"},{key:"wall-open-to-outside-checkbox",label:h.jsx(c1o,{wall:t})}),e},w1o=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(g3),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Wall),[c,u]=m.useState((s==null?void 0:s.rValue)??p6),[d,f]=m.useState(ye.toRValueInUS(c)),p=$t(),g=(T,w)=>{l(x=>{for(const b of x.elements)if(b.id===T){b.rValue=w;break}})},A=T=>{for(const[w,x]of T.entries())g(w,x)},y=(T,w)=>{for(const x of T.keys())g(x,w)},S=T=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:{for(const w of e)if(w.type===z.Wall&&T!==w.rValue&&!w.locked&&M.getState().selectedElementIdSet.has(w.id))return!0;break}case re.AllObjectsOfThisType:{for(const w of e)if(w.type===z.Wall&&T!==w.rValue&&!w.locked)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const w of e)if(w.type===z.Wall&&w.foundationId===s.foundationId&&T!==w.rValue&&!w.locked)return!0;break}case re.AllConnectedObjects:{const w=ye.getAllConnectedWalls(s);for(const x of w)if(T!==x.rValue&&!x.locked)return!0;break}default:{if(T!==(s==null?void 0:s.rValue))return!0;break}}return!1}},C=T=>{if(s&&S(T)){switch(o){case re.AllSelectedObjectsOfThisType:{const w=new Map;for(const b of e)if(b.type===z.Wall&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)){const R=b;w.set(b.id,R.rValue??p6),g(R.id,T)}const x={name:"Set R-Value for Selected Walls",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1);break}case re.AllObjectsOfThisType:{const w=new Map;for(const b of e)if(b.type===z.Wall&&!b.locked){const R=b;w.set(b.id,R.rValue??p6),g(R.id,T)}const x={name:"Set R-Value for All Walls",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s!=null&&s.foundationId){const w=new Map;for(const b of e)if(b.type===z.Wall&&b.foundationId===s.foundationId&&!b.locked){const R=b;w.set(b.id,R.rValue??p6),g(R.id,T)}const x={name:"Set R-Value for All Walls Above Foundation",timestamp:Date.now(),oldValues:w,newValue:T,groupId:s.foundationId,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1)}break;case re.AllConnectedObjects:if(s){const w=ye.getAllConnectedWalls(s),x=new Map;for(const R of w)if(!R.locked){const H=R;x.set(R.id,H.rValue??p6),g(H.id,T)}const b={name:"Set R-Value for All Connected Walls",timestamp:Date.now(),oldValues:x,newValue:T,undo:()=>{A(b.oldValues)},redo:()=>{y(b.oldValues,b.newValue)}};n(b),i(r+1)}break;default:if(s){const x=a(s.id).rValue??s.rValue??p6,b={name:"Set Wall R-Value",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:s.id,changedElementType:s.type,undo:()=>{g(b.changedElementId,b.oldValue)},redo:()=>{g(b.changedElementId,b.newValue)}};n(b),g(s.id,T),i(r+1)}}l(w=>{w.actionState.wallRValue=T})}},P=()=>{u((s==null?void 0:s.rValue)??p6),t(!1)},v=()=>{C(c)};return h.jsx(so,{width:550,title:`${Y.t("word.RValue",p)+" "}(${Y.t("word.ThermalResistance",p)})`,onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:c,formatter:T=>Number(T).toFixed(2),onChange:T=>{T!==null&&(u(T),f(ye.toRValueInUS(T)))}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [0.01, 100]",h.jsx("br",{}),Y.t("word.SIUnit",p),": m²·℃/W"]}),h.jsx("br",{}),h.jsx(Sn,{min:ye.toRValueInUS(.01),max:ye.toRValueInUS(100),style:{width:120},step:.01,precision:2,value:d,formatter:T=>Number(T).toFixed(2),onChange:T=>{T!==null&&(f(T),u(ye.toRValueInSI(T)))}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [",ye.toRValueInUS(.01).toFixed(3),", ",ye.toRValueInUS(100).toFixed(1),"]",h.jsx("br",{}),Y.t("word.USUnit",p),": h·ft²·℉/Btu"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:T=>M.getState().setWallActionScope(T.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("wallMenu.OnlyThisWall",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllConnectedObjects,children:Y.t("wallMenu.AllConnectedWalls",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("wallMenu.AllWallsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("wallMenu.AllSelectedWalls",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("wallMenu.AllWalls",p)})]})})})]})})},v1o=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(g3),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Wall),[c,u]=m.useState((s==null?void 0:s.volumetricHeatCapacity)??.5),d=$t(),f=(P,v)=>{l(T=>{for(const w of T.elements)if(w.id===P){w.volumetricHeatCapacity=v;break}})},p=P=>{for(const[v,T]of P.entries())f(v,T)},g=(P,v)=>{for(const T of P.keys())f(T,v)},A=P=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const T of e)if(T.type===z.Wall&&P!==T.volumetricHeatCapacity&&!T.locked&&M.getState().selectedElementIdSet.has(T.id))return!0;break;case re.AllObjectsOfThisType:for(const T of e)if(T.type===z.Wall&&P!==T.volumetricHeatCapacity&&!T.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const T of e)if(T.type===z.Wall&&T.foundationId===s.foundationId&&P!==T.volumetricHeatCapacity&&!T.locked)return!0;break;case re.AllConnectedObjects:const v=ye.getAllConnectedWalls(s);for(const T of v)if(P!==T.volumetricHeatCapacity&&!T.locked)return!0;break;default:if(P!==(s==null?void 0:s.volumetricHeatCapacity))return!0;break}return!1}},y=P=>{if(s&&A(P)){switch(o){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of e)if(w.type===z.Wall&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)){const x=w;v.set(w.id,x.volumetricHeatCapacity??.5),f(x.id,P)}const T={name:"Set Volumetric Heat Capacity for Selected Walls",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of e)if(w.type===z.Wall&&!w.locked){const x=w;v.set(w.id,x.volumetricHeatCapacity??.5),f(x.id,P)}const T={name:"Set Volumetric Heat Capacity for All Walls",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(s!=null&&s.foundationId){const v=new Map;for(const w of e)if(w.type===z.Wall&&w.foundationId===s.foundationId&&!w.locked){const x=w;v.set(w.id,x.volumetricHeatCapacity??.5),f(x.id,P)}const T={name:"Set Volumetric Heat Capacity for All Walls Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break}case re.AllConnectedObjects:{if(s){const v=ye.getAllConnectedWalls(s),T=new Map;for(const x of v)if(!x.locked){const b=x;T.set(x.id,b.volumetricHeatCapacity??.5),f(b.id,P)}const w={name:"Set Volumetric Heat Capacity for All Connected Walls",timestamp:Date.now(),oldValues:T,newValue:P,undo:()=>{p(w.oldValues)},redo:()=>{g(w.oldValues,w.newValue)}};n(w),i(r+1)}break}default:{if(s){const T=a(s.id).volumetricHeatCapacity??s.volumetricHeatCapacity??.5,w={name:"Set Volumetric Heat Capacity of Wall",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};n(w),f(s.id,P),i(r+1)}break}}l(v=>{v.actionState.wallVolumetricHeatCapacity=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("word.VolumetricHeatCapacity",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:c,formatter:P=>Number(P).toFixed(2),onChange:P=>{P!==null&&u(P)}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:["kWh/(m³·℃)",h.jsx("br",{}),h.jsx("br",{}),Y.t("word.Range",d),": [0.01, 100]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P=>M.getState().setWallActionScope(P.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("wallMenu.OnlyThisWall",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllConnectedObjects,children:Y.t("wallMenu.AllConnectedWalls",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("wallMenu.AllWallsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("wallMenu.AllSelectedWalls",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("wallMenu.AllWalls",d)})]})})})]})})},x1o=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(g3),i=M(no),a=M(Qn),l=M(Jn),s=$t(),c=uo(z.Wall),[u,d]=m.useState((c==null?void 0:c.textureType)??Bo.Default),{Option:f}=Uo,p=(w,x)=>{e(b=>{for(const R of b.elements)if(R.type===z.Wall&&R.id===w&&!R.locked){R.textureType=x;break}})},g=w=>{if(!c)return;const x=ye.getAllConnectedWalls(c);x.length!==0&&e(b=>{for(const R of x)if(!R.locked)for(const H of b.elements)H.id===R.id&&H.type===z.Wall&&(H.textureType=w)})},A=(w,x)=>{e(b=>{for(const R of b.elements)R.type===z.Wall&&R.foundationId===w&&!R.locked&&(R.textureType=x)})},y=w=>{e(x=>{for(const b of x.elements)b.type===z.Wall&&!b.locked&&(b.textureType=w)})},S=(w,x)=>{e(b=>{for(const R of b.elements)R.type===z.Wall&&!R.locked&&w.has(R.id)&&(R.textureType=x)})},C=w=>{if(c){switch(r){case re.AllSelectedObjectsOfThisType:{for(const x of n)if(x.type===z.Wall&&w!==x.textureType&&!x.locked&&M.getState().selectedElementIdSet.has(x.id))return!0;break}case re.AllObjectsOfThisType:{for(const x of n)if(x.type===z.Wall&&w!==x.textureType&&!x.locked)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const x of n)if(x.type===z.Wall&&x.foundationId===c.foundationId&&w!==x.textureType&&!x.locked)return!0;break}case re.AllConnectedObjects:{const x=ye.getAllConnectedWalls(c);for(const b of x)if(w!==b.textureType&&!b.locked)return!0;break}default:{if(w!==(c==null?void 0:c.textureType))return!0;break}}return!1}},P=w=>{if(c&&C(w)){switch(r){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.Wall&&!R.locked&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.textureType??Bo.Default);const b={name:"Set Texture for Selected Walls",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())p(R,H)},redo:()=>{S(b.oldValues,b.newValue)}};o(b),S(x,w),a(i+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.Wall&&!R.locked&&x.set(R.id,R.textureType??Bo.Default);const b={name:"Set Texture for All Walls",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())p(R,H)},redo:()=>{y(b.newValue)}};o(b),y(w),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(c.foundationId){const x=new Map;for(const R of n)R.type===z.Wall&&R.foundationId===c.foundationId&&!R.locked&&x.set(R.id,R.textureType);const b={name:"Set Texture for All Walls Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:c.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())p(R,H)},redo:()=>{b.groupId&&A(b.groupId,b.newValue)}};o(b),A(c.foundationId,w),a(i+1)}break;case re.AllConnectedObjects:if(c){const x=ye.getAllConnectedWalls(c),b=new Map;for(const H of x)b.set(H.id,H.textureType);const R={name:"Set Texture for All Connected Walls",timestamp:Date.now(),oldValues:b,newValue:w,undo:()=>{for(const[H,F]of R.oldValues.entries())p(H,F)},redo:()=>{g(R.newValue)}};o(R),g(w),a(i+1)}break;default:if(c){const x=l(c.id),b=(x==null?void 0:x.textureType)??c.textureType,R={name:"Set Texture of Selected Wall",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:c.id,changedElementType:c.type,undo:()=>{p(R.changedElementId,R.oldValue)},redo:()=>{p(R.changedElementId,R.newValue)}};o(R),p(c.id,w),a(i+1)}}e(x=>{x.actionState.wallTexture=w})}},v=()=>{t(!1)},T=()=>{P(u)};return h.jsx(so,{width:550,title:Y.t("word.Texture",s),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:9,children:h.jsxs(Uo,{style:{width:"150px"},value:u,onChange:d,children:[h.jsxs(f,{value:Bo.NoTexture,children:[h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"12px",width:"32px",height:"20px",border:"1px dashed dimGray"},children:" "}),Y.t("shared.NoTexture",s)]},Bo.NoTexture),h.jsxs(f,{value:Bo.Default,children:[h.jsx("img",{alt:Bo.Default,src:Uye,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.TextureDefault",s)]},Bo.Default),h.jsxs(f,{value:Bo.Texture01,children:[h.jsx("img",{alt:Bo.Texture01,src:Prt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture01",s)]},Bo.Texture01),h.jsxs(f,{value:Bo.Texture02,children:[h.jsx("img",{alt:Bo.Texture02,src:Crt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture02",s)]},Bo.Texture02),h.jsxs(f,{value:Bo.Texture03,children:[h.jsx("img",{alt:Bo.Texture03,src:Rrt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture03",s)]},Bo.Texture03),h.jsxs(f,{value:Bo.Texture04,children:[h.jsx("img",{alt:Bo.Texture04,src:Hrt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture04",s)]},Bo.Texture04),h.jsxs(f,{value:Bo.Texture05,children:[h.jsx("img",{alt:Bo.Texture05,src:Mrt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture05",s)]},Bo.Texture05),h.jsxs(f,{value:Bo.Texture06,children:[h.jsx("img",{alt:Bo.Texture06,src:Irt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture06",s)]},Bo.Texture06),h.jsxs(f,{value:Bo.Texture07,children:[h.jsx("img",{alt:Bo.Texture07,src:zrt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture07",s)]},Bo.Texture07),h.jsxs(f,{value:Bo.Texture08,children:[h.jsx("img",{alt:Bo.Texture08,src:Drt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture08",s)]},Bo.Texture08),h.jsxs(f,{value:Bo.Texture09,children:[h.jsx("img",{alt:Bo.Texture09,src:Ert,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture09",s)]},Bo.Texture09),h.jsxs(f,{value:Bo.Texture10,children:[h.jsx("img",{alt:Bo.Texture10,src:Frt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture10",s)]},Bo.Texture10)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:15,children:h.jsx(Le.Group,{onChange:w=>M.getState().setWallActionScope(w.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("wallMenu.OnlyThisWall",s)}),h.jsx(Le,{style:{width:"100%"},value:re.AllConnectedObjects,children:Y.t("wallMenu.AllConnectedWalls",s)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("wallMenu.AllWallsAboveFoundation",s)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("wallMenu.AllSelectedWalls",s)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("wallMenu.AllWalls",s)})]})})})]})})},b1o=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(g3),i=M(no),a=M(Qn),l=M(Jn),s=uo(z.Wall),c=$t(),[u,d]=ZZ((s==null?void 0:s.color)??"#ffffff"),f=(T,w)=>{e(x=>{for(const b of x.elements)if(b.type===z.Wall&&b.id===T&&!b.locked){b.color=w;break}})},p=T=>{if(!s)return;const w=ye.getAllConnectedWalls(s);w.length!==0&&e(x=>{for(const b of w)if(!b.locked)for(const R of x.elements)R.id===b.id&&R.type===z.Wall&&(R.color=T)})},g=(T,w)=>{e(x=>{for(const b of x.elements)b.type===z.Wall&&b.foundationId===T&&!b.locked&&(b.color=w)})},A=T=>{e(w=>{for(const x of w.elements)x.type===z.Wall&&!x.locked&&(x.color=T)})},y=(T,w)=>{e(x=>{for(const b of x.elements)b.type===z.Wall&&!b.locked&&T.has(b.id)&&(b.color=w)})},S=T=>{if(s){switch(r){case re.AllSelectedObjectsOfThisType:{for(const w of n)if(w.type===z.Wall&&T!==w.color&&!w.locked&&M.getState().selectedElementIdSet.has(w.id))return!0;break}case re.AllObjectsOfThisType:{for(const w of n)if(w.type===z.Wall&&T!==w.color&&!w.locked)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const w of n)if(w.type===z.Wall&&w.foundationId===s.foundationId&&T!==w.color&&!w.locked)return!0;break}case re.AllConnectedObjects:{const w=ye.getAllConnectedWalls(s);for(const x of w)if(T!==x.color&&!x.locked)return!0;break}default:{if(T!==(s==null?void 0:s.color))return!0;break}}return!1}},C=T=>{if(s&&S(T)){switch(r){case re.AllSelectedObjectsOfThisType:{const w=new Map;for(const b of n)b.type===z.Wall&&M.getState().selectedElementIdSet.has(b.id)&&w.set(b.id,b.color??"#ffffff");const x={name:"Set Color for Selected Walls",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())f(b,R)},redo:()=>{y(x.oldValues,x.newValue)}};o(x),y(w,T),a(i+1);break}case re.AllObjectsOfThisType:{const w=new Map;for(const b of n)b.type===z.Wall&&w.set(b.id,b.color??"#ffffff");const x={name:"Set Color for All Walls",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())f(b,R)},redo:()=>{A(x.newValue)}};o(x),A(T),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(s.foundationId){const w=new Map;for(const b of n)b.type===z.Wall&&b.foundationId===s.foundationId&&w.set(b.id,b.color??"#ffffff");const x={name:"Set Color for All Walls Above Foundation",timestamp:Date.now(),oldValues:w,newValue:T,groupId:s.foundationId,undo:()=>{for(const[b,R]of x.oldValues.entries())f(b,R)},redo:()=>{x.groupId&&g(x.groupId,x.newValue)}};o(x),g(s.foundationId,T),a(i+1)}break}case re.AllConnectedObjects:{const w=ye.getAllConnectedWalls(s),x=new Map;for(const R of w)x.set(R.id,R.color??"#ffffff");const b={name:"Set Color for All Connected Walls",timestamp:Date.now(),oldValues:x,newValue:T,undo:()=>{for(const[R,H]of b.oldValues.entries())f(R,H)},redo:()=>{p(b.newValue)}};o(b),p(T),a(i+1);break}default:{if(s){const w=l(s.id),x=(w==null?void 0:w.color)??s.color??"#ffffff",b={name:"Set Color of Selected Wall",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(b.changedElementId,b.oldValue)},redo:()=>{f(b.changedElementId,b.newValue)}};o(b),f(s.id,T),a(i+1)}break}}e(w=>{w.actionState.wallColor=T})}},P=()=>{t(!1)},v=()=>{C(u)};return h.jsx(so,{width:640,title:Y.t("wallMenu.Color",c),onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:u,onChangeComplete:d})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:T=>M.getState().setWallActionScope(T.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("wallMenu.OnlyThisWall",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllConnectedObjects,children:Y.t("wallMenu.AllConnectedWalls",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("wallMenu.AllWallsAboveFoundation",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("wallMenu.AllSelectedWalls",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("wallMenu.AllWalls",c)})]})})})]})})},S1o={Height:{attributeKey:"lz",range:[.1,1e3],step:.1,unit:"word.MeterAbbreviation"},Opacity:{attributeKey:"opacity",range:[0,1],step:.01},StructureSpacing:{attributeKey:"structureSpacing",range:[.1,1e3],step:.1,unit:"word.MeterAbbreviation"},StructureWidth:{attributeKey:"structureWidth",range:[.01,1],step:.1,unit:"word.MeterAbbreviation"},Thickness:{attributeKey:"ly",range:[.1,1],step:.01,unit:"word.MeterAbbreviation"},EavesLength:{attributeKey:"eavesLength",range:[-.1,5],step:.01,unit:"word.MeterAbbreviation"},ParapetHeight:{attributeKey:"parapetHeight",range:[0,5],step:.01,unit:"word.MeterAbbreviation"},CopingsHeight:{attributeKey:"copingsHeight",range:[0,1],step:.01,unit:"word.MeterAbbreviation"},CopingsWidth:{attributeKey:"copingsWidth",range:[0,3],step:.01,unit:"word.MeterAbbreviation"}},T1o=()=>{const t=M.getState().elementsToPaste;if(t&&t.length>0){const e=t[0];if(ye.isLegalOnWall(e.type))return!0}return!1},P1o=t=>{const e=[];if(t.type!==z.Wall)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language},i=M.getState().countAllOffspringsByTypeAtOnce,a=i(n.id,!0),l=i(n.id,!1);return T1o()&&e.push({key:"wall-paste",label:h.jsx(nM,{})}),e.push({key:"wall-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"wall-cut",label:h.jsx(kd,{})}),e.push({key:"wall-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&(a.gotSome()&&e.push({key:"lock-unlock-clear-on-wall",label:h.jsx(an,{children:Y.t("word.Elements",r)}),children:d1o(n,a,l)}),e.push({key:"wall-parapet",label:h.jsx(an,{children:Y.t("wallMenu.Parapet",r)}),children:g1o(n)}),e.push({key:"wall-structure",label:h.jsx(an,{children:Y.t("wallMenu.WallStructure",r)}),children:y1o(n)}),n.wallStructure!==gc.Default&&e.push({key:"wall-opacity",label:h.jsxs(fC,{dataType:eg.Opacity,Dialog:dC,children:[Y.t(`wallMenu.${eg.Opacity}`,r)," ..."]})}),e.push({key:"wall-fill",label:h.jsx(an,{children:Y.t("wallMenu.Fill",r)}),children:A1o(n)},{key:"add-polygon-on-wall",label:h.jsx(l1o,{wall:n})},{key:"wall-thickness",label:h.jsxs(fC,{dataType:eg.Thickness,Dialog:dC,children:[Y.t(`wallMenu.${eg.Thickness}`,r)," ..."]})},{key:"wall-height",label:h.jsxs(fC,{dataType:eg.Height,Dialog:dC,children:[Y.t(`wallMenu.${eg.Height}`,r)," ..."]})},{key:"wall-eaves-length",label:h.jsxs(fC,{dataType:eg.EavesLength,Dialog:dC,children:[Y.t(`wallMenu.${eg.EavesLength}`,r)," ..."]})},{key:"wall-r-value",label:h.jsxs(eo,{Dialog:w1o,children:[Y.t("word.RValue",r)," ..."]})},{key:"wall-heat-capacity",label:h.jsxs(eo,{Dialog:v1o,children:[Y.t("word.VolumetricHeatCapacity",r)," ..."]})},{key:"wall-texture",label:h.jsxs(eo,{Dialog:x1o,children:[Y.t("wallMenu.Texture",r)," ..."]})},{key:"wall-color",label:h.jsxs(eo,{Dialog:b1o,children:[Y.t("wallMenu.Color",r)," ..."]})})),{items:e}},C1o=be.memo(({door:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.id===r&&l.type===z.Door){l.filled=i;break}})},o=r=>{const i=r.target.checked,a={name:"Filled Door",timestamp:Date.now(),checked:i,selectedElementId:t.id,selectedElementType:t.type,undo:()=>{n(t.id,!a.checked)},redo:()=>{n(t.id,a.checked)}};M.getState().addUndoable(a),n(t.id,i),M.getState().set(l=>{l.actionState.doorFilled=i})};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.filled,onChange:o,children:Y.t("doorMenu.Filled",e)})})}),R1o=be.memo(({door:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.id===r&&l.type===z.Door){l.interior=i;break}})},o=r=>{const i=r.target.checked,a={name:"Interior Door",timestamp:Date.now(),checked:i,selectedElementId:t.id,selectedElementType:t.type,undo:()=>{n(t.id,!a.checked)},redo:()=>{n(t.id,a.checked)}};M.getState().addUndoable(a),n(t.id,i),M.getState().set(l=>{l.actionState.doorInterior=i})};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.interior,onChange:o,children:Y.t("doorMenu.Interior",e)})})}),H1o=be.memo(({door:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.id===r&&l.type===z.Door){l.doorType=i;break}})},o=r=>{const i={name:"Select Door Type",timestamp:Date.now(),oldValue:t.doorType,newValue:r.target.value,changedElementId:t.id,changedElementType:t.type,undo:()=>{n(i.changedElementId,i.oldValue)},redo:()=>{n(i.changedElementId,i.newValue)}};M.getState().addUndoable(i),n(t.id,r.target.value),M.getState().set(a=>{a.actionState.doorType=r.target.value})};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Le.Group,{value:t.doorType,onChange:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:Rd.Default,children:Y.t("doorMenu.Default",e)}),h.jsx(Le,{style:{width:"100%"},value:Rd.Arched,children:Y.t("doorMenu.Arched",e)})]})})})}),M1o=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(Ww),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=M(Gr),c=uo(z.Door),u=m.useMemo(()=>{const x=c?c.lx:1,b=c?s(c):null;return b?x*b.lx:x},[c==null?void 0:c.lx]),[d,f]=m.useState(u),p=$t(),g=(x,b)=>{l(R=>{for(const H of R.elements)if(H.id===x&&H.type===z.Door){const F=H,E=s(F);F.lx=E?b/E.lx:b;break}})},A=x=>{for(const[b,R]of x.entries())g(b,R)},y=(x,b)=>{for(const R of x.keys())g(R,b)},S=x=>{if(c){switch(o){case re.AllSelectedObjectsOfThisType:{for(const b of e)if(b.type===z.Door&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)){const R=s(b);if(R&&x!==b.lx*R.lx)return!0}break}case re.AllObjectsOfThisType:{for(const b of e)if(b.type===z.Door&&!b.locked){const R=s(b);if(R&&x!==b.lx*R.lx)return!0}break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const b of e)if(b.type===z.Door&&b.foundationId===c.foundationId&&!b.locked){const R=s(b);if(R&&x!==b.lx*R.lx)return!0}break}case re.OnlyThisSide:{for(const b of e)if(b.type===z.Door&&b.parentId===c.parentId&&!b.locked){const R=s(b);if(R&&x!==b.lx*R.lx)return!0}break}default:{const b=s(c);if(b&&x!==c.lx*b.lx)return!0;break}}return!1}},C=x=>{if(c&&S(x))switch(o){case re.AllSelectedObjectsOfThisType:{const b=new Map;l(H=>{for(const F of H.elements)if(F.type===z.Door&&!F.locked&&M.getState().selectedElementIdSet.has(F.id)){const E=F,N=E?s(E):null;b.set(F.id,E.lx*(N?N.lx:1)),E.lx=N?x/N.lx:x}});const R={name:"Set Width for Selected Doors",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{A(R.oldValues)},redo:()=>{y(R.oldValues,R.newValue)}};n(R),i(r+1);break}case re.AllObjectsOfThisType:{const b=new Map;l(H=>{for(const F of H.elements)if(F.type===z.Door&&!F.locked){const E=F,N=E?s(E):null;b.set(F.id,E.lx*(N?N.lx:1)),E.lx=N?x/N.lx:x}});const R={name:"Set Width for All Doors",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{A(R.oldValues)},redo:()=>{y(R.oldValues,R.newValue)}};n(R),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(c.foundationId){const b=new Map;l(H=>{for(const F of H.elements)if(F.type===z.Door&&F.foundationId===c.foundationId&&!F.locked){const E=F,N=E?s(E):null;b.set(F.id,E.lx*(N?N.lx:1)),E.lx=N?x/N.lx:x}});const R={name:"Set Width for All Doors Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:c.foundationId,undo:()=>{A(R.oldValues)},redo:()=>{y(R.oldValues,R.newValue)}};n(R),i(r+1)}break;case re.OnlyThisSide:if(c.parentId){const b=new Map;l(H=>{for(const F of H.elements)if(F.type===z.Door&&F.parentId===c.parentId&&!F.locked){const E=F,N=E?s(E):null;b.set(F.id,E.lx*(N?N.lx:1)),E.lx=N?x/N.lx:x}});const R={name:"Set Width for All Doors On the Same Wall",timestamp:Date.now(),oldValues:b,newValue:x,groupId:c.parentId,undo:()=>{A(R.oldValues)},redo:()=>{y(R.oldValues,R.newValue)}};n(R),i(r+1)}break;default:if(c){const b=a(c.id),R=c?s(b):null,H=(b.lx??c.lx??.1)*(R?R.lx:1),F={name:"Set Door Width",timestamp:Date.now(),oldValue:H,newValue:x,changedElementId:c.id,changedElementType:c.type,undo:()=>{g(F.changedElementId,F.oldValue)},redo:()=>{g(F.changedElementId,F.newValue)}};n(F),g(c.id,x),i(r+1)}}},P=()=>{t(!1)},v=()=>{C(d)},T=c?s(c):null,w=T&&c?2*T.lx*Math.min(Math.abs(.5-c.cx),Math.abs(-.5-c.cx)):100;return h.jsx(so,{width:550,title:Y.t("word.Width",p),onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:w,style:{width:120},step:.1,precision:2,value:d,formatter:x=>Number(x).toFixed(2),onChange:x=>f(x)}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [0.1, ",w.toFixed(1),"]",Y.t("word.MeterAbbreviation",p)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",p)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:x=>M.getState().setDoorActionScope(x.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("doorMenu.OnlyThisDoor",p)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("doorMenu.AllDoorsOnWall",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("doorMenu.AllDoorsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("doorMenu.AllSelectedDoors",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("doorMenu.AllDoors",p)})]})})})]})})},I1o=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(Ww),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=M(Gr),c=uo(z.Door),u=m.useMemo(()=>{const x=c?c.lz:1,b=c?s(c):null;return b?x*b.lz:x},[c==null?void 0:c.lz]),[d,f]=m.useState(u),p=$t(),g=(x,b)=>{l(R=>{for(const H of R.elements)if(H.id===x&&H.type===z.Door){const F=H,E=s(F);F.lz=E?b/E.lz:b,E&&(F.cz=-(E.lz-b)/(2*E.lz));break}})},A=x=>{for(const[b,R]of x.entries())g(b,R)},y=(x,b)=>{for(const R of x.keys())g(R,b)},S=x=>{if(c){switch(o){case re.AllSelectedObjectsOfThisType:{for(const b of e)if(b.type===z.Door&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)){const R=s(b);if(R&&x!==b.lz*R.lz)return!0}break}case re.AllObjectsOfThisType:{for(const b of e)if(b.type===z.Door&&!b.locked){const R=s(b);if(R&&x!==b.lz*R.lz)return!0}break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const b of e)if(b.type===z.Door&&b.foundationId===c.foundationId&&!b.locked){const R=s(b);if(R&&x!==b.lz*R.lz)return!0}break}case re.OnlyThisSide:{for(const b of e)if(b.type===z.Door&&b.parentId===c.parentId&&!b.locked){const R=s(b);if(R&&x!==b.lz*R.lz)return!0}break}default:{const b=s(c);if(b&&x!==c.lz*b.lz)return!0;break}}return!1}},C=x=>{if(c&&S(x))switch(o){case re.AllSelectedObjectsOfThisType:{const b=new Map;l(H=>{for(const F of H.elements)if(F.type===z.Door&&!F.locked&&M.getState().selectedElementIdSet.has(F.id)){const E=F,N=E?s(E):null;b.set(F.id,E.lz*(N?N.lz:1)),E.lz=N?x/N.lz:x,N&&(E.cz=-(N.lz-x)/(2*N.lz))}});const R={name:"Set Height for Selected Doors",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{A(R.oldValues)},redo:()=>{y(R.oldValues,R.newValue)}};n(R),i(r+1);break}case re.AllObjectsOfThisType:{const b=new Map;l(H=>{for(const F of H.elements)if(F.type===z.Door&&!F.locked){const E=F,N=E?s(E):null;b.set(F.id,E.lz*(N?N.lz:1)),E.lz=N?x/N.lz:x,N&&(E.cz=-(N.lz-x)/(2*N.lz))}});const R={name:"Set Height for All Doors",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{A(R.oldValues)},redo:()=>{y(R.oldValues,R.newValue)}};n(R),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(c.foundationId){const b=new Map;l(H=>{for(const F of H.elements)if(F.type===z.Door&&F.foundationId===c.foundationId&&!F.locked){const E=F,N=E?s(E):null;b.set(F.id,E.lz*(N?N.lz:1)),E.lz=N?x/N.lz:x,N&&(E.cz=-(N.lz-x)/(2*N.lz))}});const R={name:"Set Height for All Doors Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:c.foundationId,undo:()=>{A(R.oldValues)},redo:()=>{y(R.oldValues,R.newValue)}};n(R),i(r+1)}break;case re.OnlyThisSide:if(c.parentId){const b=new Map;l(H=>{for(const F of H.elements)if(F.type===z.Door&&F.parentId===c.parentId&&!F.locked){const E=F,N=E?s(E):null;b.set(F.id,E.lz*(N?N.lz:1)),E.lz=N?x/N.lz:x,N&&(E.cz=-(N.lz-x)/(2*N.lz))}});const R={name:"Set Height for All Doors On the Same Wall",timestamp:Date.now(),oldValues:b,newValue:x,groupId:c.parentId,undo:()=>{A(R.oldValues)},redo:()=>{y(R.oldValues,R.newValue)}};n(R),i(r+1)}break;default:if(c){const b=a(c.id),R=c?s(b):null,H=(b.lz??c.lz??.2)*(R?R.lz:1),F={name:"Set Door Height",timestamp:Date.now(),oldValue:H,newValue:x,changedElementId:c.id,changedElementType:c.type,undo:()=>{g(F.changedElementId,F.oldValue)},redo:()=>{g(F.changedElementId,F.newValue)}};n(F),g(c.id,x),i(r+1)}}},P=()=>{f(u),t(!1)},v=()=>{C(d)},T=c?s(c):null,w=(T==null?void 0:T.lz)??20;return h.jsx(so,{width:550,title:Y.t("word.Height",p),onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:w,style:{width:120},step:.1,precision:2,value:d,formatter:x=>Number(x).toFixed(2),onChange:x=>{x!==null&&f(x)}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [0.1, ",w.toFixed(1),"]",Y.t("word.MeterAbbreviation",p)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",p)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:x=>M.getState().setDoorActionScope(x.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("doorMenu.OnlyThisDoor",p)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("doorMenu.AllDoorsOnWall",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("doorMenu.AllDoorsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("doorMenu.AllSelectedDoors",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("doorMenu.AllDoors",p)})]})})})]})})},z1o=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(Ww),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Door),[c,u]=m.useState((s==null?void 0:s.opacity)??1),d=$t(),f=(P,v)=>{l(T=>{for(const w of T.elements)if(w.id===P){w.opacity=v;break}})},p=P=>{for(const[v,T]of P.entries())f(v,T)},g=(P,v)=>{for(const T of P.keys())f(T,v)},A=P=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const v of e)if(v.type===z.Door&&P!==v.opacity&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of e)if(v.type===z.Door&&P!==v.opacity&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of e)if(v.type===z.Door&&v.foundationId===s.foundationId&&P!==v.opacity&&!v.locked)return!0;break;case re.OnlyThisSide:for(const v of e)if(v.type===z.Door&&v.parentId===s.parentId&&P!==v.opacity&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.opacity))return!0;break}return!1}},y=P=>{if(s&&A(P)){switch(o){case re.AllSelectedObjectsOfThisType:{const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Door&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)){const b=x;v.set(x.id,b.opacity??1),b.opacity=P}});const T={name:"Set Opacity for Selected Doors",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisType:{const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Door&&!x.locked){const b=x;v.set(x.id,b.opacity??1),b.opacity=P}});const T={name:"Set Opacity for All Doors",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Door&&x.foundationId===s.foundationId&&!x.locked){const b=x;v.set(x.id,b.opacity??1),b.opacity=P}});const T={name:"Set Opacity for All Doors Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break;case re.OnlyThisSide:if(s.parentId){const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Door&&x.parentId===s.parentId&&!x.locked){const b=x;v.set(x.id,b.opacity??1),b.opacity=P}});const T={name:"Set Opacity for All Doors On the Same Wall",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.parentId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break;default:if(s){const T=a(s.id).opacity??s.opacity??1,w={name:"Set Opacity of Door",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};n(w),f(s.id,P),i(r+1)}}l(v=>{v.actionState.doorOpacity=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("wallMenu.Opacity",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:c,formatter:P=>Number(P).toFixed(2),onChange:P=>u(P)}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:["kWh/(m³·℃)",h.jsx("br",{}),h.jsx("br",{}),Y.t("word.Range",d),": [0.01, 100]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P=>M.getState().setDoorActionScope(P.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("doorMenu.OnlyThisDoor",d)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("doorMenu.AllDoorsOnWall",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("doorMenu.AllDoorsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("doorMenu.AllSelectedDoors",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("doorMenu.AllDoors",d)})]})})})]})})},D1o=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(Ww),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Door),[c,u]=m.useState((s==null?void 0:s.uValue)??J4),[d,f]=m.useState(ye.toUValueInUS(c)),p=$t(),g=(T,w)=>{l(x=>{for(const b of x.elements)if(b.id===T){b.uValue=w;break}})},A=T=>{for(const[w,x]of T.entries())g(w,x)},y=(T,w)=>{for(const x of T.keys())g(x,w)},S=T=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const w of e)if(w.type===z.Door&&T!==w.uValue&&!w.locked&&M.getState().selectedElementIdSet.has(w.id))return!0;break;case re.AllObjectsOfThisType:for(const w of e)if(w.type===z.Door&&T!==w.uValue&&!w.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const w of e)if(w.type===z.Door&&w.foundationId===s.foundationId&&T!==w.uValue&&!w.locked)return!0;break;case re.OnlyThisSide:for(const w of e)if(w.type===z.Door&&w.parentId===s.parentId&&T!==w.uValue&&!w.locked)return!0;break;default:if(T!==(s==null?void 0:s.uValue))return!0;break}return!1}},C=T=>{if(s&&S(T)){switch(o){case re.AllSelectedObjectsOfThisType:{const w=new Map;l(b=>{for(const R of b.elements)if(R.type===z.Door&&!R.locked){const H=R;w.set(R.id,H.uValue??J4),H.uValue=T}});const x={name:"Set U-Value for Selected Doors",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1);break}case re.AllObjectsOfThisType:{const w=new Map;l(b=>{for(const R of b.elements)if(R.type===z.Door&&!R.locked){const H=R;w.set(R.id,H.uValue??J4),H.uValue=T}});const x={name:"Set U-Value for All Doors",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const w=new Map;l(b=>{for(const R of b.elements)if(R.type===z.Door&&R.foundationId===s.foundationId&&!R.locked){const H=R;w.set(R.id,H.uValue??J4),H.uValue=T}});const x={name:"Set U-Value for All Doors Above Foundation",timestamp:Date.now(),oldValues:w,newValue:T,groupId:s.foundationId,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1)}break;case re.OnlyThisSide:if(s.parentId){const w=new Map;l(b=>{for(const R of b.elements)if(R.type===z.Door&&R.parentId===s.parentId&&!R.locked){const H=R;w.set(R.id,H.uValue??J4),H.uValue=T}});const x={name:"Set U-Value for All Doors On the Same Wall",timestamp:Date.now(),oldValues:w,newValue:T,groupId:s.parentId,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1)}break;default:if(s){const x=a(s.id).uValue??s.uValue??J4,b={name:"Set Door U-Value",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:s.id,changedElementType:s.type,undo:()=>{g(b.changedElementId,b.oldValue)},redo:()=>{g(b.changedElementId,b.newValue)}};n(b),g(s.id,T),i(r+1)}}l(w=>{w.actionState.doorUValue=T})}},P=()=>{t(!1)},v=()=>{C(c)};return h.jsx(so,{width:550,title:`${Y.t("word.UValue",p)+" "}(${Y.t("word.ThermalTransmittance",p)})`,onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:c,formatter:T=>Number(T).toFixed(2),onChange:T=>{T!==null&&(u(T),f(ye.toUValueInUS(T)))}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [0.01, 100]",h.jsx("br",{}),Y.t("word.SIUnit",p),": W/(m²·℃)"]}),h.jsx("br",{}),h.jsx(Sn,{min:ye.toUValueInUS(.01),max:ye.toUValueInUS(100),style:{width:120},step:.01,precision:2,value:d,formatter:T=>Number(T).toFixed(2),onChange:T=>{T!==null&&(f(T),u(ye.toUValueInSI(T)))}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [",ye.toUValueInUS(.01).toFixed(3),", ",ye.toUValueInUS(100).toFixed(1),"]",h.jsx("br",{}),Y.t("word.USUnit",p),": Btu/(h·ft²·℉)"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:T=>M.getState().setDoorActionScope(T.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("doorMenu.OnlyThisDoor",p)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("doorMenu.AllDoorsOnWall",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("doorMenu.AllDoorsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("doorMenu.AllSelectedDoors",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("doorMenu.AllDoors",p)})]})})})]})})},E1o=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(Ww),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Door),[c,u]=m.useState((s==null?void 0:s.volumetricHeatCapacity)??.5),d=$t(),f=(P,v)=>{l(T=>{for(const w of T.elements)if(w.id===P){w.volumetricHeatCapacity=v;break}})},p=P=>{for(const[v,T]of P.entries())f(v,T)},g=(P,v)=>{for(const T of P.keys())f(T,v)},A=P=>{switch(o){case re.AllSelectedObjectsOfThisType:for(const v of e)if(v.type===z.Door&&P!==v.volumetricHeatCapacity&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of e)if(v.type===z.Door&&P!==v.volumetricHeatCapacity&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of e)if(v.type===z.Door&&v.foundationId===(s==null?void 0:s.foundationId)&&P!==v.volumetricHeatCapacity&&!v.locked)return!0;break;case re.OnlyThisSide:for(const v of e)if(v.type===z.Door&&v.parentId===(s==null?void 0:s.parentId)&&P!==v.volumetricHeatCapacity&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.volumetricHeatCapacity))return!0;break}return!1},y=P=>{if(s&&A(P)){switch(o){case re.AllSelectedObjectsOfThisType:{const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Door&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)){const b=x;v.set(x.id,b.volumetricHeatCapacity??.5),b.volumetricHeatCapacity=P}});const T={name:"Set Volumetric Heat Capacity for Selected Doors",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisType:{const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Door&&!x.locked){const b=x;v.set(x.id,b.volumetricHeatCapacity??.5),b.volumetricHeatCapacity=P}});const T={name:"Set Volumetric Heat Capacity for All Doors",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Door&&x.foundationId===s.foundationId&&!x.locked){const b=x;v.set(x.id,b.volumetricHeatCapacity??.5),b.volumetricHeatCapacity=P}});const T={name:"Set Volumetric Heat Capacity for All Doors Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break;case re.OnlyThisSide:if(s.parentId){const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Door&&x.parentId===s.parentId&&!x.locked){const b=x;v.set(x.id,b.volumetricHeatCapacity??.5),b.volumetricHeatCapacity=P}});const T={name:"Set Volumetric Heat Capacity for All Doors On the Same Wall",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.parentId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break;default:if(s){const T=a(s.id).volumetricHeatCapacity??s.volumetricHeatCapacity??.5,w={name:"Set Volumetric Heat Capacity of Door",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};n(w),f(s.id,P),i(r+1)}}l(v=>{v.actionState.doorVolumetricHeatCapacity=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("word.VolumetricHeatCapacity",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:c,formatter:P=>Number(P).toFixed(2),onChange:P=>{P!==null&&u(P)}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:["kWh/(m³·℃)",h.jsx("br",{}),h.jsx("br",{}),Y.t("word.Range",d),": [0.01, 100]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P=>M.getState().setDoorActionScope(P.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("doorMenu.OnlyThisDoor",d)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("doorMenu.AllDoorsOnWall",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("doorMenu.AllDoorsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("doorMenu.AllSelectedDoors",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("doorMenu.AllDoors",d)})]})})})]})})},F1o=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(Ww),r=M(no),i=M(Qn),a=M(pn),l=M(Jn),s=uo(z.Door),[c,u]=m.useState((s==null?void 0:s.textureType)??sr.Default),d=$t(),{Option:f}=Uo,p=(v,T)=>{a(w=>{for(const x of w.elements)if(x.id===v){x.locked||(x.textureType=T);break}})},g=(v,T)=>{for(const w of v.keys())p(w,T)},A=v=>{for(const[T,w]of v.entries())p(T,w)},y=v=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const T of e)if(T.type===z.Door&&v!==T.textureType&&!T.locked&&M.getState().selectedElementIdSet.has(T.id))return!0;break;case re.AllObjectsOfThisType:for(const T of e)if(T.type===z.Door&&v!==T.textureType&&!T.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const T of e)if(T.type===z.Door&&T.foundationId===s.foundationId&&v!==T.textureType&&!T.locked)return!0;break;case re.OnlyThisSide:for(const T of e)if(T.type===z.Door&&T.parentId===s.parentId&&v!==T.textureType&&!T.locked)return!0;break;default:if(v!==(s==null?void 0:s.textureType))return!0;break}return!1}},S=v=>{if(s&&y(v)){switch(o){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of M.getState().elements)x.type===z.Door&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&T.set(x.id,x.textureType??sr.Default);const w={name:"Set Texture for Selected Doors",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{A(w.oldValues)},redo:()=>{g(w.oldValues,w.newValue)}};n(w),g(T,v),i(r+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of M.getState().elements)x.type===z.Door&&!x.locked&&T.set(x.id,x.textureType??sr.Default);const w={name:"Set Texture for All Doors",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{A(w.oldValues)},redo:()=>{g(w.oldValues,w.newValue)}};n(w),g(T,v),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const T=new Map;for(const x of M.getState().elements)x.type===z.Door&&x.foundationId===s.foundationId&&!x.locked&&T.set(x.id,x.textureType);const w={name:"Set Texture for All Doors Above Foundation",timestamp:Date.now(),oldValues:T,newValue:v,groupId:s.foundationId,undo:()=>{A(w.oldValues)},redo:()=>{w.groupId&&g(w.oldValues,w.newValue)}};n(w),g(T,v),i(r+1)}break;case re.OnlyThisSide:if(s.parentId){const T=new Map;for(const x of M.getState().elements)x.type===z.Door&&x.parentId===s.parentId&&!x.locked&&T.set(x.id,x.textureType);const w={name:"Set Texture for All Doors On the Same Wall",timestamp:Date.now(),oldValues:T,newValue:v,groupId:s.parentId,undo:()=>{A(w.oldValues)},redo:()=>{w.groupId&&g(w.oldValues,w.newValue)}};n(w),g(T,v),i(r+1)}break;default:if(s){const T=l(s.id),w=T?T.textureType:s.textureType,x={name:"Set Texture of Selected Door",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};n(x),p(s.id,v),i(r+1)}}a(T=>{T.actionState.doorTexture=v})}},C=()=>{t(!1)},P=()=>{S(c)};return h.jsx(so,{width:550,title:Y.t("word.Texture",d),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:9,children:h.jsxs(Uo,{style:{width:"150px"},value:c,onChange:v=>u(v),children:[h.jsxs(f,{value:sr.NoTexture,children:[h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"12px",width:"32px",height:"20px",border:"1px dashed dimGray"},children:" "}),Y.t("shared.NoTexture",d)]},sr.NoTexture),h.jsxs(f,{value:sr.Default,children:[h.jsx("img",{alt:sr.Default,src:Y$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.TextureDefault",d)]},sr.Default),h.jsxs(f,{value:sr.Texture01,children:[h.jsx("img",{alt:sr.Texture01,src:O$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture01",d)]},sr.Texture01),h.jsxs(f,{value:sr.Texture02,children:[h.jsx("img",{alt:sr.Texture02,src:ude,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture02",d)]},sr.Texture02),h.jsxs(f,{value:sr.Texture03,children:[h.jsx("img",{alt:sr.Texture03,src:V$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture03",d)]},sr.Texture03),h.jsxs(f,{value:sr.Texture04,children:[h.jsx("img",{alt:sr.Texture04,src:_$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture04",d)]},sr.Texture04),h.jsxs(f,{value:sr.Texture05,children:[h.jsx("img",{alt:sr.Texture05,src:G$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture05",d)]},sr.Texture05),h.jsxs(f,{value:sr.Texture06,children:[h.jsx("img",{alt:sr.Texture06,src:X$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture06",d)]},sr.Texture06),h.jsxs(f,{value:sr.Texture07,children:[h.jsx("img",{alt:sr.Texture07,src:J$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture07",d)]},sr.Texture07),h.jsxs(f,{value:sr.Texture08,children:[h.jsx("img",{alt:sr.Texture08,src:K$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture08",d)]},sr.Texture08),h.jsxs(f,{value:sr.Texture09,children:[h.jsx("img",{alt:sr.Texture09,src:q$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture09",d)]},sr.Texture09),h.jsxs(f,{value:sr.Texture10,children:[h.jsx("img",{alt:sr.Texture10,src:$$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture10",d)]},sr.Texture10),h.jsxs(f,{value:sr.Texture11,children:[h.jsx("img",{alt:sr.Texture11,src:Q$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture11",d)]},sr.Texture11),h.jsxs(f,{value:sr.Texture12,children:[h.jsx("img",{alt:sr.Texture12,src:Z$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture12",d)]},sr.Texture12),h.jsxs(f,{value:sr.Texture13,children:[h.jsx("img",{alt:sr.Texture13,src:eQe,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture13",d)]},sr.Texture13),h.jsxs(f,{value:sr.Texture14,children:[h.jsx("img",{alt:sr.Texture14,src:tQe,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture14",d)]},sr.Texture14),h.jsxs(f,{value:sr.Texture15,children:[h.jsx("img",{alt:sr.Texture15,src:nQe,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture15",d)]},sr.Texture15),h.jsxs(f,{value:sr.Texture16,children:[h.jsx("img",{alt:sr.Texture16,src:oQe,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture16",d)]},sr.Texture16),h.jsxs(f,{value:sr.Texture17,children:[h.jsx("img",{alt:sr.Texture17,src:rQe,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture17",d)]},sr.Texture17)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:15,children:h.jsx(Le.Group,{onChange:v=>M.getState().setDoorActionScope(v.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("doorMenu.OnlyThisDoor",d)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("doorMenu.AllDoorsOnWall",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("doorMenu.AllDoorsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("doorMenu.AllSelectedDoors",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("doorMenu.AllDoors",d)})]})})})]})})},k1o=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(Ww),i=M(no),a=M(Qn),l=M(Jn),s=uo(z.Door),[c,u]=m.useState((s==null?void 0:s.color)??"#ffffff"),d=$t(),f=(P,v)=>{e(T=>{for(const w of T.elements)if(w.id===P){w.locked||(w.color=v);break}})},p=(P,v)=>{for(const T of P.keys())f(T,v)},g=P=>{for(const[v,T]of P.entries())f(v,T)},A=P=>{switch(r){case re.AllSelectedObjectsOfThisType:for(const v of n)if(v.type===z.Door&&P!==v.color&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of n)if(v.type===z.Door&&P!==v.color&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of n)if(v.type===z.Door&&v.foundationId===(s==null?void 0:s.foundationId)&&P!==v.color&&!v.locked)return!0;break;case re.OnlyThisSide:for(const v of n)if(v.type===z.Door&&v.parentId===(s==null?void 0:s.parentId)&&P!==v.color&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.color))return!0;break}return!1},y=P=>{if(s&&A(P)){switch(r){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of M.getState().elements)w.type===z.Door&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)&&v.set(w.id,w.color??"#ffffff");const T={name:"Set Color for Selected Doors",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of M.getState().elements)w.type===z.Door&&!w.locked&&v.set(w.id,w.color??"#ffffff");const T={name:"Set Color for All Doors",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;for(const w of M.getState().elements)w.type===z.Door&&w.foundationId===s.foundationId&&!s.locked&&v.set(w.id,w.color??"#ffffff");const T={name:"Set Color for All Doors Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{g(T.oldValues)},redo:()=>{T.groupId&&p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1)}break;case re.OnlyThisSide:if(s.parentId){const v=new Map;for(const w of M.getState().elements)w.type===z.Door&&w.parentId===s.parentId&&!s.locked&&v.set(w.id,w.color??"#ffffff");const T={name:"Set Color for All Doors On the Same Wall",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.parentId,undo:()=>{g(T.oldValues)},redo:()=>{T.groupId&&p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1)}break;default:if(s){const v=l(s.id),T=(v?v.color:s.color)??"#ffffff",w={name:"Set Color of Selected Door",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};o(w),f(s.id,P),a(i+1)}}e(v=>{v.actionState.doorColor=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:640,title:Y.t("word.Color",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:c,onChangeComplete:P=>{u(P.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:P=>M.getState().setDoorActionScope(P.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("doorMenu.OnlyThisDoor",d)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("doorMenu.AllDoorsOnWall",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("doorMenu.AllDoorsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("doorMenu.AllSelectedDoors",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("doorMenu.AllDoors",d)})]})})})]})})},L1o=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(Ww),i=M(no),a=M(Qn),l=M(Jn),s=uo(z.Door),[c,u]=m.useState((s==null?void 0:s.frameColor)??"#ffffff"),d=$t(),f=(P,v)=>{e(T=>{for(const w of T.elements)if(w.id===P){!w.locked&&w.type===z.Door&&(w.frameColor=v);break}})},p=(P,v)=>{for(const T of P.keys())f(T,v)},g=P=>{for(const[v,T]of P.entries())f(v,T)},A=P=>{switch(r){case re.AllSelectedObjectsOfThisType:for(const v of n)if(v.type===z.Door&&!v.locked&&M.getState().selectedElementIdSet.has(v.id)&&P!==v.frameColor)return!0;break;case re.AllObjectsOfThisType:for(const v of n)if(v.type===z.Door&&!v.locked&&P!==v.frameColor)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of n)if(v.type===z.Door&&v.foundationId===(s==null?void 0:s.foundationId)&&!v.locked&&P!==v.frameColor)return!0;break;case re.OnlyThisSide:for(const v of n)if(v.type===z.Door&&v.parentId===(s==null?void 0:s.parentId)&&!v.locked&&P!==v.frameColor)return!0;break;default:if(P!==(s==null?void 0:s.frameColor))return!0;break}return!1},y=P=>{if(s&&A(P)){switch(r){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of M.getState().elements)w.type===z.Door&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)&&v.set(w.id,w.frameColor??"#ffffff");const T={name:"Set Color for Selected Doors",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of M.getState().elements)w.type===z.Door&&!w.locked&&v.set(w.id,w.frameColor??"#ffffff");const T={name:"Set Color for All Doors",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;for(const w of M.getState().elements)w.type===z.Door&&w.foundationId===s.foundationId&&!s.locked&&v.set(w.id,w.frameColor??"#ffffff");const T={name:"Set Color for All Doors Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{g(T.oldValues)},redo:()=>{T.groupId&&p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1)}break;case re.OnlyThisSide:if(s.parentId){const v=new Map;for(const w of M.getState().elements)w.type===z.Door&&w.parentId===s.parentId&&!s.locked&&v.set(w.id,w.frameColor??"#ffffff");const T={name:"Set Color for All Doors On the Same Wall",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.parentId,undo:()=>{g(T.oldValues)},redo:()=>{T.groupId&&p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1)}break;default:if(s){const v=l(s.id),T=(v?v.frameColor:s.frameColor)??"#ffffff",w={name:"Set Color of Selected Door",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};o(w),f(s.id,P),a(i+1)}}e(v=>{v.actionState.doorColor=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:640,title:Y.t("doorMenu.FrameColor",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:c??(s==null?void 0:s.frameColor)??"#ffffff",onChangeComplete:P=>{u(P.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:P=>M.getState().setDoorActionScope(P.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("doorMenu.OnlyThisDoor",d)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("doorMenu.AllDoorsOnWall",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("doorMenu.AllDoorsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("doorMenu.AllSelectedDoors",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("doorMenu.AllDoors",d)})]})})})]})})},W1o=t=>{const e=[];if(t.type!==z.Door)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language};return e.push({key:"door-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"door-cut",label:h.jsx(kd,{})}),e.push({key:"door-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&(e.push({key:"door-filled",label:h.jsx(C1o,{door:n})},{key:"door-interior",label:h.jsx(R1o,{door:n})}),e.push({key:"door-type-submenu",label:h.jsx(an,{children:Y.t("doorMenu.DoorType",r)}),children:[{key:"door-type-radio-group",label:h.jsx(H1o,{door:n}),style:{backgroundColor:"white"}}]},{key:"door-width",label:h.jsxs(eo,{Dialog:M1o,children:[Y.t("word.Width",r)," ..."]})},{key:"door-height",label:h.jsxs(eo,{Dialog:I1o,children:[Y.t("word.Height",r)," ..."]})}),n.filled&&(e.push({key:"door-u-value",label:h.jsxs(eo,{Dialog:D1o,children:[Y.t("word.UValue",r)," ..."]})},{key:"door-heat-capacity",label:h.jsxs(eo,{Dialog:E1o,children:[Y.t("word.VolumetricHeatCapacity",r)," ..."]})},{key:"door-texture",label:h.jsxs(eo,{Dialog:F1o,children:[Y.t("word.Texture",r)," ..."]})},{key:"door-color",label:h.jsxs(eo,{Dialog:k1o,children:[Y.t("word.Color",r)," ..."]})},{key:"door-frame-color",label:h.jsxs(eo,{Dialog:L1o,children:[Y.t("doorMenu.FrameColor",r)," ..."]})}),(n.textureType===sr.Default||n.textureType===sr.NoTexture)&&e.push({key:"door-opacity",label:h.jsxs(eo,{Dialog:z1o,children:[Y.t("wallMenu.Opacity",r)," ..."]})}))),{items:e}},N1o=({windowModel:t,dataType:e,attributeKey:n,range:o,step:r,unit:i,note:a,digit:l,setDialogVisible:s})=>{const c=M(Kn),u=M(En),d=M(MW),f=M(no),p=M(Qn),g=M(pn),A=M(Gr),y=m.useMemo(()=>{const W=t[n],k=A(t);if(k&&t.parentType!==z.Roof){if(n==="lx")return W*k.lx;if(n==="lz")return W*k.lz}return n==="sillWidth"&&W===void 0?.2:W},[n,t]),[S,C]=m.useState(y),P=$t(),v=(W,k,D)=>{const L=A(W);L&&(k==="lx"||k==="lz")?W.parentType===z.Roof?W[k]=D:W[k]=D/L[k]:W[k]=D},T=(W,k)=>{g(D=>{for(const L of D.elements)if(L.id===W){!L.locked&&L.type===z.Window&&v(L,n,k);break}})},w=(W,k)=>{W&&g(D=>{for(const L of D.elements)!L.locked&&L.type===z.Window&&L.parentId===W&&v(L,n,k)})},x=(W,k)=>{W&&g(D=>{for(const L of D.elements)!L.locked&&L.type===z.Window&&L.foundationId===W&&v(L,n,k)})},b=W=>{g(k=>{for(const D of k.elements)!D.locked&&D.type===z.Window&&v(D,n,W)})},R=(W,k)=>{g(D=>{for(const L of D.elements)!L.locked&&L.type===z.Window&&W.has(L.id)&&v(L,n,k)})},H=W=>{for(const[k,D]of W.entries())T(k,D)},F=W=>{switch(d){case re.AllSelectedObjectsOfThisType:{for(const k of c)if(k.type===z.Window&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)){const D=k,L=A(D);if(L&&D.parentType!==z.Roof){if(n==="lx"){if(W!==D[n]*L.lx)return!0}else if(n==="lz"){if(W!==D[n]*L.lz)return!0}else if(W!==D[n])return!0}else if(W!==D[n])return!0}break}case re.AllObjectsOfThisType:{for(const k of c)if(k.type===z.Window&&!k.locked){const D=k,L=A(D);if(L&&D.parentType!==z.Roof){if(n==="lx"){if(W!==D[n]*L.lx)return!0}else if(n==="lz"){if(W!==D[n]*L.lz)return!0}else if(W!==D[n])return!0}else if(W!==D[n])return!0}break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const k of c)if(k.type===z.Window&&k.foundationId===t.foundationId&&!k.locked){const D=k,L=A(D);if(L&&D.parentType!==z.Roof){if(n==="lx"){if(W!==D[n]*L.lx)return!0}else if(n==="lz"){if(W!==D[n]*L.lz)return!0}else if(W!==D[n])return!0}else if(W!==D[n])return!0}break}case re.OnlyThisSide:{for(const k of c)if(k.type===z.Window&&k.parentId===t.parentId&&!k.locked){const D=k,L=A(D);if(L&&D.parentType!==z.Roof){if(n==="lx"){if(W!==D[n]*L.lx)return!0}else if(n==="lz"){if(W!==D[n]*L.lz)return!0}else if(W!==D[n])return!0}else if(W!==D[n])return!0}break}default:{const k=A(t);if(k&&t.parentType!==z.Roof){if(n==="lx"){if(W!==t[n]*k.lx)return!0}else if(n==="lz"){if(W!==t[n]*k.lz)return!0}else if(W!==t[n])return!0}else if(W!==t[n])return!0;break}}return!1},E=W=>{if(t&&F(W)){switch(d){case re.AllSelectedObjectsOfThisType:{const k=new Map;for(const L of c)if(L.type===z.Window&&!L.locked&&M.getState().selectedElementIdSet.has(L.id)){const j=L,B=A(j);let O=j[n];B&&j.parentType!==z.Roof&&(n==="lx"?O*=B.lx:n==="lz"&&(O*=B.lz)),k.set(L.id,O)}const D={name:`Set ${e} for Selected Windows`,timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{H(D.oldValues)},redo:()=>{R(D.oldValues,D.newValue)}};u(D),R(k,W),p(f+1);break}case re.AllObjectsOfThisType:{const k=new Map;for(const L of c)if(L.type===z.Window&&!L.locked){const j=L,B=A(j);let O=j[n];B&&j.parentType!==z.Roof&&(n==="lx"?O*=B.lx:n==="lz"&&(O*=B.lz)),k.set(L.id,O)}const D={name:`Set ${e} for All Windows`,timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{H(D.oldValues)},redo:()=>{b(D.newValue)}};u(D),b(W),p(f+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(t.foundationId){const k=new Map;for(const L of c)if(L.type===z.Window&&L.foundationId===t.foundationId&&!L.locked){const j=L,B=A(j);let O=j[n];B&&j.parentType!==z.Roof&&(n==="lx"?O*=B.lx:n==="lz"&&(O*=B.lz)),k.set(L.id,O)}const D={name:`Set ${e} for All Windows Above Foundation`,timestamp:Date.now(),oldValues:k,newValue:W,groupId:t.foundationId,undo:()=>{H(D.oldValues)},redo:()=>{x(t.foundationId,D.newValue)}};u(D),x(t.foundationId,W),p(f+1)}break;case re.OnlyThisSide:if(t.parentId){const k=new Map;for(const L of c)if(L.type===z.Window&&L.parentId===t.parentId&&!L.locked){const j=L,B=A(j);let O=j[n];B&&j.parentType!==z.Roof&&(n==="lx"?O*=B.lx:n==="lz"&&(O*=B.lz)),k.set(L.id,O)}const D={name:`Set ${e} for All Windows On the Same Parent`,timestamp:Date.now(),oldValues:k,newValue:W,groupId:t.parentId,undo:()=>{H(D.oldValues)},redo:()=>{w(t.parentId,D.newValue)}};u(D),w(t.parentId,W),p(f+1)}break;default:if(t){let k=t[n];const D=A(t);D&&t.parentType!==z.Roof&&(n==="lx"?k*=D.lx:n==="lz"&&(k*=D.lz));const L={name:`Set Window ${e}`,timestamp:Date.now(),oldValue:k,newValue:W,changedElementId:t.id,changedElementType:t.type,undo:()=>{T(L.changedElementId,L.oldValue)},redo:()=>{T(L.changedElementId,L.newValue)}};u(L),T(t.id,W),p(f+1)}}g(k=>{switch(e){case Qh.Width:k.actionState.windowWidth=W;break;case Qh.Height:k.actionState.windowHeight=W;break;case Qh.Opacity:k.actionState.windowOpacity=W;break;case Qh.FrameWidth:k.actionState.windowFrameWidth=W;break;case Qh.SillWidth:k.actionState.windowSillWidth=W;break;case Qh.HorizontalMullionSpacing:k.actionState.windowHorizontalMullionSpacing=W;break;case Qh.VerticalMullionSpacing:k.actionState.windowVerticalMullionSpacing=W;break;case Qh.MullionWidth:k.actionState.windowMullionWidth=W;break}})}},N=()=>{s(!1)},U=()=>{E(S)};return h.jsx(so,{width:550,title:Y.t(`windowMenu.${e}`,P),onApply:U,onClose:N,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:o[0],max:o[1],style:{width:120},step:r,precision:2,value:S,formatter:W=>Number(W).toFixed(2),onChange:W=>{W!==null&&C(W)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",P),": [",o[0].toFixed(o[0]===0?0:l??0),","," ",o[1].toFixed(l??0),"] ",i," ",h.jsx("br",{}),h.jsx("br",{})," ",a]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:i}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:W=>M.getState().setWindowActionScope(W.target.value),value:d,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windowMenu.OnlyThisWindow",P)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("windowMenu.AllWindowsOnSurface",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windowMenu.AllWindowsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windowMenu.AllSelectedWindows",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windowMenu.AllWindows",P)})]})})})]})})},U1o=({window:t,dataType:e,attributeKey:n,setDialogVisible:o})=>{const r=M(Kn),i=M(pn),a=M(En),l=M(MW),s=M(no),c=M(Qn),[u,d]=ZZ(t[n]??"#ffffff"),f=$t(),p=(x,b)=>{i(R=>{for(const H of R.elements)if(H.id===x){!H.locked&&H.type===z.Window&&(H[n]=b);break}})},g=(x,b)=>{i(R=>{for(const H of R.elements)!H.locked&&H.type===z.Window&&H.parentId===x&&(H[n]=b)})},A=(x,b)=>{i(R=>{for(const H of R.elements)!H.locked&&H.type===z.Window&&H.foundationId===x&&(H[n]=b)})},y=x=>{i(b=>{for(const R of b.elements)!R.locked&&R.type===z.Window&&(R[n]=x)})},S=(x,b)=>{i(R=>{for(const H of R.elements)!H.locked&&H.type===z.Window&&x.has(H.id)&&(H[n]=b)})},C=x=>{for(const[b,R]of x.entries())p(b,R)},P=x=>{switch(l){case re.AllSelectedObjectsOfThisType:for(const b of r)if(b.type===z.Window&&x!==b[n]&&!b.locked&&M.getState().selectedElementIdSet.has(b.id))return!0;break;case re.AllObjectsOfThisType:for(const b of r)if(b.type===z.Window&&x!==b[n]&&!b.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const b of r)if(b.type===z.Window&&b.foundationId===t.foundationId&&x!==b[n]&&!b.locked)return!0;break;case re.OnlyThisSide:for(const b of r)if(b.type===z.Window&&b.parentId===t.parentId&&x!==b[n]&&!b.locked)return!0;break;default:if(x!==t[n])return!0;break}return!1},v=x=>{if(t&&P(x)){switch(l){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of r)H.type===z.Window&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&b.set(H.id,H[n]);const R={name:`Set ${e} for Selected Windows`,timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{C(R.oldValues)},redo:()=>{S(R.oldValues,R.newValue)}};a(R),S(b,x),c(s+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of r)H.type===z.Window&&!H.locked&&b.set(H.id,H[n]);const R={name:`Set ${e} for All Windows`,timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{C(R.oldValues)},redo:()=>{y(R.newValue)}};a(R),y(x),c(s+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(t.foundationId){const b=new Map;for(const H of r)H.type===z.Window&&H.foundationId===t.foundationId&&!t.locked&&b.set(H.id,H[n]);const R={name:`Set ${e} for All Windows Above Foundation`,timestamp:Date.now(),oldValues:b,newValue:x,groupId:t.foundationId,undo:()=>{C(R.oldValues)},redo:()=>{A(R.groupId,R.newValue)}};a(R),A(t.foundationId,x),c(s+1)}break}case re.OnlyThisSide:{if(t.parentId){const b=new Map;for(const H of r)H.type===z.Window&&H.parentId===t.parentId&&!H.locked&&b.set(H.id,H[n]);const R={name:`Set ${e} for All Windows On the Same Wall`,timestamp:Date.now(),oldValues:b,newValue:x,groupId:t.parentId,undo:()=>{C(R.oldValues)},redo:()=>{g(t.parentId,R.newValue)}};a(R),g(t.parentId,x),c(s+1)}break}default:{if(t){const b=t[n],R={name:`Set ${e} of Selected window`,timestamp:Date.now(),oldValue:b,newValue:x,changedElementId:t.id,changedElementType:t.type,undo:()=>{p(R.changedElementId,R.oldValue)},redo:()=>{p(R.changedElementId,R.newValue)}};a(R),p(t.id,x),c(s+1)}break}}i(b=>{switch(e){case Qh.Tint:b.actionState.windowTint=x;break;case Qh.MullionColor:b.actionState.windowMullionColor=x;break;case Qh.Color:b.actionState.windowColor=x;break}})}},T=()=>{o()},w=()=>{t[n]!==u&&v(u)};return h.jsx(so,{width:640,title:Y.t(`windowMenu.${e}`,f),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:u??"#73D8FF",onChangeComplete:d})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:x=>M.getState().setWindowActionScope(x.target.value),value:l,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windowMenu.OnlyThisWindow",f)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("windowMenu.AllWindowsOnSurface",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windowMenu.AllWindowsAboveFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windowMenu.AllSelectedWindows",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windowMenu.AllWindows",f)})]})})})]})})},j1o=({window:t,dataType:e,attributeKey:n,setDialogVisible:o})=>{const r=M(Kn),i=M(pn),a=M(En),l=M(MW),s=M(no),c=M(Qn),[u,d]=m.useState(t[n]),f=$t(),p=(x,b)=>{i(R=>{for(const H of R.elements)if(H.id===x&&!H.locked&&H.type===z.Window){H[n]=b;break}})},g=(x,b)=>{i(R=>{for(const H of R.elements)!H.locked&&H.type===z.Window&&H.parentId===x&&(H[n]=b)})},A=(x,b)=>{i(R=>{for(const H of R.elements)!H.locked&&H.type===z.Window&&H.foundationId===x&&(H[n]=b)})},y=x=>{i(b=>{for(const R of b.elements)!R.locked&&R.type===z.Window&&(R[n]=x)})},S=(x,b)=>{i(R=>{for(const H of R.elements)!H.locked&&H.type===z.Window&&x.has(H.id)&&(H[n]=b)})},C=x=>{for(const[b,R]of x.entries())p(b,R)},P=x=>{switch(l){case re.AllSelectedObjectsOfThisType:for(const b of r)if(b.type===z.Window&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&b[n]!==x)return!0;break;case re.AllObjectsOfThisType:for(const b of r)if(b.type===z.Window&&!b.locked&&b[n]!==x)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const b of r)if(b.type===z.Window&&b.foundationId===t.foundationId&&!b.locked&&b[n]!==x)return!0;break;case re.OnlyThisSide:for(const b of r)if(b.type===z.Window&&b.parentId===t.parentId&&!b.locked&&b[n]!==x)return!0;break;default:if(t[n]!==x)return!0;break}return!1},v=x=>{if(t&&P(x))switch(l){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of r)H.type===z.Window&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&b.set(H.id,H[n]);const R={name:`Set ${e} for Selected Windows`,timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{C(R.oldValues)},redo:()=>{S(R.oldValues,R.newValue)}};a(R),S(b,x),c(s+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of r)H.type===z.Window&&!H.locked&&b.set(H.id,H[n]);const R={name:`Set ${e} for All Windows`,timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{C(R.oldValues)},redo:()=>{y(R.newValue)}};a(R),y(x),c(s+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(t.foundationId){const b=new Map;for(const H of r)H.type===z.Window&&H.foundationId===t.foundationId&&!t.locked&&b.set(H.id,H[n]);const R={name:`Set ${e} for All Windows Above Foundation`,timestamp:Date.now(),oldValues:b,newValue:x,groupId:t.foundationId,undo:()=>{C(R.oldValues)},redo:()=>{A(R.groupId,R.newValue)}};a(R),A(t.foundationId,x),c(s+1)}break}case re.OnlyThisSide:{if(t.parentId){const b=new Map;for(const H of r)H.type===z.Window&&H.parentId===t.parentId&&!H.locked&&b.set(H.id,H[n]);const R={name:`Set ${e} for All Windows On the Same Wall`,timestamp:Date.now(),oldValues:b,newValue:x,groupId:t.parentId,undo:()=>{C(R.oldValues)},redo:()=>{g(t.parentId,R.newValue)}};a(R),g(t.parentId,x),c(s+1)}break}default:{if(t){const b=t[n],R={name:`Set ${e} of Selected window`,timestamp:Date.now(),oldValue:b,newValue:x,changedElementId:t.id,changedElementType:t.type,undo:()=>{p(R.changedElementId,R.oldValue)},redo:()=>{p(R.changedElementId,R.newValue)}};a(R),p(t.id,x),c(s+1)}break}}},T=()=>{o()},w=()=>{t[n]!==u&&v(u)};return h.jsx(so,{width:500,title:Y.t(`windowMenu.${e}`,f),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:4,children:h.jsx(vc,{checked:u,onChange:x=>{d(x)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:20,children:h.jsx(Le.Group,{onChange:x=>M.getState().setWindowActionScope(x.target.value),value:l,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windowMenu.OnlyThisWindow",f)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("windowMenu.AllWindowsOnSurface",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windowMenu.AllWindowsAboveFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windowMenu.AllSelectedWindows",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windowMenu.AllWindows",f)})]})})})]})})},{Option:B1o}=Uo,Y1o=({window:t,dataType:e,attributeKey:n,options:o,optionsText:r,setDialogVisible:i})=>{const a=M(Kn),l=M(pn),s=M(En),c=M(MW),u=M(no),d=M(Qn),[f,p]=m.useState(t[n]),g=$t(),A=(R,H)=>{l(F=>{for(const E of F.elements)if(E.id===R){!E.locked&&E.type===z.Window&&(E[n]=H);break}})},y=(R,H)=>{l(F=>{for(const E of F.elements)!E.locked&&E.type===z.Window&&E.parentId===R&&(E[n]=H)})},S=(R,H)=>{l(F=>{for(const E of F.elements)!E.locked&&E.type===z.Window&&E.foundationId===R&&(E[n]=H)})},C=R=>{l(H=>{for(const F of H.elements)!F.locked&&F.type===z.Window&&(F[n]=R)})},P=(R,H)=>{l(F=>{for(const E of F.elements)!E.locked&&E.type===z.Window&&R.has(E.id)&&(E[n]=H)})},v=R=>{for(const[H,F]of R.entries())A(H,F)},T=R=>{if(t){switch(c){case re.AllSelectedObjectsOfThisType:for(const H of a)if(H.type===z.Window&&R!==H[n]&&!H.locked&&M.getState().selectedElementIdSet.has(H.id))return!0;break;case re.AllObjectsOfThisType:for(const H of a)if(H.type===z.Window&&R!==H[n]&&!H.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const H of a)if(H.type===z.Window&&H.foundationId===t.foundationId&&R!==H[n]&&!H.locked)return!0;break;case re.OnlyThisSide:for(const H of a)if(H.type===z.Window&&H.parentId===t.parentId&&R!==H[n]&&!H.locked)return!0;break;default:if(R!==t[n])return!0;break}return!1}},w=R=>{if(t&&T(R)){switch(c){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of a)E.type===z.Window&&!E.locked&&M.getState().selectedElementIdSet.has(E.id)&&H.set(E.id,E[n]);const F={name:`Set ${e} for Selected Windows`,timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{v(F.oldValues)},redo:()=>{P(F.oldValues,F.newValue)}};s(F),P(H,R),d(u+1);break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of a)E.type===z.Window&&!E.locked&&H.set(E.id,E[n]);const F={name:`Set ${e} for All Windows`,timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{v(F.oldValues)},redo:()=>{C(F.newValue)}};s(F),C(R),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(t.foundationId){const H=new Map;for(const E of a)E.type===z.Window&&E.foundationId===t.foundationId&&!t.locked&&H.set(E.id,E[n]);const F={name:`Set ${e} for All Windows Above Foundation`,timestamp:Date.now(),oldValues:H,newValue:R,groupId:t.foundationId,undo:()=>{v(F.oldValues)},redo:()=>{S(F.groupId,F.newValue)}};s(F),S(t.foundationId,R),d(u+1)}break}case re.OnlyThisSide:{if(t.parentId){const H=new Map;for(const E of a)E.type===z.Window&&E.parentId===t.parentId&&!E.locked&&H.set(E.id,E[n]);const F={name:`Set ${e} for All Windows On the Same Wall`,timestamp:Date.now(),oldValues:H,newValue:R,groupId:t.parentId,undo:()=>{v(F.oldValues)},redo:()=>{y(t.parentId,F.newValue)}};s(F),y(t.parentId,R),d(u+1)}break}default:{if(t){const H=t[n],F={name:`Set ${e} of Selected window`,timestamp:Date.now(),oldValue:H,newValue:R,changedElementId:t.id,changedElementType:t.type,undo:()=>{A(F.changedElementId,F.oldValue)},redo:()=>{A(F.changedElementId,F.newValue)}};s(F),A(t.id,R),d(u+1)}break}}l(H=>{switch(e){case Qh.Tint:H.actionState.windowTint=R;break;case Qh.MullionColor:H.actionState.windowMullionColor=R;break;case Qh.Color:H.actionState.windowColor=R;break}})}},x=()=>{i()},b=()=>{w(f)};return h.jsx(so,{width:560,title:Y.t(`windowMenu.${e}`,g),onApply:b,onClose:x,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:8,children:h.jsx(Uo,{style:{width:"150px"},value:f,onChange:R=>p(R),children:o.map((R,H)=>h.jsx(B1o,{value:R,children:r[H]},R))})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:R=>M.getState().setWindowActionScope(R.target.value),value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windowMenu.OnlyThisWindow",g)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("windowMenu.AllWindowsOnSurface",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windowMenu.AllWindowsAboveFoundation",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windowMenu.AllSelectedWindows",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windowMenu.AllWindows",g)})]})})})]})})};var wg=(t=>(t.Opacity="Opacity",t.Width="Width",t.Height="Height",t.Setback="Setback",t.HorizontalMullionSpacing="HorizontalMullionSpacing",t.VerticalMullionSpacing="VerticalMullionSpacing",t.MullionWidth="MullionWidth",t.SillWidth="SillWidth",t.FrameWidth="FrameWidth",t.ShutterWidth="ShutterWidth",t))(wg||{}),tU=(t=>(t.ShutterColor="ShutterColor",t.Color="Color",t.MullionColor="MullionColor",t.Tint="Tint",t))(tU||{}),$R=(t=>(t.Frame="Frame",t.LeftShutter="LeftShutter",t.RightShutter="RightShutter",t.HorizontalMullion="HorizontalMullion",t.VerticalMullion="VerticalMullion",t))($R||{}),krt=(t=>(t.WindowType="WindowType",t))(krt||{});const A9=({dataType:t,noPadding:e})=>{const n=$t(),[o,r]=m.useState(!1),i=uo(z.Window),a=i?M.getState().getParent(i):null,l=()=>{M.getState().setApplyCount(0),r(!0)},s=Z1o[t];return t===wg.Width?s.range[1]=a&&i&&i.parentType!==z.Roof?2*a.lx*Math.min(Math.abs(.5-i.cx),Math.abs(-.5-i.cx)):100:t===wg.Height&&(s.range[1]=a&&i&&i.parentType!==z.Roof?2*a.lz*Math.min(Math.abs(.5-i.cz),Math.abs(-.5-i.cz)):100),h.jsxs(h.Fragment,{children:[h.jsxs(an,{noPadding:e,onClick:l,children:[Y.t(`windowMenu.${t}`,n)," ..."]}),o&&s&&i&&h.jsx(N1o,{windowModel:i,dataType:t,attributeKey:s.attributeKey,range:s.range,step:s.step,unit:s.unit?Y.t(s.unit,n):void 0,note:s.note?Y.t(s.note,n):void 0,digit:s.digit??0,setDialogVisible:r})]})},yee=({dataType:t,noPadding:e})=>{const[n,o]=m.useState(!1),r=$t(),i=uo(z.Window),a=()=>{M.getState().setApplyCount(0),o(!0)},l=q1o[t];return h.jsxs(h.Fragment,{children:[h.jsxs(an,{noPadding:e,onClick:a,children:[Y.t(`windowMenu.${t}`,r)," ..."]}),n&&l&&i&&h.jsx(U1o,{window:i,dataType:t,attributeKey:l.attributeKey,setDialogVisible:()=>o(!1)})]})},Yk=({dataType:t,noPadding:e})=>{const[n,o]=m.useState(!1),r=$t(),i=uo(z.Window),a=()=>{M.getState().setApplyCount(0),o(!0)},l=$1o[t];return h.jsxs(h.Fragment,{children:[h.jsxs(an,{noPadding:e,onClick:a,children:[Y.t(`windowMenu.${t}`,r)," ..."]}),n&&l&&i&&h.jsx(j1o,{window:i,dataType:t,attributeKey:l.attributeKey,setDialogVisible:()=>o(!1)})]})},O1o=({dataType:t,noPadding:e})=>{const n=$t(),[o,r]=m.useState(!1),i=uo(z.Window),a=()=>{M.getState().setApplyCount(0),r(!0)},l=Q1o[t];return h.jsxs(h.Fragment,{children:[h.jsxs(an,{noPadding:e,onClick:a,children:[Y.t(`windowMenu.${t}`,n)," ..."]}),o&&l&&i&&h.jsx(Y1o,{window:i,dataType:t,attributeKey:l.attributeKey,options:[Ci.Default,Ci.Arched,Ci.Polygonal],optionsText:[Y.t("windowMenu.Default",n),Y.t("windowMenu.Arched",n),Y.t("windowMenu.Polygonal",n)],setDialogVisible:()=>r(!1)})]})},V1o=({window:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.id===r&&l.type===z.Window){l.empty=i;break}})},o=r=>{const i=r.target.checked,a={name:"Empty Window",timestamp:Date.now(),checked:i,selectedElementId:t.id,selectedElementType:t.type,undo:()=>{n(t.id,!a.checked)},redo:()=>{n(t.id,a.checked)}};M.getState().addUndoable(a),n(t.id,i),M.getState().set(l=>{l.actionState.windowEmpty=i})};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:!!t.empty,onChange:o,children:Y.t("windowMenu.Empty",e)})})},_1o=({window:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.id===r&&l.type===z.Window){l.interior=i;break}})},o=r=>{const i=r.target.checked,a={name:"Interior Window",timestamp:Date.now(),checked:i,selectedElementId:t.id,selectedElementType:t.type,undo:()=>{n(t.id,!a.checked)},redo:()=>{n(t.id,a.checked)}};M.getState().addUndoable(a),n(t.id,i),M.getState().set(l=>{l.actionState.windowInterior=i})};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:!!t.interior,onChange:o,children:Y.t("windowMenu.Interior",e)})})},G1o=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(MW),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Window),[c,u]=m.useState((s==null?void 0:s.uValue)??X4),[d,f]=m.useState(ye.toUValueInUS(c)),p=$t(),g=(T,w)=>{l(x=>{for(const b of x.elements)if(b.id===T){b.uValue=w;break}})},A=T=>{for(const[w,x]of T.entries())g(w,x)},y=(T,w)=>{for(const x of T.keys())g(x,w)},S=T=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const w of e)if(w.type===z.Window&&T!==w.uValue&&!w.locked&&M.getState().selectedElementIdSet.has(w.id))return!0;break;case re.AllObjectsOfThisType:for(const w of e)if(w.type===z.Window&&T!==w.uValue&&!w.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const w of e)if(w.type===z.Window&&w.foundationId===s.foundationId&&T!==w.uValue&&!w.locked)return!0;break;case re.OnlyThisSide:for(const w of e)if(w.type===z.Window&&w.parentId===s.parentId&&T!==w.uValue&&!w.locked)return!0;break;default:if(T!==(s==null?void 0:s.uValue))return!0;break}return!1}},C=T=>{if(s&&S(T)){switch(o){case re.AllSelectedObjectsOfThisType:{const w=new Map;for(const b of e)if(b.type===z.Window&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)){const R=b;w.set(b.id,R.uValue??X4),g(R.id,T)}const x={name:"Set U-Value for Selected Windows",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1);break}case re.AllObjectsOfThisType:{const w=new Map;for(const b of e)if(b.type===z.Window&&!b.locked){const R=b;w.set(b.id,R.uValue??X4),g(R.id,T)}const x={name:"Set U-Value for All Windows",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(s.foundationId){const w=new Map;for(const b of e)if(b.type===z.Window&&b.foundationId===s.foundationId&&!b.locked){const R=b;w.set(b.id,R.uValue??X4),g(R.id,T)}const x={name:"Set U-Value for All Windows Above Foundation",timestamp:Date.now(),oldValues:w,newValue:T,groupId:s.foundationId,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1)}break}case re.OnlyThisSide:{if(s.parentId){const w=new Map;for(const b of e)if(b.type===z.Window&&b.parentId===s.parentId&&!b.locked){const R=b;w.set(b.id,R.uValue??X4),g(R.id,T)}const x={name:"Set U-Value for All Windows On the Same Wall",timestamp:Date.now(),oldValues:w,newValue:T,groupId:s.parentId,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1)}break}default:{if(s){const x=a(s.id).uValue??s.uValue??X4,b={name:"Set Window U-Value",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:s.id,changedElementType:s.type,undo:()=>{g(b.changedElementId,b.oldValue)},redo:()=>{g(b.changedElementId,b.newValue)}};n(b),g(s.id,T),i(r+1)}break}}l(w=>{w.actionState.windowUValue=T})}},P=()=>{t(!1)},v=()=>{C(c)};return h.jsx(so,{width:550,title:`${Y.t("word.UValue",p)+" "}(${Y.t("word.ThermalTransmittance",p)})`,onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:c,formatter:T=>Number(T).toFixed(2),onChange:T=>{T!==null&&(u(T),f(ye.toUValueInUS(T)))}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [0.01, 100]",h.jsx("br",{}),Y.t("word.SIUnit",p),": W/(m²·℃)"]}),h.jsx("br",{}),h.jsx(Sn,{min:ye.toUValueInUS(.01),max:ye.toUValueInUS(100),style:{width:120},step:.01,precision:2,value:d,formatter:T=>Number(T).toFixed(2),onChange:T=>{T!==null&&(f(T),u(ye.toUValueInSI(T)))}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [",ye.toUValueInUS(.01).toFixed(3),", ",ye.toUValueInUS(100).toFixed(1),"]",h.jsx("br",{}),Y.t("word.USUnit",p),": Btu/(h·ft²·℉)"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:T=>M.getState().setWindowActionScope(T.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windowMenu.OnlyThisWindow",p)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("windowMenu.AllWindowsOnSurface",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windowMenu.AllWindowsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windowMenu.AllSelectedWindows",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windowMenu.AllWindows",p)})]})})})]})})},X1o=t=>{const e=[];return e.push({key:"window-frame-boolean",label:h.jsx(Yk,{noPadding:!0,dataType:$R.Frame})}),t.frame&&e.push({type:"divider"},{key:"window-frame-width",label:h.jsx(A9,{noPadding:!0,dataType:wg.FrameWidth})},{key:"window-sill-width",label:h.jsx(A9,{noPadding:!0,dataType:wg.SillWidth})},{key:"window-frame-color",label:h.jsx(yee,{noPadding:!0,dataType:tU.Color})}),e},J1o=t=>{const e=[];return e.push({key:"window-horizontal-mullion",label:h.jsx(Yk,{noPadding:!0,dataType:$R.HorizontalMullion})},{key:"window-vertical-mullion",label:h.jsx(Yk,{noPadding:!0,dataType:$R.VerticalMullion})}),(t.horizontalMullion||t.verticalMullion)&&(e.push({type:"divider"},{key:"window-mullion-width",label:h.jsx(A9,{noPadding:!0,dataType:wg.MullionWidth})},{key:"window-mullion-color",label:h.jsx(yee,{noPadding:!0,dataType:tU.MullionColor})}),t.horizontalMullion&&e.push({key:"window-horizontal-mullion-spacing",label:h.jsx(A9,{noPadding:!0,dataType:wg.HorizontalMullionSpacing})}),t.verticalMullion&&e.push({key:"window-vertical-mullion-spacing",label:h.jsx(A9,{noPadding:!0,dataType:wg.VerticalMullionSpacing})})),e},K1o=t=>{const e=[];return e.push({key:"window-left-shutter",label:h.jsx(Yk,{noPadding:!0,dataType:$R.LeftShutter})},{key:"window-right-shutter",label:h.jsx(Yk,{noPadding:!0,dataType:$R.RightShutter})}),(t.leftShutter||t.rightShutter)&&e.push({type:"divider"},{key:"window-shutter-color",label:h.jsx(yee,{noPadding:!0,dataType:tU.ShutterColor})},{key:"window-shutter-width",label:h.jsx(A9,{noPadding:!0,dataType:wg.ShutterWidth})}),e};var Qh=(t=>(t.Color="Color",t.Tint="Tint",t.Opacity="Opacity",t.WindowType="WindowType",t.MullionWidth="MullionWidth",t.HorizontalMullionSpacing="HorizontalMullionSpacing",t.VerticalMullionSpacing="VerticalMullionSpacing",t.MullionColor="MullionColor",t.Frame="Frame",t.FrameWidth="FrameWidth",t.SillWidth="SillWidth",t.Width="Width",t.Height="Height",t))(Qh||{});const q1o={Tint:{attributeKey:"tint"},Color:{attributeKey:"color"},MullionColor:{attributeKey:"mullionColor"},ShutterColor:{attributeKey:"shutterColor"}},$1o={HorizontalMullion:{attributeKey:"horizontalMullion"},VerticalMullion:{attributeKey:"verticalMullion"},Frame:{attributeKey:"frame"},LeftShutter:{attributeKey:"leftShutter"},RightShutter:{attributeKey:"rightShutter"}},Q1o={WindowType:{attributeKey:"windowType",options:[Ci.Default,Ci.Arched,Ci.Polygonal]}},Z1o={Opacity:{attributeKey:"opacity",range:[0,.9],step:.1,note:"windowMenu.SolarHeatGainCoefficient",digit:1},Width:{attributeKey:"lx",range:[.1,100],step:.1,unit:"word.MeterAbbreviation",digit:1},Height:{attributeKey:"lz",range:[.1,100],step:.1,unit:"word.MeterAbbreviation",digit:1},Setback:{attributeKey:"cy",range:[0,1],step:.01,unit:"",digit:0,note:"windowMenu.RelativeToWallThickness"},MullionWidth:{attributeKey:"mullionWidth",range:[0,.5],step:.1,unit:"word.MeterAbbreviation",digit:1},ShutterWidth:{attributeKey:"shutterWidth",range:[0,.5],step:.01,unit:"",digit:1},HorizontalMullionSpacing:{attributeKey:"horizontalMullionSpacing",range:[.1,10],step:.01,unit:"word.MeterAbbreviation",digit:1},VerticalMullionSpacing:{attributeKey:"verticalMullionSpacing",range:[.1,10],step:.01,unit:"word.MeterAbbreviation",digit:1},FrameWidth:{attributeKey:"frameWidth",range:[.05,.2],step:.01,unit:"word.MeterAbbreviation",digit:2},SillWidth:{attributeKey:"sillWidth",range:[0,.5],step:.01,unit:"word.MeterAbbreviation",digit:2}},ego=t=>{const e=[];if(t.type!==z.Window)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language};return e.push({key:"window-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"window-cut",label:h.jsx(kd,{})}),e.push({key:"window-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&e.push({key:"window-empty",label:h.jsx(V1o,{window:n})},{key:"window-interior",label:h.jsx(_1o,{window:n})}),o&&e.push({key:"window-type",label:h.jsx(O1o,{dataType:krt.WindowType})},{key:"window-width",label:h.jsx(A9,{dataType:wg.Width})},{key:"window-height",label:h.jsx(A9,{dataType:wg.Height})},{key:"window-setback",label:h.jsx(A9,{dataType:wg.Setback})},{key:"window-opacity",label:h.jsx(A9,{dataType:wg.Opacity})},{key:"window-tint",label:h.jsx(yee,{dataType:tU.Tint})},{key:"window-u-value",label:h.jsxs(eo,{Dialog:G1o,children:[Y.t("word.UValue",r)," ..."]})},{key:"window-mullion-submenu",label:h.jsx(an,{children:Y.t("windowMenu.Mullion",r)}),children:J1o(n)},{key:"window-frame-submenu",label:h.jsx(an,{children:Y.t("windowMenu.Frame",r)}),children:X1o(n)},{key:"window-shutter-submenu",label:h.jsx(an,{children:Y.t("windowMenu.Shutter",r)}),children:K1o(n)}),{items:e}},tgo=({roof:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{const l=a.elements.find(s=>s.id===r&&s.type===z.Roof);l&&(l.ceiling=i,a.actionState.roofCeiling=i)})},o=r=>{const i=r.target.checked,a={name:"Roof Ceiling",timestamp:Date.now(),checked:i,selectedElementId:t.id,selectedElementType:t.type,undo:()=>{n(t.id,!a.checked)},redo:()=>{n(t.id,a.checked)}};M.getState().addUndoable(a),n(t.id,i)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.ceiling,onChange:o,children:Y.t("roofMenu.Ceiling",e)})})},ngo=({roof:t,objectType:e,modalTitle:n,onClickOk:o,children:r})=>{const i=M.getState().removeAllChildElementsByType,a=()=>{const s=M.getState().elements.filter(d=>!d.locked&&d.type===e&&d.parentId===t.id);i(t.id,e);const c=JSON.parse(JSON.stringify(s)),u={name:`Remove All ${e}s on Roof`,timestamp:Date.now(),parentId:t.id,removedElements:c,undo:()=>{M.getState().set(d=>{d.elements.push(...u.removedElements)})},redo:()=>{i(u.parentId,e)}};M.getState().addUndoable(u)},l=()=>{const s=o??a;xi.confirm({title:n,icon:h.jsx(ny,{}),onOk:s})};return h.jsx(an,{update:!0,noPadding:!0,onClick:l,children:r})},WHe=({roof:t,objectType:e,lock:n,children:o})=>{const r=M.getState().updateElementLockById,i=M.getState().updateElementLockByParentId,a=()=>{const l=e.replaceAll(" ",""),s=new Map;for(const d of M.getState().elements)d.parentId===t.id&&d.type===e&&s.set(d.id,!!d.locked);i(t.id,e,n);const u={name:n?`Lock All Unlocked ${l} on Roof`:`Unlock All Locked ${l} on Roof`,timestamp:Date.now(),oldValues:s,newValue:!0,undo:()=>{for(const[d,f]of u.oldValues.entries())r(d,f)},redo:()=>{i(t.id,e,n)}};M.getState().addUndoable(u)};return h.jsx(an,{stayAfterClick:!0,update:!0,noPadding:!0,onClick:a,children:o})},ogo=({roof:t})=>{const e=$t(),n=M.getState().updateRoofStructureById,o=r=>{const i={name:"Select Roof Structure",timestamp:Date.now(),oldValue:t.roofStructure??Ac.Default,newValue:r.target.value,changedElementId:t.id,changedElementType:t.type,undo:()=>{n(i.changedElementId,i.oldValue)},redo:()=>{n(i.changedElementId,i.newValue)}};M.getState().addUndoable(i),n(t.id,r.target.value),M.getState().set(a=>{a.actionState.roofStructure=r.target.value})};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Le.Group,{value:t.roofStructure??Ac.Default,onChange:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:Ac.Default,children:Y.t("roofMenu.DefaultStructure",e)}),h.jsx(Le,{style:{width:"100%"},value:Ac.Rafter,children:Y.t("roofMenu.RafterStructure",e)}),h.jsx(Le,{style:{width:"100%"},value:Ac.Glass,children:Y.t("roofMenu.GlassStructure",e)})]})})})},Kae=[{key:"solarPanelCount",lockedKey:"lockedSolarPanelCount",objectType:z.SolarPanel},{key:"windowCount",lockedKey:"lockedWindowCount",objectType:z.Window},{key:"sensorCount",lockedKey:"lockedSensorCount",objectType:z.Sensor},{key:"outsideLightCount",lockedKey:"lockedLightCount",objectType:z.Light}],rgo=(t,e)=>{const n={lng:M.getState().language};let o="",r="";switch(t){case z.SolarPanel:{o=`${Y.t("roofMenu.RemoveAllUnlockedSolarPanels",n)} (${e})`,r=`${Y.t("roofMenu.DoYouReallyWantToRemoveAllSolarPanelsOnThisRoof",n)} (${e} ${Y.t("roofMenu.SolarPanels",n)})`;break}case z.Window:{o=`${Y.t("roofMenu.RemoveAllUnlockedWindows",n)} (${e})`,r=`${Y.t("roofMenu.DoYouReallyWantToRemoveAllWindowsOnThisRoof",n)} (${e} ${Y.t("roofMenu.Windows",n)})`;break}case z.Sensor:{o=`${Y.t("roofMenu.RemoveAllUnlockedSensors",n)} (${e})`,r=`${Y.t("roofMenu.DoYouReallyWantToRemoveAllSensorsOnThisRoof",n)} (${e} ${Y.t("roofMenu.Sensors",n)})`;break}case z.Light:{o=`${Y.t("roofMenu.RemoveAllUnlockedLights",n)} (${e})`,r=`${Y.t("roofMenu.DoYouReallyWantToRemoveAllLightsOnThisRoof",n)} (${e} ${Y.t("roofMenu.Lights",n)})`;break}}return{itemLabel:o,modalTitle:r}},qae=(t,e,n,o)=>n===z.Light?o?t.lockedLightCount:t.insideLightCount+t.outsideLightCount:t[e],igo=(t,e,n)=>{const o=[],r={lng:M.getState().language};return Kae.forEach(({key:i,objectType:a})=>{const l=qae(n,i,a);if(typeof l=="number"&&l>0){const{itemLabel:s,modalTitle:c}=rgo(a,l),u=a.replaceAll(" ","");o.push({key:`remove-all-${u}s-on-roof`,label:h.jsx(ngo,{roof:t,objectType:a,modalTitle:c,children:s})})}}),Kae.forEach(({key:i,objectType:a})=>{const l=qae(n,i,a);if(typeof l=="number"&&l>0){const s=a.replaceAll(" ","");o.push({key:`lock-all-${s}s-on-roof`,label:h.jsxs(WHe,{roof:t,objectType:a,lock:!0,children:[Y.t(`wallMenu.LockAllUnlocked${s}s`,r)," (",l,")"]})})}}),Kae.forEach(({lockedKey:i,objectType:a})=>{const l=qae(e,i,a,!0);if(typeof l=="number"&&l>0){const s=a.replaceAll(" ","");o.push({key:`unlock-all-${s}s-on-wall`,label:h.jsxs(WHe,{roof:t,objectType:a,lock:!1,children:[Y.t(`wallMenu.UnlockAllLocked${s}s`,r)," (",l,")"]})})}}),e.outsideLightCount>0&&o.push({key:"inside-lights-on-wall",label:h.jsxs(wX,{element:t,inside:!0,children:[Y.t("wallMenu.AllLightsOnWallInside",r)," (",e.outsideLightCount,")"]})}),e.insideLightCount>0&&o.push({key:"outside-lights-on-wall",label:h.jsxs(wX,{element:t,inside:!1,children:[Y.t("wallMenu.AllLightsOnWallOutside",r)," (",e.insideLightCount,")"]})}),o},ago=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(sy),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.thickness)??.4),d=$t(),f=(P,v)=>{l(T=>{for(const w of T.elements)w.id===P&&(w.thickness=v,T.updateElementOnRoofFlag=!0),w.parentId===P&&w.type===z.Window&&(w.ly=v)})},p=P=>{for(const[v,T]of P.entries())f(v,T)},g=(P,v)=>{for(const T of P.keys())f(T,v)},A=P=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.thickness&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.thickness&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of e)if(v.type===z.Roof&&v.foundationId===s.foundationId&&P!==v.thickness&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.thickness))return!0;break}return!1}},y=P=>{if(s&&A(P)){switch(o){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of e)if(w.type===z.Roof&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)){const x=w;v.set(w.id,x.thickness),f(x.id,P)}const T={name:"Set Thickness for Selected Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of e)if(w.type===z.Roof&&!w.locked){const x=w;v.set(w.id,x.thickness),f(x.id,P)}const T={name:"Set Thickness for All Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;for(const w of e)if(w.type===z.Roof&&w.foundationId===s.foundationId&&!w.locked){const x=w;v.set(w.id,x.thickness),f(x.id,P)}const T={name:"Set Thickness for All Roofs Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break;default:if(s){const T=a(s.id).thickness??s.thickness??.4,w={name:"Set Roof Thickness",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};n(w),f(s.id,P),i(r+1)}}l(v=>{v.actionState.roofThickness=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("word.Thickness",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.05,max:1,style:{width:120},step:.01,precision:2,value:c,formatter:P=>Number(P).toFixed(2),onChange:P=>u(P)}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [0.05, 1] ",Y.t("word.MeterAbbreviation",d)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",d)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P=>M.getState().setRoofActionScope(P.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",d)})]})})})]})})},lgo=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(sy),r=M(no),i=M(Qn),a=M(Jn),l=uo(z.Roof),[s,c]=m.useState((l==null?void 0:l.rise)??0),u=$t(),d=(C,P)=>{M.getState().updateRoofRiseById(C,P),M.getState().set(v=>{v.updateElementOnRoofFlag=!0})},f=C=>{for(const[P,v]of C.entries())d(P,v)},p=(C,P)=>{for(const v of C.keys())d(v,P)},g=C=>{if(l){switch(o){case re.AllSelectedObjectsOfThisType:for(const P of e)if(P.type===z.Roof&&C!==P.rise&&!P.locked&&M.getState().selectedElementIdSet.has(P.id))return!0;break;case re.AllObjectsOfThisType:for(const P of e)if(P.type===z.Roof&&C!==P.rise&&!P.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const P of e)if(P.type===z.Roof&&P.foundationId===l.foundationId&&C!==P.rise&&!P.locked)return!0;break;default:if(C!==(l==null?void 0:l.rise))return!0;break}return!1}},A=C=>{if(l&&g(C))switch(M.getState().roofActionScope){case re.AllSelectedObjectsOfThisType:{const P=new Map;for(const T of e)T.type===z.Roof&&!T.locked&&(P.set(T.id,T.rise),d(T.id,C));const v={name:"Set Rise for Selected Roofs",timestamp:Date.now(),oldValues:P,newValue:C,undo:()=>{f(v.oldValues)},redo:()=>{p(v.oldValues,v.newValue)}};n(v),i(r+1);break}case re.AllObjectsOfThisType:{const P=new Map;for(const T of e)T.type===z.Roof&&!T.locked&&(P.set(T.id,T.rise),d(T.id,C));const v={name:"Set Rise for All Roofs",timestamp:Date.now(),oldValues:P,newValue:C,undo:()=>{f(v.oldValues)},redo:()=>{p(v.oldValues,v.newValue)}};n(v),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(l.foundationId){const P=new Map;for(const T of e)T.type===z.Roof&&T.foundationId===l.foundationId&&!T.locked&&(P.set(T.id,T.rise),d(T.id,C));const v={name:"Set Rise for All Roofs Above Foundation",timestamp:Date.now(),oldValues:P,newValue:C,groupId:l.foundationId,undo:()=>{f(v.oldValues)},redo:()=>{p(v.oldValues,v.newValue)}};n(v),i(r+1)}break;default:if(l){const P=a(l.id),v=(P==null?void 0:P.rise)??(l==null?void 0:l.rise)??0,T={name:"Set Roof Rise",timestamp:Date.now(),oldValue:v,newValue:C,changedElementId:l.id,changedElementType:l.type,undo:()=>{d(T.changedElementId,T.oldValue)},redo:()=>{d(T.changedElementId,T.newValue)}};n(T),d(l.id,C),i(r+1)}}},y=()=>{t(!1)},S=()=>{A(s)};return h.jsx(so,{width:550,title:Y.t("roofMenu.Rise",u),onApply:S,onClose:y,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:0,max:200,style:{width:120},step:.1,precision:2,value:s,formatter:C=>Number(C).toFixed(2),onChange:C=>c(C)}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",u),": [0, 200] ",Y.t("word.MeterAbbreviation",u)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",u)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:C=>M.getState().setRoofActionScope(C.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",u)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",u)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",u)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",u)})]})})})]})})},sgo=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(sy),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.rValue)??a8),[d,f]=m.useState(ye.toRValueInUS(c)),p=$t(),g=(T,w)=>{l(x=>{for(const b of x.elements)if(b.id===T){b.rValue=w;break}})},A=T=>{for(const[w,x]of T.entries())g(w,x)},y=(T,w)=>{for(const x of T.keys())g(x,w)},S=T=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const w of e)if(w.type===z.Roof&&T!==w.rValue&&!w.locked&&M.getState().selectedElementIdSet.has(w.id))return!0;break;case re.AllObjectsOfThisType:for(const w of e)if(w.type===z.Roof&&T!==w.rValue&&!w.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const w of e)if(w.type===z.Roof&&w.foundationId===s.foundationId&&T!==w.rValue&&!w.locked)return!0;break;default:if(T!==(s==null?void 0:s.rValue))return!0;break}return!1}},C=T=>{if(s&&S(T)){switch(o){case re.AllSelectedObjectsOfThisType:{const w=new Map;for(const b of e)if(b.type===z.Roof&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)){const R=b;w.set(b.id,R.rValue??a8),g(R.id,T)}const x={name:"Set R-Value for Selected Roofs",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1);break}case re.AllObjectsOfThisType:{const w=new Map;for(const b of e)if(b.type===z.Roof&&!b.locked){const R=b;w.set(b.id,R.rValue??a8),g(R.id,T)}const x={name:"Set R-Value for All Roofs",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const w=new Map;for(const b of e)if(b.type===z.Roof&&b.foundationId===s.foundationId&&!b.locked){const R=b;w.set(b.id,R.rValue??a8),g(R.id,T)}const x={name:"Set R-Value for All Roofs Above Foundation",timestamp:Date.now(),oldValues:w,newValue:T,groupId:s.foundationId,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1)}break;default:if(s){const x=a(s.id).rValue??s.rValue??a8,b={name:"Set Roof R-Value",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:s.id,changedElementType:s.type,undo:()=>{g(b.changedElementId,b.oldValue)},redo:()=>{g(b.changedElementId,b.newValue)}};n(b),g(s.id,T),i(r+1)}}l(w=>{w.actionState.roofRValue=T})}},P=()=>{t(!1)},v=()=>{C(c)};return h.jsx(so,{width:550,title:`${Y.t("roofMenu.RoofRValue",p)+" "}(${Y.t("word.ThermalResistance",p)})`,onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:c,formatter:T=>Number(T).toFixed(2),onChange:T=>{T!==null&&(u(T),f(ye.toRValueInUS(T)))}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [0.01, 100]",h.jsx("br",{}),Y.t("word.SIUnit",p),": m²·℃/W"]}),h.jsx("br",{}),h.jsx(Sn,{min:ye.toRValueInUS(.01),max:ye.toRValueInUS(100),style:{width:120},step:.01,precision:2,value:d,formatter:T=>Number(T).toFixed(2),onChange:T=>{T!==null&&(f(T),u(ye.toRValueInSI(T)))}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [",ye.toRValueInUS(.01).toFixed(3),", ",ye.toRValueInUS(100).toFixed(1),"]",h.jsx("br",{}),Y.t("word.USUnit",p),": h·ft²·℉/Btu"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:T=>M.getState().setRoofActionScope(T.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",p)})]})})})]})})},cgo=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(g3),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.volumetricHeatCapacity)??.5),d=$t(),f=(P,v)=>{l(T=>{for(const w of T.elements)if(w.id===P){w.volumetricHeatCapacity=v;break}})},p=P=>{for(const[v,T]of P.entries())f(v,T)},g=(P,v)=>{for(const T of P.keys())f(T,v)},A=P=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.volumetricHeatCapacity&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.volumetricHeatCapacity&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of e)if(v.type===z.Roof&&v.foundationId===s.foundationId&&P!==v.volumetricHeatCapacity&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.volumetricHeatCapacity))return!0;break}return!1}},y=P=>{if(s&&A(P)){switch(o){case re.AllSelectedObjectsOfThisType:{const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Roof&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)){const b=x;v.set(x.id,b.volumetricHeatCapacity??.5),b.volumetricHeatCapacity=P}});const T={name:"Set Volumetric Heat Capacity for Selected Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisType:{const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Roof&&!x.locked){const b=x;v.set(x.id,b.volumetricHeatCapacity??.5),b.volumetricHeatCapacity=P}});const T={name:"Set Volumetric Heat Capacity for All Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Roof&&x.foundationId===s.foundationId&&!x.locked){const b=x;v.set(x.id,b.volumetricHeatCapacity??.5),b.volumetricHeatCapacity=P}});const T={name:"Set Volumetric Heat Capacity for All Roofs Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break;default:if(s){const T=a(s.id).volumetricHeatCapacity??s.volumetricHeatCapacity??.5,w={name:"Set Volumetric Heat Capacity of Roof",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};n(w),f(s.id,P),i(r+1)}}l(v=>{v.actionState.roofVolumetricHeatCapacity=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("word.VolumetricHeatCapacity",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:c,formatter:P=>Number(P).toFixed(2),onChange:P=>u(P)}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:["kWh/(m³·℃)",h.jsx("br",{}),h.jsx("br",{}),Y.t("word.Range",d),": [0.01, 100]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P=>M.getState().setRoofActionScope(P.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",d)})]})})})]})})},ugo="/aladdin/assets/roof_edge-DBy_1Q5D.png",dgo="/aladdin/assets/roof_01-BwuyLpwq.png",fgo="/aladdin/assets/roof_02-DAbYjnV7.png",hgo="/aladdin/assets/roof_03-haZGIixv.png",pgo="/aladdin/assets/roof_04-DDuwUcDr.png",ggo="/aladdin/assets/roof_05-CtBb5xIW.png",mgo="/aladdin/assets/roof_06-DuyyebV8.png",ygo="/aladdin/assets/roof_07-DXWGQN8a.png",Ago=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(sy),r=M(no),i=M(Qn),a=M(pn),l=M(Jn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.textureType)??Ur.Default),d=$t(),{Option:f}=Uo,p=(v,T)=>{a(w=>{for(const x of w.elements)if(x.id===v){x.locked||(x.textureType=T);break}})},g=(v,T)=>{for(const w of v.keys())p(w,T)},A=v=>{for(const[T,w]of v.entries())p(T,w)},y=v=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const T of e)if(T.type===z.Roof&&v!==T.textureType&&!T.locked&&M.getState().selectedElementIdSet.has(T.id))return!0;break;case re.AllObjectsOfThisType:for(const T of e)if(T.type===z.Roof&&v!==T.textureType&&!T.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const T of e)if(T.type===z.Roof&&T.foundationId===s.foundationId&&v!==T.textureType&&!T.locked)return!0;break;default:if(v!==(s==null?void 0:s.textureType))return!0;break}return!1}},S=v=>{if(s&&y(v)){switch(o){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of e)x.type===z.Roof&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&T.set(x.id,x.textureType??Ur.Default);const w={name:"Set Texture for Selected Roofs",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{A(w.oldValues)},redo:()=>{g(w.oldValues,w.newValue)}};n(w),g(T,v),i(r+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of e)x.type===z.Roof&&!x.locked&&T.set(x.id,x.textureType??Ur.Default);const w={name:"Set Texture for All Roofs",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{A(w.oldValues)},redo:()=>{g(w.oldValues,w.newValue)}};n(w),g(T,v),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const T=new Map;for(const x of e)x.type===z.Roof&&x.foundationId===s.foundationId&&!x.locked&&T.set(x.id,x.textureType);const w={name:"Set Texture for All Roofs Above Foundation",timestamp:Date.now(),oldValues:T,newValue:v,groupId:s.foundationId,undo:()=>{A(w.oldValues)},redo:()=>{w.groupId&&g(w.oldValues,w.newValue)}};n(w),g(T,v),i(r+1)}break;default:if(s){const T=l(s.id),w=T?T.textureType:s.textureType,x={name:"Set Texture of Selected Roof",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};n(x),p(s.id,v),i(r+1)}}a(T=>{T.actionState.roofTexture=v})}},C=()=>{t(!1)},P=()=>{S(c)};return h.jsx(so,{width:550,title:Y.t("word.Texture",d),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:9,children:h.jsxs(Uo,{style:{width:"150px"},value:c,onChange:v=>u(v),children:[h.jsxs(f,{value:Ur.NoTexture,children:[h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"12px",width:"32px",height:"20px",border:"1px dashed dimGray"},children:" "}),Y.t("shared.NoTexture",d)]},Ur.NoTexture),h.jsxs(f,{value:Ur.Default,children:[h.jsx("img",{alt:Ur.Default,src:ugo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("roofMenu.TextureDefault",d)]},Ur.Default),h.jsxs(f,{value:Ur.Texture01,children:[h.jsx("img",{alt:Ur.Texture01,src:dgo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("roofMenu.Texture01",d)]},Ur.Texture01),h.jsxs(f,{value:Ur.Texture02,children:[h.jsx("img",{alt:Ur.Texture02,src:fgo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("roofMenu.Texture02",d)]},Ur.Texture02),h.jsxs(f,{value:Ur.Texture03,children:[h.jsx("img",{alt:Ur.Texture03,src:hgo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("roofMenu.Texture03",d)]},Ur.Texture03),h.jsxs(f,{value:Ur.Texture04,children:[h.jsx("img",{alt:Ur.Texture04,src:pgo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("roofMenu.Texture04",d)]},Ur.Texture04),h.jsxs(f,{value:Ur.Texture05,children:[h.jsx("img",{alt:Ur.Texture05,src:ggo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("roofMenu.Texture05",d)]},Ur.Texture05),h.jsxs(f,{value:Ur.Texture06,children:[h.jsx("img",{alt:Ur.Texture06,src:mgo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("roofMenu.Texture06",d)]},Ur.Texture06),h.jsxs(f,{value:Ur.Texture07,children:[h.jsx("img",{alt:Ur.Texture07,src:ygo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("roofMenu.Texture07",d)]},Ur.Texture07)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:15,children:h.jsx(Le.Group,{onChange:v=>M.getState().setRoofActionScope(v.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",d)})]})})})]})})},wgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(sy),i=M(no),a=M(Qn),l=M(Jn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.color)??"#ffffff"),d=$t(),f=(P,v)=>{e(T=>{for(const w of T.elements)if(w.id===P){w.locked||(w.color=v);break}})},p=(P,v)=>{for(const T of P.keys())f(T,v)},g=P=>{for(const[v,T]of P.entries())f(v,T)},A=P=>{if(s){switch(r){case re.AllSelectedObjectsOfThisType:for(const v of n)if(v.type===z.Roof&&P!==v.color&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of n)if(v.type===z.Roof&&P!==v.color&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of n)if(v.type===z.Roof&&v.foundationId===s.foundationId&&P!==v.color&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.color))return!0;break}return!1}},y=P=>{if(s&&A(P)){switch(r){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of n)w.type===z.Roof&&!w.locked&&v.set(w.id,w.color??"#ffffff");const T={name:"Set Color for Selected Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of n)w.type===z.Roof&&!w.locked&&v.set(w.id,w.color??"#ffffff");const T={name:"Set Color for All Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;for(const w of n)w.type===z.Roof&&w.foundationId===s.foundationId&&!s.locked&&v.set(w.id,w.color??"#ffffff");const T={name:"Set Color for All Roofs Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{g(T.oldValues)},redo:()=>{T.groupId&&p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1)}break;default:if(s){const v=l(s.id),T=(v?v.color:s.color)??"#ffffff",w={name:"Set Color of Selected Roof",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};o(w),f(s.id,P),a(i+1)}}e(v=>{v.actionState.roofColor=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:640,title:Y.t("roofMenu.RoofColor",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:c,onChangeComplete:P=>{u(P.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:P=>M.getState().setRoofActionScope(P.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",d)})]})})})]})})},vgo=({setDialogVisible:t})=>{const e=M(Kn),n=M(pn),o=M(En),r=M(sy),i=M(no),a=M(Qn),l=M(Jn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.sideColor)??"#ffffff"),d=$t(),f=(P,v)=>{n(T=>{for(const w of T.elements)if(w.id===P){w.locked||(w.sideColor=v);break}})},p=(P,v)=>{for(const T of P.keys())f(T,v)},g=P=>{for(const[v,T]of P.entries())f(v,T)},A=P=>{if(s){switch(r){case re.AllSelectedObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.sideColor&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.sideColor&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of e)if(v.type===z.Roof&&v.foundationId===s.foundationId&&P!==v.sideColor&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.sideColor))return!0;break}return!1}},y=P=>{if(s&&A(P)){switch(r){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of e)w.type===z.Roof&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)&&v.set(w.id,w.sideColor??"#ffffff");const T={name:"Set Side Color for Selected Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of e)w.type===z.Roof&&!w.locked&&v.set(w.id,w.sideColor??"#ffffff");const T={name:"Set Side Color for All Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;for(const w of e)w.type===z.Roof&&w.foundationId===s.foundationId&&!s.locked&&v.set(w.id,w.sideColor??"#ffffff");const T={name:"Set Side Color for All Roofs Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{g(T.oldValues)},redo:()=>{T.groupId&&p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1)}break;default:if(s){const v=l(s.id),T=(v?v.sideColor:s.sideColor)??"#ffffff",w={name:"Set Side Color of Selected Roof",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};o(w),f(s.id,P),a(i+1)}}n(v=>{v.actionState.roofSideColor=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:640,title:Y.t("roofMenu.RoofSideColor",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:c??(s==null?void 0:s.sideColor)??"#ffffff",onChangeComplete:P=>{u(P.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:P=>M.getState().setRoofActionScope(P.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",d)})]})})})]})})},xgo=({setDialogVisible:t})=>{const e=M(m0),n=M(c3),o=M(En),r=M(sy),i=M(ROe),a=M(no),l=M(Qn),s=M(Xi),c=M(Jn),u=M(pn),d=M(W=>{if(n){for(const k of W.elements)if(k.id===n.id)return k}return null}),[f,p]=m.useState((d==null?void 0:d.ceilingRValue)??w6),[g,A]=m.useState(ye.toRValueInUS(f)),[y,S]=m.useState(!1),[C,P]=m.useState({left:0,top:0,bottom:0,right:0}),v=m.useRef(null),T={lng:e};m.useEffect(()=>{d&&p((d==null?void 0:d.ceilingRValue)??w6)},[d==null?void 0:d.ceilingRValue]);const w=(W,k)=>{u(D=>{for(const L of D.elements)if(L.id===W){L.ceilingRValue=k;break}})},x=W=>{for(const[k,D]of W.entries())w(k,D)},b=(W,k)=>{for(const D of W.keys())w(D,k)},R=W=>{if(d){switch(r){case re.AllObjectsOfThisType:{const k=new Map;u(L=>{for(const j of L.elements)if(j.type===z.Roof&&!j.locked){const B=j;k.set(j.id,B.ceilingRValue??w6),B.ceilingRValue=W}});const D={name:"Set R-Value for All Ceilings",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{x(D.oldValues)},redo:()=>{b(D.oldValues,D.newValue)}};o(D),l(a+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(d.foundationId){const k=new Map;u(L=>{for(const j of L.elements)if(j.type===z.Roof&&j.foundationId===d.foundationId&&!j.locked){const B=j;k.set(j.id,B.ceilingRValue??w6),B.ceilingRValue=W}});const D={name:"Set R-Value for All Ceilings Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:d.foundationId,undo:()=>{x(D.oldValues)},redo:()=>{b(D.oldValues,D.newValue)}};o(D),l(a+1)}break}default:{if(d){const D=c(d.id).ceilingRValue??d.ceilingRValue??w6,L={name:"Set Ceiling R-Value",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:d.id,changedElementType:d.type,undo:()=>{w(L.changedElementId,L.oldValue)},redo:()=>{w(L.changedElementId,L.newValue)}};o(L),w(d.id,W),l(a+1)}break}}u(k=>{k.actionState.roofRValue=W})}},H=(W,k)=>{if(v.current){const{clientWidth:D,clientHeight:L}=window.document.documentElement,j=v.current.getBoundingClientRect();P({left:-j.left+k.x,right:D-(j.right-k.x),top:-j.top+k.y,bottom:L-((j==null?void 0:j.bottom)-k.y)})}},F=()=>{p((d==null?void 0:d.ceilingRValue)??w6),t(!1)},E=()=>{F(),s()},N=()=>{R(f),t(!1),l(0)},U=()=>{R(f)};return h.jsx(h.Fragment,{children:h.jsx(xi,{width:550,open:!0,title:h.jsxs("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>S(!0),onMouseOut:()=>S(!1),children:[Y.t("roofMenu.CeilingRValue",T)+" ","(",Y.t("word.ThermalResistance",T),")"]}),footer:[h.jsx(io,{onClick:U,children:Y.t("word.Apply",T)},"Apply"),h.jsx(io,{onClick:E,children:Y.t("word.Cancel",T)},"Cancel"),h.jsx(io,{type:"primary",onClick:N,children:Y.t("word.OK",T)},"OK")],onCancel:F,maskClosable:!1,destroyOnClose:!1,modalRender:W=>h.jsx(Bi,{disabled:!y,bounds:C,onStart:(k,D)=>H(k,D),children:h.jsx("div",{ref:v,children:W})}),children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:f,formatter:W=>Number(W).toFixed(2),onChange:W=>{W!==null&&(p(W),A(ye.toRValueInUS(W)))},onPressEnter:N}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",T),": [0.01, 100]",h.jsx("br",{}),Y.t("word.SIUnit",T),": m²·℃/W"]}),h.jsx("br",{}),h.jsx(Sn,{min:ye.toRValueInUS(.01),max:ye.toRValueInUS(100),style:{width:120},step:.01,precision:2,value:g,formatter:W=>Number(W).toFixed(2),onChange:W=>{W!==null&&(A(W),p(ye.toRValueInSI(W)))},onPressEnter:N}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",T),": [",ye.toRValueInUS(.01).toFixed(3),", ",ye.toRValueInUS(100).toFixed(1),"]",h.jsx("br",{}),Y.t("word.USUnit",T),": h·ft²·℉/Btu"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:W=>i(W.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisCeiling",T)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllCeilingsAboveFoundation",T)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllCeilings",T)})]})})})]})})})},bgo=t=>{const e={lng:M.getState().language},n=[];return n.push({key:"roof-ceiling",label:h.jsx(tgo,{roof:t})}),t.ceiling&&n.push({type:"divider"},{key:"ceiling-r-value",label:h.jsxs(eo,{noPadding:!0,Dialog:xgo,children:[Y.t("roofMenu.CeilingRValue",e)," ..."]})}),n},Sgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(sy),i=M(no),a=M(Qn),l=M(Jn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.rafterColor)??"#ffffff"),d=$t(),f=(P,v)=>{e(T=>{for(const w of T.elements)if(w.id===P){w.locked||(w.rafterColor=v);break}})},p=(P,v)=>{for(const T of P.keys())f(T,v)},g=P=>{for(const[v,T]of P.entries())f(v,T)},A=P=>{if(s){switch(r){case re.AllSelectedObjectsOfThisType:for(const v of n)if(v.type===z.Roof&&P!==v.rafterColor&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of n)if(v.type===z.Roof&&P!==v.rafterColor&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of n)if(v.type===z.Roof&&v.foundationId===s.foundationId&&P!==v.rafterColor&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.rafterColor))return!0;break}return!1}},y=P=>{if(s&&A(P))switch(r){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of n)w.type===z.Roof&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)&&v.set(w.id,w.rafterColor??"#ffffff");const T={name:"Set Rafter Color for Selected Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of n)w.type===z.Roof&&!w.locked&&v.set(w.id,w.rafterColor??"#ffffff");const T={name:"Set Rafter Color for All Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;for(const w of n)w.type===z.Roof&&w.foundationId===s.foundationId&&!s.locked&&v.set(w.id,w.rafterColor??"#ffffff");const T={name:"Set Rafter Color for All Roofs Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{g(T.oldValues)},redo:()=>{T.groupId&&p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1)}break;default:if(s){const v=l(s.id),T=(v?v.rafterColor:s.rafterColor)??"#ffffff",w={name:"Set Rafter Color of Selected Roof",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};o(w),f(s.id,P),a(i+1)}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:640,title:Y.t("roofMenu.RoofColor",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:c,onChangeComplete:P=>{u(P.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:P=>M.getState().setRoofActionScope(P.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",d)})]})})})]})})},Tgo=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(sy),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.rafterSpacing)??1),d=$t(),f=(P,v)=>{l(T=>{for(const w of T.elements)if(w.id===P){w.rafterSpacing=v;break}})},p=P=>{for(const[v,T]of P.entries())f(v,T)},g=(P,v)=>{for(const T of P.keys())f(T,v)},A=P=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.rafterSpacing&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.rafterSpacing&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of e)if(v.type===z.Roof&&v.foundationId===s.foundationId&&P!==v.rafterSpacing&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.rafterSpacing))return!0;break}return!1}},y=P=>{if(s&&A(P))switch(o){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of e)w.type===z.Roof&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)&&(v.set(w.id,w.rafterSpacing??1),f(w.id,P));const T={name:"Set Rafter Spacing for Selected Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of e)w.type===z.Roof&&!w.locked&&(v.set(w.id,w.rafterSpacing??1),f(w.id,P));const T={name:"Set Rafter Spacing for All Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;for(const w of e)w.type===z.Roof&&w.foundationId===s.foundationId&&!w.locked&&(v.set(w.id,w.rafterSpacing??1),f(w.id,P));const T={name:"Set Rafter Spacing for All Roofs Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break;default:if(s){const T=a(s.id).rafterSpacing??s.rafterSpacing??1,w={name:"Set Roof Rafter Spacing",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};n(w),f(s.id,P),i(r+1)}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("roofMenu.RafterSpacing",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:100,style:{width:120},step:.1,precision:2,value:c,formatter:P=>Number(P).toFixed(2),onChange:P=>u(P)}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [0.1, 100] ",Y.t("word.MeterAbbreviation",d)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",d)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P=>M.getState().setRoofActionScope(P.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",d)})]})})})]})})},Pgo=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(sy),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.rafterWidth)??.1),d=$t(),f=(P,v)=>{l(T=>{for(const w of T.elements)if(w.id===P){w.rafterWidth=v;break}})},p=P=>{for(const[v,T]of P.entries())f(v,T)},g=(P,v)=>{for(const T of P.keys())f(T,v)},A=P=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.rafterWidth&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.rafterWidth&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of e)if(v.type===z.Roof&&v.foundationId===s.foundationId&&P!==v.rafterWidth&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.rafterWidth))return!0;break}return!1}},y=P=>{if(s&&A(P))switch(o){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of e)w.type===z.Roof&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)&&(v.set(w.id,w.rafterWidth??.1),f(w.id,P));const T={name:"Set Rafter Width for Selected Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of e)w.type===z.Roof&&!w.locked&&(v.set(w.id,w.rafterWidth??.1),f(w.id,P));const T={name:"Set Rafter Width for All Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;for(const w of e)w.type===z.Roof&&w.foundationId===s.foundationId&&!w.locked&&(v.set(w.id,w.rafterWidth??.1),f(w.id,P));const T={name:"Set Rafter Width for All Roofs Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break;default:if(s){const T=a(s.id).rafterWidth??s.rafterWidth??.1,w={name:"Set Roof Rafter Width",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};n(w),f(s.id,P),i(r+1)}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("roofMenu.RafterWidth",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.01,max:1,style:{width:120},step:.01,precision:2,value:c,formatter:P=>Number(P).toFixed(2),onChange:P=>u(P)}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [0.01, 1] ",Y.t("word.MeterAbbreviation",d)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",d)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P=>M.getState().setRoofActionScope(P.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",d)})]})})})]})})},Cgo=({setDialogVisible:t})=>{const e=M(pn),n=M(c3),o=M(En),r=M(sy),i=M(ROe),a=M(no),l=M(Qn),s=M(Xi),c=M(Jn),[u,d]=m.useState((n==null?void 0:n.glassTint)??"#73D8FF"),[f,p]=m.useState(!1),[g,A]=m.useState({left:0,top:0,bottom:0,right:0}),y=m.useRef(null),S=m.useRef(null);m.useEffect(()=>{var E;(E=S.current)==null||E.focus()});const C=$t();m.useEffect(()=>{n&&d((n==null?void 0:n.glassTint)??"#73D8FF")},[n]);const P=(E,N)=>{e(U=>{for(const W of U.elements)if(W.id===E){W.locked||(W.glassTint=N);break}})},v=(E,N)=>{for(const U of E.keys())P(U,N)},T=E=>{for(const[N,U]of E.entries())P(N,U)},w=E=>{if(n)switch(r){case re.AllObjectsOfThisType:{const N=new Map;for(const W of M.getState().elements)W.type===z.Roof&&!W.locked&&N.set(W.id,W.glassTint??"#73D8FF");const U={name:"Set Glass Tint for All Roofs",timestamp:Date.now(),oldValues:N,newValue:E,undo:()=>{T(U.oldValues)},redo:()=>{v(U.oldValues,U.newValue)}};o(U),v(N,E),l(a+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(n.foundationId){const N=new Map;for(const W of M.getState().elements)W.type===z.Roof&&W.foundationId===n.foundationId&&!n.locked&&N.set(W.id,W.glassTint??"#73D8FF");const U={name:"Set Glass Tint for All Roofs Above Foundation",timestamp:Date.now(),oldValues:N,newValue:E,groupId:n.foundationId,undo:()=>{T(U.oldValues)},redo:()=>{U.groupId&&v(U.oldValues,U.newValue)}};o(U),v(N,E),l(a+1)}break}default:{if(n){const N=c(n.id),U=(N?N.glassTint:n.glassTint)??"#73D8FF",W={name:"Set Glass Tint of Selected Roof",timestamp:Date.now(),oldValue:U,newValue:E,changedElementId:n.id,changedElementType:n.type,undo:()=>{P(W.changedElementId,W.oldValue)},redo:()=>{P(W.changedElementId,W.newValue)}};o(W),P(n.id,E),l(a+1)}break}}},x=(E,N)=>{if(y.current){const{clientWidth:U,clientHeight:W}=window.document.documentElement,k=y.current.getBoundingClientRect();A({left:-k.left+N.x,right:U-(k.right-N.x),top:-k.top+N.y,bottom:W-((k==null?void 0:k.bottom)-N.y)})}},b=()=>{n!=null&&n.glassTint&&d(n.glassTint),t(!1)},R=()=>{b(),s()},H=()=>{const E=c(n.id);E&&E.glassTint!==u&&w(u),t(!1),l(0)},F=()=>{w(u)};return h.jsx(h.Fragment,{children:h.jsx(xi,{width:640,open:!0,title:h.jsx("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>p(!0),onMouseOut:()=>p(!1),children:Y.t("roofMenu.GlassTint",C)}),footer:[h.jsx(io,{onClick:F,children:Y.t("word.Apply",C)},"Apply"),h.jsx(io,{onClick:R,children:Y.t("word.Cancel",C)},"Cancel"),h.jsx(io,{type:"primary",ref:S,onClick:H,children:Y.t("word.OK",C)},"OK")],onCancel:b,maskClosable:!1,destroyOnClose:!1,modalRender:E=>h.jsx(Bi,{disabled:!f,bounds:g,onStart:(N,U)=>x(N,U),children:h.jsx("div",{ref:y,children:E})}),children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:u??(n==null?void 0:n.glassTint)??"#73D8FF",onChangeComplete:E=>{d(E.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:E=>i(E.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",C)})]})})})]})})})},Rgo=t=>{const e={lng:M.getState().language},n=[];return n.push({key:"roof-structure-radio-group",label:h.jsx(ogo,{roof:t}),style:{backgroundColor:"white"}}),t.roofStructure===Ac.Rafter&&n.push({type:"divider"},{key:"roof-rafter-spacing",label:h.jsxs(eo,{noPadding:!0,Dialog:Tgo,children:[Y.t("roofMenu.RafterSpacing",e)," ..."]})},{key:"roof-rafter-width",label:h.jsxs(eo,{noPadding:!0,Dialog:Pgo,children:[Y.t("roofMenu.RafterWidth",e)," ..."]})},{key:"roof-rafter-color",label:h.jsxs(eo,{noPadding:!0,Dialog:Sgo,children:[Y.t("roofMenu.RafterColor",e)," ..."]})}),t.roofStructure===Ac.Glass&&n.push({type:"divider"},{key:"roof-glass-tint-selection",label:h.jsxs(eo,{noPadding:!0,Dialog:Cgo,children:[Y.t("roofMenu.GlassTint",e)," ..."]})}),n},Hgo=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(sy),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.opacity)!==void 0?s.opacity:.5),d=$t(),f=(P,v)=>{l(T=>{for(const w of T.elements)if(w.id===P){w.opacity=v;break}})},p=P=>{for(const[v,T]of P.entries())f(v,T)},g=(P,v)=>{for(const T of P.keys())f(T,v)},A=P=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.opacity&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.opacity&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of e)if(v.type===z.Roof&&v.foundationId===s.foundationId&&P!==v.opacity&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.opacity))return!0;break}return!1}},y=P=>{if(s&&A(P)){switch(o){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of e)if(w.type===z.Roof&&!w.locked){const x=w;v.set(w.id,x.opacity),f(x.id,P)}const T={name:"Set Opacity for Selected Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of e)if(w.type===z.Roof&&!w.locked){const x=w;v.set(w.id,x.opacity),f(x.id,P)}const T={name:"Set Opacity for All Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;for(const w of e)if(w.type===z.Roof&&w.foundationId===s.foundationId&&!w.locked){const x=w;v.set(w.id,x.opacity),f(x.id,P)}const T={name:"Set Opacity for All Roofs Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break;default:if(s){const v=a(s.id),T=v.opacity!==void 0?v.opacity:s.opacity!==void 0?s.opacity:.5,w={name:"Set Roof Opacity",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};n(w),f(s.id,P),i(r+1)}}l(v=>{v.actionState.roofGlassOpacity=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("roofMenu.Opacity",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.01,precision:2,value:c,formatter:P=>Number(P).toFixed(2),onChange:P=>u(P)}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P=>M.getState().setRoofActionScope(P.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",d)})]})})})]})})},Mgo=()=>{const t=M.getState().elementsToPaste;if(t&&t.length>0)switch(t[0].type){case z.Window:case z.SolarPanel:case z.SolarWaterHeater:case z.Sensor:case z.Light:return!0}return!1},Igo=t=>{const e=[];if(t.type!==z.Roof)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language},i=M.getState().countAllOffspringsByTypeAtOnce,a=i(n.id,!0),l=i(n.id,!1),s=n.roofStructure!==Ac.Rafter||n.opacity===void 0||n.opacity>0;return Mgo()&&e.push({key:"roof-paste",label:h.jsx(nM,{})}),e.push({key:"roof-lock",label:h.jsx(Ku,{selectedElement:n})}),n.rise>0&&e.push({key:"roof-ceiling-submenu",label:h.jsx(an,{children:Y.t("roofMenu.Ceiling",r)}),children:bgo(n)}),a.gotSome()&&e.push({key:"lock-unlock-clear-on-roof",label:h.jsx(an,{children:Y.t("word.Elements",r)}),children:igo(n,a,l)}),o&&(n.roofType===Go.Gable&&(e.push({key:"roof-structure-submenu",label:h.jsx(an,{children:Y.t("roofMenu.RoofStructure",r)}),children:Rgo(n)}),(n.roofStructure===Ac.Rafter||n.roofStructure===Ac.Glass)&&e.push({key:"opacity",label:h.jsxs(eo,{Dialog:Hgo,children:[Y.t("roofMenu.Opacity",r)," ..."]})})),e.push({key:"roof-thickness",label:h.jsxs(eo,{Dialog:ago,children:[Y.t(n.roofStructure===Ac.Rafter?"roofMenu.RafterThickness":"word.Thickness",r)," ","..."]})}),e.push({key:"roof-rise",label:h.jsxs(eo,{Dialog:lgo,children:[Y.t("roofMenu.Rise",r)," ..."]})}),s&&(e.push({key:"roof-r-value",label:h.jsxs(eo,{Dialog:sgo,children:[Y.t("roofMenu.RoofRValue",r)," ..."]})},{key:"roof-heat-capacity",label:h.jsxs(eo,{Dialog:cgo,children:[Y.t("word.VolumetricHeatCapacity",r)," ..."]})},{key:"roof-texture",label:h.jsxs(eo,{Dialog:Ago,children:[Y.t("word.Texture",r)," ..."]})}),(n.textureType===Ur.NoTexture||n.textureType===Ur.Default)&&e.push({key:"roof-color",label:h.jsxs(eo,{Dialog:wgo,children:[Y.t("roofMenu.RoofColor",r)," ..."]})}),e.push({key:"roof-side-color",label:h.jsxs(eo,{Dialog:vgo,children:[Y.t("roofMenu.RoofSideColor",r)," ..."]})}))),{items:e}},zgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=uo(z.WindTurbine),[d,f]=m.useState((u==null?void 0:u.relativeYawAngle)??0),p=$t(),g=R=>{a(R.target.value)},A=R=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const H of n)if(H.type===z.WindTurbine&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&Math.abs((H.relativeYawAngle??0)-R)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const H of n)if(H.type===z.WindTurbine&&H.foundationId===(u==null?void 0:u.foundationId)&&!H.locked&&Math.abs((H.relativeYawAngle??0)-R)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const H of n)if(H.type===z.WindTurbine&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&Math.abs((H.relativeYawAngle??0)-R)>Et)return!0;break;default:if(Math.abs(((u==null?void 0:u.relativeYawAngle)??0)-R)>Et)return!0}return!1}},y=(R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&E.id===R&&!E.locked){const N=E;N.relativeYawAngle=H;break}})},S=(R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&E.foundationId===R&&!E.locked){const N=E;N.relativeYawAngle=H}})},C=R=>{e(H=>{for(const F of H.elements)if(F.type===z.WindTurbine&&!F.locked){const E=F;E.relativeYawAngle=R}})},P=(R,H)=>{M.getState().set(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&!E.locked&&R.has(E.id)){const N=E;N.relativeYawAngle=H}})},v=R=>{if(u&&A(R)){switch(i){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(E.id)&&H.set(E.id,E.relativeYawAngle);const F={name:"Set Relative Yaw Angle for Selected Wind Turbines",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{P(F.oldValues,F.newValue)}};r(F),P(H,R),s(l+1);break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.WindTurbine&&H.set(E.id,E.relativeYawAngle);const F={name:"Set Relative Yaw Angle for All Wind Turbines",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{C(F.newValue)}};r(F),C(R),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const H=new Map;for(const E of n)E.type===z.WindTurbine&&E.foundationId===u.foundationId&&H.set(E.id,E.relativeYawAngle);const F={name:"Set Relative Yaw Angle for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:H,newValue:R,groupId:u.foundationId,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{F.groupId&&S(F.groupId,F.newValue)}};r(F),S(u.foundationId,R),s(l+1)}break}default:{const H=o(u.id),F=H?H.relativeYawAngle:u.relativeYawAngle,E={name:"Set Wind Turbine Relative Yaw Angle",timestamp:Date.now(),oldValue:F,newValue:R,changedElementId:u.id,changedElementType:u.type,undo:()=>{y(E.changedElementId,E.oldValue)},redo:()=>{y(E.changedElementId,E.newValue)}};r(E),y(u.id,R),s(l+1);break}}e(H=>{H.actionState.windTurbineRelativeYawAngle=R})}},T=()=>{t(!1)},w=()=>{T(),c()},x=()=>{v(d),t(!1),s(0)},b=()=>{v(d)};return h.jsx(so,{width:550,title:Y.t("windTurbineMenu.RelativeYawAngle",p),onApply:b,onClose:T,onClickCancel:w,onClickOk:x,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:-180,max:180,style:{width:120},precision:2,step:1,value:parseFloat(ye.toDegrees(d).toFixed(2)),formatter:R=>`${R}°`,onChange:R=>{R!==null&&f(ye.toRadians(R))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [-180°, 180°]",h.jsx("br",{}),Y.t("message.SouthFacingIsZero",p),h.jsx("br",{}),Y.t("message.CounterclockwiseAzimuthIsPositive",p)]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:g,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",p)})]})})})]})})},Dgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=uo(z.WindTurbine),[d,f]=m.useState((u==null?void 0:u.numberOfBlades)??3),p=$t(),{Option:g}=Uo,A=H=>{a(H.target.value)},y=H=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const F of n)if(F.type===z.WindTurbine&&!F.locked&&M.getState().selectedElementIdSet.has(F.id)&&Math.abs((F.numberOfBlades??0)-H)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const F of n)if(F.type===z.WindTurbine&&F.foundationId===(u==null?void 0:u.foundationId)&&!F.locked&&Math.abs((F.numberOfBlades??0)-H)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const F of n)if(F.type===z.WindTurbine&&!F.locked&&M.getState().selectedElementIdSet.has(F.id)&&Math.abs((F.numberOfBlades??0)-H)>Et)return!0;break;default:if(Math.abs(((u==null?void 0:u.numberOfBlades)??0)-H)>Et)return!0}return!1}},S=(H,F)=>{e(E=>{for(const N of E.elements)if(N.type===z.WindTurbine&&N.id===H&&!N.locked){const U=N;U.numberOfBlades=F;break}})},C=(H,F)=>{e(E=>{for(const N of E.elements)if(N.type===z.WindTurbine&&N.foundationId===H&&!N.locked){const U=N;U.numberOfBlades=F}})},P=H=>{e(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&!E.locked){const N=E;N.numberOfBlades=H}})},v=(H,F)=>{M.getState().set(E=>{for(const N of E.elements)if(N.type===z.WindTurbine&&!N.locked&&H.has(N.id)){const U=N;U.numberOfBlades=F}})},T=H=>{if(u&&y(H)){switch(i){case re.AllSelectedObjectsOfThisType:{const F=new Map;for(const N of n)N.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(N.id)&&F.set(N.id,N.numberOfBlades??3);const E={name:"Select Blade Number for Selected Wind Turbines",timestamp:Date.now(),oldValues:F,newValue:H,undo:()=>{for(const[N,U]of E.oldValues.entries())S(N,U)},redo:()=>{v(E.oldValues,E.newValue)}};r(E),v(F,H),s(l+1);break}case re.AllObjectsOfThisType:{const F=new Map;for(const N of n)N.type===z.WindTurbine&&F.set(N.id,N.numberOfBlades??3);const E={name:"Select Blade Number for All Wind Turbines",timestamp:Date.now(),oldValues:F,newValue:H,undo:()=>{for(const[N,U]of E.oldValues.entries())S(N,U)},redo:()=>{P(E.newValue)}};r(E),P(H),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const F=new Map;for(const N of n)N.type===z.WindTurbine&&N.foundationId===u.foundationId&&F.set(N.id,N.numberOfBlades??3);const E={name:"Select Blade Number for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:F,newValue:H,groupId:u.foundationId,undo:()=>{for(const[N,U]of E.oldValues.entries())S(N,U)},redo:()=>{E.groupId&&C(E.groupId,E.newValue)}};r(E),C(u.foundationId,H),s(l+1)}break}default:{const F=o(u.id),E=F?F.numberOfBlades??3:u.numberOfBlades??3,N={name:"Select Wind Turbine Blade Number",timestamp:Date.now(),oldValue:E,newValue:H,changedElementId:u.id,changedElementType:u.type,undo:()=>{S(N.changedElementId,N.oldValue)},redo:()=>{S(N.changedElementId,N.newValue)}};r(N),S(u.id,H),s(l+1);break}}e(F=>{F.actionState.windTurbineNumberOfBlades=H})}},w=()=>{t(!1)},x=()=>{w(),c()},b=()=>{T(d),t(!1),s(0)},R=()=>{T(d)};return h.jsx(so,{width:550,title:Y.t("windTurbineMenu.BladeNumber",p),onApply:R,onClose:w,onClickCancel:x,onClickOk:b,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:4,children:h.jsxs(Uo,{style:{width:"60px"},value:d,onChange:H=>{H!==null&&f(H)},children:[h.jsx(g,{value:1,children:"1"},1),h.jsx(g,{value:2,children:"2"},2),h.jsx(g,{value:3,children:"3"},3),h.jsx(g,{value:4,children:"4"},4),h.jsx(g,{value:8,children:"8"},8)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:20,children:h.jsx(Le.Group,{onChange:A,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",p)})]})})})]})})},Ego=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=uo(z.WindTurbine),[d,f]=m.useState((u==null?void 0:u.initialRotorAngle)??0),p=$t(),g=R=>{a(R.target.value)},A=R=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const H of n)if(H.type===z.WindTurbine&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&Math.abs((H.initialRotorAngle??0)-R)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const H of n)if(H.type===z.WindTurbine&&H.foundationId===(u==null?void 0:u.foundationId)&&!H.locked&&Math.abs((H.initialRotorAngle??0)-R)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const H of n)if(H.type===z.WindTurbine&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&Math.abs((H.initialRotorAngle??0)-R)>Et)return!0;break;default:if(Math.abs(((u==null?void 0:u.initialRotorAngle)??0)-R)>Et)return!0}return!1}},y=(R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&E.id===R&&!E.locked){const N=E;N.initialRotorAngle=H;break}})},S=(R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&E.foundationId===R&&!E.locked){const N=E;N.initialRotorAngle=H}})},C=R=>{e(H=>{for(const F of H.elements)if(F.type===z.WindTurbine&&!F.locked){const E=F;E.initialRotorAngle=R}})},P=(R,H)=>{M.getState().set(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&!E.locked&&R.has(E.id)){const N=E;N.initialRotorAngle=H}})},v=R=>{if(u&&A(R)){switch(i){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(E.id)&&H.set(E.id,E.initialRotorAngle);const F={name:"Set Rotor Initial Angle for Selected Wind Turbines",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{P(F.oldValues,F.newValue)}};r(F),P(H,R),s(l+1);break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.WindTurbine&&H.set(E.id,E.initialRotorAngle);const F={name:"Set Rotor Initial Angle for All Wind Turbines",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{C(F.newValue)}};r(F),C(R),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const H=new Map;for(const E of n)E.type===z.WindTurbine&&E.foundationId===u.foundationId&&H.set(E.id,E.initialRotorAngle);const F={name:"Set Rotor Initial Angle for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:H,newValue:R,groupId:u.foundationId,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{F.groupId&&S(F.groupId,F.newValue)}};r(F),S(u.foundationId,R),s(l+1)}break}default:{const H=o(u.id),F=H?H.initialRotorAngle:u.initialRotorAngle,E={name:"Set Wind Turbine Rotor Initial Angle",timestamp:Date.now(),oldValue:F,newValue:R,changedElementId:u.id,changedElementType:u.type,undo:()=>{y(E.changedElementId,E.oldValue)},redo:()=>{y(E.changedElementId,E.newValue)}};r(E),y(u.id,R),s(l+1);break}}e(H=>{H.actionState.windTurbineInitialRotorAngle=R})}},T=()=>{t(!1)},w=()=>{T(),c()},x=()=>{v(d),t(!1),s(0)},b=()=>{v(d)};return h.jsx(so,{width:550,title:Y.t("windTurbineMenu.RotorInitialAngle",p),onApply:b,onClose:T,onClickCancel:w,onClickOk:x,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:0,max:360,style:{width:120},precision:1,step:1,value:parseFloat(ye.toDegrees(d).toFixed(2)),formatter:R=>`${R}°`,onChange:R=>{R!==null&&f(ye.toRadians(R))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [0°, 360°]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:g,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",p)})]})})})]})})},Fgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=ye.toRadians(10),d=uo(z.WindTurbine),[f,p]=m.useState((d==null?void 0:d.pitchAngle)??u),g=$t(),A=H=>{a(H.target.value)},y=H=>{if(d){switch(i){case re.AllObjectsOfThisType:for(const F of n)if(F.type===z.WindTurbine&&!F.locked&&M.getState().selectedElementIdSet.has(F.id)&&Math.abs((F.pitchAngle??u)-H)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const F of n)if(F.type===z.WindTurbine&&F.foundationId===(d==null?void 0:d.foundationId)&&!F.locked&&Math.abs((F.pitchAngle??u)-H)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const F of n)if(F.type===z.WindTurbine&&!F.locked&&M.getState().selectedElementIdSet.has(F.id)&&Math.abs((F.pitchAngle??u)-H)>Et)return!0;break;default:if(Math.abs(((d==null?void 0:d.pitchAngle)??u)-H)>Et)return!0}return!1}},S=(H,F)=>{e(E=>{for(const N of E.elements)if(N.type===z.WindTurbine&&N.id===H&&!N.locked){const U=N;U.pitchAngle=F;break}})},C=(H,F)=>{e(E=>{for(const N of E.elements)if(N.type===z.WindTurbine&&N.foundationId===H&&!N.locked){const U=N;U.pitchAngle=F}})},P=H=>{e(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&!E.locked){const N=E;N.pitchAngle=H}})},v=(H,F)=>{M.getState().set(E=>{for(const N of E.elements)if(N.type===z.WindTurbine&&!N.locked&&H.has(N.id)){const U=N;U.pitchAngle=F}})},T=H=>{if(d&&y(H)){switch(i){case re.AllSelectedObjectsOfThisType:{const F=new Map;for(const N of n)N.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(N.id)&&F.set(N.id,N.pitchAngle);const E={name:"Set Pitch Angle for Selected Wind Turbines",timestamp:Date.now(),oldValues:F,newValue:H,undo:()=>{for(const[N,U]of E.oldValues.entries())S(N,U)},redo:()=>{v(E.oldValues,E.newValue)}};r(E),v(F,H),s(l+1);break}case re.AllObjectsOfThisType:{const F=new Map;for(const N of n)N.type===z.WindTurbine&&F.set(N.id,N.pitchAngle);const E={name:"Set Pitch Angle for All Wind Turbines",timestamp:Date.now(),oldValues:F,newValue:H,undo:()=>{for(const[N,U]of E.oldValues.entries())S(N,U)},redo:()=>{P(E.newValue)}};r(E),P(H),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(d.foundationId){const F=new Map;for(const N of n)N.type===z.WindTurbine&&N.foundationId===d.foundationId&&F.set(N.id,N.pitchAngle);const E={name:"Set Pitch Angle for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:F,newValue:H,groupId:d.foundationId,undo:()=>{for(const[N,U]of E.oldValues.entries())S(N,U)},redo:()=>{E.groupId&&C(E.groupId,E.newValue)}};r(E),C(d.foundationId,H),s(l+1)}break}default:{const F=o(d.id),E=F?F.pitchAngle:d.pitchAngle,N={name:"Set Wind Turbine Pitch Angle",timestamp:Date.now(),oldValue:E,newValue:H,changedElementId:d.id,changedElementType:d.type,undo:()=>{S(N.changedElementId,N.oldValue)},redo:()=>{S(N.changedElementId,N.newValue)}};r(N),S(d.id,H),s(l+1);break}}e(F=>{F.actionState.windTurbinePitchAngle=H})}},w=()=>{t(!1)},x=()=>{w(),c()},b=()=>{T(f),t(!1),s(0)},R=()=>{T(f)};return h.jsx(so,{width:550,title:Y.t("windTurbineMenu.RotorBladePitchAngle",g),onApply:R,onClose:w,onClickCancel:x,onClickOk:b,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:-180,max:180,style:{width:120},precision:2,step:1,value:parseFloat(ye.toDegrees(f).toFixed(2)),formatter:H=>`${H}°`,onChange:H=>{H!==null&&p(ye.toRadians(H))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",g),": [-180°, 180°]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:A,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",g)})]})})})]})})},kgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=uo(z.WindTurbine),[d,f]=m.useState((u==null?void 0:u.bladeRadius)??0),p=m.useRef(!1),g=m.useRef(),A=$t(),y=E=>{a(E.target.value)},S=E=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const N of n)if(N.type===z.WindTurbine&&!N.locked&&M.getState().selectedElementIdSet.has(N.id)&&Math.abs(N.bladeRadius-E)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const N of n)if(N.type===z.WindTurbine&&N.foundationId===(u==null?void 0:u.foundationId)&&!N.locked&&Math.abs(N.bladeRadius-E)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const N of n)if(N.type===z.WindTurbine&&!N.locked&&M.getState().selectedElementIdSet.has(N.id)&&Math.abs(N.bladeRadius-E)>Et)return!0;break;default:if(Math.abs((u==null?void 0:u.bladeRadius)-E)>Et)return!0}return!1}},C=(E,N)=>{e(U=>{for(const W of U.elements)if(W.type===z.WindTurbine&&W.id===E&&!W.locked){const k=W;k.bladeRadius=N,k.lx=k.ly=N*2,k.lz=k.towerHeight+N;break}})},P=(E,N)=>{e(U=>{for(const W of U.elements)if(W.type===z.WindTurbine&&W.foundationId===E&&!W.locked){const k=W;k.bladeRadius=N,k.lx=k.ly=N*2,k.lz=k.towerHeight+N}})},v=E=>{e(N=>{for(const U of N.elements)if(U.type===z.WindTurbine&&!U.locked){const W=U;W.bladeRadius=E,W.lx=W.ly=E*2,W.lz=W.towerHeight+E}})},T=(E,N)=>{M.getState().set(U=>{for(const W of U.elements)if(W.type===z.WindTurbine&&!W.locked&&E.has(W.id)){const k=W;k.bladeRadius=N,k.lx=k.ly=N*2,k.lz=k.towerHeight+N}})},w=E=>{if(u&&S(E)){switch(g.current=void 0,i){case re.AllSelectedObjectsOfThisType:{p.current=!1;for(const N of n)if(N.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(N.id)&&N.towerHeight{for(const[W,k]of U.oldValues.entries())C(W,k)},redo:()=>{T(U.oldValues,U.newValue)}};r(U),T(N,E),s(l+1)}break}case re.AllObjectsOfThisType:{p.current=!1;for(const N of n)if(N.type===z.WindTurbine&&N.towerHeight{for(const[W,k]of U.oldValues.entries())C(W,k)},redo:()=>{v(U.newValue)}};r(U),v(E),s(l+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){p.current=!1;for(const N of n)if(N.type===z.WindTurbine&&N.foundationId===u.foundationId&&N.towerHeight{for(const[W,k]of U.oldValues.entries())C(W,k)},redo:()=>{U.groupId&&P(U.groupId,U.newValue)}};r(U),P(u.foundationId,E),s(l+1)}}break}default:{const N=o(u.id),U=N?N.bladeRadius:u.bladeRadius;if(p.current=u.towerHeight{C(W.changedElementId,W.oldValue)},redo:()=>{C(W.changedElementId,W.newValue)}};r(W),C(u.id,E),s(l+1)}break}}e(N=>{N.actionState.windTurbineBladeRadius=E})}},x=()=>{p.current=!1,t(!1)},b=()=>{x(),c()},R=()=>{w(d),p.current||(t(!1),s(0))},H=()=>{w(d)},F=p.current?": "+Y.t("message.NotApplicableToSelectedAction",A)+(g.current!==void 0?" ("+g.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("windTurbineMenu.RotorBladeRadius",A),rejectedMessage:F,onApply:H,onClose:x,onClickCancel:b,onClickOk:R,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:100,style:{width:120},step:.1,precision:1,value:d,onChange:E=>{E!==null&&f(E)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [1, 100] ",Y.t("word.MeterAbbreviation",A)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",A)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",A)})]})})})]})})},Lgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=uo(z.WindTurbine),[d,f]=m.useState((u==null?void 0:u.bladeRootRadius)??.3),[p,g]=m.useState((u==null?void 0:u.maximumChordLength)??1),[A,y]=m.useState((u==null?void 0:u.maximumChordRadius)??3),S=m.useRef(null),C=$t(),P=555;m.useEffect(()=>{if(!S.current||!u)return;const q=S.current.getContext("2d");if(!q)return;const se=S.current.width,Z=S.current.height,ee=20,te=Z*.7;q.clearRect(0,0,se,Z),q.setLineDash([]),q.strokeStyle="gray",q.lineWidth=1,q.rect(0,0,se,Z),q.stroke();const oe=(se-ee*2)/u.bladeRadius,de=oe*u.bladeTipWidth,he=oe*A,pe=oe*p,me=oe*u.bladeRadius,le=oe*d,Te=pe-le,ge=me-he/3,Se=[];Se.push(new Kt(ee,te-le)),Se.push(new Kt(ee+me-ge,te-Te/2)),Se.push(new Kt(ee+he,te-Te)),Se.push(new Kt(ee+me,te+le-de));const De=new Sq(Se).getPoints(50);q.beginPath(),q.moveTo(De[0].x,De[0].y);for(let Ae=1;Ae{a(q.target.value)},T=q=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const se of n)if(se.type===z.WindTurbine&&!se.locked&&M.getState().selectedElementIdSet.has(se.id)&&Math.abs(se.bladeRootRadius-q)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const se of n)if(se.type===z.WindTurbine&&se.foundationId===(u==null?void 0:u.foundationId)&&!se.locked&&Math.abs(se.bladeRootRadius-q)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const se of n)if(se.type===z.WindTurbine&&!se.locked&&M.getState().selectedElementIdSet.has(se.id)&&Math.abs(se.bladeRootRadius-q)>Et)return!0;break;default:if(Math.abs(((u==null?void 0:u.bladeRootRadius)??.3)-q)>Et)return!0}return!1}},w=(q,se)=>{e(Z=>{for(const ee of Z.elements)if(ee.type===z.WindTurbine&&ee.id===q&&!ee.locked){const te=ee;te.bladeRootRadius=se;break}})},x=(q,se)=>{e(Z=>{for(const ee of Z.elements)if(ee.type===z.WindTurbine&&ee.foundationId===q&&!ee.locked){const te=ee;te.bladeRootRadius=se}})},b=q=>{e(se=>{for(const Z of se.elements)if(Z.type===z.WindTurbine&&!Z.locked){const ee=Z;ee.bladeRootRadius=q}})},R=(q,se)=>{M.getState().set(Z=>{for(const ee of Z.elements)if(ee.type===z.WindTurbine&&!ee.locked&&q.has(ee.id)){const te=ee;te.bladeRootRadius=se}})},H=q=>{if(u&&T(q)){switch(i){case re.AllSelectedObjectsOfThisType:{const se=new Map;for(const ee of n)ee.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(ee.id)&&se.set(ee.id,ee.bladeRootRadius);const Z={name:"Set Root Radius for Selected Wind Turbines",timestamp:Date.now(),oldValues:se,newValue:q,undo:()=>{for(const[ee,te]of Z.oldValues.entries())w(ee,te)},redo:()=>{R(Z.oldValues,Z.newValue)}};r(Z),R(se,q),s(l+1);break}case re.AllObjectsOfThisType:{const se=new Map;for(const ee of n)ee.type===z.WindTurbine&&se.set(ee.id,ee.bladeRootRadius);const Z={name:"Set Root Radius for All Wind Turbines",timestamp:Date.now(),oldValues:se,newValue:q,undo:()=>{for(const[ee,te]of Z.oldValues.entries())w(ee,te)},redo:()=>{b(Z.newValue)}};r(Z),b(q),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const se=new Map;for(const ee of n)ee.type===z.WindTurbine&&ee.foundationId===u.foundationId&&se.set(ee.id,ee.bladeRootRadius);const Z={name:"Set Root Radius for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:se,newValue:q,groupId:u.foundationId,undo:()=>{for(const[ee,te]of Z.oldValues.entries())w(ee,te)},redo:()=>{Z.groupId&&x(Z.groupId,Z.newValue)}};r(Z),x(u.foundationId,q),s(l+1)}break}default:{const se=o(u.id),Z=se?se.bladeRootRadius:u.bladeRootRadius,ee={name:"Set Wind Turbine Root Radius",timestamp:Date.now(),oldValue:Z,newValue:q,changedElementId:u.id,changedElementType:u.type,undo:()=>{w(ee.changedElementId,ee.oldValue)},redo:()=>{w(ee.changedElementId,ee.newValue)}};r(ee),w(u.id,q),s(l+1);break}}e(se=>{se.actionState.windTurbineBladeRootRadius=q})}},F=q=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const se of n)if(se.type===z.WindTurbine&&!se.locked&&M.getState().selectedElementIdSet.has(se.id)&&Math.abs(se.maximumChordLength-q)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const se of n)if(se.type===z.WindTurbine&&se.foundationId===(u==null?void 0:u.foundationId)&&!se.locked&&Math.abs(se.maximumChordLength-q)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const se of n)if(se.type===z.WindTurbine&&!se.locked&&M.getState().selectedElementIdSet.has(se.id)&&Math.abs(se.maximumChordLength-q)>Et)return!0;break;default:if(Math.abs((u==null?void 0:u.maximumChordLength)-q)>Et)return!0}return!1}},E=(q,se)=>{e(Z=>{for(const ee of Z.elements)if(ee.type===z.WindTurbine&&ee.id===q&&!ee.locked){const te=ee;te.maximumChordLength=se;break}})},N=(q,se)=>{e(Z=>{for(const ee of Z.elements)if(ee.type===z.WindTurbine&&ee.foundationId===q&&!ee.locked){const te=ee;te.maximumChordLength=se}})},U=q=>{e(se=>{for(const Z of se.elements)if(Z.type===z.WindTurbine&&!Z.locked){const ee=Z;ee.maximumChordLength=q}})},W=(q,se)=>{M.getState().set(Z=>{for(const ee of Z.elements)if(ee.type===z.WindTurbine&&!ee.locked&&q.has(ee.id)){const te=ee;te.maximumChordLength=se}})},k=q=>{if(u&&F(q)){switch(i){case re.AllSelectedObjectsOfThisType:{const se=new Map;for(const ee of n)ee.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(ee.id)&&se.set(ee.id,ee.maximumChordLength);const Z={name:"Set Chord Length for Selected Wind Turbines",timestamp:Date.now(),oldValues:se,newValue:q,undo:()=>{for(const[ee,te]of Z.oldValues.entries())E(ee,te)},redo:()=>{W(Z.oldValues,Z.newValue)}};r(Z),W(se,q),s(l+1);break}case re.AllObjectsOfThisType:{const se=new Map;for(const ee of n)ee.type===z.WindTurbine&&se.set(ee.id,ee.maximumChordLength);const Z={name:"Set Chord Length for All Wind Turbines",timestamp:Date.now(),oldValues:se,newValue:q,undo:()=>{for(const[ee,te]of Z.oldValues.entries())E(ee,te)},redo:()=>{U(Z.newValue)}};r(Z),U(q),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const se=new Map;for(const ee of n)ee.type===z.WindTurbine&&ee.foundationId===u.foundationId&&se.set(ee.id,ee.maximumChordLength);const Z={name:"Set Chord Length for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:se,newValue:q,groupId:u.foundationId,undo:()=>{for(const[ee,te]of Z.oldValues.entries())E(ee,te)},redo:()=>{Z.groupId&&N(Z.groupId,Z.newValue)}};r(Z),N(u.foundationId,q),s(l+1)}break}default:{const se=o(u.id),Z=se?se.maximumChordLength:u.maximumChordLength,ee={name:"Set Wind Turbine Chord Length",timestamp:Date.now(),oldValue:Z,newValue:q,changedElementId:u.id,changedElementType:u.type,undo:()=>{E(ee.changedElementId,ee.oldValue)},redo:()=>{E(ee.changedElementId,ee.newValue)}};r(ee),E(u.id,q),s(l+1);break}}e(se=>{se.actionState.windTurbineBladeMaximumChordLength=q})}},D=q=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const se of n)if(se.type===z.WindTurbine&&!se.locked&&M.getState().selectedElementIdSet.has(se.id)&&Math.abs(se.maximumChordRadius-q)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const se of n)if(se.type===z.WindTurbine&&se.foundationId===(u==null?void 0:u.foundationId)&&!se.locked&&Math.abs(se.maximumChordRadius-q)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const se of n)if(se.type===z.WindTurbine&&!se.locked&&M.getState().selectedElementIdSet.has(se.id)&&Math.abs(se.maximumChordRadius-q)>Et)return!0;break;default:if(Math.abs((u==null?void 0:u.maximumChordRadius)-q)>Et)return!0}return!1}},L=(q,se)=>{e(Z=>{for(const ee of Z.elements)if(ee.type===z.WindTurbine&&ee.id===q&&!ee.locked){const te=ee;te.maximumChordRadius=se;break}})},j=(q,se)=>{e(Z=>{for(const ee of Z.elements)if(ee.type===z.WindTurbine&&ee.foundationId===q&&!ee.locked){const te=ee;te.maximumChordRadius=se}})},B=q=>{e(se=>{for(const Z of se.elements)if(Z.type===z.WindTurbine&&!Z.locked){const ee=Z;ee.maximumChordRadius=q}})},O=(q,se)=>{M.getState().set(Z=>{for(const ee of Z.elements)if(ee.type===z.WindTurbine&&!ee.locked&&q.has(ee.id)){const te=ee;te.maximumChordRadius=se}})},V=q=>{if(u&&D(q)){switch(i){case re.AllSelectedObjectsOfThisType:{const se=new Map;for(const ee of n)ee.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(ee.id)&&se.set(ee.id,ee.maximumChordRadius);const Z={name:"Set Chord Radius for Selected Wind Turbines",timestamp:Date.now(),oldValues:se,newValue:q,undo:()=>{for(const[ee,te]of Z.oldValues.entries())L(ee,te)},redo:()=>{O(Z.oldValues,Z.newValue)}};r(Z),O(se,q),s(l+1);break}case re.AllObjectsOfThisType:{const se=new Map;for(const ee of n)ee.type===z.WindTurbine&&se.set(ee.id,ee.maximumChordRadius);const Z={name:"Set Chord Radius for All Wind Turbines",timestamp:Date.now(),oldValues:se,newValue:q,undo:()=>{for(const[ee,te]of Z.oldValues.entries())L(ee,te)},redo:()=>{B(Z.newValue)}};r(Z),B(q),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const se=new Map;for(const ee of n)ee.type===z.WindTurbine&&ee.foundationId===u.foundationId&&se.set(ee.id,ee.maximumChordRadius);const Z={name:"Set Chord Radius for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:se,newValue:q,groupId:u.foundationId,undo:()=>{for(const[ee,te]of Z.oldValues.entries())L(ee,te)},redo:()=>{Z.groupId&&j(Z.groupId,Z.newValue)}};r(Z),j(u.foundationId,q),s(l+1)}break}default:{const se=o(u.id),Z=se?se.maximumChordRadius:u.maximumChordRadius,ee={name:"Set Wind Turbine Chord Radius",timestamp:Date.now(),oldValue:Z,newValue:q,changedElementId:u.id,changedElementType:u.type,undo:()=>{L(ee.changedElementId,ee.oldValue)},redo:()=>{L(ee.changedElementId,ee.newValue)}};r(ee),L(u.id,q),s(l+1);break}}e(se=>{se.actionState.windTurbineBladeMaximumChordRadius=q})}},G=()=>{t(!1)},Q=()=>{G(),c()},$=()=>{k(p),V(A),H(d),t(!1),s(0)},ie=()=>{k(p),V(A),H(d)};return h.jsxs(so,{width:600,title:Y.t("windTurbineMenu.RotorBladeDesign",C),onApply:ie,onClose:G,onClickCancel:Q,onClickOk:$,children:[h.jsx(nn,{children:h.jsx(Ke,{span:24,children:h.jsx("canvas",{ref:S,id:"blade-design-canvas",width:P,height:P*.25,style:{paddingBottom:"12px"}})})}),h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:8,children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"8px"},children:[h.jsx(Ke,{style:{textAlign:"center",fontStyle:"italic"},children:"A: "}),h.jsx(Ke,{children:h.jsx(Sn,{min:.1,max:1,style:{width:"70px"},step:.01,precision:2,value:d,onChange:q=>{q&&f(q)}})}),h.jsxs(Ke,{style:{paddingTop:"5px",textAlign:"left",fontSize:"11px"},children:["[0.1, 1] ",Y.t("word.MeterAbbreviation",C)]})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"8px"},children:[h.jsx(Ke,{style:{textAlign:"center",fontStyle:"italic"},children:"C: "}),h.jsx(Ke,{children:h.jsx(Sn,{min:.5,max:2,style:{width:"70px"},step:.01,precision:2,value:p,onChange:q=>{q&&g(q)}})}),h.jsxs(Ke,{style:{paddingTop:"5px",textAlign:"left",fontSize:"11px"},children:["[0.5, 2] ",Y.t("word.MeterAbbreviation",C)]})]}),h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{style:{textAlign:"center",fontStyle:"italic"},children:"D:"}),h.jsx(Ke,{children:h.jsx(Sn,{min:2,max:((u==null?void 0:u.bladeRadius)??10)/2,style:{width:70},step:.01,precision:2,value:A,onChange:q=>{q&&y(q)}})}),h.jsxs(Ke,{style:{paddingTop:"5px",textAlign:"left",fontSize:"11px"},children:["[2, ",((u==null?void 0:u.bladeRadius)??10)/2,"] ",Y.t("word.MeterAbbreviation",C)]})]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",C)})]})})})]})]})},Wgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=uo(z.WindTurbine),[d,f]=m.useState((u==null?void 0:u.hubRadius)??0),[p,g]=m.useState((u==null?void 0:u.hubLength)??0),A=$t(),y=F=>{a(F.target.value)},S=(F,E)=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const N of n)if(N.type===z.WindTurbine&&!N.locked&&M.getState().selectedElementIdSet.has(N.id)){const U=N;if(Math.abs(U.hubRadius-F)>Et||Math.abs(U.hubLength-E)>Et)return!0}break;case re.AllObjectsOfThisTypeAboveFoundation:for(const N of n)if(N.type===z.WindTurbine&&N.foundationId===(u==null?void 0:u.foundationId)&&!N.locked){const U=N;if(Math.abs(U.hubRadius-F)>Et||Math.abs(U.hubLength-E)>Et)return!0}break;case re.AllSelectedObjectsOfThisType:for(const N of n)if(N.type===z.WindTurbine&&!N.locked&&M.getState().selectedElementIdSet.has(N.id)){const U=N;if(Math.abs(U.hubRadius-F)>Et||Math.abs(U.hubLength-E)>Et)return!0}break;default:if(Math.abs((u==null?void 0:u.hubRadius)-F)>Et||Math.abs((u==null?void 0:u.hubLength)-E)>Et)return!0}return!1}},C=(F,E)=>{e(N=>{for(const U of N.elements)if(U.type===z.WindTurbine&&U.id===F&&!U.locked){const W=U;W.hubRadius=E[0],W.hubLength=E[1];break}})},P=(F,E)=>{e(N=>{for(const U of N.elements)if(U.type===z.WindTurbine&&U.foundationId===F&&!U.locked){const W=U;W.hubRadius=E[0],W.hubLength=E[1]}})},v=F=>{e(E=>{for(const N of E.elements)if(N.type===z.WindTurbine&&!N.locked){const U=N;U.hubRadius=F[0],U.hubLength=F[1]}})},T=(F,E)=>{M.getState().set(N=>{for(const U of N.elements)if(U.type===z.WindTurbine&&!U.locked&&F.has(U.id)){const W=U;W.hubRadius=E[0],W.hubLength=E[1]}})},w=F=>{if(u&&S(F[0],F[1])){switch(i){case re.AllSelectedObjectsOfThisType:{const E=new Map;for(const U of n)if(U.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(U.id)){const W=U;E.set(U.id,[W.hubRadius,W.hubLength])}const N={name:"Set Hub Parameters for Selected Wind Turbines",timestamp:Date.now(),oldValues:E,newValue:F,undo:()=>{for(const[U,W]of N.oldValues.entries())C(U,W)},redo:()=>{T(N.oldValues,N.newValue)}};r(N),T(E,F),s(l+1);break}case re.AllObjectsOfThisType:{const E=new Map;for(const U of n)if(U.type===z.WindTurbine){const W=U;E.set(U.id,[W.hubRadius,W.hubLength])}const N={name:"Set Hub Parameters for All Wind Turbines",timestamp:Date.now(),oldValues:E,newValue:F,undo:()=>{for(const[U,W]of N.oldValues.entries())C(U,W)},redo:()=>{v(N.newValue)}};r(N),v(F),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const E=new Map;for(const U of n)if(U.type===z.WindTurbine&&U.foundationId===u.foundationId){const W=U;E.set(U.id,[W.hubRadius,W.hubLength])}const N={name:"Set Hub Parameters for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:E,newValue:F,groupId:u.foundationId,undo:()=>{for(const[U,W]of N.oldValues.entries())C(U,W)},redo:()=>{N.groupId&&P(N.groupId,N.newValue)}};r(N),P(u.foundationId,F),s(l+1)}break}default:{const E=o(u.id),N=E?E.hubRadius:u.hubRadius,U=E?E.hubLength:u.hubLength,W={name:"Set Wind Turbine Hub Parameters",timestamp:Date.now(),oldValue:[N,U],newValue:F,changedElementId:u.id,changedElementType:u.type,undo:()=>{C(W.changedElementId,W.oldValue)},redo:()=>{C(W.changedElementId,W.newValue)}};r(W),C(u.id,F),s(l+1);break}}e(E=>{E.actionState.windTurbineHubRadius=F[0],E.actionState.windTurbineHubLength=F[1]})}},x=()=>{t(!1)},b=()=>{x(),c()},R=()=>{w([d,p]),t(!1),s(0)},H=()=>{w([d,p])};return h.jsx(so,{width:550,title:Y.t("windTurbineMenu.HubDesign",A),onApply:H,onClose:x,onClickCancel:b,onClickOk:R,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx("div",{style:{marginTop:"-20px",textAlign:"left",fontSize:"12px"},children:Y.t("windTurbineMenu.HubRadius",A)}),h.jsx(Sn,{min:.5,max:5,style:{width:120},step:.01,precision:2,value:d,onChange:F=>{F!==null&&f(F)}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0.5, 5] ",Y.t("word.MeterAbbreviation",A)]}),h.jsx("div",{style:{paddingTop:"10px",textAlign:"left",fontSize:"12px"},children:Y.t("windTurbineMenu.HubLength",A)}),h.jsx(Sn,{min:1,max:10,style:{width:120},step:.01,precision:2,value:p,onChange:F=>{F!==null&&g(F)}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [1, 10] ",Y.t("word.MeterAbbreviation",A)]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",A)})]})})})]})})},Ngo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=uo(z.WindTurbine),[d,f]=m.useState((u==null?void 0:u.birdSafe)??uc.None),[p,g]=m.useState((u==null?void 0:u.bladeColor)??t9),[A,y]=m.useState((u==null?void 0:u.stripeColor)??n9),S=$t(),{Option:C}=Uo,P=U=>{a(U.target.value)},v=(U,W,k)=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const D of n)if(D.type===z.WindTurbine&&!D.locked&&M.getState().selectedElementIdSet.has(D.id)){const L=D;if((L.birdSafe??uc.None)!==U||(L.bladeColor??t9)!==W||(L.stripeColor??n9)!==k)return!0}break;case re.AllObjectsOfThisTypeAboveFoundation:for(const D of n)if(D.type===z.WindTurbine&&D.foundationId===(u==null?void 0:u.foundationId)&&!D.locked){const L=D;if((L.birdSafe??uc.None)!==U||(L.bladeColor??t9)!==W||(L.stripeColor??n9)!==k)return!0}break;case re.AllSelectedObjectsOfThisType:for(const D of n)if(D.type===z.WindTurbine&&!D.locked&&M.getState().selectedElementIdSet.has(D.id)){const L=D;if((L.birdSafe??uc.None)!==U||(L.bladeColor??t9)!==W||(L.stripeColor??n9)!==k)return!0}break;default:if((u.birdSafe??uc.None)!==U||(u.bladeColor??t9)!==W||(u.stripeColor??n9)!==k)return!0}return!1}},T=(U,W,k,D)=>{e(L=>{for(const j of L.elements)if(j.type===z.WindTurbine&&j.id===U&&!j.locked){const B=j;B.birdSafe=W,B.bladeColor=k,B.stripeColor=D;break}})},w=(U,W,k,D)=>{e(L=>{for(const j of L.elements)if(j.type===z.WindTurbine&&j.foundationId===U&&!j.locked){const B=j;B.birdSafe=W,B.bladeColor=k,B.stripeColor=D}})},x=(U,W,k)=>{e(D=>{for(const L of D.elements)if(L.type===z.WindTurbine&&!L.locked){const j=L;j.birdSafe=U,j.bladeColor=W,j.stripeColor=k}})},b=(U,W,k,D)=>{M.getState().set(L=>{for(const j of L.elements)if(j.type===z.WindTurbine&&!j.locked&&U.has(j.id)){const B=j;B.birdSafe=W,B.bladeColor=k,B.stripeColor=D}})},R=(U,W,k)=>{if(u&&v(U,W,k)){switch(i){case re.AllSelectedObjectsOfThisType:{const D=new Map;for(const j of n)if(j.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(j.id)){const B=j;D.set(j.id,[(B.birdSafe??uc.None).toString(),B.bladeColor,B.stripeColor])}const L={name:"Select Bird-Safe Design for Selected Wind Turbines",timestamp:Date.now(),oldValues:D,newValue:[U.toString(),W,k],undo:()=>{for(const[j,B]of L.oldValues.entries()){const O=B;T(j,Number(O[0]),O[1],O[2])}},redo:()=>{const j=L.newValue;b(L.oldValues,Number(j[0]),j[1],j[2])}};r(L),b(D,U,W,k),s(l+1);break}case re.AllObjectsOfThisType:{const D=new Map;for(const j of n)if(j.type===z.WindTurbine){const B=j;D.set(j.id,[(B.birdSafe??uc.None).toString(),B.bladeColor,B.stripeColor])}const L={name:"Select Bird-Safe Design for All Wind Turbines",timestamp:Date.now(),oldValues:D,newValue:[U.toString(),W,k],undo:()=>{for(const[j,B]of L.oldValues.entries()){const O=B;T(j,Number(O[0]),O[1],O[2])}},redo:()=>{const j=L.newValue;x(Number(j[0]),j[1],j[2])}};r(L),x(U,W,k),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const D=new Map;for(const j of n)if(j.type===z.WindTurbine&&j.foundationId===u.foundationId){const B=j;D.set(j.id,[(B.birdSafe??uc.None).toString(),B.bladeColor,B.stripeColor])}const L={name:"Select Bird-Safe Design for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:D,newValue:[U.toString(),W,k],groupId:u.foundationId,undo:()=>{for(const[j,B]of L.oldValues.entries()){const O=B;T(j,Number(O[0]),O[1],O[2])}},redo:()=>{if(L.groupId){const j=L.newValue;w(L.groupId,Number(j[0]),j[1],j[2])}}};r(L),w(u.foundationId,U,W,k),s(l+1)}break}default:{const D=o(u.id),L=D?D.birdSafe??uc.None:u.birdSafe??uc.None,j=D?D.bladeColor??t9:u.bladeColor??t9,B=D?D.stripeColor??n9:u.stripeColor??n9,O=[L.toString(),j,B],V={name:"Select Bird-Safe Design for Wind Turbine",timestamp:Date.now(),oldValue:O,newValue:[U.toString(),W,k],changedElementId:u.id,changedElementType:u.type,undo:()=>{const G=V.oldValue;T(V.changedElementId,Number(G[0]),G[1],G[2])},redo:()=>{T(V.changedElementId,U,W,k)}};r(V),T(u.id,U,W,k),s(l+1);break}}e(D=>{D.actionState.windTurbineBirdSafeDesign=U,D.actionState.windTurbineBladeColor=W,D.actionState.windTurbineStripeColor=k})}},H=()=>{t(!1)},F=()=>{H(),c()},E=()=>{R(d,p,A),t(!1),s(0)},N=()=>{R(d,p,A)};return h.jsx(so,{width:600,title:Y.t("windTurbineMenu.BirdSafeDesign",S),onApply:N,onClose:H,onClickCancel:F,onClickOk:E,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:8,children:[h.jsxs("span",{children:[Y.t("word.Pattern",S),": "]}),h.jsxs(Uo,{style:{width:"116px"},value:d,onChange:U=>{U!==null&&f(U)},children:[h.jsx(C,{value:uc.None,children:Y.t("windTurbineMenu.BirdSafeNone",S)},uc.None),h.jsx(C,{value:uc.Bicolor,children:Y.t("windTurbineMenu.BirdSafeBicolor",S)},uc.Bicolor),h.jsx(C,{value:uc.Striped,children:Y.t("windTurbineMenu.BirdSafeStriped",S)},uc.Striped)]}),h.jsxs("div",{style:{marginTop:"10px"},children:[h.jsxs("span",{children:[Y.t("word.Color",S)," 1: "]}),h.jsx("input",{type:"color",value:p,onChange:U=>{g(U.target.value)}})]}),h.jsxs("div",{style:{marginTop:"10px"},children:[h.jsxs("span",{children:[Y.t("word.Color",S)," 2: "]}),h.jsx("input",{type:"color",value:A,onChange:U=>{y(U.target.value)}})]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:P,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",S)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",S)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",S)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",S)})]})})})]})})},Ugo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=uo(z.WindTurbine),[d,f]=m.useState((u==null?void 0:u.towerHeight)??0),p=m.useRef(!1),g=m.useRef(),A=$t(),y=E=>{a(E.target.value)},S=E=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const N of n)if(N.type===z.WindTurbine&&!N.locked&&M.getState().selectedElementIdSet.has(N.id)&&Math.abs(N.towerHeight-E)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const N of n)if(N.type===z.WindTurbine&&N.foundationId===(u==null?void 0:u.foundationId)&&!N.locked&&Math.abs(N.towerHeight-E)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const N of n)if(N.type===z.WindTurbine&&!N.locked&&M.getState().selectedElementIdSet.has(N.id)&&Math.abs(N.towerHeight-E)>Et)return!0;break;default:if(Math.abs((u==null?void 0:u.towerHeight)-E)>Et)return!0}return!1}},C=(E,N)=>{e(U=>{for(const W of U.elements)if(W.type===z.WindTurbine&&W.id===E&&!W.locked){const k=W;k.towerHeight=N,k.lz=N+k.bladeRadius;break}})},P=(E,N)=>{e(U=>{for(const W of U.elements)if(W.type===z.WindTurbine&&W.foundationId===E&&!W.locked){const k=W;k.towerHeight=N,k.lz=N+k.bladeRadius}})},v=E=>{e(N=>{for(const U of N.elements)if(U.type===z.WindTurbine&&!U.locked){const W=U;W.towerHeight=E,W.lz=E+W.bladeRadius}})},T=(E,N)=>{M.getState().set(U=>{for(const W of U.elements)if(W.type===z.WindTurbine&&!W.locked&&E.has(W.id)){const k=W;k.towerHeight=N,k.lz=N+k.bladeRadius}})},w=E=>{if(u&&S(E)){switch(g.current=void 0,i){case re.AllSelectedObjectsOfThisType:{p.current=!1;for(const N of n)if(N.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(N.id)&&N.bladeRadius>E){p.current=!0;break}if(p.current)g.current=E,f(u.towerHeight);else{const N=new Map;for(const W of n)W.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(W.id)&&N.set(W.id,W.towerHeight);const U={name:"Set Tower Height for Selected Wind Turbines",timestamp:Date.now(),oldValues:N,newValue:E,undo:()=>{for(const[W,k]of U.oldValues.entries())C(W,k)},redo:()=>{T(U.oldValues,U.newValue)}};r(U),T(N,E),s(l+1)}break}case re.AllObjectsOfThisType:{p.current=!1;for(const N of n)if(N.type===z.WindTurbine&&N.bladeRadius>E){p.current=!0;break}if(p.current)g.current=E,f(u.towerHeight);else{const N=new Map;for(const W of n)W.type===z.WindTurbine&&N.set(W.id,W.towerHeight);const U={name:"Set Tower Height for All Wind Turbines",timestamp:Date.now(),oldValues:N,newValue:E,undo:()=>{for(const[W,k]of U.oldValues.entries())C(W,k)},redo:()=>{v(U.newValue)}};r(U),v(E),s(l+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){p.current=!1;for(const N of n)if(N.type===z.WindTurbine&&N.foundationId===u.foundationId&&N.bladeRadius>E){p.current=!0;break}if(p.current)g.current=E,f(u.towerHeight);else{const N=new Map;for(const W of n)W.type===z.WindTurbine&&W.foundationId===u.foundationId&&N.set(W.id,W.towerHeight);const U={name:"Set Tower Height for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:N,newValue:E,groupId:u.foundationId,undo:()=>{for(const[W,k]of U.oldValues.entries())C(W,k)},redo:()=>{U.groupId&&P(U.groupId,U.newValue)}};r(U),P(u.foundationId,E),s(l+1)}}break}default:{const N=o(u.id),U=N?N.towerHeight:u.towerHeight;if(p.current=u.bladeRadius>E,p.current)g.current=E,f(U);else{const W={name:"Set Wind Turbine Tower Height",timestamp:Date.now(),oldValue:U,newValue:E,changedElementId:u.id,changedElementType:u.type,undo:()=>{C(W.changedElementId,W.oldValue)},redo:()=>{C(W.changedElementId,W.newValue)}};r(W),C(u.id,E),s(l+1)}break}}e(N=>{N.actionState.windTurbineTowerHeight=E})}},x=()=>{p.current=!1,t(!1)},b=()=>{x(),c()},R=()=>{w(d),p.current||(t(!1),s(0))},H=()=>{w(d)},F=p.current?": "+Y.t("message.NotApplicableToSelectedAction",A)+(g.current!==void 0?" ("+g.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("windTurbineMenu.TowerHeight",A),rejectedMessage:F,onApply:H,onClose:x,onClickCancel:b,onClickOk:R,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:100,style:{width:120},step:.1,precision:1,value:d,onChange:E=>{E!==null&&f(E)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [1, 100] ",Y.t("word.MeterAbbreviation",A)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",A)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",A)})]})})})]})})},jgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=uo(z.WindTurbine),[d,f]=m.useState((u==null?void 0:u.towerRadius)??0),p=$t(),g=R=>{a(R.target.value)},A=R=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const H of n)if(H.type===z.WindTurbine&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&Math.abs(H.towerRadius-R)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const H of n)if(H.type===z.WindTurbine&&H.foundationId===(u==null?void 0:u.foundationId)&&!H.locked&&Math.abs(H.towerRadius-R)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const H of n)if(H.type===z.WindTurbine&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&Math.abs(H.towerRadius-R)>Et)return!0;break;default:if(Math.abs((u==null?void 0:u.towerRadius)-R)>Et)return!0}return!1}},y=(R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&E.id===R&&!E.locked){const N=E;N.towerRadius=H;break}})},S=(R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&E.foundationId===R&&!E.locked){const N=E;N.towerRadius=H}})},C=R=>{e(H=>{for(const F of H.elements)if(F.type===z.WindTurbine&&!F.locked){const E=F;E.towerRadius=R}})},P=(R,H)=>{M.getState().set(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&!E.locked&&R.has(E.id)){const N=E;N.towerRadius=H}})},v=R=>{if(u&&A(R)){switch(i){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(E.id)&&H.set(E.id,E.towerRadius);const F={name:"Set Tower Radius for Selected Wind Turbines",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{P(F.oldValues,F.newValue)}};r(F),P(H,R),s(l+1);break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.WindTurbine&&H.set(E.id,E.towerRadius);const F={name:"Set Tower Radius for All Wind Turbines",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{C(F.newValue)}};r(F),C(R),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const H=new Map;for(const E of n)E.type===z.WindTurbine&&E.foundationId===u.foundationId&&H.set(E.id,E.towerRadius);const F={name:"Set Tower Radius for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:H,newValue:R,groupId:u.foundationId,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{F.groupId&&S(F.groupId,F.newValue)}};r(F),S(u.foundationId,R),s(l+1)}break}default:{const H=o(u.id),F=H?H.towerRadius:u.towerRadius,E={name:"Set Wind Turbine Tower Radius",timestamp:Date.now(),oldValue:F,newValue:R,changedElementId:u.id,changedElementType:u.type,undo:()=>{y(E.changedElementId,E.oldValue)},redo:()=>{y(E.changedElementId,E.newValue)}};r(E),y(u.id,R),s(l+1);break}}e(H=>{H.actionState.windTurbineTowerRadius=R})}},T=()=>{t(!1)},w=()=>{T(),c()},x=()=>{v(d),t(!1),s(0)},b=()=>{v(d)};return h.jsx(so,{width:550,title:Y.t("windTurbineMenu.TowerRadius",p),onApply:b,onClose:T,onClickCancel:w,onClickOk:x,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:2,style:{width:120},step:.01,precision:2,value:d,onChange:R=>{R!==null&&f(R)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [0.1, 2] ",Y.t("word.MeterAbbreviation",p)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",p)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:g,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",p)})]})})})]})})},Bgo=t=>{const e=[];if(t.type!==z.WindTurbine)return{items:e};const n=t,o={lng:M.getState().language},r=!n.locked;return e.push({key:"wind-turbine-copy",label:h.jsx(Fd,{})}),r&&e.push({key:"wind-turbine-cut",label:h.jsx(kd,{})}),e.push({key:"wind-turbine-lock",label:h.jsx(Ku,{selectedElement:n})}),r&&e.push({key:"wind-turbine-relative-yaw-angle",label:h.jsxs(eo,{Dialog:zgo,children:[Y.t("windTurbineMenu.RelativeYawAngle",o)," ..."]})},{key:"wind-turbine-rotor-submenu",label:h.jsx(an,{children:Y.t("windTurbineMenu.Rotor",o)}),children:[{key:"wind-turbine-rotor-blade-number",label:h.jsxs(eo,{noPadding:!0,Dialog:Dgo,children:[Y.t("windTurbineMenu.BladeNumber",o)," ..."]})},{key:"wind-turbine-rotor-initial-angle",label:h.jsxs(eo,{noPadding:!0,Dialog:Ego,children:[Y.t("windTurbineMenu.RotorInitialAngle",o)," ..."]})},{key:"wind-turbine-rotor-blade-pitch-angle",label:h.jsxs(eo,{noPadding:!0,Dialog:Fgo,children:[Y.t("windTurbineMenu.RotorBladePitchAngle",o)," ..."]})},{key:"wind-turbine-rotor-blade-radius",label:h.jsxs(eo,{noPadding:!0,Dialog:kgo,children:[Y.t("windTurbineMenu.RotorBladeRadius",o)," ..."]})},{key:"wind-turbine-rotor-blade-design",label:h.jsxs(eo,{noPadding:!0,Dialog:Lgo,children:[Y.t("windTurbineMenu.RotorBladeDesign",o)," ..."]})},{key:"wind-turbine-hub-design",label:h.jsxs(eo,{noPadding:!0,Dialog:Wgo,children:[Y.t("windTurbineMenu.HubDesign",o)," ..."]})},{key:"wind-turbine-bird-safe-blade",label:h.jsxs(eo,{noPadding:!0,Dialog:Ngo,children:[Y.t("windTurbineMenu.BirdSafeDesign",o)," ..."]})}]},{key:"wind-turbine-tower-submenu",label:h.jsx(an,{children:Y.t("windTurbineMenu.Tower",o)}),children:[{key:"wind-turbine-tower-height",label:h.jsxs(eo,{noPadding:!0,Dialog:Ugo,children:[Y.t("windTurbineMenu.TowerHeight",o)," ..."]})},{key:"wind-turbine-tower-radius",label:h.jsxs(eo,{noPadding:!0,Dialog:jgo,children:[Y.t("windTurbineMenu.TowerRadius",o)," ..."]})}]},{key:"wind-turbine-label",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",o)}),children:v3(n)}),{items:e}},Ygo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(En),a=M(Yge),l=M(Oge),s=M(no),c=M(Qn),u=M(Xi),d=uo(z.SolarWaterHeater),[f,p]=m.useState((d==null?void 0:d.lx)??1),g=m.useRef(!1),A=m.useRef(),y=$t(),S=(k,D)=>{e(L=>{for(const j of L.elements)if(j.type===z.SolarWaterHeater&&j.id===k&&!j.locked){j.lx=D;break}})},C=(k,D)=>{e(L=>{for(const j of L.elements)j.type===z.SolarWaterHeater&&j.foundationId===k&&!j.locked&&(j.lx=D)})},P=(k,D,L)=>{e(j=>{for(const B of j.elements)if(B.type===z.SolarWaterHeater&&!B.locked){let O;D?O=B.parentId===k&&ye.isIdentical(B.normal,D):O=B.parentId===k,O&&(B.lx=L)}})},v=k=>{e(D=>{for(const L of D.elements)L.type===z.SolarWaterHeater&&!L.locked&&(L.lx=k)})},T=(k,D)=>{M.getState().set(L=>{for(const j of L.elements)j.type===z.SolarWaterHeater&&!j.locked&&k.has(j.id)&&(j.lx=D)})},w=k=>{l(k.target.value)},x=(k,D)=>{const L=r(k);if(L){if(L.type===z.Cuboid&&!ye.isIdentical(k.normal,as))return!0;const j=JSON.parse(JSON.stringify(k));return j.lx=D,L.type===z.Roof?!0:ye.isSolarCollectorWithinHorizontalSurface(j,L)}return!1},b=(k,D)=>!x(k,D),R=k=>{if(d){switch(a){case re.AllSelectedObjectsOfThisType:{for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&M.getState().selectedElementIdSet.has(D.id)&&Math.abs(D.lx-k)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&Math.abs(D.lx-k)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const D of n)if(D.type===z.SolarWaterHeater&&D.foundationId===(d==null?void 0:d.foundationId)&&!D.locked&&Math.abs(D.lx-k)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const D=r(d);if(D){if(D.type===z.Cuboid){for(const j of n)if(j.type===z.SolarWaterHeater&&j.parentId===d.parentId&&ye.isIdentical(j.normal,d.normal)&&!j.locked&&Math.abs(j.lx-k)>Et)return!0}else for(const j of n)if(j.type===z.SolarWaterHeater&&j.parentId===d.parentId&&!j.locked&&Math.abs(j.lx-k)>Et)return!0}break}default:{if(Math.abs((d==null?void 0:d.lx)-k)>Et)return!0;break}}return!1}},H=k=>{if(d&&R(k))switch(A.current=void 0,a){case re.AllSelectedObjectsOfThisType:{g.current=!1;for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&M.getState().selectedElementIdSet.has(D.id)&&b(D,k)){g.current=!0;break}if(g.current)A.current=k,p(d.lx);else{const D=new Map;for(const j of n)j.type===z.SolarWaterHeater&&M.getState().selectedElementIdSet.has(j.id)&&D.set(j.id,j.lx);const L={name:"Set Length for Selected Water Heater",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())S(j,B)},redo:()=>{T(L.oldValues,L.newValue)}};i(L),T(D,k),c(s+1)}break}case re.AllObjectsOfThisType:{g.current=!1;for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&b(D,k)){g.current=!0;break}if(g.current)A.current=k,p(d.lx);else{const D=new Map;for(const j of n)j.type===z.SolarWaterHeater&&M.getState().selectedElementIdSet.has(j.id)&&D.set(j.id,j.lx);const L={name:"Set Length for All Water Heater",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())S(j,B)},redo:()=>{v(L.newValue)}};i(L),v(k),c(s+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(d.foundationId){g.current=!1;for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&D.foundationId===d.foundationId&&b(D,k)){g.current=!0;break}if(g.current)A.current=k,p(d.lx);else{const D=new Map;for(const j of n)j.type===z.SolarWaterHeater&&j.foundationId===d.foundationId&&D.set(j.id,j.lx);const L={name:"Set Length for All Water Heater Above Foundation",timestamp:Date.now(),oldValues:D,newValue:k,groupId:d.foundationId,undo:()=>{for(const[j,B]of L.oldValues.entries())S(j,B)},redo:()=>{L.groupId&&C(L.groupId,L.newValue)}};i(L),C(d.foundationId,k),c(s+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{const D=r(d);if(D){if(g.current=!1,D.type===z.Cuboid){for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&j.parentId===d.parentId&&ye.isIdentical(j.normal,d.normal)&&b(j,k)){g.current=!0;break}}else for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&j.parentId===d.parentId&&b(j,k)){g.current=!0;break}if(g.current)A.current=k,p(d.lx);else{const j=new Map,B=D.type===z.Cuboid;if(B)for(const G of n)G.type===z.SolarWaterHeater&&G.parentId===d.parentId&&ye.isIdentical(G.normal,d.normal)&&j.set(G.id,G.lx);else for(const G of n)G.type===z.SolarWaterHeater&&G.parentId===d.parentId&&j.set(G.id,G.lx);const O=B?d.normal:void 0,V={name:"Set Length for All Water Heater on Surface",timestamp:Date.now(),oldValues:j,newValue:k,groupId:d.parentId,normal:O,undo:()=>{for(const[G,Q]of V.oldValues.entries())S(G,Q)},redo:()=>{V.groupId&&P(V.groupId,V.normal,V.newValue)}};i(V),P(d.parentId,O,k),c(s+1)}}break}default:{const D=o(d.id),L=D?D.lx:d.lx;if(g.current=b(d,k),g.current)A.current=k,p(L);else{const j={name:"Set Water Heater Length",timestamp:Date.now(),oldValue:L,newValue:k,changedElementId:d.id,changedElementType:d.type,undo:()=>{S(j.changedElementId,j.oldValue)},redo:()=>{S(j.changedElementId,j.newValue)}};i(j),S(d.id,k),c(s+1)}break}}},F=()=>{g.current=!1,t(!1)},E=()=>{F(),u()},N=()=>{H(f),g.current||(t(!1),c(0))},U=()=>{H(f)},W=g.current?": "+Y.t("message.NotApplicableToSelectedAction",y)+(A.current!==void 0?" ("+A.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("word.Length",y),rejectedMessage:W,onApply:U,onClose:F,onClickCancel:E,onClickOk:N,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:6,children:h.jsx(Sn,{min:0,max:100,step:.1,style:{width:120},precision:2,value:f,onChange:k=>{k!==null&&p(k)}})}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",y)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:w,value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarWaterHeaterMenu.OnlyThisSolarWaterHeater",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersOnSurface",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersAboveFoundation",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSelectedSolarWaterHeaters",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeaters",y)})]})})})]})})},Ogo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(En),a=M(vh),l=M(xh),s=M(no),c=M(Qn),u=M(Xi),d=uo(z.SolarWaterHeater),[f,p]=m.useState(0),[g,A]=m.useState((d==null?void 0:d.ly)??1),y=m.useRef(!1),S=m.useRef(),C=$t();m.useEffect(()=>{d&&p(Number((d.lz-.3).toFixed(2)))},[d]);const P=(L,j)=>{e(B=>{for(const O of B.elements)if(O.type===z.SolarWaterHeater&&O.id===L&&!O.locked){O.ly=j;break}})},v=(L,j)=>{e(B=>{for(const O of B.elements)O.type===z.SolarWaterHeater&&O.foundationId===L&&!O.locked&&(O.ly=j)})},T=(L,j,B)=>{e(O=>{for(const V of O.elements)if(V.type===z.SolarWaterHeater&&!V.locked){let G;j?G=V.parentId===L&&ye.isIdentical(V.normal,j):G=V.parentId===L,G&&(V.ly=B)}})},w=L=>{e(j=>{for(const B of j.elements)B.type===z.SolarWaterHeater&&!B.locked&&(B.ly=L)})},x=(L,j)=>{M.getState().set(B=>{for(const O of B.elements)O.type===z.SolarWaterHeater&&!O.locked&&L.has(O.id)&&(O.ly=j)})},b=L=>{l(L.target.value)},R=(L,j)=>{const B=r(L);if(B){if(B.type===z.Cuboid&&!ye.isIdentical(L.normal,as))return!0;const O=JSON.parse(JSON.stringify(L));return O.ly=j,B.type===z.Roof?!0:ye.isSolarCollectorWithinHorizontalSurface(O,B)}return!1},H=(L,j)=>!R(L,j),F=L=>{if(d){switch(a){case re.AllSelectedObjectsOfThisType:{for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&M.getState().selectedElementIdSet.has(j.id)&&Math.abs(j.ly-L)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&Math.abs(j.ly-L)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const j of n)if(j.type===z.SolarWaterHeater&&j.foundationId===(d==null?void 0:d.foundationId)&&!j.locked&&Math.abs(j.ly-L)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const j=r(d);if(j){if(j.type===z.Cuboid){for(const O of n)if(O.type===z.SolarWaterHeater&&O.parentId===d.parentId&&ye.isIdentical(O.normal,d.normal)&&!O.locked&&Math.abs(O.ly-L)>Et)return!0}else for(const O of n)if(O.type===z.SolarWaterHeater&&O.parentId===d.parentId&&!O.locked&&Math.abs(O.ly-L)>Et)return!0}break}default:{if(Math.abs((d==null?void 0:d.ly)-L)>Et)return!0;break}}return!1}},E=L=>{if(d&&F(L))switch(S.current=void 0,a){case re.AllSelectedObjectsOfThisType:{y.current=!1;for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&M.getState().selectedElementIdSet.has(j.id)&&H(j,L)){y.current=!0;break}if(y.current)S.current=L,A(d.ly);else{const j=new Map;for(const O of n)O.type===z.SolarWaterHeater&&!O.locked&&M.getState().selectedElementIdSet.has(O.id)&&j.set(O.id,O.ly);const B={name:"Set Width for Selected Water Heater",timestamp:Date.now(),oldValues:j,newValue:L,undo:()=>{for(const[O,V]of B.oldValues.entries())P(O,V)},redo:()=>{x(B.oldValues,B.newValue)}};i(B),x(j,L),c(s+1)}break}case re.AllObjectsOfThisType:{y.current=!1;for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&H(j,L)){y.current=!0;break}if(y.current)S.current=L,A(d.ly);else{const j=new Map;for(const O of n)O.type===z.SolarWaterHeater&&!O.locked&&j.set(O.id,O.ly);const B={name:"Set Length for All Water Heater",timestamp:Date.now(),oldValues:j,newValue:L,undo:()=>{for(const[O,V]of B.oldValues.entries())P(O,V)},redo:()=>{w(B.newValue)}};i(B),w(L),c(s+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(d.foundationId){y.current=!1;for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&j.foundationId===d.foundationId&&H(j,L)){y.current=!0;break}if(y.current)S.current=L,A(d.ly);else{const j=new Map;for(const O of n)O.type===z.SolarWaterHeater&&!O.locked&&O.foundationId===d.foundationId&&j.set(O.id,O.ly);const B={name:"Set Width for All Water Heater Above Foundation",timestamp:Date.now(),oldValues:j,newValue:L,groupId:d.foundationId,undo:()=>{for(const[O,V]of B.oldValues.entries())P(O,V)},redo:()=>{B.groupId&&v(B.groupId,B.newValue)}};i(B),v(d.foundationId,L),c(s+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{const j=r(d);if(j){if(y.current=!1,j.type===z.Cuboid){for(const O of n)if(O.type===z.SolarWaterHeater&&O.parentId===d.parentId&&ye.isIdentical(O.normal,d.normal)&&!O.locked&&H(O,L)){y.current=!0;break}}else for(const O of n)if(O.type===z.SolarWaterHeater&&O.parentId===d.parentId&&!O.locked&&H(O,L)){y.current=!0;break}if(y.current)S.current=L,A(d.ly);else{const O=new Map,V=j.type===z.Cuboid;if(V)for(const $ of n)$.type===z.SolarWaterHeater&&$.parentId===d.parentId&&ye.isIdentical($.normal,d.normal)&&!$.locked&&O.set($.id,$.ly);else for(const $ of n)$.type===z.SolarWaterHeater&&$.parentId===d.parentId&&!$.locked&&O.set($.id,$.ly);const G=V?d.normal:void 0,Q={name:"Set Width for All Water Heater on Surface",timestamp:Date.now(),oldValues:O,newValue:L,groupId:d.parentId,normal:G,undo:()=>{for(const[$,ie]of Q.oldValues.entries())P($,ie)},redo:()=>{Q.groupId&&T(Q.groupId,Q.normal,Q.newValue)}};i(Q),T(d.parentId,G,L),c(s+1)}}break}default:{const j=o(d.id),B=j?j.ly:d.ly;if(y.current=H(d,L),y.current)S.current=L,A(B);else{const O={name:"Set Water Heater Width",timestamp:Date.now(),oldValue:B,newValue:L,changedElementId:d.id,changedElementType:d.type,undo:()=>{P(O.changedElementId,O.oldValue)},redo:()=>{P(O.changedElementId,O.newValue)}};i(O),P(d.id,L),c(s+1)}break}}},N=()=>{y.current=!1,t(!1)},U=()=>{N(),u()},W=()=>{E(g),y.current||(t(!1),c(0))},k=()=>{E(g)},D=y.current?": "+Y.t("message.NotApplicableToSelectedAction",C)+(S.current!==void 0?" ("+S.current.toFixed(2)+")":""):null;return console.log("min",f),h.jsx(so,{width:550,title:Y.t("word.Width",C),rejectedMessage:D,onApply:k,onClose:N,onClickCancel:U,onClickOk:W,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:6,children:h.jsx(Sn,{min:f,max:100,step:.1,style:{width:120},precision:2,value:g,onChange:L=>{L!==null&&A(L)}})}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",C)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:b,value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarWaterHeaterMenu.OnlyThisSolarWaterHeater",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersOnSurface",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersAboveFoundation",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSelectedSolarWaterHeaters",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeaters",C)})]})})})]})})},Vgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Qq),i=M(yYe),a=M(AYe),l=M(wYe),s=M(Gr),c=M(En),u=M(Yge),d=M(Oge),f=M(no),p=M(Qn),g=M(Xi),A=uo(z.SolarWaterHeater),y=m.useRef(!1),S=m.useRef(),[C,P]=m.useState(A?-A.relativeAzimuth:0),v=$t(),T=k=>{d(k.target.value)},w=(k,D)=>{const L=s(k);if(L){if(L.type===z.Cuboid&&!ye.isIdentical(k.normal,as))return!0;const j=JSON.parse(JSON.stringify(k));return j.relativeAzimuth=-D,L.type===z.Roof?!0:ye.isSolarCollectorWithinHorizontalSurface(j,L)}return!1},x=(k,D)=>!w(k,D),b=k=>{if(A){switch(u){case re.AllSelectedObjectsOfThisType:for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&M.getState().selectedElementIdSet.has(D.id)&&Math.abs(-D.relativeAzimuth-k)>Et)return!0;break;case re.AllObjectsOfThisType:for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&Math.abs(-D.relativeAzimuth-k)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const D of n)if(D.type===z.SolarWaterHeater&&D.foundationId===(A==null?void 0:A.foundationId)&&!D.locked&&Math.abs(-D.relativeAzimuth-k)>Et)return!0;break;case re.AllObjectsOfThisTypeOnSurface:if(A!=null&&A.parentId){const D=s(A);if(D){if(D.type===z.Cuboid){for(const j of n)if(j.type===z.SolarWaterHeater&&j.parentId===A.parentId&&ye.isIdentical(j.normal,A.normal)&&!j.locked&&Math.abs(-j.relativeAzimuth-k)>Et)return!0}else for(const j of n)if(j.type===z.SolarWaterHeater&&j.parentId===A.parentId&&!j.locked&&Math.abs(-j.relativeAzimuth-k)>Et)return!0}}break;default:if(Math.abs(-(A==null?void 0:A.relativeAzimuth)-k)>Et)return!0}return!1}},R=(k,D)=>{M.getState().set(L=>{for(const j of L.elements)if(j.type===z.SolarWaterHeater&&!j.locked&&k.has(j.id)){const B=j;B.relativeAzimuth=D}})},H=k=>{if(A&&b(k)){switch(S.current=void 0,u){case re.AllSelectedObjectsOfThisType:{y.current=!1;for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&M.getState().selectedElementIdSet.has(D.id)&&x(D,k)){y.current=!0;break}if(y.current)S.current=k,P(-A.relativeAzimuth);else{const D=new Map;for(const j of n)j.type===z.SolarWaterHeater&&M.getState().selectedElementIdSet.has(j.id)&&D.set(j.id,-j.relativeAzimuth);const L={name:"Set Relative Azimuth for Selected Water Heater",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())r(j,-B)},redo:()=>{R(L.oldValues,L.newValue)}};c(L),R(D,-k),p(f+1)}break}case re.AllObjectsOfThisType:{y.current=!1;for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&x(D,k)){y.current=!0;break}if(y.current)S.current=k,P(-A.relativeAzimuth);else{const D=new Map;for(const j of n)j.type===z.SolarWaterHeater&&D.set(j.id,-j.relativeAzimuth);const L={name:"Set Relative Azimuth for All Water Heater",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())r(j,-B)},redo:()=>{l(z.SolarWaterHeater,-L.newValue)}};c(L),l(z.SolarWaterHeater,-k),p(f+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(A.foundationId){y.current=!1;for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&D.foundationId===A.foundationId&&x(D,k)){y.current=!0;break}if(y.current)S.current=k,P(-A.relativeAzimuth);else{const D=new Map;for(const j of n)j.type===z.SolarWaterHeater&&j.foundationId===A.foundationId&&D.set(j.id,-j.relativeAzimuth);const L={name:"Set Relative Azimuth for All Water Heater Above Foundation",timestamp:Date.now(),oldValues:D,newValue:k,groupId:A.foundationId,undo:()=>{for(const[j,B]of L.oldValues.entries())r(j,-B)},redo:()=>{L.groupId&&a(z.SolarWaterHeater,L.groupId,-L.newValue)}};c(L),a(z.SolarWaterHeater,A.foundationId,-k),p(f+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{if(A.parentId){const D=s(A);if(D){if(y.current=!1,D.type===z.Cuboid){for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&j.parentId===A.parentId&&ye.isIdentical(j.normal,A.normal)&&x(j,k)){y.current=!0;break}}else for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&j.parentId===A.parentId&&x(j,k)){y.current=!0;break}if(y.current)S.current=k,P(-A.relativeAzimuth);else{const j=new Map,B=D.type===z.Cuboid;if(B)for(const G of n)G.type===z.SolarWaterHeater&&G.parentId===A.parentId&&ye.isIdentical(G.normal,A.normal)&&j.set(G.id,-G.relativeAzimuth);else for(const G of n)G.type===z.SolarWaterHeater&&G.parentId===A.parentId&&j.set(G.id,-G.relativeAzimuth);const O=B?A.normal:void 0,V={name:"Set Relative Azimuth for All Water Heater on Surface",timestamp:Date.now(),oldValues:j,newValue:k,groupId:A.parentId,normal:O,undo:()=>{for(const[G,Q]of V.oldValues.entries())r(G,-Q)},redo:()=>{V.groupId&&i(z.SolarWaterHeater,V.groupId,V.normal,-V.newValue)}};c(V),i(z.SolarWaterHeater,A.parentId,O,-k),p(f+1)}}}break}default:{const D=o(A.id),L=D?-D.relativeAzimuth:-A.relativeAzimuth;if(y.current=x(A,k),y.current)S.current=k,P(L);else{const j={name:"Set Solar Panel Array Relative Azimuth",timestamp:Date.now(),oldValue:L,newValue:k,changedElementId:A.id,changedElementType:A.type,undo:()=>{r(j.changedElementId,-j.oldValue)},redo:()=>{r(j.changedElementId,-j.newValue)}};c(j),r(A.id,-k),p(f+1)}break}}e(D=>{D.actionState.solarWaterHeaterRelativeAzimuth=-k})}},F=()=>{y.current=!1,t(!1)},E=()=>{F(),g()},N=()=>{H(C),y.current||(t(!1),p(0))},U=()=>{H(C)},W=y.current?": "+Y.t("message.NotApplicableToSelectedAction",v)+(S.current!==void 0?" ("+ye.toDegrees(S.current).toFixed(1)+"°)":null):null;return h.jsx(so,{width:550,title:Y.t("solarCollectorMenu.RelativeAzimuth",v),rejectedMessage:W,onApply:U,onClose:F,onClickCancel:E,onClickOk:N,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:-180,max:180,style:{width:120},precision:2,step:1,value:parseFloat(ye.toDegrees(C).toFixed(2)),formatter:k=>`${k}°`,onChange:k=>{k!==null&&P(ye.toRadians(k))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",v),": [-180°, 180°]",h.jsx("br",{}),Y.t("message.AzimuthOfNorthIsZero",v),h.jsx("br",{}),Y.t("message.CounterclockwiseAzimuthIsPositive",v)]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:18,children:h.jsx(Le.Group,{onChange:T,value:u,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarWaterHeaterMenu.OnlyThisSolarWaterHeater",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersOnSurface",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersAboveFoundation",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSelectedSolarWaterHeaters",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeaters",v)})]})})})]})})},_go=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(En),a=M(Yge),l=M(Oge),s=M(no),c=M(Qn),u=M(Xi),d=uo(z.SolarWaterHeater),[f,p]=m.useState((d==null?void 0:d.lz)??1),g=m.useRef(!1),A=m.useRef(),y=$t(),S=(k,D)=>{e(L=>{for(const j of L.elements)if(j.type===z.SolarWaterHeater&&j.id===k&&!j.locked){j.lz=D;break}})},C=(k,D)=>{e(L=>{for(const j of L.elements)j.type===z.SolarWaterHeater&&j.foundationId===k&&!j.locked&&(j.lz=D)})},P=(k,D,L)=>{e(j=>{for(const B of j.elements)if(B.type===z.SolarWaterHeater&&!B.locked){let O;D?O=B.parentId===k&&ye.isIdentical(B.normal,D):O=B.parentId===k,O&&(B.lz=L)}})},v=k=>{e(D=>{for(const L of D.elements)L.type===z.SolarWaterHeater&&!L.locked&&(L.lz=k)})},T=(k,D)=>{M.getState().set(L=>{for(const j of L.elements)j.type===z.SolarWaterHeater&&!j.locked&&k.has(j.id)&&(j.lz=D)})},w=k=>{l(k.target.value)},x=(k,D)=>{const L=r(k);if(L){if(L.type===z.Cuboid&&!ye.isIdentical(k.normal,as))return!0;const j=JSON.parse(JSON.stringify(k));return j.lz=D,L.type===z.Roof?!0:ye.isSolarCollectorWithinHorizontalSurface(j,L)}return!1},b=(k,D)=>!x(k,D),R=k=>{if(d){switch(a){case re.AllSelectedObjectsOfThisType:{for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&M.getState().selectedElementIdSet.has(D.id)&&Math.abs(D.lz-k)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&Math.abs(D.lz-k)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const D of n)if(D.type===z.SolarWaterHeater&&D.foundationId===(d==null?void 0:d.foundationId)&&!D.locked&&Math.abs(D.lz-k)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const D=r(d);if(D){if(D.type===z.Cuboid){for(const j of n)if(j.type===z.SolarWaterHeater&&j.parentId===d.parentId&&ye.isIdentical(j.normal,d.normal)&&!j.locked&&Math.abs(j.lz-k)>Et)return!0}else for(const j of n)if(j.type===z.SolarWaterHeater&&j.parentId===d.parentId&&!j.locked&&Math.abs(j.lz-k)>Et)return!0}break}default:{if(Math.abs((d==null?void 0:d.lz)-k)>Et)return!0;break}}return!1}},H=k=>{if(d&&R(k)){switch(A.current=void 0,a){case re.AllSelectedObjectsOfThisType:{g.current=!1;for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&M.getState().selectedElementIdSet.has(D.id)&&b(D,k)){g.current=!0;break}if(g.current)A.current=k,p(d.lz);else{const D=new Map;for(const j of n)j.type===z.SolarWaterHeater&&M.getState().selectedElementIdSet.has(j.id)&&D.set(j.id,j.lz);const L={name:"Set Height for Selected Water Heater",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())S(j,B)},redo:()=>{T(L.oldValues,L.newValue)}};i(L),T(D,k),c(s+1)}break}case re.AllObjectsOfThisType:{g.current=!1;for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&b(D,k)){g.current=!0;break}if(g.current)A.current=k,p(d.lz);else{const D=new Map;for(const j of n)j.type===z.SolarWaterHeater&&D.set(j.id,j.lz);const L={name:"Set Height for All Water Heater",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())S(j,B)},redo:()=>{v(L.newValue)}};i(L),v(k),c(s+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(d.foundationId){g.current=!1;for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&D.foundationId===d.foundationId&&b(D,k)){g.current=!0;break}if(g.current)A.current=k,p(d.lz);else{const D=new Map;for(const j of n)j.type===z.SolarWaterHeater&&j.foundationId===d.foundationId&&D.set(j.id,j.lz);const L={name:"Set Height for All Water Heater Above Foundation",timestamp:Date.now(),oldValues:D,newValue:k,groupId:d.foundationId,undo:()=>{for(const[j,B]of L.oldValues.entries())S(j,B)},redo:()=>{L.groupId&&C(L.groupId,L.newValue)}};i(L),C(d.foundationId,k),c(s+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{const D=r(d);if(D){if(g.current=!1,D.type===z.Cuboid){for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&j.parentId===d.parentId&&ye.isIdentical(j.normal,d.normal)&&b(j,k)){g.current=!0;break}}else for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&j.parentId===d.parentId&&b(j,k)){g.current=!0;break}if(g.current)A.current=k,p(d.lz);else{const j=new Map,B=D.type===z.Cuboid;if(B)for(const G of n)G.type===z.SolarWaterHeater&&G.parentId===d.parentId&&ye.isIdentical(G.normal,d.normal)&&j.set(G.id,G.lz);else for(const G of n)G.type===z.SolarWaterHeater&&G.parentId===d.parentId&&j.set(G.id,G.lz);const O=B?d.normal:void 0,V={name:"Set Height for All Water Heater on Surface",timestamp:Date.now(),oldValues:j,newValue:k,groupId:d.parentId,normal:O,undo:()=>{for(const[G,Q]of V.oldValues.entries())S(G,Q)},redo:()=>{V.groupId&&P(V.groupId,V.normal,V.newValue)}};i(V),P(d.parentId,O,k),c(s+1)}}break}default:{const D=o(d.id),L=D?D.lz:d.lz;if(g.current=b(d,k),g.current)A.current=k,p(L);else{const j={name:"Set Water Heater Height",timestamp:Date.now(),oldValue:L,newValue:k,changedElementId:d.id,changedElementType:d.type,undo:()=>{S(j.changedElementId,j.oldValue)},redo:()=>{S(j.changedElementId,j.newValue)}};i(j),S(d.id,k),c(s+1)}break}}e(D=>{D.actionState.solarWaterHeaterHeight=k})}},F=()=>{g.current=!1,t(!1)},E=()=>{F(),u()},N=()=>{H(f),g.current||(t(!1),c(0))},U=()=>{H(f)},W=g.current?": "+Y.t("message.NotApplicableToSelectedAction",y)+(A.current!==void 0?" ("+A.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("word.Height",y),rejectedMessage:W,onApply:U,onClose:F,onClickCancel:E,onClickOk:N,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:6,children:h.jsx(Sn,{min:.6,max:10,step:.1,style:{width:120},precision:2,value:f,onChange:k=>{k!==null&&p(k)}})}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",y)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:w,value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarWaterHeaterMenu.OnlyThisSolarWaterHeater",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersOnSurface",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersAboveFoundation",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSelectedSolarWaterHeaters",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeaters",y)})]})})})]})})},Ggo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Gr),r=M(En),i=M(vh),a=M(xh),l=M(no),s=M(Qn),c=uo(z.SolarWaterHeater),[u,d]=m.useState((c==null?void 0:c.color)??"grey"),f=$t(),p=(x,b)=>{e(R=>{for(const H of R.elements)if(H.type===z.SolarWaterHeater&&H.id===x&&!H.locked){H.color=b;break}})},g=(x,b)=>{e(R=>{for(const H of R.elements)H.type===z.SolarWaterHeater&&H.foundationId===x&&!H.locked&&(H.color=b)})},A=(x,b,R)=>{e(H=>{for(const F of H.elements)if(F.type===z.SolarWaterHeater&&!F.locked){let E;b?E=F.parentId===x&&ye.isIdentical(F.normal,b):E=F.parentId===x,E&&(F.color=R)}})},y=x=>{e(b=>{for(const R of b.elements)R.type===z.SolarWaterHeater&&!R.locked&&(R.color=x)})},S=(x,b)=>{M.getState().set(R=>{for(const H of R.elements)H.type===z.SolarWaterHeater&&!H.locked&&x.has(H.id)&&(H.color=b)})},C=x=>{a(x.target.value)},P=x=>{if(c){switch(i){case re.AllSelectedObjectsOfThisType:{for(const b of n)if(b.type===z.SolarWaterHeater&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&b.color!==x)return!0;break}case re.AllObjectsOfThisType:{for(const b of n)if(b.type===z.SolarWaterHeater&&!b.locked&&b.color!==x)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const b of n)if(b.type===z.SolarWaterHeater&&b.foundationId===(c==null?void 0:c.foundationId)&&!b.locked&&b.color!==x)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const b=o(c);if(b){if(b.type===z.Cuboid){for(const H of n)if(H.type===z.SolarWaterHeater&&H.parentId===c.parentId&&ye.isIdentical(H.normal,c.normal)&&!H.locked&&H.color!==x)return!0}else for(const H of n)if(H.type===z.SolarWaterHeater&&H.parentId===c.parentId&&!H.locked&&H.color!==x)return!0}break}default:{if((c==null?void 0:c.color)!==x)return!0;break}}return!1}},v=x=>{if(c&&P(x)){switch(i){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.SolarWaterHeater&&M.getState().selectedElementIdSet.has(H.id)&&!H.locked&&b.set(H.id,H.color??"grey");const R={name:"Set Color for Selected Solar Water Heaters",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())p(H,F)},redo:()=>{S(R.oldValues,R.newValue)}};r(R),S(b,x),s(l+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.SolarWaterHeater&&!H.locked&&b.set(H.id,H.color??"grey");const R={name:"Set Color for All Solar Water Heaters",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())p(H,F)},redo:()=>{y(R.newValue)}};r(R),y(x),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(c.foundationId){const b=new Map;for(const H of n)H.type===z.SolarWaterHeater&&!H.locked&&H.foundationId===c.foundationId&&b.set(H.id,H.color??"grey");const R={name:"Set Color for All Water Heaters Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:c.foundationId,undo:()=>{for(const[H,F]of R.oldValues.entries())p(H,F)},redo:()=>{R.groupId&&g(R.groupId,R.newValue)}};r(R),g(c.foundationId,x),s(l+1)}break}case re.AllObjectsOfThisTypeOnSurface:{const b=o(c);if(b){const R=new Map,H=b.type===z.Cuboid;if(H)for(const N of n)N.type===z.SolarWaterHeater&&!N.locked&&N.parentId===c.parentId&&ye.isIdentical(N.normal,c.normal)&&R.set(N.id,N.color??"grey");else for(const N of n)N.type===z.SolarWaterHeater&&!N.locked&&N.parentId===c.parentId&&R.set(N.id,N.color??"grey");const F=H?c.normal:void 0,E={name:"Set Color for All Water Heaters on Surface",timestamp:Date.now(),oldValues:R,newValue:x,groupId:c.parentId,normal:F,undo:()=>{for(const[N,U]of E.oldValues.entries())p(N,U)},redo:()=>{E.groupId&&A(E.groupId,E.normal,E.newValue)}};r(E),A(c.parentId,F,x),s(l+1)}break}default:{const b=c?c.color:"grey",R={name:"Set Color of Selected Water Heater",timestamp:Date.now(),oldValue:b,newValue:x,changedElementId:c.id,changedElementType:c.type,undo:()=>{p(c.id,R.oldValue)},redo:()=>{p(c.id,R.newValue)}};r(R),p(c.id,x),s(l+1);break}}e(b=>{b.actionState.solarWaterHeaterColor=x})}},T=()=>{t(!1)},w=()=>{v(u)};return h.jsx(so,{width:680,title:Y.t("word.Color",f),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:10,children:h.jsx(Ld,{color:u??(c==null?void 0:c.color)??"grey",onChangeComplete:x=>{d(x.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:14,children:h.jsx(Le.Group,{onChange:C,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarWaterHeaterMenu.OnlyThisSolarWaterHeater",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersOnSurface",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersAboveFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSelectedSolarWaterHeaters",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeaters",f)})]})})})]})})},Xgo=t=>{const e=[];if(t.type!==z.SolarWaterHeater)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language},i=t.type===z.SolarWaterHeater&&ye.isIdentical(n.normal,as);return e.push({key:"water-heater-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"water-heater-cut",label:h.jsx(kd,{})}),e.push({key:"water-heater-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&(e.push({key:"water-heater-length",label:h.jsxs(eo,{Dialog:Ygo,children:[Y.t("word.Length",r)," ..."]})},{key:"water-heater-width",label:h.jsxs(eo,{Dialog:Ogo,children:[Y.t("word.Width",r)," ..."]})},{key:"water-heater-height",label:h.jsxs(eo,{Dialog:_go,children:[Y.t("word.Height",r)," ..."]})}),i&&e.push({key:"water-heater-relative-azimuth",label:h.jsxs(eo,{Dialog:Vgo,children:[Y.t("solarCollectorMenu.RelativeAzimuth",r)," ..."]})}),e.push({key:"water-heater-frame-color",label:h.jsxs(eo,{Dialog:Ggo,children:[Y.t("word.Color",r)," ..."]})}),e.push({key:"solar-water-heater-label",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",r)}),children:v3(n)})),{items:e}},Jgo=()=>{const t=M(S7t),e=uo(),n=m.useRef(t),o=m.useRef(e);return t!==null?(n.current=t,o.current=e):setTimeout(()=>{n.current=t,o.current=t===null?void 0:e},200),[n.current,o.current]},Kgo=({children:t})=>{dt(r=>r.contextMenuFlag);const[e,n]=Jgo(),o=()=>{if(!n)return e===z.Ground?$fo():e===z.Sky?opo():{items:[]};switch(e){case z.Foundation:return mfo(n);case z.Cuboid:return jfo(n);case z.Wall:return P1o(n);case z.Roof:return Igo(n);case z.SolarPanel:return ypo(n);case z.Window:return ego(n);case z.Door:return W1o(n);case z.Sensor:return Bho(n);case z.Light:return Gho(n);case z.Human:return sho(n);case z.Tree:return o1o(n);case z.Flower:return uho(n);case z.ParabolicTrough:return Rpo(n);case z.ParabolicDish:return Wpo(n);case z.FresnelReflector:return Gpo(n);case z.Heliostat:return t1o(n);case z.Polygon:return Fho(n);case z.PolygonVertex:return Nho(n);case z.WindTurbine:return Bgo(n);case z.SolarWaterHeater:return Xgo(n);default:return{items:[]}}};return h.jsx(rA,{trigger:["contextMenu"],menu:o(),overlayClassName:"my-overlay",children:t})},qgo=be.memo(Kgo);(function(){var t,e=typeof Object.defineProperties=="function"?Object.defineProperty:function(I,_,ce){I!=Array.prototype&&I!=Object.prototype&&(I[_]=ce.value)};function n(I){I=[typeof window=="object"&&window,typeof self=="object"&&self,typeof global=="object"&&global,I];for(var _=0;_>>0),P=0;function v(I,_,ce){return I.call.apply(I.bind,arguments)}function T(I,_,ce){if(!I)throw Error();if(2I.b&&(I.b++,_.next=I.a,I.a=_)}function G(){this.b=this.a=null}var Q=new O(function(){return new ie},function(I){I.reset()});G.prototype.add=function(I,_){var ce=Q.get();ce.set(I,_),this.b?this.b.next=ce:this.a=ce,this.b=ce};function $(){var I=So,_=null;return I.a&&(_=I.a,I.a=I.a.next,I.a||(I.b=null),_.next=null),_}function ie(){this.next=this.b=this.a=null}ie.prototype.set=function(I,_){this.a=I,this.b=_,this.next=null},ie.prototype.reset=function(){this.next=this.b=this.a=null};var q=Array.prototype.indexOf?function(I,_){return Array.prototype.indexOf.call(I,_,void 0)}:function(I,_){if(typeof I=="string")return typeof _!="string"||_.length!=1?-1:I.indexOf(_,0);for(var ce=0;ce_?null:typeof I=="string"?I.charAt(_):I[_]}function he(I,_){return 0<=q(I,_)}function pe(I,_){_=q(I,_);var ce;return(ce=0<=_)&&Array.prototype.splice.call(I,_,1),ce}function me(I,_){var ce=0;Z(I,function(Ce,_e){_.call(void 0,Ce,_e,I)&&Array.prototype.splice.call(I,_e,1).length==1&&ce++})}function le(I){return Array.prototype.concat.apply([],arguments)}function Te(I){var _=I.length;if(0<_){for(var ce=Array(_),Ce=0;Ce<_;Ce++)ce[Ce]=I[Ce];return ce}return[]}var ge=String.prototype.trim?function(I){return I.trim()}:function(I){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(I)[1]},Se=/&/g,Re=//g,Ae=/"/g,ue=/'/g,fe=/\x00/g,ve=/[\x00&<>"']/;function we(I,_){return I.indexOf(_)!=-1}function Pe(I,_){return I<_?-1:I>_?1:0}var Ie;e:{var Me=s.navigator;if(Me){var ze=Me.userAgent;if(ze){Ie=ze;break e}}Ie=""}function Ne(I){return we(Ie,I)}function Je(I,_){for(var ce in I)_.call(void 0,I[ce],ce,I)}function Ue(I){for(var _ in I)return!1;return!0}function nt(I){var _={},ce;for(ce in I)_[ce]=I[ce];return _}var We="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Ee(I,_){for(var ce,Ce,_e=1;_e"}else St=I===void 0?"undefined":I===null?"null":typeof I;B("Argument is not a %s (or a non-Element, non-Location mock); got: %s",_,St)}}function Oe(I,_){this.a=I===xt&&_||"",this.b=je}Oe.prototype.ta=!0,Oe.prototype.sa=function(){return this.a},Oe.prototype.toString=function(){return"Const{"+this.a+"}"};function st(I){return I instanceof Oe&&I.constructor===Oe&&I.b===je?I.a:(B("expected object of type Const, got '"+I+"'"),"type_error:Const")}var je={},xt={},gt;function Ye(){if(gt===void 0){var I=null,_=s.trustedTypes;if(_&&_.createPolicy){try{I=_.createPolicy("goog#html",{createHTML:R,createScript:R,createScriptURL:R})}catch(ce){s.console&&s.console.error(ce.message)}gt=I}else gt=I}return gt}function it(I,_){this.a=_===Be?I:""}it.prototype.ta=!0,it.prototype.sa=function(){return this.a.toString()},it.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};function ut(I){return I instanceof it&&I.constructor===it?I.a:(B("expected object of type TrustedResourceUrl, got '"+I+"' of type "+p(I)),"type_error:TrustedResourceUrl")}function Qe(I,_){var ce=st(I);if(!Ze.test(ce))throw Error("Invalid TrustedResourceUrl format: "+ce);return I=ce.replace(lt,function(Ce,_e){if(!Object.prototype.hasOwnProperty.call(_,_e))throw Error('Found marker, "'+_e+'", in format string, "'+ce+'", but no valid label mapping found in args: '+JSON.stringify(_));return Ce=_[_e],Ce instanceof Oe?st(Ce):encodeURIComponent(String(Ce))}),$e(I)}var lt=/%{(\w+)}/g,Ze=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,Be={};function $e(I){var _=Ye();return I=_?_.createScriptURL(I):I,new it(I,Be)}function wt(I,_){this.a=_===ht?I:""}wt.prototype.ta=!0,wt.prototype.sa=function(){return this.a.toString()},wt.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};function vt(I){return I instanceof wt&&I.constructor===wt?I.a:(B("expected object of type SafeUrl, got '"+I+"' of type "+p(I)),"type_error:SafeUrl")}var Rt=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)|font\/\w+|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime|x-matroska))(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i,Gt=/^data:(.*);base64,[a-z0-9+\/]+=*$/i,At=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function pt(I){if(I instanceof wt)return I;if(I=typeof I=="object"&&I.ta?I.sa():String(I),At.test(I))I=new wt(I,ht);else{I=String(I),I=I.replace(/(%0A|%0D)/g,"");var _=I.match(Gt);I=_&&Rt.test(_[1])?new wt(I,ht):null}return I}function Wt(I){return I instanceof wt?I:(I=typeof I=="object"&&I.ta?I.sa():String(I),At.test(I)||(I="about:invalid#zClosurez"),new wt(I,ht))}var ht={},ct=new wt("about:invalid#zClosurez",ht);function It(I,_,ce){this.a=ce===Ve?I:""}It.prototype.ta=!0,It.prototype.sa=function(){return this.a.toString()},It.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};function Ft(I){return I instanceof It&&I.constructor===It?I.a:(B("expected object of type SafeHtml, got '"+I+"' of type "+p(I)),"type_error:SafeHtml")}var Ve={};function ft(I,_){ke(I,"HTMLScriptElement"),I.src=ut(_),(_=I.ownerDocument&&I.ownerDocument.defaultView)&&_!=s?_=d(_.document):(u===null&&(u=d(s.document)),_=u),_&&I.setAttribute("nonce",_)}function kt(I,_,ce,Ce){return I=I instanceof wt?I:Wt(I),_=_||s,ce=ce instanceof Oe?st(ce):ce||"",_.open(vt(I),ce,Ce,void 0)}function rt(I,_){for(var ce=I.split("%s"),Ce="",_e=Array.prototype.slice.call(arguments,1);_e.length&&1")!=-1&&(I=I.replace(De,">")),I.indexOf('"')!=-1&&(I=I.replace(Ae,""")),I.indexOf("'")!=-1&&(I=I.replace(ue,"'")),I.indexOf("\0")!=-1&&(I=I.replace(fe,"�"))),I}function Ge(I){return Ge[" "](I),I}Ge[" "]=f;function yt(I,_){var ce=yo;return Object.prototype.hasOwnProperty.call(ce,I)?ce[I]:ce[I]=_(I)}var Pt=Ne("Opera"),ot=Ne("Trident")||Ne("MSIE"),bt=Ne("Edge"),zt=bt||ot,Bt=Ne("Gecko")&&!(we(Ie.toLowerCase(),"webkit")&&!Ne("Edge"))&&!(Ne("Trident")||Ne("MSIE"))&&!Ne("Edge"),tt=we(Ie.toLowerCase(),"webkit")&&!Ne("Edge");function Ht(){var I=s.document;return I?I.documentMode:void 0}var _t;e:{var qt="",un=function(){var I=Ie;if(Bt)return/rv:([^\);]+)(\)|;)/.exec(I);if(bt)return/Edge\/([\d\.]+)/.exec(I);if(ot)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(I);if(tt)return/WebKit\/(\S+)/.exec(I);if(Pt)return/(?:Version)[ \/]?(\S+)/.exec(I)}();if(un&&(qt=un?un[1]:""),ot){var Rn=Ht();if(Rn!=null&&Rn>parseFloat(qt)){_t=String(Rn);break e}}_t=qt}var yo={};function Ao(I){return yt(I,function(){for(var _=0,ce=ge(String(_t)).split("."),Ce=ge(String(I)).split("."),_e=Math.max(ce.length,Ce.length),St=0;_==0&&St<_e;St++){var Lt=ce[St]||"",dn=Ce[St]||"";do{if(Lt=/(\d*)(\D*)(.*)/.exec(Lt)||["","","",""],dn=/(\d*)(\D*)(.*)/.exec(dn)||["","","",""],Lt[0].length==0&&dn[0].length==0)break;_=Pe(Lt[1].length==0?0:parseInt(Lt[1],10),dn[1].length==0?0:parseInt(dn[1],10))||Pe(Lt[2].length==0,dn[2].length==0)||Pe(Lt[2],dn[2]),Lt=Lt[3],dn=dn[3]}while(_==0)}return 0<=_})}var wo;if(s.document&&ot){var Io=Ht();wo=Io||parseInt(_t,10)||void 0}else wo=void 0;var po=wo;try{new self.OffscreenCanvas(0,0).getContext("2d")}catch{}var On=!ot||9<=Number(po);function fo(I){var _=document;return typeof I=="string"?_.getElementById(I):I}function ir(I,_){Je(_,function(ce,Ce){ce&&typeof ce=="object"&&ce.ta&&(ce=ce.sa()),Ce=="style"?I.style.cssText=ce:Ce=="class"?I.className=ce:Ce=="for"?I.htmlFor=ce:Rr.hasOwnProperty(Ce)?I.setAttribute(Rr[Ce],ce):Ce.lastIndexOf("aria-",0)==0||Ce.lastIndexOf("data-",0)==0?I.setAttribute(Ce,ce):I[Ce]=ce})}var Rr={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function br(I,_,ce){var Ce=arguments,_e=document,St=String(Ce[0]),Lt=Ce[1];if(!On&&Lt&&(Lt.name||Lt.type)){if(St=["<",St],Lt.name&&St.push(' name="',at(Lt.name),'"'),Lt.type){St.push(' type="',at(Lt.type),'"');var dn={};Ee(dn,Lt),delete dn.type,Lt=dn}St.push(">"),St=St.join("")}return St=jo(_e,St),Lt&&(typeof Lt=="string"?St.className=Lt:Array.isArray(Lt)?St.className=Lt.join(" "):ir(St,Lt)),2"u"&&typeof window<"u"&&window.postMessage&&window.addEventListener&&!Ne("Presto")&&(I=function(){var _e=jo(document,"IFRAME");_e.style.display="none",document.documentElement.appendChild(_e);var St=_e.contentWindow;_e=St.document,_e.open(),_e.close();var Lt="callImmediate"+Math.random(),dn=St.location.protocol=="file:"?"*":St.location.protocol+"//"+St.location.host;_e=w(function(lo){(dn=="*"||lo.origin==dn)&&lo.data==Lt&&this.port1.onmessage()},this),St.addEventListener("message",_e,!1),this.port1={},this.port2={postMessage:function(){St.postMessage(Lt,dn)}}}),typeof I<"u"&&!Ne("Trident")&&!Ne("MSIE")){var _=new I,ce={},Ce=ce;return _.port1.onmessage=function(){if(ce.next!==void 0){ce=ce.next;var _e=ce.Hb;ce.Hb=null,_e()}},function(_e){Ce.next={Hb:_e},Ce=Ce.next,_.port2.postMessage(0)}}return function(_e){s.setTimeout(_e,0)}}function Wo(I,_){to||Bn(),Ko||(to(),Ko=!0),So.add(I,_)}var to;function Bn(){if(s.Promise&&s.Promise.resolve){var I=s.Promise.resolve(void 0);to=function(){I.then(Qo)}}else to=function(){var _=Qo;!A(s.setImmediate)||s.Window&&s.Window.prototype&&!Ne("Edge")&&s.Window.prototype.setImmediate==s.setImmediate?(In||(In=ar()),In(_)):s.setImmediate(_)}}var Ko=!1,So=new G;function Qo(){for(var I;I=$();){try{I.a.call(I.b)}catch(_){wn(_)}V(Q,I)}Ko=!1}function Yo(I,_){if(this.a=lr,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,I!=f)try{var ce=this;I.call(_,function(Ce){Fs(ce,fr,Ce)},function(Ce){if(!(Ce instanceof mu))try{throw Ce instanceof Error?Ce:Error("Promise rejected.")}catch{}Fs(ce,ei,Ce)})}catch(Ce){Fs(this,ei,Ce)}}var lr=0,fr=2,ei=3;function hr(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}hr.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var tr=new O(function(){return new hr},function(I){I.reset()});function bi(I,_,ce){var Ce=tr.get();return Ce.g=I,Ce.b=_,Ce.f=ce,Ce}function Fo(I){if(I instanceof Yo)return I;var _=new Yo(f);return Fs(_,fr,I),_}function Si(I){return new Yo(function(_,ce){ce(I)})}function hl(I,_,ce){ks(I,_,ce,null)||Wo(x(_,I))}function nr(I){return new Yo(function(_,ce){var Ce=I.length,_e=[];if(Ce)for(var St=function(Mo,Mi){Ce--,_e[Mo]=Mi,Ce==0&&_(_e)},Lt=function(Mo){ce(Mo)},dn=0,lo;dn=I.keyCode)&&(I.keyCode=-1)}catch{}},Tt.prototype.g=function(){return this.a};var Zt="closure_listenable_"+(1e6*Math.random()|0),cn=0;function yn(I,_,ce,Ce,_e){this.listener=I,this.proxy=null,this.src=_,this.type=ce,this.capture=!!Ce,this.Wa=_e,this.key=++cn,this.wa=this.Qa=!1}function An(I){I.wa=!0,I.listener=null,I.proxy=null,I.src=null,I.Wa=null}function Tn(I){this.src=I,this.a={},this.b=0}Tn.prototype.add=function(I,_,ce,Ce,_e){var St=I.toString();I=this.a[St],I||(I=this.a[St]=[],this.b++);var Lt=Yn(I,_,Ce,_e);return-1Ce.keyCode||Ce.returnValue!=null)){e:{var _e=!1;if(Ce.keyCode==0)try{Ce.keyCode=-1;break e}catch{_e=!0}(_e||Ce.returnValue==null)&&(Ce.returnValue=!0)}for(Ce=[],_e=_.b;_e;_e=_e.parentNode)Ce.push(_e);for(I=I.type,_e=Ce.length-1;0<=_e;_e--){_.b=Ce[_e];var St=Qu(Ce[_e],I,!0,_);ce=ce&&St}for(_e=0;_e>>0);function zf(I){return A(I)?I:(I[ed]||(I[ed]=function(_){return I.handleEvent(_)}),I[ed])}function Kl(){fn.call(this),this.v=new Tn(this),this.bc=this,this.hb=null}b(Kl,fn),Kl.prototype[Zt]=!0,Kl.prototype.addEventListener=function(I,_,ce,Ce){qn(this,I,_,ce,Ce)},Kl.prototype.removeEventListener=function(I,_,ce,Ce){Or(this,I,_,ce,Ce)},Kl.prototype.dispatchEvent=function(I){var _,ce=this.hb;if(ce)for(_=[];ce;ce=ce.hb)_.push(ce);ce=this.bc;var Ce=I.type||I;if(typeof I=="string")I=new Nt(I,ce);else if(I instanceof Nt)I.target=I.target||ce;else{var _e=I;I=new Nt(Ce,ce),Ee(I,_e)}if(_e=!0,_)for(var St=_.length-1;0<=St;St--){var Lt=I.b=_[St];_e=bp(Lt,Ce,!0,I)&&_e}if(Lt=I.b=ce,_e=bp(Lt,Ce,!0,I)&&_e,_e=bp(Lt,Ce,!1,I)&&_e,_)for(St=0;St<_.length;St++)Lt=I.b=_[St],_e=bp(Lt,Ce,!1,I)&&_e;return _e},Kl.prototype.Da=function(){if(Kl.bb.Da.call(this),this.v){var I=this.v,_;for(_ in I.a){for(var ce=I.a[_],Ce=0;Ce_)throw Error("Bad port number "+_);I.g=_}else I.g=null}function Og(I,_,ce){_ instanceof Vg?(I.b=_,i7(I.b,I.i)):(ce||(_=zh(_,Dh)),I.b=new Vg(_,I.i))}function ol(I,_,ce){I.b.set(_,ce)}function Ud(I,_){return I.b.get(_)}function wu(I){return I instanceof Ls?new Ls(I):new Ls(I,void 0)}function p5(I,_,ce,Ce){var _e=new Ls(null,void 0);return I&&ec(_e,I),_&&(_e.a=_),ce&&xl(_e,ce),Ce&&(_e.f=Ce),_e}function wy(I,_){return I?_?decodeURI(I.replace(/%25/g,"%2525")):decodeURIComponent(I):""}function zh(I,_,ce){return typeof I=="string"?(I=encodeURI(I).replace(_,P3),ce&&(I=I.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),I):null}function P3(I){return I=I.charCodeAt(0),"%"+(I>>4&15).toString(16)+(I&15).toString(16)}var vy=/[#\/\?@]/g,C3=/[#\?:]/g,g5=/[#\?]/g,Dh=/[#\?@]/g,R3=/#/g;function Vg(I,_){this.b=this.a=null,this.c=I||null,this.f=!!_}function jd(I){I.a||(I.a=new V0,I.b=0,I.c&&Au(I.c,function(_,ce){I.add(decodeURIComponent(_.replace(/\+/g," ")),ce)}))}function r7(I){var _=g1(I);if(typeof _>"u")throw Error("Keys are undefined");var ce=new Vg(null,void 0);I=yu(I);for(var Ce=0;Ce<_.length;Ce++){var _e=_[Ce],St=I[Ce];Array.isArray(St)?xy(ce,_e,St):ce.add(_e,St)}return ce}t=Vg.prototype,t.add=function(I,_){jd(this),this.c=null,I=vu(this,I);var ce=this.a.get(I);return ce||this.a.set(I,ce=[]),ce.push(_),this.b+=1,this};function Gc(I,_){jd(I),_=vu(I,_),Yg(I.a.b,_)&&(I.c=null,I.b-=I.a.get(_).length,I=I.a,Yg(I.b,_)&&(delete I.b[_],I.c--,I.a.length>2*I.c&&Ih(I)))}t.clear=function(){this.a=this.c=null,this.b=0};function ys(I,_){return jd(I),_=vu(I,_),Yg(I.a.b,_)}t.forEach=function(I,_){jd(this),this.a.forEach(function(ce,Ce){se(ce,function(_e){I.call(_,_e,Ce,this)},this)},this)},t.Y=function(){jd(this);for(var I=this.a.X(),_=this.a.Y(),ce=[],Ce=0;Ce<_.length;Ce++)for(var _e=I[Ce],St=0;St<_e.length;St++)ce.push(_[Ce]);return ce},t.X=function(I){jd(this);var _=[];if(typeof I=="string")ys(this,I)&&(_=le(_,this.a.get(vu(this,I))));else{I=this.a.X();for(var ce=0;ceI?!1:!ot||!po||9',I=(Ce=Ye())?Ce.createHTML(I):I,I=new It(I,null,Ve),Ce=Lt.document)&&(Ce.write(Ft(I)),Ce.close())):(Lt=kt(_,Ce,ce,Lt))&&I.noopener&&(Lt.opener=null),Lt)try{Lt.focus()}catch{}return Lt}function _g(I){return new Yo(function(_){function ce(){_c(2e3).then(function(){if(!I||I.closed)_();else return ce()})}return ce()})}var H3=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,m5=/^[^@]+@[^@]+$/;function Ws(){var I=null;return new Yo(function(_){s.document.readyState=="complete"?_():(I=function(){_()},Qi(window,"load",I))}).o(function(_){throw Or(window,"load",I),_})}function y5(){return ja(void 0)?Ws().then(function(){return new Yo(function(I,_){var ce=s.document,Ce=setTimeout(function(){_(Error("Cordova framework is not ready."))},1e3);ce.addEventListener("deviceready",function(){clearTimeout(Ce),I()},!1)})}):Si(Error("Cordova must run in an Android or iOS file scheme."))}function ja(I){return I=I||tc(),!(Bd()!=="file:"&&Bd()!=="ionic:"||!I.toLowerCase().match(/iphone|ipad|ipod|android/))}function M3(){var I=s.window;try{return!(!I||I==I.top)}catch{return!1}}function Rc(){return typeof s.WorkerGlobalScope<"u"&&typeof s.importScripts=="function"}function Ns(){return $n.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":$n.INTERNAL.hasOwnProperty("node")?"Node":Rc()?"Worker":"Browser"}function Gg(){var I=Ns();return I==="ReactNative"||I==="Node"}function DA(){for(var I=50,_=[];0"u"?null:Sy(I)}function S5(I){var _={},ce;for(ce in I)I.hasOwnProperty(ce)&&I[ce]!==null&&I[ce]!==void 0&&(_[ce]=I[ce]);return _}function Ty(I){if(I!==null)return JSON.parse(I)}function Jg(I){return I||Math.floor(1e9*Math.random()).toString()}function T5(I){return I=I||tc(),!(td(I)=="Safari"||I.toLowerCase().match(/iphone|ipad|ipod/))}function P5(){var I=s.___jsl;if(I&&I.H){for(var _ in I.H)if(I.H[_].r=I.H[_].r||[],I.H[_].L=I.H[_].L||[],I.H[_].r=I.H[_].L.concat(),I.CP)for(var ce=0;ce_)throw Error("Short delay should be less than long delay!");this.a=I,this.c=_,I=tc(),_=Ns(),this.b=Xc(I)||_==="ReactNative"}Df.prototype.get=function(){var I=s.navigator;return!(I&&typeof I.onLine=="boolean"&&(b5()||Bd()==="chrome-extension:"||typeof I.connection<"u"))||I.onLine?this.b?this.c:this.a:Math.min(5e3,this.a)};function EA(){var I=s.document;return I&&typeof I.visibilityState<"u"?I.visibilityState=="visible":!0}function a7(){var I=s.document,_=null;return EA()||!I?Fo():new Yo(function(ce){_=function(){EA()&&(I.removeEventListener("visibilitychange",_,!1),ce())},I.addEventListener("visibilitychange",_,!1)}).o(function(ce){throw I.removeEventListener("visibilitychange",_,!1),ce})}function I3(I){try{var _=new Date(parseInt(I,10));if(!isNaN(_.getTime())&&!/[^0-9]/.test(I))return _.toUTCString()}catch{}return null}function l7(){return!(!ql("fireauth.oauthhelper",s)&&!ql("fireauth.iframe",s))}function Jc(){var I=s.navigator;return I&&I.serviceWorker&&I.serviceWorker.controller||null}function G0(){var I=s.navigator;return I&&I.serviceWorker?Fo().then(function(){return I.serviceWorker.ready}).then(function(_){return _.active||null}).o(function(){return null}):Fo(null)}var s7={};function FA(I){s7[I]||(s7[I]=!0,typeof console<"u"&&typeof console.warn=="function"&&console.warn(I))}var z3;try{var kA={};Object.defineProperty(kA,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(kA,"abcd",{configurable:!0,enumerable:!0,value:2}),z3=kA.abcd==2}catch{z3=!1}function Hr(I,_,ce){z3?Object.defineProperty(I,_,{configurable:!0,enumerable:!0,value:ce}):I[_]=ce}function Kc(I,_){if(_)for(var ce in _)_.hasOwnProperty(ce)&&Hr(I,ce,_[ce])}function Ef(I){var _={};return Kc(_,I),_}function C5(I){var _={},ce;for(ce in I)I.hasOwnProperty(ce)&&(_[ce]=I[ce]);return _}function Py(I,_){if(!_||!_.length)return!0;if(!I)return!1;for(var ce=0;ce<_.length;ce++){var Ce=I[_[ce]];if(Ce==null||Ce==="")return!1}return!0}function y1(I){var _=I;if(typeof I=="object"&&I!=null){_="length"in I?[]:{};for(var ce in I)Hr(_,ce,y1(I[ce]))}return _}function R5(I){var _=I&&(I[NA]?"phone":null);if(_&&I&&I[WA]){Hr(this,"uid",I[WA]),Hr(this,"displayName",I[c7]||null);var ce=null;I[LA]&&(ce=new Date(I[LA]).toUTCString()),Hr(this,"enrollmentTime",ce),Hr(this,"factorId",_)}else throw new H("internal-error","Internal assert: invalid MultiFactorInfo object")}R5.prototype.w=function(){return{uid:this.uid,displayName:this.displayName,factorId:this.factorId,enrollmentTime:this.enrollmentTime}};function A1(I){try{var _=new rd(I)}catch{_=null}return _}var c7="displayName",LA="enrolledAt",WA="mfaEnrollmentId",NA="phoneInfo";function rd(I){R5.call(this,I),Hr(this,"phoneNumber",I[NA])}b(rd,R5),rd.prototype.w=function(){var I=rd.bb.w.call(this);return I.phoneNumber=this.phoneNumber,I};function D3(I){var _={},ce=I[v1],Ce=I[X0],_e=I[di];if(I=A1(I[E3]),!_e||_e!=w1&&_e!=Ut&&!ce||_e==Ut&&!Ce||_e==Eh&&!I)throw Error("Invalid checkActionCode response!");_e==Ut?(_[xS]=ce||null,_[Us]=ce||null,_[vS]=Ce):(_[xS]=Ce||null,_[Us]=Ce||null,_[vS]=ce||null),_[Yd]=I||null,Hr(this,SS,_e),Hr(this,bS,y1(_))}var Eh="REVERT_SECOND_FACTOR_ADDITION",w1="EMAIL_SIGNIN",Ut="VERIFY_AND_CHANGE_EMAIL",v1="email",E3="mfaInfo",X0="newEmail",di="requestType",vS="email",xS="fromEmail",Yd="multiFactorInfo",Us="previousEmail",bS="data",SS="operation";function UA(I){I=wu(I);var _=Ud(I,u7)||null,ce=Ud(I,d7)||null,Ce=Ud(I,jA)||null;if(Ce=Ce&&CS[Ce]||null,!_||!ce||!Ce)throw new H("argument-error",u7+", "+d7+"and "+jA+" are required in a valid action code URL.");Kc(this,{apiKey:_,operation:Ce,code:ce,continueUrl:Ud(I,Fh)||null,languageCode:Ud(I,TS)||null,tenantId:Ud(I,PS)||null})}var u7="apiKey",d7="oobCode",Fh="continueUrl",TS="languageCode",jA="mode",PS="tenantId",CS={recoverEmail:"RECOVER_EMAIL",resetPassword:"PASSWORD_RESET",revertSecondFactorAddition:Eh,signIn:w1,verifyAndChangeEmail:Ut,verifyEmail:"VERIFY_EMAIL"};function F3(I){try{return new UA(I)}catch{return null}}function xu(I){var _=I[OA];if(typeof _>"u")throw new H("missing-continue-uri");if(typeof _!="string"||typeof _=="string"&&!_.length)throw new H("invalid-continue-uri");this.h=_,this.b=this.a=null,this.g=!1;var ce=I[f7];if(ce&&typeof ce=="object"){_=ce[p7];var Ce=ce[x1];if(ce=ce[VA],typeof _=="string"&&_.length){if(this.a=_,typeof Ce<"u"&&typeof Ce!="boolean")throw new H("argument-error",x1+" property must be a boolean when specified.");if(this.g=!!Ce,typeof ce<"u"&&(typeof ce!="string"||typeof ce=="string"&&!ce.length))throw new H("argument-error",VA+" property must be a non empty string when specified.");this.b=ce||null}else{if(typeof _<"u")throw new H("argument-error",p7+" property must be a non empty string when specified.");if(typeof Ce<"u"||typeof ce<"u")throw new H("missing-android-pkg-name")}}else if(typeof ce<"u")throw new H("argument-error",f7+" property must be a non null object when specified.");if(this.f=null,(_=I[h7])&&typeof _=="object"){if(_=_[Hc],typeof _=="string"&&_.length)this.f=_;else if(typeof _<"u")throw new H("argument-error",Hc+" property must be a non empty string when specified.")}else if(typeof _<"u")throw new H("argument-error",h7+" property must be a non null object when specified.");if(_=I[YA],typeof _<"u"&&typeof _!="boolean")throw new H("argument-error",YA+" property must be a boolean when specified.");if(this.c=!!_,I=I[BA],typeof I<"u"&&(typeof I!="string"||typeof I=="string"&&!I.length))throw new H("argument-error",BA+" property must be a non empty string when specified.");this.i=I||null}var f7="android",BA="dynamicLinkDomain",YA="handleCodeInApp",h7="iOS",OA="url",x1="installApp",VA="minimumVersion",p7="packageName",Hc="bundleId";function _A(I){var _={};_.continueUrl=I.h,_.canHandleCodeInApp=I.c,(_.androidPackageName=I.a)&&(_.androidMinimumVersion=I.b,_.androidInstallApp=I.g),_.iOSBundleId=I.f,_.dynamicLinkDomain=I.i;for(var ce in _)_[ce]===null&&delete _[ce];return _}function YM(I){return te(I,function(_){return _=_.toString(16),1<_.length?_:"0"+_}).join("")}var Kg=null;function Cy(I){var _=[];return OM(I,function(ce){_.push(ce)}),_}function OM(I,_){function ce(lo){for(;Ce>4),Lt!=64&&(_(St<<4&240|Lt>>2),dn!=64&&_(Lt<<6&192|dn))}}function Ar(){if(!Kg){Kg={};for(var I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),_=["+/=","+/","-_=","-_.","-_"],ce=0;5>ce;ce++)for(var Ce=I.concat(_[ce].split("")),_e=0;_ethis.a?this.a:I),this.b=_.provider_id||_.firebase&&_.firebase.sign_in_provider||null,this.f=_.firebase&&_.firebase.tenant||null,this.c=!!_.is_anonymous||this.b=="anonymous"}qg.prototype.T=function(){return this.f},qg.prototype.l=function(){return this.c},qg.prototype.toString=function(){return this.h};function H5(I){try{return new qg(I)}catch{return null}}function g7(I){if(!I||(I=I.split("."),I.length!=3))return null;I=I[1];for(var _=(4-I.length%4)%4,ce=0;ce<_;ce++)I+=".";try{var Ce=Cy(I);for(I=[],ce=_=0;__e)I[ce++]=String.fromCharCode(_e);else if(191<_e&&224>_e){var St=Ce[_++];I[ce++]=String.fromCharCode((_e&31)<<6|St&63)}else if(239<_e&&365>_e){St=Ce[_++];var Lt=Ce[_++],dn=Ce[_++],lo=((_e&7)<<18|(St&63)<<12|(Lt&63)<<6|dn&63)-65536;I[ce++]=String.fromCharCode(55296+(lo>>10)),I[ce++]=String.fromCharCode(56320+(lo&1023))}else St=Ce[_++],Lt=Ce[_++],I[ce++]=String.fromCharCode((_e&15)<<12|(St&63)<<6|Lt&63)}return JSON.parse(I.join(""))}catch{}return null}var GA="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),id=["client_id","response_type","scope","redirect_uri","state"],Pp={nd:{Ja:"locale",va:700,ua:600,fa:"facebook.com",Ya:id},pd:{Ja:null,va:500,ua:750,fa:"github.com",Ya:id},qd:{Ja:"hl",va:515,ua:680,fa:"google.com",Ya:id},wd:{Ja:"lang",va:485,ua:705,fa:"twitter.com",Ya:GA},kd:{Ja:"locale",va:640,ua:600,fa:"apple.com",Ya:[]}};function k3(I){for(var _ in Pp)if(Pp[_].fa==I)return Pp[_];return null}function XA(I){var _={};_["facebook.com"]=ad,_["google.com"]=L3,_["github.com"]=KA,_["twitter.com"]=qA;var ce=I&&I[kh];try{if(ce)return _[ce]?new _[ce](I):new w0(I);if(typeof I[JA]<"u")return new M5(I)}catch{}return null}var JA="idToken",kh="providerId";function M5(I){var _=I[kh];if(!_&&I[JA]){var ce=H5(I[JA]);ce&&ce.b&&(_=ce.b)}if(!_)throw Error("Invalid additional user info!");(_=="anonymous"||_=="custom")&&(_=null),ce=!1,typeof I.isNewUser<"u"?ce=!!I.isNewUser:I.kind==="identitytoolkit#SignupNewUserResponse"&&(ce=!0),Hr(this,"providerId",_),Hr(this,"isNewUser",ce)}function w0(I){M5.call(this,I),I=Ty(I.rawUserInfo||"{}"),Hr(this,"profile",y1(I||{}))}b(w0,M5);function ad(I){if(w0.call(this,I),this.providerId!="facebook.com")throw Error("Invalid provider ID!")}b(ad,w0);function KA(I){if(w0.call(this,I),this.providerId!="github.com")throw Error("Invalid provider ID!");Hr(this,"username",this.profile&&this.profile.login||null)}b(KA,w0);function L3(I){if(w0.call(this,I),this.providerId!="google.com")throw Error("Invalid provider ID!")}b(L3,w0);function qA(I){if(w0.call(this,I),this.providerId!="twitter.com")throw Error("Invalid provider ID!");Hr(this,"username",I.screenName||null)}b(qA,w0);function $g(I){var _=wu(I),ce=Ud(_,"link"),Ce=Ud(wu(ce),"link");return _=Ud(_,"deep_link_id"),Ud(wu(_),"link")||_||Ce||ce||I}function ld(I,_){if(!I&&!_)throw new H("internal-error","Internal assert: no raw session string available");if(I&&_)throw new H("internal-error","Internal assert: unable to determine the session type");this.a=I||null,this.b=_||null,this.type=this.a?I5:$A}var I5="enroll",$A="signin";ld.prototype.Ha=function(){return this.a?Fo(this.a):Fo(this.b)},ld.prototype.w=function(){return this.type==I5?{multiFactorSession:{idToken:this.a}}:{multiFactorSession:{pendingCredential:this.b}}};function Cp(){}Cp.prototype.ka=function(){},Cp.prototype.b=function(){},Cp.prototype.c=function(){},Cp.prototype.w=function(){};function Ry(I,_){return I.then(function(ce){if(ce[rn]){var Ce=H5(ce[rn]);if(!Ce||_!=Ce.i)throw new H("user-mismatch");return ce}throw new H("user-mismatch")}).o(function(ce){throw ce&&ce.code&&ce.code==E+"user-not-found"?new H("user-mismatch"):ce})}function b1(I,_){if(_)this.a=_;else throw new H("internal-error","failed to construct a credential");Hr(this,"providerId",I),Hr(this,"signInMethod",I)}b1.prototype.ka=function(I){return IS(I,Mc(this))},b1.prototype.b=function(I,_){var ce=Mc(this);return ce.idToken=_,$0(I,ce)},b1.prototype.c=function(I,_){return Ry(XM(I,Mc(this)),_)};function Mc(I){return{pendingToken:I.a,requestUri:"http://localhost"}}b1.prototype.w=function(){return{providerId:this.providerId,signInMethod:this.signInMethod,pendingToken:this.a}};function z5(I){if(I&&I.providerId&&I.signInMethod&&I.providerId.indexOf("saml.")==0&&I.pendingToken)try{return new b1(I.providerId,I.pendingToken)}catch{}return null}function Od(I,_,ce){if(this.a=null,_.idToken||_.accessToken)_.idToken&&Hr(this,"idToken",_.idToken),_.accessToken&&Hr(this,"accessToken",_.accessToken),_.nonce&&!_.pendingToken&&Hr(this,"nonce",_.nonce),_.pendingToken&&(this.a=_.pendingToken);else if(_.oauthToken&&_.oauthTokenSecret)Hr(this,"accessToken",_.oauthToken),Hr(this,"secret",_.oauthTokenSecret);else throw new H("internal-error","failed to construct a credential");Hr(this,"providerId",I),Hr(this,"signInMethod",ce)}Od.prototype.ka=function(I){return IS(I,bu(this))},Od.prototype.b=function(I,_){var ce=bu(this);return ce.idToken=_,$0(I,ce)},Od.prototype.c=function(I,_){var ce=bu(this);return Ry(XM(I,ce),_)};function bu(I){var _={};return I.idToken&&(_.id_token=I.idToken),I.accessToken&&(_.access_token=I.accessToken),I.secret&&(_.oauth_token_secret=I.secret),_.providerId=I.providerId,I.nonce&&!I.a&&(_.nonce=I.nonce),_={postBody:r7(_).toString(),requestUri:"http://localhost"},I.a&&(delete _.postBody,_.pendingToken=I.a),_}Od.prototype.w=function(){var I={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(I.oauthIdToken=this.idToken),this.accessToken&&(I.oauthAccessToken=this.accessToken),this.secret&&(I.oauthTokenSecret=this.secret),this.nonce&&(I.nonce=this.nonce),this.a&&(I.pendingToken=this.a),I};function D5(I){if(I&&I.providerId&&I.signInMethod){var _={idToken:I.oauthIdToken,accessToken:I.oauthTokenSecret?null:I.oauthAccessToken,oauthTokenSecret:I.oauthTokenSecret,oauthToken:I.oauthTokenSecret&&I.oauthAccessToken,nonce:I.nonce,pendingToken:I.pendingToken};try{return new Od(I.providerId,_,I.signInMethod)}catch{}}return null}function Vd(I,_){this.Qc=_||[],Kc(this,{providerId:I,isOAuthProvider:!0}),this.Jb={},this.qb=(k3(I)||{}).Ja||null,this.pb=null}Vd.prototype.Ka=function(I){return this.Jb=nt(I),this};function Ff(I){if(typeof I!="string"||I.indexOf("saml.")!=0)throw new H("argument-error",'SAML provider IDs must be prefixed with "saml."');Vd.call(this,I,[])}b(Ff,Vd);function J0(I){Vd.call(this,I,id),this.a=[]}b(J0,Vd),J0.prototype.Ca=function(I){return he(this.a,I)||this.a.push(I),this},J0.prototype.Rb=function(){return Te(this.a)},J0.prototype.credential=function(I,_){var ce;if(y(I)?ce={idToken:I.idToken||null,accessToken:I.accessToken||null,nonce:I.rawNonce||null}:ce={idToken:I||null,accessToken:_||null},!ce.idToken&&!ce.accessToken)throw new H("argument-error","credential failed: must provide the ID token and/or the access token.");return new Od(this.providerId,ce,this.providerId)};function Ms(){J0.call(this,"facebook.com")}b(Ms,J0),Hr(Ms,"PROVIDER_ID","facebook.com"),Hr(Ms,"FACEBOOK_SIGN_IN_METHOD","facebook.com");function E5(I){if(!I)throw new H("argument-error","credential failed: expected 1 argument (the OAuth access token).");var _=I;return y(I)&&(_=I.accessToken),new Ms().credential({accessToken:_})}function Qg(){J0.call(this,"github.com")}b(Qg,J0),Hr(Qg,"PROVIDER_ID","github.com"),Hr(Qg,"GITHUB_SIGN_IN_METHOD","github.com");function QA(I){if(!I)throw new H("argument-error","credential failed: expected 1 argument (the OAuth access token).");var _=I;return y(I)&&(_=I.accessToken),new Qg().credential({accessToken:_})}function Hy(){J0.call(this,"google.com"),this.Ca("profile")}b(Hy,J0),Hr(Hy,"PROVIDER_ID","google.com"),Hr(Hy,"GOOGLE_SIGN_IN_METHOD","google.com");function My(I,_){var ce=I;return y(I)&&(ce=I.idToken,_=I.accessToken),new Hy().credential({idToken:ce,accessToken:_})}function Zg(){Vd.call(this,"twitter.com",GA)}b(Zg,Vd),Hr(Zg,"PROVIDER_ID","twitter.com"),Hr(Zg,"TWITTER_SIGN_IN_METHOD","twitter.com");function $l(I,_){var ce=I;if(y(ce)||(ce={oauthToken:I,oauthTokenSecret:_}),!ce.oauthToken||!ce.oauthTokenSecret)throw new H("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new Od("twitter.com",ce,"twitter.com")}function Hi(I,_,ce){this.a=I,this.f=_,Hr(this,"providerId","password"),Hr(this,"signInMethod",ce===rl.EMAIL_LINK_SIGN_IN_METHOD?rl.EMAIL_LINK_SIGN_IN_METHOD:rl.EMAIL_PASSWORD_SIGN_IN_METHOD)}Hi.prototype.ka=function(I){return this.signInMethod==rl.EMAIL_LINK_SIGN_IN_METHOD?ka(I,jy,{email:this.a,oobCode:this.f}):ka(I,eI,{email:this.a,password:this.f})},Hi.prototype.b=function(I,_){return this.signInMethod==rl.EMAIL_LINK_SIGN_IN_METHOD?ka(I,qd,{idToken:_,email:this.a,oobCode:this.f}):ka(I,$M,{idToken:_,email:this.a,password:this.f})},Hi.prototype.c=function(I,_){return Ry(this.ka(I),_)},Hi.prototype.w=function(){return{email:this.a,password:this.f,signInMethod:this.signInMethod}};function Ic(I){return I&&I.email&&I.password?new Hi(I.email,I.password,I.signInMethod):null}function rl(){Kc(this,{providerId:"password",isOAuthProvider:!1})}function js(I,_){if(_=Su(_),!_)throw new H("argument-error","Invalid email link!");return new Hi(I,_.code,rl.EMAIL_LINK_SIGN_IN_METHOD)}function Su(I){return I=$g(I),(I=F3(I))&&I.operation===w1?I:null}Kc(rl,{PROVIDER_ID:"password"}),Kc(rl,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),Kc(rl,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"});function _d(I){if(!(I.fb&&I.eb||I.La&&I.ea))throw new H("internal-error");this.a=I,Hr(this,"providerId","phone"),this.fa="phone",Hr(this,"signInMethod","phone")}_d.prototype.ka=function(I){return I.gb(Rp(this))},_d.prototype.b=function(I,_){var ce=Rp(this);return ce.idToken=_,ka(I,FU,ce)},_d.prototype.c=function(I,_){var ce=Rp(this);return ce.operation="REAUTH",I=ka(I,lm,ce),Ry(I,_)},_d.prototype.w=function(){var I={providerId:"phone"};return this.a.fb&&(I.verificationId=this.a.fb),this.a.eb&&(I.verificationCode=this.a.eb),this.a.La&&(I.temporaryProof=this.a.La),this.a.ea&&(I.phoneNumber=this.a.ea),I};function nc(I){if(I&&I.providerId==="phone"&&(I.verificationId&&I.verificationCode||I.temporaryProof&&I.phoneNumber)){var _={};return se(["verificationId","verificationCode","temporaryProof","phoneNumber"],function(ce){I[ce]&&(_[ce]=I[ce])}),new _d(_)}return null}function Rp(I){return I.a.La&&I.a.ea?{temporaryProof:I.a.La,phoneNumber:I.a.ea}:{sessionInfo:I.a.fb,code:I.a.eb}}function sd(I){try{this.a=I||$n.auth()}catch{throw new H("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}Kc(this,{providerId:"phone",isOAuthProvider:!1})}sd.prototype.gb=function(I,_){var ce=this.a.a;return Fo(_.verify()).then(function(Ce){if(typeof Ce!="string")throw new H("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(_.type){case"recaptcha":var _e=y(I)?I.session:null,St=y(I)?I.phoneNumber:I,Lt;return _e&&_e.type==I5?Lt=_e.Ha().then(function(dn){return l4(ce,{idToken:dn,phoneEnrollmentInfo:{phoneNumber:St,recaptchaToken:Ce}})}):_e&&_e.type==$A?Lt=_e.Ha().then(function(dn){return HS(ce,{mfaPendingCredential:dn,mfaEnrollmentId:I.multiFactorHint&&I.multiFactorHint.uid||I.multiFactorUid,phoneSignInInfo:{recaptchaToken:Ce}})}):Lt=a4(ce,{phoneNumber:St,recaptchaToken:Ce}),Lt.then(function(dn){return typeof _.reset=="function"&&_.reset(),dn},function(dn){throw typeof _.reset=="function"&&_.reset(),dn});default:throw new H("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}})};function W3(I,_){if(!I)throw new H("missing-verification-id");if(!_)throw new H("missing-verification-code");return new _d({fb:I,eb:_})}Kc(sd,{PROVIDER_ID:"phone"}),Kc(sd,{PHONE_SIGN_IN_METHOD:"phone"});function N3(I){if(I.temporaryProof&&I.phoneNumber)return new _d({La:I.temporaryProof,ea:I.phoneNumber});var _=I&&I.providerId;if(!_||_==="password")return null;var ce=I&&I.oauthAccessToken,Ce=I&&I.oauthTokenSecret,_e=I&&I.nonce,St=I&&I.oauthIdToken,Lt=I&&I.pendingToken;try{switch(_){case"google.com":return My(St,ce);case"facebook.com":return E5(ce);case"github.com":return QA(ce);case"twitter.com":return $l(ce,Ce);default:return ce||Ce||St||Lt?Lt?_.indexOf("saml.")==0?new b1(_,Lt):new Od(_,{pendingToken:Lt,idToken:I.oauthIdToken,accessToken:I.oauthAccessToken},_):new J0(_).credential({idToken:St,accessToken:ce,rawNonce:_e}):null}}catch{return null}}function em(I){if(!I.isOAuthProvider)throw new H("invalid-oauth-provider")}function Ql(I,_,ce,Ce,_e,St,Lt){if(this.c=I,this.b=_||null,this.g=ce||null,this.f=Ce||null,this.i=St||null,this.h=Lt||null,this.a=_e||null,this.g||this.a){if(this.g&&this.a)throw new H("invalid-auth-event");if(this.g&&!this.f)throw new H("invalid-auth-event")}else throw new H("invalid-auth-event")}Ql.prototype.getUid=function(){var I=[];return I.push(this.c),this.b&&I.push(this.b),this.f&&I.push(this.f),this.h&&I.push(this.h),I.join("-")},Ql.prototype.T=function(){return this.h},Ql.prototype.w=function(){return{type:this.c,eventId:this.b,urlResponse:this.g,sessionId:this.f,postBody:this.i,tenantId:this.h,error:this.a&&this.a.w()}};function ZA(I){return I=I||{},I.type?new Ql(I.type,I.eventId,I.urlResponse,I.sessionId,I.error&&F(I.error),I.postBody,I.tenantId):null}function U3(){this.b=null,this.a=[]}var S1=null;function j3(I){var _=S1;_.a.push(I),_.b||(_.b=function(ce){for(var Ce=0;Ce<_.a.length;Ce++)_.a[Ce](ce)},I=ql("universalLinks.subscribe",s),typeof I=="function"&&I(null,_.b))}function F5(I){var _="unauthorized-domain",ce=void 0,Ce=wu(I);I=Ce.a,Ce=Ce.c,Ce=="chrome-extension"?ce=rt("This chrome extension ID (chrome-extension://%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",I):Ce=="http"||Ce=="https"?ce=rt("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",I):_="operation-not-supported-in-this-environment",H.call(this,_,ce)}b(F5,H);function Tu(I,_,ce){H.call(this,I,ce),I=_||{},I.Kb&&Hr(this,"email",I.Kb),I.ea&&Hr(this,"phoneNumber",I.ea),I.credential&&Hr(this,"credential",I.credential),I.$b&&Hr(this,"tenantId",I.$b)}b(Tu,H),Tu.prototype.w=function(){var I={code:this.code,message:this.message};this.email&&(I.email=this.email),this.phoneNumber&&(I.phoneNumber=this.phoneNumber),this.tenantId&&(I.tenantId=this.tenantId);var _=this.credential&&this.credential.w();return _&&Ee(I,_),I},Tu.prototype.toJSON=function(){return this.w()};function Iy(I){if(I.code){var _=I.code||"";_.indexOf(E)==0&&(_=_.substring(E.length));var ce={credential:N3(I),$b:I.tenantId};if(I.email)ce.Kb=I.email;else if(I.phoneNumber)ce.ea=I.phoneNumber;else if(!ce.credential)return new H(_,I.message||void 0);return new Tu(_,ce,I.message)}return null}function Gd(){}Gd.prototype.c=null;function k5(I){return I.c||(I.c=I.b())}var zy;function Dy(){}b(Dy,Gd),Dy.prototype.a=function(){var I=B3(this);return I?new ActiveXObject(I):new XMLHttpRequest},Dy.prototype.b=function(){var I={};return B3(this)&&(I[0]=!0,I[1]=!0),I};function B3(I){if(!I.f&&typeof XMLHttpRequest>"u"&&typeof ActiveXObject<"u"){for(var _=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],ce=0;ce<_.length;ce++){var Ce=_[ce];try{return new ActiveXObject(Ce),I.f=Ce}catch{}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return I.f}zy=new Dy;function T1(){}b(T1,Gd),T1.prototype.a=function(){var I=new XMLHttpRequest;if("withCredentials"in I)return I;if(typeof XDomainRequest<"u")return new v0;throw Error("Unsupported browser")},T1.prototype.b=function(){return{}};function v0(){this.a=new XDomainRequest,this.readyState=0,this.onreadystatechange=null,this.responseType=this.responseText=this.response="",this.status=-1,this.statusText="",this.a.onload=w(this.qc,this),this.a.onerror=w(this.Tb,this),this.a.onprogress=w(this.rc,this),this.a.ontimeout=w(this.vc,this)}t=v0.prototype,t.open=function(I,_,ce){if(ce!=null&&!ce)throw Error("Only async requests are supported.");this.a.open(I,_)},t.send=function(I){if(I)if(typeof I=="string")this.a.send(I);else throw Error("Only string data is supported");else this.a.send()},t.abort=function(){this.a.abort()},t.setRequestHeader=function(){},t.getResponseHeader=function(I){return I.toLowerCase()=="content-type"?this.a.contentType:""},t.qc=function(){this.status=200,this.response=this.responseText=this.a.responseText,kf(this,4)},t.Tb=function(){this.status=500,this.response=this.responseText="",kf(this,4)},t.vc=function(){this.Tb()},t.rc=function(){this.status=200,kf(this,1)};function kf(I,_){I.readyState=_,I.onreadystatechange&&I.onreadystatechange()}t.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType};function cd(I,_,ce){this.reset(I,_,ce,void 0,void 0)}cd.prototype.a=null,cd.prototype.reset=function(I,_,ce,Ce,_e){delete this.a};function tm(I){this.f=I,this.b=this.c=this.a=null}function $r(I,_){this.name=I,this.value=_}$r.prototype.toString=function(){return this.name};var m7=new $r("SEVERE",1e3),Y3=new $r("WARNING",900),Ey=new $r("CONFIG",700),RS=new $r("FINE",500);function P1(I){return I.c?I.c:I.a?P1(I.a):(B("Root logger has no level set."),null)}tm.prototype.log=function(I,_,ce){if(I.value>=P1(this).value)for(A(_)&&(_=_()),I=new cd(I,String(_),this.f),ce&&(I.a=ce),ce=this;ce;)ce=ce.a};var e4={},K0=null;function O3(I){K0||(K0=new tm(""),e4[""]=K0,K0.c=Ey);var _;if(!(_=e4[I])){_=new tm(I);var ce=I.lastIndexOf("."),Ce=I.substr(ce+1);ce=O3(I.substr(0,ce)),ce.b||(ce.b={}),ce.b[Ce]=_,_.a=ce,e4[I]=_}return _}function oc(I,_){I&&I.log(RS,_,void 0)}function Fy(I){this.f=I}b(Fy,Gd),Fy.prototype.a=function(){return new L5(this.f)},Fy.prototype.b=function(I){return function(){return I}}({});function L5(I){Kl.call(this),this.u=I,this.h=void 0,this.readyState=W5,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.l=new Headers,this.b=null,this.s="GET",this.f="",this.a=!1,this.i=O3("goog.net.FetchXmlHttp"),this.m=this.c=this.g=null}b(L5,Kl);var W5=0;t=L5.prototype,t.open=function(I,_){if(this.readyState!=W5)throw this.abort(),Error("Error reopening a connection");this.s=I,this.f=_,this.readyState=1,ky(this)},t.send=function(I){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.a=!0;var _={headers:this.l,method:this.s,credentials:this.h,cache:void 0};I&&(_.body=I),this.u.fetch(new Request(this.f,_)).then(this.uc.bind(this),this.Va.bind(this))},t.abort=function(){this.response=this.responseText="",this.l=new Headers,this.status=0,this.c&&this.c.cancel("Request was aborted."),1<=this.readyState&&this.a&&this.readyState!=4&&(this.a=!1,Lf(this)),this.readyState=W5},t.uc=function(I){this.a&&(this.g=I,this.b||(this.status=this.g.status,this.statusText=this.g.statusText,this.b=I.headers,this.readyState=2,ky(this)),this.a&&(this.readyState=3,ky(this),this.a&&(this.responseType==="arraybuffer"?I.arrayBuffer().then(this.sc.bind(this),this.Va.bind(this)):typeof s.ReadableStream<"u"&&"body"in I?(this.response=this.responseText="",this.c=I.body.getReader(),this.m=new TextDecoder,x0(this)):I.text().then(this.tc.bind(this),this.Va.bind(this)))))};function x0(I){I.c.read().then(I.pc.bind(I)).catch(I.Va.bind(I))}t.pc=function(I){if(this.a){var _=this.m.decode(I.value?I.value:new Uint8Array(0),{stream:!I.done});_&&(this.response=this.responseText+=_),I.done?Lf(this):ky(this),this.readyState==3&&x0(this)}},t.tc=function(I){this.a&&(this.response=this.responseText=I,Lf(this))},t.sc=function(I){this.a&&(this.response=I,Lf(this))},t.Va=function(I){var _=this.i;_&&_.log(Y3,"Failed to fetch url "+this.f,I instanceof Error?I:Error(I)),this.a&&Lf(this)};function Lf(I){I.readyState=4,I.g=null,I.c=null,I.m=null,ky(I)}t.setRequestHeader=function(I,_){this.l.append(I,_)},t.getResponseHeader=function(I){return this.b?this.b.get(I.toLowerCase())||"":((I=this.i)&&I.log(Y3,"Attempting to get response header but no headers have been received for url: "+this.f,void 0),"")},t.getAllResponseHeaders=function(){if(!this.b){var I=this.i;return I&&I.log(Y3,"Attempting to get all response headers but no headers have been received for url: "+this.f,void 0),""}I=[];for(var _=this.b.entries(),ce=_.next();!ce.done;)ce=ce.value,I.push(ce[0]+": "+ce[1]),ce=_.next();return I.join(`\r + `),be.createElement("div",{style:u.white,className:"saturation-white"},be.createElement("div",{style:u.black,className:"saturation-black"}),be.createElement("div",{style:u.pointer},this.props.pointer?be.createElement(this.props.pointer,this.props):be.createElement("div",{style:u.circle}))))}}]),e}(m.PureComponent||m.Component);function Uco(t,e){for(var n=-1,o=t==null?0:t.length;++n=0,i=!n&&r&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return i?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(o=this.toRgbString()),e==="prgb"&&(o=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(o=this.toHexString()),e==="hex3"&&(o=this.toHexString(!0)),e==="hex4"&&(o=this.toHex8String(!0)),e==="hex8"&&(o=this.toHex8String()),e==="name"&&(o=this.toName()),e==="hsl"&&(o=this.toHslString()),e==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},clone:function(){return Zr(this.toString())},_applyModification:function(e,n){var o=e.apply(null,[this].concat([].slice.call(n)));return this._r=o._r,this._g=o._g,this._b=o._b,this.setAlpha(o._a),this},lighten:function(){return this._applyModification(r0o,arguments)},brighten:function(){return this._applyModification(i0o,arguments)},darken:function(){return this._applyModification(a0o,arguments)},desaturate:function(){return this._applyModification(t0o,arguments)},saturate:function(){return this._applyModification(n0o,arguments)},greyscale:function(){return this._applyModification(o0o,arguments)},spin:function(){return this._applyModification(l0o,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(u0o,arguments)},complement:function(){return this._applyCombination(s0o,arguments)},monochromatic:function(){return this._applyCombination(d0o,arguments)},splitcomplement:function(){return this._applyCombination(c0o,arguments)},triad:function(){return this._applyCombination(iHe,[3])},tetrad:function(){return this._applyCombination(iHe,[4])}};Zr.fromRatio=function(t,e){if(cJ(t)=="object"){var n={};for(var o in t)t.hasOwnProperty(o)&&(o==="a"?n[o]=t[o]:n[o]=GD(t[o]));t=n}return Zr(t,e)};function qco(t){var e={r:0,g:0,b:0},n=1,o=null,r=null,i=null,a=!1,l=!1;return typeof t=="string"&&(t=m0o(t)),cJ(t)=="object"&&(u6(t.r)&&u6(t.g)&&u6(t.b)?(e=$co(t.r,t.g,t.b),a=!0,l=String(t.r).substr(-1)==="%"?"prgb":"rgb"):u6(t.h)&&u6(t.s)&&u6(t.v)?(o=GD(t.s),r=GD(t.v),e=Zco(t.h,o,r),a=!0,l="hsv"):u6(t.h)&&u6(t.s)&&u6(t.l)&&(o=GD(t.s),i=GD(t.l),e=Qco(t.h,o,i),a=!0,l="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=crt(n),{ok:a,format:t.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}function $co(t,e,n){return{r:Wc(t,255)*255,g:Wc(e,255)*255,b:Wc(n,255)*255}}function tHe(t,e,n){t=Wc(t,255),e=Wc(e,255),n=Wc(n,255);var o=Math.max(t,e,n),r=Math.min(t,e,n),i,a,l=(o+r)/2;if(o==r)i=a=0;else{var s=o-r;switch(a=l>.5?s/(2-o-r):s/(o+r),o){case t:i=(e-n)/s+(e1&&(d-=1),d<1/6?c+(u-c)*6*d:d<1/2?u:d<2/3?c+(u-c)*(2/3-d)*6:c}if(e===0)o=r=i=n;else{var l=n<.5?n*(1+e):n+e-n*e,s=2*n-l;o=a(s,l,t+1/3),r=a(s,l,t),i=a(s,l,t-1/3)}return{r:o*255,g:r*255,b:i*255}}function nHe(t,e,n){t=Wc(t,255),e=Wc(e,255),n=Wc(n,255);var o=Math.max(t,e,n),r=Math.min(t,e,n),i,a,l=o,s=o-r;if(a=o===0?0:s/o,o==r)i=0;else{switch(o){case t:i=(e-n)/s+(e>1)+720)%360;--e;)o.h=(o.h+r)%360,i.push(Zr(o));return i}function d0o(t,e){e=e||6;for(var n=Zr(t).toHsv(),o=n.h,r=n.s,i=n.v,a=[],l=1/e;e--;)a.push(Zr({h:o,s:r,v:i})),i=(i+l)%1;return a}Zr.mix=function(t,e,n){n=n===0?0:n||50;var o=Zr(t).toRgb(),r=Zr(e).toRgb(),i=n/100,a={r:(r.r-o.r)*i+o.r,g:(r.g-o.g)*i+o.g,b:(r.b-o.b)*i+o.b,a:(r.a-o.a)*i+o.a};return Zr(a)};Zr.readability=function(t,e){var n=Zr(t),o=Zr(e);return(Math.max(n.getLuminance(),o.getLuminance())+.05)/(Math.min(n.getLuminance(),o.getLuminance())+.05)};Zr.isReadable=function(t,e,n){var o=Zr.readability(t,e),r,i;switch(i=!1,r=y0o(n),r.level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7;break}return i};Zr.mostReadable=function(t,e,n){var o=null,r=0,i,a,l,s;n=n||{},a=n.includeFallbackColors,l=n.level,s=n.size;for(var c=0;cr&&(r=i,o=Zr(e[c]));return Zr.isReadable(t,o,{level:l,size:s})||!a?o:(n.includeFallbackColors=!1,Zr.mostReadable(t,["#fff","#000"],n))};var pfe=Zr.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},f0o=Zr.hexNames=h0o(pfe);function h0o(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function crt(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Wc(t,e){p0o(t)&&(t="100%");var n=g0o(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function gee(t){return Math.min(1,Math.max(0,t))}function J1(t){return parseInt(t,16)}function p0o(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function g0o(t){return typeof t=="string"&&t.indexOf("%")!=-1}function P2(t){return t.length==1?"0"+t:""+t}function GD(t){return t<=1&&(t=t*100+"%"),t}function urt(t){return Math.round(parseFloat(t)*255).toString(16)}function aHe(t){return J1(t)/255}var n2=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+o),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+o),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+o),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function u6(t){return!!n2.CSS_UNIT.exec(t)}function m0o(t){t=t.replace(Jco,"").replace(Kco,"").toLowerCase();var e=!1;if(pfe[t])t=pfe[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=n2.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=n2.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=n2.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=n2.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=n2.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=n2.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=n2.hex8.exec(t))?{r:J1(n[1]),g:J1(n[2]),b:J1(n[3]),a:aHe(n[4]),format:e?"name":"hex8"}:(n=n2.hex6.exec(t))?{r:J1(n[1]),g:J1(n[2]),b:J1(n[3]),format:e?"name":"hex"}:(n=n2.hex4.exec(t))?{r:J1(n[1]+""+n[1]),g:J1(n[2]+""+n[2]),b:J1(n[3]+""+n[3]),a:aHe(n[4]+""+n[4]),format:e?"name":"hex8"}:(n=n2.hex3.exec(t))?{r:J1(n[1]+""+n[1]),g:J1(n[2]+""+n[2]),b:J1(n[3]+""+n[3]),format:e?"name":"hex"}:!1}function y0o(t){var e,n;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:e,size:n}}var lHe=function(e){var n=["r","g","b","a","h","s","l","v"],o=0,r=0;return Xco(n,function(i){if(e[i]&&(o+=1,isNaN(e[i])||(r+=1),i==="s"||i==="l")){var a=/^\d+%$/;a.test(e[i])&&(r+=1)}}),o===r?e:!1},XD=function(e,n){var o=e.hex?Zr(e.hex):Zr(e),r=o.toHsl(),i=o.toHsv(),a=o.toRgb(),l=o.toHex();r.s===0&&(r.h=n||0,i.h=n||0);var s=l==="000000"&&a.a===0;return{hsl:r,hex:s?"transparent":"#"+l,rgb:a,hsv:i,oldHue:e.h||n||r.h,source:e.source}},Qw=function(e){if(e==="transparent")return!0;var n=String(e).charAt(0)==="#"?1:0;return e.length!==4+n&&e.length<7+n&&Zr(e).isValid()},A9e=function(e){if(!e)return"#fff";var n=XD(e);if(n.hex==="transparent")return"rgba(0,0,0,0.4)";var o=(n.rgb.r*299+n.rgb.g*587+n.rgb.b*114)/1e3;return o>=128?"#000":"#fff"},Yae=function(e,n){var o=e.replace("°","");return Zr(n+" ("+o+")")._ok},tD=Object.assign||function(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:"span";return function(o){P0o(r,o);function r(){var i,a,l,s;T0o(this,r);for(var c=arguments.length,u=Array(c),d=0;dl))return!1;var c=i.get(t),u=i.get(e);if(c&&u)return c==e&&u==t;var d=-1,f=!0,p=n&W0o?new uJ:void 0;for(i.set(t,e),i.set(e,t);++d=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}var BO=24,Zuo=vrt.default=function(t){var e=t.fill,n=e===void 0?"currentColor":e,o=t.width,r=o===void 0?BO:o,i=t.height,a=i===void 0?BO:i,l=t.style,s=l===void 0?{}:l,c=Quo(t,["fill","width","height","style"]);return PHe.default.createElement("svg",THe({viewBox:"0 0 "+BO+" "+BO,style:THe({fill:n,width:r,height:a},s)},c),PHe.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},edo=function(){function t(e,n){for(var o=0;o1&&(r.a=1),o.props.onChange({h:o.props.hsl.h,s:o.props.hsl.s,l:o.props.hsl.l,a:Math.round(r.a*100)/100,source:"rgb"},i)):(r.h||r.s||r.l)&&(typeof r.s=="string"&&r.s.includes("%")&&(r.s=r.s.replace("%","")),typeof r.l=="string"&&r.l.includes("%")&&(r.l=r.l.replace("%","")),r.s==1?r.s=.01:r.l==1&&(r.l=.01),o.props.onChange({h:r.h||o.props.hsl.h,s:Number(SHe(r.s)?o.props.hsl.s:r.s),l:Number(SHe(r.l)?o.props.hsl.l:r.l),source:"hsl"},i))},o.showHighlight=function(r){r.currentTarget.style.background="#eee"},o.hideHighlight=function(r){r.currentTarget.style.background="transparent"},n.hsl.a!==1&&n.view==="hex"?o.state={view:"rgb"}:o.state={view:n.view},o}return edo(e,[{key:"render",value:function(){var o=this,r=$i({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),i=void 0;return this.state.view==="hex"?i=be.createElement("div",{style:r.fields,className:"flexbox-fix"},be.createElement("div",{style:r.field},be.createElement(cl,{style:{input:r.input,label:r.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?i=be.createElement("div",{style:r.fields,className:"flexbox-fix"},be.createElement("div",{style:r.field},be.createElement(cl,{style:{input:r.input,label:r.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),be.createElement("div",{style:r.field},be.createElement(cl,{style:{input:r.input,label:r.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),be.createElement("div",{style:r.field},be.createElement(cl,{style:{input:r.input,label:r.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),be.createElement("div",{style:r.alpha},be.createElement(cl,{style:{input:r.input,label:r.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(i=be.createElement("div",{style:r.fields,className:"flexbox-fix"},be.createElement("div",{style:r.field},be.createElement(cl,{style:{input:r.input,label:r.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),be.createElement("div",{style:r.field},be.createElement(cl,{style:{input:r.input,label:r.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),be.createElement("div",{style:r.field},be.createElement(cl,{style:{input:r.input,label:r.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),be.createElement("div",{style:r.alpha},be.createElement(cl,{style:{input:r.input,label:r.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),be.createElement("div",{style:r.wrap,className:"flexbox-fix"},i,be.createElement("div",{style:r.toggle},be.createElement("div",{style:r.icon,onClick:this.toggleViews,ref:function(l){return o.icon=l}},be.createElement(Zuo,{style:r.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(o,r){return o.hsl.a!==1&&r.view==="hex"?{view:"rgb"}:null}}]),e}(be.Component);xrt.defaultProps={view:"hex"};var CHe=function(){var e=$i({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return be.createElement("div",{style:e.picker})},rdo=function(){var e=$i({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return be.createElement("div",{style:e.picker})},T9e=function(e){var n=e.width,o=e.onChange,r=e.disableAlpha,i=e.rgb,a=e.hsl,l=e.hsv,s=e.hex,c=e.renderers,u=e.styles,d=u===void 0?{}:u,f=e.className,p=f===void 0?"":f,g=e.defaultView,A=$i(h1({default:{picker:{width:n,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},d),{disableAlpha:r});return be.createElement("div",{style:A.picker,className:"chrome-picker "+p},be.createElement("div",{style:A.saturation},be.createElement(pee,{style:A.Saturation,hsl:a,hsv:l,pointer:rdo,onChange:o})),be.createElement("div",{style:A.body},be.createElement("div",{style:A.controls,className:"flexbox-fix"},be.createElement("div",{style:A.color},be.createElement("div",{style:A.swatch},be.createElement("div",{style:A.active}),be.createElement(TM,{renderers:c}))),be.createElement("div",{style:A.toggles},be.createElement("div",{style:A.hue},be.createElement(PM,{style:A.Hue,hsl:a,pointer:CHe,onChange:o})),be.createElement("div",{style:A.alpha},be.createElement(u9e,{style:A.Alpha,rgb:i,hsl:a,pointer:CHe,renderers:c,onChange:o})))),be.createElement(xrt,{rgb:i,hsl:a,hex:s,view:g,onChange:o,disableAlpha:r})))};T9e.propTypes={width:mo.oneOfType([mo.string,mo.number]),disableAlpha:mo.bool,styles:mo.object,defaultView:mo.oneOf(["hex","rgb","hsl"])};T9e.defaultProps={width:225,disableAlpha:!1,styles:{}};p1(T9e);var ido=function(e){var n=e.color,o=e.onClick,r=o===void 0?function(){}:o,i=e.onSwatchHover,a=e.active,l=$i({default:{color:{background:n,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:A9e(n),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:a,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return be.createElement(sS,{style:l.color,color:n,onClick:r,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},be.createElement("div",{style:l.dot}))},ado=function(e){var n=e.hex,o=e.rgb,r=e.onChange,i=$i({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:n},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),a=function(s,c){s.r||s.g||s.b?r({r:s.r||o.r,g:s.g||o.g,b:s.b||o.b,source:"rgb"},c):r({hex:s.hex,source:"hex"},c)};return be.createElement("div",{style:i.fields,className:"flexbox-fix"},be.createElement("div",{style:i.active}),be.createElement(cl,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:n,onChange:a}),be.createElement(cl,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:o.r,onChange:a}),be.createElement(cl,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:o.g,onChange:a}),be.createElement(cl,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:o.b,onChange:a}))},P9e=function(e){var n=e.onChange,o=e.onSwatchHover,r=e.colors,i=e.hex,a=e.rgb,l=e.styles,s=l===void 0?{}:l,c=e.className,u=c===void 0?"":c,d=$i(h1({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},s)),f=function(g,A){g.hex?Qw(g.hex)&&n({hex:g.hex,source:"hex"},A):n(g,A)};return be.createElement(eU,{style:d.Compact,styles:s},be.createElement("div",{style:d.compact,className:"compact-picker "+u},be.createElement("div",null,cS(r,function(p){return be.createElement(ido,{key:p,color:p,active:p.toLowerCase()===i,onClick:f,onSwatchHover:o})}),be.createElement("div",{style:d.clear})),be.createElement(ado,{hex:i,rgb:a,onChange:f})))};P9e.propTypes={colors:mo.arrayOf(mo.string),styles:mo.object};P9e.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};const Ld=p1(P9e);var ldo=function(e){var n=e.hover,o=e.color,r=e.onClick,i=e.onSwatchHover,a={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},l=$i({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:n});return be.createElement("div",{style:l.swatch},be.createElement(sS,{color:o,onClick:r,onHover:i,focusStyle:a}))};const sdo=c9e(ldo);var C9e=function(e){var n=e.width,o=e.colors,r=e.onChange,i=e.onSwatchHover,a=e.triangle,l=e.styles,s=l===void 0?{}:l,c=e.className,u=c===void 0?"":c,d=$i(h1({default:{card:{width:n,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},s),{"hide-triangle":a==="hide","top-left-triangle":a==="top-left","top-right-triangle":a==="top-right","bottom-left-triangle":a==="bottom-left","bottom-right-triangle":a==="bottom-right"}),f=function(g,A){return r({hex:g,source:"hex"},A)};return be.createElement("div",{style:d.card,className:"github-picker "+u},be.createElement("div",{style:d.triangleShadow}),be.createElement("div",{style:d.triangle}),cS(o,function(p){return be.createElement(sdo,{color:p,key:p,onClick:f,onSwatchHover:i})}))};C9e.propTypes={width:mo.oneOfType([mo.string,mo.number]),colors:mo.arrayOf(mo.string),triangle:mo.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:mo.object};C9e.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};p1(C9e);var cdo=function(e){var n=e.direction,o=$i({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return be.createElement("div",{style:o.picker})},udo=Object.assign||function(t){for(var e=1;e.5});return be.createElement("div",{style:o.picker})},pdo=function(){var e=$i({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return be.createElement("div",{style:e.pointer},be.createElement("div",{style:e.left},be.createElement("div",{style:e.leftInside})),be.createElement("div",{style:e.right},be.createElement("div",{style:e.rightInside})))},RHe=function(e){var n=e.onClick,o=e.label,r=e.children,i=e.active,a=$i({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return be.createElement("div",{style:a.button,onClick:n},o||r)},gdo=function(e){var n=e.rgb,o=e.currentColor,r=$i({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+n.r+","+n.g+", "+n.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:o,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return be.createElement("div",null,be.createElement("div",{style:r.label},"new"),be.createElement("div",{style:r.swatches},be.createElement("div",{style:r.new}),be.createElement("div",{style:r.current})),be.createElement("div",{style:r.label},"current"))},mdo=function(){function t(e,n){for(var o=0;o100&&(u.a=100),u.a/=100,n({h:r.h,s:r.s,l:r.l,a:u.a,source:"rgb"},d))};return be.createElement("div",{style:l.fields,className:"flexbox-fix"},be.createElement("div",{style:l.double},be.createElement(cl,{style:{input:l.input,label:l.label},label:"hex",value:i.replace("#",""),onChange:s})),be.createElement("div",{style:l.single},be.createElement(cl,{style:{input:l.input,label:l.label},label:"r",value:o.r,onChange:s,dragLabel:"true",dragMax:"255"})),be.createElement("div",{style:l.single},be.createElement(cl,{style:{input:l.input,label:l.label},label:"g",value:o.g,onChange:s,dragLabel:"true",dragMax:"255"})),be.createElement("div",{style:l.single},be.createElement(cl,{style:{input:l.input,label:l.label},label:"b",value:o.b,onChange:s,dragLabel:"true",dragMax:"255"})),be.createElement("div",{style:l.alpha},be.createElement(cl,{style:{input:l.input,label:l.label},label:"a",value:Math.round(o.a*100),onChange:s,dragLabel:"true",dragMax:"100"})))},xdo=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}var YO=24,Hdo=Srt.default=function(t){var e=t.fill,n=e===void 0?"currentColor":e,o=t.width,r=o===void 0?YO:o,i=t.height,a=i===void 0?YO:i,l=t.style,s=l===void 0?{}:l,c=Rdo(t,["fill","width","height","style"]);return MHe.default.createElement("svg",HHe({viewBox:"0 0 "+YO+" "+YO,style:HHe({fill:n,width:r,height:a},s)},c),MHe.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},Mdo=function(e){var n=e.color,o=e.onClick,r=o===void 0?function(){}:o,i=e.onSwatchHover,a=e.first,l=e.last,s=e.active,c=$i({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:A9e(n),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:a,last:l,active:s,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return be.createElement(sS,{color:n,style:c.color,onClick:r,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},be.createElement("div",{style:c.check},be.createElement(Hdo,null)))},Ido=function(e){var n=e.onClick,o=e.onSwatchHover,r=e.group,i=e.active,a=$i({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return be.createElement("div",{style:a.group},cS(r,function(l,s){return be.createElement(Mdo,{key:l,color:l,active:l.toLowerCase()===i,first:s===0,last:s===r.length-1,onClick:n,onSwatchHover:o})}))},z9e=function(e){var n=e.width,o=e.height,r=e.onChange,i=e.onSwatchHover,a=e.colors,l=e.hex,s=e.styles,c=s===void 0?{}:s,u=e.className,d=u===void 0?"":u,f=$i(h1({default:{picker:{width:n,height:o},overflow:{height:o,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},c)),p=function(A,y){return r({hex:A,source:"hex"},y)};return be.createElement("div",{style:f.picker,className:"swatches-picker "+d},be.createElement(eU,null,be.createElement("div",{style:f.overflow},be.createElement("div",{style:f.body},cS(a,function(g){return be.createElement(Ido,{key:g.toString(),group:g,active:l,onClick:p,onSwatchHover:i})}),be.createElement("div",{style:f.clear})))))};z9e.propTypes={width:mo.oneOfType([mo.string,mo.number]),height:mo.oneOfType([mo.string,mo.number]),colors:mo.arrayOf(mo.arrayOf(mo.string)),styles:mo.object};z9e.defaultProps={width:320,height:240,colors:[[yP[900],yP[700],yP[500],yP[300],yP[100]],[AP[900],AP[700],AP[500],AP[300],AP[100]],[wP[900],wP[700],wP[500],wP[300],wP[100]],[vP[900],vP[700],vP[500],vP[300],vP[100]],[xP[900],xP[700],xP[500],xP[300],xP[100]],[bP[900],bP[700],bP[500],bP[300],bP[100]],[SP[900],SP[700],SP[500],SP[300],SP[100]],[TP[900],TP[700],TP[500],TP[300],TP[100]],[PP[900],PP[700],PP[500],PP[300],PP[100]],["#194D33",JD[700],JD[500],JD[300],JD[100]],[CP[900],CP[700],CP[500],CP[300],CP[100]],[RP[900],RP[700],RP[500],RP[300],RP[100]],[HP[900],HP[700],HP[500],HP[300],HP[100]],[MP[900],MP[700],MP[500],MP[300],MP[100]],[IP[900],IP[700],IP[500],IP[300],IP[100]],[zP[900],zP[700],zP[500],zP[300],zP[100]],[DP[900],DP[700],DP[500],DP[300],DP[100]],[EP[900],EP[700],EP[500],EP[300],EP[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};p1(z9e);var D9e=function(e){var n=e.onChange,o=e.onSwatchHover,r=e.hex,i=e.colors,a=e.width,l=e.triangle,s=e.styles,c=s===void 0?{}:s,u=e.className,d=u===void 0?"":u,f=$i(h1({default:{card:{width:a,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},c),{"hide-triangle":l==="hide","top-left-triangle":l==="top-left","top-right-triangle":l==="top-right"}),p=function(A,y){Qw(A)&&n({hex:A,source:"hex"},y)};return be.createElement("div",{style:f.card,className:"twitter-picker "+d},be.createElement("div",{style:f.triangleShadow}),be.createElement("div",{style:f.triangle}),be.createElement("div",{style:f.body},cS(i,function(g,A){return be.createElement(sS,{key:A,color:g,hex:g,style:f.swatch,onClick:p,onHover:o,focusStyle:{boxShadow:"0 0 4px "+g}})}),be.createElement("div",{style:f.hash},"#"),be.createElement(cl,{label:null,style:{input:f.input},value:r.replace("#",""),onChange:p}),be.createElement("div",{style:f.clear})))};D9e.propTypes={width:mo.oneOfType([mo.string,mo.number]),triangle:mo.oneOf(["hide","top-left","top-right"]),colors:mo.arrayOf(mo.string),styles:mo.object};D9e.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};p1(D9e);var E9e=function(e){var n=$i({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(e.hsl.s*100)+"%, "+Math.round(e.hsl.l*100)+"%)"}}});return be.createElement("div",{style:n.picker})};E9e.propTypes={hsl:mo.shape({h:mo.number,s:mo.number,l:mo.number,a:mo.number})};E9e.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var F9e=function(e){var n=$i({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return be.createElement("div",{style:n.picker})};F9e.propTypes={hsl:mo.shape({h:mo.number,s:mo.number,l:mo.number,a:mo.number})};F9e.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var zdo=function(e){var n=e.onChange,o=e.rgb,r=e.hsl,i=e.hex,a=e.hsv,l=function(p,g){if(p.hex)Qw(p.hex)&&n({hex:p.hex,source:"hex"},g);else if(p.rgb){var A=p.rgb.split(",");Yae(p.rgb,"rgb")&&n({r:A[0],g:A[1],b:A[2],a:1,source:"rgb"},g)}else if(p.hsv){var y=p.hsv.split(",");Yae(p.hsv,"hsv")&&(y[2]=y[2].replace("%",""),y[1]=y[1].replace("%",""),y[0]=y[0].replace("°",""),y[1]==1?y[1]=.01:y[2]==1&&(y[2]=.01),n({h:Number(y[0]),s:Number(y[1]),v:Number(y[2]),source:"hsv"},g))}else if(p.hsl){var S=p.hsl.split(",");Yae(p.hsl,"hsl")&&(S[2]=S[2].replace("%",""),S[1]=S[1].replace("%",""),S[0]=S[0].replace("°",""),d[1]==1?d[1]=.01:d[2]==1&&(d[2]=.01),n({h:Number(S[0]),s:Number(S[1]),v:Number(S[2]),source:"hsl"},g))}},s=$i({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),c=o.r+", "+o.g+", "+o.b,u=Math.round(r.h)+"°, "+Math.round(r.s*100)+"%, "+Math.round(r.l*100)+"%",d=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.v*100)+"%";return be.createElement("div",{style:s.wrap,className:"flexbox-fix"},be.createElement("div",{style:s.fields},be.createElement("div",{style:s.double},be.createElement(cl,{style:{input:s.input,label:s.label},label:"hex",value:i,onChange:l})),be.createElement("div",{style:s.column},be.createElement("div",{style:s.single},be.createElement(cl,{style:{input:s.input2,label:s.label2},label:"rgb",value:c,onChange:l})),be.createElement("div",{style:s.single},be.createElement(cl,{style:{input:s.input2,label:s.label2},label:"hsv",value:d,onChange:l})),be.createElement("div",{style:s.single},be.createElement(cl,{style:{input:s.input2,label:s.label2},label:"hsl",value:u,onChange:l})))))},k9e=function(e){var n=e.width,o=e.onChange,r=e.rgb,i=e.hsl,a=e.hsv,l=e.hex,s=e.header,c=e.styles,u=c===void 0?{}:c,d=e.className,f=d===void 0?"":d,p=$i(h1({default:{picker:{width:n,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+r.r+", "+r.g+", "+r.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},u));return be.createElement("div",{style:p.picker,className:"google-picker "+f},be.createElement("div",{style:p.head},s),be.createElement("div",{style:p.swatch}),be.createElement("div",{style:p.saturation},be.createElement(pee,{hsl:i,hsv:a,pointer:E9e,onChange:o})),be.createElement("div",{style:p.body},be.createElement("div",{style:p.controls,className:"flexbox-fix"},be.createElement("div",{style:p.hue},be.createElement(PM,{style:p.Hue,hsl:i,radius:"4px",pointer:F9e,onChange:o}))),be.createElement(zdo,{rgb:r,hsl:i,hex:l,hsv:a,onChange:o})))};k9e.propTypes={width:mo.oneOfType([mo.string,mo.number]),styles:mo.object,header:mo.string};k9e.defaultProps={width:652,styles:{},header:"Color picker"};p1(k9e);const Ddo=({setDialogVisible:t})=>{const e=M(pn),n=M(dYe),o=M(Jn),r=M(fYe),i=M(En),a=M($s),l=M(Qn),s=uo(z.Foundation),[c,u]=m.useState((s==null?void 0:s.color)??"#808080"),d=$t(),f=S=>{switch(a){case re.AllSelectedObjectsOfThisType:{for(const C of M.getState().elements)if(C.type===z.Foundation&&!C.locked&&M.getState().selectedElementIdSet.has(C.id)&&S!==C.color)return!0;break}case re.AllObjectsOfThisType:for(const C of M.getState().elements)if(C.type===z.Foundation&&!C.locked&&S!==C.color)return!0;break;default:if(S!==(s==null?void 0:s.color))return!0}return!1},p=(S,C)=>{M.getState().set(P=>{for(const v of P.elements)if(v.type===z.Foundation&&S.has(v.id))if(C!==void 0)v.color=C;else{const T=S.get(v.id);T!==void 0&&(v.color=T)}})},g=S=>{if(s&&f(S)){switch(a){case re.AllSelectedObjectsOfThisType:{const C=new Map;for(const v of M.getState().elements)v.type===z.Foundation&&M.getState().selectedElementIdSet.has(v.id)&&C.set(v.id,v.color??"#808080");const P={name:"Set Color for Selected Foundations",timestamp:Date.now(),oldValues:C,newValue:S,undo:()=>{p(P.oldValues)},redo:()=>{p(P.oldValues,P.newValue)}};i(P),p(C,S),l(M.getState().applyCount+1);break}case re.AllObjectsOfThisType:{const C=new Map;for(const v of M.getState().elements)v.type===z.Foundation&&C.set(v.id,v.color??"#808080");const P={name:"Set Color for All Foundations",timestamp:Date.now(),oldValues:C,newValue:S,undo:()=>{for(const[v,T]of P.oldValues.entries())n(v,T)},redo:()=>{r(z.Foundation,P.newValue)}};i(P),r(z.Foundation,S),l(M.getState().applyCount+1);break}default:{const C=o(s.id),P=C?C.color:s.color,v={name:"Set Color of Selected Foundation",timestamp:Date.now(),oldValue:P,newValue:S,changedElementId:s.id,changedElementType:s.type,undo:()=>{n(v.changedElementId,v.oldValue)},redo:()=>{n(v.changedElementId,v.newValue)}};i(v),n(s.id,S),l(M.getState().applyCount+1);break}}e(C=>{C.actionState.foundationColor=S})}},A=()=>{g(c)},y=()=>{t(!1)};return h.jsx(so,{width:600,title:Y.t("word.Color",d),onApply:A,onClose:y,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:h.jsx(Ld,{color:c,onChangeComplete:S=>{u(S.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:12,children:h.jsx(Le.Group,{onChange:S=>M.getState().setFoundationActionScope(S.target.value),value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",d)})]})})})]})})},Edo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(cYe),r=M(d3),i=M(vW),a=M(kw),l=M(kH),s=M(u3),c=M(En),u=M($s),d=M(pn),f=M(no),p=M(Qn),g=M(Xi),A=uo(z.Foundation),[y,S]=m.useState((A==null?void 0:A.lx)??.1),C=m.useRef(new Map),P=m.useRef(new Map),v=m.useRef(new Map),T=m.useRef(new Map),w=m.useRef(new Map),x=m.useRef(new Map),b=m.useRef(new Map),R=m.useRef(new Map),H=m.useRef(!1),F=m.useRef(),E=$t(),N=se=>{if(A){switch(u){case re.AllSelectedObjectsOfThisType:{for(const Z of e)if(Z.type===z.Foundation&&M.getState().selectedElementIdSet.has(Z.id)){const ee=Z,te=l(ee.id);if(te.length>0&&!ye.doesNewSizeContainAllChildren(ee,te,se,ee.ly))return!1}break}case re.AllObjectsOfThisType:{for(const Z of e)if(Z.type===z.Foundation){const ee=Z,te=l(ee.id);if(te.length>0&&!ye.doesNewSizeContainAllChildren(ee,te,se,ee.ly))return!1}break}default:{const Z=l(A.id);if(Z.length>0)return ye.doesNewSizeContainAllChildren(A,Z,se,A.ly);break}}return!0}},U=se=>!N(se),W=se=>{if(A){switch(u){case re.AllSelectedObjectsOfThisType:for(const Z of e)if(Z.type===z.Foundation&&!Z.locked&&M.getState().selectedElementIdSet.has(Z.id)&&Math.abs(Z.lx-se)>Et)return!0;break;case re.AllObjectsOfThisType:for(const Z of e)if(Z.type===z.Foundation&&!Z.locked&&Math.abs(Z.lx-se)>Et)return!0;break;default:if(Math.abs((A==null?void 0:A.lx)-se)>Et)return!0}return!1}},k=(se,Z)=>{if(se==null)return null;for(const ee of se.children)if(ee.name.includes(`${Z}`))return ee;return null},D=(se,Z,ee)=>{var te,oe;if(se){for(const de of se.children)if(de.name.includes(`${ee.id}`)){(oe=(te=kn.getState().contentRef)==null?void 0:te.current)==null||oe.add(de);break}d(de=>{for(const he of de.elements)if(he.id===ee.id){he.parentId=Zo;const pe=new Kt(he.cx,he.cy).rotateAround(ai,Z.rotation[2]).add(new Kt(Z.cx,Z.cy));he.cx=pe.x,he.cy=pe.y,he.cz=0,T.current.set(he.id,new ae(pe.x,pe.y,0)),P.current.set(he.id,Zo);break}})}},L=(se,Z)=>{const ee=l(se.id),te=se.rotation[2];if(w.current.clear(),R.current.clear(),ee.length>0)for(const oe of ee)switch(oe.type){case z.Wall:break;case z.SolarPanel:case z.ParabolicTrough:case z.ParabolicDish:case z.FresnelReflector:case z.Heliostat:case z.Sensor:{const de=new Kt(oe.cx*se.lx,oe.cy*se.ly).rotateAround(ai,te);w.current.set(oe.id,de),v.current.set(oe.id,new ae(oe.cx,oe.cy));break}case z.Polygon:{const de=oe,he=[];for(const pe of de.vertices)he.push(new Kt(pe.x*se.lx,pe.y*se.ly).rotateAround(ai,te));R.current.set(oe.id,he),x.current.set(oe.id,de.vertices.map(pe=>({...pe})));break}case z.Human:case z.Tree:{v.current.set(oe.id,new ae(oe.cx,oe.cy,oe.cz));break}}if(r(se.id,Z),ee.length>0)for(const oe of ee)switch(oe.type){case z.Wall:break;case z.SolarPanel:case z.ParabolicTrough:case z.ParabolicDish:case z.FresnelReflector:case z.Heliostat:case z.Sensor:{const de=w.current.get(oe.id);if(de){const pe=new Kt(de.x,de.y).rotateAround(ai,-te).x/Z;o(oe.id,pe),T.current.set(oe.id,new ae(pe,oe.cy))}break}case z.Polygon:{const de=R.current.get(oe.id);if(de){const he=[];for(const pe of de){const me=pe.rotateAround(ai,-te),le=me.x/Z,Te=me.y/se.ly;he.push({x:le,y:Te})}a(oe.id,he),b.current.set(oe.id,he.map(pe=>({...pe})))}break}case z.Human:case z.Tree:{if(T.current.set(oe.id,new ae(oe.cx,oe.cy,oe.cz)),C.current.set(oe.id,se.id),Math.abs(oe.cz-se.lz/2)0){const de=kn.getState().contentRef,he=k(de==null?void 0:de.current,se.id);D(he,se,oe)}}else if(Math.abs(Math.abs(oe.cx)-se.lx/2)0?Z:-Z)/2;o(oe.id,de),T.current.set(oe.id,new ae(de,oe.cy,oe.cz))}break}}},j=(se,Z,ee)=>{if(!se||!Z)return;const te=kn.getState().contentRef,oe=k(te==null?void 0:te.current,Z),de=k(Z===Zo?te==null?void 0:te.current:oe,ee);if(de&&(te!=null&&te.current)){if(se===Zo)te.current.add(de);else{const he=k(te.current,se);he==null||he.add(de)}op()}},B=(se,Z)=>{se&&d(ee=>{for(const te of ee.elements)if(te.id===Z){te.parentId=se;break}})},O=(se,Z)=>{M.getState().set(ee=>{for(const te of ee.elements)if(se.has(te.id))if(Z!==void 0)te.lx=Z;else{const oe=se.get(te.id);oe!==void 0&&(te.lx=oe)}})},V=se=>{if(!A||!W(se))return;const Z=n(A.id),ee=Z?Z.lx:A.lx;if(F.current=void 0,H.current=U(se),H.current)F.current=se,S(ee);else switch(v.current.clear(),T.current.clear(),x.current.clear(),b.current.clear(),u){case re.AllSelectedObjectsOfThisType:{const te=new Map;for(const de of e)de.type===z.Foundation&&M.getState().selectedElementIdSet.has(de.id)&&te.set(de.id,de.lx);for(const de of e)de.type===z.Foundation&&M.getState().selectedElementIdSet.has(de.id)&&L(de,se);const oe={name:"Set Length for Selected Foundations",timestamp:Date.now(),oldSizes:te,newSize:se,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var de,he;if(O(oe.oldSizes),oe.oldChildrenPositionsMap&&oe.oldChildrenPositionsMap.size>0)for(const[pe,me]of oe.oldChildrenPositionsMap.entries()){s(pe,me.x,me.y,me.z);const le=(de=oe.oldChildrenParentIdMap)==null?void 0:de.get(pe),Te=(he=oe.newChildrenParentIdMap)==null?void 0:he.get(pe);le&&Te&&le!==Te&&(j(le,Te,pe),B(le,pe))}if(oe.oldChildrenVerticesMap&&oe.oldChildrenVerticesMap.size>0)for(const[pe,me]of oe.oldChildrenVerticesMap.entries())a(pe,me)},redo:()=>{var de,he;if(O(oe.oldSizes,oe.newSize),oe.newChildrenPositionsMap&&oe.newChildrenPositionsMap.size>0)for(const[pe,me]of oe.newChildrenPositionsMap.entries()){s(pe,me.x,me.y,me.z);const le=(de=oe.oldChildrenParentIdMap)==null?void 0:de.get(pe),Te=(he=oe.newChildrenParentIdMap)==null?void 0:he.get(pe);le&&Te&&le!==Te&&(j(Te,le,pe),B(Te,pe))}if(oe.newChildrenVerticesMap&&oe.newChildrenVerticesMap.size>0)for(const[pe,me]of oe.newChildrenVerticesMap.entries())a(pe,me)}};c(oe),p(f+1);break}case re.AllObjectsOfThisType:{const te=new Map;for(const de of e)de.type===z.Foundation&&te.set(de.id,de.lx);for(const de of e)de.type===z.Foundation&&L(de,se);const oe={name:"Set Length for All Foundations",timestamp:Date.now(),oldSizes:te,newSize:se,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var de,he;for(const[pe,me]of oe.oldSizes.entries())r(pe,me);if(oe.oldChildrenPositionsMap&&oe.oldChildrenPositionsMap.size>0)for(const[pe,me]of oe.oldChildrenPositionsMap.entries()){s(pe,me.x,me.y,me.z);const le=(de=oe.oldChildrenParentIdMap)==null?void 0:de.get(pe),Te=(he=oe.newChildrenParentIdMap)==null?void 0:he.get(pe);le&&Te&&le!==Te&&(j(le,Te,pe),B(le,pe))}if(oe.oldChildrenVerticesMap&&oe.oldChildrenVerticesMap.size>0)for(const[pe,me]of oe.oldChildrenVerticesMap.entries())a(pe,me)},redo:()=>{var de,he;if(i(z.Foundation,oe.newSize),oe.newChildrenPositionsMap&&oe.newChildrenPositionsMap.size>0)for(const[pe,me]of oe.newChildrenPositionsMap.entries()){s(pe,me.x,me.y,me.z);const le=(de=oe.oldChildrenParentIdMap)==null?void 0:de.get(pe),Te=(he=oe.newChildrenParentIdMap)==null?void 0:he.get(pe);le&&Te&&le!==Te&&(j(Te,le,pe),B(Te,pe))}if(oe.newChildrenVerticesMap&&oe.newChildrenVerticesMap.size>0)for(const[pe,me]of oe.newChildrenVerticesMap.entries())a(pe,me)}};c(oe),p(f+1);break}default:{L(A,se);const te={name:"Set Foundation Length",timestamp:Date.now(),oldSize:ee,newSize:se,resizedElementId:A.id,resizedElementType:A.type,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var oe,de;if(r(A.id,te.oldSize),te.oldChildrenPositionsMap&&te.oldChildrenPositionsMap.size>0)for(const[he,pe]of te.oldChildrenPositionsMap.entries()){s(he,pe.x,pe.y,pe.z);const me=(oe=te.oldChildrenParentIdMap)==null?void 0:oe.get(he),le=(de=te.newChildrenParentIdMap)==null?void 0:de.get(he);me&&le&&me!==le&&(j(me,le,he),B(me,he))}if(te.oldChildrenVerticesMap&&te.oldChildrenVerticesMap.size>0)for(const[he,pe]of te.oldChildrenVerticesMap.entries())a(he,pe)},redo:()=>{var oe,de;if(r(A.id,te.newSize),te.newChildrenPositionsMap&&te.newChildrenPositionsMap.size>0)for(const[he,pe]of te.newChildrenPositionsMap.entries()){s(he,pe.x,pe.y,pe.z);const me=(oe=te.oldChildrenParentIdMap)==null?void 0:oe.get(he),le=(de=te.newChildrenParentIdMap)==null?void 0:de.get(he);me&&le&&me!==le&&(j(le,me,he),B(le,he))}if(te.newChildrenVerticesMap&&te.newChildrenVerticesMap.size>0)for(const[he,pe]of te.newChildrenVerticesMap.entries())a(he,pe)}};c(te),p(f+1);break}}},G=()=>{t(!1)},Q=()=>{G(),g()},$=()=>{V(y),H.current||(t(!1),p(0))},ie=()=>{V(y)},q=H.current?": "+Y.t("message.NotApplicableToSelectedAction",E)+(F.current!==void 0?" ("+F.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("word.Length",E),rejectedMessage:q,onApply:ie,onClose:G,onClickCancel:Q,onClickOk:$,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:1e3,style:{width:120},step:.5,precision:2,value:y,onChange:se=>{se!==null&&S(se)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",E),": [0.1, 1000] ",Y.t("word.MeterAbbreviation",E)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",E)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:se=>M.getState().setFoundationActionScope(se.target.value),value:u,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",E)})]})})})]})})},Fdo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(u3),r=M(uYe),i=M(Fw),a=M(xW),l=M(kw),s=M(kH),c=M(En),u=M($s),d=M(pn),f=M(no),p=M(Qn),g=M(Xi),A=uo(z.Foundation),[y,S]=m.useState((A==null?void 0:A.ly)??.1),C=m.useRef(new Map),P=m.useRef(new Map),v=m.useRef(new Map),T=m.useRef(new Map),w=m.useRef(new Map),x=m.useRef(new Map),b=m.useRef(new Map),R=m.useRef(new Map),H=m.useRef(!1),F=m.useRef(),E=$t(),N=q=>{if(A){switch(u){case re.AllSelectedObjectsOfThisType:{for(const se of e)if(se.type===z.Foundation&&M.getState().selectedElementIdSet.has(se.id)){const Z=se,ee=s(Z.id);if(ee.length>0&&!ye.doesNewSizeContainAllChildren(Z,ee,Z.lx,q))return!1}break}case re.AllObjectsOfThisType:{for(const se of e)if(se.type===z.Foundation){const Z=se,ee=s(Z.id);if(ee.length>0&&!ye.doesNewSizeContainAllChildren(Z,ee,Z.lx,q))return!1}break}default:{const se=s(A.id);if(se.length>0)return ye.doesNewSizeContainAllChildren(A,se,A.lx,q);break}}return!0}},U=q=>!N(q),W=q=>{if(A){switch(u){case re.AllSelectedObjectsOfThisType:for(const se of e)if(se.type===z.Foundation&&!se.locked&&M.getState().selectedElementIdSet.has(se.id)&&Math.abs(se.ly-q)>Et)return!0;break;case re.AllObjectsOfThisType:for(const se of e)if(se.type===z.Foundation&&!se.locked&&Math.abs(se.ly-q)>Et)return!0;break;default:if(Math.abs((A==null?void 0:A.ly)-q)>Et)return!0}return!1}},k=(q,se)=>{if(q==null)return null;for(const Z of q.children)if(Z.name.includes(`${se}`))return Z;return null},D=(q,se,Z)=>{var ee,te;if(q){for(const oe of q.children)if(oe.name.includes(`${Z.id}`)){(te=(ee=kn.getState().contentRef)==null?void 0:ee.current)==null||te.add(oe);break}d(oe=>{for(const de of oe.elements)if(de.id===Z.id){de.parentId=Zo;const he=new Kt(de.cx,de.cy).rotateAround(ai,se.rotation[2]).add(new Kt(se.cx,se.cy));de.cx=he.x,de.cy=he.y,de.cz=0,T.current.set(de.id,new ae(he.x,he.y,0)),P.current.set(de.id,Zo);break}})}},L=(q,se)=>{const Z=s(q.id),ee=q.rotation[2];if(w.current.clear(),R.current.clear(),Z.length>0)for(const te of Z)switch(te.type){case z.Wall:break;case z.SolarPanel:case z.ParabolicTrough:case z.ParabolicDish:case z.FresnelReflector:case z.Heliostat:case z.Sensor:{const oe=new Kt(te.cx*q.lx,te.cy*q.ly).rotateAround(ai,ee);w.current.set(te.id,oe),v.current.set(te.id,new ae(te.cx,te.cy));break}case z.Polygon:{const oe=te,de=[];for(const he of oe.vertices)de.push(new Kt(he.x*q.lx,he.y*q.ly).rotateAround(ai,ee));R.current.set(te.id,de),x.current.set(te.id,oe.vertices.map(he=>({...he})));break}case z.Human:case z.Tree:{v.current.set(te.id,new ae(te.cx,te.cy,te.cz));break}}if(i(q.id,se),Z.length>0)for(const te of Z)switch(te.type){case z.Wall:break;case z.SolarPanel:case z.ParabolicTrough:case z.ParabolicDish:case z.FresnelReflector:case z.Heliostat:case z.Sensor:{const oe=w.current.get(te.id);if(oe){const he=new Kt(oe.x,oe.y).rotateAround(ai,-ee).y/se;r(te.id,he),T.current.set(te.id,new ae(te.cx,he))}break}case z.Polygon:{const oe=R.current.get(te.id);if(oe){const de=[];for(const he of oe){const pe=he.rotateAround(ai,-ee),me=pe.x/q.lx,le=pe.y/se;de.push({x:me,y:le})}l(te.id,de),b.current.set(te.id,de.map(he=>({...he})))}break}case z.Human:case z.Tree:{if(T.current.set(te.id,new ae(te.cx,te.cy,te.cz)),C.current.set(te.id,q.id),Math.abs(te.cz-q.lz/2)0){const oe=kn.getState().contentRef,de=k(oe==null?void 0:oe.current,q.id);D(de,q,te)}}else if(Math.abs(Math.abs(te.cy)-q.ly/2)0?se:-se)/2;r(te.id,oe),T.current.set(te.id,new ae(te.cz,oe,te.cz))}break}}},j=(q,se,Z)=>{if(!q||!se)return;const ee=kn.getState().contentRef,te=k(ee==null?void 0:ee.current,se),oe=k(se===Zo?ee==null?void 0:ee.current:te,Z);if(oe&&(ee!=null&&ee.current)){if(q===Zo)ee.current.add(oe);else{const de=k(ee.current,q);de==null||de.add(oe)}op()}},B=(q,se)=>{q&&d(Z=>{for(const ee of Z.elements)if(ee.id===se){ee.parentId=q;break}})},O=q=>{if(!A||!W(q))return;const se=n(A.id),Z=se?se.ly:A.ly;if(F.current=void 0,H.current=U(q),H.current)F.current=q,S(Z);else switch(v.current.clear(),T.current.clear(),x.current.clear(),b.current.clear(),u){case re.AllSelectedObjectsOfThisType:{const ee=new Map;for(const oe of e)oe.type===z.Foundation&&M.getState().selectedElementIdSet.has(oe.id)&&ee.set(oe.id,oe.ly);for(const oe of e)oe.type===z.Foundation&&M.getState().selectedElementIdSet.has(oe.id)&&L(oe,q);const te={name:"Set Width for Selected Foundations",timestamp:Date.now(),oldSizes:ee,newSize:q,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var oe,de;for(const[he,pe]of te.oldSizes.entries())i(he,pe);if(te.oldChildrenPositionsMap&&te.oldChildrenPositionsMap.size>0)for(const[he,pe]of te.oldChildrenPositionsMap.entries()){o(he,pe.x,pe.y,pe.z);const me=(oe=te.oldChildrenParentIdMap)==null?void 0:oe.get(he),le=(de=te.newChildrenParentIdMap)==null?void 0:de.get(he);me&&le&&me!==le&&(j(me,le,he),B(me,he))}if(te.oldChildrenVerticesMap&&te.oldChildrenVerticesMap.size>0)for(const[he,pe]of te.oldChildrenVerticesMap.entries())l(he,pe)},redo:()=>{var oe,de;for(const[he,pe]of te.oldSizes.entries())i(he,te.newSize);if(te.newChildrenPositionsMap&&te.newChildrenPositionsMap.size>0)for(const[he,pe]of te.newChildrenPositionsMap.entries()){o(he,pe.x,pe.y,pe.z);const me=(oe=te.oldChildrenParentIdMap)==null?void 0:oe.get(he),le=(de=te.newChildrenParentIdMap)==null?void 0:de.get(he);me&&le&&me!==le&&(j(le,me,he),B(le,he))}if(te.newChildrenVerticesMap&&te.newChildrenVerticesMap.size>0)for(const[he,pe]of te.newChildrenVerticesMap.entries())l(he,pe)}};c(te),p(f+1);break}case re.AllObjectsOfThisType:{const ee=new Map;for(const oe of e)oe.type===z.Foundation&&ee.set(oe.id,oe.ly);for(const oe of e)oe.type===z.Foundation&&L(oe,q);const te={name:"Set Width for All Foundations",timestamp:Date.now(),oldSizes:ee,newSize:q,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var oe,de;for(const[he,pe]of te.oldSizes.entries())i(he,pe);if(te.oldChildrenPositionsMap&&te.oldChildrenPositionsMap.size>0)for(const[he,pe]of te.oldChildrenPositionsMap.entries()){o(he,pe.x,pe.y,pe.z);const me=(oe=te.oldChildrenParentIdMap)==null?void 0:oe.get(he),le=(de=te.newChildrenParentIdMap)==null?void 0:de.get(he);me&&le&&me!==le&&(j(me,le,he),B(me,he))}if(te.oldChildrenVerticesMap&&te.oldChildrenVerticesMap.size>0)for(const[he,pe]of te.oldChildrenVerticesMap.entries())l(he,pe)},redo:()=>{var oe,de;if(a(z.Foundation,te.newSize),te.newChildrenPositionsMap&&te.newChildrenPositionsMap.size>0)for(const[he,pe]of te.newChildrenPositionsMap.entries()){o(he,pe.x,pe.y,pe.z);const me=(oe=te.oldChildrenParentIdMap)==null?void 0:oe.get(he),le=(de=te.newChildrenParentIdMap)==null?void 0:de.get(he);me&&le&&me!==le&&(j(le,me,he),B(le,he))}if(te.newChildrenVerticesMap&&te.newChildrenVerticesMap.size>0)for(const[he,pe]of te.newChildrenVerticesMap.entries())l(he,pe)}};c(te),p(f+1);break}default:{L(A,q);const ee={name:"Set Foundation Width",timestamp:Date.now(),oldSize:Z,newSize:q,resizedElementId:A.id,resizedElementType:A.type,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var te,oe;if(i(A.id,ee.oldSize),ee.oldChildrenPositionsMap&&ee.oldChildrenPositionsMap.size>0)for(const[de,he]of ee.oldChildrenPositionsMap.entries()){o(de,he.x,he.y,he.z);const pe=(te=ee.oldChildrenParentIdMap)==null?void 0:te.get(de),me=(oe=ee.newChildrenParentIdMap)==null?void 0:oe.get(de);pe&&me&&pe!==me&&(j(pe,me,de),B(pe,de))}if(ee.oldChildrenVerticesMap&&ee.oldChildrenVerticesMap.size>0)for(const[de,he]of ee.oldChildrenVerticesMap.entries())l(de,he)},redo:()=>{var te,oe;if(i(A.id,ee.newSize),ee.newChildrenPositionsMap&&ee.newChildrenPositionsMap.size>0)for(const[de,he]of ee.newChildrenPositionsMap.entries()){o(de,he.x,he.y,he.z);const pe=(te=ee.oldChildrenParentIdMap)==null?void 0:te.get(de),me=(oe=ee.newChildrenParentIdMap)==null?void 0:oe.get(de);pe&&me&&pe!==me&&(j(me,pe,de),B(me,de))}if(ee.newChildrenVerticesMap&&ee.newChildrenVerticesMap.size>0)for(const[de,he]of ee.newChildrenVerticesMap.entries())l(de,he)}};c(ee),p(f+1);break}}},V=()=>{t(!1)},G=()=>{V(),g()},Q=()=>{O(y),H.current||(t(!1),p(0))},$=()=>{O(y)},ie=H.current?": "+Y.t("message.NotApplicableToSelectedAction",E)+(F.current!==void 0?" ("+F.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("word.Width",E),rejectedMessage:ie,onApply:$,onClickCancel:G,onClickOk:Q,onClose:V,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:1e3,style:{width:120},step:.5,precision:2,value:y,onChange:q=>{q!==null&&S(q)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",E),": [0.1, 1000] ",Y.t("word.MeterAbbreviation",E)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",E)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:q=>M.getState().setFoundationActionScope(q.target.value),value:u,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",E)})]})})})]})})},kdo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(u3),l=M(no),s=M(Qn),c=uo(z.Foundation),[u,d]=m.useState((c==null?void 0:c.lz)??.1),f=m.useRef(new Map),p=m.useRef(new Map),g=m.useRef(new Map),A=m.useRef(new Map),y=$t(),S=(N,U)=>{e(W=>{const k=W.elements.find(D=>D.id===N);k&&(k.lz=U,k.cz=U/2)})},C=(N,U)=>{e(W=>{for(const k of W.elements)k.type===N&&!k.locked&&(k.lz=U,k.cz=U/2)})},P=N=>{if(c){switch(i){case re.AllSelectedObjectsOfThisType:{for(const U of n)if(U.type===z.Foundation&&!U.locked&&M.getState().selectedElementIdSet.has(U.id)&&Math.abs(U.lz-N)>Et)return!0;break}case re.AllObjectsOfThisType:for(const U of n)if(U.type===z.Foundation&&!U.locked&&Math.abs(U.lz-N)>Et)return!0;break;default:if(Math.abs((c==null?void 0:c.lz)-N)>Et)return!0}return!1}},v=(N,U)=>{if(N==null)return null;for(const W of N.children)if(W.name.includes(`${U}`))return W;return null},T=(N,U,W)=>{var k,D;if(N){for(const j of N.children)if(j.name.includes(`${W.id}`)){(D=(k=kn.getState().contentRef)==null?void 0:k.current)==null||D.add(j);break}W.parentId=Zo;const L=new Kt(W.cx,W.cy).rotateAround(ai,-U.rotation[2]).add(new Kt(U.cx,U.cy));W.cx=L.x,W.cy=L.y,W.cz=0,A.current.set(W.id,new ae(L.x,L.y,0)),p.current.set(W.id,Zo)}},w=(N,U,W)=>{e(k=>{for(const D of k.elements)if(D.parentId===N.id)if(f.current.set(D.id,N.id),g.current.set(D.id,new ae(D.cx,D.cy,D.cz)),ye.isPlantOrHuman(D))if(Math.abs(D.cz-N.lz/2)U/2){const j=kn.getState().contentRef,B=v(j==null?void 0:j.current,N.id);T(B,N,D)}else D.cz=L,A.current.set(D.id,new ae(D.cx,D.cy,L))}else D.type===z.SolarPanel&&(D.cz=U/2,A.current.set(D.id,new ae(D.cx,D.cy,U/2)));else D.foundationId===N.id&&D.type===z.SolarPanel&&D.parentType==z.Roof&&W!==void 0&&(g.current.set(D.id,new ae(D.cx,D.cy,D.cz)),D.cz=D.cz-W/2+U/2,A.current.set(D.id,new ae(D.cx,D.cy,D.cz)))})},x=(N,U,W)=>{if(!N||!U)return;const k=kn.getState().contentRef,D=v(k==null?void 0:k.current,U),L=v(U===Zo?k==null?void 0:k.current:D,W);if(L&&(k!=null&&k.current)){if(N===Zo)k.current.add(L);else{const j=v(k.current,N);j==null||j.add(L)}op()}},b=(N,U)=>{N&&e(W=>{for(const k of W.elements)if(k.id===U){k.parentId=N;break}})},R=(N,U)=>{M.getState().set(W=>{for(const k of W.elements)if(N.has(k.id))if(U!==void 0)k.lz=U,k.cz=U/2;else{const D=N.get(k.id);D!==void 0&&(k.lz=D,k.cz=D/2)}})},H=N=>{if(c&&P(N)){switch(i){case re.AllSelectedObjectsOfThisType:{const U=new Map;for(const k of n)k.type===z.Foundation&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&U.set(k.id,k.lz);for(const k of n)k.type===z.Foundation&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&w(k,N,U.get(k.id));const W={name:"Set Height for Selected Foundations",timestamp:Date.now(),oldValues:U,newValue:N,oldChildrenPositionsMap:new Map(g.current),newChildrenPositionsMap:new Map(A.current),oldChildrenParentIdMap:new Map(f.current),newChildrenParentIdMap:new Map(p.current),undo:()=>{var k,D;if(R(W.oldValues),W.oldChildrenPositionsMap&&W.oldChildrenPositionsMap.size>0)for(const[L,j]of W.oldChildrenPositionsMap.entries()){a(L,j.x,j.y,j.z);const B=(k=W.oldChildrenParentIdMap)==null?void 0:k.get(L),O=(D=W.newChildrenParentIdMap)==null?void 0:D.get(L);B&&O&&B!==O&&(x(B,O,L),b(B,L))}},redo:()=>{var D,L;const k=W.newValue;if(R(W.oldValues,k),W.newChildrenPositionsMap&&W.newChildrenPositionsMap.size>0)for(const[j,B]of W.newChildrenPositionsMap.entries()){a(j,B.x,B.y,B.z);const O=(D=W.oldChildrenParentIdMap)==null?void 0:D.get(j),V=(L=W.newChildrenParentIdMap)==null?void 0:L.get(j);O&&V&&O!==V&&(x(V,O,j),b(V,j))}}};r(W),R(U,N),s(l+1);break}case re.AllObjectsOfThisType:{const U=new Map;for(const k of n)k.type===z.Foundation&&U.set(k.id,k.lz);for(const k of n)k.type===z.Foundation&&w(k,N,U.get(k.id));const W={name:"Set Height for All Foundations",timestamp:Date.now(),oldValues:U,newValue:N,oldChildrenPositionsMap:new Map(g.current),newChildrenPositionsMap:new Map(A.current),oldChildrenParentIdMap:new Map(f.current),newChildrenParentIdMap:new Map(p.current),undo:()=>{var k,D;for(const[L,j]of W.oldValues.entries())S(L,j);if(W.oldChildrenPositionsMap&&W.oldChildrenPositionsMap.size>0)for(const[L,j]of W.oldChildrenPositionsMap.entries()){a(L,j.x,j.y,j.z);const B=(k=W.oldChildrenParentIdMap)==null?void 0:k.get(L),O=(D=W.newChildrenParentIdMap)==null?void 0:D.get(L);B&&O&&B!==O&&(x(B,O,L),b(B,L))}},redo:()=>{var D,L;const k=W.newValue;if(C(z.Foundation,k),W.newChildrenPositionsMap&&W.newChildrenPositionsMap.size>0)for(const[j,B]of W.newChildrenPositionsMap.entries()){a(j,B.x,B.y,B.z);const O=(D=W.oldChildrenParentIdMap)==null?void 0:D.get(j),V=(L=W.newChildrenParentIdMap)==null?void 0:L.get(j);O&&V&&O!==V&&(x(V,O,j),b(V,j))}}};r(W),C(z.Foundation,N),s(l+1);break}default:{const U=o(c.id),W=U?U.lz:c.lz;w(c,N,W),S(c.id,N);const k={name:"Set Foundation Height",timestamp:Date.now(),oldValue:W,newValue:N,oldChildrenPositionsMap:new Map(g.current),newChildrenPositionsMap:new Map(A.current),oldChildrenParentIdMap:new Map(f.current),newChildrenParentIdMap:new Map(p.current),changedElementId:c.id,changedElementType:c.type,undo:()=>{var D,L;if(S(k.changedElementId,k.oldValue),k.oldChildrenPositionsMap&&k.oldChildrenPositionsMap.size>0)for(const[j,B]of k.oldChildrenPositionsMap.entries()){a(j,B.x,B.y,B.z);const O=(D=k.oldChildrenParentIdMap)==null?void 0:D.get(j),V=(L=k.newChildrenParentIdMap)==null?void 0:L.get(j);O&&V&&O!==V&&(x(O,V,j),b(O,j))}},redo:()=>{var D,L;if(S(k.changedElementId,k.newValue),k.newChildrenPositionsMap&&k.newChildrenPositionsMap.size>0)for(const[j,B]of k.newChildrenPositionsMap.entries()){a(j,B.x,B.y,B.z);const O=(D=k.oldChildrenParentIdMap)==null?void 0:D.get(j),V=(L=k.newChildrenParentIdMap)==null?void 0:L.get(j);O&&V&&O!==V&&(x(V,O,j),b(V,j))}}};r(k),s(l+1);break}}e(U=>{U.actionState.foundationHeight=N})}},F=()=>{t(!1)},E=()=>{H(u)};return h.jsx(so,{width:550,title:Y.t("word.Height",y),onApply:E,onClose:F,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:10,style:{width:120},step:.1,precision:2,value:u,onChange:N=>{N!==null&&d(N)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",y),": [0.1, 10] ",Y.t("word.MeterAbbreviation",y)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",y)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:N=>M.getState().setFoundationActionScope(N.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",y)})]})})})]})})},Ldo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(Bge),r=M(i7t),i=M(En),a=M($s),l=M(no),s=M(Qn),c=uo(z.Foundation),[u,d]=m.useState(c?-(c==null?void 0:c.rotation[2]):0),f=$t(),p=C=>{if(c){switch(a){case re.AllSelectedObjectsOfThisType:{for(const P of e)if(P.type===z.Foundation&&!P.locked&&M.getState().selectedElementIdSet.has(P.id)&&Math.abs(-P.rotation[2]-C)>Et)return!0;break}case re.AllObjectsOfThisType:for(const P of e)if(P.type===z.Foundation&&!P.locked&&Math.abs(-P.rotation[2]-C)>Et)return!0;break;default:if(Math.abs(-(c==null?void 0:c.rotation[2])-C)>Et)return!0}return!1}},g=(C,P)=>{M.getState().set(v=>{for(const T of v.elements)if(C.has(T.id))if(P!==void 0)T.rotation[2]=P;else{const w=C.get(T.id);w!==void 0&&(T.rotation[2]=-w)}})},A=C=>{if(c&&p(C))switch(a){case re.AllSelectedObjectsOfThisType:{const P=new Map;for(const T of e)T.type===z.Foundation&&M.getState().selectedElementIdSet.has(T.id)&&P.set(T.id,-T.rotation[2]);const v={name:"Set Azimuth for All Selected Foundations",timestamp:Date.now(),oldValues:P,newValue:C,undo:()=>{g(v.oldValues)},redo:()=>{g(v.oldValues,-v.newValue)}};i(v),g(P,-C),s(l+1);break}case re.AllObjectsOfThisType:{const P=new Map;for(const T of e)T.type===z.Foundation&&P.set(T.id,-T.rotation[2]);const v={name:"Set Azimuth for All Foundations",timestamp:Date.now(),oldValues:P,newValue:C,undo:()=>{for(const[T,w]of v.oldValues.entries())o(T,0,0,-w)},redo:()=>{r(z.Foundation,0,0,-v.newValue)}};i(v),r(z.Foundation,0,0,-C),s(l+1);break}default:{const P=n(c.id),v=P?-P.rotation[2]:-c.rotation[2],T={name:"Set Foundation Azimuth",timestamp:Date.now(),oldValue:v,newValue:C,changedElementId:c.id,changedElementType:c.type,undo:()=>{o(T.changedElementId,0,0,-T.oldValue)},redo:()=>{o(T.changedElementId,0,0,-T.newValue)}};i(T),o(c.id,0,0,-C),s(l+1);break}}},y=()=>{t(!1)},S=()=>{A(u)};return h.jsx(so,{width:500,title:Y.t("word.Azimuth",f),onApply:S,onClose:y,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:-180,max:180,style:{width:120},step:.5,precision:2,value:parseFloat(ye.toDegrees(u).toFixed(2)),formatter:C=>`${C}°`,onChange:C=>{C!==null&&d(ye.toRadians(C))}}),h.jsxs("div",{style:{paddingTop:"20px",paddingRight:"6px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [-180°, 180°]",h.jsx("br",{}),Y.t("message.AzimuthOfNorthIsZero",f),h.jsx("br",{}),Y.t("message.CounterclockwiseAzimuthIsPositive",f)]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:C=>M.getState().setFoundationActionScope(C.target.value),value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Wdo=({setDialogVisible:t})=>{const e=M(Kn),n=M(c3),o=M(En),r=M($s),i=M(a7t),a=M(no),l=M(Qn),s=M(Xi),c=M(Jn),u=M(pn),d=M(k=>{if(n){for(const D of k.elements)if(D.id===n.id)return D}return null}),[f,p]=m.useState((d==null?void 0:d.rValue)??i8),[g,A]=m.useState(ye.toRValueInUS(f)),[y,S]=m.useState(!1),[C,P]=m.useState({left:0,top:0,bottom:0,right:0}),v=m.useRef(null),T=$t();m.useEffect(()=>{d&&p((d==null?void 0:d.rValue)??i8)},[d==null?void 0:d.rValue]);const w=k=>{switch(r){case re.AllObjectsOfThisType:for(const D of e)if(D.type===z.Foundation&&!D.locked){const L=D;if(L.rValue===void 0||Math.abs(L.rValue-k)>Et)return!0}break;default:if((d==null?void 0:d.rValue)===void 0||Math.abs((d==null?void 0:d.rValue)-k)>Et)return!0}return!1},x=(k,D)=>{u(L=>{for(const j of L.elements)if(j.id===k){j.rValue=D;break}})},b=k=>{for(const[D,L]of k.entries())x(D,L)},R=(k,D)=>{for(const L of k.keys())x(L,D)},H=k=>{if(d&&w(k)){switch(r){case re.AllObjectsOfThisType:{const D=new Map;u(j=>{for(const B of j.elements)if(B.type===z.Foundation&&!B.locked){const O=B;D.set(B.id,O.rValue??i8),O.rValue=k}});const L={name:"Set R-Value for All Ground Floors",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{b(L.oldValues)},redo:()=>{R(L.oldValues,L.newValue)}};o(L),l(a+1);break}default:{if(d){const L=c(d.id).rValue??d.rValue??i8,j={name:"Set Ground Floor R-Value",timestamp:Date.now(),oldValue:L,newValue:k,changedElementId:d.id,changedElementType:d.type,undo:()=>{x(j.changedElementId,j.oldValue)},redo:()=>{x(j.changedElementId,j.newValue)}};o(j),x(d.id,k),l(a+1)}break}}u(D=>{D.actionState.groundFloorRValue=k})}},F=(k,D)=>{if(v.current){const{clientWidth:L,clientHeight:j}=window.document.documentElement,B=v.current.getBoundingClientRect();P({left:-B.left+D.x,right:L-(B.right-D.x),top:-B.top+D.y,bottom:j-((B==null?void 0:B.bottom)-D.y)})}},E=()=>{p((d==null?void 0:d.rValue)??i8),t(!1)},N=()=>{E(),s()},U=()=>{H(f),t(!1),l(0)},W=()=>{H(f)};return h.jsx(h.Fragment,{children:h.jsx(xi,{width:550,open:!0,title:h.jsxs("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>S(!0),onMouseOut:()=>S(!1),children:[Y.t("word.RValue",T)+" ","(",Y.t("word.ThermalResistance",T),")"]}),footer:[h.jsx(io,{onClick:W,children:Y.t("word.Apply",T)},"Apply"),h.jsx(io,{onClick:N,children:Y.t("word.Cancel",T)},"Cancel"),h.jsx(io,{type:"primary",onClick:U,children:Y.t("word.OK",T)},"OK")],onCancel:E,maskClosable:!1,destroyOnClose:!1,modalRender:k=>h.jsx(Bi,{disabled:!y,bounds:C,onStart:(D,L)=>F(D,L),children:h.jsx("div",{ref:v,children:k})}),children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:f,formatter:k=>Number(k).toFixed(2),onChange:k=>{k!==null&&(p(k),A(ye.toRValueInUS(k)))},onPressEnter:U}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",T),": [0.01, 100]",h.jsx("br",{}),Y.t("word.SIUnit",T),": m²·℃/W"]}),h.jsx("br",{}),h.jsx(Sn,{min:ye.toRValueInUS(.01),max:ye.toRValueInUS(100),style:{width:120},step:.01,precision:2,value:g,formatter:k=>Number(k).toFixed(2),onChange:k=>{k!==null&&(A(k),p(ye.toRValueInSI(k)))},onPressEnter:U}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",T),": [",ye.toRValueInUS(.01).toFixed(3),", ",ye.toRValueInUS(100).toFixed(1),"]",h.jsx("br",{}),Y.t("word.USUnit",T),": h·ft²·℉/Btu"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:k=>i(k.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisGroundFloor",T)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllGroundFloors",T)})]})})})]})})})},Ndo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarAbsorberPipe,[u,d]=m.useState((c==null?void 0:c.absorberHeight)??10),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.absorberHeight=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusPipe&&(x.solarAbsorberPipe||(x.solarAbsorberPipe={}),x.solarAbsorberPipe.absorberHeight=v)}})},A=(v,T)=>{M.getState().set(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.absorberHeight=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.absorberHeight===void 0||Math.abs(w.solarAbsorberPipe.absorberHeight-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.absorberHeight===void 0||Math.abs(w.solarAbsorberPipe.absorberHeight-v)>Et))return!0}break;default:if((c==null?void 0:c.absorberHeight)===void 0||Math.abs((c==null?void 0:c.absorberHeight)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.absorberHeight??10)}const w={name:"Set Absorber Height for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.absorberHeight??10)}const w={name:"Set Absorber Height for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarAbsorberPipe?T.solarAbsorberPipe.absorberHeight??10:c.absorberHeight??10;p(s.id,v);const x={name:"Set Absorber Height on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:550,title:Y.t("solarAbsorberPipeMenu.AbsorberHeight",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:50,style:{width:120},step:.5,precision:2,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [1, 50] ",Y.t("word.MeterAbbreviation",f)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",f)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Udo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarAbsorberPipe,[u,d]=m.useState((c==null?void 0:c.apertureWidth)??.6),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.apertureWidth=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusPipe&&(x.solarAbsorberPipe||(x.solarAbsorberPipe={}),x.solarAbsorberPipe.apertureWidth=v)}})},A=(v,T)=>{M.getState().set(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.apertureWidth=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.apertureWidth===void 0||Math.abs(w.solarAbsorberPipe.apertureWidth-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.apertureWidth===void 0||Math.abs(w.solarAbsorberPipe.apertureWidth-v)>Et))return!0}break;default:if((c==null?void 0:c.apertureWidth)===void 0||Math.abs((c==null?void 0:c.apertureWidth)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.apertureWidth??.6)}const w={name:"Set Absorber Aperture Width for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.apertureWidth??.6)}const w={name:"Set Absorber Aperture Width for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarAbsorberPipe?T.solarAbsorberPipe.apertureWidth??.6:c.apertureWidth??.6;p(s.id,v);const x={name:"Set Absorber Aperture Width on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:550,title:Y.t("solarAbsorberPipeMenu.AbsorberApertureWidth",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:2,style:{width:120},step:.01,precision:2,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0.1, 2] ",Y.t("word.MeterAbbreviation",f)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",f)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},jdo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarAbsorberPipe,[u,d]=m.useState((c==null?void 0:c.poleNumber)??5),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.poleNumber=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusPipe&&(x.solarAbsorberPipe||(x.solarAbsorberPipe={}),x.solarAbsorberPipe.poleNumber=v)}})},A=(v,T)=>{M.getState().set(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.poleNumber=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.poleNumber===void 0||w.solarAbsorberPipe.poleNumber!==v))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.poleNumber===void 0||w.solarAbsorberPipe.poleNumber!==v))return!0}break;default:if((c==null?void 0:c.poleNumber)===void 0||(c==null?void 0:c.poleNumber)!==v)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.poleNumber??5)}const w={name:"Set Absorber Pipe Pole Number for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.poleNumber??5)}const w={name:"Set Absorber Pipe Pole Number for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarAbsorberPipe?T.solarAbsorberPipe.poleNumber??5:c.poleNumber??5;p(s.id,v);const x={name:"Set Absorber Pipe Pole Number on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:550,title:Y.t("solarAbsorberPipeMenu.AbsorberPipePoleNumber",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:1,max:100,style:{width:120},step:1,precision:0,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [1, 100]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Bdo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarAbsorberPipe,[u,d]=m.useState((c==null?void 0:c.absorberAbsorptance)??.95),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.absorberAbsorptance=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusPipe&&(x.solarAbsorberPipe||(x.solarAbsorberPipe={}),x.solarAbsorberPipe.absorberAbsorptance=v)}})},A=(v,T)=>{M.getState().set(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.absorberAbsorptance=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.absorberAbsorptance===void 0||Math.abs(w.solarAbsorberPipe.absorberAbsorptance-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.absorberAbsorptance===void 0||Math.abs(w.solarAbsorberPipe.absorberAbsorptance-v)>Et))return!0}break;default:if((c==null?void 0:c.absorberAbsorptance)===void 0||Math.abs((c==null?void 0:c.absorberAbsorptance)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.absorberAbsorptance??.95)}const w={name:"Set Absorber Pipe Absorptance for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.absorberAbsorptance??.95)}const w={name:"Set Absorber Pipe Absorptance for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarAbsorberPipe?T.solarAbsorberPipe.absorberAbsorptance??.95:c.absorberAbsorptance??.95;p(s.id,v);const x={name:"Set Absorber Pipe Absorptance on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:500,title:Y.t("solarAbsorberPipeMenu.AbsorberAbsorptance",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:8,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.01,precision:2,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Ydo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarAbsorberPipe,[u,d]=m.useState((c==null?void 0:c.absorberOpticalEfficiency)??.7),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.absorberOpticalEfficiency=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusPipe&&(x.solarAbsorberPipe||(x.solarAbsorberPipe={}),x.solarAbsorberPipe.absorberOpticalEfficiency=v)}})},A=(v,T)=>{M.getState().set(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.absorberOpticalEfficiency=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.absorberOpticalEfficiency===void 0||Math.abs(w.solarAbsorberPipe.absorberOpticalEfficiency-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.absorberOpticalEfficiency===void 0||Math.abs(w.solarAbsorberPipe.absorberOpticalEfficiency-v)>Et))return!0}break;default:if((c==null?void 0:c.absorberOpticalEfficiency)===void 0||Math.abs((c==null?void 0:c.absorberOpticalEfficiency)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.absorberOpticalEfficiency??.7)}const w={name:"Set Absorber Optical Efficiency for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.absorberOpticalEfficiency??.7)}const w={name:"Set Absorber Optical Efficiency for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarAbsorberPipe?T.solarAbsorberPipe.absorberOpticalEfficiency??.7:c.absorberOpticalEfficiency??.7;p(s.id,v);const x={name:"Set Absorber Optical Efficiency on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:500,title:Y.t("solarAbsorberPipeMenu.AbsorberOpticalEfficiency",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:8,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.01,precision:2,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Odo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarAbsorberPipe,[u,d]=m.useState((c==null?void 0:c.absorberThermalEfficiency)??.3),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.absorberThermalEfficiency=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusPipe&&(x.solarAbsorberPipe||(x.solarAbsorberPipe={}),x.solarAbsorberPipe.absorberThermalEfficiency=v)}})},A=(v,T)=>{M.getState().set(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusPipe&&(b.solarAbsorberPipe||(b.solarAbsorberPipe={}),b.solarAbsorberPipe.absorberThermalEfficiency=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.absorberThermalEfficiency===void 0||Math.abs(w.solarAbsorberPipe.absorberThermalEfficiency-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusPipe&&w.solarAbsorberPipe&&(w.solarAbsorberPipe.absorberThermalEfficiency===void 0||Math.abs(w.solarAbsorberPipe.absorberThermalEfficiency-v)>Et))return!0}break;default:if((c==null?void 0:c.absorberThermalEfficiency)===void 0||Math.abs((c==null?void 0:c.absorberThermalEfficiency)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.absorberThermalEfficiency??.3)}const w={name:"Set Absorber Thermal Efficiency for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarAbsorberPipe&&T.set(x.id,b.solarAbsorberPipe.absorberThermalEfficiency??.3)}const w={name:"Set Absorber Thermal Efficiency for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarAbsorberPipe?T.solarAbsorberPipe.absorberThermalEfficiency??.3:c.absorberThermalEfficiency??.3;p(s.id,v);const x={name:"Set Absorber Thermal Efficiency on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:500,title:Y.t("solarAbsorberPipeMenu.AbsorberThermalEfficiency",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:8,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.01,precision:2,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Vdo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarPowerTower,[u,d]=m.useState((c==null?void 0:c.towerHeight)??20),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.towerHeight=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusTower&&(x.solarPowerTower||(x.solarPowerTower={}),x.solarPowerTower.towerHeight=v)}})},A=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.towerHeight=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.towerHeight===void 0||Math.abs(w.solarPowerTower.towerHeight-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.towerHeight===void 0||Math.abs(w.solarPowerTower.towerHeight-v)>Et))return!0}break;default:if((c==null?void 0:c.towerHeight)===void 0||Math.abs((c==null?void 0:c.towerHeight)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.towerHeight??20)}const w={name:"Set Tower Height for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.towerHeight??20)}const w={name:"Set Tower Height for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarPowerTower?T.solarPowerTower.towerHeight??20:c.towerHeight??20;p(s.id,v);const x={name:"Set Tower Height on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:550,title:Y.t("solarPowerTowerMenu.ReceiverTowerHeight",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:10,max:500,style:{width:120},step:1,precision:1,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [10, 500] ",Y.t("word.MeterAbbreviation",f)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",f)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},_do=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarPowerTower,[u,d]=m.useState((c==null?void 0:c.towerRadius)??1),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.towerRadius=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusTower&&(x.solarPowerTower||(x.solarPowerTower={}),x.solarPowerTower.towerRadius=v)}})},A=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.towerRadius=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.towerRadius===void 0||Math.abs(w.solarPowerTower.towerRadius-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.towerRadius===void 0||Math.abs(w.solarPowerTower.towerRadius-v)>Et))return!0}break;default:if((c==null?void 0:c.towerRadius)===void 0||Math.abs((c==null?void 0:c.towerRadius)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.towerRadius??1)}const w={name:"Set Tower Radius for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.towerRadius??1)}const w={name:"Set Tower Radius for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarPowerTower?T.solarPowerTower.towerRadius??1:c.towerRadius??1;p(s.id,v);const x={name:"Set Tower Radius on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:550,title:Y.t("solarPowerTowerMenu.ReceiverTowerRadius",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.5,max:10,style:{width:120},step:.5,precision:1,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0.5, 10] ",Y.t("word.MeterAbbreviation",f)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",f)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Gdo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarPowerTower,[u,d]=m.useState((c==null?void 0:c.receiverAbsorptance)??.95),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.receiverAbsorptance=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusTower&&(x.solarPowerTower||(x.solarPowerTower={}),x.solarPowerTower.receiverAbsorptance=v)}})},A=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.receiverAbsorptance=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.receiverAbsorptance===void 0||Math.abs(w.solarPowerTower.receiverAbsorptance-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.receiverAbsorptance===void 0||Math.abs(w.solarPowerTower.receiverAbsorptance-v)>Et))return!0}break;default:if((c==null?void 0:c.receiverAbsorptance)===void 0||Math.abs((c==null?void 0:c.receiverAbsorptance)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.receiverAbsorptance??.95)}const w={name:"Set Receiver Absorptance for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.receiverAbsorptance??.95)}const w={name:"Set Receiver Absorptance for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarPowerTower?T.solarPowerTower.receiverAbsorptance??.95:c.receiverAbsorptance??.95;p(s.id,v);const x={name:"Set Receiver Absorptance on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:500,title:Y.t("solarPowerTowerMenu.ReceiverAbsorptance",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:8,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.01,precision:2,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Xdo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarPowerTower,[u,d]=m.useState((c==null?void 0:c.receiverThermalEfficiency)??.3),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.receiverThermalEfficiency=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusTower&&(x.solarPowerTower||(x.solarPowerTower={}),x.solarPowerTower.receiverThermalEfficiency=v)}})},A=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.receiverThermalEfficiency=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.receiverThermalEfficiency===void 0||Math.abs(w.solarPowerTower.receiverThermalEfficiency-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.receiverThermalEfficiency===void 0||Math.abs(w.solarPowerTower.receiverThermalEfficiency-v)>Et))return!0}break;default:if((c==null?void 0:c.receiverThermalEfficiency)===void 0||Math.abs((c==null?void 0:c.receiverThermalEfficiency)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.receiverThermalEfficiency??.3)}const w={name:"Set Receiver Thermal Efficiency for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.receiverThermalEfficiency??.3)}const w={name:"Set Receiver Thermal Efficiency for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarPowerTower?T.solarPowerTower.receiverThermalEfficiency??.3:c.receiverThermalEfficiency??.3;p(s.id,v);const x={name:"Set Receiver Thermal Efficiency on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:550,title:Y.t("solarPowerTowerMenu.ReceiverThermalEfficiency",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:8,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.01,precision:2,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Jdo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),c=s==null?void 0:s.solarPowerTower,[u,d]=m.useState((c==null?void 0:c.receiverOpticalEfficiency)??.7),f=$t(),p=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.receiverOpticalEfficiency=T);break}})},g=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.FocusTower&&(x.solarPowerTower||(x.solarPowerTower={}),x.solarPowerTower.receiverOpticalEfficiency=v)}})},A=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.FocusTower&&(b.solarPowerTower||(b.solarPowerTower={}),b.solarPowerTower.receiverOpticalEfficiency=T)}})},y=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.receiverOpticalEfficiency===void 0||Math.abs(w.solarPowerTower.receiverOpticalEfficiency-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.FocusTower&&w.solarPowerTower&&(w.solarPowerTower.receiverOpticalEfficiency===void 0||Math.abs(w.solarPowerTower.receiverOpticalEfficiency-v)>Et))return!0}break;default:if((c==null?void 0:c.receiverOpticalEfficiency)===void 0||Math.abs((c==null?void 0:c.receiverOpticalEfficiency)-v)>Et)return!0}return!1},S=v=>{if(!(!s||!c)&&y(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.receiverOpticalEfficiency??.7)}const w={name:"Set Receiver Optical Efficiency for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{A(w.oldValues,w.newValue)}};r(w),A(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarPowerTower&&T.set(x.id,b.solarPowerTower.receiverOpticalEfficiency??.7)}const w={name:"Set Receiver Optical Efficiency for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())p(x,b)},redo:()=>{g(w.newValue)}};r(w),g(v),l(a+1);break}default:{const T=o(s.id),w=T&&T.solarPowerTower?T.solarPowerTower.receiverOpticalEfficiency??.7:c.receiverOpticalEfficiency??.7;p(s.id,v);const x={name:"Set Receiver Optical Efficiency on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};r(x),l(a+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:500,title:Y.t("solarPowerTowerMenu.ReceiverOpticalEfficiency",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:8,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.01,precision:2,value:u,onChange:v=>{v!==null&&d(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",f)})]})})})]})})},Kdo=({setDialogVisible:t})=>{var P;const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),[c,u]=m.useState(((P=s==null?void 0:s.solarUpdraftTower)==null?void 0:P.chimneyHeight)??Math.max((s==null?void 0:s.lx)??0,(s==null?void 0:s.ly)??0)),d=$t(),f=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.chimneyHeight=T);break}})},p=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.UpdraftTower&&(x.solarUpdraftTower||(x.solarUpdraftTower={}),x.solarUpdraftTower.chimneyHeight=v)}})},g=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.chimneyHeight=T)}})},A=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.chimneyHeight===void 0||Math.abs(w.solarUpdraftTower.chimneyHeight-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.chimneyHeight===void 0||Math.abs(w.solarUpdraftTower.chimneyHeight-v)>Et))return!0}break;default:if(s&&s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower&&(s.solarUpdraftTower.chimneyHeight===void 0||Math.abs(s.solarUpdraftTower.chimneyHeight-v)>Et))return!0}return!1},y=v=>{var T,w;if(s&&A(v))switch(i){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)if(R.type===z.Foundation&&M.getState().selectedElementIdSet.has(R.id)){const H=R;H.solarStructure===Dn.UpdraftTower&&H.solarUpdraftTower&&x.set(R.id,((T=H.solarUpdraftTower)==null?void 0:T.chimneyHeight)??Math.max(H.lx,H.ly))}const b={name:"Set Solar Chimney Height for Selected Foundations",timestamp:Date.now(),oldValues:x,newValue:v,undo:()=>{for(const[R,H]of b.oldValues.entries())f(R,H)},redo:()=>{g(b.oldValues,b.newValue)}};r(b),g(x,v),l(a+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)if(R.type===z.Foundation){const H=R;H.solarStructure===Dn.UpdraftTower&&H.solarUpdraftTower&&x.set(R.id,((w=H.solarUpdraftTower)==null?void 0:w.chimneyHeight)??Math.max(H.lx,H.ly))}const b={name:"Set Solar Chimney Height for All Foundations",timestamp:Date.now(),oldValues:x,newValue:v,undo:()=>{for(const[R,H]of b.oldValues.entries())f(R,H)},redo:()=>{p(b.newValue)}};r(b),p(v),l(a+1);break}default:{if(s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower){const x=o(s.id),b=x&&x.solarUpdraftTower?x.solarUpdraftTower.chimneyHeight??Math.max(x.lx,x.ly):s.solarUpdraftTower.chimneyHeight??Math.max(s.lx,s.ly);f(s.id,v);const R={name:"Set Solar Chimney Height on Foundation",timestamp:Date.now(),oldValue:b,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(R.changedElementId,R.oldValue)},redo:()=>{f(R.changedElementId,R.newValue)}};r(R),l(a+1)}break}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerChimneyHeight",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:1e3,style:{width:120},step:1,precision:1,value:c,onChange:v=>{v!==null&&u(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [1, 1000] ",Y.t("word.MeterAbbreviation",d)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",d)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",d)})]})})})]})})},qdo=({setDialogVisible:t})=>{var P;const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),[c,u]=m.useState(((P=s==null?void 0:s.solarUpdraftTower)==null?void 0:P.chimneyRadius)??Math.max(1,.025*Math.min((s==null?void 0:s.lx)??0,(s==null?void 0:s.ly)??0))),d=$t(),f=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.chimneyRadius=T);break}})},p=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.UpdraftTower&&(x.solarUpdraftTower||(x.solarUpdraftTower={}),x.solarUpdraftTower.chimneyRadius=v)}})},g=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.chimneyRadius=T)}})},A=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.chimneyRadius===void 0||Math.abs(w.solarUpdraftTower.chimneyRadius-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.chimneyRadius===void 0||Math.abs(w.solarUpdraftTower.chimneyRadius-v)>Et))return!0}break;default:if(s&&s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower&&(s.solarUpdraftTower.chimneyRadius===void 0||Math.abs(s.solarUpdraftTower.chimneyRadius-v)>Et))return!0}return!1},y=v=>{var T,w;if(s&&A(v))switch(i){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)if(R.type===z.Foundation&&M.getState().selectedElementIdSet.has(R.id)){const H=R;H.solarStructure===Dn.UpdraftTower&&H.solarUpdraftTower&&x.set(R.id,((T=H.solarUpdraftTower)==null?void 0:T.chimneyRadius)??Math.max(1,.025*Math.min(H.lx,H.ly)))}const b={name:"Set Solar Chimney Radius for Selected Foundations",timestamp:Date.now(),oldValues:x,newValue:v,undo:()=>{for(const[R,H]of b.oldValues.entries())f(R,H)},redo:()=>{g(b.oldValues,b.newValue)}};r(b),g(x,v),l(a+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)if(R.type===z.Foundation){const H=R;H.solarStructure===Dn.UpdraftTower&&H.solarUpdraftTower&&x.set(R.id,((w=H.solarUpdraftTower)==null?void 0:w.chimneyRadius)??Math.max(1,.025*Math.min(H.lx,H.ly)))}const b={name:"Set Solar Chimney Radius for All Foundations",timestamp:Date.now(),oldValues:x,newValue:v,undo:()=>{for(const[R,H]of b.oldValues.entries())f(R,H)},redo:()=>{p(b.newValue)}};r(b),p(v),l(a+1);break}default:{if(s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower){const x=o(s.id),b=x&&x.solarUpdraftTower?x.solarUpdraftTower.chimneyRadius??Math.max(1,.025*Math.min(x.lx,x.ly)):s.solarUpdraftTower.chimneyRadius??Math.max(1,.025*Math.min(s.lx,s.ly));f(s.id,v);const R={name:"Set Solar Chimney Radius on Foundation",timestamp:Date.now(),oldValue:b,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(R.changedElementId,R.oldValue)},redo:()=>{f(R.changedElementId,R.newValue)}};r(R),l(a+1)}break}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerChimneyRadius",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:10,style:{width:120},step:1,precision:1,value:c,onChange:v=>{v!==null&&u(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [0.1, 10] ",Y.t("word.MeterAbbreviation",d)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",d)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",d)})]})})})]})})},$do=({setDialogVisible:t})=>{var S;const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=uo(z.Foundation),[l,s]=m.useState(((S=a==null?void 0:a.solarUpdraftTower)==null?void 0:S.collectorHeight)??Math.max(3,10*((a==null?void 0:a.lz)??0))),c=$t(),u=(C,P)=>{e(v=>{for(const T of v.elements)if(T.type===z.Foundation&&T.id===C&&!T.locked){const w=T;w.solarStructure===Dn.UpdraftTower&&(w.solarUpdraftTower||(w.solarUpdraftTower={}),w.solarUpdraftTower.collectorHeight=P);break}})},d=C=>{e(P=>{for(const v of P.elements)if(v.type===z.Foundation&&!v.locked){const T=v;T.solarStructure===Dn.UpdraftTower&&(T.solarUpdraftTower||(T.solarUpdraftTower={}),T.solarUpdraftTower.collectorHeight=C)}})},f=(C,P)=>{e(v=>{for(const T of v.elements)if(T.type===z.Foundation&&!T.locked&&C.has(T.id)){const w=T;w.solarStructure===Dn.UpdraftTower&&(w.solarUpdraftTower||(w.solarUpdraftTower={}),w.solarUpdraftTower.collectorHeight=P)}})},p=C=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const P of n)if(P.type===z.Foundation&&!P.locked&&M.getState().selectedElementIdSet.has(P.id)){const v=P;if(v.solarStructure===Dn.UpdraftTower&&v.solarUpdraftTower&&(v.solarUpdraftTower.collectorHeight===void 0||Math.abs(v.solarUpdraftTower.collectorHeight-C)>Et))return!0}break;case re.AllObjectsOfThisType:for(const P of n)if(P.type===z.Foundation&&!P.locked){const v=P;if(v.solarStructure===Dn.UpdraftTower&&v.solarUpdraftTower&&(v.solarUpdraftTower.collectorHeight===void 0||Math.abs(v.solarUpdraftTower.collectorHeight-C)>Et))return!0}break;default:if(a&&a.solarStructure===Dn.UpdraftTower&&a.solarUpdraftTower&&(a.solarUpdraftTower.collectorHeight===void 0||Math.abs(a.solarUpdraftTower.collectorHeight-C)>Et))return!0}return!1},g=C=>{if(a&&p(C))switch(i){case re.AllSelectedObjectsOfThisType:{const P=new Map;for(const T of n)if(T.type===z.Foundation&&M.getState().selectedElementIdSet.has(T.id)){const w=T;w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&P.set(T.id,w.solarUpdraftTower.collectorHeight??Math.max(3,10*w.lz))}const v={name:"Set Solar Collector Height for Selected Foundations",timestamp:Date.now(),oldValues:P,newValue:C,undo:()=>{for(const[T,w]of v.oldValues.entries())u(T,w)},redo:()=>{f(v.oldValues,v.newValue)}};r(v),f(P,C);break}case re.AllObjectsOfThisType:{const P=new Map;for(const T of n)if(T.type===z.Foundation){const w=T;w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&P.set(T.id,w.solarUpdraftTower.collectorHeight??Math.max(3,10*w.lz))}const v={name:"Set Solar Collector Height for All Foundations",timestamp:Date.now(),oldValues:P,newValue:C,undo:()=>{for(const[T,w]of v.oldValues.entries())u(T,w)},redo:()=>{d(v.newValue)}};r(v),d(C);break}default:{if(a.solarStructure===Dn.UpdraftTower&&a.solarUpdraftTower){const P=o(a.id),v=P&&P.solarUpdraftTower?P.solarUpdraftTower.collectorHeight??Math.max(3,10*P.lz):a.solarUpdraftTower.collectorHeight??Math.max(3,10*a.lz);u(a.id,C);const T={name:"Set Solar Collector Height on Foundation",timestamp:Date.now(),oldValue:v,newValue:C,changedElementId:a.id,changedElementType:a.type,undo:()=>{u(T.changedElementId,T.oldValue)},redo:()=>{u(T.changedElementId,T.newValue)}};r(T)}break}}},A=()=>{t(!1)},y=()=>{g(l)};return h.jsx(so,{width:550,title:Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerCollectorHeight",c),onApply:y,onClose:A,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:20,style:{width:120},step:1,precision:1,value:l,onChange:C=>{C!==null&&s(C)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",c),": [0.1, 20] ",Y.t("word.MeterAbbreviation",c)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",c)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:C=>M.getState().setFoundationActionScope(C.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",c)})]})})})]})})},Qdo=({setDialogVisible:t})=>{var P;const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),[c,u]=m.useState(((P=s==null?void 0:s.solarUpdraftTower)==null?void 0:P.collectorRadius)??Math.max(10,.5*Math.min((s==null?void 0:s.lx)??0,(s==null?void 0:s.ly)??0))),d=$t(),f=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.collectorRadius=T);break}})},p=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.UpdraftTower&&(x.solarUpdraftTower||(x.solarUpdraftTower={}),x.solarUpdraftTower.collectorRadius=v)}})},g=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.collectorRadius=T)}})},A=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.collectorRadius===void 0||Math.abs(w.solarUpdraftTower.collectorRadius-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.collectorRadius===void 0||Math.abs(w.solarUpdraftTower.collectorRadius-v)>Et))return!0}break;default:if(s&&s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower&&(s.solarUpdraftTower.collectorRadius===void 0||Math.abs(s.solarUpdraftTower.collectorRadius-v)>Et))return!0}return!1},y=v=>{if(s&&A(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.collectorRadius??Math.max(10,.5*Math.min(b.lx,b.ly)))}const w={name:"Set Solar Collector Radius for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{g(w.oldValues,w.newValue)}};r(w),g(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.collectorRadius??Math.max(10,.5*Math.min(b.lx,b.ly)))}const w={name:"Set Solar Collector Radius for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{p(w.newValue)}};r(w),p(v),l(a+1);break}default:{if(s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower){const T=o(s.id),w=T&&T.solarUpdraftTower?T.solarUpdraftTower.collectorRadius??Math.max(10,.5*Math.min(T.lx,T.ly)):s.solarUpdraftTower.collectorRadius??Math.max(10,.5*Math.min(s.lx,s.ly));f(s.id,v);const x={name:"Set Solar Collector Radius on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(x.changedElementId,x.oldValue)},redo:()=>{f(x.changedElementId,x.newValue)}};r(x),l(a+1)}break}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerCollectorRadius",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:1e3,style:{width:120},step:1,precision:1,value:c,onChange:v=>{v!==null&&u(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [1, 1000] ",Y.t("word.MeterAbbreviation",d)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",d)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",d)})]})})})]})})},Zdo=({setDialogVisible:t})=>{var P;const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),[c,u]=m.useState(((P=s==null?void 0:s.solarUpdraftTower)==null?void 0:P.collectorTransmissivity)??.9),d=$t(),f=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.collectorTransmissivity=T);break}})},p=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.UpdraftTower&&(x.solarUpdraftTower||(x.solarUpdraftTower={}),x.solarUpdraftTower.collectorTransmissivity=v)}})},g=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.collectorTransmissivity=T)}})},A=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.collectorTransmissivity===void 0||Math.abs(w.solarUpdraftTower.collectorTransmissivity-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.collectorTransmissivity===void 0||Math.abs(w.solarUpdraftTower.collectorTransmissivity-v)>Et))return!0}break;default:if(s&&s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower&&(s.solarUpdraftTower.collectorTransmissivity===void 0||Math.abs(s.solarUpdraftTower.collectorTransmissivity-v)>Et))return!0}return!1},y=v=>{if(s&&A(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.collectorTransmissivity??.9)}const w={name:"Set Solar Collector Transmissivity for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{g(w.oldValues,w.newValue)}};r(w),g(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.collectorTransmissivity??.9)}const w={name:"Set Solar Collector Transmissivity for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{p(w.newValue)}};r(w),p(v),l(a+1);break}default:{if(s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower){const T=o(s.id),w=T&&T.solarUpdraftTower?T.solarUpdraftTower.collectorTransmissivity??.9:s.solarUpdraftTower.collectorTransmissivity??.9;f(s.id,v);const x={name:"Set Solar Collector Transmissivity on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(x.changedElementId,x.oldValue)},redo:()=>{f(x.changedElementId,x.newValue)}};r(x),l(a+1)}break}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:540,title:Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerCollectorTransmissivity",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.01,precision:2,value:c,onChange:v=>{v!==null&&u(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",marginLeft:"16px",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",d)})]})})})]})})},efo=({setDialogVisible:t})=>{var P;const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),[c,u]=m.useState(((P=s==null?void 0:s.solarUpdraftTower)==null?void 0:P.collectorEmissivity)??.95),d=$t(),f=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.collectorEmissivity=T);break}})},p=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.UpdraftTower&&(x.solarUpdraftTower||(x.solarUpdraftTower={}),x.solarUpdraftTower.collectorEmissivity=v)}})},g=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.collectorEmissivity=T)}})},A=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.collectorEmissivity===void 0||Math.abs(w.solarUpdraftTower.collectorEmissivity-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.collectorEmissivity===void 0||Math.abs(w.solarUpdraftTower.collectorEmissivity-v)>Et))return!0}break;default:if(s&&s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower&&(s.solarUpdraftTower.collectorEmissivity===void 0||Math.abs(s.solarUpdraftTower.collectorEmissivity-v)>Et))return!0}return!1},y=v=>{if(s&&A(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.collectorEmissivity??.95)}const w={name:"Set Solar Collector Emissivity for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{g(w.oldValues,w.newValue)}};r(w),g(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.collectorEmissivity??.95)}const w={name:"Set Solar Collector Emissivity for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{p(w.newValue)}};r(w),p(v),l(a+1);break}default:{if(s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower){const T=o(s.id),w=T&&T.solarUpdraftTower?T.solarUpdraftTower.collectorEmissivity??.95:s.solarUpdraftTower.collectorEmissivity??.95;f(s.id,v);const x={name:"Set Solar Collector Emissivity on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(x.changedElementId,x.oldValue)},redo:()=>{f(x.changedElementId,x.newValue)}};r(x),l(a+1)}break}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:540,title:Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerCollectorEmissivity",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.01,max:1,style:{width:120},step:.01,precision:2,value:c,onChange:v=>{v!==null&&u(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",marginLeft:"16px",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",d)})]})})})]})})},tfo=({setDialogVisible:t})=>{var P;const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),[c,u]=m.useState(((P=s==null?void 0:s.solarUpdraftTower)==null?void 0:P.dischargeCoefficient)??.65),d=$t(),f=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.dischargeCoefficient=T);break}})},p=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.UpdraftTower&&(x.solarUpdraftTower||(x.solarUpdraftTower={}),x.solarUpdraftTower.dischargeCoefficient=v)}})},g=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.dischargeCoefficient=T)}})},A=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.dischargeCoefficient===void 0||Math.abs(w.solarUpdraftTower.dischargeCoefficient-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.dischargeCoefficient===void 0||Math.abs(w.solarUpdraftTower.dischargeCoefficient-v)>Et))return!0}break;default:if(s&&s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower&&(s.solarUpdraftTower.dischargeCoefficient===void 0||Math.abs(s.solarUpdraftTower.dischargeCoefficient-v)>Et))return!0}return!1},y=v=>{if(s&&A(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.dischargeCoefficient??.65)}const w={name:"Set Solar Chimney Discharge Coefficient for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{g(w.oldValues,w.newValue)}};r(w),g(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.dischargeCoefficient??.65)}const w={name:"Set Solar Chimney Discharge Coefficient for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{p(w.newValue)}};r(w),p(v),l(a+1);break}default:{if(s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower){const T=o(s.id),w=T&&T.solarUpdraftTower?T.solarUpdraftTower.dischargeCoefficient??.65:s.solarUpdraftTower.dischargeCoefficient??.65;f(s.id,v);const x={name:"Set Solar Chimney Discharge Coefficient on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(x.changedElementId,x.oldValue)},redo:()=>{f(x.changedElementId,x.newValue)}};r(x),l(a+1)}break}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:540,title:Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerDischargeCoefficient",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.65,max:.7,style:{width:120},step:.01,precision:2,value:c,onChange:v=>{v!==null&&u(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [0.65, 0.70]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",marginLeft:"16px",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",d)})]})})})]})})},nfo=({setDialogVisible:t})=>{var P;const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M($s),a=M(no),l=M(Qn),s=uo(z.Foundation),[c,u]=m.useState(((P=s==null?void 0:s.solarUpdraftTower)==null?void 0:P.turbineEfficiency)??.3),d=$t(),f=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&x.id===v&&!x.locked){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.turbineEfficiency=T);break}})},p=v=>{e(T=>{for(const w of T.elements)if(w.type===z.Foundation&&!w.locked){const x=w;x.solarStructure===Dn.UpdraftTower&&(x.solarUpdraftTower||(x.solarUpdraftTower={}),x.solarUpdraftTower.turbineEfficiency=v)}})},g=(v,T)=>{e(w=>{for(const x of w.elements)if(x.type===z.Foundation&&!x.locked&&v.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&(b.solarUpdraftTower||(b.solarUpdraftTower={}),b.solarUpdraftTower.turbineEfficiency=T)}})},A=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.turbineEfficiency===void 0||Math.abs(w.solarUpdraftTower.turbineEfficiency-v)>Et))return!0}break;case re.AllObjectsOfThisType:for(const T of n)if(T.type===z.Foundation&&!T.locked){const w=T;if(w.solarStructure===Dn.UpdraftTower&&w.solarUpdraftTower&&(w.solarUpdraftTower.turbineEfficiency===void 0||Math.abs(w.solarUpdraftTower.turbineEfficiency-v)>Et))return!0}break;default:if(s&&s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower&&(s.solarUpdraftTower.turbineEfficiency===void 0||Math.abs(s.solarUpdraftTower.turbineEfficiency-v)>Et))return!0}return!1},y=v=>{if(s&&A(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation&&M.getState().selectedElementIdSet.has(x.id)){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.turbineEfficiency??.3)}const w={name:"Set Solar Updraft Tower Turbine Efficiency for Selected Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{g(w.oldValues,w.newValue)}};r(w),g(T,v),l(a+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of n)if(x.type===z.Foundation){const b=x;b.solarStructure===Dn.UpdraftTower&&b.solarUpdraftTower&&T.set(x.id,b.solarUpdraftTower.turbineEfficiency??.3)}const w={name:"Set Solar Updraft Tower Turbine Efficiency for All Foundations",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())f(x,b)},redo:()=>{p(w.newValue)}};r(w),p(v),l(a+1);break}default:{if(s.solarStructure===Dn.UpdraftTower&&s.solarUpdraftTower){const T=o(s.id),w=T&&T.solarUpdraftTower?T.solarUpdraftTower.turbineEfficiency??.3:s.solarUpdraftTower.turbineEfficiency??.3;f(s.id,v);const x={name:"Set Solar Updraft Tower Turbine Efficiency on Foundation",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(x.changedElementId,x.oldValue)},redo:()=>{f(x.changedElementId,x.newValue)}};r(x),l(a+1)}break}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:540,title:Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerTurbineEfficiency",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.2,max:1,style:{width:120},step:.01,precision:2,value:c,onChange:v=>{v!==null&&u(v)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [0.2, 1.0]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",marginLeft:"16px",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>M.getState().setFoundationActionScope(v.target.value),value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("foundationMenu.OnlyThisFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("foundationMenu.AllSelectedFoundations",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("foundationMenu.AllFoundations",d)})]})})})]})})},{Option:QT}=Uo,ofo=({setDialogVisible:t})=>{const e=M(pn),n=M(oa),o=M(m0),r=dt(n5),[i,a]=m.useState(!1),[l,s]=m.useState(!1),[c,u]=m.useState({left:0,top:0,bottom:0,right:0}),d=m.useRef(null),f=M(bA).geneticAlgorithmParams,p=m.useRef(f.selectionMethod),g=m.useRef(f.searchMethod),A=m.useRef(Math.min(f.objectiveFunctionType,Po.YEARLY_TOTAL_OUTPUT)),y=m.useRef(f.populationSize),S=m.useRef(f.maximumGenerations),C=m.useRef(f.mutationRate),P=m.useRef(f.selectionRate??.5),v=m.useRef(f.crossoverRate??.5),T=m.useRef(f.convergenceThreshold),w=m.useRef(f.localSearchRadius),x=m.useRef(null);m.useEffect(()=>{var N;(N=x.current)==null||N.focus()},[]);const b={lng:o},R=(N,U)=>{if(d.current){const{clientWidth:W,clientHeight:k}=window.document.documentElement,D=d.current.getBoundingClientRect();u({left:-D.left+U.x,right:W-(D.right-U.x),top:-D.top+U.y,bottom:k-((D==null?void 0:D.bottom)-U.y)})}},H=()=>{e(N=>{N.evolutionaryAlgorithmState.geneticAlgorithmParams.problem=Ri.SOLAR_PANEL_TILT_ANGLE,N.evolutionaryAlgorithmState.geneticAlgorithmParams.objectiveFunctionType=A.current,N.evolutionaryAlgorithmState.geneticAlgorithmParams.selectionMethod=p.current,N.evolutionaryAlgorithmState.geneticAlgorithmParams.searchMethod=g.current,N.evolutionaryAlgorithmState.geneticAlgorithmParams.populationSize=y.current,N.evolutionaryAlgorithmState.geneticAlgorithmParams.maximumGenerations=S.current,N.evolutionaryAlgorithmState.geneticAlgorithmParams.selectionRate=P.current,N.evolutionaryAlgorithmState.geneticAlgorithmParams.crossoverRate=v.current,N.evolutionaryAlgorithmState.geneticAlgorithmParams.mutationRate=C.current,N.evolutionaryAlgorithmState.geneticAlgorithmParams.convergenceThreshold=T.current,N.evolutionaryAlgorithmState.geneticAlgorithmParams.localSearchRadius=w.current})},F=()=>{r||gn(E("message.EvolutionStarted",b)),H(),setTimeout(()=>{dt.getState().set(N=>{N.runEvolution=!N.runEvolution}),e(N=>{N.evolutionMethod=_s.GENETIC_ALGORITHM,N.evolutionaryAlgorithmState.geneticAlgorithmParams.problem=Ri.SOLAR_PANEL_TILT_ANGLE,n&&(N.actionInfo={name:"Run Genetic Algorithm for Solar Panel Tilt Angle",timestamp:new Date().getTime()})})},100)},{t:E}=Xl();return h.jsx(h.Fragment,{children:h.jsxs(xi,{width:640,open:!0,title:h.jsxs("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>s(!0),onMouseOut:()=>s(!1),children:[E("optimizationMenu.SolarPanelTiltAngleOptimization",b)+": ",E("optimizationMenu.GeneticAlgorithmSettings",b)]}),footer:[h.jsx(io,{onClick:()=>{t(!1)},children:E("word.Cancel",b)},"Cancel"),h.jsx(io,{type:"primary",ref:x,onClick:()=>{F(),t(!1)},children:E("word.Run",b)},"Run")],onCancel:()=>{t(!1)},maskClosable:!1,destroyOnClose:!1,modalRender:N=>h.jsx(Bi,{disabled:!l,bounds:c,onStart:(U,W)=>R(U,W),children:h.jsx("div",{ref:d,children:N})}),children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.Objective",b)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:A.current,style:{width:"100%"},value:A.current,onChange:N=>{A.current=N,a(!i)},children:[h.jsx(QT,{value:Po.DAILY_TOTAL_OUTPUT,children:E("optimizationMenu.ObjectiveFunctionDailyTotalYield",b)},Po.DAILY_TOTAL_OUTPUT),h.jsx(QT,{value:Po.YEARLY_TOTAL_OUTPUT,children:E("optimizationMenu.ObjectiveFunctionYearlyTotalYield",b)},Po.YEARLY_TOTAL_OUTPUT)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.GeneticAlgorithmSelectionMethod",b)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:p.current,style:{width:"100%"},value:p.current,onChange:N=>{p.current=N,a(!i)},children:[h.jsx(QT,{value:Wm.ROULETTE_WHEEL,children:E("optimizationMenu.RouletteWheel",b)},Wm.ROULETTE_WHEEL),h.jsx(QT,{value:Wm.TOURNAMENT,children:E("optimizationMenu.Tournament",b)},Wm.TOURNAMENT)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.PopulationSize",b)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:10,max:100,style:{width:"100%"},precision:0,formatter:N=>Number(N).toFixed(0),value:y.current,step:1,onChange:N=>{N!==null&&(y.current=Number(N),a(!i))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.MaximumGenerations",b)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:5,max:100,step:1,style:{width:"100%"},precision:0,formatter:N=>Number(N).toFixed(0),value:S.current,onChange:N=>{N!==null&&(S.current=Number(N),a(!i))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.SelectionRate",b)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:P.current,step:.01,onChange:N=>{N!==null&&(P.current=Number(N),a(!i))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.CrossoverRate",b)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:v.current,step:.01,onChange:N=>{N!==null&&(v.current=Number(N),a(!i))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.MutationRate",b)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:C.current,step:.01,onChange:N=>{N!==null&&(C.current=Number(N),a(!i))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.ConvergenceThreshold",b)+" [0, 0.1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:.001,max:.1,style:{width:"100%"},precision:3,value:T.current,step:.001,onChange:N=>{N!==null&&(T.current=Number(N),a(!i))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.SearchMethod",b)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:g.current,style:{width:"100%"},value:g.current,onChange:N=>{g.current=Number(N),a(!i)},children:[h.jsx(QT,{value:ds.GLOBAL_SEARCH_UNIFORM_SELECTION,children:E("optimizationMenu.GlobalSearchUniformSelection",b)},ds.GLOBAL_SEARCH_UNIFORM_SELECTION),h.jsx(QT,{value:ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION,children:E("optimizationMenu.LocalSearchRandomOptimization",b)},ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION)]})})]}),g.current===ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION&&h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.LocalSearchRadius",b)+" ([0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:w.current,step:.01,onChange:N=>{N!==null&&(w.current=Number(N),a(!i))}})})]})]})})},{Option:OO}=Uo,rfo=({setDialogVisible:t})=>{const e=M(pn),n=M(oa),o=M(m0),r=dt(n5),i=M(bA).particleSwarmOptimizationParams,[a,l]=m.useState(!1),[s,c]=m.useState(!1),[u,d]=m.useState({left:0,top:0,bottom:0,right:0}),f=m.useRef(null),p=m.useRef(Math.min(i.objectiveFunctionType,Po.YEARLY_TOTAL_OUTPUT)),g=m.useRef(i.searchMethod),A=m.useRef(i.swarmSize),y=m.useRef(i.maximumSteps),S=m.useRef(i.vmax??.01),C=m.useRef(i.inertia??.8),P=m.useRef(i.cognitiveCoefficient??.1),v=m.useRef(i.socialCoefficient??.1),T=m.useRef(i.convergenceThreshold),w=m.useRef(i.localSearchRadius),x=m.useRef(null);m.useEffect(()=>{var N;(N=x.current)==null||N.focus()},[]);const b={lng:o},R=(N,U)=>{if(f.current){const{clientWidth:W,clientHeight:k}=window.document.documentElement,D=f.current.getBoundingClientRect();d({left:-D.left+U.x,right:W-(D.right-U.x),top:-D.top+U.y,bottom:k-((D==null?void 0:D.bottom)-U.y)})}},H=()=>{e(N=>{N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.problem=Ri.SOLAR_PANEL_TILT_ANGLE,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.objectiveFunctionType=p.current,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.searchMethod=g.current,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.swarmSize=A.current,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.maximumSteps=y.current,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.cognitiveCoefficient=P.current,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.socialCoefficient=v.current,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.vmax=S.current,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.inertia=C.current,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.convergenceThreshold=T.current,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.localSearchRadius=w.current})},F=()=>{r||gn(E("message.EvolutionStarted",b)),H(),setTimeout(()=>{dt.getState().set(N=>{N.runEvolution=!N.runEvolution}),e(N=>{N.evolutionMethod=_s.PARTICLE_SWARM_OPTIMIZATION,N.evolutionaryAlgorithmState.particleSwarmOptimizationParams.problem=Ri.SOLAR_PANEL_TILT_ANGLE,n&&(N.actionInfo={name:"Run Particle Swarm Optimization for Solar Panel Tilt Angle",timestamp:new Date().getTime()})})},100)},{t:E}=Xl();return h.jsx(h.Fragment,{children:h.jsxs(xi,{width:640,open:!0,title:h.jsxs("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>c(!0),onMouseOut:()=>c(!1),children:[E("optimizationMenu.SolarPanelTiltAngleOptimization",b)+": ",E("optimizationMenu.ParticleSwarmOptimizationSettings",b)]}),footer:[h.jsx(io,{onClick:()=>{t(!1)},children:E("word.Cancel",b)},"Cancel"),h.jsx(io,{type:"primary",ref:x,onClick:()=>{F(),t(!1)},children:E("word.Run",b)},"Run")],onCancel:()=>{t(!1)},maskClosable:!1,destroyOnClose:!1,modalRender:N=>h.jsx(Bi,{disabled:!s,bounds:u,onStart:(U,W)=>R(U,W),children:h.jsx("div",{ref:f,children:N})}),children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.Objective",b)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:p.current,style:{width:"100%"},value:p.current,onChange:N=>{p.current=N,l(!a)},children:[h.jsx(OO,{value:Po.DAILY_TOTAL_OUTPUT,children:E("optimizationMenu.ObjectiveFunctionDailyTotalYield",b)},Po.DAILY_TOTAL_OUTPUT),h.jsx(OO,{value:Po.YEARLY_TOTAL_OUTPUT,children:E("optimizationMenu.ObjectiveFunctionYearlyTotalYield",b)},Po.YEARLY_TOTAL_OUTPUT)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.SwarmSize",b)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:10,max:100,style:{width:"100%"},precision:0,value:A.current,step:1,formatter:N=>Number(N).toFixed(0),onChange:N=>{A.current=Number(N),l(!a)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.MaximumSteps",b)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:5,max:100,step:1,style:{width:"100%"},precision:0,value:y.current,formatter:N=>Number(N).toFixed(0),onChange:N=>{y.current=Number(N),l(!a)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.CognitiveCoefficient",b)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:P.current,step:.01,onChange:N=>{P.current=Number(N),l(!a)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.SocialCoefficient",b)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:v.current,step:.01,onChange:N=>{v.current=Number(N),l(!a)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.InertiaWeight",b)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:C.current,step:.01,onChange:N=>{C.current=Number(N),l(!a)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.MaximumVelocity",b)+" [0.001, 0.1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:.001,max:.1,style:{width:"100%"},precision:3,value:S.current,step:.001,onChange:N=>{S.current=Number(N),l(!a)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.ConvergenceThreshold",b)+" [0, 0.1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:.001,max:.1,style:{width:"100%"},precision:3,value:T.current,step:.001,onChange:N=>{T.current=Number(N),l(!a)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.SearchMethod",b)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:g.current,style:{width:"100%"},value:g.current,onChange:N=>{g.current=Number(N),l(!a)},children:[h.jsx(OO,{value:ds.GLOBAL_SEARCH_UNIFORM_SELECTION,children:E("optimizationMenu.GlobalSearchUniformSelection",b)},ds.GLOBAL_SEARCH_UNIFORM_SELECTION),h.jsx(OO,{value:ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION,children:E("optimizationMenu.LocalSearchRandomOptimization",b)},ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION)]})})]}),g.current===ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION&&h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:E("optimizationMenu.LocalSearchRadius",b)+" ([0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:w.current,step:.01,onChange:N=>{w.current=Number(N),l(!a)}})})]})]})})},hy=({children:t,width:e="90px"})=>h.jsx("div",{style:{width:e},children:t}),ifo=({element:t})=>{const e=aot(t),n=$t();return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:!!(t!=null&&t.showLabel),onChange:e,children:Y.t("labelSubMenu.KeepShowingLabel",n)})})},afo=({element:t})=>{const{labelText:e,setLabelText:n}=iot(t),o=lot(t,e),r=$t();return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(jl,{addonBefore:h.jsx(hy,{children:Y.t("labelSubMenu.LabelText",r)+":"}),value:e,onChange:i=>n(i.target.value),onPressEnter:o,onBlur:o})})},lfo=({element:t})=>{const e=EXn(t),n=$t();return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Sn,{addonBefore:h.jsx(hy,{children:Y.t("labelSubMenu.LabelHeight",n)+":"}),min:t.lz/2+.2,max:100,step:1,precision:1,value:t.labelHeight??t.lz/2+.2,onChange:o=>e(o)})})},sfo=({element:t})=>{const e=IXn(t),n=$t();return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Sn,{addonBefore:h.jsx(hy,{children:Y.t("labelSubMenu.LabelFontSize",n)+":"}),min:10,max:100,step:1,precision:0,value:t.labelFontSize??20,onChange:o=>e(o)})})},cfo=({element:t})=>{const e=zXn(t),n=$t();return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Sn,{addonBefore:h.jsx(hy,{children:Y.t("labelSubMenu.LabelSize",n)+":"}),min:.2,max:5,step:.1,precision:1,value:t.labelSize??.2,onChange:o=>e(o)})})},ufo=({element:t})=>{const e=DXn(t),n=$t();return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(jl,{addonBefore:h.jsx(hy,{children:Y.t("labelSubMenu.LabelColor",n)+":"}),value:t.labelColor??"#ffffff",onChange:o=>e(o.target.value)})})},v3=t=>[{key:`${t.type}-show-label`,label:h.jsx(ifo,{element:t})},{key:`${t.type}-label-text`,label:h.jsx(afo,{element:t})},{key:`${t.type}-label-height`,label:h.jsx(lfo,{element:t})},{key:`${t.type}-label-font-size`,label:h.jsx(sfo,{element:t})},{key:`${t.type}-label-size`,label:h.jsx(cfo,{element:t})},{key:`${t.type}-label-color`,label:h.jsx(ufo,{element:t})}],dfo=[{key:"windowCount",objectType:z.Window},{key:"doorCount",objectType:z.Door},{key:"sensorCount",objectType:z.Sensor},{key:"outsideLightCount",objectType:z.Light},{key:"parabolicTroughCount",objectType:z.ParabolicTrough},{key:"parabolicDishCount",objectType:z.ParabolicDish},{key:"fresnelReflectorCount",objectType:z.FresnelReflector},{key:"heliostatCount",objectType:z.Heliostat},{key:"windTurbineCount",objectType:z.WindTurbine},{key:"polygonCount",objectType:z.Polygon},{key:"humanCount",objectType:z.Human},{key:"treeCount",objectType:z.Tree},{key:"flowerCount",objectType:z.Flower}],IHe=(t,e)=>{const n={lng:M.getState().language};let o="",r="";switch(t){case z.Wall:{o=`${Y.t("foundationMenu.RemoveAllUnlockedWalls",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllWallsOnFoundation",n)} (${e} ${Y.t("foundationMenu.Walls",n)})`;break}case z.Window:{o=`${Y.t("foundationMenu.RemoveAllUnlockedWindows",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllWindowsOnFoundation",n)} (${e} ${Y.t("foundationMenu.Windows",n)})`;break}case z.Door:{o=`${Y.t("foundationMenu.RemoveAllUnlockedDoors",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllDoorsOnFoundation",n)} (${e} ${Y.t("foundationMenu.Doors",n)})`;break}case z.Sensor:{o=`${Y.t("foundationMenu.RemoveAllUnlockedSensors",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllSensorsOnFoundation",n)} (${e} ${Y.t("foundationMenu.Sensors",n)})`;break}case z.Light:{o=`${Y.t("foundationMenu.RemoveAllUnlockedLights",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllLightsOnFoundation",n)} (${e} ${Y.t("foundationMenu.Lights",n)})`;break}case z.ParabolicTrough:{o=`${Y.t("foundationMenu.RemoveAllUnlockedParabolicTroughs",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllParabolicTroughsOnFoundation",n)} (${e} ${Y.t("foundationMenu.ParabolicTroughs",n)})`;break}case z.ParabolicDish:{o=`${Y.t("foundationMenu.RemoveAllUnlockedParabolicDishes",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllParabolicDishesOnFoundation",n)} (${e} ${Y.t("foundationMenu.ParabolicDishes",n)})`;break}case z.FresnelReflector:{o=`${Y.t("foundationMenu.RemoveAllUnlockedFresnelReflectors",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllFresnelReflectorsOnFoundation",n)} (${e} ${Y.t("foundationMenu.FresnelReflectors",n)})`;break}case z.Heliostat:{o=`${Y.t("foundationMenu.RemoveAllUnlockedHeliostats",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllHeliostatsOnFoundation",n)} (${e} ${Y.t("foundationMenu.Heliostats",n)})`;break}case z.WindTurbine:{o=`${Y.t("foundationMenu.RemoveAllUnlockedWindTurbines",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllWindTurbinesOnFoundation",n)} (${e} ${Y.t("foundationMenu.WindTurbines",n)})`;break}case z.Polygon:{o=`${Y.t("foundationMenu.RemoveAllUnlockedPolygons",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllPolygonsOnFoundation",n)} (${e} ${Y.t("foundationMenu.Polygons",n)})`;break}case z.Human:{o=`${Y.t("foundationMenu.RemoveAllUnlockedHumans",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllHumansOnFoundation",n)} (${e} ${Y.t("foundationMenu.Humans",n)})`;break}case z.Tree:{o=`${Y.t("foundationMenu.RemoveAllUnlockedTrees",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllTreesOnFoundation",n)} (${e} ${Y.t("foundationMenu.Trees",n)})`;break}case z.Flower:{o=`${Y.t("foundationMenu.RemoveAllUnlockedFlowers",n)} (${e})`,r=`${Y.t("foundationMenu.DoYouReallyWantToRemoveAllFlowersOnFoundation",n)} (${e} ${Y.t("foundationMenu.Flowers",n)})`;break}}return{itemLabel:o,modalTitle:r}},ffo=(t,e,n)=>n===z.Light?t.insideLightCount+t.outsideLightCount:t[e],hfo=t=>{const e=M.getState().set,n=new Set;M.getState().elements.forEach(a=>{!a.locked&&a.type===z.Wall&&(a.parentId===t.id||a.foundationId===t.id)&&n.add(a.id)});const o=M.getState().elements.filter(a=>n.has(a.id)||n.has(a.parentId));e(a=>{a.elements=a.elements.filter(l=>!n.has(l.id)&&!n.has(l.parentId))});const r=JSON.parse(JSON.stringify(o)),i={name:"Remove All Walls on Foundation",timestamp:Date.now(),parentId:t.id,removedElements:r,undo:()=>{e(a=>{a.elements.push(...i.removedElements),a.updateWallMapOnFoundationFlag=!a.updateWallMapOnFoundationFlag})},redo:()=>{const a=new Set;M.getState().elements.forEach(l=>{!l.locked&&l.type===z.Wall&&l.parentId===i.parentId&&a.add(l.id)}),e(l=>{l.elements=l.elements.filter(s=>!a.has(s.id)&&!a.has(s.parentId))})}};M.getState().addUndoable(i)},pfo=(t,e,n)=>{const o=[],r={lng:M.getState().language};if(e.unlockedCount>0&&o.push({key:"lock-all-offsprings",label:h.jsx(qCe,{foundation:t,lock:!0,count:e.unlockedCount})}),e.lockedCount>0&&o.push({key:"unlock-all-offsprings",label:h.jsx(qCe,{foundation:t,lock:!1,count:e.lockedCount})}),n.wallCount>0){const{itemLabel:i,modalTitle:a}=IHe(z.Wall,n.wallCount);o.push({key:"remove-all-walls-on-foundation",label:h.jsx(Dae,{foundation:t,objectType:z.Wall,modalTitle:a,onClickOk:()=>hfo(t),children:i})})}if(n.solarPanelCount>0){const i=Y.t("foundationMenu.DoYouReallyWantToRemoveAllSolarPanelsOnFoundation",r)+" ("+n.solarPanelModuleCount+" "+Y.t("foundationMenu.SolarPanels",r)+", "+n.solarPanelCount+" "+Y.t("foundationMenu.Racks",r)+")?";o.push({key:"remove-all-solar-panels-on-foundation",label:h.jsxs(Dae,{foundation:t,objectType:z.SolarPanel,modalTitle:i,children:[Y.t("foundationMenu.RemoveAllUnlockedSolarPanels",r),"  (",n.solarPanelModuleCount," ",Y.t("foundationMenu.SolarPanels",r),", ",n.solarPanelCount," ",Y.t("foundationMenu.Racks",r),")"]})})}return dfo.forEach(({key:i,objectType:a})=>{const l=ffo(n,i,a);if(typeof l=="number"&&l>0){const{itemLabel:s,modalTitle:c}=IHe(a,l),u=a.replaceAll(" ","");o.push({key:`remove-all-${u}s-on-foundation`,label:h.jsx(Dae,{foundation:t,objectType:a,modalTitle:c,children:s})})}}),o},gfo=()=>{const t=M.getState().elementsToPaste;if(t&&t.length>0){const e=t[0];if(e.type===z.Human||e.type===z.Tree||e.type===z.Flower||e.type===z.Polygon||e.type===z.Sensor||e.type===z.Light||e.type===z.SolarPanel||e.type===z.SolarWaterHeater||e.type===z.ParabolicDish||e.type===z.Heliostat||e.type===z.FresnelReflector||e.type===z.ParabolicTrough||e.type===z.WindTurbine||e.type===z.Wall)return!0}return!1},mfo=t=>{const e=[];if(t.type!==z.Foundation)return{items:e};const n=t,o={lng:M.getState().language},r=!n.locked,i=!n.notBuilding&&ye.getBuildingCompletionStatus(n,M.getState().elements)===Uc.COMPLETE,a=M.getState().countAllOffspringsByTypeAtOnce(n.id,!0),l=M.getState().countAllOffspringsByTypeAtOnce(n.id,!1);return gfo()&&e.push({key:"foundation-paste",label:h.jsx(nM,{})}),e.push({key:"foundation-copy",label:h.jsx(Fd,{})}),r&&e.push({key:"foundation-cut",label:h.jsx(kd,{})}),e.push({key:"foundation-lock",label:h.jsx(Ku,{selectedElement:n})}),r&&e.push({key:"foundation-group-master",label:h.jsx(LQe,{groupableElement:n})}),e.push({key:"building",label:h.jsx(TXn,{foundation:n})}),a.gotSome()&&e.push({key:"lock-unlock-clear-on-foundation",label:h.jsx(an,{children:Y.t("word.Elements",o)}),children:pfo(n,a,l)}),r&&((!n.textureType||n.textureType===_i.NoTexture)&&e.push({key:"foundation-color",label:h.jsxs(eo,{Dialog:Ddo,children:[Y.t("word.Color",o)," ..."]})}),e.push({key:"foundation-texture",label:h.jsxs(eo,{Dialog:FXn,children:[Y.t("word.Texture",o)," ..."]})}),e.push({key:"foundation-length",label:h.jsxs(eo,{Dialog:Edo,children:[Y.t("word.Length",o)," ..."]})}),e.push({key:"foundation-width",label:h.jsxs(eo,{Dialog:Fdo,children:[Y.t("word.Width",o)," ..."]})}),e.push({key:"foundation-height",label:h.jsxs(eo,{Dialog:kdo,children:[Y.t("word.Height",o)," ..."]})}),e.push({key:"foundation-azimuth",label:h.jsxs(eo,{Dialog:Ldo,children:[Y.t("word.Azimuth",o)," ..."]})}),i&&e.push({key:"ground-floor-r-value",label:h.jsxs(eo,{Dialog:Wdo,children:[Y.t("foundationMenu.GroundFloorRValue",o)," ..."]})})),e.push({key:"add-polygon-on-foundation",label:h.jsx(PXn,{foundation:n})}),!n.notBuilding&&a.wallCount>0&&e.push({key:"building-hvac-system",label:h.jsx(an,{children:Y.t("word.BuildingHVACSystem",o)}),children:[{key:"hvac-system-id",label:h.jsx(CXn,{foundation:n})},{key:"thermostat-temperature",label:h.jsx(RXn,{foundation:n})},{key:"tolerance-threshold",label:h.jsx(HXn,{foundation:n})}]}),r&&(e.push({key:"select-solar-structure",label:h.jsx(an,{children:Y.t("foundationMenu.SolarStructure",o)}),children:[{key:"select-solar-structure-submenu",label:h.jsx(MXn,{foundation:n}),style:{backgroundColor:"white"}}]}),n.solarStructure===Dn.FocusPipe&&e.push({key:"solar-absorber-pipe-physical-properties",label:h.jsx(an,{children:Y.t("solarAbsorberPipeMenu.AbsorberPipePhysicalProperties",o)}),children:[{key:"solar-absorber-pipe-height",label:h.jsxs(eo,{noPadding:!0,Dialog:Ndo,children:[Y.t("solarAbsorberPipeMenu.AbsorberHeight",o)," ..."]})},{key:"solar-absorber-pipe-aperture-width",label:h.jsxs(eo,{noPadding:!0,Dialog:Udo,children:[Y.t("solarAbsorberPipeMenu.AbsorberApertureWidth",o)," ..."]})},{key:"foundation-solar-receiver-pipe-pole-number",label:h.jsxs(eo,{noPadding:!0,Dialog:jdo,children:[Y.t("solarAbsorberPipeMenu.AbsorberPipePoleNumber",o)," ..."]})},{key:"solar-absorber-pipe-absorptance",label:h.jsxs(eo,{noPadding:!0,Dialog:Bdo,children:[Y.t("solarAbsorberPipeMenu.AbsorberAbsorptance",o)," ..."]})},{key:"solar-absorber-optical-efficiency",label:h.jsxs(eo,{noPadding:!0,Dialog:Ydo,children:[Y.t("solarAbsorberPipeMenu.AbsorberOpticalEfficiency",o)," ..."]})},{key:"solar-absorber-thermal-efficiency",label:h.jsxs(eo,{noPadding:!0,Dialog:Odo,children:[Y.t("solarAbsorberPipeMenu.AbsorberThermalEfficiency",o)," ..."]})}]}),n.solarStructure===Dn.FocusTower&&e.push({key:"solar-power-tower-physical-properties",label:h.jsx(an,{children:Y.t("solarPowerTowerMenu.ReceiverTowerPhysicalProperties",o)}),children:[{key:"solar-power-tower-height",label:h.jsxs(eo,{noPadding:!0,Dialog:Vdo,children:[Y.t("solarPowerTowerMenu.ReceiverTowerHeight",o)," ..."]})},{key:"solar-power-tower-radius",label:h.jsxs(eo,{noPadding:!0,Dialog:_do,children:[Y.t("solarPowerTowerMenu.ReceiverTowerRadius",o)," ..."]})},{key:"solar-power-tower-receiver-absorptance",label:h.jsxs(eo,{noPadding:!0,Dialog:Gdo,children:[Y.t("solarPowerTowerMenu.ReceiverAbsorptance",o)," ..."]})},{key:"solar-power-tower-receiver-optical-efficiency",label:h.jsxs(eo,{noPadding:!0,Dialog:Jdo,children:[Y.t("solarPowerTowerMenu.ReceiverOpticalEfficiency",o)," ..."]})},{key:"solar-power-tower-receiver-thermal-efficiency",label:h.jsxs(eo,{noPadding:!0,Dialog:Xdo,children:[Y.t("solarPowerTowerMenu.ReceiverThermalEfficiency",o)," ..."]})}]}),n.solarStructure===Dn.UpdraftTower&&e.push({key:"solar-updraft-tower-physical-properties",label:h.jsx(an,{children:Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerPhysicalProperties",o)}),children:[{key:"solar-updraft-tower-chimney-height",label:h.jsxs(eo,{noPadding:!0,Dialog:Kdo,children:[Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerChimneyHeight",o)," ..."]})},{key:"solar-updraft-tower-chimney-radius",label:h.jsxs(eo,{noPadding:!0,Dialog:qdo,children:[Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerChimneyRadius",o)," ..."]})},{key:"solar-updraft-tower-collector-height",label:h.jsxs(eo,{noPadding:!0,Dialog:$do,children:[Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerCollectorHeight",o)," ..."]})},{key:"solar-updraft-tower-collector-radius",label:h.jsxs(eo,{noPadding:!0,Dialog:Qdo,children:[Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerCollectorRadius",o)," ..."]})},{key:"solar-updraft-tower-collector-transmissivity",label:h.jsxs(eo,{noPadding:!0,Dialog:Zdo,children:[Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerCollectorTransmissivity",o)," ..."]})},{key:"solar-updraft-tower-collector-emissivity",label:h.jsxs(eo,{noPadding:!0,Dialog:efo,children:[Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerCollectorEmissivity",o)," ..."]})},{key:"solar-updraft-tower-discharge-coefficient",label:h.jsxs(eo,{noPadding:!0,Dialog:tfo,children:[Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerDischargeCoefficient",o)," ..."]})},{key:"solar-updraft-tower-turbine-efficiency",label:h.jsxs(eo,{noPadding:!0,Dialog:nfo,children:[Y.t("solarUpdraftTowerMenu.SolarUpdraftTowerTurbineEfficiency",o)," ..."]})}]})),e.push({key:"optimization",label:h.jsx(an,{children:Y.t("optimizationMenu.Optimization",o)}),children:[{key:"genetic-algorithms",label:h.jsx(an,{noPadding:!0,children:Y.t("optimizationMenu.GeneticAlgorithm",o)}),disabled:l.solarPanelCount===0,children:[{key:"solar-panel-tilt-angle-ga-optimizer",label:h.jsxs(eo,{noPadding:!0,Dialog:ofo,children:[Y.t("optimizationMenu.SolarPanelTiltAngleOptimization",o),"..."]})}]},{key:"particle-swarm-optimization",label:h.jsx(an,{noPadding:!0,children:Y.t("optimizationMenu.ParticleSwarmOptimization",o)}),disabled:l.solarPanelCount===0,children:[{key:"solar-panel-tilt-angle-pso-optimizer",label:h.jsxs(eo,{noPadding:!0,Dialog:rfo,children:[Y.t("optimizationMenu.SolarPanelTiltAngleOptimization",o),"..."]})}]}]}),r&&e.push({key:"foundation-label",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",o)}),children:v3(n)}),{items:e}},yfo=be.memo(({cuboid:t})=>{const e=$t(),n=()=>{M.getState().set(o=>{for(const r of o.elements)if(r.id===t.id&&r.type===z.Cuboid){const i=r,a=!i.stackable;i.stackable=a,o.actionState.cuboidStackable=a;break}})};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.stackable,onChange:n,children:Y.t("cuboidMenu.Stackable",e)})})}),Afo=be.memo(({cuboid:t,selectedSideIndex:e})=>{const n=$t(),o=M.getState().set,r=()=>{o(c=>{c.objectTypeToAdd=z.Polygon});const{pos:i}=ye.getWorldDataById(t.id);let a;switch(e){case 0:a=Op;break;case 1:a=Vp;break;case 2:a=Yc;break;case 3:a=_p;break;default:a=ko,i.z=t.lz}const l=M.getState().addElement(t,i,a),s={name:"Add",timestamp:Date.now(),addedElement:l,undo:()=>{M.getState().removeElementById(s.addedElement.id,!1)},redo:()=>{o(c=>{c.elements.push(s.addedElement),c.selectedElement=s.addedElement})}};M.getState().addUndoable(s),o(c=>{c.objectTypeToAdd=z.None})};return h.jsx(an,{onClick:r,children:Y.t("cuboidMenu.AddPolygon",n)})}),zHe=be.memo(({cuboid:t,objectType:e,modalTitle:n,onClickOk:o,children:r})=>{const i=M.getState().removeAllChildElementsByType,a=()=>{const s=M.getState().elements.filter(d=>!d.locked&&d.type===e&&d.parentId===t.id);i(t.id,e);const c=JSON.parse(JSON.stringify(s)),u={name:`Remove All ${e}s on Cuboid`,timestamp:Date.now(),parentId:t.id,removedElements:c,undo:()=>{M.getState().set(d=>{d.elements.push(...u.removedElements)})},redo:()=>{i(u.parentId,e)}};M.getState().addUndoable(u)},l=()=>{const s=o??a;xi.confirm({title:n,icon:h.jsx(ny,{}),onOk:s})};return h.jsx(an,{noPadding:!0,onClick:l,children:r})}),wfo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(Eb),i=M(Fb),a=M(sYe),l=M(no),s=M(Qn),c=uo(z.Cuboid),[u,d]=m.useState((c==null?void 0:c.color)??"#808080"),[f,p]=m.useState(!1),g=$t();m.useEffect(()=>{P()},[c,a]);const A=(R,H,F)=>{e(E=>{for(const N of E.elements)if(N.type===z.Cuboid&&N.id===H&&!N.locked){const U=N;U.faceColors||(U.faceColors=new Array(6),U.faceColors.fill(U.color??F)),U.faceColors[R]=F;break}})},y=(R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.Cuboid&&E.id===R&&!E.locked){E.color=H;const N=E;N.faceColors||(N.faceColors=new Array(6));for(let U=0;U<4;U++)N.faceColors[U]=H;break}})},S=R=>{e(H=>{for(const F of H.elements)if(F.type===z.Cuboid&&!F.locked){F.color=R;const E=F;E.faceColors||(E.faceColors=new Array(6));for(let N=0;N<4;N++)E.faceColors[N]=R}})},C=R=>{i(R.target.value),p(!f)},P=()=>{c&&(a>=0&&c.faceColors?d(c.faceColors[a]):d(c.color??"#808080"))},v=R=>{if(c){switch(r){case re.AllSelectedObjectsOfThisType:for(const H of n)if(H.type===z.Cuboid&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)){const F=H;if(F.faceColors){for(let E=0;E<4;E++)if(R!==F.faceColors[E])return!0}else if(R!==F.color)return!0}break;case re.AllObjectsOfThisType:for(const H of n)if(H.type===z.Cuboid&&!H.locked){const F=H;if(F.faceColors){for(let E=0;E<4;E++)if(R!==F.faceColors[E])return!0}else if(R!==F.color)return!0}break;case re.OnlyThisObject:if(c.faceColors){for(let H=0;H<4;H++)if(R!==c.faceColors[H])return!0}else if(R!==(c==null?void 0:c.color))return!0;break;default:if(a>=0){const H=c!=null&&c.faceColors?c==null?void 0:c.faceColors[a]:c==null?void 0:c.color;if(R!==H)return!0}else if(R!==(c==null?void 0:c.color))return!0}return!1}},T=R=>{if(c&&v(R)){switch(r){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of n)if(E.type===z.Cuboid&&M.getState().selectedElementIdSet.has(E.id)){const N=E;if(N.faceColors)H.set(E.id,[...N.faceColors]);else{const U=N.color??"#808080";H.set(E.id,[U,U,U,U,U,U])}}const F={name:"Set Color for Selected Cuboids",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())if(N&&Array.isArray(N))for(let U=0;U{for(const[E,N]of F.oldValues.entries())if(N&&Array.isArray(N))for(let U=0;U{E.actionState.cuboidFaceColors||(E.actionState.cuboidFaceColors=["#808080","#808080","#808080","#808080","#808080","#808080"]);for(let N=0;N<4;N++)E.actionState.cuboidFaceColors[N]=R});break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of n)if(E.type===z.Cuboid){const N=E;if(N.faceColors)H.set(E.id,[...N.faceColors]);else{const U=N.color??"#808080";H.set(E.id,[U,U,U,U,U,U])}}const F={name:"Set Color for All Cuboids",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())if(N&&Array.isArray(N))for(let U=0;U{S(F.newValue)}};o(F),S(R),s(l+1),e(E=>{E.actionState.cuboidFaceColors||(E.actionState.cuboidFaceColors=["#808080","#808080","#808080","#808080","#808080","#808080"]);for(let N=0;N<4;N++)E.actionState.cuboidFaceColors[N]=R});break}case re.OnlyThisObject:{let H;if(c.faceColors)H=[...c.faceColors];else{const E=c.color??"#808080";H=[E,E,E,E,E,E]}const F={name:"Set Color for All Sides of Selected Cuboid",timestamp:Date.now(),oldValue:H,newValue:R,changedElementId:c.id,changedElementType:c.type,undo:()=>{if(F.oldValue&&Array.isArray(F.oldValue))for(let E=0;E{y(F.changedElementId,F.newValue)}};o(F),y(c.id,R),s(l+1),e(E=>{E.actionState.cuboidFaceColors||(E.actionState.cuboidFaceColors=["#808080","#808080","#808080","#808080","#808080","#808080"]);for(let N=0;N<4;N++)E.actionState.cuboidFaceColors[N]=R});break}default:{if(a>=0){const H=c.faceColors?c.faceColors[a]:c.color,F={name:"Set Color for Selected Side of Cuboid",timestamp:Date.now(),oldValue:H,newValue:R,changedElementId:c.id,changedElementType:c.type,changedSideIndex:a,undo:()=>{F.changedSideIndex!==void 0&&A(F.changedSideIndex,F.changedElementId,F.oldValue)},redo:()=>{F.changedSideIndex!==void 0&&A(F.changedSideIndex,F.changedElementId,F.newValue)}};o(F),A(a,c.id,R),s(l+1),e(E=>{E.actionState.cuboidFaceColors||(E.actionState.cuboidFaceColors=["#808080","#808080","#808080","#808080","#808080","#808080"]),E.actionState.cuboidFaceColors[a]=R})}break}}p(!f)}},w=()=>{P(),t(!1)},x=()=>{T(u),t(!1),s(0)},b=a>=0&&(c!=null&&c.faceColors)?c.faceColors[a]:(c==null?void 0:c.color)??"#808080";return h.jsx(so,{width:600,title:Y.t("word.Color",g),onApply:x,onClose:w,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:h.jsx(Ld,{color:u??b,onChangeComplete:R=>{d(R.hex),p(!f)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:12,children:h.jsx(Le.Group,{onChange:C,value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("cuboidMenu.OnlyThisSide",g)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("cuboidMenu.AllSidesOfThisCuboid",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("cuboidMenu.AllSidesOfSelectedCuboids",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("cuboidMenu.AllSidesOfAllCuboids",g)})]})})})]})})},vfo="/aladdin/assets/building_facade_01_menu-BAm4EVGn.png",xfo="/aladdin/assets/building_facade_02_menu-BylQ9E0j.png",bfo="/aladdin/assets/building_facade_03_menu-DfU_cdlP.png",Sfo="/aladdin/assets/building_facade_04_menu-Bz2bcbq0.png",Tfo="/aladdin/assets/building_facade_05_menu-hF6OsAF0.png",Pfo="/aladdin/assets/building_facade_06_menu-CUmtyI19.png",Cfo="/aladdin/assets/building_facade_07_menu-B8_DYqYz.png",Rfo="/aladdin/assets/building_facade_08_menu-CTA_rxim.png",Hfo="/aladdin/assets/building_facade_09_menu-BpQDoLbY.png",Mfo="/aladdin/assets/building_facade_10_menu-z_jZrQMT.png",Ifo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(Eb),i=M(Fb),a=M(sYe),l=M(no),s=M(Qn),c=uo(z.Cuboid),[u,d]=m.useState(c&&c.textureTypes&&a>=0?c.textureTypes[a]:Ro.NoTexture),f=$t(),{Option:p}=Uo;m.useEffect(()=>{c&&d(c.textureTypes&&a>=0?c.textureTypes[a]:Ro.NoTexture)},[c,a]);const g=(x,b,R)=>{e(H=>{for(const F of H.elements)if(F.type===z.Cuboid&&F.id===b&&!F.locked){const E=F;E.textureTypes||(E.textureTypes=new Array(6),E.textureTypes.fill(Ro.NoTexture)),E.textureTypes[x]=R;break}})},A=(x,b)=>{e(R=>{for(const H of R.elements)if(H.type===z.Cuboid&&H.id===x&&!H.locked){const F=H;F.textureTypes||(F.textureTypes=new Array(6),F.textureTypes.fill(Ro.NoTexture));for(let E=0;E<4;E++)F.textureTypes[E]=b;break}})},y=(x,b)=>{e(R=>{for(const H of R.elements)if(H.type===z.Cuboid&&!H.locked&&x.has(H.id)){const F=H;if(F.textureTypes||(F.textureTypes=new Array(6),F.textureTypes.fill(Ro.NoTexture)),b!==void 0)for(let E=0;E<4;E++)F.textureTypes[E]=b;else{const E=x.get(H.id);if(E&&E.length>=4)for(let N=0;N<4;N++)F.textureTypes[N]=E[N]}}})},S=x=>{e(b=>{for(const R of b.elements)if(R.type===z.Cuboid&&!R.locked){const H=R;H.textureTypes||(H.textureTypes=new Array(6),H.textureTypes.fill(Ro.NoTexture));for(let F=0;F<4;F++)H.textureTypes[F]=x}})},C=x=>{i(x.target.value)},P=x=>{if(c){switch(r){case re.AllSelectedObjectsOfThisType:for(const b of n)if(b.type===z.Cuboid&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)){const R=b;if(R.textureTypes){for(let H=0;H<4;H++)if(x!==R.textureTypes[H])return!0}}break;case re.AllObjectsOfThisType:for(const b of n)if(b.type===z.Cuboid&&!b.locked){const R=b;if(R.textureTypes){for(let H=0;H<4;H++)if(x!==R.textureTypes[H])return!0}}break;case re.OnlyThisObject:if(c.textureTypes){for(let b=0;b<4;b++)if(x!==c.textureTypes[b])return!0}break;default:if(a>=0&&c.textureTypes&&x!==c.textureTypes[a])return!0}return!1}},v=x=>{if(c&&P(x))switch(r){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of n)if(H.type===z.Cuboid&&M.getState().selectedElementIdSet.has(H.id)){const F=H;b.set(H.id,F.textureTypes?[...F.textureTypes]:void 0)}const R={name:"Set Texture for Selected Cuboids",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())if(F&&Array.isArray(F))for(let E=0;E{y(R.oldValues,R.newValue)}};o(R),y(b,x),s(l+1),e(H=>{H.actionState.cuboidFaceTextures||(H.actionState.cuboidFaceTextures=[Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture]);for(let F=0;F<4;F++)H.actionState.cuboidFaceTextures[F]=x});break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of n)if(H.type===z.Cuboid){const F=H;b.set(H.id,F.textureTypes?[...F.textureTypes]:void 0)}const R={name:"Set Texture for All Cuboids",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())if(F&&Array.isArray(F))for(let E=0;E{S(R.newValue)}};o(R),S(x),s(l+1),e(H=>{H.actionState.cuboidFaceTextures||(H.actionState.cuboidFaceTextures=[Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture]);for(let F=0;F<4;F++)H.actionState.cuboidFaceTextures[F]=x});break}case re.OnlyThisObject:{const b=c.textureTypes?[...c.textureTypes]:void 0,R={name:"Set Texture for All Sides of Selected Cuboid",timestamp:Date.now(),oldValue:b,newValue:x,changedElementId:c.id,changedElementType:c.type,undo:()=>{if(R.oldValue&&Array.isArray(R.oldValue))for(let H=0;H{A(R.changedElementId,R.newValue)}};o(R),A(c.id,x),s(l+1),e(H=>{H.actionState.cuboidFaceTextures||(H.actionState.cuboidFaceTextures=[Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture]);for(let F=0;F<4;F++)H.actionState.cuboidFaceTextures[F]=x});break}default:{if(a>=0){const b=c.textureTypes?c.textureTypes[a]:Ro.NoTexture,R={name:"Set Texture for Selected Side of Cuboid",timestamp:Date.now(),oldValue:b,newValue:x,changedElementId:c.id,changedElementType:c.type,changedSideIndex:a,undo:()=>{R.changedSideIndex!==void 0&&g(R.changedSideIndex,R.changedElementId,R.oldValue)},redo:()=>{R.changedSideIndex!==void 0&&g(R.changedSideIndex,R.changedElementId,R.newValue)}};o(R),g(a,c.id,x),s(l+1),e(H=>{H.actionState.cuboidFaceTextures||(H.actionState.cuboidFaceTextures=[Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture,Ro.NoTexture]),H.actionState.cuboidFaceTextures[a]=x})}break}}},T=()=>{c!=null&&c.textureTypes&&a>=0&&d(c.textureTypes[a]),t(!1)},w=()=>{v(u)};return h.jsx(so,{width:600,title:Y.t("word.Texture",f),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:h.jsxs(Uo,{style:{width:"150px"},value:u,onChange:d,children:[h.jsxs(p,{value:Ro.NoTexture,children:[h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"12px",width:"32px",height:"20px",border:"1px dashed dimGray"},children:" "}),Y.t("shared.NoTexture",f)]},Ro.NoTexture),h.jsxs(p,{value:Ro.Facade01,children:[h.jsx("img",{alt:Ro.Facade01,src:vfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture01",f)]},Ro.Facade01),h.jsxs(p,{value:Ro.Facade02,children:[h.jsx("img",{alt:Ro.Facade02,src:xfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture02",f)]},Ro.Facade02),h.jsxs(p,{value:Ro.Facade03,children:[h.jsx("img",{alt:Ro.Facade03,src:bfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture03",f)]},Ro.Facade03),h.jsxs(p,{value:Ro.Facade04,children:[h.jsx("img",{alt:Ro.Facade04,src:Sfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture04",f)]},Ro.Facade04),h.jsxs(p,{value:Ro.Facade05,children:[h.jsx("img",{alt:Ro.Facade05,src:Tfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture05",f)]},Ro.Facade05),h.jsxs(p,{value:Ro.Facade06,children:[h.jsx("img",{alt:Ro.Facade06,src:Pfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture06",f)]},Ro.Facade06),h.jsxs(p,{value:Ro.Facade07,children:[h.jsx("img",{alt:Ro.Facade07,src:Cfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture07",f)]},Ro.Facade07),h.jsxs(p,{value:Ro.Facade08,children:[h.jsx("img",{alt:Ro.Facade08,src:Rfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture08",f)]},Ro.Facade08),h.jsxs(p,{value:Ro.Facade09,children:[h.jsx("img",{alt:Ro.Facade09,src:Hfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture09",f)]},Ro.Facade09),h.jsxs(p,{value:Ro.Facade10,children:[h.jsx("img",{alt:Ro.Facade10,src:Mfo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("cuboidMenu.Texture10",f)]},Ro.Facade10)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:12,children:h.jsx(Le.Group,{onChange:C,value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("cuboidMenu.OnlyThisSide",f)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("cuboidMenu.AllSidesOfThisCuboid",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("cuboidMenu.AllSidesOfSelectedCuboids",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("cuboidMenu.AllSidesOfAllCuboids",f)})]})})})]})})},zfo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(kH),r=M(cYe),i=M(d3),a=M(kw),l=M(u3),s=M(En),c=M(Eb),u=M(Fb),d=M(pn),f=M(no),p=M(Qn),g=M(Xi),A=uo(z.Cuboid),[y,S]=m.useState((A==null?void 0:A.lx)??0),C=m.useRef(new Map),P=m.useRef(new Map),v=m.useRef(new Map),T=m.useRef(new Map),w=m.useRef(new Map),x=m.useRef(new Map),b=m.useRef(new Map),R=m.useRef(new Map),H=m.useRef(!1),F=m.useRef(),E=$t(),N=Z=>{u(Z.target.value)},U=Z=>{if(A){switch(c){case re.AllSelectedObjectsOfThisType:{for(const ee of e)if(ee.type===z.Cuboid&&M.getState().selectedElementIdSet.has(ee.id)){const te=ee,oe=o(te.id);if(oe.length>0&&!ye.doesNewSizeContainAllChildren(te,oe,Z,te.ly))return!1}break}case re.AllObjectsOfThisType:{for(const ee of e)if(ee.type===z.Cuboid){const te=ee,oe=o(te.id);if(oe.length>0&&!ye.doesNewSizeContainAllChildren(te,oe,Z,te.ly))return!1}break}default:{const ee=o(A.id);if(ee.length>0)return ye.doesNewSizeContainAllChildren(A,ee,Z,A.ly);break}}return!0}},W=Z=>!U(Z),k=Z=>{if(A){switch(c){case re.AllSelectedObjectsOfThisType:for(const ee of e)if(ee.type===z.Cuboid&&!ee.locked&&M.getState().selectedElementIdSet.has(ee.id)&&Math.abs(ee.lx-Z)>Et)return!0;break;case re.AllObjectsOfThisType:for(const ee of e)if(ee.type===z.Cuboid&&!ee.locked&&Math.abs(ee.lx-Z)>Et)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const ee of e)if(ee.type===z.Cuboid&&ee.parentId===(A==null?void 0:A.parentId)&&!ee.locked&&Math.abs(ee.lx-Z)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:break;default:if(Math.abs((A==null?void 0:A.lx)-Z)>Et)return!0}return!1}},D=(Z,ee)=>{if(Z==null)return null;for(const te of Z.children)if(te.name.includes(`${ee}`))return te;return null},L=(Z,ee,te)=>{var oe,de;if(Z){for(const he of Z.children)if(he.name.includes(`${te.id}`)){(de=(oe=kn.getState().contentRef)==null?void 0:oe.current)==null||de.add(he);break}d(he=>{for(const pe of he.elements)if(pe.id===te.id){pe.parentId=Zo;const me=new Kt(pe.cx,pe.cy).rotateAround(ai,ee.rotation[2]).add(new Kt(ee.cx,ee.cy));pe.cx=me.x,pe.cy=me.y,pe.cz=0,T.current.set(pe.id,new ae(me.x,me.y,0)),P.current.set(pe.id,Zo);break}})}},j=Z=>{for(const ee of e)ee.type===z.Cuboid&&!ee.locked&&ee.parentId===(A==null?void 0:A.parentId)&&B(ee,Z)},B=(Z,ee)=>{const te=o(Z.id),oe=Z.rotation[2];if(w.current.clear(),R.current.clear(),te.length>0)for(const de of te){if(ye.isIdentical(de.normal,as))switch(de.type){case z.Sensor:{const he=new Kt(de.cx*Z.lx,de.cy*Z.ly).rotateAround(ai,oe);w.current.set(de.id,he),v.current.set(de.id,new ae(de.cx,de.cy));break}case z.Polygon:{const he=de,pe=[];for(const me of he.vertices)pe.push(new Kt(me.x*Z.lx,me.y*Z.ly).rotateAround(ai,oe));R.current.set(de.id,pe),x.current.set(de.id,he.vertices.map(me=>({...me})));break}}else de.type===z.SolarPanel&&(ye.isEqual(de.normal[0],-1)||ye.isEqual(de.normal[0],1))&&v.current.set(de.id,new ae(de.cx,de.cy,de.cz));ye.isPlantOrHuman(de)&&v.current.set(de.id,new ae(de.cx,de.cy,de.cz))}if(i(Z.id,ee),te.length>0)for(const de of te){if(ye.isIdentical(de.normal,as))switch(de.type){case z.Sensor:{const he=w.current.get(de.id);if(he){const me=new Kt(he.x,he.y).rotateAround(ai,-oe).x/ee;r(de.id,me),T.current.set(de.id,new ae(me,de.cy))}break}case z.Polygon:{const he=R.current.get(de.id);if(he){const pe=[];for(const me of he){const le=me.rotateAround(ai,-oe),Te=le.x/ee,ge=le.y/Z.ly;pe.push({x:Te,y:ge})}a(de.id,pe),b.current.set(de.id,pe.map(me=>({...me})))}break}}else de.type===z.SolarPanel&&(ye.isEqual(de.normal[0],-1)&&(r(de.id,-ee/2),T.current.set(de.id,new ae(-ee/2,de.cy,de.cz))),ye.isEqual(de.normal[0],1)&&(r(de.id,ee/2),T.current.set(de.id,new ae(ee/2,de.cy,de.cz))));if(ye.isPlantOrHuman(de)){if(T.current.set(de.id,new ae(de.cx,de.cy,de.cz)),C.current.set(de.id,Z.id),Math.abs(de.cz-Z.lz/2)0){const he=kn.getState().contentRef,pe=D(he==null?void 0:he.current,Z.id);L(pe,Z,de)}}else if(Math.abs(Math.abs(de.cx)-Z.lx/2)0?ee:-ee)/2;r(de.id,he),T.current.set(de.id,new ae(he,de.cy,de.cz))}}}},O=(Z,ee,te)=>{if(!Z||!ee)return;const oe=kn.getState().contentRef,de=D(oe==null?void 0:oe.current,ee),he=D(ee===Zo?oe==null?void 0:oe.current:de,te);if(he&&(oe!=null&&oe.current)){if(Z===Zo)oe.current.add(he);else{const pe=D(oe.current,Z);pe==null||pe.add(he)}op()}},V=(Z,ee)=>{Z&&d(te=>{for(const oe of te.elements)if(oe.id===ee){oe.parentId=Z;break}})},G=Z=>{if(!A||!k(Z))return;const ee=n(A.id),te=ee?ee.lx:A.lx;if(F.current=void 0,H.current=W(Z),H.current)F.current=Z,S(te);else switch(c){case re.AllSelectedObjectsOfThisType:{const oe=new Map;for(const he of e)he.type===z.Cuboid&&!he.locked&&M.getState().selectedElementIdSet.has(he.id)&&(oe.set(he.id,he.lx),B(he,Z));const de={name:"Set Length for Selected Cuboids",timestamp:Date.now(),oldSizes:oe,newSize:Z,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())i(me,le);if(de.oldChildrenPositionsMap&&de.oldChildrenPositionsMap.size>0)for(const[me,le]of de.oldChildrenPositionsMap.entries()){l(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(Te,ge,me),V(Te,me))}if(de.oldChildrenVerticesMap&&de.oldChildrenVerticesMap.size>0)for(const[me,le]of de.oldChildrenVerticesMap.entries())a(me,le)},redo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())i(me,de.newSize);if(de.newChildrenPositionsMap&&de.newChildrenPositionsMap.size>0)for(const[me,le]of de.newChildrenPositionsMap.entries()){l(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(ge,Te,me),V(ge,me))}if(de.newChildrenVerticesMap&&de.newChildrenVerticesMap.size>0)for(const[me,le]of de.newChildrenVerticesMap.entries())a(me,le)}};s(de),p(f+1);break}case re.AllObjectsOfThisTypeOnSurface:{const oe=new Map;for(const he of e)he.type===z.Cuboid&&he.parentId===A.parentId&&!he.locked&&(oe.set(he.id,he.lx),B(he,Z));const de={name:"Set Length for All Cuboids on Surface",timestamp:Date.now(),oldSizes:oe,newSize:Z,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())i(me,le);if(de.oldChildrenPositionsMap&&de.oldChildrenPositionsMap.size>0)for(const[me,le]of de.oldChildrenPositionsMap.entries()){l(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(Te,ge,me),V(Te,me))}if(de.oldChildrenVerticesMap&&de.oldChildrenVerticesMap.size>0)for(const[me,le]of de.oldChildrenVerticesMap.entries())a(me,le)},redo:()=>{var he,pe;if(j(de.newSize),de.newChildrenPositionsMap&&de.newChildrenPositionsMap.size>0)for(const[me,le]of de.newChildrenPositionsMap.entries()){l(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(ge,Te,me),V(ge,me))}if(de.newChildrenVerticesMap&&de.newChildrenVerticesMap.size>0)for(const[me,le]of de.newChildrenVerticesMap.entries())a(me,le)}};s(de),p(f+1);break}case re.AllObjectsOfThisType:{const oe=new Map;for(const he of e)he.type===z.Cuboid&&!he.locked&&(oe.set(he.id,he.lx),B(he,Z));const de={name:"Set Length for All Cuboids",timestamp:Date.now(),oldSizes:oe,newSize:Z,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())i(me,le);if(de.oldChildrenPositionsMap&&de.oldChildrenPositionsMap.size>0)for(const[me,le]of de.oldChildrenPositionsMap.entries()){l(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(Te,ge,me),V(Te,me))}if(de.oldChildrenVerticesMap&&de.oldChildrenVerticesMap.size>0)for(const[me,le]of de.oldChildrenVerticesMap.entries())a(me,le)},redo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())i(me,de.newSize);if(de.newChildrenPositionsMap&&de.newChildrenPositionsMap.size>0)for(const[me,le]of de.newChildrenPositionsMap.entries()){l(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(ge,Te,me),V(ge,me))}if(de.newChildrenVerticesMap&&de.newChildrenVerticesMap.size>0)for(const[me,le]of de.newChildrenVerticesMap.entries())a(me,le)}};s(de),p(f+1);break}case re.AllObjectsOfThisTypeAboveFoundation:break;default:{B(A,Z);const oe={name:"Set Cuboid Length",timestamp:Date.now(),oldSize:te,newSize:Z,resizedElementId:A.id,resizedElementType:A.type,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var de,he;if(i(A.id,oe.oldSize),oe.oldChildrenPositionsMap&&oe.oldChildrenPositionsMap.size>0)for(const[pe,me]of oe.oldChildrenPositionsMap.entries()){l(pe,me.x,me.y,me.z);const le=(de=oe.oldChildrenParentIdMap)==null?void 0:de.get(pe),Te=(he=oe.newChildrenParentIdMap)==null?void 0:he.get(pe);le&&Te&&le!==Te&&(O(le,Te,pe),V(le,pe))}if(oe.oldChildrenVerticesMap&&oe.oldChildrenVerticesMap.size>0)for(const[pe,me]of oe.oldChildrenVerticesMap.entries())a(pe,me)},redo:()=>{var de,he;if(i(A.id,oe.newSize),oe.newChildrenPositionsMap&&oe.newChildrenPositionsMap.size>0)for(const[pe,me]of oe.newChildrenPositionsMap.entries()){l(pe,me.x,me.y,me.z);const le=(de=oe.oldChildrenParentIdMap)==null?void 0:de.get(pe),Te=(he=oe.newChildrenParentIdMap)==null?void 0:he.get(pe);le&&Te&&le!==Te&&(O(Te,le,pe),V(Te,pe))}if(oe.newChildrenVerticesMap&&oe.newChildrenVerticesMap.size>0)for(const[pe,me]of oe.newChildrenVerticesMap.entries())a(pe,me)}};s(oe),p(f+1);break}}},Q=()=>{t(!1)},$=()=>{Q(),g()},ie=()=>{G(y),H.current||(t(!1),p(0))},q=()=>{G(y)},se=H.current?": "+Y.t("message.NotApplicableToSelectedAction",E)+(F.current!==void 0?" ("+F.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("word.Length",E),rejectedMessage:se,onApply:q,onClose:Q,onClickCancel:$,onClickOk:ie,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:500,style:{width:120},step:.5,precision:2,value:y,onChange:Z=>{Z!==null&&S(Z)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",E),": [0.1, 500] ",Y.t("word.MeterAbbreviation",E)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",E)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:N,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("cuboidMenu.OnlyThisCuboid",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("cuboidMenu.AllCuboidsOnSameSurface",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("cuboidMenu.AllSelectedCuboids",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("cuboidMenu.AllCuboids",E)})]})})})]})})},Dfo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(kH),r=M(u3),i=M(uYe),a=M(Fw),l=M(kw),s=M(En),c=M(Eb),u=M(Fb),d=M(pn),f=M(no),p=M(Qn),g=M(Xi),A=uo(z.Cuboid),[y,S]=m.useState((A==null?void 0:A.ly)??0),C=m.useRef(new Map),P=m.useRef(new Map),v=m.useRef(new Map),T=m.useRef(new Map),w=m.useRef(new Map),x=m.useRef(new Map),b=m.useRef(new Map),R=m.useRef(new Map),H=m.useRef(!1),F=m.useRef(),E=$t(),N=Z=>{u(Z.target.value)},U=Z=>{if(A){switch(c){case re.AllSelectedObjectsOfThisType:{for(const ee of e)if(ee.type===z.Cuboid&&M.getState().selectedElementIdSet.has(ee.id)){const te=ee,oe=o(te.id);if(oe.length>0&&!ye.doesNewSizeContainAllChildren(te,oe,te.lx,Z))return!1}break}case re.AllObjectsOfThisType:{for(const ee of e)if(ee.type===z.Cuboid){const te=ee,oe=o(te.id);if(oe.length>0&&!ye.doesNewSizeContainAllChildren(te,oe,te.lx,Z))return!1}break}default:{const ee=o(A.id);if(ee.length>0)return ye.doesNewSizeContainAllChildren(A,ee,A.lx,Z);break}}return!0}},W=Z=>!U(Z),k=Z=>{if(A){switch(c){case re.AllSelectedObjectsOfThisType:for(const ee of e)if(ee.type===z.Cuboid&&!ee.locked&&M.getState().selectedElementIdSet.has(ee.id)&&Math.abs(ee.ly-Z)>Et)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const ee of e)if(ee.type===z.Cuboid&&ee.parentId===(A==null?void 0:A.parentId)&&!ee.locked&&Math.abs(ee.ly-Z)>Et)return!0;break;case re.AllObjectsOfThisType:{for(const ee of e)if(ee.type===z.Cuboid&&!ee.locked&&Math.abs(ee.ly-Z)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:break;default:if(Math.abs((A==null?void 0:A.ly)-Z)>Et)return!0}return!1}},D=(Z,ee)=>{if(Z==null)return null;for(const te of Z.children)if(te.name.includes(`${ee}`))return te;return null},L=(Z,ee,te)=>{var oe,de;if(Z){for(const he of Z.children)if(he.name.includes(`${te.id}`)){(de=(oe=kn.getState().contentRef)==null?void 0:oe.current)==null||de.add(he);break}d(he=>{for(const pe of he.elements)if(pe.id===te.id){pe.parentId=Zo;const me=new Kt(pe.cx,pe.cy).rotateAround(ai,ee.rotation[2]).add(new Kt(ee.cx,ee.cy));pe.cx=me.x,pe.cy=me.y,pe.cz=0,T.current.set(pe.id,new ae(me.x,me.y,0)),P.current.set(pe.id,Zo);break}})}},j=Z=>{for(const ee of e)ee.type===z.Cuboid&&!ee.locked&&ee.parentId===(A==null?void 0:A.parentId)&&B(ee,Z)},B=(Z,ee)=>{const te=o(Z.id),oe=Z.rotation[2];if(w.current.clear(),R.current.clear(),te.length>0)for(const de of te){if(ye.isIdentical(de.normal,as))switch(de.type){case z.Sensor:{const he=new Kt(de.cx*Z.lx,de.cy*Z.ly).rotateAround(ai,oe);w.current.set(de.id,he),v.current.set(de.id,new ae(de.cx,de.cy));break}case z.Polygon:{const he=de,pe=[];for(const me of he.vertices)pe.push(new Kt(me.x*Z.lx,me.y*Z.ly).rotateAround(ai,oe));R.current.set(de.id,pe),x.current.set(de.id,he.vertices.map(me=>({...me})));break}}else de.type===z.SolarPanel&&(ye.isEqual(de.normal[1],-1)||ye.isEqual(de.normal[1],1))&&v.current.set(de.id,new ae(de.cx,de.cy,de.cz));ye.isPlantOrHuman(de)&&v.current.set(de.id,new ae(de.cx,de.cy,de.cz))}if(a(Z.id,ee),te.length>0)for(const de of te){if(ye.isIdentical(de.normal,as))switch(de.type){case z.Sensor:{const he=w.current.get(de.id);if(he){const me=new Kt(he.x,he.y).rotateAround(ai,-oe).y/ee;i(de.id,me),T.current.set(de.id,new ae(de.cx,me))}break}case z.Polygon:{const he=R.current.get(de.id);if(he){const pe=[];for(const me of he){const le=me.rotateAround(ai,-oe),Te=le.x/Z.lx,ge=le.y/ee;pe.push({x:Te,y:ge})}l(de.id,pe),b.current.set(de.id,pe.map(me=>({...me})))}break}}else de.type===z.SolarPanel&&(ye.isEqual(de.normal[1],-1)&&(i(de.id,-ee/2),T.current.set(de.id,new ae(de.cx,-ee/2,de.cz))),ye.isEqual(de.normal[1],1)&&(i(de.id,ee/2),T.current.set(de.id,new ae(de.cx,ee/2,de.cz))));if(ye.isPlantOrHuman(de)){if(T.current.set(de.id,new ae(de.cx,de.cy,de.cz)),C.current.set(de.id,Z.id),Math.abs(de.cz-Z.lz/2)0){const he=kn.getState().contentRef,pe=D(he==null?void 0:he.current,Z.id);L(pe,Z,de)}}else if(Math.abs(Math.abs(de.cy)-Z.ly/2)0?ee:-ee)/2;i(de.id,he),T.current.set(de.id,new ae(de.cz,he,de.cz))}}}},O=(Z,ee,te)=>{if(!Z||!ee)return;const oe=kn.getState().contentRef,de=D(oe==null?void 0:oe.current,ee),he=D(ee===Zo?oe==null?void 0:oe.current:de,te);if(he&&(oe!=null&&oe.current)){if(Z===Zo)oe.current.add(he);else{const pe=D(oe.current,Z);pe==null||pe.add(he)}op()}},V=(Z,ee)=>{Z&&d(te=>{for(const oe of te.elements)if(oe.id===ee){oe.parentId=Z;break}})},G=Z=>{if(!A||!k(Z))return;const ee=n(A.id),te=ee?ee.ly:A.ly;if(F.current=void 0,H.current=W(Z),H.current)F.current=Z,S(te);else switch(v.current.clear(),T.current.clear(),x.current.clear(),b.current.clear(),c){case re.AllSelectedObjectsOfThisType:{const oe=new Map;for(const he of e)he.type===z.Cuboid&&!he.locked&&M.getState().selectedElementIdSet.has(he.id)&&(oe.set(he.id,he.ly),B(he,Z));const de={name:"Set Width for Selected Cuboids on Surface",timestamp:Date.now(),oldSizes:oe,newSize:Z,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())a(me,le);if(de.oldChildrenPositionsMap&&de.oldChildrenPositionsMap.size>0)for(const[me,le]of de.oldChildrenPositionsMap.entries()){r(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(Te,ge,me),V(Te,me))}if(de.oldChildrenVerticesMap&&de.oldChildrenVerticesMap.size>0)for(const[me,le]of de.oldChildrenVerticesMap.entries())l(me,le)},redo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())a(me,de.newSize);if(de.newChildrenPositionsMap&&de.newChildrenPositionsMap.size>0)for(const[me,le]of de.newChildrenPositionsMap.entries()){r(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(ge,Te,me),V(ge,me))}if(de.newChildrenVerticesMap&&de.newChildrenVerticesMap.size>0)for(const[me,le]of de.newChildrenVerticesMap.entries())l(me,le)}};s(de),p(f+1);break}case re.AllObjectsOfThisTypeOnSurface:{const oe=new Map;for(const he of e)he.type===z.Cuboid&&he.parentId===A.parentId&&!he.locked&&(oe.set(he.id,he.ly),B(he,Z));const de={name:"Set Width for All Cuboids on Surface",timestamp:Date.now(),oldSizes:oe,newSize:Z,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())a(me,le);if(de.oldChildrenPositionsMap&&de.oldChildrenPositionsMap.size>0)for(const[me,le]of de.oldChildrenPositionsMap.entries()){r(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(Te,ge,me),V(Te,me))}if(de.oldChildrenVerticesMap&&de.oldChildrenVerticesMap.size>0)for(const[me,le]of de.oldChildrenVerticesMap.entries())l(me,le)},redo:()=>{var he,pe;if(j(de.newSize),de.newChildrenPositionsMap&&de.newChildrenPositionsMap.size>0)for(const[me,le]of de.newChildrenPositionsMap.entries()){r(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(ge,Te,me),V(ge,me))}if(de.newChildrenVerticesMap&&de.newChildrenVerticesMap.size>0)for(const[me,le]of de.newChildrenVerticesMap.entries())l(me,le)}};s(de),p(f+1);break}case re.AllObjectsOfThisType:{const oe=new Map;for(const he of e)he.type===z.Cuboid&&!he.locked&&(oe.set(he.id,he.ly),B(he,Z));const de={name:"Set Width for All Cuboids on Surface",timestamp:Date.now(),oldSizes:oe,newSize:Z,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())a(me,le);if(de.oldChildrenPositionsMap&&de.oldChildrenPositionsMap.size>0)for(const[me,le]of de.oldChildrenPositionsMap.entries()){r(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(Te,ge,me),V(Te,me))}if(de.oldChildrenVerticesMap&&de.oldChildrenVerticesMap.size>0)for(const[me,le]of de.oldChildrenVerticesMap.entries())l(me,le)},redo:()=>{var he,pe;for(const[me,le]of de.oldSizes.entries())a(me,de.newSize);if(de.newChildrenPositionsMap&&de.newChildrenPositionsMap.size>0)for(const[me,le]of de.newChildrenPositionsMap.entries()){r(me,le.x,le.y,le.z);const Te=(he=de.oldChildrenParentIdMap)==null?void 0:he.get(me),ge=(pe=de.newChildrenParentIdMap)==null?void 0:pe.get(me);Te&&ge&&Te!==ge&&(O(ge,Te,me),V(ge,me))}if(de.newChildrenVerticesMap&&de.newChildrenVerticesMap.size>0)for(const[me,le]of de.newChildrenVerticesMap.entries())l(me,le)}};s(de),p(f+1);break}case re.AllObjectsOfThisTypeAboveFoundation:break;default:{B(A,Z);const oe={name:"Set Cuboid Width",timestamp:Date.now(),oldSize:te,newSize:Z,resizedElementId:A.id,resizedElementType:A.type,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenVerticesMap:new Map(x.current),newChildrenVerticesMap:new Map(b.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var de,he;if(a(A.id,oe.oldSize),oe.oldChildrenPositionsMap&&oe.oldChildrenPositionsMap.size>0)for(const[pe,me]of oe.oldChildrenPositionsMap.entries()){r(pe,me.x,me.y,me.z);const le=(de=oe.oldChildrenParentIdMap)==null?void 0:de.get(pe),Te=(he=oe.newChildrenParentIdMap)==null?void 0:he.get(pe);le&&Te&&le!==Te&&(O(le,Te,pe),V(le,pe))}if(oe.oldChildrenVerticesMap&&oe.oldChildrenVerticesMap.size>0)for(const[pe,me]of oe.oldChildrenVerticesMap.entries())l(pe,me)},redo:()=>{var de,he;if(a(A.id,oe.newSize),oe.newChildrenPositionsMap&&oe.newChildrenPositionsMap.size>0)for(const[pe,me]of oe.newChildrenPositionsMap.entries()){r(pe,me.x,me.y,me.z);const le=(de=oe.oldChildrenParentIdMap)==null?void 0:de.get(pe),Te=(he=oe.newChildrenParentIdMap)==null?void 0:he.get(pe);le&&Te&&le!==Te&&(O(Te,le,pe),V(Te,pe))}if(oe.newChildrenVerticesMap&&oe.newChildrenVerticesMap.size>0)for(const[pe,me]of oe.newChildrenVerticesMap.entries())l(pe,me)}};s(oe),p(f+1);break}}},Q=()=>{t(!1)},$=()=>{Q(),g()},ie=()=>{G(y),H.current||(t(!1),p(0))},q=()=>{G(y)},se=H.current?": "+Y.t("message.NotApplicableToSelectedAction",E)+(F.current!==void 0?" ("+F.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("word.Width",E),rejectedMessage:se,onApply:q,onClose:Q,onClickCancel:$,onClickOk:ie,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:500,style:{width:120},step:.5,precision:2,value:y,onChange:Z=>{Z!==null&&S(Z)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",E),": [0.1, 500] ",Y.t("word.MeterAbbreviation",E)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",E)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:N,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("cuboidMenu.OnlyThisCuboid",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("cuboidMenu.AllCuboidsOnSameSurface",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("cuboidMenu.AllSelectedCuboids",E)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("cuboidMenu.AllCuboids",E)})]})})})]})})},Efo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Gr),r=M(Jn),i=M(jge),a=M(Gwt),l=M(Jwt),s=M(Xwt),c=M(En),u=M(Eb),d=M(Fb),f=M(u3),p=M(no),g=M(Qn),A=uo(z.Cuboid),[y,S]=m.useState((A==null?void 0:A.lz)??0),C=m.useRef(new Map),P=m.useRef(new Map),v=m.useRef(new Map),T=m.useRef(new Map),w=$t(),x=O=>{d(O.target.value)},b=(O,V)=>{i(O,V),a(O,V/2)},R=O=>{if(!A)return;const V=o(A);if(V)for(const G of n)G.type===z.Cuboid&&!G.locked&&G.parentId===V.id&&(i(G.id,O),a(G.id,O/2))},H=O=>{if(!A)return;const V=ye.getBaseId(A.id);if(V)for(const G of n)G.type===z.Cuboid&&!G.locked&&ye.getBaseId(G.id)===V&&(i(G.id,O),a(G.id,O/2))},F=O=>{if(A){switch(u){case re.AllSelectedObjectsOfThisType:{for(const V of n)if(V.type===z.Cuboid&&!V.locked&&M.getState().selectedElementIdSet.has(V.id)&&Math.abs(V.lz-O)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const V of n)if(V.type===z.Cuboid&&!V.locked&&Math.abs(V.lz-O)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{const V=ye.getBaseId(A==null?void 0:A.id);if(V&&V!==Zo){for(const G of n)if(G.type===z.Cuboid&&G.parentId&&G.parentId!==Zo&&!G.locked){const Q=G;if(V===ye.getBaseId(Q.id)&&Math.abs(Q.lz-O)>Et)return!0}}break}case re.AllObjectsOfThisTypeOnSurface:{for(const V of n)if(V.type===z.Cuboid&&V.parentId!==Zo&&V.parentId===(A==null?void 0:A.parentId)&&!V.locked&&Math.abs(V.lz-O)>Et)return!0;break}default:{if(Math.abs((A==null?void 0:A.lz)-O)>Et)return!0;break}}return!1}},E=(O,V)=>{if(O==null)return null;for(const G of O.children)if(G.name.includes(`${V}`))return G;return null},N=(O,V,G)=>{var Q,$;if(O){for(const q of O.children)if(q.name.includes(`${G.id}`)){($=(Q=kn.getState().contentRef)==null?void 0:Q.current)==null||$.add(q);break}G.parentId=Zo;const ie=new Kt(G.cx,G.cy).rotateAround(ai,-V.rotation[2]).add(new Kt(V.cx,V.cy));G.cx=ie.x,G.cy=ie.y,G.cz=0,T.current.set(G.id,new ae(ie.x,ie.y,0)),P.current.set(G.id,Zo)}},U=(O,V)=>{e(G=>{for(const Q of G.elements)if(Q.parentId===O.id)if(C.current.set(Q.id,O.id),v.current.set(Q.id,new ae(Q.cx,Q.cy,Q.cz)),ye.isPlantOrHuman(Q))if(Math.abs(Q.cz-O.lz/2)V/2){const ie=kn.getState().contentRef,q=E(ie==null?void 0:ie.current,O.id);N(q,O,Q)}else Q.cz=$,T.current.set(Q.id,new ae(Q.cx,Q.cy,$))}else Q.type===z.SolarPanel&&ye.isEqual(Q.normal[2],1)&&(Q.cz=V/2,T.current.set(Q.id,new ae(Q.cx,Q.cy,V/2)))})},W=(O,V,G)=>{if(!O||!V)return;const Q=kn.getState().contentRef,$=E(Q==null?void 0:Q.current,V),ie=E(V===Zo?Q==null?void 0:Q.current:$,G);if(ie&&(Q!=null&&Q.current)){if(O===Zo)Q.current.add(ie);else{const q=E(Q.current,O);q==null||q.add(ie)}op()}},k=(O,V)=>{O&&e(G=>{for(const Q of G.elements)if(Q.id===V){Q.parentId=O;break}})},D=(O,V)=>{M.getState().set(G=>{for(const Q of G.elements)if(O.has(Q.id))if(V!==void 0)Q.lz=V,Q.cz=V/2;else{const $=O.get(Q.id);$!==void 0&&(Q.lz=$,Q.cz=$/2)}})},L=O=>{if(A&&F(O)){switch(u){case re.AllSelectedObjectsOfThisType:{const V=new Map;for(const Q of n)Q.type===z.Cuboid&&M.getState().selectedElementIdSet.has(Q.id)&&(V.set(Q.id,Q.lz),U(Q,O));const G={name:"Set Height for Selected Cuboids",timestamp:Date.now(),oldValues:V,newValue:O,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var Q,$;if(D(G.oldValues),G.oldChildrenPositionsMap&&G.oldChildrenPositionsMap.size>0)for(const[ie,q]of G.oldChildrenPositionsMap.entries()){f(ie,q.x,q.y,q.z);const se=(Q=G.oldChildrenParentIdMap)==null?void 0:Q.get(ie),Z=($=G.newChildrenParentIdMap)==null?void 0:$.get(ie);se&&Z&&se!==Z&&(W(se,Z,ie),k(se,ie))}},redo:()=>{var $,ie;const Q=G.newValue;if(D(G.oldValues,Q),G.newChildrenPositionsMap&&G.newChildrenPositionsMap.size>0)for(const[q,se]of G.newChildrenPositionsMap.entries()){f(q,se.x,se.y,se.z);const Z=($=G.oldChildrenParentIdMap)==null?void 0:$.get(q),ee=(ie=G.newChildrenParentIdMap)==null?void 0:ie.get(q);Z&&ee&&Z!==ee&&(W(ee,Z,q),k(ee,q))}}};c(G),D(V,O),g(p+1);break}case re.AllObjectsOfThisType:{const V=new Map;for(const Q of n)Q.type===z.Cuboid&&(V.set(Q.id,Q.lz),U(Q,O));const G={name:"Set Height for All Cuboids",timestamp:Date.now(),oldValues:V,newValue:O,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var Q,$;for(const[ie,q]of G.oldValues.entries())b(ie,q);if(G.oldChildrenPositionsMap&&G.oldChildrenPositionsMap.size>0)for(const[ie,q]of G.oldChildrenPositionsMap.entries()){f(ie,q.x,q.y,q.z);const se=(Q=G.oldChildrenParentIdMap)==null?void 0:Q.get(ie),Z=($=G.newChildrenParentIdMap)==null?void 0:$.get(ie);se&&Z&&se!==Z&&(W(se,Z,ie),k(se,ie))}},redo:()=>{var $,ie;const Q=G.newValue;if(l(z.Cuboid,Q),s(z.Cuboid,Q/2),G.newChildrenPositionsMap&&G.newChildrenPositionsMap.size>0)for(const[q,se]of G.newChildrenPositionsMap.entries()){f(q,se.x,se.y,se.z);const Z=($=G.oldChildrenParentIdMap)==null?void 0:$.get(q),ee=(ie=G.newChildrenParentIdMap)==null?void 0:ie.get(q);Z&&ee&&Z!==ee&&(W(ee,Z,q),k(ee,q))}}};c(G),l(z.Cuboid,O),s(z.Cuboid,O/2),g(p+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{const V=new Map,G=ye.getBaseId(A.id);for(const $ of n)$.type===z.Cuboid&&ye.getBaseId($.id)===G&&(V.set($.id,$.lz),U($,O));const Q={name:"Set Height for All Cuboids Above Same Base",timestamp:Date.now(),oldValues:V,newValue:O,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var $,ie;for(const[q,se]of Q.oldValues.entries())b(q,se);if(Q.oldChildrenPositionsMap&&Q.oldChildrenPositionsMap.size>0)for(const[q,se]of Q.oldChildrenPositionsMap.entries()){f(q,se.x,se.y,se.z);const Z=($=Q.oldChildrenParentIdMap)==null?void 0:$.get(q),ee=(ie=Q.newChildrenParentIdMap)==null?void 0:ie.get(q);Z&&ee&&Z!==ee&&(W(Z,ee,q),k(Z,q))}},redo:()=>{var ie,q;const $=Q.newValue;if(H($),Q.newChildrenPositionsMap&&Q.newChildrenPositionsMap.size>0)for(const[se,Z]of Q.newChildrenPositionsMap.entries()){f(se,Z.x,Z.y,Z.z);const ee=(ie=Q.oldChildrenParentIdMap)==null?void 0:ie.get(se),te=(q=Q.newChildrenParentIdMap)==null?void 0:q.get(se);ee&&te&&ee!==te&&(W(te,ee,se),k(te,se))}}};c(Q),H(O),g(p+1);break}case re.AllObjectsOfThisTypeOnSurface:{const V=new Map;for(const Q of n)Q.type===z.Cuboid&&Q.parentId===A.parentId&&(V.set(Q.id,Q.lz),U(Q,O));const G={name:"Set Height for All Cuboids on Same Surface",timestamp:Date.now(),oldValues:V,newValue:O,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),undo:()=>{var Q,$;for(const[ie,q]of G.oldValues.entries())b(ie,q);if(G.oldChildrenPositionsMap&&G.oldChildrenPositionsMap.size>0)for(const[ie,q]of G.oldChildrenPositionsMap.entries()){f(ie,q.x,q.y,q.z);const se=(Q=G.oldChildrenParentIdMap)==null?void 0:Q.get(ie),Z=($=G.newChildrenParentIdMap)==null?void 0:$.get(ie);se&&Z&&se!==Z&&(W(se,Z,ie),k(se,ie))}},redo:()=>{var $,ie;const Q=G.newValue;if(R(Q),G.newChildrenPositionsMap&&G.newChildrenPositionsMap.size>0)for(const[q,se]of G.newChildrenPositionsMap.entries()){f(q,se.x,se.y,se.z);const Z=($=G.oldChildrenParentIdMap)==null?void 0:$.get(q),ee=(ie=G.newChildrenParentIdMap)==null?void 0:ie.get(q);Z&&ee&&Z!==ee&&(W(ee,Z,q),k(ee,q))}}};c(G),R(O),g(p+1);break}default:{const V=r(A.id),G=V?V.lz:A.lz;U(A,O),b(A.id,O);const Q={name:"Set Cuboid Width",timestamp:Date.now(),oldValue:G,newValue:O,oldChildrenPositionsMap:new Map(v.current),newChildrenPositionsMap:new Map(T.current),oldChildrenParentIdMap:new Map(C.current),newChildrenParentIdMap:new Map(P.current),changedElementId:A.id,changedElementType:A.type,undo:()=>{var $,ie;if(b(Q.changedElementId,Q.oldValue),Q.oldChildrenPositionsMap&&Q.oldChildrenPositionsMap.size>0)for(const[q,se]of Q.oldChildrenPositionsMap.entries()){f(q,se.x,se.y,se.z);const Z=($=Q.oldChildrenParentIdMap)==null?void 0:$.get(q),ee=(ie=Q.newChildrenParentIdMap)==null?void 0:ie.get(q);Z&&ee&&Z!==ee&&(W(Z,ee,q),k(Z,q))}},redo:()=>{var $,ie;if(b(Q.changedElementId,Q.newValue),Q.newChildrenPositionsMap&&Q.newChildrenPositionsMap.size>0)for(const[q,se]of Q.newChildrenPositionsMap.entries()){f(q,se.x,se.y,se.z);const Z=($=Q.oldChildrenParentIdMap)==null?void 0:$.get(q),ee=(ie=Q.newChildrenParentIdMap)==null?void 0:ie.get(q);Z&&ee&&Z!==ee&&(W(ee,Z,q),k(ee,q))}}};c(Q),g(p+1);break}}e(V=>{V.actionState.cuboidHeight=O})}},j=()=>{t(!1)},B=()=>{L(y)};return h.jsx(so,{width:550,title:Y.t("word.Height",w),onApply:B,onClose:j,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:1e3,style:{width:120},step:.5,precision:2,value:y,onChange:O=>{O!==null&&S(O)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",w),": [0.1, 1000] ",Y.t("word.MeterAbbreviation",w)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",w)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:x,value:u,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("cuboidMenu.OnlyThisCuboid",w)}),(A==null?void 0:A.parentId)!==Zo&&h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("cuboidMenu.AllCuboidsOnSameSurface",w)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("cuboidMenu.AllCuboidsAboveSameBase",w)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("cuboidMenu.AllSelectedCuboids",w)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("cuboidMenu.AllCuboids",w)})]})})})]})})},Ffo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(Bge),r=M(En),i=M(Eb),a=M(Fb),l=M(no),s=M(Qn),c=uo(z.Cuboid),[u,d]=m.useState(c?-c.rotation[2]:0),f=$t(),p=v=>{a(v.target.value)},g=v=>{for(const T of e)T.type===z.Cuboid&&!T.locked&&T.parentId===(c==null?void 0:c.parentId)&&o(T.id,0,0,-v)},A=v=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const T of e)if(T.type===z.Cuboid&&!T.locked&&M.getState().selectedElementIdSet.has(T.id)&&Math.abs(-T.rotation[2]-v)>Et)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const T of e)if(T.type===z.Cuboid&&T.parentId===(c==null?void 0:c.parentId)&&!T.locked&&Math.abs(-T.rotation[2]-v)>Et)return!0;break;case re.AllObjectsOfThisType:{for(const T of e)if(T.type===z.Cuboid&&!T.locked&&Math.abs(-T.rotation[2]-v)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:break;default:if(Math.abs((c?-c.rotation[2]:0)-v)>Et)return!0}return!1},y=(v,T)=>{M.getState().set(w=>{for(const x of w.elements)if(v.has(x.id))if(T!==void 0)x.rotation[2]=T;else{const b=v.get(x.id);b!==void 0&&(x.rotation[2]=-b)}})},S=v=>{if(c&&A(v))switch(i){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of e)x.type===z.Cuboid&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&T.set(x.id,-x.rotation[2]);const w={name:"Set Azimuth for Selected Cuboids",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{y(w.oldValues)},redo:()=>{y(w.oldValues,-w.newValue)}};r(w),y(T,-v),s(l+1);break}case re.AllObjectsOfThisTypeOnSurface:{const T=new Map;for(const x of e)x.type===z.Cuboid&&x.parentId===c.parentId&&!x.locked&&T.set(x.id,-x.rotation[2]);const w={name:"Set Azimuth for All Cuboids on Surface",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{for(const[x,b]of w.oldValues.entries())o(x,0,0,-b)},redo:()=>{g(w.newValue)}};r(w),g(v),s(l+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of e)x.type===z.Cuboid&&!x.locked&&T.set(x.id,-x.rotation[2]);const w={name:"Set Azimuth for All Cuboids",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{y(w.oldValues)},redo:()=>{y(w.oldValues,-w.newValue)}};r(w),y(T,-v),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:break;default:{const T=n(c.id),w=T?-T.rotation[2]:-c.rotation[2],x={name:"Set Cuboid Azimuth",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:c.id,changedElementType:c.type,undo:()=>{o(x.changedElementId,0,0,-x.oldValue)},redo:()=>{o(x.changedElementId,0,0,-x.newValue)}};r(x),o(c.id,0,0,-v),s(l+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:550,title:Y.t("word.Azimuth",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:-180,max:180,style:{width:120},step:.5,precision:2,value:parseFloat(ye.toDegrees(u).toFixed(2)),formatter:v=>`${v}°`,onChange:v=>{v!==null&&d(ye.toRadians(v))}}),h.jsxs("div",{style:{paddingTop:"20px",paddingRight:"6px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [-180°, 180°]",h.jsx("br",{}),Y.t("message.AzimuthOfNorthIsZero",f),h.jsx("br",{}),Y.t("message.CounterclockwiseAzimuthIsPositive",f)]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:p,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("cuboidMenu.OnlyThisCuboid",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("cuboidMenu.AllCuboidsOnSameSurface",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("cuboidMenu.AllSelectedCuboids",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("cuboidMenu.AllCuboids",f)})]})})})]})})},kfo=[{key:"sensorCount",objectType:z.Sensor},{key:"polygonCount",objectType:z.Polygon},{key:"humanCount",objectType:z.Human},{key:"treeCount",objectType:z.Tree},{key:"flowerCount",objectType:z.Flower},{key:"outsideLightCount",objectType:z.Light}],Lfo=(t,e)=>{const n={lng:M.getState().language};let o="",r="";switch(t){case z.Light:{o=`${Y.t("cuboidMenu.RemoveAllUnlockedLights",n)} (${e})`,r=`${Y.t("cuboidMenu.DoYouReallyWantToRemoveAllLightsOnCuboid",n)} (${e} ${Y.t("cuboidMenu.Lights",n)})`;break}case z.Sensor:{o=`${Y.t("cuboidMenu.RemoveAllUnlockedSensors",n)} (${e})`,r=`${Y.t("cuboidMenu.DoYouReallyWantToRemoveAllSensorsOnCuboid",n)} (${e} ${Y.t("cuboidMenu.Sensors",n)})`;break}case z.Polygon:{o=`${Y.t("cuboidMenu.RemoveAllUnlockedPolygons",n)} (${e})`,r=`${Y.t("cuboidMenu.DoYouReallyWantToRemoveAllPolygonsOnCuboid",n)} (${e} ${Y.t("cuboidMenu.Polygons",n)})`;break}case z.Human:{o=`${Y.t("cuboidMenu.RemoveAllUnlockedHumans",n)} (${e})`,r=`${Y.t("cuboidMenu.DoYouReallyWantToRemoveAllHumansOnCuboid",n)} (${e} ${Y.t("cuboidMenu.Humans",n)})`;break}case z.Tree:{o=`${Y.t("cuboidMenu.RemoveAllUnlockedTrees",n)} (${e})`,r=`${Y.t("cuboidMenu.DoYouReallyWantToRemoveAllTreesOnCuboid",n)} (${e} ${Y.t("cuboidMenu.Trees",n)})`;break}case z.Flower:{o=`${Y.t("cuboidMenu.RemoveAllUnlockedFlowers",n)} (${e})`,r=`${Y.t("cuboidMenu.DoYouReallyWantToRemoveAllFlowersOnCuboid",n)} (${e} ${Y.t("cuboidMenu.Flowers",n)})`;break}}return{itemLabel:o,modalTitle:r}},Wfo=(t,e)=>{const n=[],o={lng:M.getState().language};if(e.solarPanelCount>0){const r=Y.t("cuboidMenu.DoYouReallyWantToRemoveAllSolarPanelsOnCuboid",o)+" ("+e.solarPanelModuleCount+" "+Y.t("cuboidMenu.SolarPanels",o)+", "+e.solarPanelCount+" "+Y.t("cuboidMenu.Racks",o)+")?";n.push({key:"remove-all-solar-panels-on-cuboid",label:h.jsxs(zHe,{cuboid:t,objectType:z.SolarPanel,modalTitle:r,children:[Y.t("cuboidMenu.RemoveAllUnlockedSolarPanels",o),"  (",e.solarPanelModuleCount," ",Y.t("cuboidMenu.SolarPanels",o),",",e.solarPanelCount," ",Y.t("cuboidMenu.Racks",o),")"]})})}return kfo.forEach(({key:r,objectType:i})=>{const a=e[r];if(typeof a=="number"&&a>0){const{itemLabel:l,modalTitle:s}=Lfo(i,a),c=i.replaceAll(" ","");n.push({key:`remove-all-${c}s-on-cuboid`,label:h.jsx(zHe,{cuboid:t,objectType:i,modalTitle:s,children:l})})}}),n},Nfo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(Eb),a=M(Fb),l=M(no),s=M(Qn),c=uo(z.Cuboid),[u,d]=m.useState((c==null?void 0:c.transparency)??0),f=$t(),p=(T,w)=>{e(x=>{for(const b of x.elements)if(b.type===z.Cuboid&&b.id===T&&!b.locked){b.transparency=w;break}})},g=T=>{for(const w of n)w.type===z.Cuboid&&!w.locked&&w.parentId===(c==null?void 0:c.parentId)&&p(w.id,T)},A=(T,w)=>{e(x=>{for(const b of x.elements)if(b.type===z.Cuboid&&T.has(b.id))if(w!==void 0)b.transparency=w;else{const R=T.get(b.id);R!==void 0&&(b.transparency=R)}})},y=T=>{a(T.target.value)},S=T=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const w of n)if(w.type===z.Cuboid&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)&&Math.abs((w.transparency??0)-T)>Et)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const w of n)if(w.type===z.Cuboid&&w.parentId===(c==null?void 0:c.parentId)&&!w.locked&&Math.abs((w.transparency??0)-T)>Et)return!0;break;case re.AllObjectsOfThisType:{for(const w of n)if(w.type===z.Cuboid&&!w.locked&&Math.abs((w.transparency??0)-T)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:break;default:if(Math.abs(((c==null?void 0:c.transparency)??0)-T)>Et)return!0}return!1},C=T=>{if(c&&S(T))switch(i){case re.AllSelectedObjectsOfThisType:{const w=new Map;for(const b of n)b.type===z.Cuboid&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&w.set(b.id,b.transparency??0);const x={name:"Set Transparency for Selected Cuboids",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{A(x.oldValues,-x.newValue)}};r(x),A(w,T),s(l+1);break}case re.AllObjectsOfThisTypeOnSurface:{const w=new Map;for(const b of n)b.type===z.Cuboid&&b.parentId===c.parentId&&!b.locked&&w.set(b.id,b.transparency??0);const x={name:"Set Transparency for All Cuboids on Surface",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())p(b,R)},redo:()=>{g(x.newValue)}};r(x),g(T),s(l+1);break}case re.AllObjectsOfThisType:{const w=new Map;for(const b of n)b.type===z.Cuboid&&!b.locked&&w.set(b.id,b.transparency??0);const x={name:"Set Transparency for All Cuboids",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{A(x.oldValues,-x.newValue)}};r(x),A(w,T),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:break;default:{const w=o(c.id),x=w?w.transparency:c.transparency,b={name:"Set Cuboid Transparency",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:c.id,changedElementType:c.type,undo:()=>{p(b.changedElementId,b.oldValue)},redo:()=>{p(b.changedElementId,b.newValue)}};r(b),p(c.id,T),s(l+1);break}}},P=()=>{t(!1)},v=()=>{C(u)};return h.jsx(so,{width:550,title:Y.t("word.Transparency",f),onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.1,precision:2,value:u,onChange:T=>{T!==null&&d(T)}}),h.jsxs("div",{style:{paddingTop:"20px",paddingRight:"6px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("cuboidMenu.OnlyThisCuboid",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("cuboidMenu.AllCuboidsOnSameSurface",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("cuboidMenu.AllSelectedCuboids",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("cuboidMenu.AllCuboids",f)})]})})})]})})},Ufo=()=>{const t=M.getState().elementsToPaste;if(t&&t.length>0){const e=t[0];if(e.type===z.Human||e.type===z.Tree||e.type===z.Flower||e.type===z.Polygon||e.type===z.Sensor||e.type===z.SolarPanel||e.type===z.Cuboid)return!0}return!1},jfo=t=>{const e=[];if(t.type!==z.Cuboid)return{items:e};const n=t,o=M.getState().selectedSideIndex,r={lng:M.getState().language},i=M.getState().countAllOffspringsByTypeAtOnce(n.id,!1),a=!(n!=null&&n.locked),l=!n.textureTypes||o>=0&&n.textureTypes[o]===Ro.NoTexture;return Ufo()&&e.push({key:"cuboid-paste",label:h.jsx(nM,{})}),e.push({key:"cuboid-copy",label:h.jsx(Fd,{})}),a&&e.push({key:"cuboid-cut",label:h.jsx(kd,{})}),e.push({key:"cuboid-lock",label:h.jsx(Ku,{selectedElement:n})}),e.push({key:"cuboid-group-master",label:h.jsx(LQe,{groupableElement:n})}),e.push({key:"cuboid-stackable",label:h.jsx(yfo,{cuboid:n})}),i.gotSome()&&e.push({key:"cuboid-clear",label:h.jsx(an,{children:Y.t("word.Clear",r)}),children:Wfo(n,i)}),a&&(l&&e.push({key:"cuboid-color",label:h.jsxs(eo,{Dialog:wfo,children:[Y.t("word.Color",r)," ..."]})}),e.push({key:"cuboid-texture",label:h.jsxs(eo,{Dialog:Ifo,children:[Y.t("word.Texture",r)," ..."]})}),e.push({key:"cuboid-length",label:h.jsxs(eo,{Dialog:zfo,children:[Y.t("word.Length",r)," ..."]})}),e.push({key:"cuboid-width",label:h.jsxs(eo,{Dialog:Dfo,children:[Y.t("word.Width",r)," ..."]})}),e.push({key:"cuboid-height",label:h.jsxs(eo,{Dialog:Efo,children:[Y.t("word.Height",r)," ..."]})}),e.push({key:"cuboid-azimuth",label:h.jsxs(eo,{Dialog:Ffo,children:[Y.t("word.Azimuth",r)," ..."]})}),e.push({key:"cuboid-transparency",label:h.jsxs(eo,{Dialog:Nfo,children:[Y.t("word.Transparency",r)," ..."]})})),e.push({key:"add-polygon-on-cuboid",label:h.jsx(Afo,{cuboid:n,selectedSideIndex:o})}),a&&e.push({key:"cuboid-label",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",r)}),children:v3(n)}),{items:e}},Bfo=()=>{const t=M(mA),e=$t(),n=r=>{M.getState().set(i=>{i.viewState.groundImage=r,i.viewState.groundImageType=i.viewState.mapType})},o=r=>{const i=r.target.checked,a={name:"Show Ground Image",timestamp:Date.now(),checked:i,undo:()=>{n(!a.checked)},redo:()=>{n(a.checked)}};M.getState().addUndoable(a),n(i)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t,onChange:o,children:Y.t("groundMenu.ImageOnGround",e)})})},Yfo=()=>{const t=M(IBe),e=$t(),n=r=>{M.getState().set(i=>{i.viewState.waterSurface=r})},o=r=>{const i=r.target.checked,a={name:"Water Surface",timestamp:Date.now(),checked:i,undo:()=>{n(!a.checked)},redo:()=>{n(a.checked)}};M.getState().addUndoable(a),n(i)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,update:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t,onChange:o,children:Y.t("groundMenu.WaterSurface",e)})})},Ofo=()=>{const t=M(MBe),e=o=>{M.getState().set(r=>{r.viewState.groundColor=o})},n=o=>{const r=t,i=o.hex,a={name:"Set Ground Color",timestamp:Date.now(),oldValue:r,newValue:i,undo:()=>{e(a.oldValue)},redo:()=>{e(a.newValue)}};M.getState().addUndoable(a),e(i)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Ld,{color:t,onChangeComplete:n})})},Vfo=()=>{const t=M(Pge)??Nq,n=M(s0)>0,o=$t(),r=s=>{M.getState().set(c=>{c.world.leafDayOfYear1=s})},i=s=>{if(s===null)return;const c=t,u=s,d={name:"Set Leaf Day 1",timestamp:Date.now(),oldValue:c,newValue:u,undo:()=>{r(d.oldValue)},redo:()=>{r(d.newValue)}};M.getState().addUndoable(d),r(u)},a=()=>h.jsx("div",{style:{width:"80px"},children:Y.t(n?"groundMenu.LeafOffDay":"groundMenu.LeafOutDay",o)}),l=()=>h.jsx("div",{style:{width:"60px"},children:"(1-150)"});return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Sn,{addonBefore:h.jsx(a,{}),addonAfter:h.jsx(l,{}),style:{width:"300px"},min:1,max:150,step:1,precision:0,value:t,onChange:i})})},_fo=()=>{const t=M(Cge)??Uq,n=M(s0)>0,o=$t(),r=s=>{M.getState().set(c=>{c.world.leafDayOfYear2=s})},i=s=>{if(s===null)return;const c=t,u=s,d={name:"Set Leaf Day 2",timestamp:Date.now(),oldValue:c,newValue:u,undo:()=>{r(d.oldValue)},redo:()=>{r(d.newValue)}};M.getState().addUndoable(d),r(u)},a=()=>h.jsx("div",{style:{width:"80px"},children:Y.t(n?"groundMenu.LeafOffDay":"groundMenu.LeafOutDay",o)}),l=()=>h.jsx("div",{style:{width:"60px"},children:"(215-365)"});return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Sn,{addonBefore:h.jsx(a,{}),addonAfter:h.jsx(l,{}),style:{width:"300px"},min:215,max:365,step:1,precision:0,value:t,onChange:i})})},DHe=({monthIndex:t})=>{const e=M(i=>i.world.monthlyIrradianceLosses?i.world.monthlyIrradianceLosses[t]:.05)??.05,n=$t(),o=i=>{M.getState().set(a=>{a.world.monthlyIrradianceLosses||(a.world.monthlyIrradianceLosses=new Array(12).fill(.05)),a.world.monthlyIrradianceLosses[t]=i})},r=i=>{if(i===null)return;const a=e,l=i,s={name:"Set Irradiance Loss in "+swe[t],timestamp:Date.now(),oldValue:a,newValue:l,undo:()=>{o(s.oldValue)},redo:()=>{o(s.newValue)}};M.getState().addUndoable(s),o(l)};return h.jsx(Sn,{addonBefore:h.jsx("span",{style:{fontFamily:"monospace"},children:Y.t(`month.${swe[t]}`,n)}),style:{width:"120px"},min:0,max:1,step:.01,precision:2,value:e,onChange:r})},Gfo=()=>{const t=M(r=>r.world.ground.albedo),e=$t(),n=r=>{M.getState().set(i=>{i.world.ground.albedo=r})},o=r=>{if(r===null)return;const i=t,a=r,l={name:"Set Ground Albedo",timestamp:Date.now(),oldValue:i,newValue:a,undo:()=>{n(l.oldValue)},redo:()=>{n(l.newValue)}};M.getState().addUndoable(l),n(a)};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsxs(on,{style:{width:"60px"},children:[Y.t("groundMenu.Albedo",e),":"]}),h.jsx(Sn,{min:.05,max:1,step:.01,precision:2,value:t,onChange:o})]})},Xfo=({itemLabel:t,modalTitle:e,objectType:n})=>{const o=M.getState().removeElementsByType,r=()=>{const a=M.getState().elements.filter(c=>!c.locked&&c.type===n);o(n);const l=JSON.parse(JSON.stringify(a)),s={name:"Remove All "+n+"s",timestamp:Date.now(),removedElements:l,undo:()=>{M.getState().set(c=>{c.elements.push(...s.removedElements)})},redo:()=>{o(n)}};M.getState().addUndoable(s),dt.getState().updateContextMenu()},i=()=>{xi.confirm({title:e,onOk:r,icon:h.jsx(ny,{})})};return h.jsx(an,{onClick:i,children:t})},EHe=({lock:t,count:e,label:n})=>{const o=M.getState().updateAllElementLocks,r=()=>{const i=new Map;for(const c of M.getState().elements)i.set(c.id,!!c.locked);const s={name:`${t?"Lock":"Unlock"} All ${t?"Unlocked":"Locked"} Elements`,timestamp:Date.now(),oldValues:i,newValue:!0,undo:()=>{for(const[c,u]of s.oldValues.entries())M.getState().updateElementLockById(c,u)},redo:()=>{o(t)}};M.getState().addUndoable(s),o(t)};return h.jsxs(an,{update:!0,onClick:r,children:[n," (",e,")"]})},Jfo=[{key:"humanCount",type:z.Human,itemLabel:"groundMenu.RemoveAllUnlockedPeople",modalTitle:"groundMenu.DoYouReallyWantToRemoveAllPeople"},{key:"treeCount",type:z.Tree,itemLabel:"groundMenu.RemoveAllUnlockedTrees",modalTitle:"groundMenu.DoYouReallyWantToRemoveAllTrees"},{key:"flowerCount",type:z.Flower,itemLabel:"groundMenu.RemoveAllUnlockedFlowers",modalTitle:"groundMenu.DoYouReallyWantToRemoveAllFlowers"},{key:"solarPanelCount",type:z.SolarPanel,itemLabel:"groundMenu.RemoveAllUnlockedSolarPanels",modalTitle:"groundMenu.DoYouReallyWantToRemoveAllSolarPanels"},{key:"foundationCount",type:z.Foundation,itemLabel:"groundMenu.RemoveAllUnlockedFoundations",modalTitle:"groundMenu.DoYouReallyWantToRemoveAllFoundations"},{key:"cuboidCount",type:z.Cuboid,itemLabel:"groundMenu.RemoveAllUnlockedCuboids",modalTitle:"groundMenu.DoYouReallyWantToRemoveAllCuboids"}],Kfo=()=>{const t=M.getState().elementsToPaste;if(!t||t.length===0)return!1;const e=t[0];return e.type===z.Human||e.type===z.Tree||e.type===z.Flower||e.type===z.Cuboid||e.type===z.Foundation},qfo=()=>zs.slice().reduce((t,e,n,o)=>(t&&n%2!==0&&t.push({key:`${o[n-1]}-${o[n]}`,label:h.jsxs(an,{stayAfterClick:!0,noPadding:!0,children:[h.jsx(DHe,{monthIndex:n-1}),h.jsx(DHe,{monthIndex:n})]})}),t),[]),$fo=()=>{const t={lng:M.getState().language},e=M.getState().countAllElementsByType(!0),n=[];return Kfo()&&n.push({key:"ground-paste",label:h.jsx(nM,{})}),Jfo.forEach(({key:o,type:r,itemLabel:i,modalTitle:a})=>{const l=e[o];typeof l=="number"&&l>0&&n.push({key:`ground-remove-all-${r}s`,label:h.jsx(Xfo,{objectType:r,itemLabel:`${Y.t(i,t)} (${l})`,modalTitle:`${Y.t(a,t)} (${l})?`})})}),e.unlockedCount>0&&n.push({key:"lock-all-elements",label:h.jsx(EHe,{lock:!0,count:e.unlockedCount,label:Y.t("groundMenu.LockAllUnlockedElements",t)})}),e.lockedCount>0&&M.getState().elements.length>0&&n.push({key:"unlock-all-elements",label:h.jsx(EHe,{lock:!1,count:e.lockedCount,label:Y.t("groundMenu.UnlockAllLockedElements",t)})}),n.push({key:"image-on-ground",label:h.jsx(Bfo,{})}),n.push({key:"water-surface",label:h.jsx(Yfo,{})}),M.getState().viewState.waterSurface||n.push({key:"ground-color-submenu",label:h.jsx(an,{children:Y.t("word.Color",t)}),children:[{key:"ground-color-picker",label:h.jsx(Ofo,{}),style:{backgroundColor:"white"}}]}),n.push({key:"vegetation-submenu",label:h.jsx(an,{children:Y.t("groundMenu.Vegetation",t)}),children:[{key:"leaf-out-day",label:h.jsx(Vfo,{})},{key:"leaf-shed-day",label:h.jsx(_fo,{})}]}),n.push({key:"monthly-irradiance-loss-submenu",label:h.jsx(an,{children:Y.t("groundMenu.MonthlyIrradianceLoss",t)}),children:qfo()}),n.push({key:"ground-albedo",label:h.jsx(Gfo,{})}),{items:n}};var YE={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return .5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return t===0?0:Math.pow(1024,t-1)},Out:function(t){return t===1?1:1-Math.pow(2,-10*t)},InOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return t===0?0:t===1?1:-Math.pow(2,10*(t-1))*Math.sin((t-1.1)*5*Math.PI)},Out:function(t){return t===0?0:t===1?1:Math.pow(2,-10*t)*Math.sin((t-.1)*5*Math.PI)+1},InOut:function(t){return t===0?0:t===1?1:(t*=2,t<1?-.5*Math.pow(2,10*(t-1))*Math.sin((t-1.1)*5*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin((t-1.1)*5*Math.PI)+1)}},Back:{In:function(t){var e=1.70158;return t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-YE.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?YE.Bounce.In(t*2)*.5:YE.Bounce.Out(t*2-1)*.5+.5}}},KD;typeof self>"u"&&typeof process<"u"&&process.hrtime?KD=function(){var t=process.hrtime();return t[0]*1e3+t[1]/1e6}:typeof self<"u"&&self.performance!==void 0&&self.performance.now!==void 0?KD=self.performance.now.bind(self.performance):Date.now!==void 0?KD=Date.now:KD=function(){return new Date().getTime()};var FP=KD,Qfo=function(){function t(){this._tweens={},this._tweensAddedDuringUpdate={}}return t.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(n){return e._tweens[n]})},t.prototype.removeAll=function(){this._tweens={}},t.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},t.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},t.prototype.update=function(e,n){e===void 0&&(e=FP()),n===void 0&&(n=!1);var o=Object.keys(this._tweens);if(o.length===0)return!1;for(;o.length>0;){this._tweensAddedDuringUpdate={};for(var r=0;r1?i(t[n],t[n-1],n-o):i(t[r],t[r+1>n?n:r+1],o-r)},Bezier:function(t,e){for(var n=0,o=t.length-1,r=Math.pow,i=qD.Utils.Bernstein,a=0;a<=o;a++)n+=r(1-e,o-a)*r(e,a)*t[a]*i(o,a);return n},CatmullRom:function(t,e){var n=t.length-1,o=n*e,r=Math.floor(o),i=qD.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(r=Math.floor(o=n*(1+e))),i(t[(r-1+n)%n],t[r],t[(r+1)%n],t[(r+2)%n],o-r)):e<0?t[0]-(i(t[0],t[0],t[1],t[1],-o)-t[0]):e>1?t[n]-(i(t[n],t[n],t[n-1],t[n-1],o-n)-t[n]):i(t[r?r-1:0],t[r],t[n1;o--)n*=o;return t[e]=n,n}}(),CatmullRom:function(t,e,n,o,r){var i=(n-t)*.5,a=(o-e)*.5,l=r*r,s=r*l;return(2*e-2*n+i+a)*s+(-3*e+3*n-2*i-a)*l+i*r+e}}},Zfo=function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t}(),Trt=new Qfo,eho=function(){function t(e,n){n===void 0&&(n=Trt),this._object=e,this._group=n,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=YE.Linear.None,this._interpolationFunction=qD.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=Zfo.nextId(),this._isChainStopped=!1,this._goToEnd=!1}return t.prototype.getId=function(){return this._id},t.prototype.isPlaying=function(){return this._isPlaying},t.prototype.isPaused=function(){return this._isPaused},t.prototype.to=function(e,n){return this._valuesEnd=Object.create(e),n!==void 0&&(this._duration=n),this},t.prototype.duration=function(e){return this._duration=e,this},t.prototype.start=function(e){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e!==void 0?typeof e=="string"?FP()+parseFloat(e):e:FP(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},t.prototype._setupProperties=function(e,n,o,r){for(var i in o){var a=e[i],l=Array.isArray(a),s=l?"array":typeof a,c=!l&&Array.isArray(o[i]);if(!(s==="undefined"||s==="function")){if(c){var u=o[i];if(u.length===0)continue;u=u.map(this._handleRelativeValue.bind(this,a)),o[i]=[a].concat(u)}if((s==="object"||l)&&a&&!c){n[i]=l?[]:{};for(var d in a)n[i][d]=a[d];r[i]=l?[]:{},this._setupProperties(a,n[i],o[i],r[i])}else typeof n[i]>"u"&&(n[i]=a),l||(n[i]*=1),c?r[i]=o[i].slice().reverse():r[i]=n[i]||0}}},t.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},t.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},t.prototype.pause=function(e){return e===void 0&&(e=FP()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this),this)},t.prototype.resume=function(e){return e===void 0&&(e=FP()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},t.prototype.stopChainedTweens=function(){for(var e=0,n=this._chainedTweens.length;ei)return!1;n&&this.start(e)}if(this._goToEnd=!1,e1?1:r;var a=this._easingFunction(r);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,a),this._onUpdateCallback&&this._onUpdateCallback(this._object,r),r===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(o in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[o]=="string"&&(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(this._valuesEnd[o])),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var l=0,s=this._chainedTweens.length;l{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.id===r&&(l.type===z.Human||l.type===z.Tree||l.type===z.Flower)){const s=l;s.flip=i;break}})},o=r=>{const i=r.target.checked,a={name:`Flip ${t.type}`,timestamp:Date.now(),checked:i,selectedElementId:t.id,selectedElementType:z.Human,undo:()=>{n(t.id,!a.checked)},redo:()=>{n(t.id,a.checked)}};M.getState().addUndoable(a),n(t.id,i)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.flip,onChange:o,children:Y.t("peopleMenu.Flip",e)})})}),nho=be.memo(({human:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.type===z.Human&&l.id===r){l.observer=i;break}})},o=r=>{const i=r.target.checked,a={name:"Set Observer",timestamp:Date.now(),checked:i,selectedElementId:t.id,selectedElementType:z.Human,undo:()=>{n(t.id,!a.checked)},redo:()=>{n(t.id,a.checked)}};M.getState().addUndoable(a),n(t.id,i)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.observer,onChange:o,children:Y.t("peopleMenu.Observer",e)})})}),oho=be.memo(({human:t})=>{const e=$t(),[n,o]=m.useState(!1),r=m.useRef(0),i=m.useRef(-1),a=m.useRef(!0),l=m.useRef(!1);m.useEffect(()=>{if(l.current){if(a.current)return r.current=requestAnimationFrame(c),u(),()=>{cancelAnimationFrame(r.current)};a.current=!0}},[n]);const s=(f,p,g)=>{const A=kn.getState().orbitControlsRef;A!=null&&A.current&&(A.current.object.position.set(f,p,g),A.current.update(),M.getState().set(y=>{const S=y.viewState;S.cameraPosition=[f,p,g]}))},c=()=>{requestAnimationFrame(c);const f=Date.now();f-i.current>100&&(tho(),i.current=f)},u=()=>{if(!t)return;let f=t.cx,p=t.cy,g=t.cz+t.lz;const A=M.getState().getParent(t);if(A){const C=ye.absoluteHumanOrTreeCoordinates(f,p,g,A);f=C.x,p=C.y,g=C.z}const y=M.getState().cameraDirection.clone().normalize().multiplyScalar(.5);f+=y.x,p+=y.y;const S=[...M.getState().viewState.cameraPosition];new eho(S).to([f,p,g],1e3).easing(YE.Quadratic.In).onUpdate(C=>{s(C[0],C[1],C[2])}).onComplete(()=>{M.getState().selectNone()}).start()},d=()=>{o(!n),l.current=!0};return h.jsx(an,{onClick:d,children:Y.t("peopleMenu.ViewFromThisPerson",e)})}),rho=be.memo(({tree:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.type===z.Tree&&l.id===r){l.showModel=i;break}})},o=r=>{const i={name:"Show Tree Model",timestamp:Date.now(),checked:r,selectedElementId:t.id,selectedElementType:z.Tree,undo:()=>{n(t.id,!i.checked)},redo:()=>{n(t.id,i.checked)}};M.getState().addUndoable(i),n(t.id,r)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:(t==null?void 0:t.showModel)&&(t==null?void 0:t.type)===z.Tree,onChange:r=>o(r.target.checked),children:Y.t("treeMenu.ShowModel",e)})})}),iho=be.memo(({tree:t})=>{const e=M.getState().updateElementLxById,n=$t(),o=t.lx??1,r=i=>{if(i===null||i===o)return;const a={name:"Set Tree Spread",timestamp:Date.now(),oldValue:o,newValue:i,changedElementId:t.id,changedElementType:t.type,undo:()=>{e(a.changedElementId,a.oldValue)},redo:()=>{e(a.changedElementId,a.newValue)}};M.getState().addUndoable(a),e(t.id,i),M.getState().set(l=>{l.actionState.treeSpread=i})};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsxs(on,{style:{width:"100px"},children:[Y.t("treeMenu.Spread",n)+" ("+Y.t("word.MeterAbbreviation",n)+")",":"]}),h.jsx(Sn,{style:{width:"160px"},min:1,max:50,step:1,precision:1,value:o,onChange:r})]})}),aho=be.memo(({tree:t})=>{const e=M.getState().updateElementLzById,n=$t(),o=t.lz??1,r=i=>{if(i===null||i===o)return;const a={name:"Set Tree Height",timestamp:Date.now(),oldValue:o,newValue:i,changedElementId:t.id,changedElementType:t.type,undo:()=>{e(a.changedElementId,a.oldValue)},redo:()=>{e(a.changedElementId,a.newValue)}};M.getState().addUndoable(a),e(t.id,i),M.getState().set(l=>{l.actionState.treeHeight=i})};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsxs(on,{style:{width:"100px"},children:[Y.t("word.Height",n)+" ("+Y.t("word.MeterAbbreviation",n)+")",":"]}),h.jsx(Sn,{style:{width:"160px"},min:1,max:30,step:1,precision:1,value:o,onChange:r})]})}),{Option:Xa}=Uo,lho=be.memo(({human:t})=>{const e=M(pn),n=M(En),[o,r]=m.useState(!1),i=$t(),a=(l,s)=>{e(c=>{for(const u of c.elements)if(u.type===z.Human&&u.id===l){const d=u;d.name=s,d.lx=kp.fetchWidth(s),d.lz=kp.fetchHeight(s);break}})};return h.jsxs(Uo,{style:{width:"140px"},value:(t==null?void 0:t.name)??Vt.Jack,onChange:l=>{if(t){const s=t.name;if(s!==l){const c={name:"Change People",timestamp:Date.now(),oldValue:s,newValue:l,changedElementId:t.id,changedElementType:t.type,undo:()=>{a(c.changedElementId,c.oldValue)},redo:()=>{a(c.changedElementId,c.newValue)}};n(c),a(t.id,l),e(u=>{u.actionState.humanName=l}),r(!o)}}},children:[h.jsxs(Xa,{value:Vt.Jack,children:[h.jsx("img",{alt:Vt.Jack,src:Hje,height:20,style:{paddingRight:"21px"}})," ",Y.t("people.Jack",i)]},Vt.Jack),h.jsxs(Xa,{value:Vt.Jacob,children:[h.jsx("img",{alt:Vt.Jacob,src:Mje,height:20,style:{paddingRight:"16px"}})," ",Y.t("people.Jacob",i)]},Vt.Jacob),h.jsxs(Xa,{value:Vt.Jacqueline,children:[h.jsx("img",{alt:Vt.Jacqueline,src:Ije,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Jacqueline",i)]},Vt.Jacqueline),h.jsxs(Xa,{value:Vt.Jaah,children:[h.jsx("img",{alt:Vt.Jaah,src:Rje,height:20,style:{paddingRight:"19px"}})," ",Y.t("people.Jaah",i)]},Vt.Jaah),h.jsxs(Xa,{value:Vt.Jade,children:[h.jsx("img",{alt:Vt.Jade,src:zje,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Jade",i)]},Vt.Jade),h.jsxs(Xa,{value:Vt.Jamelia,children:[h.jsx("img",{alt:Vt.Jamelia,src:Dje,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Jamelia",i)]},Vt.Jamelia),h.jsxs(Xa,{value:Vt.James,children:[h.jsx("img",{alt:Vt.James,src:Eje,height:20,style:{paddingRight:"21px"}})," ",Y.t("people.James",i)]},Vt.James),h.jsxs(Xa,{value:Vt.Jane,children:[h.jsx("img",{alt:Vt.Jane,src:Fje,height:20,style:{paddingRight:"21px"}})," ",Y.t("people.Jane",i)]},Vt.Jane),h.jsxs(Xa,{value:Vt.Jaya,children:[h.jsx("img",{alt:Vt.Jaya,src:kje,height:20,style:{paddingRight:"19px"}})," ",Y.t("people.Jaya",i)]},Vt.Jaya),h.jsxs(Xa,{value:Vt.Jaye,children:[h.jsx("img",{alt:Vt.Jaye,src:Lje,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Jaye",i)]},Vt.Jaye),h.jsxs(Xa,{value:Vt.Jeanette,children:[h.jsx("img",{alt:Vt.Jeanette,src:Wje,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Jeanette",i)]},Vt.Jeanette),h.jsxs(Xa,{value:Vt.Jedi,children:[h.jsx("img",{alt:Vt.Jedi,src:Nje,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Jedi",i)]},Vt.Jedi),h.jsxs(Xa,{value:Vt.Jeff,children:[h.jsx("img",{alt:Vt.Jeff,src:Uje,height:20,style:{paddingRight:"19px"}})," ",Y.t("people.Jeff",i)]},Vt.Jeff),h.jsxs(Xa,{value:Vt.Jena,children:[h.jsx("img",{alt:Vt.Jena,src:jje,height:20,style:{paddingRight:"19px"}})," ",Y.t("people.Jena",i)]},Vt.Jena),h.jsxs(Xa,{value:Vt.Jennifer,children:[h.jsx("img",{alt:Vt.Jennifer,src:Bje,height:20,style:{paddingRight:"21px"}})," ",Y.t("people.Jennifer",i)]},Vt.Jennifer),h.jsxs(Xa,{value:Vt.Jess,children:[h.jsx("img",{alt:Vt.Jess,src:Yje,height:20,style:{paddingRight:"21px"}})," ",Y.t("people.Jess",i)]},Vt.Jess),h.jsxs(Xa,{value:Vt.Jett,children:[h.jsx("img",{alt:Vt.Jett,src:Oje,height:20,style:{paddingRight:"21px"}})," ",Y.t("people.Jett",i)]},Vt.Jett),h.jsxs(Xa,{value:Vt.Jill,children:[h.jsx("img",{alt:Vt.Jill,src:Vje,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Jill",i)]},Vt.Jill),h.jsxs(Xa,{value:Vt.Jiya,children:[h.jsx("img",{alt:Vt.Jiya,src:_je,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Jiya",i)]},Vt.Jiya),h.jsxs(Xa,{value:Vt.Joan,children:[h.jsx("img",{alt:Vt.Joan,src:Gje,height:20,style:{paddingRight:"8px"}})," ",Y.t("people.Joan",i)]},Vt.Joan),h.jsxs(Xa,{value:Vt.Jocelyn,children:[h.jsx("img",{alt:Vt.Jocelyn,src:Xje,height:20,style:{paddingRight:"23px"}})," ",Y.t("people.Jocelyn",i)]},Vt.Jocelyn),h.jsxs(Xa,{value:Vt.Joel,children:[h.jsx("img",{alt:Vt.Joel,src:Jje,height:20,style:{paddingRight:"7px"}})," ",Y.t("people.Joel",i)]},Vt.Joel),h.jsxs(Xa,{value:Vt.Joey,children:[h.jsx("img",{alt:Vt.Joey,src:Kje,height:20,style:{paddingRight:"22px"}})," ",Y.t("people.Joey",i)]},Vt.Joey),h.jsxs(Xa,{value:Vt.John,children:[h.jsx("img",{alt:Vt.John,src:qje,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.John",i)]},Vt.John),h.jsxs(Xa,{value:Vt.Jonathon,children:[h.jsx("img",{alt:Vt.Jonathon,src:$je,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Jonathon",i)]},Vt.Jonathon),h.jsxs(Xa,{value:Vt.Jose,children:[h.jsx("img",{alt:Vt.Jose,src:Qje,height:20,style:{paddingRight:"5px"}})," ",Y.t("people.Jose",i)]},Vt.Jose),h.jsxs(Xa,{value:Vt.Joseph,children:[h.jsx("img",{alt:Vt.Joseph,src:Zje,height:20,style:{paddingRight:"22px"}})," ",Y.t("people.Joseph",i)]},Vt.Joseph),h.jsxs(Xa,{value:Vt.Joshua,children:[h.jsx("img",{alt:Vt.Joshua,src:eBe,height:20,style:{paddingRight:"22px"}})," ",Y.t("people.Joshua",i)]},Vt.Joshua),h.jsxs(Xa,{value:Vt.Judd,children:[h.jsx("img",{alt:Vt.Judd,src:tBe,height:20,style:{paddingRight:"21px"}})," ",Y.t("people.Judd",i)]},Vt.Judd),h.jsxs(Xa,{value:Vt.Judy,children:[h.jsx("img",{alt:Vt.Judy,src:nBe,height:20,style:{paddingRight:"21px"}})," ",Y.t("people.Judy",i)]},Vt.Judy),h.jsxs(Xa,{value:Vt.Julia,children:[h.jsx("img",{alt:Vt.Julia,src:oBe,height:20,style:{paddingRight:"22px"}})," ",Y.t("people.Julia",i)]},Vt.Julia),h.jsxs(Xa,{value:Vt.Julio,children:[h.jsx("img",{alt:Vt.Julio,src:rBe,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Julio",i)]},Vt.Julio),h.jsxs(Xa,{value:Vt.Jumapili,children:[h.jsx("img",{alt:Vt.Jumapili,src:iBe,height:20,style:{paddingRight:"16px"}})," ",Y.t("people.Jumapili",i)]},Vt.Jumapili),h.jsxs(Xa,{value:Vt.June,children:[h.jsx("img",{alt:Vt.June,src:aBe,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.June",i)]},Vt.June),h.jsxs(Xa,{value:Vt.Juro,children:[h.jsx("img",{alt:Vt.Juro,src:lBe,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Juro",i)]},Vt.Juro),h.jsxs(Xa,{value:Vt.Justin,children:[h.jsx("img",{alt:Vt.Justin,src:sBe,height:20,style:{paddingRight:"20px"}})," ",Y.t("people.Justin",i)]},Vt.Justin)]})}),sho=t=>{const e=[];if(t.type!==z.Human)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language},i=M.getState().viewState.orthographic??!1;return e.push({key:"human-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"human-cut",label:h.jsx(kd,{})}),e.push({key:"human-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&e.push({key:"human-flip",label:h.jsx(L9e,{billboardModel:n})}),i||e.push({key:"human-move-view",label:h.jsx(oho,{human:n})}),o&&(e.push({key:"human-obserber",label:h.jsx(nho,{human:n})}),e.push({key:"human-selection",label:h.jsxs(an,{stayAfterClick:!0,children:[h.jsxs(on,{style:{width:"120px"},children:[Y.t("peopleMenu.ChangePerson",r),": "]}),h.jsx(lho,{human:n})]})})),{items:e}},{Option:Zd}=Uo,cho=be.memo(({flower:t})=>{const e=M(pn),n=M(En),[o,r]=m.useState(!1),i=$t(),a=(l,s)=>{e(c=>{for(const u of c.elements)if(u.type===z.Flower&&u.id===l){const d=u;d.name=s,d.lx=A8.fetchSpread(s),d.lz=A8.fetchHeight(s);break}})};return h.jsxs(Uo,{style:{width:"200px"},value:(t==null?void 0:t.name)??ro.WhiteFlower,onChange:l=>{if(t){const s=t.name;if(s!==l){const c={name:"Change Flower",timestamp:Date.now(),oldValue:s,newValue:l,changedElementId:t.id,changedElementType:t.type,undo:()=>{a(c.changedElementId,c.oldValue)},redo:()=>{a(c.changedElementId,c.newValue)}};n(c),a(t.id,l),e(u=>{u.actionState.flowerType=l}),r(!o)}}},children:[h.jsxs(Zd,{value:ro.WhiteFlower,children:[h.jsx("img",{alt:ro.WhiteFlower,src:ABe,height:20,style:{paddingRight:"17px"}})," ",Y.t("flower.WhiteFlower",i)]},ro.WhiteFlower),h.jsxs(Zd,{value:ro.YellowFlower,children:[h.jsx("img",{alt:ro.YellowFlower,src:wBe,height:20,style:{paddingRight:"16px"}})," ",Y.t("flower.YellowFlower",i)]},ro.YellowFlower),h.jsxs(Zd,{value:ro.Hibiscus,children:[h.jsx("img",{alt:ro.Hibiscus,src:uBe,height:20,style:{paddingRight:"19px"}})," ",Y.t("flower.Hibiscus",i)]},ro.Hibiscus),h.jsxs(Zd,{value:ro.Hydrangea,children:[h.jsx("img",{alt:ro.Hydrangea,src:dBe,height:20,style:{paddingRight:"18px"}})," ",Y.t("flower.Hydrangea",i)]},ro.Hydrangea),h.jsxs(Zd,{value:ro.Spirea,children:[h.jsx("img",{alt:ro.Spirea,src:gBe,height:20,style:{paddingRight:"18px"}})," ",Y.t("flower.Spirea",i)]},ro.Spirea),h.jsxs(Zd,{value:ro.Hosta,children:[h.jsx("img",{alt:ro.Hosta,src:fBe,height:20,style:{paddingRight:"18px"}})," ",Y.t("flower.Hosta",i)]},ro.Hosta),h.jsxs(Zd,{value:ro.Peony,children:[h.jsx("img",{alt:ro.Peony,src:hBe,height:20,style:{paddingRight:"17px"}})," ",Y.t("flower.Peony",i)]},ro.Peony),h.jsxs(Zd,{value:ro.Boxwood,children:[h.jsx("img",{alt:ro.Boxwood,src:Gce,height:20,style:{paddingRight:"23px"}})," ",Y.t("flower.Boxwood",i)]},ro.Boxwood),h.jsxs(Zd,{value:ro.TallBush,children:[h.jsx("img",{alt:ro.TallBush,src:$ce,height:20,style:{paddingRight:"32px"}})," ",Y.t("flower.TallBush",i)]},ro.TallBush),h.jsxs(Zd,{value:ro.CactusCombo1,children:[h.jsx("img",{alt:ro.CactusCombo1,src:Xce,height:20,style:{paddingRight:"26px"}})," ",Y.t("flower.CactusCombo1",i)]},ro.CactusCombo1),h.jsxs(Zd,{value:ro.CactusCombo2,children:[h.jsx("img",{alt:ro.CactusCombo2,src:Jce,height:20,style:{paddingRight:"26px"}})," ",Y.t("flower.CactusCombo2",i)]},ro.CactusCombo2),h.jsxs(Zd,{value:ro.CactusCombo3,children:[h.jsx("img",{alt:ro.CactusCombo3,src:Kce,height:20,style:{paddingRight:"26px"}})," ",Y.t("flower.CactusCombo3",i)]},ro.CactusCombo3),h.jsxs(Zd,{value:ro.CactusCombo4,children:[h.jsx("img",{alt:ro.CactusCombo4,src:qce,height:20,style:{paddingRight:"26px"}})," ",Y.t("flower.CactusCombo4",i)]},ro.CactusCombo4),h.jsxs(Zd,{value:ro.RedRose,children:[h.jsx("img",{alt:ro.RedRose,src:pBe,height:20,style:{paddingRight:"26px"}})," ",Y.t("flower.RedRose",i)]},ro.RedRose),h.jsxs(Zd,{value:ro.Bellflower,children:[h.jsx("img",{alt:ro.Bellflower,src:cBe,height:20,style:{paddingRight:"20px"}})," ",Y.t("flower.Bellflower",i)]},ro.Bellflower),h.jsxs(Zd,{value:ro.Sunflower,children:[h.jsx("img",{alt:ro.Sunflower,src:mBe,height:20,style:{paddingRight:"32px"}})," ",Y.t("flower.Sunflower",i)]},ro.Sunflower),h.jsxs(Zd,{value:ro.Tulip,children:[h.jsx("img",{alt:ro.Tulip,src:yBe,height:20,style:{paddingRight:"24px"}})," ",Y.t("flower.Tulip",i)]},ro.Tulip)]})}),uho=t=>{const e=[];if(t.type!==z.Flower)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language};return e.push({key:"flower-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"flower-cut",label:h.jsx(kd,{})}),e.push({key:"flower-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&e.push({key:"flower-flip",label:h.jsx(L9e,{billboardModel:n})}),o&&e.push({key:"flower-change-type",label:h.jsxs(an,{stayAfterClick:!0,children:[h.jsxs(on,{style:{width:"60px"},children:[Y.t("flowerMenu.Type",r),": "]}),h.jsx(cho,{flower:n})]})}),{items:e}},dho=({polygon:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.type===z.Polygon&&l.id===r){l.filled=i;break}})},o=r=>{const i={name:"Fill Polygon",timestamp:Date.now(),checked:!t.filled,selectedElementId:t.id,selectedElementType:z.Polygon,undo:()=>{n(t.id,!i.checked)},redo:()=>{n(t.id,i.checked)}};M.getState().addUndoable(i),n(t.id,r.target.checked)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.filled,onChange:o,children:Y.t("polygonMenu.Filled",e)})})},fho=({polygon:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.type===z.Polygon&&l.id===r){l.shininess=i;break}})},o=r=>{const a={name:"Shiny Polygon",timestamp:Date.now(),checked:((t==null?void 0:t.shininess)??0)>0,selectedElementId:t.id,selectedElementType:z.Polygon,undo:()=>{n(t.id,a.checked?0:100)},redo:()=>{n(t.id,a.checked?100:0)}};M.getState().addUndoable(a),n(t.id,r.target.checked?100:0)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:!!t.shininess,onChange:o,children:Y.t("polygonMenu.Shiny",e)})})},hho=({polygon:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.type===z.Polygon&&l.id===r){l.noOutline=i;break}})},o=r=>{const i={name:"No Outline for Polygon",timestamp:Date.now(),checked:!t.noOutline,selectedElementId:t.id,selectedElementType:z.Polygon,undo:()=>{n(t.id,!i.checked)},redo:()=>{n(t.id,i.checked)}};M.getState().addUndoable(i),n(t.id,r.target.checked)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.noOutline,onChange:o,children:Y.t("polygonMenu.NoOutline",e)})})},pho=({polygon:t})=>{const e=$t(),[n,o]=m.useState((t==null?void 0:t.text)??""),r=(a,l)=>{M.getState().set(s=>{for(const c of s.elements)if(c.id===a){!c.locked&&c.type===z.Polygon&&(c.text=l);break}})},i=()=>{const a={name:"Set Text for Polygon",timestamp:Date.now(),oldValue:t.text??"",newValue:n,changedElementId:t.id,changedElementType:z.Polygon,undo:()=>{r(t.id,a.oldValue)},redo:()=>{r(t.id,a.newValue)}};M.getState().addUndoable(a),r(t.id,n)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(jl,{addonBefore:h.jsxs(hy,{width:"120px",children:[Y.t("word.Text",e),":"]}),value:n,onChange:a=>o(a.target.value),onPressEnter:i,onBlur:i})})},gho=({polygon:t})=>{const e=$t(),[n,o]=m.useState((t==null?void 0:t.fontSize)??1),r=(a,l)=>{M.getState().set(s=>{for(const c of s.elements)if(c.id===a){!c.locked&&c.type===z.Polygon&&(c.fontSize=l);break}})},i=()=>{const a={name:"Set Font Size for Polygon",timestamp:Date.now(),oldValue:t.fontSize??1,newValue:n,changedElementId:t.id,changedElementType:z.Polygon,undo:()=>{r(t.id,a.oldValue)},redo:()=>{r(t.id,a.newValue)}};M.getState().addUndoable(a),r(t.id,n)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Sn,{addonBefore:h.jsxs(hy,{width:"120px",children:[Y.t("word.FontSize",e),":"]}),min:.1,max:5,step:.01,precision:2,value:n,onChange:a=>o(a),onPressEnter:i,onBlur:i})})},mho=({polygon:t})=>{const e=$t(),[n,o]=m.useState((t==null?void 0:t.fontColor)??"black"),r=(a,l)=>{M.getState().set(s=>{for(const c of s.elements)if(c.id===a){!c.locked&&c.type===z.Polygon&&(c.fontColor=l);break}})},i=()=>{const a={name:"Set Font Color for Polygon",timestamp:Date.now(),oldValue:t.fontColor??"black",newValue:n,changedElementId:t.id,changedElementType:z.Polygon,undo:()=>{r(t.id,a.oldValue)},redo:()=>{r(t.id,a.newValue)}};M.getState().addUndoable(a),r(t.id,n)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(jl,{addonBefore:h.jsxs(hy,{width:"120px",children:[Y.t("word.FontColor",e),":"]}),value:n,onChange:a=>o(a.target.value),onPressEnter:i,onBlur:i})})},yho=({polygon:t})=>{const e=$t(),[n,o]=m.useState((t==null?void 0:t.fontOutlineColor)??"white"),r=(a,l)=>{M.getState().set(s=>{for(const c of s.elements)if(c.id===a){!c.locked&&c.type===z.Polygon&&(c.fontOutlineColor=l);break}})},i=()=>{const a={name:"Set Font Outline Color for Polygon",timestamp:Date.now(),oldValue:t.fontOutlineColor??"white",newValue:n,changedElementId:t.id,changedElementType:z.Polygon,undo:()=>{r(t.id,a.oldValue)},redo:()=>{r(t.id,a.newValue)}};M.getState().addUndoable(a),r(t.id,n)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(jl,{addonBefore:h.jsxs(hy,{width:"120px",children:[Y.t("polygonMenu.FontOutlineColor",e),":"]}),value:n,onChange:a=>o(a.target.value),onPressEnter:i,onBlur:i})})},Aho=({polygon:t})=>{const e=$t(),[n,o]=m.useState((t==null?void 0:t.fontOutlineWidth)??0),r=(a,l)=>{M.getState().set(s=>{for(const c of s.elements)if(c.id===a){!c.locked&&c.type===z.Polygon&&(c.fontOutlineWidth=l);break}})},i=()=>{const a={name:"Set Font Outline Width for Polygon",timestamp:Date.now(),oldValue:t.fontOutlineWidth??0,newValue:n,changedElementId:t.id,changedElementType:z.Polygon,undo:()=>{r(t.id,a.oldValue)},redo:()=>{r(t.id,a.newValue)}};M.getState().addUndoable(a),r(t.id,n)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Sn,{addonBefore:h.jsxs(hy,{width:"120px",children:[Y.t("polygonMenu.FontOutlineWidth",e),":"]}),min:0,max:1,step:.01,precision:2,value:n,onChange:a=>o(a),onPressEnter:i,onBlur:i})})},who=({polygon:t})=>{const e=$t(),[n,o]=m.useState((t==null?void 0:t.fontStrokeColor)??"black"),r=(a,l)=>{M.getState().set(s=>{for(const c of s.elements)if(c.id===a){!c.locked&&c.type===z.Polygon&&(c.fontStrokeColor=l);break}})},i=()=>{const a={name:"Set Font Stroke Color for Polygon",timestamp:Date.now(),oldValue:t.fontStrokeColor??"black",newValue:n,changedElementId:t.id,changedElementType:z.Polygon,undo:()=>{r(t.id,a.oldValue)},redo:()=>{r(t.id,a.newValue)}};M.getState().addUndoable(a),r(t.id,n)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(jl,{addonBefore:h.jsxs(hy,{width:"120px",children:[Y.t("polygonMenu.FontStrokeColor",e),":"]}),value:n,onChange:a=>o(a.target.value),onPressEnter:i,onBlur:i})})},vho=({polygon:t})=>{const e=$t(),[n,o]=m.useState((t==null?void 0:t.fontStrokeWidth)??0),r=(a,l)=>{M.getState().set(s=>{for(const c of s.elements)if(c.id===a){!c.locked&&c.type===z.Polygon&&(c.fontStrokeWidth=l);break}})},i=()=>{const a={name:"Set Font Stroke Width for Polygon",timestamp:Date.now(),oldValue:t.fontStrokeWidth??0,newValue:n,changedElementId:t.id,changedElementType:z.Polygon,undo:()=>{r(t.id,a.oldValue)},redo:()=>{r(t.id,a.newValue)}};M.getState().addUndoable(a),r(t.id,n)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Sn,{addonBefore:h.jsxs(hy,{width:"120px",children:[Y.t("polygonMenu.FontStrokeWidth",e),":"]}),min:0,max:1,step:.01,precision:2,value:n,onChange:a=>o(a),onPressEnter:i,onBlur:i})})},xho=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(Gr),r=M($wt),i=M(Qwt),a=M(Zwt),l=M(e7t),s=M(En),c=M(LH),u=M(WH),d=M(no),f=M(Qn),p=uo(z.Polygon),[g,A]=m.useState((p==null?void 0:p.lineColor)??"black"),y=$t(),S=x=>{u(x.target.value)},C=x=>{if(p){switch(c){case re.AllSelectedObjectsOfThisType:for(const b of e)if(b.type===z.Polygon&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&x!==b.lineColor)return!0;break;case re.AllObjectsOfThisType:for(const b of e)if(b.type===z.Polygon&&!b.locked&&x!==b.lineColor)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const b of e)if(b.type===z.Polygon&&b.parentId===p.parentId&&ye.isIdentical(b.normal,p.normal)&&!b.locked&&b.lineColor!==x)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const b of e)if(b.type===z.Polygon&&b.foundationId===(p==null?void 0:p.foundationId)&&!b.locked&&b.lineColor!==x)return!0;break;default:if(x!==(p==null?void 0:p.lineColor))return!0}return!1}},P=(x,b)=>{M.getState().set(R=>{for(const H of R.elements)H.type===z.Polygon&&!H.locked&&x.has(H.id)&&(H.lineColor=b)})},v=x=>{if(p&&C(x))switch(c){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of e)H.type===z.Polygon&&M.getState().selectedElementIdSet.has(H.id)&&b.set(H.id,H.lineColor??"black");const R={name:"Set Line Color for Selected Polygons",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{P(R.oldValues,R.newValue)}};s(R),P(b,x),f(d+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of e)H.type===z.Polygon&&b.set(H.id,H.lineColor??"black");const R={name:"Set Line Color for All Polygons",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{l(z.Polygon,R.newValue)}};s(R),l(z.Polygon,x),f(d+1);break}case re.AllObjectsOfThisTypeOnSurface:{if(o(p)){const R=new Map;for(const F of e)F.type===z.Polygon&&F.parentId===p.parentId&&ye.isIdentical(F.normal,p.normal)&&R.set(F.id,F.lineColor??"gray");const H={name:"Set Line Color for All Polygons on Same Surface",timestamp:Date.now(),oldValues:R,newValue:x,groupId:p.parentId,normal:p.normal,undo:()=>{for(const[F,E]of H.oldValues.entries())r(F,E)},redo:()=>{H.groupId&&i(z.Polygon,H.groupId,H.normal,H.newValue)}};s(H),i(z.Polygon,p.parentId,p.normal,x),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(p.foundationId){const b=new Map;for(const H of e)H.type===z.Polygon&&H.foundationId===p.foundationId&&b.set(H.id,H.lineColor??"black");const R={name:"Set Line Color for All Polygons Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:p.foundationId,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{R.groupId&&a(z.Polygon,R.groupId,R.newValue)}};s(R),a(z.Polygon,p.foundationId,x),f(d+1)}break}default:{const b=n(p.id),R=b?b.lineColor:p.lineColor,H={name:"Set Line Color of Selected Polygon",timestamp:Date.now(),oldValue:R,newValue:x,changedElementId:p.id,changedElementType:p.type,undo:()=>{r(H.changedElementId,H.oldValue)},redo:()=>{r(H.changedElementId,H.newValue)}};s(H),r(p.id,x),f(d+1);break}}},T=()=>{t(!1)},w=()=>{v(g)};return h.jsx(so,{width:600,title:Y.t("polygonMenu.LineColor",y),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:h.jsx(Ld,{color:g??(p==null?void 0:p.lineColor)??"black",onChangeComplete:x=>{A(x.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:12,children:h.jsx(Le.Group,{onChange:S,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("polygonMenu.OnlyThisPolygon",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("polygonMenu.AllPolygonsOnSurface",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("polygonMenu.AllPolygonsAboveFoundation",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("polygonMenu.AllSelectedPolygons",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("polygonMenu.AllPolygons",y)})]})})})]})})},bho=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(En),a=M(LH),l=M(WH),s=M(no),c=M(Qn),u=uo(z.Polygon),[d,f]=m.useState((u==null?void 0:u.lineStyle)??Xh.Solid),p=$t(),{Option:g}=Uo,A=(R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.Polygon&&E.id===R){E.lineStyle=H;break}})},y=(R,H,F)=>{e(E=>{for(const N of E.elements)N.type===z.Polygon&&N.parentId===R&&ye.isIdentical(N.normal,H)&&!N.locked&&(N.lineStyle=F)})},S=(R,H)=>{e(F=>{for(const E of F.elements)E.type===z.Polygon&&E.foundationId===R&&!E.locked&&(E.lineStyle=H)})},C=R=>{e(H=>{for(const F of H.elements)F.type===z.Polygon&&!F.locked&&(F.lineStyle=R)})},P=R=>{l(R.target.value)},v=R=>{if(u){switch(a){case re.AllSelectedObjectsOfThisType:for(const H of n)if(H.type===z.Polygon&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&R!==H.lineStyle)return!0;break;case re.AllObjectsOfThisType:for(const H of n)if(H.type===z.Polygon&&!H.locked&&R!==H.lineStyle)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const H of n)if(H.type===z.Polygon&&H.parentId===u.parentId&&ye.isIdentical(H.normal,u.normal)&&!H.locked&&R!==H.lineStyle)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const H of n)if(H.type===z.Polygon&&H.foundationId===(u==null?void 0:u.foundationId)&&!H.locked&&R!==H.lineStyle)return!0;break;default:if(R!==(u==null?void 0:u.lineStyle))return!0}return!1}},T=(R,H)=>{M.getState().set(F=>{for(const E of F.elements)E.type===z.Polygon&&!E.locked&&R.has(E.id)&&(E.lineStyle=H)})},w=R=>{if(u&&v(R))switch(a){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.Polygon&&M.getState().selectedElementIdSet.has(E.id)&&H.set(E.id,E.lineStyle??Xh.Solid);const F={name:"Set Line Style for Selected Polygons",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())A(E,N)},redo:()=>{T(F.oldValues,F.newValue)}};i(F),T(H,R),c(s+1);break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.Polygon&&H.set(E.id,E.lineStyle??Xh.Solid);const F={name:"Set Line Style for All Polygons",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())A(E,N)},redo:()=>{C(F.newValue)}};i(F),C(R),c(s+1);break}case re.AllObjectsOfThisTypeOnSurface:{if(r(u)){const F=new Map;for(const N of n)N.type===z.Polygon&&N.parentId===u.parentId&&ye.isIdentical(N.normal,u.normal)&&F.set(N.id,N.lineStyle??Xh.Solid);const E={name:"Set Line Style for All Polygons on Same Surface",timestamp:Date.now(),oldValues:F,newValue:R,groupId:u.parentId,normal:u.normal,undo:()=>{for(const[N,U]of E.oldValues.entries())A(N,U)},redo:()=>{E.groupId&&y(E.groupId,E.normal,E.newValue)}};i(E),y(u.parentId,u.normal,R),c(s+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const H=new Map;for(const E of n)E.type===z.Polygon&&E.foundationId===u.foundationId&&H.set(E.id,E.lineStyle??Xh.Solid);const F={name:"Set Line Style for All Polygons Above Foundation",timestamp:Date.now(),oldValues:H,newValue:R,groupId:u.foundationId,undo:()=>{for(const[E,N]of F.oldValues.entries())A(E,N)},redo:()=>{F.groupId&&S(F.groupId,F.newValue)}};i(F),S(u.foundationId,R),c(s+1)}break}default:{const H=o(u.id),F=H?H.lineStyle:u.lineStyle,E={name:"Set Line Style of Selected Polygon",timestamp:Date.now(),oldValue:F,newValue:R,changedElementId:u.id,changedElementType:u.type,undo:()=>{A(E.changedElementId,E.oldValue)},redo:()=>{A(E.changedElementId,E.newValue)}};i(E),A(u.id,R),c(s+1);break}}},x=()=>{t(!1)},b=()=>{w(d)};return h.jsx(so,{width:600,title:Y.t("polygonMenu.LineStyle",p),onApply:b,onClose:x,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:10,children:h.jsxs(Uo,{style:{width:"200px"},value:d,onChange:R=>f(R),children:[h.jsxs(g,{value:Xh.Solid,children:[h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"12px",width:"48px",height:"1px",border:"1px solid dimGray"},children:" "}),Y.t("polygonMenu.SolidLine",p)]},Xh.Solid),h.jsxs(g,{value:Xh.Dashed,children:[h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"12px",width:"48px",height:"1px",border:"1px dashed dimGray"},children:" "}),Y.t("polygonMenu.DashedLine",p)]},Xh.Dashed),h.jsxs(g,{value:Xh.Dotted,children:[h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"12px",width:"48px",height:"1px",border:"1px dotted dimGray"},children:" "}),Y.t("polygonMenu.DottedLine",p)]},Xh.Dotted)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:14,children:h.jsx(Le.Group,{onChange:P,value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("polygonMenu.OnlyThisPolygon",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("polygonMenu.AllPolygonsOnSurface",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("polygonMenu.AllPolygonsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("polygonMenu.AllSelectedPolygons",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("polygonMenu.AllPolygons",p)})]})})})]})})},Sho=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(Gr),r=M(t7t),i=M(n7t),a=M(o7t),l=M(r7t),s=M(En),c=M(LH),u=M(WH),d=M(no),f=M(Qn),p=uo(z.Polygon),[g,A]=m.useState((p==null?void 0:p.lineWidth)??1),y=$t(),{Option:S}=Uo,C=b=>{u(b.target.value)},P=b=>{if(p){switch(c){case re.AllSelectedObjectsOfThisType:for(const R of e)if(R.type===z.Polygon&&!R.locked&&M.getState().selectedElementIdSet.has(R.id)&&b!==R.lineWidth)return!0;break;case re.AllObjectsOfThisType:for(const R of e)if(R.type===z.Polygon&&!R.locked&&b!==R.lineWidth)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const R of e)if(R.type===z.Polygon&&R.parentId===p.parentId&&ye.isIdentical(R.normal,p.normal)&&!R.locked&&R.lineWidth!==b)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const R of e)if(R.type===z.Polygon&&R.foundationId===(p==null?void 0:p.foundationId)&&!R.locked&&R.lineWidth!==b)return!0;break;default:if(b!==(p==null?void 0:p.lineWidth))return!0}return!1}},v=(b,R)=>{M.getState().set(H=>{for(const F of H.elements)F.type===z.Polygon&&!F.locked&&b.has(F.id)&&(F.lineWidth=R)})},T=b=>{if(p&&P(b))switch(c){case re.AllSelectedObjectsOfThisType:{const R=new Map;for(const F of e)F.type===z.Polygon&&M.getState().selectedElementIdSet.has(F.id)&&R.set(F.id,F.lineWidth??1);const H={name:"Set Line Width for Selected Polygons",timestamp:Date.now(),oldValues:R,newValue:b,undo:()=>{for(const[F,E]of H.oldValues.entries())r(F,E)},redo:()=>{v(H.oldValues,H.newValue)}};s(H),v(R,b),f(d+1);break}case re.AllObjectsOfThisType:{const R=new Map;for(const F of e)F.type===z.Polygon&&R.set(F.id,F.lineWidth??1);const H={name:"Set Line Width for All Polygons",timestamp:Date.now(),oldValues:R,newValue:b,undo:()=>{for(const[F,E]of H.oldValues.entries())r(F,E)},redo:()=>{l(z.Polygon,H.newValue)}};s(H),l(z.Polygon,b),f(d+1);break}case re.AllObjectsOfThisTypeOnSurface:{if(o(p)){const H=new Map;for(const E of e)E.type===z.Polygon&&E.parentId===p.parentId&&ye.isIdentical(E.normal,p.normal)&&H.set(E.id,E.lineWidth??1);const F={name:"Set Line Width for All Polygons on Same Surface",timestamp:Date.now(),oldValues:H,newValue:b,groupId:p.parentId,normal:p.normal,undo:()=>{for(const[E,N]of F.oldValues.entries())r(E,N)},redo:()=>{F.groupId&&i(z.Polygon,F.groupId,F.normal,F.newValue)}};s(F),i(z.Polygon,p.parentId,p.normal,b),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(p.foundationId){const R=new Map;for(const F of e)F.type===z.Polygon&&F.foundationId===p.foundationId&&R.set(F.id,F.lineWidth??1);const H={name:"Set Line Width for All Polygons Above Foundation",timestamp:Date.now(),oldValues:R,newValue:b,groupId:p.foundationId,undo:()=>{for(const[F,E]of H.oldValues.entries())r(F,E)},redo:()=>{H.groupId&&a(z.Polygon,H.groupId,H.newValue)}};s(H),a(z.Polygon,p.foundationId,b),f(d+1)}break}default:{const R=n(p.id),H=R?R.lineWidth:p.lineWidth,F={name:"Set Line Width of Selected Polygon",timestamp:Date.now(),oldValue:H,newValue:b,changedElementId:p.id,changedElementType:p.type,undo:()=>{r(F.changedElementId,F.oldValue)},redo:()=>{r(F.changedElementId,F.newValue)}};s(F),r(p.id,b),f(d+1);break}}},w=()=>{t(!1)},x=()=>{T(g),t(!1),f(0)};return h.jsx(so,{width:560,title:Y.t("polygonMenu.LineWidth",y),onApply:x,onClose:w,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:10,children:h.jsxs(Uo,{style:{width:"200px"},value:g,onChange:b=>A(b),children:[h.jsx(S,{value:$y.One,children:h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"24px",width:"100%",height:"1px",border:"1px solid dimGray"}})},$y.One),h.jsx(S,{value:$y.Two,children:h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"24px",width:"100%",height:"1px",border:"2px solid dimGray"}})},$y.Two),h.jsx(S,{value:$y.Three,children:h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"24px",width:"100%",height:"1px",border:"3px solid dimGray"}})},$y.Three),h.jsx(S,{value:$y.Four,children:h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"24px",width:"100%",height:"1px",border:"4px solid dimGray"}})},$y.Four),h.jsx(S,{value:$y.Five,children:h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"24px",width:"100%",height:"1px",border:"5px solid dimGray"}})},$y.Five)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:14,children:h.jsx(Le.Group,{onChange:C,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("polygonMenu.OnlyThisPolygon",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("polygonMenu.AllPolygonsOnSurface",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("polygonMenu.AllPolygonsAboveFoundation",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("polygonMenu.AllSelectedPolygons",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("polygonMenu.AllPolygons",y)})]})})})]})})},Tho=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(Gr),r=M(dYe),i=M(Kwt),a=M(qwt),l=M(fYe),s=M(En),c=M(LH),u=M(WH),d=M(no),f=M(Qn),p=uo(z.Polygon),[g,A]=m.useState((p==null?void 0:p.color)??"gray"),y=$t(),S=x=>{u(x.target.value)},C=x=>{if(p){switch(c){case re.AllSelectedObjectsOfThisType:for(const b of e)if(b.type===z.Polygon&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&x!==b.color)return!0;break;case re.AllObjectsOfThisType:for(const b of e)if(b.type===z.Polygon&&!b.locked&&x!==b.color)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const b of e)if(b.type===z.Polygon&&b.foundationId===p.foundationId&&!b.locked&&b.color!==x)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const b of e)if(b.type===z.Polygon&&b.parentId===p.parentId&&ye.isIdentical(b.normal,p.normal)&&!b.locked&&b.color!==x)return!0;break;default:if(x!==p.color)return!0}return!1}},P=(x,b)=>{M.getState().set(R=>{for(const H of R.elements)H.type===z.Polygon&&!H.locked&&x.has(H.id)&&(H.color=b)})},v=x=>{if(p&&C(x))switch(c){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of e)H.type===z.Polygon&&M.getState().selectedElementIdSet.has(H.id)&&b.set(H.id,H.color??"gray");const R={name:"Set Fill Color for Selected Polygons",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{P(R.oldValues,R.newValue)}};s(R),P(b,x),f(d+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of e)H.type===z.Polygon&&b.set(H.id,H.color??"gray");const R={name:"Set Fill Color for All Polygons",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{l(z.Polygon,R.newValue)}};s(R),l(z.Polygon,x),f(d+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(p.foundationId){const b=new Map;for(const H of e)H.type===z.Polygon&&H.foundationId===p.foundationId&&b.set(H.id,H.color??"gray");const R={name:"Set Fill Color for All Polygons Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:p.foundationId,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{R.groupId&&a(z.Polygon,R.groupId,R.newValue)}};s(R),a(z.Polygon,p.foundationId,x),f(d+1)}break}case re.AllObjectsOfThisTypeOnSurface:{if(o(p)){const R=new Map;for(const F of e)F.type===z.Polygon&&F.parentId===p.parentId&&ye.isIdentical(F.normal,p.normal)&&R.set(F.id,F.color??"gray");const H={name:"Set Fill Color for All Polygons on Same Surface",timestamp:Date.now(),oldValues:R,newValue:x,groupId:p.parentId,normal:p.normal,undo:()=>{for(const[F,E]of H.oldValues.entries())r(F,E)},redo:()=>{H.groupId&&i(z.Polygon,H.groupId,H.normal,H.newValue)}};s(H),i(z.Polygon,p.parentId,p.normal,x),f(d+1)}break}default:{const b=n(p.id),R=b?b.color:p.color,H={name:"Set Fill Color of Selected Polygon",timestamp:Date.now(),oldValue:R,newValue:x,changedElementId:p.id,changedElementType:p.type,undo:()=>{r(H.changedElementId,H.oldValue)},redo:()=>{r(H.changedElementId,H.newValue)}};s(H),r(p.id,x),f(d+1);break}}},T=()=>{t(!1)},w=()=>{v(g)};return h.jsx(so,{width:600,title:Y.t("polygonMenu.FillColor",y),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:h.jsx(Ld,{color:g??(p==null?void 0:p.color)??"gray",onChangeComplete:x=>{A(x.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:12,children:h.jsx(Le.Group,{onChange:S,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("polygonMenu.OnlyThisPolygon",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("polygonMenu.AllPolygonsOnSurface",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("polygonMenu.AllPolygonsAboveFoundation",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("polygonMenu.AllSelectedPolygons",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("polygonMenu.AllPolygons",y)})]})})})]})})},Pho="/aladdin/assets/polygon_08_menu-RpvWW3pg.png",Cho="/aladdin/assets/polygon_09_menu-CCH8lYni.png",Rho="/aladdin/assets/polygon_10_menu-BYFeRpsw.png",Hho=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(En),a=M(LH),l=M(WH),s=M(no),c=M(Qn),u=uo(z.Polygon),[d,f]=m.useState((u==null?void 0:u.textureType)??Kr.NoTexture),p=$t(),{Option:g}=Uo,A=(R,H)=>{e(F=>{for(const E of F.elements)if(E.id===R&&E.type===z.Polygon&&!E.locked){E.textureType=H;break}})},y=(R,H,F)=>{e(E=>{for(const N of E.elements)N.type===z.Polygon&&N.parentId===R&&ye.isIdentical(N.normal,H)&&!N.locked&&(N.textureType=F)})},S=(R,H)=>{e(F=>{for(const E of F.elements)E.type===z.Polygon&&E.foundationId===R&&!E.locked&&(E.textureType=H)})},C=R=>{e(H=>{for(const F of H.elements)F.type===z.Polygon&&!F.locked&&(F.textureType=R)})},P=R=>{l(R.target.value)},v=R=>{if(u){switch(a){case re.AllSelectedObjectsOfThisType:for(const H of n)if(H.type===z.Polygon&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&R!==H.textureType)return!0;break;case re.AllObjectsOfThisType:for(const H of n)if(H.type===z.Polygon&&!H.locked&&R!==H.textureType)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const H of n)if(H.type===z.Polygon&&H.parentId===u.parentId&&ye.isIdentical(H.normal,u.normal)&&!H.locked&&H.textureType!==R)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const H of n)if(H.type===z.Polygon&&H.foundationId===u.foundationId&&!H.locked&&H.textureType!==R)return!0;break;default:if(R!==(u==null?void 0:u.textureType))return!0}return!1}},T=(R,H)=>{M.getState().set(F=>{for(const E of F.elements)E.type===z.Polygon&&!E.locked&&R.has(E.id)&&(E.textureType=H)})},w=R=>{if(u&&v(R))switch(a){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.Polygon&&M.getState().selectedElementIdSet.has(E.id)&&H.set(E.id,E.textureType??Kr.NoTexture);const F={name:"Set Texture for Selected Polygons",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())A(E,N)},redo:()=>{T(F.oldValues,F.newValue)}};i(F),T(H,R),c(s+1);break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.Polygon&&H.set(E.id,E.textureType??Kr.NoTexture);const F={name:"Set Texture for All Polygons",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())A(E,N)},redo:()=>{C(F.newValue)}};i(F),C(R),c(s+1);break}case re.AllObjectsOfThisTypeOnSurface:{if(r(u)){const F=new Map;for(const N of n)N.type===z.Polygon&&N.parentId===u.parentId&&ye.isIdentical(N.normal,u.normal)&&F.set(N.id,N.textureType??Kr.NoTexture);const E={name:"Set Texture for All Polygons on Same Surface",timestamp:Date.now(),oldValues:F,newValue:R,groupId:u.parentId,normal:u.normal,undo:()=>{for(const[N,U]of E.oldValues.entries())A(N,U)},redo:()=>{E.groupId&&y(E.groupId,E.normal,E.newValue)}};i(E),y(u.parentId,u.normal,R),c(s+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const H=new Map;for(const E of n)E.type===z.Polygon&&E.foundationId===u.foundationId&&H.set(E.id,E.textureType??Kr.NoTexture);const F={name:"Set Texture for All Polygons Above Foundation",timestamp:Date.now(),oldValues:H,newValue:R,groupId:u.foundationId,undo:()=>{for(const[E,N]of F.oldValues.entries())A(E,N)},redo:()=>{F.groupId&&S(F.groupId,F.newValue)}};i(F),S(u.foundationId,R),c(s+1)}break}default:{const H=o(u.id),F=H?H.textureType:u.textureType,E={name:"Set Texture of Selected Polygon",timestamp:Date.now(),oldValue:F,newValue:R,changedElementId:u.id,changedElementType:u.type,undo:()=>{A(E.changedElementId,E.oldValue)},redo:()=>{A(E.changedElementId,E.newValue)}};i(E),A(u.id,R),c(s+1);break}}},x=()=>{t(!1)},b=()=>{w(d)};return h.jsx(so,{width:500,title:Y.t("polygonMenu.FillTexture",p),onApply:b,onClose:x,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:10,children:h.jsxs(Uo,{style:{width:"150px"},value:d,onChange:R=>f(R),children:[h.jsxs(g,{value:Kr.NoTexture,children:[h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"12px",width:"32px",height:"20px",border:"1px dashed dimGray"},children:" "}),Y.t("shared.NoTexture",p)]},Kr.NoTexture),h.jsxs(g,{value:Kr.Texture01,children:[h.jsx("img",{alt:Kr.Texture01,src:Qnt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture01",p)]},Kr.Texture01),h.jsxs(g,{value:Kr.Texture02,children:[h.jsx("img",{alt:Kr.Texture02,src:Znt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture02",p)]},Kr.Texture02),h.jsxs(g,{value:Kr.Texture03,children:[h.jsx("img",{alt:Kr.Texture03,src:eot,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture03",p)]},Kr.Texture03),h.jsxs(g,{value:Kr.Texture04,children:[h.jsx("img",{alt:Kr.Texture04,src:tot,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture04",p)]},Kr.Texture04),h.jsxs(g,{value:Kr.Texture05,children:[h.jsx("img",{alt:Kr.Texture05,src:not,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture05",p)]},Kr.Texture05),h.jsxs(g,{value:Kr.Texture06,children:[h.jsx("img",{alt:Kr.Texture06,src:oot,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture06",p)]},Kr.Texture06),h.jsxs(g,{value:Kr.Texture07,children:[h.jsx("img",{alt:Kr.Texture07,src:rot,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture07",p)]},Kr.Texture07),h.jsxs(g,{value:Kr.Texture08,children:[h.jsx("img",{alt:Kr.Texture08,src:Pho,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture08",p)]},Kr.Texture08),h.jsxs(g,{value:Kr.Texture09,children:[h.jsx("img",{alt:Kr.Texture09,src:Cho,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture09",p)]},Kr.Texture09),h.jsxs(g,{value:Kr.Texture10,children:[h.jsx("img",{alt:Kr.Texture10,src:Rho,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("polygonMenu.Texture10",p)]},Kr.Texture10)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:14,children:h.jsx(Le.Group,{onChange:P,value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("polygonMenu.OnlyThisPolygon",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("polygonMenu.AllPolygonsOnSurface",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("polygonMenu.AllPolygonsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("polygonMenu.AllSelectedPolygons",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("polygonMenu.AllPolygons",p)})]})})})]})})},Mho=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(LH),r=M(WH),i=M(no),a=M(Qn),l=M(Jn),s=M(pn),c=uo(z.Polygon),[u,d]=m.useState((c==null?void 0:c.opacity)!==void 0?c.opacity:1),f=$t(),p=(v,T)=>{s(w=>{for(const x of w.elements)if(x.id===v){x.opacity=T;break}})},g=v=>{for(const[T,w]of v.entries())p(T,w)},A=(v,T)=>{for(const w of v.keys())p(w,T)},y=v=>{if(c){switch(o){case re.AllSelectedObjectsOfThisType:for(const T of e)if(T.type===z.Polygon&&v!==T.opacity&&!T.locked&&M.getState().selectedElementIdSet.has(T.id))return!0;break;case re.AllObjectsOfThisType:for(const T of e)if(T.type===z.Polygon&&v!==T.opacity&&!T.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const T of e)if(T.type===z.Polygon&&T.foundationId===c.foundationId&&v!==T.opacity&&!T.locked)return!0;break;case re.AllObjectsOfThisTypeOnSurface:for(const T of e)if(T.type===z.Polygon&&T.parentId===c.parentId&&ye.isIdentical(T.normal,c.normal)&&v!==T.opacity&&!T.locked)return!0;break;default:if(v!==(c==null?void 0:c.opacity))return!0;break}return!1}},S=v=>{if(c&&y(v))switch(o){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of e)if(x.type===z.Polygon&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)){const b=x;T.set(x.id,b.opacity),p(b.id,v)}const w={name:"Set Opacity for Selected Polygons",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{g(w.oldValues)},redo:()=>{A(w.oldValues,w.newValue)}};n(w),a(i+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of e)if(x.type===z.Polygon&&!x.locked){const b=x;T.set(x.id,b.opacity),p(b.id,v)}const w={name:"Set Opacity for All Polygons",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{g(w.oldValues)},redo:()=>{A(w.oldValues,w.newValue)}};n(w),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(c.foundationId){const T=new Map;for(const x of e)if(x.type===z.Polygon&&x.foundationId===c.foundationId&&!x.locked){const b=x;T.set(x.id,b.opacity),p(b.id,v)}const w={name:"Set Opacity for All Polygons Above Foundation",timestamp:Date.now(),oldValues:T,newValue:v,groupId:c.foundationId,undo:()=>{g(w.oldValues)},redo:()=>{A(w.oldValues,w.newValue)}};n(w),a(i+1)}break}case re.AllObjectsOfThisTypeOnSurface:{if(c.parentId){const T=new Map;for(const x of e)if(x.type===z.Polygon&&x.parentId===c.parentId&&ye.isIdentical(x.normal,c.normal)&&!x.locked){const b=x;T.set(x.id,b.opacity),p(b.id,v)}const w={name:"Set Opacity for All Polygons Above Foundation",timestamp:Date.now(),oldValues:T,newValue:v,groupId:c.foundationId,undo:()=>{g(w.oldValues)},redo:()=>{A(w.oldValues,w.newValue)}};n(w),a(i+1)}break}default:if(c){const T=l(c.id),w=T.opacity!==void 0?T.opacity:c.opacity!==void 0?c.opacity:1,x={name:"Set Polygon Opacity",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:c.id,changedElementType:c.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};n(x),p(c.id,v),a(i+1);break}}},C=()=>{t(!1)},P=()=>{S(u)};return h.jsx(so,{width:550,title:Y.t("polygonMenu.Opacity",f),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.1,precision:1,value:u,formatter:v=>Number(v).toFixed(1),onChange:v=>d(v)}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",f),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v=>r(v.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("polygonMenu.OnlyThisPolygon",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("polygonMenu.AllPolygonsOnSurface",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("polygonMenu.AllPolygonsAboveFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("polygonMenu.AllSelectedPolygons",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("polygonMenu.AllPolygons",f)})]})})})]})})};class qR{static create(e,n,o,r,i,a,l,s,c,u,d){if(n.type!==z.Foundation&&n.type!==z.Cuboid)throw new Error("base must be a foundation or cuboid");const f=[],p=ye.calculatePolygonBounds(e.vertices),g=(r===vr.portrait?o.length:o.width)*a;if(s===El.upDown){const A=Math.floor(((p.maxX()-p.minX())*n.lx-g)/l),y=p.minX()+g/(2*n.lx)+d/n.lx,S=l/n.lx,C=.5*Math.abs(Math.cos(i))*g/n.lx,P={x:0,y:-.5},v={x:0,y:.5},T=void 0;for(let w=0;w<=A;w++){const x=y+w*S;P.x=v.x=x-C;const b=ye.polygonIntersections(P,v,e.vertices).sort((F,E)=>F.y-E.y);P.x=v.x=x+C;const R=ye.polygonIntersections(P,v,e.vertices).sort((F,E)=>F.y-E.y),H=Math.max(b.length,R.length)/2;if(H>0)for(let F=0;FF.x-E.x);P.y=v.y=x+C;const R=ye.polygonIntersections(P,v,e.vertices).sort((F,E)=>F.x-E.x),H=Math.max(b.length,R.length)/2;if(H>0)for(let F=0;F0)return Va.makeSolarPanel(s,c,a*s.lx,(A+y)/2*s.ly,s.cz,vr.portrait,d,f,u,Qt,ko,i,void 0,S*s.ly,l)}static makeLeftRightSegment(e,n,o,r,i,a,l,s,c,u,d,f,p){const g=Math.abs(e.x-n.x)0)return Va.makeSolarPanel(s,c,(A+y)/2*s.lx,a*s.ly,s.cz,vr.portrait,d,f,u,0,ko,i,void 0,S*s.lx,l)}}class Iho{static create(e,n,o,r,i,a,l,s,c,u,d){if(n.type!==z.Foundation&&n.type!==z.Cuboid)throw new Error("base must be a foundation or cuboid");const f=[],p=!ye.isZero(n.rotation[2]),g=[];for(const P of e.vertices)g.push({x:P.x*n.lx+n.cx,y:P.y*n.ly+n.cy});const A=p?ye.rotatePolygon(g,n.cx,n.cy,n.rotation[2]):g,y=ye.calculatePolygonBounds(A),S=(r===vr.portrait?o.length:o.width)*a,C=.5*Math.abs(Math.cos(i))*S;if(s===El.eastWest){const P=y.maxY()-y.minY(),v=Math.floor((P-2*d-S)/l),T=y.minY()+S/2+d,w={x:y.minX(),y:0},x={x:y.maxX(),y:0};for(let b=0;b<=v;b++){const R=T+b*l;w.y=x.y=R-C;const H=ye.polygonIntersections(w,x,A).sort((N,U)=>N.x-U.x);w.y=x.y=R+C;const F=ye.polygonIntersections(w,x,A).sort((N,U)=>N.x-U.x),E=Math.max(H.length,F.length)/2;if(E>0)for(let N=0;N0){const $=ye.relativeCoordinates((B+O)/2,R,0,n),ie=Va.makeSolarPanel(n,o,$.x*n.lx,$.y*n.ly,n.cz,vr.portrait,c,u,i,-n.rotation[2],ko,[0,0,0],void 0,Q,S);ie.referenceId=e.id,ye.changeOrientation(ie,o,r),f.push(ie)}}}}else if(s===El.northSouth){const P=y.maxX()-y.minX(),v=Math.floor((P-2*d-S)/l),T=y.minX()+S/2+d,w={x:0,y:y.minY()},x={x:0,y:y.maxY()};for(let b=0;b<=v;b++){const R=T+b*l;w.x=x.x=R-C;const H=ye.polygonIntersections(w,x,A).sort((N,U)=>N.y-U.y);w.x=x.x=R+C;const F=ye.polygonIntersections(w,x,A).sort((N,U)=>N.y-U.y),E=Math.max(H.length,F.length)/2;if(E>0)for(let N=0;N0){const $=ye.relativeCoordinates(R,(V+G)/2,0,n),ie=Va.makeSolarPanel(n,o,$.x*n.lx,$.y*n.ly,n.cz,vr.portrait,c,u,i,-n.rotation[2]+Qt,ko,[0,0,0],void 0,Q,S);ie.referenceId=e.id,ye.changeOrientation(ie,o,r),f.push(ie)}}}}return f}}const{Option:nv}=Uo,zho=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M.getState().solarPanelArrayLayoutParams,r=M(Db),i=M(Gr),a=M(yW),l=M(DH),s=M(t5),c=M(Owt),u=M(m7t),d=M(Vge),f=M(g7t),p=M(En),g=M(no),A=M(Qn),y=M(Xi),[S,C]=m.useState(!1),[P,v]=m.useState(!1),[T,w]=m.useState(!1),[x,b]=m.useState({left:0,top:0,bottom:0,right:0}),R=m.useRef(null),H=m.useRef(!0),F=m.useRef(null),E=m.useRef(null),N=m.useRef(!1),U=m.useRef(M(x4t)),W=m.useRef(M(b4t)),k=m.useRef(M(M4t)),D=m.useRef(M(H4t)),L=m.useRef(M(S4t)),j=m.useRef(M(T4t)),B=m.useRef(M(P4t)??0),O=m.useRef(M(C4t)),V=m.useRef(M(R4t)),G=$t(),Q=s(U.current),$=r(),ie=m.useMemo(()=>({...l,...a}),[a,l]);m.useEffect(()=>{var ge;(ge=F.current)==null||ge.focus()},[]),m.useEffect(()=>{var ge;P&&((ge=E.current)==null||ge.focus())},[P]);const q=(ge,Se)=>{if(R.current){const{clientWidth:Re,clientHeight:De}=window.document.documentElement,Ae=R.current.getBoundingClientRect();b({left:-Ae.left+Se.x,right:Re-(Ae.right-Se.x),top:-Ae.top+Se.y,bottom:De-((Ae==null?void 0:Ae.bottom)-Se.y)})}},se=()=>{const ge=(k.current===vr.portrait?Q.length:Q.width)*L.current;return .5*(ge*Math.abs(Math.sin(D.current)))>O.current?(co(Y.t("message.SolarPanelsCannotIntersectWithGround",G)),!1):ge>j.current?(co(Y.t("message.SolarPanelsCannotOverlapWithOneAnother",G)),!1):!0},Z=ge=>{const Se=n.filter(Re=>Re.type===z.SolarPanel&&Re.parentId===ge.parentId);if(Se.length>0)for(const Re of Se)Re.referenceId!==ge.id&&ye.isPointInside(Re.cx,Re.cy,ge.vertices)&&c(Re.id,ge.id)},ee=()=>{if(($==null?void 0:$.type)===z.Polygon){const ge=i($);if(ge){const Se=[],De=W.current===El.eastWest||W.current===El.northSouth?Iho.create($,ge,Q,k.current,D.current,L.current,j.current,W.current,O.current,V.current,B.current):qR.create($,ge,Q,k.current,D.current,L.current,j.current,W.current,O.current,V.current,B.current);if(De.length>0){for(const ue of De)Se.push(JSON.parse(JSON.stringify(ue))),e(fe=>{fe.elements.push(ue)});const Ae={name:"Solar Panel Array Layout",timestamp:Date.now(),oldElements:M.getState().deletedElements,newElements:Se,oldParams:{pvModelName:o.pvModelName,rowAxis:o.rowAxis,orientation:o.orientation,tiltAngle:o.tiltAngle,rowsPerRack:o.rowsPerRack,interRowSpacing:o.interRowSpacing,poleHeight:o.poleHeight,poleSpacing:o.poleSpacing,margin:o.margin},newParams:{pvModelName:U.current,rowAxis:W.current,orientation:k.current,tiltAngle:D.current,rowsPerRack:L.current,interRowSpacing:j.current,poleHeight:O.current,poleSpacing:V.current,margin:B.current},referenceId:$.id,undo:()=>{d(Ae.referenceId,!1),Ae.oldElements.length>0&&e(ue=>{for(const fe of Ae.oldElements)ue.elements.push(fe)}),te(Ae.oldParams),oe()},redo:()=>{d(Ae.referenceId,!1),Ae.newElements.length>0&&e(ue=>{for(const fe of Ae.newElements)ue.elements.push(fe)}),te(Ae.newParams),oe()}};p(Ae),A(g+1)}}H.current=!1,oe()}},te=ge=>{U.current=ge.pvModelName,W.current=ge.rowAxis,k.current=ge.orientation,D.current=ge.tiltAngle,L.current=ge.rowsPerRack,j.current=ge.interRowSpacing,O.current=ge.poleHeight,V.current=ge.poleSpacing,B.current=ge.margin??0},oe=()=>{e(ge=>{ge.solarPanelArrayLayoutParams.pvModelName=U.current,ge.solarPanelArrayLayoutParams.rowAxis=W.current,ge.solarPanelArrayLayoutParams.orientation=k.current,ge.solarPanelArrayLayoutParams.tiltAngle=D.current,ge.solarPanelArrayLayoutParams.rowsPerRack=L.current,ge.solarPanelArrayLayoutParams.interRowSpacing=j.current,ge.solarPanelArrayLayoutParams.poleHeight=O.current,ge.solarPanelArrayLayoutParams.poleSpacing=V.current,ge.solarPanelArrayLayoutParams.margin=B.current})},de=()=>{H.current&&(se()?$&&(Z($),u($.id)>0?v(!0):(f(),ee())):co(Y.t("polygonMenu.LayoutNotAcceptedCheckYourParameters",G)))},he=()=>{de(),N.current=!1},pe=()=>{t(!1),y(),H.current=!0,N.current=!1},me=()=>{H.current?(de(),N.current=!0):t(!1)},le=()=>{v(!1)},Te=()=>{$&&(d($.id,!0),ee(),N.current&&(t(!1),A(0))),v(!1)};return h.jsxs(h.Fragment,{children:[P&&h.jsx(xi,{width:400,open:P,title:h.jsx("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>w(!0),onMouseOut:()=>w(!1),children:Y.t("word.Reminder",G)}),footer:[h.jsx(io,{onClick:le,children:Y.t("word.Cancel",G)},"Cancel"),h.jsx(io,{type:"primary",ref:E,onClick:Te,children:Y.t("word.OK",G)},"OK")],children:Y.t("message.ExistingSolarPanelsWillBeRemovedBeforeApplyingNewLayout",G)+" "+Y.t("message.DoYouWantToContinue",G)}),h.jsxs(xi,{width:640,open:!0,title:h.jsx("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>w(!0),onMouseOut:()=>w(!1),children:Y.t("polygonMenu.SolarPanelArrayLayoutParametricDesign",G)}),footer:[h.jsx(io,{disabled:!H.current,onClick:he,children:Y.t("word.Apply",G)},"Apply"),h.jsx(io,{onClick:pe,children:Y.t("word.Cancel",G)},"Cancel"),h.jsx(io,{type:"primary",ref:F,onClick:me,children:Y.t("word.OK",G)},"OK")],onCancel:()=>{t(!1),H.current=!0},maskClosable:!1,destroyOnClose:!1,modalRender:ge=>h.jsx(Bi,{disabled:!T,bounds:x,onStart:(Se,Re)=>q(Se,Re),children:h.jsx("div",{ref:R,children:ge})}),children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px",paddingTop:"10px"},children:[h.jsx(Ke,{span:13,children:Y.t("polygonMenu.SolarPanelArrayModel",G)+" ("+Object.keys(ie).length+" "+Y.t("word.Options",G)+"):"}),h.jsx(Ke,{span:11,children:h.jsx(Uo,{defaultValue:"Custom",style:{width:"100%"},value:U.current,onChange:ge=>{ge!==null&&(U.current=ge,H.current=!0,C(!S))},children:Object.keys(ie).map(ge=>h.jsx(nv,{value:ge,children:ge+(ie[ge].bifacialityFactor>0?" ("+Y.t("pvModelPanel.Bifacial",G)+")":"")},ge))})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("polygonMenu.SolarPanelArrayRowAxis",G)+":"}),h.jsx(Ke,{span:11,children:h.jsxs(Uo,{style:{width:"100%"},value:W.current,onChange:ge=>{ge!==null&&(W.current=ge,H.current=!0,C(!S))},children:[h.jsx(nv,{value:El.leftRight,children:Y.t("polygonMenu.SolarPanelArrayLeftRightRowAxis",G)},El.leftRight),h.jsx(nv,{value:El.upDown,children:Y.t("polygonMenu.SolarPanelArrayUpDownRowAxis",G)},El.upDown),h.jsx(nv,{value:El.eastWest,children:Y.t("polygonMenu.SolarPanelArrayEastWestRowAxis",G)},El.eastWest),h.jsx(nv,{value:El.northSouth,children:Y.t("polygonMenu.SolarPanelArrayNorthSouthRowAxis",G)},El.northSouth)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("polygonMenu.SolarPanelArrayOrientation",G)+":"}),h.jsx(Ke,{span:11,children:h.jsxs(Uo,{style:{width:"100%"},value:k.current,onChange:ge=>{ge!==null&&(k.current=ge,H.current=!0,C(!S))},children:[h.jsx(nv,{value:vr.portrait,children:Y.t("solarPanelMenu.Portrait",G)},vr.portrait),h.jsx(nv,{value:vr.landscape,children:Y.t("solarPanelMenu.Landscape",G)},vr.landscape)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("polygonMenu.SolarPanelArrayTiltAngle",G)+" ([-90°, 90°]): "}),h.jsx(Ke,{span:11,children:h.jsx(Sn,{min:-90,max:90,style:{width:"100%"},precision:2,value:parseFloat(ye.toDegrees(D.current).toFixed(2)),step:1,formatter:ge=>`${ge}°`,onChange:ge=>{ge!==null&&(D.current=ye.toRadians(ge),H.current=!0,C(!S))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("polygonMenu.SolarPanelArrayRowWidth",G)+" ([1-100] "+Y.t("solarPanelMenu.Panels",G)+"): "}),h.jsx(Ke,{span:11,children:h.jsx(Sn,{min:1,max:100,step:1,style:{width:"100%"},precision:0,formatter:ge=>Number(ge).toFixed(0),value:L.current,onChange:ge=>{ge!==null&&(L.current=ge,H.current=!0,C(!S))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("polygonMenu.SolarPanelArrayInterRowSpacing",G)+" ([1, 20] "+Y.t("word.MeterAbbreviation",G)+"): "}),h.jsx(Ke,{span:11,children:h.jsx(Sn,{min:1,max:20,style:{width:"100%"},precision:2,value:j.current,step:.5,onChange:ge=>{ge!==null&&(j.current=ge,H.current=!0,C(!S))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("polygonMenu.SolarPanelArrayMargin",G)+" ([0, 5] "+Y.t("word.MeterAbbreviation",G)+"): "}),h.jsx(Ke,{span:11,children:h.jsx(Sn,{min:0,max:5,style:{width:"100%"},precision:1,value:B.current,step:.1,onChange:ge=>{ge!==null&&(B.current=ge,H.current=!0,C(!S))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("polygonMenu.SolarPanelArrayPoleHeight",G)+" ([0, 10] "+Y.t("word.MeterAbbreviation",G)+"): "}),h.jsx(Ke,{span:11,children:h.jsx(Sn,{min:0,max:10,style:{width:"100%"},precision:2,value:O.current,step:.1,onChange:ge=>{ge!==null&&(O.current=ge,H.current=!0,C(!S))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("polygonMenu.SolarPanelArrayPoleSpacing",G)+" ([2, 50] "+Y.t("word.MeterAbbreviation",G)+"): "}),h.jsx(Ke,{span:11,children:h.jsx(Sn,{min:2,max:50,style:{width:"100%"},precision:2,value:V.current,step:.5,onChange:ge=>{ge!==null&&(V.current=ge,H.current=!0,C(!S))}})})]})]})]})},{Option:Yh}=Uo,Dho=({setDialogVisible:t})=>{const e=M(pn),n=M(oa),o=M(m0),r=dt(n5),i=M(yW),a=M(DH),l=M(c3),s=M(Gr),c=M(s3),u=M(bA).geneticAlgorithmParams,d=M(c$),f=M(xxt),p=M(a$),[g,A]=m.useState(!1),[y,S]=m.useState(!1),[C,P]=m.useState({left:0,top:0,bottom:0,right:0}),v=m.useRef(null),T=m.useRef(u.objectiveFunctionType),w=m.useRef(u.selectionMethod),x=m.useRef(u.searchMethod),b=m.useRef(u.populationSize),R=m.useRef(u.maximumGenerations),H=m.useRef(u.mutationRate),F=m.useRef(u.selectionRate??.5),E=m.useRef(u.crossoverRate??.5),N=m.useRef(u.convergenceThreshold),U=m.useRef(u.localSearchRadius),W=m.useRef(d.minimumTiltAngle??-Qt),k=m.useRef(d.maximumTiltAngle??Qt),D=m.useRef(d.minimumRowsPerRack),L=m.useRef(d.maximumRowsPerRack),j=m.useRef(d.minimumInterRowSpacing),B=m.useRef(d.maximumInterRowSpacing),O=m.useRef(null),V=m.useMemo(()=>({...a,...i}),[i,a]);m.useEffect(()=>{var ge;(ge=O.current)==null||ge.focus()},[]);const G={lng:o},Q=m.useRef(d.rowAxis??El.leftRight),$=l?s(l):void 0,ie=$?c(z.SolarPanel,$.id):void 0,q=m.useRef(ie&&ie.length>0?ie[0].pvModelName:d.pvModelName??"CS6X-355P-FG"),se=m.useRef(ie&&ie.length>0?ie[0].orientation:d.orientation??vr.landscape),Z=m.useRef(ie&&ie.length>0?ie[0].poleHeight:d.poleHeight??1),ee=m.useRef(ie&&ie.length>0?ie[0].poleSpacing:d.poleSpacing??3),te=m.useRef(d.margin??0),oe=m.useRef(p.electricitySellingPrice),de=m.useRef(p.operationalCostPerUnit);m.useEffect(()=>{oe.current=p.electricitySellingPrice},[p.electricitySellingPrice]),m.useEffect(()=>{de.current=p.operationalCostPerUnit},[p.operationalCostPerUnit]);const he=(ge,Se)=>{if(v.current){const{clientWidth:Re,clientHeight:De}=window.document.documentElement,Ae=v.current.getBoundingClientRect();P({left:-Ae.left+Se.x,right:Re-(Ae.right-Se.x),top:-Ae.top+Se.y,bottom:De-((Ae==null?void 0:Ae.bottom)-Se.y)})}},pe=()=>{e(ge=>{ge.evolutionaryAlgorithmState.geneticAlgorithmParams.problem=Ri.SOLAR_PANEL_ARRAY,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.objectiveFunctionType=T.current,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.selectionMethod=w.current,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.searchMethod=x.current,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.populationSize=b.current,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.maximumGenerations=R.current,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.selectionRate=F.current,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.crossoverRate=E.current,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.mutationRate=H.current,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.convergenceThreshold=N.current,ge.evolutionaryAlgorithmState.geneticAlgorithmParams.localSearchRadius=U.current,ge.solarPanelArrayLayoutConstraints||(ge.solarPanelArrayLayoutConstraints=new mX),ge.solarPanelArrayLayoutConstraints.minimumRowsPerRack=D.current,ge.solarPanelArrayLayoutConstraints.maximumRowsPerRack=L.current,ge.solarPanelArrayLayoutConstraints.minimumTiltAngle=W.current,ge.solarPanelArrayLayoutConstraints.maximumTiltAngle=k.current,ge.solarPanelArrayLayoutConstraints.minimumInterRowSpacing=j.current,ge.solarPanelArrayLayoutConstraints.maximumInterRowSpacing=B.current,ge.solarPanelArrayLayoutConstraints.poleHeight=Z.current,ge.solarPanelArrayLayoutConstraints.poleSpacing=ee.current,ge.solarPanelArrayLayoutConstraints.pvModelName=q.current,ge.solarPanelArrayLayoutConstraints.rowAxis=Q.current,ge.solarPanelArrayLayoutConstraints.orientation=se.current,ge.solarPanelArrayLayoutConstraints.margin=te.current,ge.economicsParams.operationalCostPerUnit=de.current,ge.economicsParams.electricitySellingPrice=oe.current})},me=()=>{r||gn(le("message.EvolutionStarted",G)),pe(),setTimeout(()=>{dt.getState().set(ge=>{ge.runEvolution=!ge.runEvolution}),e(ge=>{ge.evolutionMethod=_s.GENETIC_ALGORITHM,n&&(ge.actionInfo={name:"Run Genetic Algorithm for Solar Panel Array Layout",timestamp:new Date().getTime(),details:{...M.getState().evolutionaryAlgorithmState.geneticAlgorithmParams,...M.getState().solarPanelArrayLayoutConstraints,...M.getState().economicsParams}})})},100)},{t:le}=Xl(),Te=[{key:"1",label:le("optimizationMenu.Parameters",G),children:h.jsxs(h.Fragment,{children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.Objective",G)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:T.current,style:{width:"100%"},value:T.current,onChange:ge=>{T.current=ge,A(!g)},children:[h.jsx(Yh,{value:Po.DAILY_TOTAL_OUTPUT,children:le("optimizationMenu.ObjectiveFunctionDailyTotalYield",G)},Po.DAILY_TOTAL_OUTPUT),h.jsx(Yh,{value:Po.YEARLY_TOTAL_OUTPUT,children:le("optimizationMenu.ObjectiveFunctionYearlyTotalYield",G)},Po.YEARLY_TOTAL_OUTPUT),h.jsx(Yh,{value:Po.DAILY_AVERAGE_OUTPUT,children:le("optimizationMenu.ObjectiveFunctionDailyMeanYield",G)},Po.DAILY_AVERAGE_OUTPUT),h.jsx(Yh,{value:Po.YEARLY_AVERAGE_OUTPUT,children:le("optimizationMenu.ObjectiveFunctionYearlyMeanYield",G)},Po.YEARLY_AVERAGE_OUTPUT),h.jsx(Yh,{value:Po.DAILY_PROFIT,children:le("optimizationMenu.ObjectiveFunctionDailyProfit",G)},Po.DAILY_PROFIT),h.jsx(Yh,{value:Po.YEARLY_PROFIT,children:le("optimizationMenu.ObjectiveFunctionYearlyProfit",G)},Po.YEARLY_PROFIT)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.GeneticAlgorithmSelectionMethod",G)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:w.current,style:{width:"100%"},value:w.current,onChange:ge=>{w.current=ge,A(!g)},children:[h.jsx(Yh,{value:Wm.ROULETTE_WHEEL,children:le("optimizationMenu.RouletteWheel",G)},Wm.ROULETTE_WHEEL),h.jsx(Yh,{value:Wm.TOURNAMENT,children:le("optimizationMenu.Tournament",G)},Wm.TOURNAMENT)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.PopulationSize",G)+" [10, 100]:"}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:10,max:100,style:{width:"100%"},precision:0,value:b.current,step:1,formatter:ge=>Number(ge).toFixed(0),onChange:ge=>{ge!==null&&(b.current=Number(ge),A(!g))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.MaximumGenerations",G)+" [5, 100]:"}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:5,max:100,step:1,style:{width:"100%"},precision:0,value:R.current,formatter:ge=>Number(ge).toFixed(0),onChange:ge=>{ge!==null&&(R.current=Number(ge),A(!g))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.SelectionRate",G)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:F.current,step:.01,onChange:ge=>{ge!==null&&(F.current=Number(ge),A(!g))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.CrossoverRate",G)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:E.current,step:.01,onChange:ge=>{ge!==null&&(E.current=Number(ge),A(!g))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.MutationRate",G)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:H.current,step:.01,onChange:ge=>{ge!==null&&(H.current=Number(ge),A(!g))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.ConvergenceThreshold",G)+" (0, 0.1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:.001,max:.1,style:{width:"100%"},precision:3,value:N.current,step:.001,onChange:ge=>{ge!==null&&(N.current=Number(ge),A(!g))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.SearchMethod",G)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:x.current,style:{width:"100%"},value:x.current,onChange:ge=>{x.current=Number(ge),A(!g)},children:[h.jsx(Yh,{value:ds.GLOBAL_SEARCH_UNIFORM_SELECTION,children:le("optimizationMenu.GlobalSearchUniformSelection",G)},ds.GLOBAL_SEARCH_UNIFORM_SELECTION),h.jsx(Yh,{value:ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION,children:le("optimizationMenu.LocalSearchRandomOptimization",G)},ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION)]})})]}),x.current===ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION&&h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.LocalSearchRadius",G)+" ([0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:U.current,step:.01,onChange:ge=>{ge!==null&&(U.current=Number(ge),A(!g))}})})]})]})},{key:"2",label:le("optimizationMenu.Variables",G),children:h.jsxs(h.Fragment,{children:[h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.TiltAngleRange",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{range:!0,onChange:ge=>{W.current=ye.toRadians(ge[0]),k.current=ye.toRadians(ge[1]),A(!g)},min:-90,max:90,defaultValue:[ye.toDegrees(W.current),ye.toDegrees(k.current)],marks:{"-90":{style:{fontSize:"10px"},label:"-90°"},"-45":{style:{fontSize:"10px"},label:"-45°"},0:{style:{fontSize:"10px"},label:"0°"},45:{style:{fontSize:"10px"},label:"45°"},90:{style:{fontSize:"10px"},label:"90°"}}})})]}),h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.RowsPerRackRange",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{range:!0,onChange:ge=>{D.current=ge[0],L.current=ge[1],A(!g)},min:1,max:9,defaultValue:[D.current,L.current],marks:{1:{style:{fontSize:"10px"},label:1},2:{style:{fontSize:"10px"},label:2},3:{style:{fontSize:"10px"},label:3},4:{style:{fontSize:"10px"},label:4},5:{style:{fontSize:"10px"},label:5},6:{style:{fontSize:"10px"},label:6},7:{style:{fontSize:"10px"},label:7},8:{style:{fontSize:"10px"},label:8},9:{style:{fontSize:"10px"},label:9}}})})]}),h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.InterRowSpacingRange",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{range:!0,onChange:ge=>{j.current=ge[0],B.current=ge[1],A(!g)},min:1,max:10,defaultValue:[j.current,B.current],marks:{1:{style:{fontSize:"10px"},label:"1m"},3:{style:{fontSize:"10px"},label:"3m"},5:{style:{fontSize:"10px"},label:"5m"},7:{style:{fontSize:"10px"},label:"7m"},9:{style:{fontSize:"10px"},label:"9m"}}})})]})]})},{key:"3",label:le("optimizationMenu.Constants",G),children:h.jsxs(h.Fragment,{children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"6px",paddingTop:"0px"},children:[h.jsx(Ke,{span:12,children:le("polygonMenu.SolarPanelArrayModel",G)+" ("+Object.keys(V).length+" "+le("word.Options",G)+"):"}),h.jsx(Ke,{span:12,children:h.jsx(Uo,{defaultValue:"Custom",style:{width:"100%"},value:q.current,onChange:ge=>{q.current=ge,A(!g)},children:Object.keys(V).map(ge=>h.jsx(Yh,{value:ge,children:ge+(V[ge].bifacialityFactor>0?" ("+le("pvModelPanel.Bifacial",G)+")":"")},ge))})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"6px",paddingTop:"8px"},children:[h.jsx(Ke,{span:12,children:le("polygonMenu.SolarPanelArrayRowAxis",G)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{style:{width:"100%"},value:Q.current,onChange:ge=>{Q.current=ge,A(!g)},children:[h.jsx(Yh,{value:El.leftRight,children:le("polygonMenu.SolarPanelArrayLeftRightRowAxis",G)},El.leftRight),h.jsx(Yh,{value:El.upDown,children:le("polygonMenu.SolarPanelArrayUpDownRowAxis",G)},El.upDown)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"6px",paddingTop:"8px"},children:[h.jsx(Ke,{span:12,children:le("polygonMenu.SolarPanelArrayOrientation",G)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{style:{width:"100%"},value:se.current,onChange:ge=>{se.current=ge,A(!g)},children:[h.jsx(Yh,{value:vr.portrait,children:le("solarPanelMenu.Portrait",G)},vr.portrait),h.jsx(Yh,{value:vr.landscape,children:le("solarPanelMenu.Landscape",G)},vr.landscape)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("polygonMenu.SolarPanelArrayMargin",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{te.current=ge,A(!g)},min:0,max:5,step:.1,defaultValue:te.current,marks:{0:{style:{fontSize:"10px"},label:"0m"},1:{style:{fontSize:"10px"},label:"1m"},2:{style:{fontSize:"10px"},label:"2m"},3:{style:{fontSize:"10px"},label:"3m"},4:{style:{fontSize:"10px"},label:"4m"},5:{style:{fontSize:"10px"},label:"5m"}}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("solarCollectorMenu.PoleHeight",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{Z.current=ge,A(!g)},min:0,max:10,step:.1,defaultValue:Z.current,marks:{0:{style:{fontSize:"10px"},label:"0m"},2:{style:{fontSize:"10px"},label:"2m"},4:{style:{fontSize:"10px"},label:"4m"},6:{style:{fontSize:"10px"},label:"6m"},8:{style:{fontSize:"10px"},label:"8m"},10:{style:{fontSize:"10px"},label:"10m"}}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("solarPanelMenu.PoleSpacing",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{ee.current=ge,A(!g)},min:2,max:10,step:.1,defaultValue:ee.current,marks:{2:{style:{fontSize:"10px"},label:"2m"},4:{style:{fontSize:"10px"},label:"4m"},6:{style:{fontSize:"10px"},label:"6m"},8:{style:{fontSize:"10px"},label:"8m"},10:{style:{fontSize:"10px"},label:"10m"}}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("economicsPanel.OperationalCostPerUnit",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{de.current=ge,A(!g)},min:.1,max:1,step:.01,defaultValue:de.current,marks:{.1:{style:{fontSize:"10px"},label:"10¢"},.3:{style:{fontSize:"10px"},label:"30¢"},.5:{style:{fontSize:"10px"},label:"50¢"},.7:{style:{fontSize:"10px"},label:"70¢"},.9:{style:{fontSize:"10px"},label:"90¢"}}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("economicsPanel.ElectricitySellingPrice",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{oe.current=ge,A(!g)},min:.1,max:1,step:.01,defaultValue:oe.current,marks:{.1:{style:{fontSize:"10px"},label:"10¢"},.3:{style:{fontSize:"10px"},label:"30¢"},.5:{style:{fontSize:"10px"},label:"50¢"},.7:{style:{fontSize:"10px"},label:"70¢"},.9:{style:{fontSize:"10px"},label:"90¢"}}})})]})]})}];return h.jsx(h.Fragment,{children:h.jsx(xi,{width:640,open:!0,title:h.jsx("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>S(!0),onMouseOut:()=>S(!1),children:le("optimizationMenu.SolarPanelArrayLayout",G)+": "+le("optimizationMenu.GeneticAlgorithmSettings",G)}),footer:[h.jsx(io,{onClick:()=>{t(!1)},children:le("word.Cancel",G)},"Cancel"),h.jsx(io,{type:"primary",ref:O,onClick:()=>{me(),t(!1)},children:le("word.Run",G)},"Run")],onCancel:()=>{t(!1)},maskClosable:!1,destroyOnClose:!1,modalRender:ge=>h.jsx(Bi,{disabled:!y,bounds:C,onStart:(Se,Re)=>he(Se,Re),children:h.jsx("div",{ref:v,children:ge})}),children:h.jsx(hQ,{defaultActiveKey:f,items:Te,type:"card",onChange:ge=>{e(Se=>{Se.geneticAlgorithmWizardSelectedTab=ge})}})})})},{Option:O1}=Uo,Eho=({setDialogVisible:t})=>{const e=M(pn),n=M(oa),o=M(m0),r=dt(n5),i=M(yW),a=M(DH),l=M(c3),s=M(Gr),c=M(s3),u=M(bA).particleSwarmOptimizationParams,d=M(c$),f=M(bxt),p=M(a$),[g,A]=m.useState(!1),[y,S]=m.useState(!1),[C,P]=m.useState({left:0,top:0,bottom:0,right:0}),v=m.useRef(null),T=m.useRef(u.objectiveFunctionType),w=m.useRef(u.searchMethod),x=m.useRef(u.swarmSize),b=m.useRef(u.maximumSteps),R=m.useRef(u.vmax??.01),H=m.useRef(u.inertia??.8),F=m.useRef(u.cognitiveCoefficient??.1),E=m.useRef(u.socialCoefficient??.1),N=m.useRef(u.convergenceThreshold),U=m.useRef(u.localSearchRadius),W=m.useRef(d.minimumTiltAngle??-Qt),k=m.useRef(d.maximumTiltAngle??Qt),D=m.useRef(d.minimumRowsPerRack),L=m.useRef(d.maximumRowsPerRack),j=m.useRef(d.minimumInterRowSpacing),B=m.useRef(d.maximumInterRowSpacing),O=m.useRef(null),V=m.useMemo(()=>({...a,...i}),[i,a]);m.useEffect(()=>{var ge;(ge=O.current)==null||ge.focus()},[]);const G={lng:o},Q=m.useRef(d.rowAxis??El.leftRight),$=l?s(l):void 0,ie=$?c(z.SolarPanel,$.id):void 0,q=m.useRef(ie&&ie.length>0?ie[0].pvModelName:d.pvModelName??"CS6X-355P-FG"),se=m.useRef(ie&&ie.length>0?ie[0].orientation:d.orientation??vr.landscape),Z=m.useRef(ie&&ie.length>0?ie[0].poleHeight:d.poleHeight??1),ee=m.useRef(ie&&ie.length>0?ie[0].poleSpacing:d.poleSpacing??3),te=m.useRef(d.margin??0),oe=m.useRef(p.electricitySellingPrice),de=m.useRef(p.operationalCostPerUnit);m.useEffect(()=>{oe.current=p.electricitySellingPrice},[p.electricitySellingPrice]),m.useEffect(()=>{de.current=p.operationalCostPerUnit},[p.operationalCostPerUnit]);const he=(ge,Se)=>{if(v.current){const{clientWidth:Re,clientHeight:De}=window.document.documentElement,Ae=v.current.getBoundingClientRect();P({left:-Ae.left+Se.x,right:Re-(Ae.right-Se.x),top:-Ae.top+Se.y,bottom:De-((Ae==null?void 0:Ae.bottom)-Se.y)})}},pe=()=>{e(ge=>{ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.problem=Ri.SOLAR_PANEL_ARRAY,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.objectiveFunctionType=T.current,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.searchMethod=w.current,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.swarmSize=x.current,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.maximumSteps=b.current,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.cognitiveCoefficient=F.current,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.socialCoefficient=E.current,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.vmax=R.current,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.inertia=H.current,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.convergenceThreshold=N.current,ge.evolutionaryAlgorithmState.particleSwarmOptimizationParams.localSearchRadius=U.current,ge.solarPanelArrayLayoutConstraints||(ge.solarPanelArrayLayoutConstraints=new mX),ge.solarPanelArrayLayoutConstraints.minimumRowsPerRack=D.current,ge.solarPanelArrayLayoutConstraints.maximumRowsPerRack=L.current,ge.solarPanelArrayLayoutConstraints.minimumTiltAngle=W.current,ge.solarPanelArrayLayoutConstraints.maximumTiltAngle=k.current,ge.solarPanelArrayLayoutConstraints.minimumInterRowSpacing=j.current,ge.solarPanelArrayLayoutConstraints.maximumInterRowSpacing=B.current,ge.solarPanelArrayLayoutConstraints.poleHeight=Z.current,ge.solarPanelArrayLayoutConstraints.poleSpacing=ee.current,ge.solarPanelArrayLayoutConstraints.pvModelName=q.current,ge.solarPanelArrayLayoutConstraints.rowAxis=Q.current,ge.solarPanelArrayLayoutConstraints.orientation=se.current,ge.solarPanelArrayLayoutConstraints.margin=te.current,ge.economicsParams.operationalCostPerUnit=de.current,ge.economicsParams.electricitySellingPrice=oe.current})},me=()=>{r||gn(le("message.EvolutionStarted",G)),pe(),setTimeout(()=>{dt.getState().set(ge=>{ge.runEvolution=!ge.runEvolution}),e(ge=>{ge.evolutionMethod=_s.PARTICLE_SWARM_OPTIMIZATION,n&&(ge.actionInfo={name:"Run Particle Swarm Optimization for Solar Panel Array Layout",timestamp:new Date().getTime(),details:{...M.getState().evolutionaryAlgorithmState.particleSwarmOptimizationParams,...M.getState().solarPanelArrayLayoutConstraints,...M.getState().economicsParams}})})},100)},{t:le}=Xl(),Te=[{key:"1",label:le("optimizationMenu.Parameters",G),children:h.jsxs(h.Fragment,{children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.Objective",G)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:T.current,style:{width:"100%"},value:T.current,onChange:ge=>{T.current=ge,A(!g)},children:[h.jsx(O1,{value:Po.DAILY_TOTAL_OUTPUT,children:le("optimizationMenu.ObjectiveFunctionDailyTotalYield",G)},Po.DAILY_TOTAL_OUTPUT),h.jsx(O1,{value:Po.YEARLY_TOTAL_OUTPUT,children:le("optimizationMenu.ObjectiveFunctionYearlyTotalYield",G)},Po.YEARLY_TOTAL_OUTPUT),h.jsx(O1,{value:Po.DAILY_AVERAGE_OUTPUT,children:le("optimizationMenu.ObjectiveFunctionDailyMeanYield",G)},Po.DAILY_AVERAGE_OUTPUT),h.jsx(O1,{value:Po.YEARLY_AVERAGE_OUTPUT,children:le("optimizationMenu.ObjectiveFunctionYearlyMeanYield",G)},Po.YEARLY_AVERAGE_OUTPUT),h.jsx(O1,{value:Po.DAILY_PROFIT,children:le("optimizationMenu.ObjectiveFunctionDailyProfit",G)},Po.DAILY_PROFIT),h.jsx(O1,{value:Po.YEARLY_PROFIT,children:le("optimizationMenu.ObjectiveFunctionYearlyProfit",G)},Po.YEARLY_PROFIT)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.SwarmSize",G)+" [10, 100]:"}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:10,max:100,style:{width:"100%"},precision:0,value:x.current,step:1,formatter:ge=>Number(ge).toFixed(0),onChange:ge=>{x.current=Number(ge),A(!g)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.MaximumSteps",G)+" [5, 100]:"}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:5,max:100,step:1,style:{width:"100%"},precision:0,value:b.current,formatter:ge=>Number(ge).toFixed(0),onChange:ge=>{b.current=Number(ge),A(!g)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.CognitiveCoefficient",G)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:F.current,step:.01,onChange:ge=>{F.current=Number(ge),A(!g)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.SocialCoefficient",G)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:E.current,step:.01,onChange:ge=>{E.current=Number(ge),A(!g)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.InertiaWeight",G)+" [0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:H.current,step:.01,onChange:ge=>{H.current=Number(ge),A(!g)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.MaximumVelocity",G)+" [0.001, 0.1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:.001,max:.1,style:{width:"100%"},precision:3,value:R.current,step:.001,onChange:ge=>{R.current=Number(ge),A(!g)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.ConvergenceThreshold",G)+" (0, 0.1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:.001,max:.1,style:{width:"100%"},precision:3,value:N.current,step:.001,onChange:ge=>{N.current=Number(ge),A(!g)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.SearchMethod",G)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{defaultValue:w.current,style:{width:"100%"},value:w.current,onChange:ge=>{w.current=Number(ge),A(!g)},children:[h.jsx(O1,{value:ds.GLOBAL_SEARCH_UNIFORM_SELECTION,children:le("optimizationMenu.GlobalSearchUniformSelection",G)},ds.GLOBAL_SEARCH_UNIFORM_SELECTION),h.jsx(O1,{value:ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION,children:le("optimizationMenu.LocalSearchRandomOptimization",G)},ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION)]})})]}),w.current===ds.LOCAL_SEARCH_RANDOM_OPTIMIZATION&&h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.LocalSearchRadius",G)+" ([0, 1]: "}),h.jsx(Ke,{span:12,children:h.jsx(Sn,{min:0,max:1,style:{width:"100%"},precision:2,value:U.current,step:.01,onChange:ge=>{U.current=Number(ge),A(!g)}})})]})]})},{key:"2",label:le("optimizationMenu.Variables",G),children:h.jsxs(h.Fragment,{children:[h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.TiltAngleRange",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{range:!0,onChange:ge=>{W.current=ye.toRadians(ge[0]),k.current=ye.toRadians(ge[1]),A(!g)},min:-90,max:90,defaultValue:[ye.toDegrees(W.current),ye.toDegrees(k.current)],marks:{"-90":{style:{fontSize:"10px"},label:"-90°"},"-45":{style:{fontSize:"10px"},label:"-45°"},0:{style:{fontSize:"10px"},label:"0°"},45:{style:{fontSize:"10px"},label:"45°"},90:{style:{fontSize:"10px"},label:"90°"}}})})]}),h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.RowsPerRackRange",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{range:!0,onChange:ge=>{D.current=ge[0],L.current=ge[1],A(!g)},min:1,max:9,defaultValue:[D.current,L.current],marks:{1:{style:{fontSize:"10px"},label:1},2:{style:{fontSize:"10px"},label:2},3:{style:{fontSize:"10px"},label:3},4:{style:{fontSize:"10px"},label:4},5:{style:{fontSize:"10px"},label:5},6:{style:{fontSize:"10px"},label:6},7:{style:{fontSize:"10px"},label:7},8:{style:{fontSize:"10px"},label:8},9:{style:{fontSize:"10px"},label:9}}})})]}),h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:12,children:le("optimizationMenu.InterRowSpacingRange",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{range:!0,onChange:ge=>{j.current=ge[0],B.current=ge[1],A(!g)},min:2,max:10,defaultValue:[j.current,B.current],marks:{2:{style:{fontSize:"10px"},label:"2m"},4:{style:{fontSize:"10px"},label:"4m"},6:{style:{fontSize:"10px"},label:"6m"},8:{style:{fontSize:"10px"},label:"8m"},10:{style:{fontSize:"10px"},label:"10m"}}})})]})]})},{key:"3",label:le("optimizationMenu.Constants",G),children:h.jsxs(h.Fragment,{children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"6px",paddingTop:"0px"},children:[h.jsx(Ke,{span:12,children:le("polygonMenu.SolarPanelArrayModel",G)+" ("+Object.keys(V).length+" "+le("word.Options",G)+"):"}),h.jsx(Ke,{span:12,children:h.jsx(Uo,{defaultValue:"Custom",style:{width:"100%"},value:q.current,onChange:ge=>{q.current=ge,A(!g)},children:Object.keys(V).map(ge=>h.jsx(O1,{value:ge,children:ge+(V[ge].bifacialityFactor>0?" ("+le("pvModelPanel.Bifacial",G)+")":"")},ge))})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"6px",paddingTop:"8px"},children:[h.jsx(Ke,{span:12,children:le("polygonMenu.SolarPanelArrayRowAxis",G)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{style:{width:"100%"},value:Q.current,onChange:ge=>{Q.current=ge,A(!g)},children:[h.jsx(O1,{value:El.leftRight,children:le("polygonMenu.SolarPanelArrayLeftRightRowAxis",G)},El.leftRight),h.jsx(O1,{value:El.upDown,children:le("polygonMenu.SolarPanelArrayUpDownRowAxis",G)},El.upDown)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"6px",paddingTop:"8px"},children:[h.jsx(Ke,{span:12,children:le("polygonMenu.SolarPanelArrayOrientation",G)+":"}),h.jsx(Ke,{span:12,children:h.jsxs(Uo,{style:{width:"100%"},value:se.current,onChange:ge=>{se.current=ge,A(!g)},children:[h.jsx(O1,{value:vr.portrait,children:le("solarPanelMenu.Portrait",G)},vr.portrait),h.jsx(O1,{value:vr.landscape,children:le("solarPanelMenu.Landscape",G)},vr.landscape)]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("polygonMenu.SolarPanelArrayMargin",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{te.current=ge,A(!g)},min:0,max:5,step:.1,defaultValue:te.current,marks:{0:{style:{fontSize:"10px"},label:"0m"},1:{style:{fontSize:"10px"},label:"1m"},2:{style:{fontSize:"10px"},label:"2m"},3:{style:{fontSize:"10px"},label:"3m"},4:{style:{fontSize:"10px"},label:"4m"},5:{style:{fontSize:"10px"},label:"5m"}}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("solarCollectorMenu.PoleHeight",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{Z.current=ge,A(!g)},min:0,max:10,step:.1,defaultValue:Z.current,marks:{0:{style:{fontSize:"10px"},label:"0m"},2:{style:{fontSize:"10px"},label:"2m"},4:{style:{fontSize:"10px"},label:"4m"},6:{style:{fontSize:"10px"},label:"6m"},8:{style:{fontSize:"10px"},label:"8m"},10:{style:{fontSize:"10px"},label:"10m"}}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("solarPanelMenu.PoleSpacing",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{ee.current=ge,A(!g)},min:2,max:10,step:.1,defaultValue:ee.current,marks:{2:{style:{fontSize:"10px"},label:"2m"},4:{style:{fontSize:"10px"},label:"4m"},6:{style:{fontSize:"10px"},label:"6m"},8:{style:{fontSize:"10px"},label:"8m"},10:{style:{fontSize:"10px"},label:"10m"}}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("economicsPanel.OperationalCostPerUnit",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{de.current=ge,A(!g)},min:.1,max:1,step:.01,defaultValue:de.current,marks:{.1:{style:{fontSize:"10px"},label:"10¢"},.3:{style:{fontSize:"10px"},label:"30¢"},.5:{style:{fontSize:"10px"},label:"50¢"},.7:{style:{fontSize:"10px"},label:"70¢"},.9:{style:{fontSize:"10px"},label:"90¢"}}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"0px",paddingTop:"12px"},children:[h.jsx(Ke,{span:12,children:le("economicsPanel.ElectricitySellingPrice",G)+":"}),h.jsx(Ke,{span:12,children:h.jsx(Iu,{style:{paddingBottom:0,paddingTop:0,marginTop:"16px",marginBottom:"16px"},onChange:ge=>{oe.current=ge,A(!g)},min:.1,max:1,step:.01,defaultValue:oe.current,marks:{.1:{style:{fontSize:"10px"},label:"10¢"},.3:{style:{fontSize:"10px"},label:"30¢"},.5:{style:{fontSize:"10px"},label:"50¢"},.7:{style:{fontSize:"10px"},label:"70¢"},.9:{style:{fontSize:"10px"},label:"90¢"}}})})]})]})}];return h.jsx(h.Fragment,{children:h.jsx(xi,{width:640,open:!0,title:h.jsx("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>S(!0),onMouseOut:()=>S(!1),children:le("optimizationMenu.SolarPanelArrayLayout",G)+": "+le("optimizationMenu.ParticleSwarmOptimizationSettings",G)}),footer:[h.jsx(io,{onClick:()=>{t(!1)},children:le("word.Cancel",G)},"Cancel"),h.jsx(io,{type:"primary",ref:O,onClick:()=>{me(),t(!1)},children:le("word.Run",G)},"Run")],onCancel:()=>{t(!1)},maskClosable:!1,destroyOnClose:!1,modalRender:ge=>h.jsx(Bi,{disabled:!y,bounds:C,onStart:(Se,Re)=>he(Se,Re),children:h.jsx("div",{ref:v,children:ge})}),children:h.jsx(hQ,{defaultActiveKey:f,items:Te,type:"card",onChange:ge=>{e(Se=>{Se.particleSwarmOptimizationWizardSelectedTab=ge})}})})})},Fho=t=>{const e=[];if(t.type!==z.Polygon)return{items:e};const n=t,o=M.getState().getParent(n),r={lng:M.getState().language},i=!n.locked;return e.push({key:"polygon-paste",label:h.jsx(nM,{})}),e.push({key:"polygon-copy",label:h.jsx(Fd,{})}),i&&e.push({key:"polygon-cut",label:h.jsx(kd,{})}),o&&(o.type===z.Foundation||o.type===z.Cuboid)&&e.push({key:"polygon-layout-submenu",label:h.jsx(an,{children:Y.t("polygonMenu.Layout",r)}),children:[{key:"solar-panel-layout-wizard",label:h.jsxs(eo,{noPadding:!0,Dialog:zho,children:[Y.t("polygonMenu.SolarPanelArrayLayoutParametricDesign",r)," ..."]})},{key:"solar-panel-layout-ai",label:h.jsx(an,{noPadding:!0,children:Y.t("polygonMenu.SolarPanelArrayLayoutGenerativeDesign",r)}),children:[{key:"solar-panel-layout-ga",label:h.jsxs(eo,{noPadding:!0,Dialog:Dho,children:[Y.t("optimizationMenu.GeneticAlgorithm",r)," ..."]})},{key:"solar-panel-layout-pso",label:h.jsxs(eo,{noPadding:!0,Dialog:Eho,children:[Y.t("optimizationMenu.ParticleSwarmOptimization",r)," ..."]})}]}]}),e.push({key:"polygon-lock",label:h.jsx(Ku,{selectedElement:n})}),i&&(e.push({key:"polygon-filled",label:h.jsx(dho,{polygon:n})}),n.filled&&e.push({key:"polygon-shiny",label:h.jsx(fho,{polygon:n})}),e.push({key:"polygon-no-outline",label:h.jsx(hho,{polygon:n})})),i&&(e.push({key:"polygon-line-color",label:h.jsxs(eo,{Dialog:xho,children:[Y.t("polygonMenu.LineColor",r)," ..."]})},{key:"polygon-line-style",label:h.jsxs(eo,{Dialog:bho,children:[Y.t("polygonMenu.LineStyle",r)," ..."]})},{key:"polygon-line-width",label:h.jsxs(eo,{Dialog:Sho,children:[Y.t("polygonMenu.LineWidth",r)," ..."]})}),n.filled&&((!n.textureType||n.textureType===Kr.NoTexture)&&e.push({key:"polygon-fill-color",label:h.jsxs(eo,{Dialog:Tho,children:[Y.t("polygonMenu.FillColor",r)," ..."]})}),e.push({key:"polygon-texture",label:h.jsxs(eo,{Dialog:Hho,children:[Y.t("polygonMenu.FillTexture",r)," ..."]})},{key:"polygon-opacity",label:h.jsxs(eo,{Dialog:Mho,children:[Y.t("polygonMenu.Opacity",r)," ..."]})})),e.push({key:"polygon-text-box",label:h.jsx(an,{children:Y.t("polygonMenu.TextBox",r)}),children:[{key:"polygon-text",label:h.jsx(pho,{polygon:n})},{key:"polygon-font-size",label:h.jsx(gho,{polygon:n})},{key:"polygon-font-color",label:h.jsx(mho,{polygon:n})},{key:"polygon-font-outline-color",label:h.jsx(yho,{polygon:n})},{key:"polygon-font-outline-width",label:h.jsx(Aho,{polygon:n})},{key:"polygon-font-stroke-color",label:h.jsx(who,{polygon:n})},{key:"polygon-font-stroke-width",label:h.jsx(vho,{polygon:n})}]})),{items:e}},kho=(t,e)=>{M.getState().set(n=>{for(const o of n.elements)if(o.type===z.Polygon&&o.id===t){o.vertices.splice(e,1);break}})},Lho=(t,e)=>{M.getState().set(n=>{for(const o of n.elements)if(o.type===z.Polygon&&o.id===t){const r=o,i=r.vertices.length;if(e>0&&e{M.getState().set(n=>{for(const o of n.elements)if(o.type===z.Polygon&&o.id===t){const r=o,i=r.vertices.length;if(e>=0&&e{if(t.selectedIndex>=0){const n=t.vertices.map(i=>({...i}));switch(e){case hx.Delete:kho(t.id,t.selectedIndex);break;case hx.InsertBeforeIndex:Lho(t.id,t.selectedIndex);break;case hx.InsertAfterIndex:Who(t.id,t.selectedIndex);break}const o=M.getState().getElementById(t.id).vertices.map(i=>({...i})),r={name:e,timestamp:Date.now(),changedElementId:t.id,changedElementType:t.type,oldValue:n,newValue:o,undo:()=>{r.oldValue&&Array.isArray(r.oldValue)&&M.getState().updatePolygonVerticesById(r.changedElementId,n)},redo:()=>{M.getState().updatePolygonVerticesById(r.changedElementId,o)}};M.getState().addUndoable(r)}},Nho=t=>{const e=[];if(t.type!==z.Polygon)return{items:e};const n=t,o={lng:M.getState().language};return e.push({key:"polygon-vertex-insert-before-index",label:h.jsx(an,{noPadding:!0,children:Y.t("polygonMenu.InsertVertexBeforeIndex",o)})},{key:"polygon-vertex-insert-after-index",label:h.jsx(an,{noPadding:!0,children:Y.t("polygonMenu.InsertVertexAfterIndex",o)})}),n.vertices.length>3&&e.push({key:"polygon-vertex-delete",label:h.jsx(an,{noPadding:!0,children:Y.t("polygonMenu.DeleteVertex",o)})}),{items:e,onClick:({key:i})=>{switch(i){case"polygon-vertex-insert-before-index":Vae(n,hx.InsertBeforeIndex);break;case"polygon-vertex-insert-after-index":Vae(n,hx.InsertAfterIndex);break;case"polygon-vertex-delete":Vae(n,hx.Delete);break}}}},Uho=({sensor:t})=>{const e=$t(),n=aot(t);return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:!!t.showLabel,onChange:n,children:Y.t("labelSubMenu.KeepShowingLabel",e)})})},jho=({sensor:t})=>{const e=$t(),{labelText:n,setLabelText:o}=iot(t),r=lot(t,n);return h.jsxs(an,{stayAfterClick:!0,children:[h.jsx(on,{style:{width:"80px"},children:Y.t("labelSubMenu.LabelText",e)+":"}),h.jsx(jl,{style:{width:"150px"},value:n,onChange:i=>o(i.target.value),onPressEnter:r,onBlur:r})]})},Bho=t=>{const e=[];if(t.type!==z.Sensor)return{items:e};const n=t,o=!n.locked;return e.push({key:"sensor-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"sensor-cut",label:h.jsx(kd,{})}),e.push({key:"sensor-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&(e.push({key:"sensor-show-label",label:h.jsx(Uho,{sensor:n})}),e.push({key:"sensor-label-text",label:h.jsx(jho,{sensor:n})})),{items:e}},Yho=({light:t})=>{const e=$t(),n=M.getState().updateInsideLightById,o=r=>{const i=r.target.checked,a={name:"Inside Light",timestamp:Date.now(),checked:i,undo:()=>{n(t.id,!a.checked)},redo:()=>{n(t.id,a.checked)}};M.getState().addUndoable(a),n(t.id,i)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.inside,onChange:o,children:Y.t("lightMenu.Inside",e)})})},Oho=({light:t})=>{const e=$t(),n=t.intensity??3,o=(i,a)=>{M.getState().set(l=>{for(const s of l.elements)if(s.type===z.Light&&s.id===i){s.intensity=a;break}})},r=i=>{if(i===null||i===n)return;const a={name:"Set Light Intensity",timestamp:Date.now(),oldValue:n,newValue:i,changedElementId:t.id,undo:()=>{o(a.changedElementId,a.oldValue)},redo:()=>{o(a.changedElementId,a.newValue)}};M.getState().addUndoable(a),o(t.id,i),M.getState().set(l=>{l.actionState.lightIntensity=i})};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsxs(on,{style:{width:"80px"},children:[Y.t("lightMenu.Intensity",e),":"]}),h.jsx(Sn,{min:.1,max:10,step:.1,precision:1,value:n,onChange:r})]})},Vho=({light:t})=>{const e=$t(),n=t.distance??5,o=(i,a)=>{M.getState().set(l=>{for(const s of l.elements)if(s.type===z.Light&&s.id===i){s.distance=a;break}})},r=i=>{if(i===null||i===n)return;const a={name:"Set Light Distance",timestamp:Date.now(),oldValue:n,newValue:i,changedElementId:t.id,undo:()=>{o(a.changedElementId,a.oldValue)},redo:()=>{o(a.changedElementId,a.newValue)}};M.getState().addUndoable(a),o(t.id,i),M.getState().set(l=>{l.actionState.lightDistance=i})};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsxs(on,{style:{width:"80px"},children:[Y.t("lightMenu.MaximumDistance",e),":"]}),h.jsx(Sn,{min:1,max:10,step:1,precision:1,value:n,onChange:r})]})},_ho=({light:t})=>{const e=t.color??"#ffff99",n=(o,r)=>{M.getState().set(i=>{for(const a of i.elements)if(a.type===z.Light&&a.id===o){a.color=r;break}})};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Ld,{color:e,onChangeComplete:o=>{const r=t.color,i=o.hex,a={name:"Set Light Color",timestamp:Date.now(),oldValue:r,newValue:i,undo:()=>{n(t.id,a.oldValue)},redo:()=>{n(t.id,a.newValue)}};M.getState().addUndoable(a),n(t.id,i),M.getState().set(l=>{l.actionState.lightColor=i})}})})},Gho=t=>{const e=[];if(t.type!==z.Light)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language},i=n.parentId?M.getState().getParent(n):void 0;return e.push({key:"light-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"light-cut",label:h.jsx(kd,{})}),e.push({key:"light-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&i&&(i.type===z.Roof||i.type===z.Wall)&&e.push({key:"light-inside",label:h.jsx(Yho,{light:n})}),o&&e.push({key:"light-intensity",label:h.jsx(Oho,{light:n})},{key:"light-distance",label:h.jsx(Vho,{light:n})},{key:"light-color",label:h.jsx(an,{children:Y.t("word.Color",r)}),children:[{key:"light-color-picker",label:h.jsx(_ho,{light:n}),style:{backgroundColor:"white"}}]}),{items:e}},Xho=()=>{const t=M(bge),e=$t(),n=r=>{M.getState().set(i=>{i.viewState.axes=r})},o=r=>{const i=r.target.checked,a={name:"Show Axes",timestamp:Date.now(),checked:i,undo:()=>{n(!a.checked)},redo:()=>{n(a.checked)}};M.getState().addUndoable(a),n(i)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t,onChange:o,children:Y.t("skyMenu.Axes",e)})})},Jho=()=>{const t=M(SBe),e=$t(),n=i=>{M.getState().set(a=>{a.viewState.theme=i})},o=i=>{const a=t,l=i.target.value,s={name:"Select Theme",timestamp:Date.now(),oldValue:a,newValue:l,undo:()=>{n(s.oldValue)},redo:()=>{n(s.newValue)}};M.getState().addUndoable(s),n(l)},r=[{value:Os.Default,label:"skyMenu.ThemeDefault"},{value:Os.Desert,label:"skyMenu.ThemeDesert"},{value:Os.Dune,label:"skyMenu.ThemeDune"},{value:Os.Forest,label:"skyMenu.ThemeForest"},{value:Os.Grassland,label:"skyMenu.ThemeGrassland"},{value:Os.Hill,label:"skyMenu.ThemeHill"},{value:Os.Lake,label:"skyMenu.ThemeLake"},{value:Os.Mountain,label:"skyMenu.ThemeMountain"},{value:Os.Rural,label:"skyMenu.ThemeRural"}];return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Le.Group,{value:t,onChange:o,children:h.jsx(on,{direction:"vertical",children:r.map((i,a)=>h.jsx(Le,{style:{width:"100%"},value:i.value,children:Y.t(i.label,e)},`${a}-${i.value}`))})})})},Kho=()=>{const t=M(TBe)??!0,e=$t(),n=r=>{M.getState().set(i=>{i.viewState.showAzimuthAngle=r})},o=r=>{const i=t,a=r.target.checked,l={name:"Show Azimuth Angle "+a,timestamp:Date.now(),oldValue:i,newValue:a,undo:()=>{n(l.oldValue)},redo:()=>{n(l.newValue)}};M.getState().addUndoable(l),n(a)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t,onChange:o,children:Y.t("skyMenu.ShowAzimuthAngle",e)})})},qho=()=>{const t=M(PBe)??!0,e=$t(),n=r=>{M.getState().set(i=>{i.viewState.showElevationAngle=r})},o=r=>{const i=t,a=r.target.checked,l={name:"Show Elevation Angle "+a,timestamp:Date.now(),oldValue:i,newValue:a,undo:()=>{n(l.oldValue)},redo:()=>{n(l.newValue)}};M.getState().addUndoable(l),n(a)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t,onChange:o,children:Y.t("skyMenu.ShowElevationAngle",e)})})},$ho=()=>{const t=M(CBe)??!0,e=$t(),n=r=>{M.getState().set(i=>{i.viewState.showZenithAngle=r})},o=r=>{const i=t,a=r.target.checked,l={name:"Show Zenith Angle "+a,timestamp:Date.now(),oldValue:i,newValue:a,undo:()=>{n(l.oldValue)},redo:()=>{n(l.newValue)}};M.getState().addUndoable(l),n(a)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t,onChange:o,children:Y.t("skyMenu.ShowZenithAngle",e)})})},Qho=()=>{const t=M(bBe)??3.5,e=$t(),n=r=>{M.getState().set(i=>{i.viewState.directLightIntensity=r})},o=r=>{if(r===null)return;const i=t,a=r,l={name:"Set Direct Light Intensity",timestamp:Date.now(),oldValue:i,newValue:a,undo:()=>{n(l.oldValue)},redo:()=>{n(l.newValue)}};M.getState().addUndoable(l),n(a)};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsx(on,{style:{width:"270px"},children:Y.t("skyMenu.DirectLightBrightnessAtNoon",e)+" [0.1-10]:"}),h.jsx(Sn,{min:.1,max:10,step:.1,precision:2,value:t,onChange:o})]})},Zho=()=>{const t=M(xBe)??.2,e=$t(),n=r=>{M.getState().set(i=>{i.viewState.ambientLightIntensity=r})},o=r=>{if(r===null)return;const i=t,a=r,l={name:"Set Ambient Light Intensity",timestamp:Date.now(),oldValue:i,newValue:a,undo:()=>{n(l.oldValue)},redo:()=>{n(l.newValue)}};M.getState().addUndoable(l),n(a)};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsx(on,{style:{width:"270px"},children:Y.t("skyMenu.AmbientLightBrightnessAtNoon",e)+" [0.01-1]:"}),h.jsx(Sn,{min:.01,max:1,step:.01,precision:2,value:t,onChange:o})]})},epo=()=>{const t=M(T8t)??.01,e=$t(),n=r=>{M.getState().set(i=>{i.world.airAttenuationCoefficient=r})},o=r=>{if(r===null)return;const i=t,a=r,l={name:"Set Sunlight Attenuation Coefficient of Air",timestamp:Date.now(),oldValue:i,newValue:a,undo:()=>{n(l.oldValue)},redo:()=>{n(l.newValue)}};M.getState().addUndoable(l),n(a)};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsx(on,{style:{width:"270px"},children:Y.t("skyMenu.SunlightAttenuationCoefficientInAir",e)+":"}),h.jsx(Sn,{min:0,max:.1,step:.001,precision:3,value:t,onChange:o})]})},tpo=()=>{const t=M(P8t)??5,e=$t(),n=r=>{M.getState().set(i=>{i.world.airConvectiveCoefficient=r})},o=r=>{if(r===null)return;const i=t,a=r,l={name:"Set Convective Coefficient of Air",timestamp:Date.now(),oldValue:i,newValue:a,undo:()=>{n(l.oldValue)},redo:()=>{n(l.newValue)}};M.getState().addUndoable(l),n(a)};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsx(on,{style:{width:"270px"},children:Y.t("skyMenu.ConvectiveCoefficientOfAir",e)+" [W/(m²×K)]:"}),h.jsx(Sn,{min:2.5,max:20,step:.1,precision:2,value:t,onChange:o})]})},npo=()=>{const t=M(pW)??900,e=M.getState().world,n=$t(),o=m.useMemo(()=>dl(new Date(e.date),e.latitude),[e.date,e.latitude]),r=a=>{M.getState().set(l=>{l.world.highestTemperatureTimeInMinutes=a})},i=a=>{if(a===null)return;const l=t,s=a,c={name:"Set Time of Highest Temperature in Minutes",timestamp:Date.now(),oldValue:l,newValue:s,undo:()=>{r(c.oldValue)},redo:()=>{r(c.newValue)}};M.getState().addUndoable(c),r(s)};return h.jsxs(an,{stayAfterClick:!0,children:[h.jsx(on,{style:{width:"270px"},children:Y.t("skyMenu.HighestTemperatureTimeInMinutes",n)+":"}),h.jsx(Sn,{min:720,max:o.sunset,step:5,precision:0,value:t,onChange:i})]})},opo=()=>{const t={lng:M.getState().language},e=[];return e.push({key:"axes",label:h.jsx(Xho,{})}),e.push({key:"theme-submenu",label:h.jsx(an,{children:Y.t("skyMenu.Theme",t)}),children:[{key:"theme-radio-group",label:h.jsx(Jho,{}),style:{backgroundColor:"white"}}]}),e.push({key:"sun-angles-submenu",label:h.jsx(an,{children:Y.t("skyMenu.SelectSunAnglesToShow",t)}),children:[{key:"show-azimuth-angle",label:h.jsx(Kho,{})},{key:"ShowElevationAngle",label:h.jsx(qho,{})},{key:"ShowZenithAngle",label:h.jsx($ho,{})}]}),e.push({key:"direct-light-intensity",label:h.jsx(Qho,{})}),e.push({key:"ambient-light-intensity",label:h.jsx(Zho,{})}),e.push({key:"air-attenuation-coefficient",label:h.jsx(epo,{})}),e.push({key:"air-convective-coefficient",label:h.jsx(tpo,{})}),e.push({key:"highest-temperature-time-in-minutes",label:h.jsx(npo,{})}),{items:e}},DK=class DK{constructor(){this.n=14,this.nominalStrings=new Array(this.n),this.nominalWidths=new Array(this.n),this.nominalHeights=new Array(this.n),this.cellNx=new Array(this.n),this.cellNy=new Array(this.n),this.nominalWidths[0]=.99,this.nominalHeights[0]=1.65,this.cellNx[0]=6,this.cellNy[0]=10,this.nominalWidths[1]=.99,this.nominalHeights[1]=1.96,this.cellNx[1]=6,this.cellNy[1]=12,this.nominalWidths[2]=1.05,this.nominalHeights[2]=1.56,this.cellNx[2]=8,this.cellNy[2]=12,this.nominalWidths[3]=1.31,this.nominalHeights[3]=1.96,this.cellNx[3]=8,this.cellNy[3]=12,this.nominalWidths[4]=1.07,this.nominalHeights[4]=2.07,this.cellNx[4]=8,this.cellNy[4]=16,this.nominalWidths[5]=.6,this.nominalHeights[5]=1.2,this.cellNx[5]=10,this.cellNy[5]=20,this.nominalWidths[6]=1.2,this.nominalHeights[6]=2,this.cellNx[6]=10,this.cellNy[6]=20,this.nominalWidths[7]=1,this.nominalHeights[7]=2.07,this.cellNx[7]=6,this.cellNy[7]=12,this.nominalWidths[8]=.8,this.nominalHeights[8]=1.56,this.cellNx[8]=6,this.cellNy[8]=12,this.nominalWidths[9]=.83,this.nominalHeights[9]=1.58,this.cellNx[9]=6,this.cellNy[9]=12,this.nominalWidths[10]=.99,this.nominalHeights[10]=1.31,this.cellNx[10]=6,this.cellNy[10]=8,this.nominalWidths[11]=.99,this.nominalHeights[11]=1.5,this.cellNx[11]=6,this.cellNy[11]=9,this.nominalWidths[12]=1.05,this.nominalHeights[12]=1.81,this.cellNx[12]=8,this.cellNy[12]=14,this.nominalWidths[13]=1.05,this.nominalHeights[13]=1.69,this.cellNx[13]=8,this.cellNy[13]=13;for(let e=0;e{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(yW),a=M(DH),l=M(t5),s=M(En),c=M(vh),u=M(xh),d=M(no),f=M(Qn),p=uo(),[g,A]=m.useState((p==null?void 0:p.pvModelName)??"SPR-X21-335-BLK"),[y,S]=m.useState(),C=$t(),P=m.useMemo(()=>({...a,...i}),[i,a]),v=l(g??"SPR-X21-335-BLK");m.useEffect(()=>{S(v.nominalWidth.toFixed(2)+"m×"+v.nominalLength.toFixed(2)+"m ("+v.n+"×"+v.m+" "+Y.t("pvModelPanel.Cells",C)+")")},[v]);const T=(W,k)=>{e(D=>{for(const L of D.elements)if(L.type===z.SolarPanel&&L.id===W&&!L.locked){const j=L;j.pvModelName=k;let B=D.supportedPvModules[k];if(B||(B=D.customPvModules[k]),j.orientation===vr.portrait){const O=Math.max(1,Math.round(j.lx/B.width)),V=Math.max(1,Math.round(j.ly/B.length));j.lx=O*B.width,j.ly=V*B.length}else{const O=Math.max(1,Math.round(j.lx/B.length)),V=Math.max(1,Math.round(j.ly/B.width));j.lx=O*B.length,j.ly=V*B.width}break}})},w=(W,k)=>{e(D=>{let L=D.supportedPvModules[k];L||(L=D.customPvModules[k]);for(const j of D.elements)if(j.type===z.SolarPanel&&j.foundationId===W&&!j.locked){const B=j;if(B.pvModelName=k,B.orientation===vr.portrait){const O=Math.max(1,Math.round(B.lx/L.width)),V=Math.max(1,Math.round(B.ly/L.length));B.lx=O*L.width,B.ly=V*L.length}else{const O=Math.max(1,Math.round(B.lx/L.length)),V=Math.max(1,Math.round(B.ly/L.width));B.lx=O*L.length,B.ly=V*L.width}}})},x=(W,k,D)=>{e(L=>{let j=L.supportedPvModules[D];j||(j=L.customPvModules[D]);for(const B of L.elements)if(B.type===z.SolarPanel&&!B.locked){let O;if(k?O=B.parentId===W&&ye.isIdentical(B.normal,k):O=B.parentId===W,O){const V=B;if(V.pvModelName=D,V.orientation===vr.portrait){const G=Math.max(1,Math.round(V.lx/j.width)),Q=Math.max(1,Math.round(V.ly/j.length));V.lx=G*j.width,V.ly=Q*j.length}else{const G=Math.max(1,Math.round(V.lx/j.length)),Q=Math.max(1,Math.round(V.ly/j.width));V.lx=G*j.length,V.ly=Q*j.width}}}})},b=W=>{e(k=>{let D=k.supportedPvModules[W];D||(D=k.customPvModules[W]);for(const L of k.elements)if(L.type===z.SolarPanel&&!L.locked){const j=L;if(j.pvModelName=W,j.orientation===vr.portrait){const B=Math.max(1,Math.round(j.lx/D.width)),O=Math.max(1,Math.round(j.ly/D.length));j.lx=B*D.width,j.ly=O*D.length}else{const B=Math.max(1,Math.round(j.lx/D.length)),O=Math.max(1,Math.round(j.ly/D.width));j.lx=B*D.length,j.ly=O*D.width}}})},R=(W,k)=>{M.getState().set(D=>{let L=D.supportedPvModules[k];L||(L=D.customPvModules[k]);for(const j of D.elements)if(j.type===z.SolarPanel&&!j.locked&&W.has(j.id)){const B=j;if(B.pvModelName=k,B.orientation===vr.portrait){const O=Math.max(1,Math.round(B.lx/L.width)),V=Math.max(1,Math.round(B.ly/L.length));B.lx=O*L.width,B.ly=V*L.length}else{const O=Math.max(1,Math.round(B.lx/L.length)),V=Math.max(1,Math.round(B.ly/L.width));B.lx=O*L.length,B.ly=V*L.width}}})},H=W=>{u(W.target.value)},F=W=>{if(p){switch(c){case re.AllSelectedObjectsOfThisType:{for(const k of n)if(k.type===z.SolarPanel&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&k.pvModelName!==W)return!0;break}case re.AllObjectsOfThisType:{for(const k of n)if(k.type===z.SolarPanel&&!k.locked&&k.pvModelName!==W)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const k of n)if(k.type===z.SolarPanel&&k.foundationId===(p==null?void 0:p.foundationId)&&!k.locked&&k.pvModelName!==W)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const k=r(p);if(k){if(k.type===z.Cuboid){for(const L of n)if(L.type===z.SolarPanel&&L.parentId===p.parentId&&ye.isIdentical(L.normal,p.normal)&&!L.locked&&L.pvModelName!==W)return!0}else for(const L of n)if(L.type===z.SolarPanel&&L.parentId===p.parentId&&!L.locked&&L.pvModelName!==W)return!0}break}default:{if((p==null?void 0:p.pvModelName)!==W)return!0;break}}return!1}},E=W=>{if(p&&F(W)){switch(c){case re.AllSelectedObjectsOfThisType:{const k=new Map;for(const L of n)L.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.pvModelName);const D={name:"Set Model for Selected Solar Panels",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())T(L,j)},redo:()=>{R(D.oldValues,D.newValue)}};s(D),R(k,W),f(d+1);break}case re.AllObjectsOfThisType:{const k=new Map;for(const L of n)L.type===z.SolarPanel&&k.set(L.id,L.pvModelName);const D={name:"Set Model for All Solar Panels",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())T(L,j)},redo:()=>{b(D.newValue)}};s(D),b(W),f(d+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(p.foundationId){const k=new Map;for(const L of n)L.type===z.SolarPanel&&L.foundationId===p.foundationId&&k.set(L.id,L.pvModelName);const D={name:"Set Model for All Solar Panels Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:p.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())T(L,j)},redo:()=>{D.groupId&&w(D.groupId,D.newValue)}};s(D),w(p.foundationId,W),f(d+1)}break}case re.AllObjectsOfThisTypeOnSurface:{const k=r(p);if(k){const D=new Map,L=k.type===z.Cuboid;if(L)for(const O of n)O.type===z.SolarPanel&&O.parentId===p.parentId&&ye.isIdentical(O.normal,p.normal)&&D.set(O.id,O.pvModelName);else for(const O of n)O.type===z.SolarPanel&&O.parentId===p.parentId&&D.set(O.id,O.pvModelName);const j=L?p.normal:void 0,B={name:"Set Model for All Solar Panels on Surface",timestamp:Date.now(),oldValues:D,newValue:W,groupId:p.parentId,normal:j,undo:()=>{for(const[O,V]of B.oldValues.entries())T(O,V)},redo:()=>{B.groupId&&x(B.groupId,B.normal,B.newValue)}};s(B),x(p.parentId,j,W),f(d+1)}break}default:{const k=o(p.id),D=k?k.pvModelName:p.pvModelName,L={name:"Set Model for Selected Solar Panel",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:p.id,changedElementType:p.type,undo:()=>{T(L.changedElementId,L.oldValue)},redo:()=>{T(L.changedElementId,L.newValue)}};s(L),T(p.id,W),f(d+1);break}}e(k=>{k.actionState.solarPanelModelName=W})}},N=()=>{t(!1)},U=()=>{E(g)};return h.jsxs(so,{width:640,title:Y.t("pvModelPanel.SolarPanelSpecs",C),onApply:U,onClose:N,children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("pvModelPanel.Model",C)+" ("+Object.keys(P).length+" "+Y.t("word.Options",C)+"):"}),h.jsx(Ke,{span:11,children:h.jsx(Uo,{defaultValue:"Custom",style:{width:"100%"},value:g,onChange:A,children:Object.keys(P).map(W=>h.jsx(ov,{value:W,children:W+(P[W].bifacialityFactor>0?" ("+Y.t("pvModelPanel.Bifacial",C)+")":"")},W))})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("pvModelPanel.PanelSize",C)+":"}),h.jsx(Ke,{span:11,children:h.jsx(Uo,{disabled:!0,style:{width:"100%"},value:y,onChange:W=>{},children:wfe.instance.nominalStrings.map(W=>h.jsx(ov,{value:W,children:W},W))})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("pvModelPanel.CellType",C)+":"}),h.jsx(Ke,{span:11,children:h.jsxs(Uo,{disabled:!0,style:{width:"100%"},value:v.cellType,onChange:W=>{},children:[h.jsx(ov,{value:"Monocrystalline",children:Y.t("pvModelPanel.Monocrystalline",C)},"Monocrystalline"),h.jsx(ov,{value:"Polycrystalline",children:Y.t("pvModelPanel.Polycrystalline",C)},"Polycrystalline"),h.jsx(ov,{value:"Thin Film",children:Y.t("pvModelPanel.ThinFilm",C)},"Thin Film")]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("pvModelPanel.PowerBifaciality",C)+":"}),h.jsx(Ke,{span:11,children:h.jsx(Sn,{disabled:!0,style:{width:"100%"},precision:2,value:v.bifacialityFactor,onChange:W=>{}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("word.Color",C)+":"}),h.jsx(Ke,{span:11,children:h.jsxs(Uo,{disabled:!0,style:{width:"100%"},value:v.color,onChange:W=>{},children:[h.jsx(ov,{value:"Black",children:Y.t("pvModelPanel.Black",C)},"Black"),h.jsx(ov,{value:"Blue",children:Y.t("pvModelPanel.Blue",C)},"Blue")]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("pvModelPanel.SolarCellEfficiency",C)+" (%):"}),h.jsx(Ke,{span:11,children:h.jsx(Sn,{disabled:!0,style:{width:"100%"},precision:2,value:100*v.efficiency,onChange:W=>{}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("pvModelPanel.NominalOperatingCellTemperature",C)+" (°C):"}),h.jsx(Ke,{span:11,children:h.jsx(Sn,{disabled:!0,style:{width:"100%"},precision:1,value:v.noct,onChange:W=>{}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:13,children:Y.t("pvModelPanel.TemperatureCoefficientOfPmax",C)+" (%/°C):"}),h.jsx(Ke,{span:11,children:h.jsx(jl,{disabled:!0,style:{width:"100%"},value:v.pmaxTC,onChange:W=>{}})})]}),h.jsxs(nn,{gutter:6,style:{border:"2px dashed #ccc",marginTop:"6px",marginLeft:"0",marginRight:"0",paddingLeft:"8px",paddingTop:"8px",paddingBottom:"8px"},children:[h.jsx(Ke,{span:3,children:Y.t("word.ApplyTo",C)+":"}),h.jsx(Ke,{span:21,children:h.jsx(Le.Group,{onChange:H,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",C)})]})})})]})]})},{Option:FHe}=Uo,ipo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(t5),i=M(Gr),a=M(Uge),l=M(En),s=M(vh),c=M(xh),u=M(no),d=M(Qn),f=M(Xi),p=uo(),[g,A]=m.useState((p==null?void 0:p.orientation)??vr.portrait),y=m.useRef(!1),S=m.useRef(),C=$t(),P=(j,B)=>{e(O=>{for(const V of O.elements)if(V.type===z.SolarPanel&&V.id===j&&!V.locked){const G=V;let Q=O.supportedPvModules[G.pvModelName];Q||(Q=O.customPvModules[G.pvModelName]),O.setSolarPanelOrientation(G,Q,B);break}})},v=(j,B)=>{e(O=>{for(const V of O.elements)if(V.type===z.SolarPanel&&V.foundationId===j&&!V.locked){const G=V;let Q=O.supportedPvModules[G.pvModelName];Q||(Q=O.customPvModules[G.pvModelName]),O.setSolarPanelOrientation(G,Q,B)}})},T=(j,B,O)=>{e(V=>{for(const G of V.elements)if(G.type===z.SolarPanel&&!G.locked){let Q;if(B?Q=G.parentId===j&&ye.isIdentical(G.normal,B):Q=G.parentId===j,Q){const $=G;let ie=V.supportedPvModules[$.pvModelName];ie||(ie=V.customPvModules[$.pvModelName]),V.setSolarPanelOrientation($,ie,O)}}})},w=j=>{e(B=>{for(const O of B.elements)if(O.type===z.SolarPanel&&!O.locked){const V=O;let G=B.supportedPvModules[V.pvModelName];G||(G=B.customPvModules[V.pvModelName]),B.setSolarPanelOrientation(V,G,j)}})},x=(j,B)=>{M.getState().set(O=>{for(const V of O.elements)if(V.type===z.SolarPanel&&!V.locked&&j.has(V.id)){const G=V;let Q=O.supportedPvModules[G.pvModelName];Q||(Q=O.customPvModules[G.pvModelName]),O.setSolarPanelOrientation(G,Q,B)}})},b=j=>{c(j.target.value)},R=j=>{if(p){const B=r(p.pvModelName);if(j===vr.portrait){const O=Math.max(1,Math.round(p.lx/B.width)),V=Math.max(1,Math.round(p.ly/B.length));a(p.id,O*B.width,V*B.length)}else{const O=Math.max(1,Math.round(p.lx/B.length)),V=Math.max(1,Math.round(p.ly/B.width));a(p.id,O*B.length,V*B.width)}P(p.id,j)}},H=(j,B)=>{const O=i(j);if(O){if(O.type===z.Cuboid&&!ye.isIdentical(j.normal,as))return!0;const V=JSON.parse(JSON.stringify(j));V.orientation=B;const G=r(V.pvModelName);if(B===vr.portrait){const Q=Math.max(1,Math.round(V.lx/G.width)),$=Math.max(1,Math.round(V.ly/G.length));V.lx=Q*G.width,V.ly=$*G.length}else{const Q=Math.max(1,Math.round(V.lx/G.length)),$=Math.max(1,Math.round(V.ly/G.width));V.lx=Q*G.length,V.ly=$*G.width}return O.type===z.Wall?ye.checkElementOnWallState(V,O)===pa.Valid:O.type===z.Roof?ye.checkElementOnRoofState(V,O)===pa.Valid:ye.isSolarCollectorWithinHorizontalSurface(V,O)}return!1},F=(j,B)=>!H(j,B),E=j=>{if(p){switch(s){case re.AllSelectedObjectsOfThisType:{for(const B of n)if(B.type===z.SolarPanel&&!B.locked&&M.getState().selectedElementIdSet.has(B.id)&&B.orientation!==j)return!0;break}case re.AllObjectsOfThisType:{for(const B of n)if(B.type===z.SolarPanel&&!B.locked&&B.orientation!==j)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const B of n)if(B.type===z.SolarPanel&&B.foundationId===(p==null?void 0:p.foundationId)&&!B.locked&&B.orientation!==j)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const B=i(p);if(B){if(B.type===z.Cuboid){for(const V of n)if(V.type===z.SolarPanel&&V.parentId===p.parentId&&ye.isIdentical(V.normal,p.normal)&&!V.locked&&V.orientation!==j)return!0}else for(const V of n)if(V.type===z.SolarPanel&&V.parentId===p.parentId&&!V.locked&&V.orientation!==j)return!0}break}default:{if((p==null?void 0:p.orientation)!==j)return!0;break}}return!1}},N=j=>{if(p&&E(j)){switch(S.current=void 0,s){case re.AllSelectedObjectsOfThisType:{y.current=!1;for(const B of n)if(B.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(B.id)&&F(B,j)){y.current=!0;break}if(y.current)S.current=j,A(p.orientation);else{const B=new Map;for(const V of n)V.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(V.id)&&B.set(V.id,V.orientation);const O={name:"Set Orientation for Selected Solar Panels",timestamp:Date.now(),oldValues:B,newValue:j,undo:()=>{for(const[V,G]of O.oldValues.entries())P(V,G)},redo:()=>{x(O.oldValues,O.newValue)}};l(O),x(B,j),d(u+1)}break}case re.AllObjectsOfThisType:{y.current=!1;for(const B of n)if(B.type===z.SolarPanel&&F(B,j)){y.current=!0;break}if(y.current)S.current=j,A(p.orientation);else{const B=new Map;for(const V of n)V.type===z.SolarPanel&&B.set(V.id,V.orientation);const O={name:"Set Orientation for All Solar Panels",timestamp:Date.now(),oldValues:B,newValue:j,undo:()=>{for(const[V,G]of O.oldValues.entries())P(V,G)},redo:()=>{w(O.newValue)}};l(O),w(j),d(u+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(p.foundationId){y.current=!1;for(const B of n)if(B.type===z.SolarPanel&&B.foundationId===p.foundationId&&F(B,j)){y.current=!0;break}if(y.current)S.current=j,A(p.orientation);else{const B=new Map;for(const V of n)V.type===z.SolarPanel&&V.foundationId===p.foundationId&&B.set(V.id,V.orientation);const O={name:"Set Orientation for All Solar Panels Above Foundation",timestamp:Date.now(),oldValues:B,newValue:j,groupId:p.foundationId,undo:()=>{for(const[V,G]of O.oldValues.entries())P(V,G)},redo:()=>{O.groupId&&v(O.groupId,O.newValue)}};l(O),v(p.foundationId,j),d(u+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{const B=i(p);if(B){if(y.current=!1,B.type===z.Cuboid){for(const V of n)if(V.type===z.SolarPanel&&V.parentId===p.parentId&&ye.isIdentical(V.normal,p.normal)&&F(V,j)){y.current=!0;break}}else for(const V of n)if(V.type===z.SolarPanel&&V.parentId===p.parentId&&F(V,j)){y.current=!0;break}if(y.current)S.current=j,A(p.orientation);else{const V=new Map,G=B.type===z.Cuboid;if(G)for(const ie of n)ie.type===z.SolarPanel&&ie.parentId===p.parentId&&ye.isIdentical(ie.normal,p.normal)&&V.set(ie.id,ie.orientation);else for(const ie of n)ie.type===z.SolarPanel&&ie.parentId===p.parentId&&V.set(ie.id,ie.orientation);const Q=G?p.normal:void 0,$={name:"Set Orientation for All Solar Panels on Surface",timestamp:Date.now(),oldValues:V,newValue:j,groupId:p.parentId,normal:Q,undo:()=>{for(const[ie,q]of $.oldValues.entries())P(ie,q)},redo:()=>{$.groupId&&T($.groupId,$.normal,$.newValue)}};l($),T(p.parentId,Q,j),d(u+1)}}break}default:{const B=o(p.id),O=B?B.orientation:p.orientation;if(y.current=!1,y.current)S.current=j,A(O);else{const V={name:"Set Orientation of Selected Solar Panel",timestamp:Date.now(),oldValue:O,newValue:j,changedElementId:p.id,changedElementType:p.type,undo:()=>{R(V.oldValue)},redo:()=>{R(V.newValue)}};l(V),R(j),d(u+1)}break}}e(B=>{B.actionState.solarPanelOrientation=j})}},U=()=>{p&&(A(p.orientation),y.current=!1,t(!1))},W=()=>{U(),f()},k=()=>{N(g),y.current||(t(!1),d(0))},D=()=>{N(g)},L=y.current?": "+Y.t("message.NotApplicableToSelectedAction",C)+(S.current?" ("+(S.current===vr.portrait?Y.t("solarPanelMenu.Portrait",C):Y.t("solarPanelMenu.Landscape",C))+")":""):"";return h.jsx(so,{width:550,title:Y.t("solarPanelMenu.Orientation",C),rejectedMessage:L,onApply:D,onClose:U,onClickCancel:W,onClickOk:k,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:8,children:h.jsxs(Uo,{style:{width:"150px"},value:g,onChange:j=>A(j),children:[h.jsx(FHe,{value:vr.portrait,children:Y.t("solarPanelMenu.Portrait",C)},vr.portrait),h.jsx(FHe,{value:vr.landscape,children:Y.t("solarPanelMenu.Landscape",C)},vr.landscape)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:b,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",C)})]})})})]})})},apo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(t5),i=M(Gr),a=M(En),l=M(vh),s=M(xh),c=M(no),u=M(Qn),d=M(Xi),f=uo(z.SolarPanel),[p,g]=m.useState((f==null?void 0:f.lx)??1),[A,y]=m.useState(0),S=m.useRef(!1),C=m.useRef(),P=$t();m.useEffect(()=>{if(f){const B=r(f.pvModelName)??r("SPR-X21-335-BLK");y(f.orientation===vr.portrait?B.width:B.length)}},[f]);const v=(B,O)=>{e(V=>{for(const G of V.elements)if(G.type===z.SolarPanel&&G.id===B&&!G.locked){const Q=G,$=V.getPvModule(Q.pvModelName);G.lx=ye.panelizeLx(Q,$,O);break}})},T=(B,O)=>{e(V=>{for(const G of V.elements)if(G.type===z.SolarPanel&&G.foundationId===B&&!G.locked){const Q=G,$=V.getPvModule(Q.pvModelName);G.lx=ye.panelizeLx(Q,$,O)}})},w=(B,O,V)=>{e(G=>{for(const Q of G.elements)if(Q.type===z.SolarPanel&&!Q.locked){let $;if(O?$=Q.parentId===B&&ye.isIdentical(Q.normal,O):$=Q.parentId===B,$){const ie=Q,q=G.getPvModule(ie.pvModelName);Q.lx=ye.panelizeLx(ie,q,V)}}})},x=B=>{e(O=>{for(const V of O.elements)if(V.type===z.SolarPanel&&!V.locked){const G=V,Q=O.getPvModule(G.pvModelName);V.lx=ye.panelizeLx(G,Q,B)}})},b=(B,O)=>{M.getState().set(V=>{for(const G of V.elements)if(G.type===z.SolarPanel&&!G.locked&&B.has(G.id)){const Q=G,$=V.getPvModule(Q.pvModelName);G.lx=ye.panelizeLx(Q,$,O)}})},R=B=>{s(B.target.value)},H=(B,O)=>{const V=i(B);if(V){if(V.type===z.Cuboid&&!ye.isIdentical(B.normal,as))return!0;const G=JSON.parse(JSON.stringify(B));return G.lx=O,V.type===z.Wall?ye.checkElementOnWallState(G,V)===pa.Valid:V.type===z.Roof?ye.checkElementOnRoofState(G,V)===pa.Valid:ye.isSolarCollectorWithinHorizontalSurface(G,V)}return!1},F=(B,O)=>!H(B,O),E=B=>{if(f){switch(l){case re.AllSelectedObjectsOfThisType:{for(const O of n)if(O.type===z.SolarPanel&&!O.locked&&M.getState().selectedElementIdSet.has(O.id)&&Math.abs(O.lx-B)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const O of n)if(O.type===z.SolarPanel&&!O.locked&&Math.abs(O.lx-B)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const O of n)if(O.type===z.SolarPanel&&O.foundationId===(f==null?void 0:f.foundationId)&&!O.locked&&Math.abs(O.lx-B)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const O=i(f);if(O){if(O.type===z.Cuboid){for(const G of n)if(G.type===z.SolarPanel&&G.parentId===f.parentId&&ye.isIdentical(G.normal,f.normal)&&!G.locked&&Math.abs(G.lx-B)>Et)return!0}else for(const G of n)if(G.type===z.SolarPanel&&G.parentId===f.parentId&&!G.locked&&Math.abs(G.lx-B)>Et)return!0}break}default:{if(Math.abs((f==null?void 0:f.lx)-B)>Et)return!0;break}}return!1}},N=B=>{if(f&&E(B))switch(C.current=void 0,l){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const O of n)if(O.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(O.id)&&F(O,B)){S.current=!0;break}if(S.current)C.current=B,g(f.lx);else{const O=new Map;for(const G of n)G.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(G.id)&&O.set(G.id,G.lx);const V={name:"Set Length for Selected Solar Panel Arrays",timestamp:Date.now(),oldValues:O,newValue:B,undo:()=>{for(const[G,Q]of V.oldValues.entries())v(G,Q)},redo:()=>{b(V.oldValues,V.newValue)}};a(V),b(O,B),u(c+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const O of n)if(O.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(O.id)&&F(O,B)){S.current=!0;break}if(S.current)C.current=B,g(f.lx);else{const O=new Map;for(const G of n)G.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(G.id)&&O.set(G.id,G.lx);const V={name:"Set Length for All Solar Panel Arrays",timestamp:Date.now(),oldValues:O,newValue:B,undo:()=>{for(const[G,Q]of V.oldValues.entries())v(G,Q)},redo:()=>{x(V.newValue)}};a(V),x(B),u(c+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){S.current=!1;for(const O of n)if(O.type===z.SolarPanel&&O.foundationId===f.foundationId&&F(O,B)){S.current=!0;break}if(S.current)C.current=B,g(f.lx);else{const O=new Map;for(const G of n)G.type===z.SolarPanel&&G.foundationId===f.foundationId&&O.set(G.id,G.lx);const V={name:"Set Length for All Solar Panel Arrays Above Foundation",timestamp:Date.now(),oldValues:O,newValue:B,groupId:f.foundationId,undo:()=>{for(const[G,Q]of V.oldValues.entries())v(G,Q)},redo:()=>{V.groupId&&T(V.groupId,V.newValue)}};a(V),T(f.foundationId,B),u(c+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{const O=i(f);if(O){if(S.current=!1,O.type===z.Cuboid){for(const G of n)if(G.type===z.SolarPanel&&G.parentId===f.parentId&&ye.isIdentical(G.normal,f.normal)&&F(G,B)){S.current=!0;break}}else for(const G of n)if(G.type===z.SolarPanel&&G.parentId===f.parentId&&F(G,B)){S.current=!0;break}if(S.current)C.current=B,g(f.lx);else{const G=new Map,Q=O.type===z.Cuboid;if(Q)for(const q of n)q.type===z.SolarPanel&&q.parentId===f.parentId&&ye.isIdentical(q.normal,f.normal)&&G.set(q.id,q.lx);else for(const q of n)q.type===z.SolarPanel&&q.parentId===f.parentId&&G.set(q.id,q.lx);const $=Q?f.normal:void 0,ie={name:"Set Length for All Solar Panel Arrays on Surface",timestamp:Date.now(),oldValues:G,newValue:B,groupId:f.parentId,normal:$,undo:()=>{for(const[q,se]of ie.oldValues.entries())v(q,se)},redo:()=>{ie.groupId&&w(ie.groupId,ie.normal,ie.newValue)}};a(ie),w(f.parentId,$,B),u(c+1)}}break}default:{const O=o(f.id),V=O?O.lx:f.lx;if(S.current=F(f,B),S.current)C.current=B,g(V);else{const G={name:"Set Solar Panel Array Length",timestamp:Date.now(),oldValue:V,newValue:B,changedElementId:f.id,changedElementType:f.type,undo:()=>{v(G.changedElementId,G.oldValue)},redo:()=>{v(G.changedElementId,G.newValue)}};a(G),v(f.id,B),u(c+1)}break}}},U=B=>{let O=B??1;return O=Math.max(1,Math.ceil((O-A/2)/A))*A,O},W=()=>{S.current=!1,t(!1)},k=()=>{W(),d()},D=()=>{N(p),S.current||(t(!1),u(0))},L=()=>{N(p)},j=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("word.Length",P),rejectedMessage:j,onApply:L,onClose:W,onClickCancel:k,onClickOk:D,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:A,max:100*A,step:A,style:{width:120},precision:2,value:p,onChange:B=>{B!==null&&g(U(B))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Math.round(p/A)+" "+Y.t("solarPanelMenu.PanelsWide",P),h.jsx("br",{}),Y.t("word.MaximumNumber",P),": 100 ",Y.t("solarPanelMenu.Panels",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:R,value:l,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",P)})]})})})]})})},lpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(t5),i=M(Gr),a=M(En),l=M(vh),s=M(xh),c=M(no),u=M(Qn),d=M(Xi),f=uo(z.SolarPanel),[p,g]=m.useState((f==null?void 0:f.ly)??2),[A,y]=m.useState(0),S=m.useRef(!1),C=m.useRef(),P=$t();m.useEffect(()=>{if(f){const B=r(f.pvModelName)??r("SPR-X21-335-BLK");y(f.orientation===vr.portrait?B.length:B.width),g(f.ly)}},[f]);const v=(B,O)=>{e(V=>{for(const G of V.elements)if(G.type===z.SolarPanel&&G.id===B&&!G.locked){const Q=G,$=V.getPvModule(Q.pvModelName);G.ly=ye.panelizeLy(Q,$,O);break}})},T=(B,O)=>{e(V=>{for(const G of V.elements)if(G.type===z.SolarPanel&&G.foundationId===B&&!G.locked){const Q=G,$=V.getPvModule(Q.pvModelName);G.ly=ye.panelizeLy(Q,$,O)}})},w=(B,O,V)=>{e(G=>{for(const Q of G.elements)if(Q.type===z.SolarPanel&&!Q.locked){let $;if(O?$=Q.parentId===B&&ye.isIdentical(Q.normal,O):$=Q.parentId===B,$){const ie=Q,q=G.getPvModule(ie.pvModelName);Q.ly=ye.panelizeLy(ie,q,V)}}})},x=B=>{e(O=>{for(const V of O.elements)if(V.type===z.SolarPanel&&!V.locked){const G=V,Q=O.getPvModule(G.pvModelName);V.ly=ye.panelizeLy(G,Q,B)}})},b=(B,O)=>{M.getState().set(V=>{for(const G of V.elements)if(G.type===z.SolarPanel&&!G.locked&&B.has(G.id)){const Q=G,$=V.getPvModule(Q.pvModelName);G.ly=ye.panelizeLy(Q,$,O)}})},R=B=>{s(B.target.value)},H=(B,O)=>{const V=i(B);if(V){if(V.type===z.Cuboid&&!ye.isIdentical(B.normal,as))return!0;const G=JSON.parse(JSON.stringify(B));return G.ly=O,V.type===z.Wall?ye.checkElementOnWallState(G,V)===pa.Valid:V.type===z.Roof?ye.checkElementOnRoofState(G,V)===pa.Valid:ye.isSolarCollectorWithinHorizontalSurface(G,V)}return!1},F=(B,O)=>B.tiltAngle!==0&&.5*O*Math.abs(Math.sin(B.tiltAngle))>B.poleHeight||!H(B,O),E=B=>{if(f){switch(l){case re.AllSelectedObjectsOfThisType:{for(const O of n)if(O.type===z.SolarPanel&&!O.locked&&M.getState().selectedElementIdSet.has(O.id)&&Math.abs(O.ly-B)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const O of n)if(O.type===z.SolarPanel&&!O.locked&&Math.abs(O.ly-B)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const O of n)if(O.type===z.SolarPanel&&O.foundationId===(f==null?void 0:f.foundationId)&&!O.locked&&Math.abs(O.ly-B)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const O=i(f);if(O){if(O.type===z.Cuboid){for(const G of n)if(G.type===z.SolarPanel&&G.parentId===f.parentId&&ye.isIdentical(G.normal,f.normal)&&!G.locked&&Math.abs(G.ly-B)>Et)return!0}else for(const G of n)if(G.type===z.SolarPanel&&G.parentId===f.parentId&&!G.locked&&Math.abs(G.ly-B)>Et)return!0}break}default:{if(Math.abs((f==null?void 0:f.ly)-B)>Et)return!0;break}}return!1}},N=B=>{if(f&&E(B))switch(C.current=void 0,l){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const O of n)if(O.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(O.id)&&F(O,B)){S.current=!0;break}if(S.current)C.current=B,g(f.ly);else{const O=new Map;for(const G of n)G.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(G.id)&&O.set(G.id,G.ly);const V={name:"Set Width for Selected Solar Panel Arrays",timestamp:Date.now(),oldValues:O,newValue:B,undo:()=>{for(const[G,Q]of V.oldValues.entries())v(G,Q)},redo:()=>{b(V.oldValues,V.newValue)}};a(V),b(O,B),u(c+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const O of n)if(O.type===z.SolarPanel&&F(O,B)){S.current=!0;break}if(S.current)C.current=B,g(f.ly);else{const O=new Map;for(const G of n)G.type===z.SolarPanel&&O.set(G.id,G.ly);const V={name:"Set Width for All Solar Panel Arrays",timestamp:Date.now(),oldValues:O,newValue:B,undo:()=>{for(const[G,Q]of V.oldValues.entries())v(G,Q)},redo:()=>{x(V.newValue)}};a(V),x(B),u(c+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){S.current=!1;for(const O of n)if(O.type===z.SolarPanel&&O.foundationId===f.foundationId&&F(O,B)){S.current=!0;break}if(S.current)C.current=B,g(f.ly);else{const O=new Map;for(const G of n)G.type===z.SolarPanel&&G.foundationId===f.foundationId&&O.set(G.id,G.ly);const V={name:"Set Width for All Solar Panel Arrays Above Foundation",timestamp:Date.now(),oldValues:O,newValue:B,groupId:f.foundationId,undo:()=>{for(const[G,Q]of V.oldValues.entries())v(G,Q)},redo:()=>{V.groupId&&T(V.groupId,V.newValue)}};a(V),T(f.foundationId,B),u(c+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{const O=i(f);if(O){if(S.current=!1,O.type===z.Cuboid){for(const G of n)if(G.type===z.SolarPanel&&G.parentId===f.parentId&&ye.isIdentical(G.normal,f.normal)&&F(G,B)){S.current=!0;break}}else for(const G of n)if(G.type===z.SolarPanel&&G.parentId===f.parentId&&F(G,B)){S.current=!0;break}if(S.current)C.current=B,g(f.ly);else{const G=new Map,Q=O.type===z.Cuboid;if(Q)for(const q of n)q.type===z.SolarPanel&&q.parentId===f.parentId&&ye.isIdentical(q.normal,f.normal)&&G.set(q.id,q.ly);else for(const q of n)q.type===z.SolarPanel&&q.parentId===f.parentId&&G.set(q.id,q.ly);const $=Q?f.normal:void 0,ie={name:"Set Width for All Solar Panel Arrays on Surface",timestamp:Date.now(),oldValues:G,newValue:B,groupId:f.parentId,normal:$,undo:()=>{for(const[q,se]of ie.oldValues.entries())v(q,se)},redo:()=>{ie.groupId&&w(ie.groupId,ie.normal,ie.newValue)}};a(ie),w(f.parentId,$,B),u(c+1)}}break}default:{const O=o(f.id),V=O?O.ly:f.ly;if(S.current=F(f,B),S.current)C.current=B,g(V);else{const G={name:"Set Solar Panel Array Width",timestamp:Date.now(),oldValue:V,newValue:B,changedElementId:f.id,changedElementType:f.type,undo:()=>{v(G.changedElementId,G.oldValue)},redo:()=>{v(G.changedElementId,G.newValue)}};a(G),v(f.id,B),u(c+1)}break}}},U=()=>{S.current=!1,t(!1)},W=()=>{U(),d()},k=()=>{N(p),S.current||(t(!1),u(0))},D=B=>{let O=B??1;return O=Math.max(1,Math.ceil((O-A/2)/A))*A,O},L=()=>{N(p)},j=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("word.Width",P),rejectedMessage:j,onApply:L,onClose:U,onClickCancel:W,onClickOk:k,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:A,max:100*A,step:A,style:{width:120},precision:2,value:p,onChange:B=>{B!==null&&g(D(B))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Math.round(p/A)+" "+Y.t("solarPanelMenu.PanelsLong",P),h.jsx("br",{}),Y.t("word.MaximumNumber",P),": 100 ",Y.t("solarPanelMenu.Panels",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:R,value:l,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",P)})]})})})]})})},spo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(En),a=M(vh),l=M(xh),s=M(no),c=M(Qn),u=M(b=>b.elements.find(R=>R.selected&&R.type===z.SolarPanel)),[d,f]=m.useState((u==null?void 0:u.inverterEfficiency)??.95),p=$t(),g=(b,R)=>{e(H=>{for(const F of H.elements)if(F.type===z.SolarPanel&&F.id===b&&!F.locked){F.inverterEfficiency=R;break}})},A=(b,R)=>{e(H=>{for(const F of H.elements)F.type===z.SolarPanel&&F.foundationId===b&&!F.locked&&(F.inverterEfficiency=R)})},y=(b,R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.SolarPanel&&!E.locked){let N;R?N=E.parentId===b&&ye.isIdentical(E.normal,R):N=E.parentId===b,N&&(E.inverterEfficiency=H)}})},S=b=>{e(R=>{for(const H of R.elements)H.type===z.SolarPanel&&!H.locked&&(H.inverterEfficiency=b)})},C=(b,R)=>{M.getState().set(H=>{for(const F of H.elements)F.type===z.SolarPanel&&!F.locked&&b.has(F.id)&&(F.inverterEfficiency=R)})},P=b=>{l(b.target.value)},v=b=>{switch(a){case re.AllSelectedObjectsOfThisType:{for(const R of n)if(R.type===z.SolarPanel&&!R.locked&&M.getState().selectedElementIdSet.has(R.id)&&Math.abs((R.inverterEfficiency??.95)-b)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const R of n)if(R.type===z.SolarPanel&&!R.locked&&Math.abs((R.inverterEfficiency??.95)-b)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const R of n)if(R.type===z.SolarPanel&&R.foundationId===(u==null?void 0:u.foundationId)&&!R.locked&&Math.abs((R.inverterEfficiency??.95)-b)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const R=r(u);if(R){if(R.type===z.Cuboid){for(const F of n)if(F.type===z.SolarPanel&&F.parentId===u.parentId&&ye.isIdentical(F.normal,u.normal)&&!F.locked&&Math.abs((F.inverterEfficiency??.95)-b)>Et)return!0}else for(const F of n)if(F.type===z.SolarPanel&&F.parentId===u.parentId&&!F.locked&&Math.abs((F.inverterEfficiency??.95)-b)>Et)return!0}break}default:{if(Math.abs(((u==null?void 0:u.inverterEfficiency)??.95)-b)>Et)return!0;break}}return!1},T=b=>{if(u&&v(b))switch(a){case re.AllSelectedObjectsOfThisType:{const R=new Map;for(const F of n)F.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(F.id)&&R.set(F.id,F.inverterEfficiency??.95);const H={name:"Set Inverter Efficiency for Selected Solar Panel Arrays",timestamp:Date.now(),oldValues:R,newValue:b,undo:()=>{for(const[F,E]of H.oldValues.entries())g(F,E)},redo:()=>{C(H.oldValues,H.newValue)}};i(H),C(R,b),c(s+1);break}case re.AllObjectsOfThisType:{const R=new Map;for(const F of n)F.type===z.SolarPanel&&R.set(F.id,F.inverterEfficiency??.95);const H={name:"Set Inverter Efficiency for All Solar Panel Arrays",timestamp:Date.now(),oldValues:R,newValue:b,undo:()=>{for(const[F,E]of H.oldValues.entries())g(F,E)},redo:()=>{S(H.newValue)}};i(H),S(b),c(s+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const R=new Map;for(const F of n)F.type===z.SolarPanel&&F.foundationId===u.foundationId&&R.set(F.id,F.inverterEfficiency??.95);const H={name:"Set Inverter Efficiency for All Solar Panel Arrays Above Foundation",timestamp:Date.now(),oldValues:R,newValue:b,groupId:u.foundationId,undo:()=>{for(const[F,E]of H.oldValues.entries())g(F,E)},redo:()=>{H.groupId&&A(H.groupId,H.newValue)}};i(H),A(u.foundationId,b),c(s+1)}break}case re.AllObjectsOfThisTypeOnSurface:{const R=r(u);if(R){const H=new Map,F=R.type===z.Cuboid;if(F)for(const U of n)U.type===z.SolarPanel&&U.parentId===u.parentId&&ye.isIdentical(U.normal,u.normal)&&H.set(U.id,U.inverterEfficiency??.95);else for(const U of n)U.type===z.SolarPanel&&U.parentId===u.parentId&&H.set(U.id,U.inverterEfficiency??.95);const E=F?u.normal:void 0,N={name:"Set Inverter Efficiency for All Solar Panel Arrays on Surface",timestamp:Date.now(),oldValues:H,newValue:b,groupId:u.parentId,normal:E,undo:()=>{for(const[U,W]of N.oldValues.entries())g(U,W)},redo:()=>{N.groupId&&y(N.groupId,N.normal,N.newValue)}};i(N),y(u.parentId,E,b),c(s+1)}break}default:{const R=o(u.id),H=R?R.inverterEfficiency??.95:u.inverterEfficiency??.95,F={name:"Set Solar Panel Array Inverter Efficiency",timestamp:Date.now(),oldValue:H,newValue:b,changedElementId:u.id,changedElementType:u.type,undo:()=>{g(F.changedElementId,F.oldValue)},redo:()=>{g(F.changedElementId,F.newValue)}};i(F),g(u.id,b),c(s+1);break}}},w=()=>{t(!1)},x=()=>{T(d)};return h.jsx(so,{width:550,title:Y.t("solarPanelMenu.InverterEfficiency",p),onApply:x,onClose:w,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.5,max:1,step:.01,style:{width:120},precision:2,value:d,onChange:b=>{b!==null&&f(b)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:["[0.5, 1.0]",h.jsx("br",{}),Y.t("solarPanelMenu.InverterEfficiencyExplained",p)]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P,value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",p)})]})})})]})})},cpo=({setDialogVisible:t})=>{const e=M(pn),n=M(m0),o=M(Kn),r=M(Jn),i=M(Gr),a=M(En),l=M(vh),s=M(xh),c=M(no),u=M(Qn),d=M(Xi),f=M(L=>L.elements.find(j=>j.selected&&j.type===z.SolarPanel)),[p,g]=m.useState(!1),[A,y]=m.useState(!1),[S,C]=m.useState({left:0,top:0,bottom:0,right:0}),P=m.useRef(null),v=m.useRef((f==null?void 0:f.dcToAcRatio)??1),T={lng:n};m.useEffect(()=>{f&&(v.current=f.dcToAcRatio??1)},[f.dcToAcRatio]);const w=(L,j)=>{e(B=>{for(const O of B.elements)if(O.type===z.SolarPanel&&O.id===L&&!O.locked){O.dcToAcRatio=j;break}})},x=(L,j)=>{e(B=>{for(const O of B.elements)O.type===z.SolarPanel&&O.foundationId===L&&!O.locked&&(O.dcToAcRatio=j)})},b=(L,j,B)=>{e(O=>{for(const V of O.elements)if(V.type===z.SolarPanel&&!V.locked){let G;j?G=V.parentId===L&&ye.isIdentical(V.normal,j):G=V.parentId===L,G&&(V.dcToAcRatio=B)}})},R=L=>{e(j=>{for(const B of j.elements)B.type===z.SolarPanel&&!B.locked&&(B.dcToAcRatio=L)})},H=(L,j)=>{M.getState().set(B=>{for(const O of B.elements)O.type===z.SolarPanel&&!O.locked&&L.has(O.id)&&(O.dcToAcRatio=j)})},F=L=>{s(L.target.value),g(!p)},E=L=>{switch(l){case re.AllSelectedObjectsOfThisType:{for(const j of o)if(j.type===z.SolarPanel&&!j.locked&&M.getState().selectedElementIdSet.has(j.id)&&Math.abs((j.dcToAcRatio??1)-L)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const j of o)if(j.type===z.SolarPanel&&!j.locked&&Math.abs((j.dcToAcRatio??1)-L)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const j of o)if(j.type===z.SolarPanel&&j.foundationId===(f==null?void 0:f.foundationId)&&!j.locked&&Math.abs((j.dcToAcRatio??1)-L)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const j=i(f);if(j){if(j.type===z.Cuboid){for(const O of o)if(O.type===z.SolarPanel&&O.parentId===f.parentId&&ye.isIdentical(O.normal,f.normal)&&!O.locked&&Math.abs((O.dcToAcRatio??1)-L)>Et)return!0}else for(const O of o)if(O.type===z.SolarPanel&&O.parentId===f.parentId&&!O.locked&&Math.abs((O.dcToAcRatio??1)-L)>Et)return!0}break}default:{if(Math.abs(((f==null?void 0:f.dcToAcRatio)??1)-L)>Et)return!0;break}}return!1},N=L=>{if(f&&E(L)){switch(l){case re.AllSelectedObjectsOfThisType:{const j=new Map;for(const O of o)O.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(O.id)&&j.set(O.id,O.dcToAcRatio??1);const B={name:"Set DC-AC Ratio for Selected Solar Panel Arrays",timestamp:Date.now(),oldValues:j,newValue:L,undo:()=>{for(const[O,V]of B.oldValues.entries())w(O,V)},redo:()=>{H(B.oldValues,B.newValue)}};a(B),H(j,L),u(c+1);break}case re.AllObjectsOfThisType:{const j=new Map;for(const O of o)O.type===z.SolarPanel&&j.set(O.id,O.dcToAcRatio??1);const B={name:"Set DC-AC Ratio for All Solar Panel Arrays",timestamp:Date.now(),oldValues:j,newValue:L,undo:()=>{for(const[O,V]of B.oldValues.entries())w(O,V)},redo:()=>{R(B.newValue)}};a(B),R(L),u(c+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const j=new Map;for(const O of o)O.type===z.SolarPanel&&O.foundationId===f.foundationId&&j.set(O.id,O.dcToAcRatio??1);const B={name:"Set DC-AC Ratio for All Solar Panel Arrays Above Foundation",timestamp:Date.now(),oldValues:j,newValue:L,groupId:f.foundationId,undo:()=>{for(const[O,V]of B.oldValues.entries())w(O,V)},redo:()=>{B.groupId&&x(B.groupId,B.newValue)}};a(B),x(f.foundationId,L),u(c+1)}break}case re.AllObjectsOfThisTypeOnSurface:{const j=i(f);if(j){const B=new Map,O=j.type===z.Cuboid;if(O)for(const Q of o)Q.type===z.SolarPanel&&Q.parentId===f.parentId&&ye.isIdentical(Q.normal,f.normal)&&B.set(Q.id,Q.dcToAcRatio??1);else for(const Q of o)Q.type===z.SolarPanel&&Q.parentId===f.parentId&&B.set(Q.id,Q.dcToAcRatio??1);const V=O?f.normal:void 0,G={name:"Set DC-AC Ratio for All Solar Panel Arrays on Surface",timestamp:Date.now(),oldValues:B,newValue:L,groupId:f.parentId,normal:V,undo:()=>{for(const[Q,$]of G.oldValues.entries())w(Q,$)},redo:()=>{G.groupId&&b(G.groupId,G.normal,G.newValue)}};a(G),b(f.parentId,V,L),u(c+1)}break}default:{const j=r(f.id),B=j?j.dcToAcRatio??1:f.dcToAcRatio??1,O={name:"Set Solar Panel Array DC-AC Ratio",timestamp:Date.now(),oldValue:B,newValue:L,changedElementId:f.id,changedElementType:f.type,undo:()=>{w(O.changedElementId,O.oldValue)},redo:()=>{w(O.changedElementId,O.newValue)}};a(O),w(f.id,L),u(c+1);break}}g(!p)}},U=(L,j)=>{if(P.current){const{clientWidth:B,clientHeight:O}=window.document.documentElement,V=P.current.getBoundingClientRect();C({left:-V.left+j.x,right:B-(V.right-j.x),top:-V.top+j.y,bottom:O-((V==null?void 0:V.bottom)-j.y)})}},W=()=>{v.current=f.dcToAcRatio??1,t(!1)},k=()=>{W(),d()},D=()=>{N(v.current),t(!1),u(0)};return h.jsx(h.Fragment,{children:h.jsx(xi,{width:550,open:!0,title:h.jsx("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>y(!0),onMouseOut:()=>y(!1),children:Y.t("solarPanelMenu.DcToAcSizeRatio",T)}),footer:[h.jsx(io,{onClick:()=>{N(v.current)},children:Y.t("word.Apply",T)},"Apply"),h.jsx(io,{onClick:k,children:Y.t("word.Cancel",T)},"Cancel"),h.jsx(io,{type:"primary",onClick:D,children:Y.t("word.OK",T)},"OK")],onCancel:W,maskClosable:!1,destroyOnClose:!1,modalRender:L=>h.jsx(Bi,{disabled:!A,bounds:S,onStart:(j,B)=>U(j,B),children:h.jsx("div",{ref:P,children:L})}),children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:2,step:.01,style:{width:120},precision:2,value:v.current,onChange:L=>{L!==null&&(v.current=L,g(!p))},onPressEnter:D}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:["[1.0, 2.0]",h.jsx("br",{}),Y.t("solarPanelMenu.DcToAcSizeRatioExplained",T)]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:F,value:l,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",T)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",T)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",T)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",T)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",T)})]})})})]})})})},kHe=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(l7t),i=M(Gr),a=M(En),l=M(vh),s=M(xh),c=M(no),u=M(Qn),d=M(Xi),f=uo(z.SolarPanel),p=(f==null?void 0:f.tiltAngle)??0,g=(f==null?void 0:f.parentType)===z.Wall,[A,y]=m.useState(g?-p:p),S=m.useRef(!1),C=m.useRef(),P=$t(),v=(k,D,L)=>{e(j=>{for(const B of j.elements)if(B.type===z.SolarPanel&&B.foundationId===k&&!B.locked){const O=B;O.parentType===z.Wall?O.tiltAngle=Math.min(0,L?-D:D):O.tiltAngle=D}})},T=(k,D,L)=>{e(j=>{for(const B of j.elements)if(B.type===z.SolarPanel&&!B.locked){let O;if(D?O=B.parentId===k&&ye.isIdentical(B.normal,D):O=B.parentId===k,O){const V=B;V.tiltAngle=L}}})},w=(k,D)=>{e(L=>{for(const j of L.elements)if(j.type===z.SolarPanel&&!j.locked){const B=j;B.parentType===z.Wall?B.tiltAngle=Math.min(0,D?-k:k):B.tiltAngle=k}})},x=(k,D,L)=>{M.getState().set(j=>{for(const B of j.elements)if(B.type===z.SolarPanel&&!B.locked&&k.has(B.id)){const O=B;O.parentType===z.Wall?O.tiltAngle=Math.min(0,L?-D:D):O.tiltAngle=D}})},b=k=>{s(k.target.value)},R=k=>{if(f){switch(l){case re.AllSelectedObjectsOfThisType:{for(const D of n)if(D.type===z.SolarPanel&&!D.locked&&M.getState().selectedElementIdSet.has(D.id)&&Math.abs(D.tiltAngle-k)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const D of n)if(D.type===z.SolarPanel&&!D.locked&&Math.abs(D.tiltAngle-k)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const D of n)if(D.type===z.SolarPanel&&D.foundationId===(f==null?void 0:f.foundationId)&&!D.locked&&Math.abs(D.tiltAngle-k)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const D=i(f);if(D){if(D.type===z.Cuboid){for(const j of n)if(j.type===z.SolarPanel&&j.parentId===f.parentId&&ye.isIdentical(j.normal,f.normal)&&!j.locked&&Math.abs(j.tiltAngle-k)>Et)return!0}else for(const j of n)if(j.type===z.SolarPanel&&j.parentId===f.parentId&&!j.locked&&Math.abs(j.tiltAngle-k)>Et)return!0}break}default:{if(Math.abs((f==null?void 0:f.tiltAngle)-k)>Et)return!0;break}}return!1}},H=k=>{if(g&&(k=-k),!!f&&R(k)){switch(C.current=void 0,l){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const D of n)if(D.type===z.SolarPanel&&D.parentType!==z.Wall&&M.getState().selectedElementIdSet.has(D.id)&&.5*D.ly*Math.abs(Math.sin(k))>D.poleHeight){S.current=!0;break}if(S.current)C.current=k,y(f.tiltAngle);else{const D=new Map;for(const j of n)j.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(j.id)&&D.set(j.id,j.tiltAngle);const L={name:"Set Tilt Angle for Selected Solar Panel Arrays",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())r(j,B)},redo:()=>{x(L.oldValues,L.newValue,!g)}};a(L),x(D,k,!g),u(c+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const D of n)if(D.type===z.SolarPanel&&D.parentType!==z.Wall&&.5*D.ly*Math.abs(Math.sin(k))>D.poleHeight){S.current=!0;break}if(S.current)C.current=k,y(f.tiltAngle);else{const D=new Map;for(const j of n)j.type===z.SolarPanel&&D.set(j.id,j.tiltAngle);const L={name:"Set Tilt Angle for All Solar Panel Arrays",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())r(j,B)},redo:()=>{w(L.newValue,!g)}};a(L),w(k,!g),u(c+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){S.current=!1;for(const D of n)if(D.type===z.SolarPanel&&D.foundationId===f.foundationId&&D.parentType!==z.Wall&&.5*D.ly*Math.abs(Math.sin(k))>D.poleHeight){S.current=!0;break}if(S.current)C.current=k,y(f.tiltAngle);else{const D=new Map;for(const j of n)j.type===z.SolarPanel&&j.foundationId===f.foundationId&&D.set(j.id,j.tiltAngle);const L={name:"Set Tilt Angle for All Solar Panel Arrays Above Foundation",timestamp:Date.now(),oldValues:D,newValue:k,groupId:f.foundationId,undo:()=>{for(const[j,B]of L.oldValues.entries())r(j,B)},redo:()=>{L.groupId&&v(L.groupId,L.newValue,!g)}};a(L),v(f.foundationId,k,!g),u(c+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{const D=i(f);if(D){S.current=!1;const L=D.type===z.Cuboid;if(L){for(const j of n)if(j.type===z.SolarPanel&&j.parentId===f.parentId&&ye.isIdentical(j.normal,f.normal)&&.5*j.ly*Math.abs(Math.sin(k))>j.poleHeight){S.current=!0;break}}else if(f.parentType===z.Wall)S.current=!1;else for(const j of n)if(j.type===z.SolarPanel&&j.parentId===f.parentId&&.5*j.ly*Math.abs(Math.sin(k))>j.poleHeight){S.current=!0;break}if(S.current)C.current=k,y(f.tiltAngle);else{const j=new Map;if(L)for(const V of n)V.type===z.SolarPanel&&V.parentId===f.parentId&&ye.isIdentical(V.normal,f.normal)&&j.set(V.id,V.tiltAngle);else for(const V of n)V.type===z.SolarPanel&&V.parentId===f.parentId&&j.set(V.id,V.tiltAngle);const B=L?f.normal:void 0,O={name:"Set Tilt Angle for All Solar Panel Arrays on Surface",timestamp:Date.now(),oldValues:j,newValue:k,groupId:f.parentId,normal:B,undo:()=>{for(const[V,G]of O.oldValues.entries())r(V,G)},redo:()=>{O.groupId&&T(O.groupId,O.normal,O.newValue)}};a(O),T(f.parentId,B,k),u(c+1)}}break}default:{const D=o(f.id),L=D?D.tiltAngle:f.tiltAngle;if(S.current=.5*f.ly*Math.abs(Math.sin(k))>f.poleHeight,f.parentType===z.Wall&&(S.current=!1),S.current)C.current=k,y(L);else{const j={name:"Set Solar Panel Array Tilt Angle",timestamp:Date.now(),oldValue:L,newValue:k,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(j.changedElementId,j.oldValue)},redo:()=>{r(j.changedElementId,j.newValue)}};a(j),r(f.id,k),u(c+1)}break}}e(D=>{D.actionState.solarPanelTiltAngle=k})}},F=()=>{S.current=!1,t(!1)},E=()=>{F(),d()},N=()=>{H(A),S.current||(t(!1),u(0))},U=()=>{H(A)},W=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+ye.toDegrees(C.current).toFixed(1)+"°)":null):null;return h.jsx(so,{width:550,title:Y.t("solarPanelMenu.TiltAngle",P),rejectedMessage:W,onApply:U,onClose:F,onClickCancel:E,onClickOk:N,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:g?0:-90,max:90,style:{width:120},precision:2,value:parseFloat(ye.toDegrees(A).toFixed(2)),step:1,formatter:k=>`${k}°`,onChange:k=>{k!==null&&y(ye.toRadians(k))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",P),": [",g?"0°":"-90°",", 90°]",h.jsx("br",{}),Y.t("solarPanelMenu.SouthFacingIsPositive",P)]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:18,children:h.jsx(Le.Group,{onChange:b,value:l,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",P)})]})})})]})})},upo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Qq),i=M(yYe),a=M(AYe),l=M(wYe),s=M(Gr),c=M(En),u=M(vh),d=M(xh),f=M(no),p=M(Qn),g=M(Xi),A=uo(z.SolarPanel),y=m.useRef(!1),S=m.useRef(),[C,P]=m.useState(A?-A.relativeAzimuth:0),v=$t(),T=k=>{d(k.target.value)},w=(k,D)=>{const L=s(k);if(L){if(L.type===z.Cuboid&&!ye.isIdentical(k.normal,as))return!0;const j=JSON.parse(JSON.stringify(k));return j.relativeAzimuth=-D,L.type===z.Roof?ye.checkElementOnRoofState(j,L)===pa.Valid:ye.isSolarCollectorWithinHorizontalSurface(j,L)}return!1},x=(k,D)=>!w(k,D),b=k=>{if(A){switch(u){case re.AllSelectedObjectsOfThisType:for(const D of n)if(D.type===z.SolarPanel&&!D.locked&&D.parentType!==z.Wall&&M.getState().selectedElementIdSet.has(D.id)&&Math.abs(-D.relativeAzimuth-k)>Et)return!0;break;case re.AllObjectsOfThisType:for(const D of n)if(D.type===z.SolarPanel&&!D.locked&&D.parentType!==z.Wall&&Math.abs(-D.relativeAzimuth-k)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const D of n)if(D.type===z.SolarPanel&&D.foundationId===(A==null?void 0:A.foundationId)&&!D.locked&&D.parentType!==z.Wall&&Math.abs(-D.relativeAzimuth-k)>Et)return!0;break;case re.AllObjectsOfThisTypeOnSurface:if(A!=null&&A.parentId){const D=s(A);if(D){if(D.type===z.Cuboid){for(const j of n)if(j.type===z.SolarPanel&&j.parentId===A.parentId&&ye.isIdentical(j.normal,A.normal)&&!j.locked&&Math.abs(-j.relativeAzimuth-k)>Et)return!0}else for(const j of n)if(j.type===z.SolarPanel&&j.parentId===A.parentId&&!j.locked&&Math.abs(-j.relativeAzimuth-k)>Et)return!0}}break;default:if(Math.abs(-(A==null?void 0:A.relativeAzimuth)-k)>Et)return!0}return!1}},R=(k,D)=>{M.getState().set(L=>{for(const j of L.elements)if(j.type===z.SolarPanel&&!j.locked&&k.has(j.id)){const B=j;B.relativeAzimuth=D}})},H=k=>{if(A&&b(k)){switch(S.current=void 0,u){case re.AllSelectedObjectsOfThisType:{y.current=!1;for(const D of n)if(D.type===z.SolarPanel&&D.parentType!==z.Wall&&M.getState().selectedElementIdSet.has(D.id)&&x(D,k)){y.current=!0;break}if(y.current)S.current=k,P(-A.relativeAzimuth);else{const D=new Map;for(const j of n)j.type===z.SolarPanel&&j.parentType!==z.Wall&&M.getState().selectedElementIdSet.has(j.id)&&D.set(j.id,-j.relativeAzimuth);const L={name:"Set Relative Azimuth for Selected Solar Panel Arrays",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())r(j,-B)},redo:()=>{R(L.oldValues,L.newValue)}};c(L),R(D,-k),p(f+1)}break}case re.AllObjectsOfThisType:{y.current=!1;for(const D of n)if(D.type===z.SolarPanel&&D.parentType!==z.Wall&&x(D,k)){y.current=!0;break}if(y.current)S.current=k,P(-A.relativeAzimuth);else{const D=new Map;for(const j of n)j.type===z.SolarPanel&&j.parentType!==z.Wall&&D.set(j.id,-j.relativeAzimuth);const L={name:"Set Relative Azimuth for All Solar Panel Arrays",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())r(j,-B)},redo:()=>{l(z.SolarPanel,-L.newValue)}};c(L),l(z.SolarPanel,-k),p(f+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(A.foundationId){y.current=!1;for(const D of n)if(D.type===z.SolarPanel&&D.foundationId===A.foundationId&&D.parentType!==z.Wall&&x(D,k)){y.current=!0;break}if(y.current)S.current=k,P(-A.relativeAzimuth);else{const D=new Map;for(const j of n)j.type===z.SolarPanel&&j.foundationId===A.foundationId&&j.parentType!==z.Wall&&D.set(j.id,-j.relativeAzimuth);const L={name:"Set Relative Azimuth for All Solar Panel Arrays Above Foundation",timestamp:Date.now(),oldValues:D,newValue:k,groupId:A.foundationId,undo:()=>{for(const[j,B]of L.oldValues.entries())r(j,-B)},redo:()=>{L.groupId&&a(z.SolarPanel,L.groupId,-L.newValue)}};c(L),a(z.SolarPanel,A.foundationId,-k),p(f+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{if(A.parentId){const D=s(A);if(D){if(y.current=!1,D.type===z.Cuboid){for(const j of n)if(j.type===z.SolarPanel&&j.parentId===A.parentId&&ye.isIdentical(j.normal,A.normal)&&x(j,k)){y.current=!0;break}}else for(const j of n)if(j.type===z.SolarPanel&&j.parentId===A.parentId&&x(j,k)){y.current=!0;break}if(y.current)S.current=k,P(-A.relativeAzimuth);else{const j=new Map,B=D.type===z.Cuboid;if(B)for(const G of n)G.type===z.SolarPanel&&G.parentId===A.parentId&&ye.isIdentical(G.normal,A.normal)&&j.set(G.id,-G.relativeAzimuth);else for(const G of n)G.type===z.SolarPanel&&G.parentId===A.parentId&&j.set(G.id,-G.relativeAzimuth);const O=B?A.normal:void 0,V={name:"Set Relative Azimuth for All Solar Panel Arrays on Surface",timestamp:Date.now(),oldValues:j,newValue:k,groupId:A.parentId,normal:O,undo:()=>{for(const[G,Q]of V.oldValues.entries())r(G,-Q)},redo:()=>{V.groupId&&i(z.SolarPanel,V.groupId,V.normal,-V.newValue)}};c(V),i(z.SolarPanel,A.parentId,O,-k),p(f+1)}}}break}default:{const D=o(A.id),L=D?-D.relativeAzimuth:-A.relativeAzimuth;if(y.current=x(A,k),y.current)S.current=k,P(L);else{const j={name:"Set Solar Panel Array Relative Azimuth",timestamp:Date.now(),oldValue:L,newValue:k,changedElementId:A.id,changedElementType:A.type,undo:()=>{r(j.changedElementId,-j.oldValue)},redo:()=>{r(j.changedElementId,-j.newValue)}};c(j),r(A.id,-k),p(f+1)}break}}e(D=>{D.actionState.solarPanelRelativeAzimuth=-k})}},F=()=>{y.current=!1,t(!1)},E=()=>{F(),g()},N=()=>{H(C),y.current||(t(!1),p(0))},U=()=>{H(C)},W=y.current?": "+Y.t("message.NotApplicableToSelectedAction",v)+(S.current!==void 0?" ("+ye.toDegrees(S.current).toFixed(1)+"°)":null):null;return h.jsx(so,{width:550,title:Y.t("solarCollectorMenu.RelativeAzimuth",v),rejectedMessage:W,onApply:U,onClose:F,onClickCancel:E,onClickOk:N,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:-180,max:180,style:{width:120},precision:2,step:1,value:parseFloat(ye.toDegrees(C).toFixed(2)),formatter:k=>`${k}°`,onChange:k=>{k!==null&&P(ye.toRadians(k))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",v),": [-180°, 180°]",h.jsx("br",{}),Y.t("message.AzimuthOfNorthIsZero",v),h.jsx("br",{}),Y.t("message.CounterclockwiseAzimuthIsPositive",v)]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:18,children:h.jsx(Le.Group,{onChange:T,value:u,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",v)})]})})})]})})},dpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(En),a=M(vh),l=M(xh),s=M(no),c=M(Qn),u=uo(),[d,f]=m.useState((u==null?void 0:u.trackerType)??Ll.NO_TRACKER),p=$t(),{Option:g}=Uo,A=(R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.SolarPanel&&E.id===R&&!E.locked){E.trackerType=H;break}})},y=(R,H)=>{e(F=>{for(const E of F.elements)E.type===z.SolarPanel&&E.foundationId===R&&!E.locked&&(E.trackerType=H)})},S=(R,H,F)=>{e(E=>{for(const N of E.elements)if(N.type===z.SolarPanel&&!N.locked){let U;H?U=N.parentId===R&&ye.isIdentical(N.normal,H):U=N.parentId===R,U&&(N.trackerType=F)}})},C=R=>{e(H=>{for(const F of H.elements)F.type===z.SolarPanel&&!F.locked&&(F.trackerType=R)})},P=(R,H)=>{M.getState().set(F=>{for(const E of F.elements)E.type===z.SolarPanel&&!E.locked&&R.has(E.id)&&(E.trackerType=H)})},v=R=>{l(R.target.value)},T=R=>{if(u){switch(a){case re.AllSelectedObjectsOfThisType:{for(const H of n)if(H.type===z.SolarPanel&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&H.trackerType!==R)return!0;break}case re.AllObjectsOfThisType:{for(const H of n)if(H.type===z.SolarPanel&&!H.locked&&H.trackerType!==R)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const H of n)if(H.type===z.SolarPanel&&H.foundationId===(u==null?void 0:u.foundationId)&&!H.locked&&H.trackerType!==R)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const H=r(u);if(H){if(H.type===z.Cuboid){for(const E of n)if(E.type===z.SolarPanel&&E.parentId===u.parentId&&ye.isIdentical(E.normal,u.normal)&&!E.locked&&E.trackerType!==R)return!0}else for(const E of n)if(E.type===z.SolarPanel&&E.parentId===u.parentId&&!E.locked&&E.trackerType!==R)return!0}break}default:{if((u==null?void 0:u.trackerType)!==R)return!0;break}}return!1}},w=R=>{if(u&&T(R))switch(a){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(E.id)&&H.set(E.id,E.trackerType);const F={name:"Set Tracker Type for Selected Solar Panel Arrays",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())A(E,N)},redo:()=>{P(F.oldValues,F.newValue)}};i(F),P(H,R),c(s+1);break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.SolarPanel&&H.set(E.id,E.trackerType);const F={name:"Set Tracker Type for All Solar Panel Arrays",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())A(E,N)},redo:()=>{C(F.newValue)}};i(F),C(R),c(s+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const H=new Map;for(const E of n)E.type===z.SolarPanel&&E.foundationId===u.foundationId&&H.set(E.id,E.trackerType);const F={name:"Set Tracker Type for All Solar Panel Arrays Above Foundation",timestamp:Date.now(),oldValues:H,newValue:R,groupId:u.foundationId,undo:()=>{for(const[E,N]of F.oldValues.entries())A(E,N)},redo:()=>{F.groupId&&y(F.groupId,F.newValue)}};i(F),y(u.foundationId,R),c(s+1)}break}case re.AllObjectsOfThisTypeOnSurface:{const H=r(u);if(H){const F=new Map,E=H.type===z.Cuboid;if(E)for(const W of n)W.type===z.SolarPanel&&W.parentId===u.parentId&&ye.isIdentical(W.normal,u.normal)&&F.set(W.id,W.trackerType);else for(const W of n)W.type===z.SolarPanel&&W.parentId===u.parentId&&F.set(W.id,W.trackerType);const N=E?u.normal:void 0,U={name:"Set Tracker Type for All Solar Panel Arrays on Surface",timestamp:Date.now(),oldValues:F,newValue:R,groupId:u.parentId,normal:N,undo:()=>{for(const[W,k]of U.oldValues.entries())A(W,k)},redo:()=>{U.groupId&&S(U.groupId,U.normal,U.newValue)}};i(U),S(u.parentId,N,R),c(s+1)}break}default:{const H=o(u.id),F=H?H.trackerType:u.trackerType,E={name:"Set Solar Panel Array Tracker Type",timestamp:Date.now(),oldValue:F,newValue:R,changedElementId:u.id,changedElementType:u.type,undo:()=>{A(E.changedElementId,E.oldValue)},redo:()=>{A(E.changedElementId,E.newValue)}};i(E),A(u.id,R),c(s+1);break}}},x=()=>{t(!1)},b=()=>{w(d)};return h.jsx(so,{width:550,title:Y.t("solarPanelMenu.Tracker",p),onApply:b,onClose:x,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsxs(Uo,{style:{width:"120px"},value:d,onChange:R=>f(R),children:[h.jsx(g,{value:Ll.NO_TRACKER,title:Y.t("solarPanelMenu.NoTracker",p),children:Y.t("word.None",p)},"NONE"),h.jsx(g,{value:Ll.HORIZONTAL_SINGLE_AXIS_TRACKER,title:Y.t("solarPanelMenu.HorizontalSingleAxisTracker",p),children:"HSAT"},"HSAT"),h.jsx(g,{value:Ll.VERTICAL_SINGLE_AXIS_TRACKER,title:Y.t("solarPanelMenu.VerticalSingleAxisTracker",p),children:"VSAT"},"VSAT"),h.jsx(g,{value:Ll.ALTAZIMUTH_DUAL_AXIS_TRACKER,title:Y.t("solarPanelMenu.AltazimuthDualAxisTracker",p),children:"AADAT"},"AADAT")]}),h.jsx("div",{style:{paddingTop:"20px",paddingRight:"10px",textAlign:"left",fontSize:"11px"},children:Y.t("solarPanelMenu.SolarTrackerFollowsSun",p)})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",p)})]})})})]})})},fpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(En),a=M(vh),l=M(xh),s=M(no),c=M(Qn),u=uo(z.SolarPanel),[d,f]=m.useState((u==null?void 0:u.frameColor)??"white"),p=$t(),g=(b,R)=>{e(H=>{for(const F of H.elements)if(F.type===z.SolarPanel&&F.id===b&&!F.locked){F.frameColor=R;break}})},A=(b,R)=>{e(H=>{for(const F of H.elements)F.type===z.SolarPanel&&F.foundationId===b&&!F.locked&&(F.frameColor=R)})},y=(b,R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.SolarPanel&&!E.locked){let N;R?N=E.parentId===b&&ye.isIdentical(E.normal,R):N=E.parentId===b,N&&(E.frameColor=H)}})},S=b=>{e(R=>{for(const H of R.elements)H.type===z.SolarPanel&&!H.locked&&(H.frameColor=b)})},C=(b,R)=>{M.getState().set(H=>{for(const F of H.elements)F.type===z.SolarPanel&&!F.locked&&b.has(F.id)&&(F.frameColor=R)})},P=b=>{l(b.target.value)},v=b=>{if(u){switch(a){case re.AllSelectedObjectsOfThisType:{for(const R of n)if(R.type===z.SolarPanel&&!R.locked&&M.getState().selectedElementIdSet.has(R.id)&&R.frameColor!==b)return!0;break}case re.AllObjectsOfThisType:{for(const R of n)if(R.type===z.SolarPanel&&!R.locked&&R.frameColor!==b)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const R of n)if(R.type===z.SolarPanel&&R.foundationId===(u==null?void 0:u.foundationId)&&!R.locked&&R.frameColor!==b)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const R=r(u);if(R){if(R.type===z.Cuboid){for(const F of n)if(F.type===z.SolarPanel&&F.parentId===u.parentId&&ye.isIdentical(F.normal,u.normal)&&!F.locked&&F.frameColor!==b)return!0}else for(const F of n)if(F.type===z.SolarPanel&&F.parentId===u.parentId&&!F.locked&&F.frameColor!==b)return!0}break}default:{if((u==null?void 0:u.frameColor)!==b)return!0;break}}return!1}},T=b=>{if(u&&v(b)){switch(a){case re.AllSelectedObjectsOfThisType:{const R=new Map;for(const F of n)F.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(F.id)&&R.set(F.id,F.frameColor??"white");const H={name:"Set Frame Color for Selected Solar Panels",timestamp:Date.now(),oldValues:R,newValue:b,undo:()=>{for(const[F,E]of H.oldValues.entries())g(F,E)},redo:()=>{C(H.oldValues,H.newValue)}};i(H),C(R,b),c(s+1);break}case re.AllObjectsOfThisType:{const R=new Map;for(const F of n)F.type===z.SolarPanel&&R.set(F.id,F.frameColor??"white");const H={name:"Set Frame Color for All Solar Panels",timestamp:Date.now(),oldValues:R,newValue:b,undo:()=>{for(const[F,E]of H.oldValues.entries())g(F,E)},redo:()=>{S(H.newValue)}};i(H),S(b),c(s+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const R=new Map;for(const F of n)F.type===z.SolarPanel&&F.foundationId===u.foundationId&&R.set(F.id,F.frameColor??"white");const H={name:"Set Frame Color for All Solar Panels Above Foundation",timestamp:Date.now(),oldValues:R,newValue:b,groupId:u.foundationId,undo:()=>{for(const[F,E]of H.oldValues.entries())g(F,E)},redo:()=>{H.groupId&&A(H.groupId,H.newValue)}};i(H),A(u.foundationId,b),c(s+1)}break}case re.AllObjectsOfThisTypeOnSurface:{const R=r(u);if(R){const H=new Map,F=R.type===z.Cuboid;if(F)for(const U of n)U.type===z.SolarPanel&&U.parentId===u.parentId&&ye.isIdentical(U.normal,u.normal)&&H.set(U.id,U.frameColor??"white");else for(const U of n)U.type===z.SolarPanel&&U.parentId===u.parentId&&H.set(U.id,U.frameColor??"white");const E=F?u.normal:void 0,N={name:"Set Frame Color for All Solar Panels on Surface",timestamp:Date.now(),oldValues:H,newValue:b,groupId:u.parentId,normal:E,undo:()=>{for(const[U,W]of N.oldValues.entries())g(U,W)},redo:()=>{N.groupId&&y(N.groupId,N.normal,N.newValue)}};i(N),y(u.parentId,E,b),c(s+1)}break}default:{const R=o(u.id),H=R?R.frameColor:u.frameColor,F={name:"Set Frame Color of Selected Solar Panel",timestamp:Date.now(),oldValue:H,newValue:b,changedElementId:u.id,changedElementType:u.type,undo:()=>{g(u.id,F.oldValue)},redo:()=>{g(u.id,F.newValue)}};i(F),g(u.id,b),c(s+1);break}}e(R=>{R.actionState.solarPanelFrameColor=b})}},w=()=>{t(!1)},x=()=>{T(d)};return h.jsx(so,{width:680,title:Y.t("solarPanelMenu.FrameColor",p),onApply:x,onClose:w,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:10,children:h.jsx(Ld,{color:d??(u==null?void 0:u.color)??"white",onChangeComplete:b=>{f(b.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:14,children:h.jsx(Le.Group,{onChange:P,value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",p)})]})})})]})})},hpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(TW),i=M(p7t),a=M(PW),l=M(CW),s=M(Gr),c=M(En),u=M(vh),d=M(xh),f=M(no),p=M(Qn),g=M(Xi),A=uo(z.SolarPanel),[y,S]=m.useState((A==null?void 0:A.poleHeight)??0),C=m.useRef(!1),P=m.useRef(),v=$t(),T=U=>{d(U.target.value)},w=U=>{if(A){switch(u){case re.AllSelectedObjectsOfThisType:{for(const W of n)if(W.type===z.SolarPanel&&!W.locked&&M.getState().selectedElementIdSet.has(W.id)&&Math.abs(W.poleHeight-U)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const W of n)if(W.type===z.SolarPanel&&!W.locked&&Math.abs(W.poleHeight-U)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const W of n)if(W.type===z.SolarPanel&&W.foundationId===(A==null?void 0:A.foundationId)&&!W.locked&&Math.abs(W.poleHeight-U)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const W=s(A);if(W){if(W.type===z.Cuboid){for(const D of n)if(D.type===z.SolarPanel&&D.parentId===A.parentId&&ye.isIdentical(D.normal,A.normal)&&!D.locked&&Math.abs(D.poleHeight-U)>Et)return!0}else for(const D of n)if(D.type===z.SolarPanel&&D.parentId===A.parentId&&!D.locked&&Math.abs(D.poleHeight-U)>Et)return!0}break}default:{if(Math.abs((A==null?void 0:A.poleHeight)-U)>Et)return!0;break}}return!1}},x=(U,W)=>{M.getState().set(k=>{for(const D of k.elements)if(D.type===z.SolarPanel&&!D.locked&&U.has(D.id)){const L=D;L.poleHeight=W}})},b=U=>{if(A&&w(U)){switch(P.current=void 0,u){case re.AllSelectedObjectsOfThisType:{C.current=!1;for(const W of n)if(W.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(W.id)&&.5*W.ly*Math.abs(Math.sin(W.tiltAngle))>U){C.current=!0;break}if(C.current)P.current=U,S(A.poleHeight);else{const W=new Map;for(const D of n)D.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(D.id)&&W.set(D.id,D.poleHeight);const k={name:"Set Pole Height for Selected Solar Panel Arrays",timestamp:Date.now(),oldValues:W,newValue:U,undo:()=>{for(const[D,L]of k.oldValues.entries())r(D,L)},redo:()=>{x(k.oldValues,k.newValue)}};c(k),x(W,U),p(f+1)}break}case re.AllObjectsOfThisType:{C.current=!1;for(const W of n)if(W.type===z.SolarPanel&&.5*W.ly*Math.abs(Math.sin(W.tiltAngle))>U){C.current=!0;break}if(C.current)P.current=U,S(A.poleHeight);else{const W=new Map;for(const D of n)D.type===z.SolarPanel&&W.set(D.id,D.poleHeight);const k={name:"Set Pole Height for All Solar Panel Arrays",timestamp:Date.now(),oldValues:W,newValue:U,undo:()=>{for(const[D,L]of k.oldValues.entries())r(D,L)},redo:()=>{l(z.SolarPanel,k.newValue)}};c(k),l(z.SolarPanel,U),p(f+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(A.foundationId){C.current=!1;for(const W of n)if(W.type===z.SolarPanel&&W.foundationId===A.foundationId&&.5*W.ly*Math.abs(Math.sin(W.tiltAngle))>U){C.current=!0;break}if(C.current)P.current=U,S(A.poleHeight);else{const W=new Map;for(const D of n)D.type===z.SolarPanel&&D.foundationId===A.foundationId&&W.set(D.id,D.poleHeight);const k={name:"Set Pole Height for All Solar Panel Arrays Above Foundation",timestamp:Date.now(),oldValues:W,newValue:U,groupId:A.foundationId,undo:()=>{for(const[D,L]of k.oldValues.entries())r(D,L)},redo:()=>{k.groupId&&a(z.SolarPanel,k.groupId,k.newValue)}};c(k),a(z.SolarPanel,A.foundationId,U),p(f+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{const W=s(A);if(W){if(C.current=!1,W.type===z.Cuboid){for(const D of n)if(D.type===z.SolarPanel&&D.parentId===A.parentId&&ye.isIdentical(D.normal,A.normal)&&.5*D.ly*Math.abs(Math.sin(D.tiltAngle))>U){C.current=!0;break}}else for(const D of n)if(D.type===z.SolarPanel&&D.parentId===A.parentId&&.5*D.ly*Math.abs(Math.sin(D.tiltAngle))>U){C.current=!0;break}if(C.current)P.current=U,S(A.poleHeight);else{const D=new Map,L=W.type===z.Cuboid;if(L)for(const O of n)O.type===z.SolarPanel&&O.parentId===A.parentId&&ye.isIdentical(O.normal,A.normal)&&D.set(O.id,O.poleHeight);else for(const O of n)O.type===z.SolarPanel&&O.parentId===A.parentId&&D.set(O.id,O.poleHeight);const j=L?A.normal:void 0,B={name:"Set Pole Height for All Solar Panel Arrays on Surface",timestamp:Date.now(),oldValues:D,newValue:U,groupId:A.parentId,normal:j,undo:()=>{for(const[O,V]of B.oldValues.entries())r(O,V)},redo:()=>{B.groupId&&i(z.SolarPanel,B.groupId,B.normal,B.newValue)}};c(B),i(z.SolarPanel,A.parentId,j,U),p(f+1)}}break}default:{const W=o(A.id),k=W?W.poleHeight:A.poleHeight;if(C.current=.5*A.ly*Math.abs(Math.sin(A.tiltAngle))>U,C.current)P.current=U,S(k);else{const D={name:"Set Solar Panel Array Pole Height",timestamp:Date.now(),oldValue:k,newValue:U,changedElementId:A.id,changedElementType:A.type,undo:()=>{r(D.changedElementId,D.oldValue)},redo:()=>{r(D.changedElementId,D.newValue)}};c(D),r(A.id,U),p(f+1)}break}}e(W=>{W.actionState.solarPanelPoleHeight=U})}},R=()=>{C.current=!1,t(!1)},H=()=>{R(),g()},F=()=>{b(y),C.current||(t(!1),p(0))},E=()=>{b(y)},N=C.current?": "+Y.t("message.NotApplicableToSelectedAction",v)+(P.current!==void 0?" ("+P.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("solarCollectorMenu.PoleHeight",v),rejectedMessage:N,onApply:E,onClose:R,onClickCancel:H,onClickOk:F,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:0,max:10,style:{width:120},step:.1,precision:2,value:y,onChange:U=>{U!==null&&S(U)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",v),": [0, 10] ",Y.t("word.MeterAbbreviation",v)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",v)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:T,value:u,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",v)})]})})})]})})},ppo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(En),a=M(vh),l=M(xh),s=M(no),c=M(Qn),u=uo(z.SolarPanel),[d,f]=m.useState((u==null?void 0:u.poleSpacing)??0),p=$t(),g=(b,R)=>{e(H=>{for(const F of H.elements)if(F.type===z.SolarPanel&&F.id===b&&!F.locked){const E=F;E.poleSpacing=R;break}})},A=(b,R)=>{e(H=>{for(const F of H.elements)if(F.type===z.SolarPanel&&F.foundationId===b&&!F.locked){const E=F;E.poleSpacing=R}})},y=(b,R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.SolarPanel&&!E.locked){let N;if(R?N=E.parentId===b&&ye.isIdentical(E.normal,R):N=E.parentId===b,N){const U=E;U.poleSpacing=H}}})},S=b=>{e(R=>{for(const H of R.elements)if(H.type===z.SolarPanel&&!H.locked){const F=H;F.poleSpacing=b}})},C=(b,R)=>{M.getState().set(H=>{for(const F of H.elements)if(F.type===z.SolarPanel&&!F.locked&&b.has(F.id)){const E=F;E.poleSpacing=R}})},P=b=>{l(b.target.value)},v=b=>{if(u){switch(a){case re.AllSelectedObjectsOfThisType:{for(const R of n)if(R.type===z.SolarPanel&&!R.locked&&M.getState().selectedElementIdSet.has(R.id)&&Math.abs(R.poleSpacing-b)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const R of n)if(R.type===z.SolarPanel&&!R.locked&&Math.abs(R.poleSpacing-b)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const R of n)if(R.type===z.SolarPanel&&R.foundationId===(u==null?void 0:u.foundationId)&&!R.locked&&Math.abs(R.poleSpacing-b)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const R=r(u);if(R){if(R.type===z.Cuboid){for(const F of n)if(F.type===z.SolarPanel&&F.parentId===u.parentId&&ye.isIdentical(F.normal,u.normal)&&!F.locked&&Math.abs(F.poleSpacing-b)>Et)return!0}else for(const F of n)if(F.type===z.SolarPanel&&F.parentId===u.parentId&&!F.locked&&Math.abs(F.poleSpacing-b)>Et)return!0}break}default:{if(Math.abs((u==null?void 0:u.poleSpacing)-b)>Et)return!0;break}}return!1}},T=b=>{if(u&&v(b)){switch(a){case re.AllSelectedObjectsOfThisType:{const R=new Map;for(const F of n)F.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(F.id)&&R.set(F.id,F.poleSpacing);const H={name:"Set Pole Spacing for Selected Solar Panel Arrays",timestamp:Date.now(),oldValues:R,newValue:b,undo:()=>{for(const[F,E]of H.oldValues.entries())g(F,E)},redo:()=>{C(H.oldValues,H.newValue)}};i(H),C(R,b),c(s+1);break}case re.AllObjectsOfThisType:{const R=new Map;for(const F of n)F.type===z.SolarPanel&&R.set(F.id,F.poleSpacing);const H={name:"Set Pole Spacing for All Solar Panel Arrays",timestamp:Date.now(),oldValues:R,newValue:b,undo:()=>{for(const[F,E]of H.oldValues.entries())g(F,E)},redo:()=>{S(H.newValue)}};i(H),S(b),c(s+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const R=new Map;for(const F of n)F.type===z.SolarPanel&&F.foundationId===u.foundationId&&R.set(F.id,F.poleSpacing);const H={name:"Set Pole Spacing for All Solar Panel Arrays Above Foundation",timestamp:Date.now(),oldValues:R,newValue:b,groupId:u.foundationId,undo:()=>{for(const[F,E]of H.oldValues.entries())g(F,E)},redo:()=>{H.groupId&&A(H.groupId,H.newValue)}};i(H),A(u.foundationId,b),c(s+1)}break}case re.AllObjectsOfThisTypeOnSurface:{const R=r(u);if(R){const H=new Map,F=R.type===z.Cuboid;if(F)for(const U of n)U.type===z.SolarPanel&&U.parentId===u.parentId&&ye.isIdentical(U.normal,u.normal)&&H.set(U.id,U.poleSpacing);else for(const U of n)U.type===z.SolarPanel&&U.parentId===u.parentId&&H.set(U.id,U.poleSpacing);const E=F?u.normal:void 0,N={name:"Set Pole Spacing for All Solar Panel Arrays on Surface",timestamp:Date.now(),oldValues:H,newValue:b,groupId:u.parentId,normal:E,undo:()=>{for(const[U,W]of N.oldValues.entries())g(U,W)},redo:()=>{N.groupId&&y(N.groupId,N.normal,N.newValue)}};i(N),y(u.parentId,E,b),c(s+1)}break}default:{const R=o(u.id),H=R?R.poleSpacing:u.poleSpacing,F={name:"Set Solar Panel Array Pole Spacing",timestamp:Date.now(),oldValue:H,newValue:b,changedElementId:u.id,changedElementType:u.type,undo:()=>{g(F.changedElementId,F.oldValue)},redo:()=>{g(F.changedElementId,F.newValue)}};i(F),g(u.id,b),c(s+1);break}}e(R=>{R.actionState.solarPanelPoleSpacing=b})}},w=()=>{t(!1)},x=()=>{T(d),t(!1),c(0)};return h.jsx(so,{width:550,title:Y.t("solarPanelMenu.PoleSpacing",p),onApply:x,onClose:w,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:10,step:1,style:{width:120},precision:2,value:d,onChange:b=>{b!==null&&f(b)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [1, 10] ",Y.t("word.MeterAbbreviation",p)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",p)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P,value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarPanelMenu.AllSolarPanelsOnSurface",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",p)})]})})})]})})},gpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Gr),r=M(Jn),i=M(s7t),a=M(c7t),l=M(u7t),s=M(En),c=M(vh),u=M(xh),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.SolarPanel),[A,y]=m.useState((g==null?void 0:g.cx)??0),S=m.useRef(!1),C=m.useRef(),P=$t(),v=U=>{u(U.target.value)},T=U=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const W of n)if(W.type===z.SolarPanel&&!W.locked&&Math.abs(W.cx-U)>Et)return!0;break;case re.AllObjectsOfThisType:for(const W of n)if(W.type===z.SolarPanel&&!W.locked&&M.getState().selectedElementIdSet.has(W.id)&&Math.abs(W.cx-U)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const W of n)if(W.type===z.SolarPanel&&W.foundationId===(g==null?void 0:g.foundationId)&&!W.locked&&Math.abs(W.cx-U)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.cx)-U)>Et)return!0}return!1}},w=(U,W)=>{M.getState().set(k=>{for(const D of k.elements)if(D.type===z.SolarPanel&&!D.locked&&U.has(D.id)){const L=D;L.cx=W}})},x=(U,W,k)=>U+.5*W/k<.5&&U-.5*W/k>-.5,b=U=>{if(!g||!T(U))return;C.current=void 0;const W=o(g);if(W){switch(c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(k.id)&&!x(U,g.lx,W.lx)){S.current=!0;break}if(S.current)C.current=U,y(g.cx);else{const k=new Map;for(const L of n)L.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.cx);const D={name:"Set Center X for Selected Solar Panel",timestamp:Date.now(),oldValues:k,newValue:U,undo:()=>{for(const[L,j]of D.oldValues.entries())i(L,j)},redo:()=>{w(D.oldValues,D.newValue)}};s(D),w(k,U),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.SolarPanel&&!x(U,g.lx,W.lx)){S.current=!0;break}if(S.current)C.current=U,y(g.cx);else{const k=new Map;for(const L of n)L.type===z.SolarPanel&&k.set(L.id,L.cx);const D={name:"Set Center X for All Solar Panels",timestamp:Date.now(),oldValues:k,newValue:U,undo:()=>{for(const[L,j]of D.oldValues.entries())i(L,j)},redo:()=>{l(z.SolarPanel,D.newValue)}};s(D),l(z.SolarPanel,U),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.SolarPanel&&k.foundationId===g.foundationId&&!x(U,g.lx,W.lx)){S.current=!0;break}if(S.current)C.current=U,y(g.cx);else{const k=new Map;for(const L of n)L.type===z.SolarPanel&&L.foundationId===g.foundationId&&k.set(L.id,L.cx);const D={name:"Set Center X for All Solar Panels Above Foundation",timestamp:Date.now(),oldValues:k,newValue:U,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())i(L,j)},redo:()=>{D.groupId&&a(z.SolarPanel,D.groupId,D.newValue)}};s(D),a(z.SolarPanel,g.foundationId,U),f(d+1)}}break}default:{const k=r(g.id),D=k?k.cx:g.cx;if(S.current=!x(U,g.lx,W.lx),S.current)C.current=U,y(D);else{const L={name:"Set Solar Panel Center X",timestamp:Date.now(),oldValue:D,newValue:U,changedElementId:g.id,changedElementType:g.type,undo:()=>{i(L.changedElementId,L.oldValue)},redo:()=>{i(L.changedElementId,L.newValue)}};s(L),i(g.id,U),f(d+1)}break}}e(k=>{k.actionState.solarPanelCx=U})}},R=()=>{S.current=!1,t(!1)},H=()=>{R(),p()},F=()=>{b(A),S.current||(t(!1),f(0))},E=()=>{b(A)},N=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("solarCollectorMenu.RelativeXCoordinateOfCenter",P),rejectedMessage:N,onApply:E,onClose:R,onClickCancel:H,onClickOk:F,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:-.5,max:.5,style:{width:120},step:.01,precision:2,value:A,onChange:U=>{U!==null&&y(U)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",P),": [-0.5, 0.5]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",P)})]})})})]})})},mpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Gr),r=M(Jn),i=M(d7t),a=M(f7t),l=M(h7t),s=M(En),c=M(vh),u=M(xh),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.SolarPanel),[A,y]=m.useState((g==null?void 0:g.cy)??0),S=m.useRef(!1),C=m.useRef(),P=$t(),v=U=>{u(U.target.value)},T=U=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const W of n)if(W.type===z.SolarPanel&&!W.locked&&Math.abs(W.cy-U)>Et)return!0;break;case re.AllObjectsOfThisType:for(const W of n)if(W.type===z.SolarPanel&&!W.locked&&M.getState().selectedElementIdSet.has(W.id)&&Math.abs(W.cy-U)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const W of n)if(W.type===z.SolarPanel&&W.foundationId===(g==null?void 0:g.foundationId)&&!W.locked&&Math.abs(W.cy-U)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.cy)-U)>Et)return!0}return!1}},w=(U,W)=>{M.getState().set(k=>{for(const D of k.elements)if(D.type===z.SolarPanel&&!D.locked&&U.has(D.id)){const L=D;L.cy=W}})},x=(U,W,k)=>U+.5*W/k<.5&&U-.5*W/k>-.5,b=U=>{if(!g||!T(U))return;C.current=void 0;const W=o(g);if(W){switch(c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(k.id)&&!x(U,g.ly,W.ly)){S.current=!0;break}if(S.current)C.current=U,y(g.cy);else{const k=new Map;for(const L of n)L.type===z.SolarPanel&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.cy);const D={name:"Set Center Y for Selected Solar Panel",timestamp:Date.now(),oldValues:k,newValue:U,undo:()=>{for(const[L,j]of D.oldValues.entries())i(L,j)},redo:()=>{w(D.oldValues,D.newValue)}};s(D),w(k,U),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.SolarPanel&&!x(U,g.ly,W.ly)){S.current=!0;break}if(S.current)C.current=U,y(g.cy);else{const k=new Map;for(const L of n)L.type===z.SolarPanel&&k.set(L.id,L.cy);const D={name:"Set Center Y for All Solar Panels",timestamp:Date.now(),oldValues:k,newValue:U,undo:()=>{for(const[L,j]of D.oldValues.entries())i(L,j)},redo:()=>{l(z.SolarPanel,D.newValue)}};s(D),l(z.SolarPanel,U),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.SolarPanel&&k.foundationId===g.foundationId&&!x(U,g.ly,W.ly)){S.current=!0;break}if(S.current)C.current=U,y(g.cy);else{const k=new Map;for(const L of n)L.type===z.SolarPanel&&L.foundationId===g.foundationId&&k.set(L.id,L.cy);const D={name:"Set Center Y for All Solar Panels Above Foundation",timestamp:Date.now(),oldValues:k,newValue:U,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())i(L,j)},redo:()=>{D.groupId&&a(z.SolarPanel,D.groupId,D.newValue)}};s(D),a(z.SolarPanel,g.foundationId,U),f(d+1)}}break}default:{const k=r(g.id),D=k?k.cy:g.cy;if(S.current=!x(U,g.ly,W.ly),S.current)C.current=U,y(D);else{const L={name:"Set Solar Panel Center Y",timestamp:Date.now(),oldValue:D,newValue:U,changedElementId:g.id,changedElementType:g.type,undo:()=>{i(L.changedElementId,L.oldValue)},redo:()=>{i(L.changedElementId,L.newValue)}};s(L),i(g.id,U),f(d+1)}break}}e(k=>{k.actionState.solarPanelCy=U})}},R=()=>{S.current=!1,t(!1)},H=()=>{R(),p()},F=()=>{b(A),S.current||(t(!1),f(0))},E=()=>{b(A)},N=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("solarCollectorMenu.RelativeYCoordinateOfCenter",P),rejectedMessage:N,onApply:E,onClose:R,onClickCancel:H,onClickOk:F,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:-.5,max:.5,style:{width:120},step:.01,precision:2,value:A,onChange:U=>{U!==null&&y(U)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",P),": [-0.5, 0.5]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarPanelMenu.OnlyThisSolarPanel",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarPanelMenu.AllSolarPanelsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarPanelMenu.AllSelectedSolarPanels",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarPanelMenu.AllSolarPanels",P)})]})})})]})})},ypo=t=>{const e=[];if(t.type!==z.SolarPanel)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language},i=t.type===z.SolarPanel&&ye.isIdentical(n.normal,as);return e.push({key:"solar-panel-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"solar-panel-cut",label:h.jsx(kd,{})}),e.push({key:"solar-panel-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&(e.push({key:"solar-panel-model-change",label:h.jsxs(eo,{Dialog:rpo,children:[Y.t("solarPanelMenu.ChangePvModel",r)," (",n.pvModelName,") ..."]})},{key:"solar-panel-orientation",label:h.jsxs(eo,{Dialog:ipo,children:[Y.t("solarPanelMenu.Orientation",r)," ..."]})},{key:"solar-panel-length",label:h.jsxs(eo,{Dialog:apo,children:[Y.t("word.Length",r)," ..."]})},{key:"solar-panel-width",label:h.jsxs(eo,{Dialog:lpo,children:[Y.t("word.Width",r)," ..."]})}),e.push({key:"solar-panel-coordinates-submenu",label:h.jsx(an,{children:Y.t("solarCollectorMenu.Coordinates",r)}),children:[{key:"solar-panel-center-x",label:h.jsxs(eo,{Dialog:gpo,children:[Y.t("solarCollectorMenu.RelativeXCoordinateOfCenter",r)," ..."]})},{key:"solar-panel-center-y",label:h.jsxs(eo,{Dialog:mpo,children:[Y.t("solarCollectorMenu.RelativeYCoordinateOfCenter",r)," ..."]})}]}),n.parentType===z.Wall&&e.push({key:"solar-panel-tilt-angle-on-wall",label:h.jsxs(eo,{Dialog:kHe,children:[Y.t("solarPanelMenu.TiltAngle",r)," ..."]})}),i&&(n.trackerType===Ll.NO_TRACKER&&e.push({key:"solar-panel-tilt-angle",label:h.jsxs(eo,{Dialog:kHe,children:[Y.t("solarPanelMenu.TiltAngle",r)," ..."]})}),e.push({key:"solar-panel-relative-azimuth",label:h.jsxs(eo,{Dialog:upo,children:[Y.t("solarCollectorMenu.RelativeAzimuth",r)," ..."]})}),n.parentType!==z.Roof&&e.push({key:"solar-panel-tracker",label:h.jsxs(eo,{Dialog:dpo,children:[Y.t("solarPanelMenu.Tracker",r)," ..."]})})),e.push({key:"solar-panel-frame-color",label:h.jsxs(eo,{Dialog:fpo,children:[Y.t("solarPanelMenu.FrameColor",r)," ..."]})}),e.push({key:"solar-panel-draw-sun-beam",label:h.jsx(a2e,{solarCollector:n})}),e.push({key:"solar-panel-electrical-submenu",label:h.jsx(an,{children:Y.t("solarPanelMenu.ElectricalProperties",r)}),children:[{key:"solar-panel-inverter-efficiency",label:h.jsxs(eo,{Dialog:spo,children:[Y.t("solarPanelMenu.InverterEfficiency",r)," ..."]})},{key:"solar-panel-dc-ac-ratio",label:h.jsxs(eo,{Dialog:cpo,children:[Y.t("solarPanelMenu.DcToAcSizeRatio",r)," ..."]})}]}),e.push({key:"solar-panel-pole-submenu",label:h.jsx(an,{children:Y.t("solarCollectorMenu.Pole",r)}),children:[{key:"solar-panel-pole-height",label:h.jsxs(eo,{noPadding:!0,Dialog:hpo,children:[Y.t("solarCollectorMenu.PoleHeight",r)," ..."]})},{key:"solar-panel-pole-spacing",label:h.jsxs(eo,{noPadding:!0,Dialog:ppo,children:[Y.t("solarPanelMenu.PoleSpacing",r)," ..."]})}]}),e.push({key:"solar-panel-label",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",r)}),children:v3(n)})),{items:e}},Apo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(Fw),r=M($q),i=M(xW),a=M(Gr),l=M(En),s=M(AA),c=M(wA),u=M(no),d=M(Qn),f=M(Xi),p=uo(z.ParabolicTrough),[g,A]=m.useState((p==null?void 0:p.ly)??9),y=m.useRef(!1),S=m.useRef(),C=$t(),P=W=>{c(W.target.value)},v=(W,k)=>{const D=a(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.ly=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},T=(W,k)=>!v(W,k),w=W=>{if(p){switch(s){case re.AllSelectedObjectsOfThisType:for(const k of e)if(k.type===z.ParabolicTrough&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.ly-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of e)if(k.type===z.ParabolicTrough&&!k.locked&&Math.abs(k.ly-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of e)if(k.type===z.ParabolicTrough&&k.foundationId===(p==null?void 0:p.foundationId)&&!k.locked&&Math.abs(k.ly-W)>Et)return!0;break;default:if(Math.abs((p==null?void 0:p.ly)-W)>Et)return!0}return!1}},x=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.ParabolicTrough&&!L.locked&&W.has(L.id)&&(L.ly=k)})},b=W=>{if(p&&w(W))switch(S.current=void 0,s){case re.AllSelectedObjectsOfThisType:{y.current=!1;for(const k of e)if(k.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(k.id)&&T(k,W)){y.current=!0;break}if(y.current)S.current=W,A(p.ly);else{const k=new Map;for(const L of e)L.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.ly);const D={name:"Set Length for Selected Parabolic Troughs",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())o(L,j)},redo:()=>{x(D.oldValues,D.newValue)}};l(D),x(k,W),d(u+1)}break}case re.AllObjectsOfThisType:{y.current=!1;for(const k of e)if(k.type===z.ParabolicTrough&&T(k,W)){y.current=!0;break}if(y.current)S.current=W,A(p.ly);else{const k=new Map;for(const L of e)L.type===z.ParabolicTrough&&k.set(L.id,L.ly);const D={name:"Set Length for All Parabolic Troughs",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())o(L,j)},redo:()=>{i(z.ParabolicTrough,D.newValue)}};l(D),i(z.ParabolicTrough,W),d(u+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(p.foundationId){y.current=!1;for(const k of e)if(k.type===z.ParabolicTrough&&k.foundationId===p.foundationId&&T(k,W)){y.current=!0;break}if(y.current)S.current=W,A(p.ly);else{const k=new Map;for(const L of e)L.type===z.ParabolicTrough&&L.foundationId===p.foundationId&&k.set(L.id,L.ly);const D={name:"Set Length for All Parabolic Troughs Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:p.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())o(L,j)},redo:()=>{D.groupId&&r(z.ParabolicTrough,D.groupId,D.newValue)}};l(D),r(z.ParabolicTrough,p.foundationId,W),d(u+1)}}break}default:{const k=n(p.id),D=k?k.ly:p.ly;if(y.current=T(p,W),y.current)S.current=W,A(D);else{const L={name:"Set Parabolic Trough Length",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:p.id,changedElementType:p.type,undo:()=>{o(L.changedElementId,L.oldValue)},redo:()=>{o(L.changedElementId,L.newValue)}};l(L),o(p.id,W),d(u+1)}break}}},R=()=>{y.current=!1,t(!1)},H=()=>{R(),f()},F=()=>{b(g),y.current||(t(!1),d(0))},E=W=>{if(!p)return 1;let k=W??1;return k=Math.max(1,Math.ceil((k-p.moduleLength/2)/p.moduleLength))*p.moduleLength,k},N=()=>{b(g)};if((p==null?void 0:p.type)!==z.ParabolicTrough)return null;const U=y.current?": "+Y.t("message.NotApplicableToSelectedAction",C)+(S.current!==void 0?" ("+S.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("word.Length",C),rejectedMessage:U,onApply:N,onClose:R,onClickCancel:H,onClickOk:F,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:p.moduleLength,max:100*p.moduleLength,step:p.moduleLength,precision:2,style:{width:120},value:g,onChange:W=>{A(E(W))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("parabolicTroughMenu.ModuleLength",C)+": "+p.moduleLength.toFixed(1)+" "+Y.t("word.MeterAbbreviation",C),h.jsx("br",{}),Math.round(g/p.moduleLength)+" "+Y.t("parabolicTroughMenu.ModulesLong",C),h.jsx("br",{}),Y.t("word.Maximum",C),": 100 ",Y.t("parabolicTroughMenu.Modules",C)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",C)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicTroughMenu.OnlyThisParabolicTrough",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicTroughMenu.AllParabolicTroughsAboveFoundation",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllSelectedParabolicTroughs",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllParabolicTroughs",C)})]})})})]})})},wpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(d3),i=M(qq),a=M(vW),l=M(Gr),s=M(En),c=M(AA),u=M(wA),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.ParabolicTrough),[A,y]=m.useState((g==null?void 0:g.lx)??2),S=m.useRef(!1),C=m.useRef(),P=$t(),v=W=>{u(W.target.value)},T=(W,k)=>{const D=l(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.lx=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},w=(W,k)=>!T(W,k),x=W=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const k of n)if(k.type===z.ParabolicTrough&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.lx-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of n)if(k.type===z.ParabolicTrough&&!k.locked&&Math.abs(k.lx-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of n)if(k.type===z.ParabolicTrough&&k.foundationId===(g==null?void 0:g.foundationId)&&!k.locked&&Math.abs(k.lx-W)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.lx)-W)>Et)return!0}return!1}},b=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.ParabolicTrough&&!L.locked&&W.has(L.id)&&(L.lx=k)})},R=W=>{if(g&&x(W)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(k.id)&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.lx);else{const k=new Map;for(const L of n)L.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.lx);const D={name:"Set Width for Selected Parabolic Troughs",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{b(D.oldValues,D.newValue)}};s(D),b(k,W),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.ParabolicTrough&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.lx);else{const k=new Map;for(const L of n)L.type===z.ParabolicTrough&&k.set(L.id,L.lx);const D={name:"Set Width for All Parabolic Troughs",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{a(z.ParabolicTrough,D.newValue)}};s(D),a(z.ParabolicTrough,W),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.ParabolicTrough&&k.foundationId===g.foundationId&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.lx);else{const k=new Map;for(const L of n)L.type===z.ParabolicTrough&&L.foundationId===g.foundationId&&k.set(L.id,L.lx);const D={name:"Set Width for All Parabolic Troughs Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{D.groupId&&i(z.ParabolicTrough,D.groupId,D.newValue)}};s(D),i(z.ParabolicTrough,g.foundationId,W),f(d+1)}}break}default:{const k=o(g.id),D=k?k.lx:g.lx;if(S.current=w(g,W),S.current)C.current=W,y(D);else{const L={name:"Set Parabolic Trough Width",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(L.changedElementId,L.oldValue)},redo:()=>{r(L.changedElementId,L.newValue)}};s(L),r(g.id,W),f(d+1)}break}}e(k=>{k.actionState.parabolicTroughWidth=W})}},H=()=>{S.current=!1,t(!1)},F=()=>{H(),p()},E=()=>{S.current||(t(!1),f(0))},N=()=>{R(A)};if((g==null?void 0:g.type)!==z.ParabolicTrough)return null;const U=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("word.Width",P),rejectedMessage:U,onApply:N,onClose:H,onClickCancel:F,onClickOk:E,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:10,step:.5,precision:2,style:{width:120},value:A,onChange:W=>{W!==null&&y(W)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.MinimumValue",P),": 1 ",Y.t("word.MeterAbbreviation",P),h.jsx("br",{}),Y.t("word.MaximumValue",P),": 10 ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicTroughMenu.OnlyThisParabolicTrough",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicTroughMenu.AllParabolicTroughsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllSelectedParabolicTroughs",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllParabolicTroughs",P)})]})})})]})})},vpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(NYe),i=M(UYe),a=M(jYe),l=M(Gr),s=M(En),c=M(AA),u=M(wA),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.ParabolicTrough),[A,y]=m.useState((g==null?void 0:g.moduleLength)??3),S=m.useRef(!1),C=m.useRef(),P=$t(),v=W=>{u(W.target.value)},T=(W,k)=>{const D=l(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.moduleLength=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},w=(W,k)=>!T(W,k),x=W=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const k of n)if(k.type===z.ParabolicTrough&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.moduleLength-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of n)if(k.type===z.ParabolicTrough&&!k.locked&&Math.abs(k.moduleLength-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of n)if(k.type===z.ParabolicTrough&&k.foundationId===(g==null?void 0:g.foundationId)&&!k.locked&&Math.abs(k.moduleLength-W)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.moduleLength)-W)>Et)return!0}return!1}},b=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.ParabolicTrough&&!L.locked&&W.has(L.id)&&(L.moduleLength=k)})},R=W=>{if(g&&x(W)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(k.id)&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.moduleLength);else{const k=new Map;for(const L of n)L.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.moduleLength);const D={name:"Set Module Length for Selected Parabolic Troughs",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{b(D.oldValues,D.newValue)}};s(D),b(k,W),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.ParabolicTrough&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.moduleLength);else{const k=new Map;for(const L of n)L.type===z.ParabolicTrough&&k.set(L.id,L.moduleLength);const D={name:"Set Module Length for All Parabolic Troughs",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{a(z.ParabolicTrough,D.newValue)}};s(D),a(z.ParabolicTrough,W),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.ParabolicTrough&&k.foundationId===g.foundationId&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.moduleLength);else{const k=new Map;for(const L of n)L.type===z.ParabolicTrough&&L.foundationId===g.foundationId&&k.set(L.id,L.moduleLength);const D={name:"Set Module Length for All Parabolic Troughs Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{D.groupId&&i(z.ParabolicTrough,D.groupId,D.newValue)}};s(D),i(z.ParabolicTrough,g.foundationId,W),f(d+1)}}break}default:{const k=o(g.id),D=k?k.moduleLength:g.moduleLength;if(S.current=w(g,W),S.current)C.current=W,y(D);else{const L={name:"Set Parabolic Trough Module Length",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(L.changedElementId,L.oldValue)},redo:()=>{r(L.changedElementId,L.newValue)}};s(L),r(g.id,W),f(d+1)}break}}e(k=>{k.actionState.parabolicTroughModuleLength=W})}},H=()=>{S.current=!1,t(!1)},F=()=>{H(),p()},E=()=>{R(A),S.current||(t(!1),f(0))},N=()=>{R(A)};if((g==null?void 0:g.type)!==z.ParabolicTrough)return null;const U=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("parabolicTroughMenu.LatusRectum",P),rejectedMessage:U,onApply:N,onClose:H,onClickCancel:F,onClickOk:E,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:10,step:.5,style:{width:120},precision:2,value:A,onChange:W=>{W!==null&&y(W)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.MinimumValue",P),": 1 ",Y.t("word.MeterAbbreviation",P),h.jsx("br",{}),Y.t("word.MaximumValue",P),": 10 ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicTroughMenu.OnlyThisParabolicTrough",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicTroughMenu.AllParabolicTroughsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllSelectedParabolicTroughs",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllParabolicTroughs",P)})]})})})]})})},xpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(kYe),i=M(LYe),a=M(WYe),l=M(Gr),s=M(En),c=M(AA),u=M(wA),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.ParabolicTrough),[A,y]=m.useState((g==null?void 0:g.latusRectum)??2),S=m.useRef(!1),C=m.useRef(),P=$t(),v=W=>{u(W.target.value)},T=(W,k)=>{const D=l(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.latusRectum=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},w=(W,k)=>!T(W,k),x=W=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const k of n)if(k.type===z.ParabolicTrough&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.latusRectum-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of n)if(k.type===z.ParabolicTrough&&!k.locked&&Math.abs(k.latusRectum-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of n)if(k.type===z.ParabolicTrough&&k.foundationId===(g==null?void 0:g.foundationId)&&!k.locked&&Math.abs(k.latusRectum-W)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.latusRectum)-W)>Et)return!0}return!1}},b=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.ParabolicTrough&&!L.locked&&W.has(L.id)&&(L.latusRectum=k)})},R=W=>{if(g&&x(W)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(k.id)&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.latusRectum);else{const k=new Map;for(const L of n)L.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.latusRectum);const D={name:"Set Latus Rectum for Selected Parabolic Troughs",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{b(D.oldValues,D.newValue)}};s(D),b(k,W),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.ParabolicTrough&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.latusRectum);else{const k=new Map;for(const L of n)L.type===z.ParabolicTrough&&k.set(L.id,L.latusRectum);const D={name:"Set Latus Rectum for All Parabolic Troughs",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{a(z.ParabolicTrough,D.newValue)}};s(D),a(z.ParabolicTrough,W),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.ParabolicTrough&&k.foundationId===g.foundationId&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.latusRectum);else{const k=new Map;for(const L of n)L.type===z.ParabolicTrough&&L.foundationId===g.foundationId&&k.set(L.id,L.latusRectum);const D={name:"Set Latus Rectum for All Parabolic Troughs Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{D.groupId&&i(z.ParabolicTrough,D.groupId,D.newValue)}};s(D),i(z.ParabolicTrough,g.foundationId,W),f(d+1)}}break}default:{const k=o(g.id),D=k?k.latusRectum:g.latusRectum;if(S.current=w(g,W),S.current)C.current=W,y(D);else{const L={name:"Set Parabolic Trough Latus Rectum",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(L.changedElementId,L.oldValue)},redo:()=>{r(L.changedElementId,L.newValue)}};s(L),r(g.id,W),f(d+1)}break}}e(k=>{k.actionState.parabolicTroughLatusRectum=W})}},H=()=>{S.current=!1,t(!1)},F=()=>{H(),p()},E=()=>{R(A),S.current||(t(!1),f(0))},N=()=>{R(A)};if((g==null?void 0:g.type)!==z.ParabolicTrough)return null;const U=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("parabolicTroughMenu.LatusRectum",P),rejectedMessage:U,onApply:N,onClose:H,onClickCancel:F,onClickOk:E,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:20,step:.5,precision:2,style:{width:120},value:A,onChange:W=>{W!==null&&y(W)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.MinimumValue",P),": 1 ",Y.t("word.MeterAbbreviation",P),h.jsx("br",{}),Y.t("word.MaximumValue",P),": 20 ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicTroughMenu.OnlyThisParabolicTrough",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicTroughMenu.AllParabolicTroughsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllSelectedParabolicTroughs",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllParabolicTroughs",P)})]})})})]})})},bpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(TW),i=M(PW),a=M(CW),l=M(Gr),s=M(En),c=M(AA),u=M(wA),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.ParabolicTrough),[A,y]=m.useState((g==null?void 0:g.poleHeight)??1),S=m.useRef(!1),C=m.useRef(),P=$t(),v=N=>{u(N.target.value)},T=N=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:{for(const U of n)if(U.type===z.ParabolicTrough&&!U.locked&&M.getState().selectedElementIdSet.has(U.id)&&Math.abs(U.poleHeight-N)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const U of n)if(U.type===z.ParabolicTrough&&!U.locked&&Math.abs(U.poleHeight-N)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const U of n)if(U.type===z.ParabolicTrough&&U.foundationId===(g==null?void 0:g.foundationId)&&!U.locked&&Math.abs(U.poleHeight-N)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{if(l(g)){for(const W of n)if(W.type===z.ParabolicTrough&&W.parentId===g.parentId&&!W.locked&&Math.abs(W.poleHeight-N)>Et)return!0}break}default:{if(Math.abs((g==null?void 0:g.poleHeight)-N)>Et)return!0;break}}return!1}},w=(N,U)=>{M.getState().set(W=>{for(const k of W.elements)k.type===z.ParabolicTrough&&!k.locked&&N.has(k.id)&&(k.tiltAngle=U)})},x=N=>{if(g&&T(N)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const U of n)if(U.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(U.id)&&.5*U.ly*Math.abs(Math.sin(U.tiltAngle))>N){S.current=!0;break}if(S.current)C.current=N,y(g.poleHeight);else{const U=new Map;for(const k of n)k.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(k.id)&&U.set(k.id,k.poleHeight);const W={name:"Set Pole Height for Selected Parabolic Troughs",timestamp:Date.now(),oldValues:U,newValue:N,undo:()=>{for(const[k,D]of W.oldValues.entries())r(k,D)},redo:()=>{w(W.oldValues,W.newValue)}};s(W),w(U,N),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const U of n)if(U.type===z.ParabolicTrough&&.5*U.ly*Math.abs(Math.sin(U.tiltAngle))>N){S.current=!0;break}if(S.current)C.current=N,y(g.poleHeight);else{const U=new Map;for(const k of n)k.type===z.ParabolicTrough&&U.set(k.id,k.poleHeight);const W={name:"Set Pole Height for All Parabolic Troughs",timestamp:Date.now(),oldValues:U,newValue:N,undo:()=>{for(const[k,D]of W.oldValues.entries())r(k,D)},redo:()=>{a(z.ParabolicTrough,W.newValue)}};s(W),a(z.ParabolicTrough,N),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const U of n)if(U.type===z.ParabolicTrough&&U.foundationId===g.foundationId&&.5*U.ly*Math.abs(Math.sin(U.tiltAngle))>N){S.current=!0;break}if(S.current)C.current=N,y(g.poleHeight);else{const U=new Map;for(const k of n)k.type===z.ParabolicTrough&&k.foundationId===g.foundationId&&U.set(k.id,k.poleHeight);const W={name:"Set Pole Height for All Parabolic Troughs Above Foundation",timestamp:Date.now(),oldValues:U,newValue:N,groupId:g.foundationId,undo:()=>{for(const[k,D]of W.oldValues.entries())r(k,D)},redo:()=>{W.groupId&&i(z.ParabolicTrough,W.groupId,W.newValue)}};s(W),i(z.ParabolicTrough,g.foundationId,N),f(d+1)}}break}default:{const U=o(g.id),W=U?U.poleHeight:g.poleHeight;if(S.current=.5*g.lx*Math.abs(Math.sin(g.tiltAngle))>N,S.current)C.current=N,y(W);else{const k={name:"Set Parabolic Trough Pole Height",timestamp:Date.now(),oldValue:W,newValue:N,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(k.changedElementId,k.oldValue)},redo:()=>{r(k.changedElementId,k.newValue)}};s(k),r(g.id,N),f(d+1)}break}}e(U=>{U.actionState.parabolicTroughPoleHeight=N})}},b=()=>{S.current=!1,t(!1)},R=()=>{b(),p()},H=()=>{x(A),S.current||(t(!1),f(0))},F=()=>{x(A)};if((g==null?void 0:g.type)!==z.ParabolicTrough)return null;const E=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("solarCollectorMenu.ExtraPoleHeightInAdditionToHalfWidth",P),rejectedMessage:E,onApply:F,onClose:b,onClickCancel:R,onClickOk:H,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:0,max:5,style:{width:120},step:.1,precision:2,value:A,onChange:N=>{N!==null&&y(N)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",P),": [0, 5] ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicTroughMenu.OnlyThisParabolicTrough",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicTroughMenu.AllParabolicTroughsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllSelectedParabolicTroughs",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllParabolicTroughs",P)})]})})})]})})},Spo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Zq),i=M(e$),a=M(t$),l=M(En),s=M(AA),c=M(wA),u=M(no),d=M(Qn),f=uo(z.ParabolicTrough),[p,g]=m.useState((f==null?void 0:f.reflectance)??.9),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicTrough&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.reflectance-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicTrough&&!x.locked&&Math.abs(x.reflectance-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.ParabolicTrough&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.reflectance-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.reflectance)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.ParabolicTrough&&!R.locked&&w.has(R.id)&&(R.reflectance=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for Selected Parabolic Troughs",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for All Parabolic Troughs",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.ParabolicTrough,b.newValue)}};l(b),a(z.ParabolicTrough,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&R.foundationId===f.foundationId&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for All Parabolic Troughs Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.ParabolicTrough,b.groupId,b.newValue)}};l(b),i(z.ParabolicTrough,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.reflectance:f.reflectance,R={name:"Set Parabolic Trough Reflectance",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.parabolicTroughReflectance=w})}},v=()=>{t(!1)},T=()=>{P(p)};return(f==null?void 0:f.type)!==z.ParabolicTrough?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReflectorReflectance",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,step:.01,value:p,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicTroughMenu.OnlyThisParabolicTrough",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicTroughMenu.AllParabolicTroughsAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllSelectedParabolicTroughs",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllParabolicTroughs",A)})]})})})]})})},Tpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(SYe),i=M(TYe),a=M(PYe),l=M(En),s=M(AA),c=M(wA),u=M(no),d=M(Qn),f=uo(z.ParabolicTrough),[p,g]=m.useState((f==null?void 0:f.absorptance)??.95),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicTrough&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.absorptance-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicTrough&&!x.locked&&Math.abs(x.absorptance-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.ParabolicTrough&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.absorptance-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.absorptance)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.ParabolicTrough&&!R.locked&&w.has(R.id)&&(R.absorptance=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.absorptance);const b={name:"Set Absorptance for Selected Parabolic Troughs",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&x.set(R.id,R.absorptance);const b={name:"Set Absorptance for All Parabolic Troughs",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.ParabolicTrough,b.newValue)}};l(b),a(z.ParabolicTrough,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&R.foundationId===f.foundationId&&x.set(R.id,R.absorptance);const b={name:"Set Absorptance for All Parabolic Troughs Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.ParabolicTrough,b.groupId,b.newValue)}};l(b),i(z.ParabolicTrough,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.absorptance:f.absorptance,R={name:"Set Parabolic Trough Absorptance",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.parabolicTroughAbsorptance=w})}},v=()=>{t(!1)},T=()=>{P(p)};return(f==null?void 0:f.type)!==z.ParabolicTrough?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReceiverAbsorptance",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,step:.01,value:p,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicTroughMenu.OnlyThisParabolicTrough",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicTroughMenu.AllParabolicTroughsAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllSelectedParabolicTroughs",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllParabolicTroughs",A)})]})})})]})})},Ppo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(CYe),i=M(RYe),a=M(HYe),l=M(En),s=M(AA),c=M(wA),u=M(no),d=M(Qn),f=uo(z.ParabolicTrough),[p,g]=m.useState((f==null?void 0:f.opticalEfficiency)??.7),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicTrough&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.opticalEfficiency-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicTrough&&!x.locked&&Math.abs(x.opticalEfficiency-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.ParabolicTrough&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.opticalEfficiency-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.opticalEfficiency)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.ParabolicTrough&&!R.locked&&w.has(R.id)&&(R.opticalEfficiency=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.opticalEfficiency);const b={name:"Set Optical Efficiency for Selected Parabolic Troughs",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&x.set(R.id,R.opticalEfficiency);const b={name:"Set Optical Efficiency for All Parabolic Troughs",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.ParabolicTrough,b.newValue)}};l(b),a(z.ParabolicTrough,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&R.foundationId===f.foundationId&&x.set(R.id,R.opticalEfficiency);const b={name:"Set Optical Efficiency for All Parabolic Troughs Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.ParabolicTrough,b.groupId,b.newValue)}};l(b),i(z.ParabolicTrough,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.opticalEfficiency:f.opticalEfficiency,R={name:"Set Parabolic Trough Optical Efficiency",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.parabolicTroughOpticalEfficiency=w})}},v=()=>{t(!1)},T=()=>{P(p)};return(f==null?void 0:f.type)!==z.ParabolicTrough?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReflectorOpticalEfficiency",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,step:.01,value:p,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicTroughMenu.OnlyThisParabolicTrough",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicTroughMenu.AllParabolicTroughsAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllSelectedParabolicTroughs",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllParabolicTroughs",A)})]})})})]})})},Cpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(MYe),i=M(IYe),a=M(zYe),l=M(En),s=M(AA),c=M(wA),u=M(no),d=M(Qn),f=uo(z.ParabolicTrough),[p,g]=m.useState((f==null?void 0:f.thermalEfficiency)??.3),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicTrough&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.thermalEfficiency-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicTrough&&!x.locked&&Math.abs(x.thermalEfficiency-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.ParabolicTrough&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.thermalEfficiency-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.thermalEfficiency)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.ParabolicTrough&&!R.locked&&w.has(R.id)&&(R.thermalEfficiency=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.thermalEfficiency);const b={name:"Set Thermal Efficiency for Selected Parabolic Troughs",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&x.set(R.id,R.thermalEfficiency);const b={name:"Set Thermal Efficiency for All Parabolic Troughs",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.ParabolicTrough,b.newValue)}};l(b),a(z.ParabolicTrough,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.ParabolicTrough&&R.foundationId===f.foundationId&&x.set(R.id,R.thermalEfficiency);const b={name:"Set Thermal Efficiency for All Parabolic Troughs Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.ParabolicTrough,b.groupId,b.newValue)}};l(b),i(z.ParabolicTrough,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.thermalEfficiency:f.thermalEfficiency,R={name:"Set Parabolic Trough Thermal Efficiency",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.parabolicTroughThermalEfficiency=w})}},v=()=>{t(!1)},T=()=>{P(p)};return(f==null?void 0:f.type)!==z.ParabolicTrough?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReceiverThermalEfficiency",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,step:.01,value:p,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicTroughMenu.OnlyThisParabolicTrough",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicTroughMenu.AllParabolicTroughsAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllSelectedParabolicTroughs",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicTroughMenu.AllParabolicTroughs",A)})]})})})]})})},Rpo=t=>{const e=[];if(t.type!==z.ParabolicTrough)return{items:e};const n=t,o={lng:M.getState().language},r=!n.locked;return e.push({key:"parabolic-trough-copy",label:h.jsx(Fd,{})}),r&&e.push({key:"parabolic-trough-cut",label:h.jsx(kd,{})}),e.push({key:"parabolic-trough-lock",label:h.jsx(Ku,{selectedElement:n})}),r&&e.push({key:"parabolic-trough-length",label:h.jsxs(eo,{Dialog:Apo,children:[Y.t("word.Length",o)," ..."]})},{key:"parabolic-trough-width",label:h.jsxs(eo,{Dialog:wpo,children:[Y.t("word.Width",o)," ..."]})},{key:"parabolic-trough-module-length",label:h.jsxs(eo,{Dialog:vpo,children:[Y.t("parabolicTroughMenu.ModuleLength",o)," ..."]})},{key:"parabolic-trough-latus-rectum",label:h.jsxs(eo,{Dialog:xpo,children:[Y.t("parabolicTroughMenu.LatusRectum",o)," ..."]})},{key:"parabolic-trough-pole-height",label:h.jsxs(eo,{Dialog:bpo,children:[Y.t("solarCollectorMenu.ExtraPoleHeight",o)," ..."]})},{key:"parabolic-trough-reflectance",label:h.jsxs(eo,{Dialog:Spo,children:[Y.t("concentratedSolarPowerCollectorMenu.ReflectorReflectance",o)," ..."]})},{key:"parabolic-trough-absorptance",label:h.jsxs(eo,{Dialog:Tpo,children:[Y.t("concentratedSolarPowerCollectorMenu.ReceiverAbsorptance",o)," ..."]})},{key:"parabolic-trough-optical-efficiency",label:h.jsxs(eo,{Dialog:Ppo,children:[Y.t("concentratedSolarPowerCollectorMenu.ReflectorOpticalEfficiency",o)," ..."]})},{key:"parabolic-trough-thermal-efficiency",label:h.jsxs(eo,{Dialog:Cpo,children:[Y.t("concentratedSolarPowerCollectorMenu.ReceiverThermalEfficiency",o)," ..."]})},{key:"parabolic-dish-draw-sun-beam",label:h.jsx(a2e,{solarCollector:n})},{key:"parabolic-trough-label-submenu",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",o)}),children:v3(n)}),{items:e}},Hpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(d3),i=M(Fw),a=M(qq),l=M($q),s=M(vW),c=M(xW),u=M(Gr),d=M(En),f=M(vA),p=M(xA),g=M(no),A=M(Qn),y=M(Xi),S=uo(z.ParabolicDish),[C,P]=m.useState((S==null?void 0:S.lx)??2),v=m.useRef(!1),T=m.useRef(),w=$t(),x=L=>{p(L.target.value)},b=(L,j)=>{const B=u(L);if(B){const O=JSON.parse(JSON.stringify(L));return O.lx=j,ye.isSolarCollectorWithinHorizontalSurface(O,B)}return!1},R=(L,j)=>!b(L,j),H=L=>{if(S){switch(f){case re.AllSelectedObjectsOfThisType:for(const j of n)if(j.type===z.ParabolicDish&&!j.locked&&M.getState().selectedElementIdSet.has(j.id)&&Math.abs(j.lx-L)>Et)return!0;break;case re.AllObjectsOfThisType:for(const j of n)if(j.type===z.ParabolicDish&&!j.locked&&Math.abs(j.lx-L)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const j of n)if(j.type===z.ParabolicDish&&j.foundationId===(S==null?void 0:S.foundationId)&&!j.locked&&Math.abs(j.lx-L)>Et)return!0;break;default:if(Math.abs((S==null?void 0:S.lx)-L)>Et)return!0}return!1}},F=(L,j)=>{M.getState().set(B=>{for(const O of B.elements)O.type===z.ParabolicDish&&!O.locked&&L.has(O.id)&&(O.lx=j,O.ly=j)})},E=L=>{if(S&&H(L)){switch(T.current=void 0,f){case re.AllSelectedObjectsOfThisType:{v.current=!1;for(const j of n)if(j.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(j.id)&&R(j,L)){v.current=!0;break}if(v.current)T.current=L,P(S.lx);else{const j=new Map;for(const O of n)O.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(O.id)&&j.set(O.id,O.lx);const B={name:"Set Diameter for Selected Parabolic Dishes",timestamp:Date.now(),oldValues:j,newValue:L,undo:()=>{for(const[O,V]of B.oldValues.entries())r(O,V),i(O,V)},redo:()=>{F(B.oldValues,B.newValue)}};d(B),F(j,L),A(g+1)}break}case re.AllObjectsOfThisType:{v.current=!1;for(const j of n)if(j.type===z.ParabolicDish&&R(j,L)){v.current=!0;break}if(v.current)T.current=L,P(S.lx);else{const j=new Map;for(const O of n)O.type===z.ParabolicDish&&j.set(O.id,O.lx);const B={name:"Set Diameter for All Parabolic Dishes",timestamp:Date.now(),oldValues:j,newValue:L,undo:()=>{for(const[O,V]of B.oldValues.entries())r(O,V),i(O,V)},redo:()=>{s(z.ParabolicDish,B.newValue),c(z.ParabolicDish,B.newValue)}};d(B),s(z.ParabolicDish,L),c(z.ParabolicDish,L),A(g+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(S.foundationId){v.current=!1;for(const j of n)if(j.type===z.ParabolicDish&&j.foundationId===S.foundationId&&R(j,L)){v.current=!0;break}if(v.current)T.current=L,P(S.lx);else{const j=new Map;for(const O of n)O.type===z.ParabolicDish&&O.foundationId===S.foundationId&&j.set(O.id,O.lx);const B={name:"Set Diameter for All Parabolic Dishes Above Foundation",timestamp:Date.now(),oldValues:j,newValue:L,groupId:S.foundationId,undo:()=>{for(const[O,V]of B.oldValues.entries())r(O,V),i(O,V)},redo:()=>{B.groupId&&(a(z.ParabolicDish,B.groupId,B.newValue),l(z.ParabolicDish,B.groupId,B.newValue))}};d(B),a(z.ParabolicDish,S.foundationId,L),l(z.ParabolicDish,S.foundationId,L),A(g+1)}}break}default:{const j=o(S.id),B=j?j.lx:S.lx;if(v.current=R(S,L),v.current)T.current=L,P(B);else{const O={name:"Set Parabolic Dish Diameter",timestamp:Date.now(),oldValue:B,newValue:L,changedElementId:S.id,changedElementType:S.type,undo:()=>{r(O.changedElementId,O.oldValue),i(O.changedElementId,O.oldValue)},redo:()=>{r(O.changedElementId,O.newValue),i(O.changedElementId,O.newValue)}};d(O),r(S.id,L),i(S.id,L),A(g+1)}break}}e(j=>{j.actionState.parabolicDishRimDiameter=L})}},N=()=>{v.current=!1,t(!1)},U=()=>{N(),y()},W=()=>{E(C),v.current||(t(!1),A(0))},k=()=>{E(C)};if((S==null?void 0:S.type)!==z.ParabolicDish)return null;const D=v.current?": "+Y.t("message.NotApplicableToSelectedAction",w)+(T.current!==void 0?" ("+T.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("parabolicDishMenu.RimDiameter",w),rejectedMessage:D,onApply:k,onClose:N,onClickCancel:U,onClickOk:W,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:10,step:.5,precision:2,style:{width:120},value:C,onChange:L=>{L!==null&&P(L)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.MinimumValue",w),": 1 ",Y.t("word.MeterAbbreviation",w),h.jsx("br",{}),Y.t("word.MaximumValue",w),": 10 ",Y.t("word.MeterAbbreviation",w)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",w)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:x,value:f,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicDishMenu.OnlyThisParabolicDish",w)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicDishMenu.AllParabolicDishesAboveFoundation",w)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicDishMenu.AllSelectedParabolicDishes",w)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicDishMenu.AllParabolicDishes",w)})]})})})]})})},Mpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(kYe),i=M(LYe),a=M(WYe),l=M(Gr),s=M(En),c=M(vA),u=M(xA),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.ParabolicDish),[A,y]=m.useState((g==null?void 0:g.latusRectum)??2),S=m.useRef(!1),C=m.useRef(),P=$t(),v=W=>{u(W.target.value)},T=(W,k)=>{const D=l(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.latusRectum=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},w=(W,k)=>!T(W,k),x=W=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const k of n)if(k.type===z.ParabolicDish&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.latusRectum-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of n)if(k.type===z.ParabolicDish&&!k.locked&&Math.abs(k.latusRectum-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of n)if(k.type===z.ParabolicDish&&k.foundationId===(g==null?void 0:g.foundationId)&&!k.locked&&Math.abs(k.latusRectum-W)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.latusRectum)-W)>Et)return!0}return!1}},b=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.ParabolicDish&&!L.locked&&W.has(L.id)&&(L.latusRectum=k)})},R=W=>{if(g&&x(W)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(k.id)&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.latusRectum);else{const k=new Map;for(const L of n)L.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.latusRectum);const D={name:"Set Latus Rectum for Selected Parabolic Dishes",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{b(D.oldValues,D.newValue)}};s(D),b(k,W),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.ParabolicDish&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.latusRectum);else{const k=new Map;for(const L of n)L.type===z.ParabolicDish&&k.set(L.id,L.latusRectum);const D={name:"Set Latus Rectum for All Parabolic Dishes",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{a(z.ParabolicDish,D.newValue)}};s(D),a(z.ParabolicDish,W),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.ParabolicDish&&k.foundationId===g.foundationId&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.latusRectum);else{const k=new Map;for(const L of n)L.type===z.ParabolicDish&&L.foundationId===g.foundationId&&k.set(L.id,L.latusRectum);const D={name:"Set Latus Rectum for All Parabolic Dishes Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{D.groupId&&i(z.ParabolicDish,D.groupId,D.newValue)}};s(D),i(z.ParabolicDish,g.foundationId,W),f(d+1)}}break}default:{const k=o(g.id),D=k?k.latusRectum:g.latusRectum;if(S.current=w(g,W),S.current)C.current=W,y(D);else{const L={name:"Set Parabolic Dish Latus Rectum",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(L.changedElementId,L.oldValue)},redo:()=>{r(L.changedElementId,L.newValue)}};s(L),r(g.id,W),f(d+1)}break}}e(k=>{k.actionState.parabolicDishLatusRectum=W})}},H=()=>{S.current=!1,t(!1)},F=()=>{H(),p()},E=()=>{R(A),S.current||(t(!1),f(0))},N=()=>{R(A)};if((g==null?void 0:g.type)!==z.ParabolicDish)return null;const U=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("parabolicDishMenu.LatusRectum",P),rejectedMessage:U,onApply:N,onClose:H,onClickCancel:F,onClickOk:E,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:20,step:.5,style:{width:120},precision:2,value:A,onChange:W=>{W!==null&&y(W)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.MinimumValue",P),": 1 ",Y.t("word.MeterAbbreviation",P),h.jsx("br",{}),Y.t("word.MaximumValue",P),": 20 ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicDishMenu.OnlyThisParabolicDish",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicDishMenu.AllParabolicDishesAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicDishMenu.AllSelectedParabolicDishes",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicDishMenu.AllParabolicDishes",P)})]})})})]})})},Ipo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(vA),a=M(xA),l=M(no),s=M(Qn),c=uo(z.ParabolicDish),[u,d]=m.useState((c==null?void 0:c.structureType)??sf.CentralPole),f=$t(),{Option:p}=Uo,g=(x,b)=>{e(R=>{for(const H of R.elements)if(H.id===x&&!H.locked&&H.type===z.ParabolicDish){H.structureType=b;break}})},A=(x,b)=>{e(R=>{for(const H of R.elements)H.foundationId===x&&!H.locked&&H.type===z.ParabolicDish&&(H.structureType=b)})},y=x=>{e(b=>{for(const R of b.elements)R.locked||R.type===z.ParabolicDish&&(R.structureType=x)})},S=x=>{a(x.target.value)},C=x=>{switch(i){case re.AllSelectedObjectsOfThisType:for(const b of n)if(b.type===z.ParabolicDish&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&b.structureType!==x)return!0;break;case re.AllObjectsOfThisType:for(const b of n)if(b.type===z.ParabolicDish&&!b.locked&&b.structureType!==x)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const b of n)if(b.type===z.ParabolicDish&&b.foundationId===(c==null?void 0:c.foundationId)&&!b.locked&&b.structureType!==x)return!0;break;default:if((c==null?void 0:c.structureType)!==x)return!0}return!1},P=(x,b)=>{M.getState().set(R=>{for(const H of R.elements)H.type===z.ParabolicDish&&!H.locked&&x.has(H.id)&&(H.structureType=b)})},v=x=>{if(c&&C(x)){switch(i){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(H.id)&&b.set(H.id,H.structureType);const R={name:"Set Structure Type for Selected Parabolic Dishes",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())g(H,F)},redo:()=>{P(R.oldValues,R.newValue)}};r(R),P(b,x),s(l+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.ParabolicDish&&b.set(H.id,H.structureType);const R={name:"Set Structure Type for All Parabolic Dishes",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())g(H,F)},redo:()=>{y(R.newValue)}};r(R),y(x),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(c.foundationId){const b=new Map;for(const H of n)H.type===z.ParabolicDish&&H.foundationId===c.foundationId&&b.set(H.id,H.structureType);const R={name:"Set Structure Type for All Parabolic Dishes Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:c.foundationId,undo:()=>{for(const[H,F]of R.oldValues.entries())g(H,F)},redo:()=>{R.groupId&&A(R.groupId,R.newValue)}};r(R),A(c.foundationId,x),s(l+1)}break}default:{const b=o(c.id),R=b?b.structureType:c.structureType,H={name:"Set Parabolic Dish Structure Type",timestamp:Date.now(),oldValue:R,newValue:x,changedElementId:c.id,changedElementType:c.type,undo:()=>{g(H.changedElementId,H.oldValue)},redo:()=>{g(H.changedElementId,H.newValue)}};r(H),g(c.id,x),s(l+1);break}}e(b=>{b.actionState.parabolicDishReceiverStructure=x})}},T=()=>{t(!1)},w=()=>{v(u)};return(c==null?void 0:c.type)!==z.ParabolicDish?null:h.jsx(so,{width:640,title:Y.t("parabolicDishMenu.ReceiverStructure",f),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:8,children:h.jsxs(Uo,{value:u,onChange:x=>d(x),children:[h.jsx(p,{value:sf.CentralPole,children:Y.t("parabolicDishMenu.CentralPole",f)},sf.CentralPole),h.jsx(p,{value:sf.CentralPoleWithTripod,children:Y.t("parabolicDishMenu.CentralPoleWithTripod",f)},sf.CentralPoleWithTripod),h.jsx(p,{value:sf.Quadrupod,children:Y.t("parabolicDishMenu.Quadrupod",f)},sf.Quadrupod)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:S,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicDishMenu.OnlyThisParabolicDish",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicDishMenu.AllParabolicDishesAboveFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicDishMenu.AllSelectedParabolicDishes",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicDishMenu.AllParabolicDishes",f)})]})})})]})})},zpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(TW),i=M(PW),a=M(CW),l=M(Gr),s=M(En),c=M(vA),u=M(xA),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.ParabolicDish),[A,y]=m.useState((g==null?void 0:g.poleHeight)??1),S=m.useRef(!1),C=m.useRef(),P=$t(),v=N=>{u(N.target.value)},T=N=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:{for(const U of n)if(U.type===z.ParabolicDish&&!U.locked&&M.getState().selectedElementIdSet.has(U.id)&&Math.abs(U.poleHeight-N)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const U of n)if(U.type===z.ParabolicDish&&!U.locked&&Math.abs(U.poleHeight-N)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const U of n)if(U.type===z.ParabolicDish&&U.foundationId===(g==null?void 0:g.foundationId)&&!U.locked&&Math.abs(U.poleHeight-N)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{if(l(g)){for(const W of n)if(W.type===z.ParabolicDish&&W.parentId===g.parentId&&!W.locked&&Math.abs(W.poleHeight-N)>Et)return!0}break}default:{if(Math.abs((g==null?void 0:g.poleHeight)-N)>Et)return!0;break}}return!1}},w=(N,U)=>{M.getState().set(W=>{for(const k of W.elements)k.type===z.ParabolicDish&&!k.locked&&N.has(k.id)&&(k.tiltAngle=U)})},x=N=>{if(g&&T(N)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const U of n)if(U.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(U.id)&&.5*U.ly*Math.abs(Math.sin(U.tiltAngle))>N){S.current=!0;break}if(S.current)C.current=N,y(g.poleHeight);else{const U=new Map;for(const k of n)k.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(k.id)&&U.set(k.id,k.poleHeight);const W={name:"Set Pole Height for Selected Parabolic Dishes",timestamp:Date.now(),oldValues:U,newValue:N,undo:()=>{for(const[k,D]of W.oldValues.entries())r(k,D)},redo:()=>{w(W.oldValues,W.newValue)}};s(W),w(U,N),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const U of n)if(U.type===z.ParabolicDish&&.5*U.ly*Math.abs(Math.sin(U.tiltAngle))>N){S.current=!0;break}if(S.current)C.current=N,y(g.poleHeight);else{const U=new Map;for(const k of n)k.type===z.ParabolicDish&&U.set(k.id,k.poleHeight);const W={name:"Set Pole Height for All Parabolic Dishes",timestamp:Date.now(),oldValues:U,newValue:N,undo:()=>{for(const[k,D]of W.oldValues.entries())r(k,D)},redo:()=>{a(z.ParabolicDish,W.newValue)}};s(W),a(z.ParabolicDish,N),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const U of n)if(U.type===z.ParabolicDish&&U.foundationId===g.foundationId&&.5*U.ly*Math.abs(Math.sin(U.tiltAngle))>N){S.current=!0;break}if(S.current)C.current=N,y(g.poleHeight);else{const U=new Map;for(const k of n)k.type===z.ParabolicDish&&k.foundationId===g.foundationId&&U.set(k.id,k.poleHeight);const W={name:"Set Pole Height for All Parabolic Dishes Above Foundation",timestamp:Date.now(),oldValues:U,newValue:N,groupId:g.foundationId,undo:()=>{for(const[k,D]of W.oldValues.entries())r(k,D)},redo:()=>{W.groupId&&i(z.ParabolicDish,W.groupId,W.newValue)}};s(W),i(z.ParabolicDish,g.foundationId,N),f(d+1)}}break}default:{const U=o(g.id),W=U?U.poleHeight:g.poleHeight;if(S.current=.5*g.lx*Math.abs(Math.sin(g.tiltAngle))>N,S.current)C.current=N,y(W);else{const k={name:"Set Parabolic Dish Pole Height",timestamp:Date.now(),oldValue:W,newValue:N,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(k.changedElementId,k.oldValue)},redo:()=>{r(k.changedElementId,k.newValue)}};s(k),r(g.id,N),f(d+1)}break}}e(U=>{U.actionState.parabolicDishPoleHeight=N})}},b=()=>{S.current=!1,t(!1)},R=()=>{b(),p()},H=()=>{x(A),S.current||(t(!1),f(0))},F=()=>{x(A)};if((g==null?void 0:g.type)!==z.ParabolicDish)return null;const E=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("parabolicDishMenu.ExtraPoleHeightInAdditionToRadius",P),rejectedMessage:E,onApply:F,onClose:b,onClickCancel:R,onClickOk:H,children:h.jsxs(nn,{children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:0,max:5,style:{width:120},step:.1,precision:2,value:A,onChange:N=>{N!==null&&y(N)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",P),": [0, 5] ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicDishMenu.OnlyThisParabolicDish",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicDishMenu.AllParabolicDishesAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicDishMenu.AllSelectedParabolicDishes",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicDishMenu.AllParabolicDishes",P)})]})})})]})})},Dpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(vYe),i=M(xYe),a=M(bYe),l=M(Gr),s=M(En),c=M(vA),u=M(xA),d=M(no),f=M(Qn),p=uo(z.ParabolicDish),[g,A]=m.useState((p==null?void 0:p.poleRadius)??.1),y=$t(),S=x=>{u(x.target.value)},C=x=>{if(p){switch(c){case re.AllSelectedObjectsOfThisType:{for(const b of n)if(b.type===z.ParabolicDish&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&Math.abs(b.poleRadius-x)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const b of n)if(b.type===z.ParabolicDish&&!b.locked&&Math.abs(b.poleRadius-x)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const b of n)if(b.type===z.ParabolicDish&&b.foundationId===(p==null?void 0:p.foundationId)&&!b.locked&&Math.abs(b.poleRadius-x)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{if(l(p)){for(const R of n)if(R.type===z.ParabolicDish&&R.parentId===p.parentId&&!R.locked&&Math.abs(R.poleRadius-x)>Et)return!0}break}default:{if(Math.abs((p==null?void 0:p.poleRadius)-x)>Et)return!0;break}}return!1}},P=(x,b)=>{M.getState().set(R=>{for(const H of R.elements)H.type===z.ParabolicDish&&!H.locked&&x.has(H.id)&&(H.poleRadius=b)})},v=x=>{if(p&&C(x)){switch(c){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(H.id)&&b.set(H.id,H.poleRadius);const R={name:"Set Pole Radius for Selected Parabolic Dishes",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{P(R.oldValues,R.newValue)}};s(R),P(b,x),f(d+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.ParabolicDish&&b.set(H.id,H.poleRadius);const R={name:"Set Pole Radius for All Parabolic Dishes",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{a(z.ParabolicDish,R.newValue)}};s(R),a(z.ParabolicDish,x),f(d+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(p.foundationId){const b=new Map;for(const H of n)H.type===z.ParabolicDish&&H.foundationId===p.foundationId&&b.set(H.id,H.poleRadius);const R={name:"Set Pole Radius for All Parabolic Dishes Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:p.foundationId,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{R.groupId&&i(z.ParabolicDish,R.groupId,R.newValue)}};s(R),i(z.ParabolicDish,p.foundationId,x),f(d+1)}break}default:{const b=o(p.id),R=b?b.poleRadius:p.poleRadius,H={name:"Set Parabolic Dish Pole Radius",timestamp:Date.now(),oldValue:R,newValue:x,changedElementId:p.id,changedElementType:p.type,undo:()=>{r(H.changedElementId,H.oldValue)},redo:()=>{r(H.changedElementId,H.newValue)}};s(H),r(p.id,x),f(d+1);break}}e(b=>{b.actionState.parabolicDishPoleRadius=x})}},T=()=>{t(!1)},w=()=>{v(g)};return(p==null?void 0:p.type)!==z.ParabolicDish?null:h.jsx(so,{width:600,title:Y.t("solarCollectorMenu.PoleRadius",y),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:.5,style:{width:120},step:.01,precision:2,value:g,onChange:x=>{x!==null&&A(x)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",y),": [0.1, 0.5] ",Y.t("word.MeterAbbreviation",y)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",y)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:S,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicDishMenu.OnlyThisParabolicDish",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicDishMenu.AllParabolicDishesAboveFoundation",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicDishMenu.AllSelectedParabolicDishes",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicDishMenu.AllParabolicDishes",y)})]})})})]})})},Epo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Zq),i=M(e$),a=M(t$),l=M(En),s=M(vA),c=M(xA),u=M(no),d=M(Qn),f=uo(z.ParabolicDish),[p,g]=m.useState((f==null?void 0:f.reflectance)??.9),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicDish&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.reflectance-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicDish&&!x.locked&&Math.abs(x.reflectance-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.ParabolicDish&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.reflectance-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.reflectance)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.ParabolicDish&&!R.locked&&w.has(R.id)&&(R.reflectance=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for Selected Parabolic Dishes",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicDish&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for All Parabolic Dishes",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.ParabolicDish,b.newValue)}};l(b),a(z.ParabolicDish,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.ParabolicDish&&R.foundationId===f.foundationId&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for All Parabolic Dishes Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.ParabolicDish,b.groupId,b.newValue)}};l(b),i(z.ParabolicDish,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.reflectance:f.reflectance,R={name:"Set Parabolic Dish Reflectance",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.parabolicDishReflectance=w})}},v=()=>{t(!1)},T=()=>{P(p)};return(f==null?void 0:f.type)!==z.ParabolicDish?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReflectorReflectance",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,step:.01,value:p,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicDishMenu.OnlyThisParabolicDish",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicDishMenu.AllParabolicDishesAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicDishMenu.AllSelectedParabolicDishes",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicDishMenu.AllParabolicDishes",A)})]})})})]})})},Fpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(SYe),i=M(TYe),a=M(PYe),l=M(En),s=M(vA),c=M(xA),u=M(no),d=M(Qn),f=uo(z.ParabolicDish),[p,g]=m.useState((f==null?void 0:f.absorptance)??.95),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicDish&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.absorptance-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicDish&&!x.locked&&Math.abs(x.absorptance-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.ParabolicDish&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.absorptance-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.absorptance)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.ParabolicDish&&!R.locked&&w.has(R.id)&&(R.absorptance=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.absorptance);const b={name:"Set Absorptance for Selected Parabolic Dishes",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicDish&&x.set(R.id,R.absorptance);const b={name:"Set Absorptance for All Parabolic Dishes",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.ParabolicDish,b.newValue)}};l(b),a(z.ParabolicDish,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.ParabolicDish&&R.foundationId===f.foundationId&&x.set(R.id,R.absorptance);const b={name:"Set Absorptance for All Parabolic Dishes Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.ParabolicDish,b.groupId,b.newValue)}};l(b),i(z.ParabolicDish,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.absorptance:f.absorptance,R={name:"Set Parabolic Dish Absorptance",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.parabolicDishAbsorptance=w})}},v=()=>{t(!1)},T=()=>{P(p)};return(f==null?void 0:f.type)!==z.ParabolicDish?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReceiverAbsorptance",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,step:.01,value:p,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicDishMenu.OnlyThisParabolicDish",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicDishMenu.AllParabolicDishesAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicDishMenu.AllSelectedParabolicDishes",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicDishMenu.AllParabolicDishes",A)})]})})})]})})},kpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(CYe),i=M(RYe),a=M(HYe),l=M(En),s=M(vA),c=M(xA),u=M(no),d=M(Qn),f=uo(z.ParabolicDish),[p,g]=m.useState((f==null?void 0:f.opticalEfficiency)??.7),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicDish&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.opticalEfficiency-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicDish&&!x.locked&&Math.abs(x.opticalEfficiency-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.ParabolicDish&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.opticalEfficiency-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.opticalEfficiency)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.ParabolicDish&&!R.locked&&w.has(R.id)&&(R.opticalEfficiency=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.opticalEfficiency);const b={name:"Set Optical Efficiency for Selected Parabolic Dishes",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicDish&&x.set(R.id,R.opticalEfficiency);const b={name:"Set Optical Efficiency for All Parabolic Dishes",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.ParabolicDish,b.newValue)}};l(b),a(z.ParabolicDish,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.ParabolicDish&&R.foundationId===f.foundationId&&x.set(R.id,R.opticalEfficiency);const b={name:"Set Optical Efficiency for All Parabolic Dishes Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.ParabolicDish,b.groupId,b.newValue)}};l(b),i(z.ParabolicDish,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.opticalEfficiency:f.opticalEfficiency,R={name:"Set Parabolic Dish Optical Efficiency",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.parabolicDishOpticalEfficiency=w})}},v=()=>{t(!1)},T=()=>{P(p),t(!1),d(0)};return(f==null?void 0:f.type)!==z.ParabolicDish?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReflectorOpticalEfficiency",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,step:.01,value:p,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicDishMenu.OnlyThisParabolicDish",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicDishMenu.AllParabolicDishesAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicDishMenu.AllSelectedParabolicDishes",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicDishMenu.AllParabolicDishes",A)})]})})})]})})},Lpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(MYe),i=M(IYe),a=M(zYe),l=M(En),s=M(vA),c=M(xA),u=M(no),d=M(Qn),f=uo(z.ParabolicDish),[p,g]=m.useState((f==null?void 0:f.thermalEfficiency)??.3),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicDish&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.thermalEfficiency-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.ParabolicDish&&!x.locked&&Math.abs(x.thermalEfficiency-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.ParabolicDish&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.thermalEfficiency-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.thermalEfficiency)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.ParabolicDish&&!R.locked&&w.has(R.id)&&(R.thermalEfficiency=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicDish&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.thermalEfficiency);const b={name:"Set Thermal Efficiency for Selected Parabolic Dishes",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.ParabolicDish&&x.set(R.id,R.thermalEfficiency);const b={name:"Set Thermal Efficiency for All Parabolic Dishes",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.ParabolicDish,b.newValue)}};l(b),a(z.ParabolicDish,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.ParabolicDish&&R.foundationId===f.foundationId&&x.set(R.id,R.thermalEfficiency);const b={name:"Set Thermal Efficiency for All Parabolic Dishes Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.ParabolicDish,b.groupId,b.newValue)}};l(b),i(z.ParabolicDish,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.thermalEfficiency:f.thermalEfficiency,R={name:"Set Parabolic Dish Thermal Efficiency",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.parabolicDishThermalEfficiency=w})}},v=()=>{t(!1)},T=()=>{P(p)};return(f==null?void 0:f.type)!==z.ParabolicDish?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReceiverThermalEfficiency",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,step:.01,value:p,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("parabolicDishMenu.OnlyThisParabolicDish",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("parabolicDishMenu.AllParabolicDishesAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("parabolicDishMenu.AllSelectedParabolicDishes",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("parabolicDishMenu.AllParabolicDishes",A)})]})})})]})})},Wpo=t=>{const e=[];if(t.type!==z.ParabolicDish)return{items:e};const n=t,o={lng:M.getState().language},r=!n.locked;return e.push({key:"parabolic-dish-copy",label:h.jsx(Fd,{})}),r&&e.push({key:"parabolic-dish-cut",label:h.jsx(kd,{})}),e.push({key:"parabolic-dish-lock",label:h.jsx(Ku,{selectedElement:n})}),r&&e.push({key:"parabolic-dish-radius",label:h.jsxs(eo,{Dialog:Hpo,children:[Y.t("parabolicDishMenu.RimDiameter",o)," ..."]})},{key:"parabolic-dish-latus-rectum",label:h.jsxs(eo,{Dialog:Mpo,children:[Y.t("parabolicDishMenu.LatusRectum",o)," ..."]})},{key:"parabolic-dish-structure-type",label:h.jsxs(eo,{Dialog:Ipo,children:[Y.t("parabolicDishMenu.ReceiverStructure",o)," ..."]})},{key:"parabolic-dish-pole-height",label:h.jsxs(eo,{Dialog:zpo,children:[Y.t("solarCollectorMenu.ExtraPoleHeight",o)," ..."]})},{key:"parabolic-dish-pole-radius",label:h.jsxs(eo,{Dialog:Dpo,children:[Y.t("solarCollectorMenu.PoleRadius",o)," ..."]})},{key:"parabolic-dish-reflectance",label:h.jsxs(eo,{Dialog:Epo,children:[Y.t("concentratedSolarPowerCollectorMenu.ReflectorReflectance",o)," ..."]})},{key:"parabolic-dish-absorptance",label:h.jsxs(eo,{Dialog:Fpo,children:[Y.t("concentratedSolarPowerCollectorMenu.ReceiverAbsorptance",o)," ..."]})},{key:"parabolic-dish-optical-efficiency",label:h.jsxs(eo,{Dialog:kpo,children:[Y.t("concentratedSolarPowerCollectorMenu.ReflectorOpticalEfficiency",o)," ..."]})},{key:"parabolic-dish-thermal-efficiency",label:h.jsxs(eo,{Dialog:Lpo,children:[Y.t("concentratedSolarPowerCollectorMenu.ReceiverThermalEfficiency",o)," ..."]})},{key:"parabolic-dish-draw-sun-beam",label:h.jsx(a2e,{solarCollector:n})},{key:"parabolic-dish-label-submenu",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",o)}),children:v3(n)}),{items:e}},Npo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(pYe),r=M(gYe),i=M(mYe),a=M(En),l=M(kb),s=M(Lb),c=M(no),u=M(Qn),d=uo(z.FresnelReflector),[f,p]=m.useState(!!(d!=null&&d.drawSunBeam)),g=$t(),A=T=>{s(T.target.value)},y=T=>{switch(l){case re.AllSelectedObjectsOfThisType:for(const w of e)if(w.type===z.FresnelReflector&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)&&w.drawSunBeam!==T)return!0;break;case re.AllObjectsOfThisType:for(const w of e)if(w.type===z.FresnelReflector&&!w.locked&&w.drawSunBeam!==T)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const w of e)if(w.type===z.FresnelReflector&&w.foundationId===(d==null?void 0:d.foundationId)&&!w.locked&&w.drawSunBeam!==T)return!0;break;default:if((d==null?void 0:d.drawSunBeam)!==T)return!0}return!1},S=(T,w)=>{M.getState().set(x=>{for(const b of x.elements)ye.isSolarCollectorType(b.type)&&!b.locked&&b.type===z.FresnelReflector&&T.has(b.id)&&(b.drawSunBeam=w)})},C=T=>{if(d&&y(T))switch(l){case re.AllSelectedObjectsOfThisType:{const w=new Map;for(const b of e)b.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(b.id)&&w.set(b.id,b.drawSunBeam);const x={name:"Draw Sun Beam for Selected Fresnel Reflectors",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())o(b,R)},redo:()=>{S(x.oldValues,x.newValue)}};a(x),S(w,T),u(c+1);break}case re.AllObjectsOfThisType:{const w=new Map;for(const b of e)b.type===z.FresnelReflector&&w.set(b.id,b.drawSunBeam);const x={name:"Draw Sun Beam for All Fresnel Reflectors",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())o(b,R)},redo:()=>{i(z.FresnelReflector,x.newValue)}};a(x),i(z.FresnelReflector,T),u(c+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(d.foundationId){const w=new Map;for(const b of e)b.type===z.FresnelReflector&&b.foundationId===d.foundationId&&w.set(b.id,b.drawSunBeam);const x={name:"Draw Sun Beam for All Fresnel Reflectors Above Foundation",timestamp:Date.now(),oldValues:w,newValue:T,groupId:d.foundationId,undo:()=>{for(const[b,R]of x.oldValues.entries())o(b,R)},redo:()=>{x.groupId&&r(z.FresnelReflector,x.groupId,x.newValue)}};a(x),r(z.FresnelReflector,d.foundationId,T),u(c+1)}break}default:{const w=n(d.id),x=w?w.drawSunBeam:d.drawSunBeam,b={name:"Draw Sun Beam for Fresnel Reflector",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:d.id,changedElementType:d.type,undo:()=>{o(b.changedElementId,b.oldValue)},redo:()=>{o(b.changedElementId,b.newValue)}};a(b),o(d.id,T),u(c+1);break}}},P=()=>{t(!1)},v=()=>{C(f)};return(d==null?void 0:d.type)!==z.FresnelReflector?null:h.jsx(so,{width:500,title:Y.t("solarCollectorMenu.DrawSunBeam",g),onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:4,children:h.jsx(vc,{checked:f,onChange:T=>{p(T)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:20,children:h.jsx(Le.Group,{onChange:A,value:l,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("fresnelReflectorMenu.OnlyThisFresnelReflector",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("fresnelReflectorMenu.AllFresnelReflectorsAboveFoundation",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllSelectedFresnelReflectors",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllFresnelReflectors",g)})]})})})]})})},{Option:Upo}=Uo,jpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(DYe),i=M(EYe),a=M(FYe),l=M(En),s=M(kb),c=M(Lb),u=M(no),d=M(Qn),f=uo(z.FresnelReflector),[p,g]=m.useState((f==null?void 0:f.receiverId)??"None"),A=$t(),y=m.useMemo(()=>{const x=[];for(const b of n)if(b.type===z.Foundation){const R=b;R.solarStructure===Dn.FocusPipe&&x.push(R.id)}return x},[n]);m.useEffect(()=>{if(g("None"),f)if(f.receiverId)g(f.receiverId);else{const x=o(f.parentId);x&&x.type===z.Foundation&&x.solarStructure===Dn.FocusPipe&&g(x.id)}},[f]);const S=x=>{c(x.target.value)},C=x=>{switch(s){case re.AllSelectedObjectsOfThisType:for(const b of n)if(b.type===z.FresnelReflector&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&b.receiverId!==x)return!0;break;case re.AllObjectsOfThisType:for(const b of n)if(b.type===z.FresnelReflector&&!b.locked&&b.receiverId!==x)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const b of n)if(b.type===z.FresnelReflector&&b.foundationId===(f==null?void 0:f.foundationId)&&!b.locked&&b.receiverId!==x)return!0;break;default:if((f==null?void 0:f.receiverId)!==x)return!0}return!1},P=(x,b)=>{e(R=>{for(const H of R.elements)ye.isHeliostatOrFresnelReflector(H.type)&&!H.locked&&x.has(H.id)&&(H.type===z.Heliostat?H.towerId=b:H.type===z.FresnelReflector&&(H.receiverId=b))})},v=x=>{if(f&&C(x)){switch(s){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(H.id)&&b.set(H.id,H.receiverId);const R={name:"Set Receiver for Selected Fresnel Reflectors",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{P(R.oldValues,R.newValue)}};l(R),P(b,x),d(u+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.FresnelReflector&&b.set(H.id,H.receiverId);const R={name:"Set Receiver for All Fresnel Reflectors",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{a(z.FresnelReflector,R.newValue)}};l(R),a(z.FresnelReflector,x),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const b=new Map;for(const H of n)H.type===z.FresnelReflector&&H.foundationId===f.foundationId&&b.set(H.id,H.receiverId);const R={name:"Set Receiver for All Fresnel Reflectors Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:f.foundationId,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{R.groupId&&i(z.FresnelReflector,R.groupId,R.newValue)}};l(R),i(z.FresnelReflector,f.foundationId,x),d(u+1)}break}default:{const b=o(f.id),R=b?b.receiverId:f.receiverId,H={name:"Set Receiver for Fresnel Reflector",timestamp:Date.now(),oldValue:R,newValue:x,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(H.changedElementId,H.oldValue)},redo:()=>{r(H.changedElementId,H.newValue)}};l(H),r(f.id,x),d(u+1);break}}e(b=>{b.actionState.fresnelReflectorReceiver=x})}},T=()=>{t(!1)},w=()=>{p&&v(p)};return(f==null?void 0:f.type)!==z.FresnelReflector?null:h.jsx(so,{width:640,title:Y.t("fresnelReflectorMenu.SelectAbsorberToReflectSunlightTo",A),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:9,children:h.jsx(Uo,{style:{width:"160px"},value:p,onChange:x=>{g(x)},children:y.map((x,b)=>h.jsx(Upo,{value:x,children:Y.t("fresnelReflectorMenu.AbsorberPipe",A)+" "+(b+1)},b))})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:15,children:h.jsx(Le.Group,{onChange:S,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("fresnelReflectorMenu.OnlyThisFresnelReflector",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("fresnelReflectorMenu.AllFresnelReflectorsAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllSelectedFresnelReflectors",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllFresnelReflectors",A)})]})})})]})})},Bpo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(Fw),r=M($q),i=M(xW),a=M(Gr),l=M(En),s=M(kb),c=M(Lb),u=M(no),d=M(Qn),f=M(Xi),p=uo(z.FresnelReflector),[g,A]=m.useState((p==null?void 0:p.ly)??9),y=m.useRef(!1),S=m.useRef(),C=$t(),P=W=>{c(W.target.value)},v=(W,k)=>{const D=a(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.ly=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},T=(W,k)=>!v(W,k),w=W=>{if(p){switch(s){case re.AllSelectedObjectsOfThisType:for(const k of e)if(k.type===z.FresnelReflector&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.ly-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of e)if(k.type===z.FresnelReflector&&!k.locked&&Math.abs(k.ly-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of e)if(k.type===z.FresnelReflector&&k.foundationId===(p==null?void 0:p.foundationId)&&!k.locked&&Math.abs(k.ly-W)>Et)return!0;break;default:if(Math.abs((p==null?void 0:p.ly)-W)>Et)return!0}return!1}},x=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.FresnelReflector&&!L.locked&&W.has(L.id)&&(L.ly=k)})},b=W=>{if(p&&w(W))switch(S.current=void 0,s){case re.AllSelectedObjectsOfThisType:{y.current=!1;for(const k of e)if(k.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(k.id)&&T(k,W)){y.current=!0;break}if(y.current)S.current=W,A(p.ly);else{const k=new Map;for(const L of e)L.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.ly);const D={name:"Set Length for Selected Fresnel Reflectors",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())o(L,j)},redo:()=>{x(D.oldValues,D.newValue)}};l(D),x(k,W),d(u+1)}break}case re.AllObjectsOfThisType:{y.current=!1;for(const k of e)if(k.type===z.FresnelReflector&&T(k,W)){y.current=!0;break}if(y.current)S.current=W,A(p.ly);else{const k=new Map;for(const L of e)L.type===z.FresnelReflector&&k.set(L.id,L.ly);const D={name:"Set Length for All Fresnel Reflectors",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())o(L,j)},redo:()=>{i(z.FresnelReflector,D.newValue)}};l(D),i(z.FresnelReflector,W),d(u+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(p.foundationId){y.current=!1;for(const k of e)if(k.type===z.FresnelReflector&&k.foundationId===p.foundationId&&T(k,W)){y.current=!0;break}if(y.current)S.current=W,A(p.ly);else{const k=new Map;for(const L of e)L.type===z.FresnelReflector&&L.foundationId===p.foundationId&&k.set(L.id,L.ly);const D={name:"Set Length for All Fresnel Reflectors Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:p.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())o(L,j)},redo:()=>{D.groupId&&r(z.FresnelReflector,D.groupId,D.newValue)}};l(D),r(z.FresnelReflector,p.foundationId,W),d(u+1)}}break}default:{const k=n(p.id),D=k?k.ly:p.ly;if(y.current=T(p,W),y.current)S.current=W,A(D);else{const L={name:"Set Fresnel Reflector Length",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:p.id,changedElementType:p.type,undo:()=>{o(L.changedElementId,L.oldValue)},redo:()=>{o(L.changedElementId,L.newValue)}};l(L),o(p.id,W),d(u+1)}break}}},R=()=>{y.current=!1,t(!1)},H=()=>{R(),f()},F=()=>{b(g),y.current||(t(!1),d(0))},E=W=>{if(!p)return 1;let k=W??1;return k=Math.max(1,Math.ceil((k-p.moduleLength/2)/p.moduleLength))*p.moduleLength,k},N=()=>{b(g)};if((p==null?void 0:p.type)!==z.FresnelReflector)return null;const U=y.current?": "+Y.t("message.NotApplicableToSelectedAction",C)+(S.current!==void 0?" ("+S.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("word.Length",C),rejectedMessage:U,onApply:N,onClose:R,onClickCancel:H,onClickOk:F,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:p.moduleLength,max:200*p.moduleLength,step:p.moduleLength,style:{width:120},precision:2,value:g,onChange:W=>{W!==null&&A(E(W))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("fresnelReflectorMenu.ModuleLength",C)+": "+p.moduleLength.toFixed(1)+" "+Y.t("word.MeterAbbreviation",C),h.jsx("br",{}),Math.round(g/p.moduleLength)+" "+Y.t("fresnelReflectorMenu.ModulesLong",C),h.jsx("br",{}),Y.t("word.Maximum",C),": 200 ",Y.t("fresnelReflectorMenu.Modules",C)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",C)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("fresnelReflectorMenu.OnlyThisFresnelReflector",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("fresnelReflectorMenu.AllFresnelReflectorsAboveFoundation",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllSelectedFresnelReflectors",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllFresnelReflectors",C)})]})})})]})})},Ypo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(d3),i=M(qq),a=M(vW),l=M(Gr),s=M(En),c=M(kb),u=M(Lb),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.FresnelReflector),[A,y]=m.useState((g==null?void 0:g.lx)??2),S=m.useRef(!1),C=m.useRef(),P=$t(),v=W=>{u(W.target.value)},T=(W,k)=>{const D=l(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.lx=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},w=(W,k)=>!T(W,k),x=W=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const k of n)if(k.type===z.FresnelReflector&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.lx-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of n)if(k.type===z.FresnelReflector&&!k.locked&&Math.abs(k.lx-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of n)if(k.type===z.FresnelReflector&&k.foundationId===(g==null?void 0:g.foundationId)&&!k.locked&&Math.abs(k.lx-W)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.lx)-W)>Et)return!0}return!1}},b=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.FresnelReflector&&!L.locked&&W.has(L.id)&&(L.lx=k)})},R=W=>{if(g&&x(W)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(k.id)&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.lx);else{const k=new Map;for(const L of n)L.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.lx);const D={name:"Set Width for Selected Fresnel Reflectors",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{b(D.oldValues,D.newValue)}};s(D),b(k,W),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.FresnelReflector&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.lx);else{const k=new Map;for(const L of n)L.type===z.FresnelReflector&&k.set(L.id,L.lx);const D={name:"Set Width for All Fresnel Reflectors",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{a(z.FresnelReflector,D.newValue)}};s(D),a(z.FresnelReflector,W),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.FresnelReflector&&k.foundationId===g.foundationId&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.lx);else{const k=new Map;for(const L of n)L.type===z.FresnelReflector&&L.foundationId===g.foundationId&&k.set(L.id,L.lx);const D={name:"Set Width for All Fresnel Reflectors Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{D.groupId&&i(z.FresnelReflector,D.groupId,D.newValue)}};s(D),i(z.FresnelReflector,g.foundationId,W),f(d+1)}}break}default:{const k=o(g.id),D=k?k.lx:g.lx;if(S.current=w(g,W),S.current)C.current=W,y(D);else{const L={name:"Set Fresnel Reflector Width",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(L.changedElementId,L.oldValue)},redo:()=>{r(L.changedElementId,L.newValue)}};s(L),r(g.id,W),f(d+1)}break}}e(k=>{k.actionState.fresnelReflectorWidth=W})}},H=()=>{S.current=!1,t(!1)},F=()=>{H(),p()},E=()=>{R(A),S.current||(t(!1),f(0))},N=()=>{R(A)};if((g==null?void 0:g.type)!==z.FresnelReflector)return null;const U=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("word.Width",P),rejectedMessage:U,onApply:N,onClose:H,onClickCancel:F,onClickOk:E,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:10,step:.5,style:{width:120},precision:2,value:A,onChange:W=>{W!==null&&y(W)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.MinimumValue",P),": 1 ",Y.t("word.MeterAbbreviation",P),h.jsx("br",{}),Y.t("word.MaximumValue",P),": 10 ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("fresnelReflectorMenu.OnlyThisFresnelReflector",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("fresnelReflectorMenu.AllFresnelReflectorsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllSelectedFresnelReflectors",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllFresnelReflectors",P)})]})})})]})})},Opo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(NYe),i=M(UYe),a=M(jYe),l=M(Gr),s=M(En),c=M(kb),u=M(Lb),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.FresnelReflector),[A,y]=m.useState((g==null?void 0:g.moduleLength)??3),S=m.useRef(!1),C=m.useRef(),P=$t(),v=W=>{u(W.target.value)},T=(W,k)=>{const D=l(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.moduleLength=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},w=(W,k)=>!T(W,k),x=W=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const k of n)if(k.type===z.FresnelReflector&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.moduleLength-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of n)if(k.type===z.FresnelReflector&&!k.locked&&Math.abs(k.moduleLength-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of n)if(k.type===z.FresnelReflector&&k.foundationId===(g==null?void 0:g.foundationId)&&!k.locked&&Math.abs(k.moduleLength-W)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.moduleLength)-W)>Et)return!0}return!1}},b=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.FresnelReflector&&!L.locked&&W.has(L.id)&&(L.moduleLength=k)})},R=W=>{if(g&&x(W)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(k.id)&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.moduleLength);else{const k=new Map;for(const L of n)L.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.moduleLength);const D={name:"Set Module Length for Selected Fresnel Reflectors",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{b(D.oldValues,D.newValue)}};s(D),b(k,W),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.FresnelReflector&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.moduleLength);else{const k=new Map;for(const L of n)L.type===z.FresnelReflector&&k.set(L.id,L.moduleLength);const D={name:"Set Module Length for All Fresnel Reflectors",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{a(z.FresnelReflector,D.newValue)}};s(D),a(z.FresnelReflector,W),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.FresnelReflector&&k.foundationId===g.foundationId&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.moduleLength);else{const k=new Map;for(const L of n)L.type===z.FresnelReflector&&L.foundationId===g.foundationId&&k.set(L.id,L.moduleLength);const D={name:"Set Module Length for All Fresnel Reflectors Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{D.groupId&&i(z.FresnelReflector,D.groupId,D.newValue)}};s(D),i(z.FresnelReflector,g.foundationId,W),f(d+1)}}break}default:{const k=o(g.id),D=k?k.moduleLength:g.moduleLength;if(S.current=w(g,W),S.current)C.current=W,y(D);else{const L={name:"Set Fresnel Reflector Module Length",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(L.changedElementId,L.oldValue)},redo:()=>{r(L.changedElementId,L.newValue)}};s(L),r(g.id,W),f(d+1)}break}}e(k=>{k.actionState.fresnelReflectorModuleLength=W})}},H=()=>{S.current=!1,t(!1)},F=()=>{H(),p()},E=()=>{R(A),S.current||(t(!1),f(0))},N=()=>{R(A)};if((g==null?void 0:g.type)!==z.FresnelReflector)return null;const U=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("fresnelReflectorMenu.ModuleLength",P),rejectedMessage:U,onApply:N,onClose:H,onClickCancel:F,onClickOk:E,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:20,step:.5,style:{width:120},precision:2,value:A,onChange:W=>{W!==null&&y(W)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.MinimumValue",P),": 1 ",Y.t("word.MeterAbbreviation",P),h.jsx("br",{}),Y.t("word.MaximumValue",P),": 10 ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("fresnelReflectorMenu.OnlyThisFresnelReflector",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("fresnelReflectorMenu.AllFresnelReflectorsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllSelectedFresnelReflectors",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllFresnelReflectors",P)})]})})})]})})},Vpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(TW),i=M(PW),a=M(CW),l=M(Gr),s=M(En),c=M(kb),u=M(Lb),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.FresnelReflector),[A,y]=m.useState((g==null?void 0:g.poleHeight)??1),S=m.useRef(!1),C=m.useRef(),P=m.useRef((g==null?void 0:g.poleHeight)??1),v=$t(),T=U=>{u(U.target.value)},w=U=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:{for(const W of n)if(W.type===z.FresnelReflector&&!W.locked&&M.getState().selectedElementIdSet.has(W.id)&&Math.abs(W.poleHeight-U)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const W of n)if(W.type===z.FresnelReflector&&!W.locked&&Math.abs(W.poleHeight-U)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const W of n)if(W.type===z.FresnelReflector&&W.foundationId===(g==null?void 0:g.foundationId)&&!W.locked&&Math.abs(W.poleHeight-U)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{if(l(g)){for(const k of n)if(k.type===z.FresnelReflector&&k.parentId===g.parentId&&!k.locked&&Math.abs(k.poleHeight-U)>Et)return!0}break}default:{if(Math.abs((g==null?void 0:g.poleHeight)-U)>Et)return!0;break}}return!1}},x=(U,W)=>{M.getState().set(k=>{for(const D of k.elements)D.type===z.FresnelReflector&&!D.locked&&U.has(D.id)&&(D.poleHeight=W)})},b=U=>{if(g&&w(U)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const W of n)if(W.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(W.id)&&.5*W.ly*Math.abs(Math.sin(W.tiltAngle))>U){S.current=!0;break}if(S.current)C.current=U,P.current=g.poleHeight;else{const W=new Map;for(const D of n)D.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(D.id)&&W.set(D.id,D.poleHeight);const k={name:"Set Pole Height for Selected Fresnel Reflectors",timestamp:Date.now(),oldValues:W,newValue:U,undo:()=>{for(const[D,L]of k.oldValues.entries())r(D,L)},redo:()=>{x(k.oldValues,k.newValue)}};s(k),x(W,U),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const W of n)if(W.type===z.FresnelReflector&&.5*W.ly*Math.abs(Math.sin(W.tiltAngle))>U){S.current=!0;break}if(S.current)C.current=U,P.current=g.poleHeight;else{const W=new Map;for(const D of n)D.type===z.FresnelReflector&&W.set(D.id,D.poleHeight);const k={name:"Set Pole Height for All Fresnel Reflectors",timestamp:Date.now(),oldValues:W,newValue:U,undo:()=>{for(const[D,L]of k.oldValues.entries())r(D,L)},redo:()=>{a(z.FresnelReflector,k.newValue)}};s(k),a(z.FresnelReflector,U),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const W of n)if(W.type===z.FresnelReflector&&W.foundationId===g.foundationId&&.5*W.ly*Math.abs(Math.sin(W.tiltAngle))>U){S.current=!0;break}if(S.current)C.current=U,P.current=g.poleHeight;else{const W=new Map;for(const D of n)D.type===z.FresnelReflector&&D.foundationId===g.foundationId&&W.set(D.id,D.poleHeight);const k={name:"Set Pole Height for All Fresnel Reflectors Above Foundation",timestamp:Date.now(),oldValues:W,newValue:U,groupId:g.foundationId,undo:()=>{for(const[D,L]of k.oldValues.entries())r(D,L)},redo:()=>{k.groupId&&i(z.FresnelReflector,k.groupId,k.newValue)}};s(k),i(z.FresnelReflector,g.foundationId,U),f(d+1)}}break}default:{const W=o(g.id),k=W?W.poleHeight:g.poleHeight;if(S.current=.5*g.lx*Math.abs(Math.sin(g.tiltAngle))>U,S.current)C.current=U,P.current=k;else{const D={name:"Set Fresnel Reflector Pole Height",timestamp:Date.now(),oldValue:k,newValue:U,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(D.changedElementId,D.oldValue)},redo:()=>{r(D.changedElementId,D.newValue)}};s(D),r(g.id,U),f(d+1)}break}}e(W=>{W.actionState.fresnelReflectorPoleHeight=U})}},R=()=>{t(!1)},H=()=>{R(),p()},F=()=>{b(A),S.current||(t(!1),f(0))},E=()=>{b(A)};if((g==null?void 0:g.type)!==z.FresnelReflector)return null;const N=S.current?": "+Y.t("message.NotApplicableToSelectedAction",v)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("solarCollectorMenu.ExtraPoleHeightInAdditionToHalfWidth",v),rejectedMessage:N,onApply:E,onClose:R,onClickCancel:H,onClickOk:F,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:0,max:5,style:{width:120},step:.1,precision:2,value:A,onChange:U=>{U!==null&&y(U)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",v),": [0, 5] ",Y.t("word.MeterAbbreviation",v)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",v)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:T,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("fresnelReflectorMenu.OnlyThisFresnelReflector",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("fresnelReflectorMenu.AllFresnelReflectorsAboveFoundation",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllSelectedFresnelReflectors",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllFresnelReflectors",v)})]})})})]})})},_po=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Zq),i=M(e$),a=M(t$),l=M(En),s=M(kb),c=M(Lb),u=M(no),d=M(Qn),f=uo(z.FresnelReflector),[p,g]=m.useState((f==null?void 0:f.reflectance)??.9),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.FresnelReflector&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.reflectance-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.FresnelReflector&&!x.locked&&Math.abs(x.reflectance-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.FresnelReflector&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.reflectance-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.reflectance)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.FresnelReflector&&!R.locked&&w.has(R.id)&&(R.reflectance=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.FresnelReflector&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for Selected Fresnel Reflectors",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.FresnelReflector&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for All Fresnel Reflectors",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.FresnelReflector,b.newValue)}};l(b),a(z.FresnelReflector,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.FresnelReflector&&R.foundationId===f.foundationId&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for All Fresnel Reflectors Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.FresnelReflector,b.groupId,b.newValue)}};l(b),i(z.FresnelReflector,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.reflectance:f.reflectance,R={name:"Set Fresnel Reflector Reflectance",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.fresnelReflectorReflectance=w})}},v=()=>{t(!1)},T=()=>{P(p)};return(f==null?void 0:f.type)!==z.FresnelReflector?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReflectorReflectance",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,value:p,step:.01,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("fresnelReflectorMenu.OnlyThisFresnelReflector",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("fresnelReflectorMenu.AllFresnelReflectorsAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllSelectedFresnelReflectors",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("fresnelReflectorMenu.AllFresnelReflectors",A)})]})})})]})})},Gpo=t=>{const e=[];if(t.type!==z.FresnelReflector)return{items:e};const n=t,o={lng:M.getState().language},r=!n.locked;return e.push({key:"fresnel-reflector-copy",label:h.jsx(Fd,{})}),r&&e.push({key:"fresnel-reflector-cut",label:h.jsx(kd,{})}),e.push({key:"fresnel-reflector-lock",label:h.jsx(Ku,{selectedElement:n})}),r&&e.push({key:"fresnel-reflector-receiver",label:h.jsxs(eo,{Dialog:jpo,children:[Y.t("fresnelReflectorMenu.SelectAbsorberToReflectSunlightTo",o)," ..."]})},{key:"fresnel-reflector-length",label:h.jsxs(eo,{Dialog:Bpo,children:[Y.t("word.Length",o)," ..."]})},{key:"fresnel-reflector-width",label:h.jsxs(eo,{Dialog:Ypo,children:[Y.t("word.Width",o)," ..."]})},{key:"fresnel-reflector-module-length",label:h.jsxs(eo,{Dialog:Opo,children:[Y.t("fresnelReflectorMenu.ModuleLength",o)," ..."]})},{key:"fresnel-reflector-pole-height",label:h.jsxs(eo,{Dialog:Vpo,children:[Y.t("solarCollectorMenu.ExtraPoleHeight",o)," ..."]})},{key:"fresnel-reflector-reflectance",label:h.jsxs(eo,{Dialog:_po,children:[Y.t("concentratedSolarPowerCollectorMenu.ReflectorReflectance",o)," ..."]})},{key:"fresnel-reflector-draw-sun-beam",label:h.jsxs(eo,{Dialog:Npo,children:[Y.t("solarCollectorMenu.DrawSunBeam",o)," ..."]})},{key:"fresnel-reflector-label-submenu",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",o)}),children:v3(n)}),{items:e}},Xpo=({setDialogVisible:t})=>{const e=M(Kn),n=M(Jn),o=M(pYe),r=M(gYe),i=M(mYe),a=M(En),l=M(Wb),s=M(Nb),c=M(no),u=M(Qn),d=uo(z.Heliostat),[f,p]=m.useState(!!(d!=null&&d.drawSunBeam)),g=$t(),A=T=>{s(T.target.value)},y=T=>{switch(l){case re.AllSelectedObjectsOfThisType:for(const w of e)if(w.type===z.Heliostat&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)&&w.drawSunBeam!==T)return!0;break;case re.AllObjectsOfThisType:for(const w of e)if(w.type===z.Heliostat&&!w.locked&&w.drawSunBeam!==T)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const w of e)if(w.type===z.Heliostat&&w.foundationId===(d==null?void 0:d.foundationId)&&!w.locked&&w.drawSunBeam!==T)return!0;break;default:if((d==null?void 0:d.drawSunBeam)!==T)return!0}return!1},S=(T,w)=>{M.getState().set(x=>{for(const b of x.elements)b.type===z.Heliostat&&!b.locked&&T.has(b.id)&&(b.drawSunBeam=w)})},C=T=>{if(d&&y(T))switch(l){case re.AllSelectedObjectsOfThisType:{const w=new Map;for(const b of e)b.type===z.Heliostat&&M.getState().selectedElementIdSet.has(b.id)&&w.set(b.id,b.drawSunBeam);const x={name:"Draw Sun Beam for Selected Heliostats",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())o(b,R)},redo:()=>{S(x.oldValues,x.newValue)}};a(x),S(w,T),u(c+1);break}case re.AllObjectsOfThisType:{const w=new Map;for(const b of e)b.type===z.Heliostat&&w.set(b.id,b.drawSunBeam);const x={name:"Draw Sun Beam for All Heliostats",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())o(b,R)},redo:()=>{i(z.Heliostat,x.newValue)}};a(x),i(z.Heliostat,T),u(c+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(d.foundationId){const w=new Map;for(const b of e)b.type===z.Heliostat&&b.foundationId===d.foundationId&&w.set(b.id,b.drawSunBeam);const x={name:"Draw Sun Beam for All Heliostats Above Foundation",timestamp:Date.now(),oldValues:w,newValue:T,groupId:d.foundationId,undo:()=>{for(const[b,R]of x.oldValues.entries())o(b,R)},redo:()=>{x.groupId&&r(z.Heliostat,x.groupId,x.newValue)}};a(x),r(z.Heliostat,d.foundationId,T),u(c+1)}break}default:{const w=n(d.id),x=w?w.drawSunBeam:d.drawSunBeam,b={name:"Draw Sun Beam for Heliostat",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:d.id,changedElementType:d.type,undo:()=>{o(b.changedElementId,b.oldValue)},redo:()=>{o(b.changedElementId,b.newValue)}};a(b),o(d.id,T),u(c+1);break}}},P=()=>{t(!1)},v=()=>{C(f)};return(d==null?void 0:d.type)!==z.Heliostat?null:h.jsx(so,{width:500,title:Y.t("solarCollectorMenu.DrawSunBeam",g),onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:4,children:h.jsx(vc,{checked:f,onChange:p})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:20,children:h.jsx(Le.Group,{onChange:A,value:l,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("heliostatMenu.OnlyThisHeliostat",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("heliostatMenu.AllHeliostatsAboveFoundation",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("heliostatMenu.AllSelectedHeliostats",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("heliostatMenu.AllHeliostats",g)})]})})})]})})},{Option:Jpo}=Uo,Kpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(DYe),i=M(EYe),a=M(FYe),l=M(En),s=M(Wb),c=M(Nb),u=M(no),d=M(Qn),f=uo(z.Heliostat),[p,g]=m.useState((f==null?void 0:f.towerId)??"None"),A=$t(),y=m.useMemo(()=>{const x=[];for(const b of n)if(b.type===z.Foundation){const R=b;R.solarStructure===Dn.FocusTower&&x.push(R.id)}return x},[n]);m.useEffect(()=>{if(g("None"),f)if(f.towerId)g(f.towerId);else{const x=o(f.parentId);x&&x.type===z.Foundation&&x.solarStructure===Dn.FocusTower&&g(x.id)}},[f]);const S=x=>{c(x.target.value)},C=x=>{switch(s){case re.AllSelectedObjectsOfThisType:for(const b of n)if(b.type===z.Heliostat&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&b.towerId!==x)return!0;break;case re.AllObjectsOfThisType:for(const b of n)if(b.type===z.Heliostat&&!b.locked&&b.towerId!==x)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const b of n)if(b.type===z.Heliostat&&b.foundationId===(f==null?void 0:f.foundationId)&&!b.locked&&b.towerId!==x)return!0;break;default:if((f==null?void 0:f.towerId)!==x)return!0}return!1},P=(x,b)=>{M.getState().set(R=>{for(const H of R.elements)H.type===z.Heliostat&&!H.locked&&x.has(H.id)&&(H.towerId=b)})},v=x=>{if(f&&C(x)){switch(s){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.Heliostat&&M.getState().selectedElementIdSet.has(H.id)&&b.set(H.id,H.towerId);const R={name:"Set Tower for Selected Heliostats",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{P(R.oldValues,R.newValue)}};l(R),P(b,x),d(u+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.Heliostat&&b.set(H.id,H.towerId);const R={name:"Set Tower for All Heliostats",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{a(z.Heliostat,R.newValue)}};l(R),a(z.Heliostat,x),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const b=new Map;for(const H of n)H.type===z.Heliostat&&H.foundationId===f.foundationId&&b.set(H.id,H.towerId);const R={name:"Set Tower for All Heliostats Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:f.foundationId,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{R.groupId&&i(z.Heliostat,R.groupId,R.newValue)}};l(R),i(z.Heliostat,f.foundationId,x),d(u+1)}break}default:{const b=o(f.id),R=b?b.towerId:f.towerId,H={name:"Set Tower for Heliostat",timestamp:Date.now(),oldValue:R,newValue:x,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(H.changedElementId,H.oldValue)},redo:()=>{r(H.changedElementId,H.newValue)}};l(H),r(f.id,x),d(u+1);break}}e(b=>{b.actionState.heliostatTower=x})}},T=()=>{t(!1)},w=()=>{p&&v(p),t(!1),d(0)};return(f==null?void 0:f.type)!==z.Heliostat?null:h.jsx(so,{width:600,title:Y.t("heliostatMenu.SelectTowerToReflectSunlightTo",A),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:8,children:h.jsx(Uo,{style:{width:"120px"},value:p,onChange:g,children:y.map((x,b)=>h.jsx(Jpo,{value:x,children:Y.t("heliostatMenu.Tower",A)+" "+(b+1)},b))})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:S,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("heliostatMenu.OnlyThisHeliostat",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("heliostatMenu.AllHeliostatsAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("heliostatMenu.AllSelectedHeliostats",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("heliostatMenu.AllHeliostats",A)})]})})})]})})},qpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(d3),i=M(qq),a=M(vW),l=M(Gr),s=M(En),c=M(Wb),u=M(Nb),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.Heliostat),[A,y]=m.useState((g==null?void 0:g.lx)??2),S=m.useRef(!1),C=m.useRef(),P=$t(),v=W=>{u(W.target.value)},T=(W,k)=>{const D=l(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.lx=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},w=(W,k)=>!T(W,k),x=W=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const k of n)if(k.type===z.Heliostat&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.lx-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of n)if(k.type===z.Heliostat&&!k.locked&&Math.abs(k.lx-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of n)if(k.type===z.Heliostat&&k.foundationId===(g==null?void 0:g.foundationId)&&!k.locked&&Math.abs(k.lx-W)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.lx)-W)>Et)return!0}return!1}},b=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.Heliostat&&!L.locked&&W.has(L.id)&&(L.lx=k)})},R=W=>{if(g&&x(W)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.Heliostat&&M.getState().selectedElementIdSet.has(k.id)&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.lx);else{const k=new Map;for(const L of n)L.type===z.Heliostat&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.lx);const D={name:"Set Length for Selected Heliostats",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{b(D.oldValues,D.newValue)}};s(D),b(k,W),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.Heliostat&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.lx);else{const k=new Map;for(const L of n)L.type===z.Heliostat&&k.set(L.id,L.lx);const D={name:"Set Length for All Heliostats",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{a(z.Heliostat,D.newValue)}};s(D),a(z.Heliostat,W),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.Heliostat&&k.foundationId===g.foundationId&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.lx);else{const k=new Map;for(const L of n)L.type===z.Heliostat&&L.foundationId===g.foundationId&&k.set(L.id,L.lx);const D={name:"Set Length for All Heliostats Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{D.groupId&&i(z.Heliostat,D.groupId,D.newValue)}};s(D),i(z.Heliostat,g.foundationId,W),f(d+1)}}break}default:{const k=o(g.id),D=k?k.lx:g.lx;if(S.current=w(g,W),S.current)C.current=W,y(D);else{const L={name:"Set Heliostat Length",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(L.changedElementId,L.oldValue)},redo:()=>{r(L.changedElementId,L.newValue)}};s(L),r(g.id,W),f(d+1)}break}}e(k=>{k.actionState.heliostatLength=W})}},H=()=>{S.current=!1,t(!1)},F=()=>{H(),p()},E=()=>{R(A),S.current||(t(!1),f(0))},N=()=>{R(A)};if((g==null?void 0:g.type)!==z.Heliostat)return null;const U=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("word.Length",P),rejectedMessage:U,onApply:N,onClose:H,onClickCancel:F,onClickOk:E,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:20,step:.5,style:{width:120},precision:2,value:A,onChange:W=>{W!==null&&y(W)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.MinimumValue",P),": 1 ",Y.t("word.MeterAbbreviation",P),h.jsx("br",{}),Y.t("word.MaximumValue",P),": 20 ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("heliostatMenu.OnlyThisHeliostat",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("heliostatMenu.AllHeliostatsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("heliostatMenu.AllSelectedHeliostats",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("heliostatMenu.AllHeliostats",P)})]})})})]})})},$po=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Fw),i=M($q),a=M(xW),l=M(Gr),s=M(En),c=M(Wb),u=M(Nb),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.Heliostat),[A,y]=m.useState((g==null?void 0:g.ly)??4),S=m.useRef(!1),C=m.useRef(),P=$t(),v=W=>{u(W.target.value)},T=(W,k)=>{const D=l(W);if(D){const L=JSON.parse(JSON.stringify(W));return L.ly=k,ye.isSolarCollectorWithinHorizontalSurface(L,D)}return!1},w=(W,k)=>!T(W,k),x=W=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:for(const k of n)if(k.type===z.Heliostat&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)&&Math.abs(k.ly-W)>Et)return!0;break;case re.AllObjectsOfThisType:for(const k of n)if(k.type===z.Heliostat&&!k.locked&&Math.abs(k.ly-W)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const k of n)if(k.type===z.Heliostat&&k.foundationId===(g==null?void 0:g.foundationId)&&!k.locked&&Math.abs(k.ly-W)>Et)return!0;break;default:if(Math.abs((g==null?void 0:g.ly)-W)>Et)return!0}return!1}},b=(W,k)=>{M.getState().set(D=>{for(const L of D.elements)L.type===z.Heliostat&&!L.locked&&W.has(L.id)&&(L.ly=k)})},R=W=>{if(g&&x(W)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.Heliostat&&M.getState().selectedElementIdSet.has(k.id)&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.ly);else{const k=new Map;for(const L of n)L.type===z.Heliostat&&M.getState().selectedElementIdSet.has(L.id)&&k.set(L.id,L.ly);const D={name:"Set Width for Selected Heliostats",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{b(D.oldValues,D.newValue)}};s(D),b(k,W),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const k of n)if(k.type===z.Heliostat&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.ly);else{const k=new Map;for(const L of n)L.type===z.Heliostat&&k.set(L.id,L.ly);const D={name:"Set Width for All Heliostats",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{a(z.Heliostat,D.newValue)}};s(D),a(z.Heliostat,W),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const k of n)if(k.type===z.Heliostat&&k.foundationId===g.foundationId&&w(k,W)){S.current=!0;break}if(S.current)C.current=W,y(g.ly);else{const k=new Map;for(const L of n)L.type===z.Heliostat&&L.foundationId===g.foundationId&&k.set(L.id,L.ly);const D={name:"Set Width for All Heliostats Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:g.foundationId,undo:()=>{for(const[L,j]of D.oldValues.entries())r(L,j)},redo:()=>{D.groupId&&i(z.Heliostat,D.groupId,D.newValue)}};s(D),i(z.Heliostat,g.foundationId,W),f(d+1)}}break}default:{const k=o(g.id),D=k?k.ly:g.ly;if(S.current=w(g,W),S.current)C.current=W,y(D);else{const L={name:"Set Heliostat Width",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(L.changedElementId,L.oldValue)},redo:()=>{r(L.changedElementId,L.newValue)}};s(L),r(g.id,W),f(d+1)}break}}e(k=>{k.actionState.heliostatWidth=W})}},H=()=>{S.current=!1,t(!1)},F=()=>{H(),p()},E=()=>{R(A),S.current||(t(!1),f(0))},N=()=>{R(A)};if((g==null?void 0:g.type)!==z.Heliostat)return null;const U=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("word.Width",P),rejectedMessage:U,onApply:N,onClose:H,onClickCancel:F,onClickOk:E,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:20,step:.5,precision:2,style:{width:120},value:A,onChange:W=>{W!==null&&y(W)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.MinimumValue",P),": 1 ",Y.t("word.MeterAbbreviation",P),h.jsx("br",{}),Y.t("word.MaximumValue",P),": 20 ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("heliostatMenu.OnlyThisHeliostat",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("heliostatMenu.AllHeliostatsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("heliostatMenu.AllSelectedHeliostats",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("heliostatMenu.AllHeliostats",P)})]})})})]})})},Qpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(TW),i=M(PW),a=M(CW),l=M(Gr),s=M(En),c=M(Wb),u=M(Nb),d=M(no),f=M(Qn),p=M(Xi),g=uo(z.Heliostat),[A,y]=m.useState((g==null?void 0:g.poleHeight)??1),S=m.useRef(!1),C=m.useRef(),P=$t(),v=N=>{u(N.target.value)},T=N=>{if(g){switch(c){case re.AllSelectedObjectsOfThisType:{for(const U of n)if(U.type===z.Heliostat&&!U.locked&&M.getState().selectedElementIdSet.has(U.id)&&Math.abs(U.poleHeight-N)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const U of n)if(U.type===z.Heliostat&&!U.locked&&Math.abs(U.poleHeight-N)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const U of n)if(U.type===z.Heliostat&&U.foundationId===(g==null?void 0:g.foundationId)&&!U.locked&&Math.abs(U.poleHeight-N)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{if(l(g)){for(const W of n)if(W.type===z.Heliostat&&W.parentId===g.parentId&&!W.locked&&Math.abs(W.poleHeight-N)>Et)return!0}break}default:{if(Math.abs((g==null?void 0:g.poleHeight)-N)>Et)return!0;break}}return!1}},w=(N,U)=>{M.getState().set(W=>{for(const k of W.elements)k.type===z.Heliostat&&!k.locked&&N.has(k.id)&&(k.poleHeight=U)})},x=N=>{if(g&&T(N)){switch(C.current=void 0,c){case re.AllSelectedObjectsOfThisType:{S.current=!1;for(const U of n)if(U.type===z.Heliostat&&M.getState().selectedElementIdSet.has(U.id)&&.5*Math.max(U.lx,U.ly)*Math.abs(Math.sin(U.tiltAngle))>N){S.current=!0;break}if(S.current)C.current=N,y(g.poleHeight);else{const U=new Map;for(const k of n)k.type===z.Heliostat&&M.getState().selectedElementIdSet.has(k.id)&&U.set(k.id,k.poleHeight);const W={name:"Set Pole Height for Selected Heliostats",timestamp:Date.now(),oldValues:U,newValue:N,undo:()=>{for(const[k,D]of W.oldValues.entries())r(k,D)},redo:()=>{w(W.oldValues,W.newValue)}};s(W),w(U,N),f(d+1)}break}case re.AllObjectsOfThisType:{S.current=!1;for(const U of n)if(U.type===z.Heliostat&&.5*Math.max(U.lx,U.ly)*Math.abs(Math.sin(U.tiltAngle))>N){S.current=!0;break}if(S.current)C.current=N,y(g.poleHeight);else{const U=new Map;for(const k of n)k.type===z.Heliostat&&U.set(k.id,k.poleHeight);const W={name:"Set Pole Height for All Heliostats",timestamp:Date.now(),oldValues:U,newValue:N,undo:()=>{for(const[k,D]of W.oldValues.entries())r(k,D)},redo:()=>{a(z.Heliostat,W.newValue)}};s(W),a(z.Heliostat,N),f(d+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(g.foundationId){S.current=!1;for(const U of n)if(U.type===z.Heliostat&&U.foundationId===g.foundationId&&.5*Math.max(U.lx,U.ly)*Math.abs(Math.sin(U.tiltAngle))>N){S.current=!0;break}if(S.current)C.current=N,y(g.poleHeight);else{const U=new Map;for(const k of n)k.type===z.Heliostat&&k.foundationId===g.foundationId&&U.set(k.id,k.poleHeight);const W={name:"Set Pole Height for All Heliostats Above Foundation",timestamp:Date.now(),oldValues:U,newValue:N,groupId:g.foundationId,undo:()=>{for(const[k,D]of W.oldValues.entries())r(k,D)},redo:()=>{W.groupId&&i(z.Heliostat,W.groupId,W.newValue)}};s(W),i(z.Heliostat,g.foundationId,N),f(d+1)}}break}default:{const U=o(g.id),W=U?U.poleHeight:g.poleHeight;if(S.current=.5*Math.max(g.lx,g.ly)*Math.abs(Math.sin(g.tiltAngle))>N,S.current)C.current=N,y(W);else{const k={name:"Set Heliostat Pole Height",timestamp:Date.now(),oldValue:W,newValue:N,changedElementId:g.id,changedElementType:g.type,undo:()=>{r(k.changedElementId,k.oldValue)},redo:()=>{r(k.changedElementId,k.newValue)}};s(k),r(g.id,N),f(d+1)}break}}e(U=>{U.actionState.heliostatPoleHeight=N})}},b=()=>{S.current=!1,t(!1)},R=()=>{b(),p()},H=()=>{x(A),S.current||(t(!1),f(0))},F=()=>{x(A)};if((g==null?void 0:g.type)!==z.Heliostat)return null;const E=S.current?": "+Y.t("message.NotApplicableToSelectedAction",P)+(C.current!==void 0?" ("+C.current.toFixed(2)+")":""):null;return h.jsx(so,{width:600,title:Y.t("solarCollectorMenu.ExtraPoleHeightInAdditionToHalfWidth",P),rejectedMessage:E,onApply:F,onClose:b,onClickCancel:R,onClickOk:H,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:0,max:5,style:{width:120},step:.1,precision:2,value:A,onChange:N=>{N!==null&&y(N)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",P),": [0, 5] ",Y.t("word.MeterAbbreviation",P)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",P)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:v,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("heliostatMenu.OnlyThisHeliostat",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("heliostatMenu.AllHeliostatsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("heliostatMenu.AllSelectedHeliostats",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("heliostatMenu.AllHeliostats",P)})]})})})]})})},Zpo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(vYe),i=M(xYe),a=M(bYe),l=M(Gr),s=M(En),c=M(Wb),u=M(Nb),d=M(no),f=M(Qn),p=uo(z.Heliostat),[g,A]=m.useState((p==null?void 0:p.poleRadius)??.1),y=$t(),S=x=>{u(x.target.value)},C=x=>{if(p){switch(c){case re.AllSelectedObjectsOfThisType:{for(const b of n)if(b.type===z.Heliostat&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&Math.abs(b.poleRadius-x)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const b of n)if(b.type===z.Heliostat&&!b.locked&&Math.abs(b.poleRadius-x)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const b of n)if(b.type===z.Heliostat&&b.foundationId===(p==null?void 0:p.foundationId)&&!b.locked&&Math.abs(b.poleRadius-x)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{if(l(p)){for(const R of n)if(R.type===z.Heliostat&&R.parentId===p.parentId&&!R.locked&&Math.abs(R.poleRadius-x)>Et)return!0}break}default:{if(Math.abs((p==null?void 0:p.poleRadius)-x)>Et)return!0;break}}return!1}},P=(x,b)=>{M.getState().set(R=>{for(const H of R.elements)H.type===z.Heliostat&&!H.locked&&x.has(H.id)&&(H.poleRadius=b)})},v=x=>{if(p&&C(x)){switch(c){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.Heliostat&&M.getState().selectedElementIdSet.has(H.id)&&b.set(H.id,H.poleRadius);const R={name:"Set Pole Radius for Selected Heliostats",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{P(R.oldValues,R.newValue)}};s(R),P(b,x),f(d+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.Heliostat&&b.set(H.id,H.poleRadius);const R={name:"Set Pole Radius for All Heliostats",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{a(z.Heliostat,R.newValue)}};s(R),a(z.Heliostat,x),f(d+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(p.foundationId){const b=new Map;for(const H of n)H.type===z.Heliostat&&H.foundationId===p.foundationId&&b.set(H.id,H.poleRadius);const R={name:"Set Pole Radius for All Heliostats Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:p.foundationId,undo:()=>{for(const[H,F]of R.oldValues.entries())r(H,F)},redo:()=>{R.groupId&&i(z.Heliostat,R.groupId,R.newValue)}};s(R),i(z.Heliostat,p.foundationId,x),f(d+1)}break}default:{const b=o(p.id),R=b?b.poleRadius:p.poleRadius,H={name:"Set Heliostat Pole Radius",timestamp:Date.now(),oldValue:R,newValue:x,changedElementId:p.id,changedElementType:p.type,undo:()=>{r(H.changedElementId,H.oldValue)},redo:()=>{r(H.changedElementId,H.newValue)}};s(H),r(p.id,x),f(d+1);break}}e(b=>{b.actionState.heliostatPoleRadius=x})}},T=()=>{t(!1)},w=()=>{v(g)};return(p==null?void 0:p.type)!==z.Heliostat?null:h.jsx(so,{width:600,title:Y.t("solarCollectorMenu.PoleRadius",y),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:.5,style:{width:120},step:.01,precision:2,value:g,onChange:x=>{x!==null&&A(x)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",y),": [0.1, 0.5] ",Y.t("word.MeterAbbreviation",y)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",y)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:S,value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("heliostatMenu.OnlyThisHeliostat",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("heliostatMenu.AllHeliostatsAboveFoundation",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("heliostatMenu.AllSelectedHeliostats",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("heliostatMenu.AllHeliostats",y)})]})})})]})})},e1o=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Zq),i=M(e$),a=M(t$),l=M(En),s=M(Wb),c=M(Nb),u=M(no),d=M(Qn),f=uo(z.Heliostat),[p,g]=m.useState((f==null?void 0:f.reflectance)??.9),A=$t(),y=w=>{c(w.target.value)},S=w=>{if(f){switch(s){case re.AllSelectedObjectsOfThisType:for(const x of n)if(x.type===z.Heliostat&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&Math.abs(x.reflectance-w)>Et)return!0;break;case re.AllObjectsOfThisType:for(const x of n)if(x.type===z.Heliostat&&!x.locked&&Math.abs(x.reflectance-w)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const x of n)if(x.type===z.Heliostat&&x.foundationId===(f==null?void 0:f.foundationId)&&!x.locked&&Math.abs(x.reflectance-w)>Et)return!0;break;default:if(Math.abs((f==null?void 0:f.reflectance)-w)>Et)return!0}return!1}},C=(w,x)=>{M.getState().set(b=>{for(const R of b.elements)R.type===z.Heliostat&&!R.locked&&w.has(R.id)&&(R.reflectance=x)})},P=w=>{if(f&&S(w)){switch(s){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.Heliostat&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for Selected Heliostats",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{C(b.oldValues,b.newValue)}};l(b),C(x,w),d(u+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.Heliostat&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for All Heliostats",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{a(z.Heliostat,b.newValue)}};l(b),a(z.Heliostat,w),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(f.foundationId){const x=new Map;for(const R of n)R.type===z.Heliostat&&R.foundationId===f.foundationId&&x.set(R.id,R.reflectance);const b={name:"Set Reflectance for All Heliostats Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:f.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())r(R,H)},redo:()=>{b.groupId&&i(z.Heliostat,b.groupId,b.newValue)}};l(b),i(z.Heliostat,f.foundationId,w),d(u+1)}break}default:{const x=o(f.id),b=x?x.reflectance:f.reflectance,R={name:"Set Heliostat Reflectance",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:f.id,changedElementType:f.type,undo:()=>{r(R.changedElementId,R.oldValue)},redo:()=>{r(R.changedElementId,R.newValue)}};l(R),r(f.id,w),d(u+1);break}}e(x=>{x.actionState.heliostatReflectance=w})}},v=()=>{t(!1)},T=()=>{P(p),t(!1),d(0)};return(f==null?void 0:f.type)!==z.Heliostat?null:h.jsx(so,{width:600,title:Y.t("concentratedSolarPowerCollectorMenu.ReflectorReflectance",A),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},precision:2,step:.01,value:p,onChange:w=>{w!==null&&g(w)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:s,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("heliostatMenu.OnlyThisHeliostat",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("heliostatMenu.AllHeliostatsAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("heliostatMenu.AllSelectedHeliostats",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("heliostatMenu.AllHeliostats",A)})]})})})]})})},t1o=t=>{const e=[];if(t.type!==z.Heliostat)return{items:e};const n=t,o={lng:M.getState().language},r=!n.locked;return e.push({key:"heliostat-copy",label:h.jsx(Fd,{})}),r&&e.push({key:"heliostat-cut",label:h.jsx(kd,{})}),e.push({key:"heliostat-lock",label:h.jsx(Ku,{selectedElement:n})}),r&&e.push({key:"heliostat-tower",label:h.jsxs(eo,{Dialog:Kpo,children:[Y.t("heliostatMenu.SelectTowerToReflectSunlightTo",o)," ..."]})},{key:"heliostat-length",label:h.jsxs(eo,{Dialog:qpo,children:[Y.t("word.Length",o)," ..."]})},{key:"heliostat-width",label:h.jsxs(eo,{Dialog:$po,children:[Y.t("word.Width",o)," ..."]})},{key:"heliostat-pole-height",label:h.jsxs(eo,{Dialog:Qpo,children:[Y.t("solarCollectorMenu.ExtraPoleHeight",o)," ..."]})},{key:"heliostat-pole-radius",label:h.jsxs(eo,{Dialog:Zpo,children:[Y.t("solarCollectorMenu.PoleRadius",o)," ..."]})},{key:"heliostat-reflectance",label:h.jsxs(eo,{Dialog:e1o,children:[Y.t("concentratedSolarPowerCollectorMenu.ReflectorReflectance",o)," ..."]})},{key:"heliostat-draw-sun-beam",label:h.jsxs(eo,{Dialog:Xpo,children:[Y.t("solarCollectorMenu.DrawSunBeam",o)," ..."]})},{key:"heliostat-label-submenu",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",o)}),children:v3(n)}),{items:e}},{Option:mm}=Uo,n1o=be.memo(({tree:t})=>{const e=M(pn),n=M(En),[o,r]=m.useState(!1),i=$t(),a=(l,s)=>{e(c=>{for(const u of c.elements)if(u.type===z.Tree&&u.id===l){u.name=s;break}})};return h.jsxs(Uo,{style:{width:"160px"},value:(t==null?void 0:t.name)??pr.Pine,onChange:l=>{if(t){const s=t.name;if(s!==l){const c={name:"Change Tree",timestamp:Date.now(),oldValue:s,newValue:l,changedElementId:t.id,changedElementType:t.type,undo:()=>{a(c.changedElementId,c.oldValue)},redo:()=>{a(c.changedElementId,c.newValue)}};n(c),a(t.id,l),e(u=>{u.actionState.treeType=l}),r(!o)}}},children:[h.jsxs(mm,{value:pr.Apple,children:[h.jsx("img",{alt:pr.Apple,src:dde,height:20,style:{paddingRight:"8px"}})," ",Y.t("tree.Apple",i)]},pr.Apple),h.jsxs(mm,{value:pr.Birch,children:[h.jsx("img",{alt:pr.Birch,src:fde,height:20,style:{paddingRight:"20px"}})," ",Y.t("tree.Birch",i)]},pr.Birch),h.jsxs(mm,{value:pr.Coconut,children:[h.jsx("img",{alt:pr.Coconut,src:aQe,height:20,style:{paddingRight:"18px"}})," ",Y.t("tree.Coconut",i)]},pr.Coconut),h.jsxs(mm,{value:pr.Dogwood,children:[h.jsx("img",{alt:pr.Dogwood,src:hde,height:20,style:{paddingRight:"10px"}})," ",Y.t("tree.Dogwood",i)]},pr.Dogwood),h.jsxs(mm,{value:pr.Elm,children:[h.jsx("img",{alt:pr.Elm,src:pde,height:20,style:{paddingRight:"20px"}}),Y.t("tree.Elm",i)]},pr.Elm),h.jsxs(mm,{value:pr.FanPalm,children:[h.jsx("img",{alt:pr.FanPalm,src:lQe,height:20,style:{paddingRight:"18px"}})," ",Y.t("tree.FanPalm",i)]},pr.FanPalm),h.jsxs(mm,{value:pr.Linden,children:[h.jsx("img",{alt:pr.Linden,src:gde,height:20,style:{paddingRight:"10px"}})," ",Y.t("tree.Linden",i)]},pr.Linden),h.jsxs(mm,{value:pr.Magnolia,children:[h.jsx("img",{alt:pr.Magnolia,src:mde,height:20,style:{paddingRight:"10px"}})," ",Y.t("tree.Magnolia",i)]},pr.Magnolia),h.jsxs(mm,{value:pr.Maple,children:[h.jsx("img",{alt:pr.Maple,src:yde,height:20,style:{paddingRight:"12px"}})," ",Y.t("tree.Maple",i)]},pr.Maple),h.jsxs(mm,{value:pr.Oak,children:[h.jsx("img",{alt:pr.Oak,src:Ade,height:20,style:{paddingRight:"17px"}}),Y.t("tree.Oak",i)]},pr.Oak),h.jsxs(mm,{value:pr.Pine,children:[h.jsx("img",{alt:pr.Pine,src:sQe,height:20,style:{paddingRight:"18px"}})," ",Y.t("tree.Pine",i)]},pr.Pine),h.jsxs(mm,{value:pr.Spruce,children:[h.jsx("img",{alt:pr.Spruce,src:cQe,height:20,style:{paddingRight:"20px"}})," ",Y.t("tree.Spruce",i)]},pr.Spruce)]})}),o1o=t=>{const e=[];if(t.type!==z.Tree)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language};return e.push({key:"tree-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"tree-cut",label:h.jsx(kd,{})}),e.push({key:"tree-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&(e.push({key:"tree-show-model",label:h.jsx(rho,{tree:n})},{key:"tree-flip",label:h.jsx(L9e,{billboardModel:n})}),e.push({key:"tree-change-type",label:h.jsxs(an,{stayAfterClick:!0,children:[h.jsxs(on,{style:{width:"100px"},children:[Y.t("treeMenu.Type",r),": "]}),h.jsx(n1o,{tree:n})]})},{key:"tree-spread",label:h.jsx(iho,{tree:n})},{key:"tree-height",label:h.jsx(aho,{tree:n})},{key:"tree-label-submenu",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",r)}),children:v3(n)})),{items:e}},r1o=({wall:t,objectType:e,modalTitle:n,onClickOk:o,children:r})=>{const i=M.getState().removeAllChildElementsByType,a=()=>{const s=M.getState().elements.filter(d=>!d.locked&&d.type===e&&d.parentId===t.id);i(t.id,e);const c=JSON.parse(JSON.stringify(s)),u={name:`Remove All ${e}s on Wall`,timestamp:Date.now(),parentId:t.id,removedElements:c,undo:()=>{M.getState().set(d=>{d.elements.push(...u.removedElements)})},redo:()=>{i(u.parentId,e)}};M.getState().addUndoable(u)},l=()=>{const s=o??a;xi.confirm({title:n,icon:h.jsx(ny,{}),onOk:s})};return h.jsx(an,{update:!0,noPadding:!0,onClick:l,children:r})},LHe=({wall:t,objectType:e,lock:n,children:o})=>{const r=M.getState().updateElementLockById,i=M.getState().updateElementLockByParentId,a=()=>{const l=e.replaceAll(" ",""),s=new Map;for(const d of M.getState().elements)d.parentId===t.id&&d.type===e&&s.set(d.id,!!d.locked);i(t.id,e,n);const u={name:n?`Lock All Unlocked ${l} on Wall`:`Unlock All Locked ${l} on Wall`,timestamp:Date.now(),oldValues:s,newValue:!0,undo:()=>{for(const[d,f]of u.oldValues.entries())r(d,f)},redo:()=>{i(t.id,e,n)}};M.getState().addUndoable(u)};return h.jsx(an,{stayAfterClick:!0,update:!0,noPadding:!0,onClick:a,children:o})},i1o=({wall:t})=>{const e=$t(),n=M.getState().set,o=(i,a)=>{n(l=>{const s=l.elements.find(c=>c.id===i&&c.type===z.Wall);s&&(s.parapet.display=a)})},r=i=>{const a=i.target.checked,l={name:"Parapet",timestamp:Date.now(),checked:a,selectedElementId:t.id,selectedElementType:t.type,undo:()=>{o(t.id,!l.checked)},redo:()=>{o(t.id,l.checked)}};M.getState().addUndoable(l),o(t.id,a),n(s=>{s.actionState.wallParapet.display=a})};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.parapet.display,onChange:r,children:Y.t("wallMenu.Parapet",e)})})},a1o=({wall:t})=>{const e=$t(),n=(i,a)=>{M.getState().set(l=>{for(const s of l.elements)if(s.id===i&&s.type===z.Wall){const c=s;c.wallStructure=a,(a===gc.Stud||a===gc.Pillar)&&(c.opacity=0);break}})},o=i=>{const a={name:"Select Wall Structure",timestamp:Date.now(),oldValue:t.wallStructure,newValue:i.target.value,changedElementId:t.id,changedElementType:t.type,undo:()=>{n(a.changedElementId,a.oldValue)},redo:()=>{n(a.changedElementId,a.newValue)}};M.getState().addUndoable(a),n(t.id,i.target.value),M.getState().set(l=>{l.actionState.wallStructure=i.target.value,(l.actionState.wallStructure===gc.Stud||l.actionState.wallStructure===gc.Pillar)&&(l.actionState.wallOpacity=0)})},r=t.wallStructure??gc.Default;return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Le.Group,{value:r,onChange:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:gc.Default,children:Y.t("wallMenu.DefaultStructure",e)}),h.jsx(Le,{style:{width:"100%"},value:gc.Stud,children:Y.t("wallMenu.StudStructure",e)}),h.jsx(Le,{style:{width:"100%"},value:gc.Pillar,children:Y.t("wallMenu.PillarStructure",e)})]})})})},l1o=({wall:t})=>{const e=M.getState().set,n=$t(),o=(i,a,l)=>{const{cx:s,cy:c,cz:u}=a,d=l?l.rotation[2]+a.relativeAngle:a.relativeAngle;if(l&&d!==void 0){const f=ye.wallAbsolutePosition(new ae(s,c,u),l).setZ(a.lz/2+l.lz);return new ae().subVectors(i,f).applyEuler(new ln(0,0,-d))}return new ae},r=()=>{const i=M.getState().getFoundation(t);if(!i)return;const a=o(M.getState().pastePoint,t,i),l=Va.makePolygon(t,-a.x/t.lx,0,-a.z/t.lz,new ae(0,0,1),[0,0,0],z.Wall);e(c=>{c.elements.push(l),c.objectTypeToAdd=z.None});const s={name:"Add",timestamp:Date.now(),addedElement:l,undo:()=>{M.getState().removeElementById(s.addedElement.id,!1)},redo:()=>{e(c=>{c.elements.push(s.addedElement),c.selectedElement=s.addedElement})}};M.getState().addUndoable(s)};return h.jsx(an,{onClick:r,children:Y.t("foundationMenu.AddPolygon",n)})},s1o=({wall:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.id===r&&l.type===z.Wall){l.fill=i;break}})},o=r=>{const i={name:"Select Wall Fill",timestamp:Date.now(),oldValue:t.fill,newValue:r.target.value,changedElementId:t.id,changedElementType:t.type,undo:()=>{n(i.changedElementId,i.oldValue)},redo:()=>{n(i.changedElementId,i.newValue)}};M.getState().addUndoable(i),n(t.id,r.target.value)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Le.Group,{value:t.fill,onChange:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:Fl.Full,children:Y.t("wallMenu.Full",e)}),h.jsx(Le,{style:{width:"100%"},value:Fl.Partial,children:Y.t("wallMenu.Partial",e)}),h.jsx(Le,{style:{width:"100%"},value:Fl.Empty,children:Y.t("wallMenu.Empty",e)})]})})})},c1o=({wall:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.id===r&&l.type===z.Wall){l.openToOutside=i;break}})},o=r=>{const i={name:"Set Open to Outside",timestamp:Date.now(),oldValue:!!t.openToOutside,newValue:r.target.checked,changedElementId:t.id,changedElementType:t.type,undo:()=>{n(i.changedElementId,i.oldValue)},redo:()=>{n(i.changedElementId,i.newValue)}};M.getState().addUndoable(i),n(t.id,r.target.checked)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:!!t.openToOutside,onChange:o,children:Y.t("wallMenu.OpenToOutside",e)})})},_ae=[{key:"solarPanelCount",lockedKey:"lockedSolarPanelCount",objectType:z.SolarPanel},{key:"windowCount",lockedKey:"lockedWindowCount",objectType:z.Window},{key:"doorCount",lockedKey:"lockedDoorCount",objectType:z.Door},{key:"sensorCount",lockedKey:"lockedSensorCount",objectType:z.Sensor},{key:"polygonCount",lockedKey:"lockedPolygonCount",objectType:z.Polygon},{key:"outsideLightCount",lockedKey:"lockedLightCount",objectType:z.Light}],u1o=(t,e)=>{const n={lng:M.getState().language};let o="",r="";switch(t){case z.SolarPanel:{o=`${Y.t("wallMenu.RemoveAllUnlockedSolarPanels",n)} (${e})`,r=`${Y.t("wallMenu.DoYouReallyWantToRemoveAllSolarPanelsOnThisWall",n)} (${e} ${Y.t("wallMenu.SolarPanels",n)})`;break}case z.Window:{o=`${Y.t("wallMenu.RemoveAllUnlockedWindows",n)} (${e})`,r=`${Y.t("wallMenu.DoYouReallyWantToRemoveAllWindowsOnThisWall",n)} (${e} ${Y.t("wallMenu.Windows",n)})`;break}case z.Door:{o=`${Y.t("wallMenu.RemoveAllUnlockedDoors",n)} (${e})`,r=`${Y.t("wallMenu.DoYouReallyWantToRemoveAllDoorsOnThisWall",n)} (${e} ${Y.t("wallMenu.Doors",n)})`;break}case z.Sensor:{o=`${Y.t("wallMenu.RemoveAllUnlockedSensors",n)} (${e})`,r=`${Y.t("wallMenu.DoYouReallyWantToRemoveAllSensorsOnThisWall",n)} (${e} ${Y.t("wallMenu.Sensors",n)})`;break}case z.Light:{o=`${Y.t("wallMenu.RemoveAllUnlockedLights",n)} (${e})`,r=`${Y.t("wallMenu.DoYouReallyWantToRemoveAllLightsOnThisWall",n)} (${e} ${Y.t("wallMenu.Lights",n)})`;break}case z.Polygon:{o=`${Y.t("wallMenu.RemoveAllUnlockedPolygons",n)} (${e})`,r=`${Y.t("wallMenu.DoYouReallyWantToRemoveAllPolygonsOnThisWall",n)} (${e} ${Y.t("wallMenu.Polygons",n)})`;break}}return{itemLabel:o,modalTitle:r}},Gae=(t,e,n,o)=>n===z.Light?o?t.lockedLightCount:t.insideLightCount+t.outsideLightCount:t[e],d1o=(t,e,n)=>{const o=[],r={lng:M.getState().language};return _ae.forEach(({key:i,objectType:a})=>{const l=Gae(n,i,a);if(typeof l=="number"&&l>0){const{itemLabel:s,modalTitle:c}=u1o(a,l),u=a.replaceAll(" ","");o.push({key:`remove-all-${u}s-on-wall`,label:h.jsx(r1o,{wall:t,objectType:a,modalTitle:c,children:s})})}}),_ae.forEach(({key:i,objectType:a})=>{const l=Gae(n,i,a);if(typeof l=="number"&&l>0){const s=a.replaceAll(" ","");o.push({key:`lock-all-${s}s-on-wall`,label:h.jsxs(LHe,{wall:t,objectType:a,lock:!0,children:[Y.t(`wallMenu.LockAllUnlocked${s}s`,r)," (",l,")"]})})}}),_ae.forEach(({lockedKey:i,objectType:a})=>{const l=Gae(e,i,a,!0);if(typeof l=="number"&&l>0){const s=a.replaceAll(" ","");o.push({key:`unlock-all-${s}s-on-wall`,label:h.jsxs(LHe,{wall:t,objectType:a,lock:!1,children:[Y.t(`wallMenu.UnlockAllLocked${s}s`,r)," (",l,")"]})})}}),e.outsideLightCount>0&&o.push({key:"inside-lights-on-wall",label:h.jsxs(wX,{element:t,inside:!0,children:[Y.t("wallMenu.AllLightsOnWallInside",r)," (",e.outsideLightCount,")"]})}),e.insideLightCount>0&&o.push({key:"outside-lights-on-wall",label:h.jsxs(wX,{element:t,inside:!1,children:[Y.t("wallMenu.AllLightsOnWallOutside",r)," (",e.insideLightCount,")"]})}),o},f1o=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(g3),i=M(no),a=M(Qn),l=M(Jn),s=uo(z.Wall),c=$t(),[u,d]=ZZ((s==null?void 0:s.parapet.color)??"#ffffff"),f=(T,w)=>{e(x=>{for(const b of x.elements)if(b.id===T&&b.type===z.Wall&&!b.locked){b.parapet.color=w;break}})},p=T=>{if(!s)return;const w=ye.getAllConnectedWalls(s);w.length!==0&&e(x=>{for(const b of w)if(!b.locked)for(const R of x.elements)R.id===b.id&&R.type===z.Wall&&(R.parapet.color=T)})},g=(T,w)=>{e(x=>{for(const b of x.elements)b.parentId===T&&b.type===z.Wall&&!b.locked&&(b.parapet.color=w)})},A=T=>{e(w=>{for(const x of w.elements)x.type===z.Wall&&!x.locked&&(x.parapet.color=T)})},y=(T,w)=>{e(x=>{for(const b of x.elements)b.type===z.Wall&&!b.locked&&T.has(b.id)&&(b.parapet.color=w)})},S=T=>{if(s){switch(r){case re.AllSelectedObjectsOfThisType:{for(const w of n)if(w.type===z.Wall&&T!==w.parapet.color&&!w.locked&&M.getState().selectedElementIdSet.has(w.id))return!0;break}case re.AllObjectsOfThisType:{for(const w of n)if(w.type===z.Wall&&T!==w.parapet.color&&!w.locked)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const w of n)if(w.type===z.Wall&&w.foundationId===s.foundationId&&T!==w.parapet.color&&!w.locked)return!0;break}case re.AllConnectedObjects:{const w=ye.getAllConnectedWalls(s);for(const x of w)if(T!==x.parapet.color&&!x.locked)return!0;break}default:{if(T!==(s==null?void 0:s.parapet.color))return!0;break}}return!1}},C=T=>{if(s&&S(T)){switch(r){case re.AllSelectedObjectsOfThisType:{const w=new Map;for(const b of n)b.type===z.Wall&&M.getState().selectedElementIdSet.has(b.id)&&w.set(b.id,b.parapet.color??"#ffffff");const x={name:"Set Parapet Color for Selected Walls",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())f(b,R)},redo:()=>{y(x.oldValues,x.newValue)}};o(x),y(w,T),a(i+1);break}case re.AllObjectsOfThisType:{const w=new Map;for(const b of n)b.type===z.Wall&&w.set(b.id,b.parapet.color??"#ffffff");const x={name:"Set Parapet Color for All Walls",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())f(b,R)},redo:()=>{A(x.newValue)}};o(x),A(T),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const w=new Map;for(const b of n)b.type===z.Wall&&b.foundationId===s.foundationId&&w.set(b.id,b.parapet.color??"#ffffff");const x={name:"Set Parapet Color for All Walls Above Foundation",timestamp:Date.now(),oldValues:w,newValue:T,groupId:s.foundationId,undo:()=>{for(const[b,R]of x.oldValues.entries())f(b,R)},redo:()=>{x.groupId&&g(x.groupId,x.newValue)}};o(x),g(s.foundationId,T),a(i+1)}break;case re.AllConnectedObjects:if(s){const w=ye.getAllConnectedWalls(s),x=new Map;for(const R of w)x.set(R.id,R.color??"#ffffff");const b={name:"Set Parapet Color for All Connected Walls",timestamp:Date.now(),oldValues:x,newValue:T,undo:()=>{for(const[R,H]of b.oldValues.entries())f(R,H)},redo:()=>{p(b.newValue)}};o(b),p(T),a(i+1)}break;default:if(s){const w=l(s.id),x=(w==null?void 0:w.parapet.color)??s.parapet.color??"#ffffff",b={name:"Set Parapet Color of Selected Wall",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(b.changedElementId,b.oldValue)},redo:()=>{f(b.changedElementId,b.newValue)}};o(b),f(s.id,T),a(i+1)}}e(w=>{w.actionState.wallParapet.color=T})}},P=()=>{C(u)},v=()=>{t(!1)};return h.jsx(so,{width:640,title:Y.t("wallMenu.ParapetColor",c),onApply:P,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:u,onChangeComplete:d})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:T=>M.getState().setWallActionScope(T.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("wallMenu.OnlyThisWall",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllConnectedObjects,children:Y.t("wallMenu.AllConnectedWalls",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("wallMenu.AllWallsAboveFoundation",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("wallMenu.AllSelectedWalls",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("wallMenu.AllWalls",c)})]})})})]})})},Prt="/aladdin/assets/wall_01_menu-BlJdKfby.png",Crt="/aladdin/assets/wall_02_menu-DfsmvvWJ.png",Rrt="/aladdin/assets/wall_03_menu-B95_FEuA.png",Hrt="/aladdin/assets/wall_04_menu-D-Kn25E7.png",Mrt="/aladdin/assets/wall_05_menu-DGgjaMY9.png",Irt="/aladdin/assets/wall_06_menu-EOIch2eu.png",zrt="/aladdin/assets/wall_07_menu-DvXS_qn2.png",Drt="/aladdin/assets/wall_08_menu-CfftE2pF.png",Ert="/aladdin/assets/wall_09_menu-_O8A0WOE.png",Frt="/aladdin/assets/wall_10_menu-B5QfhD3g.png",h1o=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(g3),i=M(no),a=M(Qn),l=M(Jn),s=uo(z.Wall),[c,u]=m.useState((s==null?void 0:s.parapet.textureType)??Bo.Default),d=$t(),{Option:f}=Uo,p=(w,x)=>{e(b=>{for(const R of b.elements)if(R.type===z.Wall&&R.id===w&&!R.locked){R.parapet.textureType=x;break}})},g=w=>{if(!s)return;const x=ye.getAllConnectedWalls(s);x.length!==0&&e(b=>{for(const R of x)if(!R.locked)for(const H of b.elements)H.id===R.id&&H.type===z.Wall&&(H.parapet.textureType=w)})},A=(w,x)=>{e(b=>{for(const R of b.elements)R.type===z.Wall&&R.foundationId===w&&!R.locked&&(R.parapet.textureType=x)})},y=w=>{e(x=>{for(const b of x.elements)b.type===z.Wall&&!b.locked&&(b.parapet.textureType=w)})},S=(w,x)=>{e(b=>{for(const R of b.elements)R.type===z.Wall&&!R.locked&&w.has(R.id)&&(R.parapet.textureType=x)})},C=w=>{if(s){switch(r){case re.AllSelectedObjectsOfThisType:{for(const x of n)if(x.type===z.Wall&&w!==x.parapet.textureType&&!x.locked&&M.getState().selectedElementIdSet.has(x.id))return!0;break}case re.AllObjectsOfThisType:{for(const x of n)if(x.type===z.Wall&&w!==x.parapet.textureType&&!x.locked)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const x of n)if(x.type===z.Wall&&x.foundationId===s.foundationId&&w!==x.parapet.textureType&&!x.locked)return!0;break}case re.AllConnectedObjects:{const x=ye.getAllConnectedWalls(s);for(const b of x)if(w!==b.parapet.textureType&&!b.locked)return!0;break}default:{if(w!==(s==null?void 0:s.parapet.textureType))return!0;break}}return!1}},P=w=>{if(s&&C(w)){switch(r){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.Wall&&!R.locked&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.parapet.textureType??Bo.Default);const b={name:"Set Parapet Texture for Selected Walls",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())p(R,H)},redo:()=>{S(b.oldValues,b.newValue)}};o(b),S(x,w),a(i+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.Wall&&!R.locked&&x.set(R.id,R.parapet.textureType??Bo.Default);const b={name:"Set Parapet Texture for All Walls",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())p(R,H)},redo:()=>{y(b.newValue)}};o(b),y(w),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const x=new Map;for(const R of n)R.type===z.Wall&&R.foundationId===s.foundationId&&!R.locked&&x.set(R.id,R.parapet.textureType);const b={name:"Set Parapet Texture for All Walls Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:s.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())p(R,H)},redo:()=>{b.groupId&&A(b.groupId,b.newValue)}};o(b),A(s.foundationId,w),a(i+1)}break;case re.AllConnectedObjects:if(s){const x=ye.getAllConnectedWalls(s),b=new Map;for(const H of x)b.set(H.id,H.parapet.textureType);const R={name:"Set Parapet Texture for All Connected Walls",timestamp:Date.now(),oldValues:b,newValue:w,undo:()=>{for(const[H,F]of R.oldValues.entries())p(H,F)},redo:()=>{g(R.newValue)}};o(R),g(w),a(i+1)}break;default:if(s){const x=l(s.id),b=(x==null?void 0:x.parapet.textureType)??s.parapet.textureType,R={name:"Set Parapet Texture of Selected Wall",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(R.changedElementId,R.oldValue)},redo:()=>{p(R.changedElementId,R.newValue)}};o(R),p(s.id,w),a(i+1)}}e(x=>{x.actionState.wallParapet.textureType=w})}},v=()=>{t(!1)},T=()=>{P(c)};return h.jsx(so,{width:550,title:Y.t("word.Texture",d),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:9,children:h.jsxs(Uo,{style:{width:"150px"},value:c,onChange:u,children:[h.jsxs(f,{value:Bo.NoTexture,children:[h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"12px",width:"32px",height:"20px",border:"1px dashed dimGray"},children:" "}),Y.t("shared.NoTexture",d)]},Bo.NoTexture),h.jsxs(f,{value:Bo.Default,children:[h.jsx("img",{alt:Bo.Default,src:Uye,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.TextureDefault",d)]},Bo.Default),h.jsxs(f,{value:Bo.Texture01,children:[h.jsx("img",{alt:Bo.Texture01,src:Prt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture01",d)]},Bo.Texture01),h.jsxs(f,{value:Bo.Texture02,children:[h.jsx("img",{alt:Bo.Texture02,src:Crt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture02",d)]},Bo.Texture02),h.jsxs(f,{value:Bo.Texture03,children:[h.jsx("img",{alt:Bo.Texture03,src:Rrt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture03",d)]},Bo.Texture03),h.jsxs(f,{value:Bo.Texture04,children:[h.jsx("img",{alt:Bo.Texture04,src:Hrt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture04",d)]},Bo.Texture04),h.jsxs(f,{value:Bo.Texture05,children:[h.jsx("img",{alt:Bo.Texture05,src:Mrt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture05",d)]},Bo.Texture05),h.jsxs(f,{value:Bo.Texture06,children:[h.jsx("img",{alt:Bo.Texture06,src:Irt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture06",d)]},Bo.Texture06),h.jsxs(f,{value:Bo.Texture07,children:[h.jsx("img",{alt:Bo.Texture07,src:zrt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture07",d)]},Bo.Texture07),h.jsxs(f,{value:Bo.Texture08,children:[h.jsx("img",{alt:Bo.Texture08,src:Drt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture08",d)]},Bo.Texture08),h.jsxs(f,{value:Bo.Texture09,children:[h.jsx("img",{alt:Bo.Texture09,src:Ert,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture09",d)]},Bo.Texture09),h.jsxs(f,{value:Bo.Texture10,children:[h.jsx("img",{alt:Bo.Texture10,src:Frt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture10",d)]},Bo.Texture10)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:15,children:h.jsx(Le.Group,{onChange:w=>M.getState().setWallActionScope(w.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("wallMenu.OnlyThisWall",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllConnectedObjects,children:Y.t("wallMenu.AllConnectedWalls",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("wallMenu.AllWallsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("wallMenu.AllSelectedWalls",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("wallMenu.AllWalls",d)})]})})})]})})},Xae=({wall:t,dataType:e,attributeKey:n,range:o,step:r,unit:i,setDialogVisible:a})=>{const l=M(Kn),s=M(En),c=M(g3),u=M(no),d=M(Qn),f=M(pn),p=m.useRef(t.parapet[n]),g=$t(),A=R=>{f(H=>{switch(n){case"copingsHeight":H.actionState.wallParapet.copingsHeight=R;break;case"copingsWidth":H.actionState.wallParapet.copingsWidth=R;break;case"parapetHeight":H.actionState.wallParapet.parapetHeight=R;break}})},y=(R,H)=>{f(F=>{for(const E of F.elements)if(E.id===R&&E.type===z.Wall&&!E.locked){E.parapet[n]=H;break}}),A(H)},S=R=>{const H=ye.getAllConnectedWalls(t);H.length!==0&&(f(F=>{for(const E of H)if(!E.locked)for(const N of F.elements)N.id===E.id&&N.type===z.Wall&&(N.parapet[n]=R)}),A(R))},C=(R,H)=>{f(F=>{for(const E of F.elements)E.parentId===R&&E.type===z.Wall&&!E.locked&&(E.parapet[n]=H)}),A(H)},P=R=>{f(H=>{for(const F of H.elements)F.type===z.Wall&&!F.locked&&(F.parapet[n]=R)}),A(R)},v=(R,H)=>{f(F=>{for(const E of F.elements)E.type===z.Wall&&!E.locked&&R.has(E.id)&&(E.parapet[n]=H)}),A(H)},T=R=>{switch(c){case re.AllSelectedObjectsOfThisType:{for(const H of l)if(H.type===z.Wall&&R!==H.parapet[n]&&!H.locked&&M.getState().selectedElementIdSet.has(H.id))return!0;break}case re.AllObjectsOfThisType:{for(const H of l)if(H.type===z.Wall&&R!==H.parapet[n]&&!H.locked)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const H of l)if(H.type===z.Wall&&H.foundationId===t.foundationId&&R!==H.parapet[n]&&!H.locked)return!0;break}case re.AllConnectedObjects:{const H=ye.getAllConnectedWalls(t);for(const F of H)if(R!==F.parapet[n]&&!F.locked)return!0;break}default:{if(R!==t.parapet[n])return!0;break}}return!1},w=R=>{if(t&&T(R))switch(c){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of l)E.type===z.Wall&&M.getState().selectedElementIdSet.has(E.id)&&H.set(E.id,E.parapet[n]);const F={name:`Set ${e} for Selected Walls`,timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{v(F.oldValues,F.newValue)}};s(F),v(H,R),d(u+1);break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of l)E.type===z.Wall&&H.set(E.id,E.parapet[n]);const F={name:`Set ${e} for All Walls`,timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{P(F.newValue)}};s(F),P(R),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(t.foundationId){const H=new Map;for(const E of l)E.type===z.Wall&&E.foundationId===t.foundationId&&H.set(E.id,E.parapet[n]);const F={name:`Set ${e} for All Walls Above Foundation`,timestamp:Date.now(),oldValues:H,newValue:R,groupId:t.foundationId,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{F.groupId&&C(F.groupId,F.newValue)}};s(F),C(t.foundationId,R),d(u+1)}break;case re.AllConnectedObjects:if(t){const H=ye.getAllConnectedWalls(t),F=new Map;for(const N of H)F.set(N.id,N.parapet[n]);const E={name:`Set ${e} for All Connected Walls`,timestamp:Date.now(),oldValues:F,newValue:R,undo:()=>{for(const[N,U]of E.oldValues.entries())y(N,U)},redo:()=>{S(E.newValue)}};s(E),S(R),d(u+1)}break;default:if(t){const H=t.parapet[n],F={name:`Set Wall ${e}`,timestamp:Date.now(),oldValue:H,newValue:R,changedElementId:t.id,changedElementType:t.type,undo:()=>{y(F.changedElementId,F.oldValue)},redo:()=>{y(F.changedElementId,F.newValue)}};s(F),y(t.id,R),d(u+1)}}},x=()=>{a(!1)},b=()=>{w(p.current)};return h.jsx(so,{width:550,title:Y.t(`wallMenu.${e}`,g),onApply:b,onClose:x,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:o[0],max:o[1],style:{width:120},step:r,precision:2,defaultValue:t.parapet[n],onChange:R=>p.current=R}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",g),": [",o.toString(),"] ",i]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:i??" "}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:R=>M.getState().setWallActionScope(R.target.value),value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("wallMenu.OnlyThisWall",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllConnectedObjects,children:Y.t("wallMenu.AllConnectedWalls",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("wallMenu.AllWallsAboveFoundation",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("wallMenu.AllSelectedWalls",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("wallMenu.AllWalls",g)})]})})})]})})};var w_=(t=>(t.ParapetHeight="ParapetHeight",t.CopingsHeight="CopingsHeight",t.CopingsWidth="CopingsWidth",t))(w_||{});const p1o={ParapetHeight:{attributeKey:"parapetHeight",range:[0,5],step:.01,unit:"word.MeterAbbreviation"},CopingsHeight:{attributeKey:"copingsHeight",range:[0,1],step:.01,unit:"word.MeterAbbreviation"},CopingsWidth:{attributeKey:"copingsWidth",range:[0,3],step:.01,unit:"word.MeterAbbreviation"}},Jae=({Dialog:t,wall:e,dataType:n,children:o})=>{const r=$t(),[i,a]=m.useState(!1),l=()=>{M.getState().setApplyCount(0),a(!0)},s=p1o[n];return h.jsxs(h.Fragment,{children:[h.jsx(an,{noPadding:!0,onClick:l,children:o}),i&&h.jsx(t,{wall:e,dataType:n,attributeKey:s.attributeKey,range:s.range,step:s.step,unit:s.unit?Y.t(s.unit,r):void 0,setDialogVisible:a})]})},g1o=t=>{const e={lng:M.getState().language},n=[];return n.push({key:"parapet-checkbox",label:h.jsx(i1o,{wall:t})}),t.parapet.display&&n.push({type:"divider"},{key:"parapet-color",label:h.jsxs(eo,{noPadding:!0,Dialog:f1o,children:[Y.t("wallMenu.ParapetColor",e)," ..."]})},{key:"parapet-texture",label:h.jsxs(eo,{noPadding:!0,Dialog:h1o,children:[Y.t("wallMenu.ParapetTexture",e)," ..."]})},{key:"parapet-height",label:h.jsxs(Jae,{wall:t,dataType:w_.ParapetHeight,Dialog:Xae,children:[Y.t("wallMenu.ParapetHeight",e)," ..."]})},{key:"copings-height",label:h.jsxs(Jae,{wall:t,dataType:w_.CopingsHeight,Dialog:Xae,children:[Y.t("wallMenu.CopingsHeight",e)," ..."]})},{key:"copings-width",label:h.jsxs(Jae,{wall:t,dataType:w_.CopingsWidth,Dialog:Xae,children:[Y.t("wallMenu.CopingsWidth",e)," ..."]})}),n},dC=({wall:t,dataType:e,attributeKey:n,range:o,step:r,unit:i,setDialogVisible:a})=>{const l=M(Kn),s=M(En),c=M(g3),u=M(no),d=M(Qn),f=M(pn),p=m.useRef(t[n]),g=$t(),A=R=>{f(H=>{switch(n){case"ly":H.actionState.wallThickness=R;break;case"lz":H.actionState.wallHeight=R;break;case"opacity":H.actionState.wallOpacity=R;break;case"structureSpacing":H.actionState.wallStructureSpacing=R;break;case"structureWidth":H.actionState.wallStructureWidth=R;break;case"eavesLength":H.actionState.wallEavesLength=R;break}})},y=(R,H)=>{f(F=>{for(const E of F.elements)if(E.id===R&&E.type===z.Wall&&!E.locked){E[n]=H;break}}),A(H)},S=R=>{const H=ye.getAllConnectedWalls(t);H.length!==0&&(f(F=>{for(const E of H)if(!E.locked)for(const N of F.elements)N.id===E.id&&N.type===z.Wall&&(N[n]=R)}),A(R))},C=(R,H)=>{f(F=>{for(const E of F.elements)E.parentId===R&&E.type===z.Wall&&!E.locked&&(E[n]=H)}),A(H)},P=R=>{f(H=>{for(const F of H.elements)F.type===z.Wall&&!F.locked&&(F[n]=R)}),A(R)},v=(R,H)=>{f(F=>{for(const E of F.elements)E.type===z.Wall&&!E.locked&&R.has(E.id)&&(E[n]=H)}),A(H)},T=R=>{switch(c){case re.AllSelectedObjectsOfThisType:{for(const H of l)if(H.type===z.Wall&&R!==H[n]&&!H.locked&&M.getState().selectedElementIdSet.has(H.id))return!0;break}case re.AllObjectsOfThisType:{for(const H of l)if(H.type===z.Wall&&R!==H[n]&&!H.locked)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const H of l)if(H.type===z.Wall&&H.foundationId===t.foundationId&&R!==H[n]&&!H.locked)return!0;break}case re.AllConnectedObjects:{const H=ye.getAllConnectedWalls(t);for(const F of H)if(R!==F[n]&&!F.locked)return!0;break}default:{if(R!==t[n])return!0;break}}return!1},w=R=>{if(t&&T(R))switch(c){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of l)E.type===z.Wall&&M.getState().selectedElementIdSet.has(E.id)&&H.set(E.id,E[n]);const F={name:`Set ${e} for Selected Walls`,timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{v(F.oldValues,F.newValue)}};s(F),v(H,R),d(u+1);break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of l)E.type===z.Wall&&H.set(E.id,E[n]);const F={name:`Set ${e} for All Walls`,timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{P(F.newValue)}};s(F),P(R),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(t.foundationId){const H=new Map;for(const E of l)E.type===z.Wall&&E.foundationId===t.foundationId&&H.set(E.id,E[n]);const F={name:`Set ${e} for All Walls Above Foundation`,timestamp:Date.now(),oldValues:H,newValue:R,groupId:t.foundationId,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{F.groupId&&C(F.groupId,F.newValue)}};s(F),C(t.foundationId,R),d(u+1)}break;case re.AllConnectedObjects:if(t){const H=ye.getAllConnectedWalls(t),F=new Map;for(const N of H)F.set(N.id,N[n]);const E={name:`Set ${e} for All Connected Walls`,timestamp:Date.now(),oldValues:F,newValue:R,undo:()=>{for(const[N,U]of E.oldValues.entries())y(N,U)},redo:()=>{S(E.newValue)}};s(E),S(R),d(u+1)}break;default:if(t){const H=t[n],F={name:`Set Wall ${e}`,timestamp:Date.now(),oldValue:H,newValue:R,changedElementId:t.id,changedElementType:t.type,undo:()=>{y(F.changedElementId,F.oldValue)},redo:()=>{y(F.changedElementId,F.newValue)}};s(F),y(t.id,R),d(u+1)}}},x=()=>{p.current=t[n],a(!1)},b=()=>{w(p.current)};return h.jsx(so,{width:550,title:Y.t(`wallMenu.${e}`,g),onApply:b,onClose:x,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:o[0],max:o[1],style:{width:120},step:r,precision:2,defaultValue:t[n],onChange:R=>p.current=R}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",g),": [",o.toString(),"] ",i]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:i??" "}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:R=>M.getState().setWallActionScope(R.target.value),value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("wallMenu.OnlyThisWall",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllConnectedObjects,children:Y.t("wallMenu.AllConnectedWalls",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("wallMenu.AllWallsAboveFoundation",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("wallMenu.AllSelectedWalls",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("wallMenu.AllWalls",g)})]})})})]})})},fC=({Dialog:t,noPadding:e,dataType:n,children:o})=>{const r=$t(),[i,a]=m.useState(!1),l=uo(z.Wall),s=()=>{M.getState().setApplyCount(0),a(!0)},c=S1o[n];return h.jsxs(h.Fragment,{children:[h.jsx(an,{noPadding:e,onClick:s,children:o}),i&&l&&h.jsx(t,{wall:l,dataType:n,attributeKey:c.attributeKey,range:c.range,step:c.step,unit:c.unit?Y.t(c.unit,r):void 0,setDialogVisible:a})]})},m1o=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(g3),i=M(no),a=M(Qn),l=M(Jn),s=uo(z.Wall),[c,u]=ZZ((s==null?void 0:s.structureColor)??"#ffffff"),d=$t(),f=(T,w)=>{e(x=>{for(const b of x.elements)if(b.id===T&&b.type===z.Wall&&!b.locked){b.structureColor=w;break}})},p=T=>{if(!s)return;const w=ye.getAllConnectedWalls(s);w.length!==0&&e(x=>{for(const b of w)if(!b.locked)for(const R of x.elements)R.id===b.id&&R.type===z.Wall&&(R.structureColor=T)})},g=(T,w)=>{e(x=>{for(const b of x.elements)b.parentId===T&&b.type===z.Wall&&!b.locked&&(b.structureColor=w)})},A=T=>{e(w=>{for(const x of w.elements)x.type===z.Wall&&!x.locked&&(x.structureColor=T)})},y=(T,w)=>{e(x=>{for(const b of x.elements)b.type===z.Wall&&!b.locked&&T.has(b.id)&&(b.color=w)})},S=T=>{if(s){switch(r){case re.AllSelectedObjectsOfThisType:{for(const w of n)if(w.type===z.Wall&&T!==w.structureColor&&!w.locked&&M.getState().selectedElementIdSet.has(w.id))return!0;break}case re.AllObjectsOfThisType:{for(const w of n)if(w.type===z.Wall&&T!==w.structureColor&&!w.locked)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const w of n)if(w.type===z.Wall&&w.foundationId===s.foundationId&&T!==w.structureColor&&!w.locked)return!0;break}case re.AllConnectedObjects:{const w=ye.getAllConnectedWalls(s);for(const x of w)if(T!==x.structureColor&&!x.locked)return!0;break}default:{if(T!==(s==null?void 0:s.structureColor))return!0;break}}return!1}},C=T=>{if(s&&S(T)){switch(r){case re.AllSelectedObjectsOfThisType:{const w=new Map;for(const b of n)b.type===z.Wall&&M.getState().selectedElementIdSet.has(b.id)&&w.set(b.id,b.structureColor??"#ffffff");const x={name:"Set Structure Color for Selected Walls",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())f(b,R)},redo:()=>{y(x.oldValues,x.newValue)}};o(x),y(w,T),a(i+1);break}case re.AllObjectsOfThisType:{const w=new Map;for(const b of n)b.type===z.Wall&&w.set(b.id,b.structureColor??"#ffffff");const x={name:"Set Structure Color for All Walls",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())f(b,R)},redo:()=>{A(x.newValue)}};o(x),A(T),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const w=new Map;for(const b of n)b.type===z.Wall&&b.foundationId===s.foundationId&&w.set(b.id,b.structureColor??"#ffffff");const x={name:"Set Structure Color for All Walls Above Foundation",timestamp:Date.now(),oldValues:w,newValue:T,groupId:s.foundationId,undo:()=>{for(const[b,R]of x.oldValues.entries())f(b,R)},redo:()=>{x.groupId&&g(x.groupId,x.newValue)}};o(x),g(s.foundationId,T),a(i+1)}break;case re.AllConnectedObjects:if(s){const w=ye.getAllConnectedWalls(s),x=new Map;for(const R of w)x.set(R.id,R.color??"#ffffff");const b={name:"Set Structure Color for All Connected Walls",timestamp:Date.now(),oldValues:x,newValue:T,undo:()=>{for(const[R,H]of b.oldValues.entries())f(R,H)},redo:()=>{p(b.newValue)}};o(b),p(T),a(i+1)}break;default:if(s){const w=l(s.id),x=(w==null?void 0:w.structureColor)??s.structureColor??"#ffffff",b={name:"Set Structure Color of Selected Wall",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(b.changedElementId,b.oldValue)},redo:()=>{f(b.changedElementId,b.newValue)}};o(b),f(s.id,T),a(i+1)}}e(w=>{w.actionState.wallStructureColor=T})}},P=()=>{t(!1)},v=()=>{C(c)};return h.jsx(so,{width:640,title:Y.t("wallMenu.StructureColor",d),onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:c,onChangeComplete:u})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:T=>M.getState().setWallActionScope(T.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("wallMenu.OnlyThisWall",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllConnectedObjects,children:Y.t("wallMenu.AllConnectedWalls",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("wallMenu.AllWallsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("wallMenu.AllSelectedWalls",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("wallMenu.AllWalls",d)})]})})})]})})};var eg=(t=>(t.Height="Height",t.Opacity="Opacity",t.StructureSpacing="StructureSpacing",t.StructureWidth="StructureWidth",t.Thickness="Thickness",t.EavesLength="EavesLength",t))(eg||{});const y1o=t=>{const e=[],n={lng:M.getState().language};return e.push({key:"wall-structure-submenu-radio-group",label:h.jsx(a1o,{wall:t}),style:{backgroundColor:"white"}}),t.wallStructure!==gc.Default&&e.push({type:"divider"},{key:"wall-structure-spacing",label:h.jsxs(fC,{noPadding:!0,dataType:eg.StructureSpacing,Dialog:dC,children:[Y.t(`wallMenu.${eg.StructureSpacing}`,n)," ..."]})},{key:"wall-structure-width",label:h.jsxs(fC,{noPadding:!0,dataType:eg.StructureWidth,Dialog:dC,children:[Y.t(`wallMenu.${eg.StructureWidth}`,n)," ..."]})},{key:"wall-structure-color",label:h.jsxs(eo,{noPadding:!0,Dialog:m1o,children:[Y.t("wallMenu.StructureColor",n)," ..."]})}),e},A1o=t=>{const e=[];return e.push({key:"wall-fill-radio-group",label:h.jsx(s1o,{wall:t}),style:{backgroundColor:"white"}}),t.fill!==Fl.Full&&e.push({type:"divider"},{key:"wall-open-to-outside-checkbox",label:h.jsx(c1o,{wall:t})}),e},w1o=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(g3),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Wall),[c,u]=m.useState((s==null?void 0:s.rValue)??p6),[d,f]=m.useState(ye.toRValueInUS(c)),p=$t(),g=(T,w)=>{l(x=>{for(const b of x.elements)if(b.id===T){b.rValue=w;break}})},A=T=>{for(const[w,x]of T.entries())g(w,x)},y=(T,w)=>{for(const x of T.keys())g(x,w)},S=T=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:{for(const w of e)if(w.type===z.Wall&&T!==w.rValue&&!w.locked&&M.getState().selectedElementIdSet.has(w.id))return!0;break}case re.AllObjectsOfThisType:{for(const w of e)if(w.type===z.Wall&&T!==w.rValue&&!w.locked)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const w of e)if(w.type===z.Wall&&w.foundationId===s.foundationId&&T!==w.rValue&&!w.locked)return!0;break}case re.AllConnectedObjects:{const w=ye.getAllConnectedWalls(s);for(const x of w)if(T!==x.rValue&&!x.locked)return!0;break}default:{if(T!==(s==null?void 0:s.rValue))return!0;break}}return!1}},C=T=>{if(s&&S(T)){switch(o){case re.AllSelectedObjectsOfThisType:{const w=new Map;for(const b of e)if(b.type===z.Wall&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)){const R=b;w.set(b.id,R.rValue??p6),g(R.id,T)}const x={name:"Set R-Value for Selected Walls",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1);break}case re.AllObjectsOfThisType:{const w=new Map;for(const b of e)if(b.type===z.Wall&&!b.locked){const R=b;w.set(b.id,R.rValue??p6),g(R.id,T)}const x={name:"Set R-Value for All Walls",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s!=null&&s.foundationId){const w=new Map;for(const b of e)if(b.type===z.Wall&&b.foundationId===s.foundationId&&!b.locked){const R=b;w.set(b.id,R.rValue??p6),g(R.id,T)}const x={name:"Set R-Value for All Walls Above Foundation",timestamp:Date.now(),oldValues:w,newValue:T,groupId:s.foundationId,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1)}break;case re.AllConnectedObjects:if(s){const w=ye.getAllConnectedWalls(s),x=new Map;for(const R of w)if(!R.locked){const H=R;x.set(R.id,H.rValue??p6),g(H.id,T)}const b={name:"Set R-Value for All Connected Walls",timestamp:Date.now(),oldValues:x,newValue:T,undo:()=>{A(b.oldValues)},redo:()=>{y(b.oldValues,b.newValue)}};n(b),i(r+1)}break;default:if(s){const x=a(s.id).rValue??s.rValue??p6,b={name:"Set Wall R-Value",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:s.id,changedElementType:s.type,undo:()=>{g(b.changedElementId,b.oldValue)},redo:()=>{g(b.changedElementId,b.newValue)}};n(b),g(s.id,T),i(r+1)}}l(w=>{w.actionState.wallRValue=T})}},P=()=>{u((s==null?void 0:s.rValue)??p6),t(!1)},v=()=>{C(c)};return h.jsx(so,{width:550,title:`${Y.t("word.RValue",p)+" "}(${Y.t("word.ThermalResistance",p)})`,onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:c,formatter:T=>Number(T).toFixed(2),onChange:T=>{T!==null&&(u(T),f(ye.toRValueInUS(T)))}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [0.01, 100]",h.jsx("br",{}),Y.t("word.SIUnit",p),": m²·℃/W"]}),h.jsx("br",{}),h.jsx(Sn,{min:ye.toRValueInUS(.01),max:ye.toRValueInUS(100),style:{width:120},step:.01,precision:2,value:d,formatter:T=>Number(T).toFixed(2),onChange:T=>{T!==null&&(f(T),u(ye.toRValueInSI(T)))}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [",ye.toRValueInUS(.01).toFixed(3),", ",ye.toRValueInUS(100).toFixed(1),"]",h.jsx("br",{}),Y.t("word.USUnit",p),": h·ft²·℉/Btu"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:T=>M.getState().setWallActionScope(T.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("wallMenu.OnlyThisWall",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllConnectedObjects,children:Y.t("wallMenu.AllConnectedWalls",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("wallMenu.AllWallsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("wallMenu.AllSelectedWalls",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("wallMenu.AllWalls",p)})]})})})]})})},v1o=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(g3),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Wall),[c,u]=m.useState((s==null?void 0:s.volumetricHeatCapacity)??.5),d=$t(),f=(P,v)=>{l(T=>{for(const w of T.elements)if(w.id===P){w.volumetricHeatCapacity=v;break}})},p=P=>{for(const[v,T]of P.entries())f(v,T)},g=(P,v)=>{for(const T of P.keys())f(T,v)},A=P=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const T of e)if(T.type===z.Wall&&P!==T.volumetricHeatCapacity&&!T.locked&&M.getState().selectedElementIdSet.has(T.id))return!0;break;case re.AllObjectsOfThisType:for(const T of e)if(T.type===z.Wall&&P!==T.volumetricHeatCapacity&&!T.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const T of e)if(T.type===z.Wall&&T.foundationId===s.foundationId&&P!==T.volumetricHeatCapacity&&!T.locked)return!0;break;case re.AllConnectedObjects:const v=ye.getAllConnectedWalls(s);for(const T of v)if(P!==T.volumetricHeatCapacity&&!T.locked)return!0;break;default:if(P!==(s==null?void 0:s.volumetricHeatCapacity))return!0;break}return!1}},y=P=>{if(s&&A(P)){switch(o){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of e)if(w.type===z.Wall&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)){const x=w;v.set(w.id,x.volumetricHeatCapacity??.5),f(x.id,P)}const T={name:"Set Volumetric Heat Capacity for Selected Walls",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of e)if(w.type===z.Wall&&!w.locked){const x=w;v.set(w.id,x.volumetricHeatCapacity??.5),f(x.id,P)}const T={name:"Set Volumetric Heat Capacity for All Walls",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(s!=null&&s.foundationId){const v=new Map;for(const w of e)if(w.type===z.Wall&&w.foundationId===s.foundationId&&!w.locked){const x=w;v.set(w.id,x.volumetricHeatCapacity??.5),f(x.id,P)}const T={name:"Set Volumetric Heat Capacity for All Walls Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break}case re.AllConnectedObjects:{if(s){const v=ye.getAllConnectedWalls(s),T=new Map;for(const x of v)if(!x.locked){const b=x;T.set(x.id,b.volumetricHeatCapacity??.5),f(b.id,P)}const w={name:"Set Volumetric Heat Capacity for All Connected Walls",timestamp:Date.now(),oldValues:T,newValue:P,undo:()=>{p(w.oldValues)},redo:()=>{g(w.oldValues,w.newValue)}};n(w),i(r+1)}break}default:{if(s){const T=a(s.id).volumetricHeatCapacity??s.volumetricHeatCapacity??.5,w={name:"Set Volumetric Heat Capacity of Wall",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};n(w),f(s.id,P),i(r+1)}break}}l(v=>{v.actionState.wallVolumetricHeatCapacity=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("word.VolumetricHeatCapacity",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:c,formatter:P=>Number(P).toFixed(2),onChange:P=>{P!==null&&u(P)}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:["kWh/(m³·℃)",h.jsx("br",{}),h.jsx("br",{}),Y.t("word.Range",d),": [0.01, 100]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P=>M.getState().setWallActionScope(P.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("wallMenu.OnlyThisWall",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllConnectedObjects,children:Y.t("wallMenu.AllConnectedWalls",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("wallMenu.AllWallsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("wallMenu.AllSelectedWalls",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("wallMenu.AllWalls",d)})]})})})]})})},x1o=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(g3),i=M(no),a=M(Qn),l=M(Jn),s=$t(),c=uo(z.Wall),[u,d]=m.useState((c==null?void 0:c.textureType)??Bo.Default),{Option:f}=Uo,p=(w,x)=>{e(b=>{for(const R of b.elements)if(R.type===z.Wall&&R.id===w&&!R.locked){R.textureType=x;break}})},g=w=>{if(!c)return;const x=ye.getAllConnectedWalls(c);x.length!==0&&e(b=>{for(const R of x)if(!R.locked)for(const H of b.elements)H.id===R.id&&H.type===z.Wall&&(H.textureType=w)})},A=(w,x)=>{e(b=>{for(const R of b.elements)R.type===z.Wall&&R.foundationId===w&&!R.locked&&(R.textureType=x)})},y=w=>{e(x=>{for(const b of x.elements)b.type===z.Wall&&!b.locked&&(b.textureType=w)})},S=(w,x)=>{e(b=>{for(const R of b.elements)R.type===z.Wall&&!R.locked&&w.has(R.id)&&(R.textureType=x)})},C=w=>{if(c){switch(r){case re.AllSelectedObjectsOfThisType:{for(const x of n)if(x.type===z.Wall&&w!==x.textureType&&!x.locked&&M.getState().selectedElementIdSet.has(x.id))return!0;break}case re.AllObjectsOfThisType:{for(const x of n)if(x.type===z.Wall&&w!==x.textureType&&!x.locked)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const x of n)if(x.type===z.Wall&&x.foundationId===c.foundationId&&w!==x.textureType&&!x.locked)return!0;break}case re.AllConnectedObjects:{const x=ye.getAllConnectedWalls(c);for(const b of x)if(w!==b.textureType&&!b.locked)return!0;break}default:{if(w!==(c==null?void 0:c.textureType))return!0;break}}return!1}},P=w=>{if(c&&C(w)){switch(r){case re.AllSelectedObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.Wall&&!R.locked&&M.getState().selectedElementIdSet.has(R.id)&&x.set(R.id,R.textureType??Bo.Default);const b={name:"Set Texture for Selected Walls",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())p(R,H)},redo:()=>{S(b.oldValues,b.newValue)}};o(b),S(x,w),a(i+1);break}case re.AllObjectsOfThisType:{const x=new Map;for(const R of n)R.type===z.Wall&&!R.locked&&x.set(R.id,R.textureType??Bo.Default);const b={name:"Set Texture for All Walls",timestamp:Date.now(),oldValues:x,newValue:w,undo:()=>{for(const[R,H]of b.oldValues.entries())p(R,H)},redo:()=>{y(b.newValue)}};o(b),y(w),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(c.foundationId){const x=new Map;for(const R of n)R.type===z.Wall&&R.foundationId===c.foundationId&&!R.locked&&x.set(R.id,R.textureType);const b={name:"Set Texture for All Walls Above Foundation",timestamp:Date.now(),oldValues:x,newValue:w,groupId:c.foundationId,undo:()=>{for(const[R,H]of b.oldValues.entries())p(R,H)},redo:()=>{b.groupId&&A(b.groupId,b.newValue)}};o(b),A(c.foundationId,w),a(i+1)}break;case re.AllConnectedObjects:if(c){const x=ye.getAllConnectedWalls(c),b=new Map;for(const H of x)b.set(H.id,H.textureType);const R={name:"Set Texture for All Connected Walls",timestamp:Date.now(),oldValues:b,newValue:w,undo:()=>{for(const[H,F]of R.oldValues.entries())p(H,F)},redo:()=>{g(R.newValue)}};o(R),g(w),a(i+1)}break;default:if(c){const x=l(c.id),b=(x==null?void 0:x.textureType)??c.textureType,R={name:"Set Texture of Selected Wall",timestamp:Date.now(),oldValue:b,newValue:w,changedElementId:c.id,changedElementType:c.type,undo:()=>{p(R.changedElementId,R.oldValue)},redo:()=>{p(R.changedElementId,R.newValue)}};o(R),p(c.id,w),a(i+1)}}e(x=>{x.actionState.wallTexture=w})}},v=()=>{t(!1)},T=()=>{P(u)};return h.jsx(so,{width:550,title:Y.t("word.Texture",s),onApply:T,onClose:v,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:9,children:h.jsxs(Uo,{style:{width:"150px"},value:u,onChange:d,children:[h.jsxs(f,{value:Bo.NoTexture,children:[h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"12px",width:"32px",height:"20px",border:"1px dashed dimGray"},children:" "}),Y.t("shared.NoTexture",s)]},Bo.NoTexture),h.jsxs(f,{value:Bo.Default,children:[h.jsx("img",{alt:Bo.Default,src:Uye,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.TextureDefault",s)]},Bo.Default),h.jsxs(f,{value:Bo.Texture01,children:[h.jsx("img",{alt:Bo.Texture01,src:Prt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture01",s)]},Bo.Texture01),h.jsxs(f,{value:Bo.Texture02,children:[h.jsx("img",{alt:Bo.Texture02,src:Crt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture02",s)]},Bo.Texture02),h.jsxs(f,{value:Bo.Texture03,children:[h.jsx("img",{alt:Bo.Texture03,src:Rrt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture03",s)]},Bo.Texture03),h.jsxs(f,{value:Bo.Texture04,children:[h.jsx("img",{alt:Bo.Texture04,src:Hrt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture04",s)]},Bo.Texture04),h.jsxs(f,{value:Bo.Texture05,children:[h.jsx("img",{alt:Bo.Texture05,src:Mrt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture05",s)]},Bo.Texture05),h.jsxs(f,{value:Bo.Texture06,children:[h.jsx("img",{alt:Bo.Texture06,src:Irt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture06",s)]},Bo.Texture06),h.jsxs(f,{value:Bo.Texture07,children:[h.jsx("img",{alt:Bo.Texture07,src:zrt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture07",s)]},Bo.Texture07),h.jsxs(f,{value:Bo.Texture08,children:[h.jsx("img",{alt:Bo.Texture08,src:Drt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture08",s)]},Bo.Texture08),h.jsxs(f,{value:Bo.Texture09,children:[h.jsx("img",{alt:Bo.Texture09,src:Ert,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture09",s)]},Bo.Texture09),h.jsxs(f,{value:Bo.Texture10,children:[h.jsx("img",{alt:Bo.Texture10,src:Frt,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("wallMenu.Texture10",s)]},Bo.Texture10)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:15,children:h.jsx(Le.Group,{onChange:w=>M.getState().setWallActionScope(w.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("wallMenu.OnlyThisWall",s)}),h.jsx(Le,{style:{width:"100%"},value:re.AllConnectedObjects,children:Y.t("wallMenu.AllConnectedWalls",s)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("wallMenu.AllWallsAboveFoundation",s)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("wallMenu.AllSelectedWalls",s)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("wallMenu.AllWalls",s)})]})})})]})})},b1o=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(g3),i=M(no),a=M(Qn),l=M(Jn),s=uo(z.Wall),c=$t(),[u,d]=ZZ((s==null?void 0:s.color)??"#ffffff"),f=(T,w)=>{e(x=>{for(const b of x.elements)if(b.type===z.Wall&&b.id===T&&!b.locked){b.color=w;break}})},p=T=>{if(!s)return;const w=ye.getAllConnectedWalls(s);w.length!==0&&e(x=>{for(const b of w)if(!b.locked)for(const R of x.elements)R.id===b.id&&R.type===z.Wall&&(R.color=T)})},g=(T,w)=>{e(x=>{for(const b of x.elements)b.type===z.Wall&&b.foundationId===T&&!b.locked&&(b.color=w)})},A=T=>{e(w=>{for(const x of w.elements)x.type===z.Wall&&!x.locked&&(x.color=T)})},y=(T,w)=>{e(x=>{for(const b of x.elements)b.type===z.Wall&&!b.locked&&T.has(b.id)&&(b.color=w)})},S=T=>{if(s){switch(r){case re.AllSelectedObjectsOfThisType:{for(const w of n)if(w.type===z.Wall&&T!==w.color&&!w.locked&&M.getState().selectedElementIdSet.has(w.id))return!0;break}case re.AllObjectsOfThisType:{for(const w of n)if(w.type===z.Wall&&T!==w.color&&!w.locked)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const w of n)if(w.type===z.Wall&&w.foundationId===s.foundationId&&T!==w.color&&!w.locked)return!0;break}case re.AllConnectedObjects:{const w=ye.getAllConnectedWalls(s);for(const x of w)if(T!==x.color&&!x.locked)return!0;break}default:{if(T!==(s==null?void 0:s.color))return!0;break}}return!1}},C=T=>{if(s&&S(T)){switch(r){case re.AllSelectedObjectsOfThisType:{const w=new Map;for(const b of n)b.type===z.Wall&&M.getState().selectedElementIdSet.has(b.id)&&w.set(b.id,b.color??"#ffffff");const x={name:"Set Color for Selected Walls",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())f(b,R)},redo:()=>{y(x.oldValues,x.newValue)}};o(x),y(w,T),a(i+1);break}case re.AllObjectsOfThisType:{const w=new Map;for(const b of n)b.type===z.Wall&&w.set(b.id,b.color??"#ffffff");const x={name:"Set Color for All Walls",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{for(const[b,R]of x.oldValues.entries())f(b,R)},redo:()=>{A(x.newValue)}};o(x),A(T),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(s.foundationId){const w=new Map;for(const b of n)b.type===z.Wall&&b.foundationId===s.foundationId&&w.set(b.id,b.color??"#ffffff");const x={name:"Set Color for All Walls Above Foundation",timestamp:Date.now(),oldValues:w,newValue:T,groupId:s.foundationId,undo:()=>{for(const[b,R]of x.oldValues.entries())f(b,R)},redo:()=>{x.groupId&&g(x.groupId,x.newValue)}};o(x),g(s.foundationId,T),a(i+1)}break}case re.AllConnectedObjects:{const w=ye.getAllConnectedWalls(s),x=new Map;for(const R of w)x.set(R.id,R.color??"#ffffff");const b={name:"Set Color for All Connected Walls",timestamp:Date.now(),oldValues:x,newValue:T,undo:()=>{for(const[R,H]of b.oldValues.entries())f(R,H)},redo:()=>{p(b.newValue)}};o(b),p(T),a(i+1);break}default:{if(s){const w=l(s.id),x=(w==null?void 0:w.color)??s.color??"#ffffff",b={name:"Set Color of Selected Wall",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(b.changedElementId,b.oldValue)},redo:()=>{f(b.changedElementId,b.newValue)}};o(b),f(s.id,T),a(i+1)}break}}e(w=>{w.actionState.wallColor=T})}},P=()=>{t(!1)},v=()=>{C(u)};return h.jsx(so,{width:640,title:Y.t("wallMenu.Color",c),onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:u,onChangeComplete:d})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:T=>M.getState().setWallActionScope(T.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("wallMenu.OnlyThisWall",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllConnectedObjects,children:Y.t("wallMenu.AllConnectedWalls",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("wallMenu.AllWallsAboveFoundation",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("wallMenu.AllSelectedWalls",c)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("wallMenu.AllWalls",c)})]})})})]})})},S1o={Height:{attributeKey:"lz",range:[.1,1e3],step:.1,unit:"word.MeterAbbreviation"},Opacity:{attributeKey:"opacity",range:[0,1],step:.01},StructureSpacing:{attributeKey:"structureSpacing",range:[.1,1e3],step:.1,unit:"word.MeterAbbreviation"},StructureWidth:{attributeKey:"structureWidth",range:[.01,1],step:.1,unit:"word.MeterAbbreviation"},Thickness:{attributeKey:"ly",range:[.1,1],step:.01,unit:"word.MeterAbbreviation"},EavesLength:{attributeKey:"eavesLength",range:[-.1,5],step:.01,unit:"word.MeterAbbreviation"},ParapetHeight:{attributeKey:"parapetHeight",range:[0,5],step:.01,unit:"word.MeterAbbreviation"},CopingsHeight:{attributeKey:"copingsHeight",range:[0,1],step:.01,unit:"word.MeterAbbreviation"},CopingsWidth:{attributeKey:"copingsWidth",range:[0,3],step:.01,unit:"word.MeterAbbreviation"}},T1o=()=>{const t=M.getState().elementsToPaste;if(t&&t.length>0){const e=t[0];if(ye.isLegalOnWall(e.type))return!0}return!1},P1o=t=>{const e=[];if(t.type!==z.Wall)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language},i=M.getState().countAllOffspringsByTypeAtOnce,a=i(n.id,!0),l=i(n.id,!1);return T1o()&&e.push({key:"wall-paste",label:h.jsx(nM,{})}),e.push({key:"wall-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"wall-cut",label:h.jsx(kd,{})}),e.push({key:"wall-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&(a.gotSome()&&e.push({key:"lock-unlock-clear-on-wall",label:h.jsx(an,{children:Y.t("word.Elements",r)}),children:d1o(n,a,l)}),e.push({key:"wall-parapet",label:h.jsx(an,{children:Y.t("wallMenu.Parapet",r)}),children:g1o(n)}),e.push({key:"wall-structure",label:h.jsx(an,{children:Y.t("wallMenu.WallStructure",r)}),children:y1o(n)}),n.wallStructure!==gc.Default&&e.push({key:"wall-opacity",label:h.jsxs(fC,{dataType:eg.Opacity,Dialog:dC,children:[Y.t(`wallMenu.${eg.Opacity}`,r)," ..."]})}),e.push({key:"wall-fill",label:h.jsx(an,{children:Y.t("wallMenu.Fill",r)}),children:A1o(n)},{key:"add-polygon-on-wall",label:h.jsx(l1o,{wall:n})},{key:"wall-thickness",label:h.jsxs(fC,{dataType:eg.Thickness,Dialog:dC,children:[Y.t(`wallMenu.${eg.Thickness}`,r)," ..."]})},{key:"wall-height",label:h.jsxs(fC,{dataType:eg.Height,Dialog:dC,children:[Y.t(`wallMenu.${eg.Height}`,r)," ..."]})},{key:"wall-eaves-length",label:h.jsxs(fC,{dataType:eg.EavesLength,Dialog:dC,children:[Y.t(`wallMenu.${eg.EavesLength}`,r)," ..."]})},{key:"wall-r-value",label:h.jsxs(eo,{Dialog:w1o,children:[Y.t("word.RValue",r)," ..."]})},{key:"wall-heat-capacity",label:h.jsxs(eo,{Dialog:v1o,children:[Y.t("word.VolumetricHeatCapacity",r)," ..."]})},{key:"wall-texture",label:h.jsxs(eo,{Dialog:x1o,children:[Y.t("wallMenu.Texture",r)," ..."]})},{key:"wall-color",label:h.jsxs(eo,{Dialog:b1o,children:[Y.t("wallMenu.Color",r)," ..."]})})),{items:e}},C1o=be.memo(({door:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.id===r&&l.type===z.Door){l.filled=i;break}})},o=r=>{const i=r.target.checked,a={name:"Filled Door",timestamp:Date.now(),checked:i,selectedElementId:t.id,selectedElementType:t.type,undo:()=>{n(t.id,!a.checked)},redo:()=>{n(t.id,a.checked)}};M.getState().addUndoable(a),n(t.id,i),M.getState().set(l=>{l.actionState.doorFilled=i})};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.filled,onChange:o,children:Y.t("doorMenu.Filled",e)})})}),R1o=be.memo(({door:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.id===r&&l.type===z.Door){l.interior=i;break}})},o=r=>{const i=r.target.checked,a={name:"Interior Door",timestamp:Date.now(),checked:i,selectedElementId:t.id,selectedElementType:t.type,undo:()=>{n(t.id,!a.checked)},redo:()=>{n(t.id,a.checked)}};M.getState().addUndoable(a),n(t.id,i),M.getState().set(l=>{l.actionState.doorInterior=i})};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.interior,onChange:o,children:Y.t("doorMenu.Interior",e)})})}),H1o=be.memo(({door:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.id===r&&l.type===z.Door){l.doorType=i;break}})},o=r=>{const i={name:"Select Door Type",timestamp:Date.now(),oldValue:t.doorType,newValue:r.target.value,changedElementId:t.id,changedElementType:t.type,undo:()=>{n(i.changedElementId,i.oldValue)},redo:()=>{n(i.changedElementId,i.newValue)}};M.getState().addUndoable(i),n(t.id,r.target.value),M.getState().set(a=>{a.actionState.doorType=r.target.value})};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Le.Group,{value:t.doorType,onChange:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:Rd.Default,children:Y.t("doorMenu.Default",e)}),h.jsx(Le,{style:{width:"100%"},value:Rd.Arched,children:Y.t("doorMenu.Arched",e)})]})})})}),M1o=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(Ww),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=M(Gr),c=uo(z.Door),u=m.useMemo(()=>{const x=c?c.lx:1,b=c?s(c):null;return b?x*b.lx:x},[c==null?void 0:c.lx]),[d,f]=m.useState(u),p=$t(),g=(x,b)=>{l(R=>{for(const H of R.elements)if(H.id===x&&H.type===z.Door){const F=H,E=s(F);F.lx=E?b/E.lx:b;break}})},A=x=>{for(const[b,R]of x.entries())g(b,R)},y=(x,b)=>{for(const R of x.keys())g(R,b)},S=x=>{if(c){switch(o){case re.AllSelectedObjectsOfThisType:{for(const b of e)if(b.type===z.Door&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)){const R=s(b);if(R&&x!==b.lx*R.lx)return!0}break}case re.AllObjectsOfThisType:{for(const b of e)if(b.type===z.Door&&!b.locked){const R=s(b);if(R&&x!==b.lx*R.lx)return!0}break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const b of e)if(b.type===z.Door&&b.foundationId===c.foundationId&&!b.locked){const R=s(b);if(R&&x!==b.lx*R.lx)return!0}break}case re.OnlyThisSide:{for(const b of e)if(b.type===z.Door&&b.parentId===c.parentId&&!b.locked){const R=s(b);if(R&&x!==b.lx*R.lx)return!0}break}default:{const b=s(c);if(b&&x!==c.lx*b.lx)return!0;break}}return!1}},C=x=>{if(c&&S(x))switch(o){case re.AllSelectedObjectsOfThisType:{const b=new Map;l(H=>{for(const F of H.elements)if(F.type===z.Door&&!F.locked&&M.getState().selectedElementIdSet.has(F.id)){const E=F,N=E?s(E):null;b.set(F.id,E.lx*(N?N.lx:1)),E.lx=N?x/N.lx:x}});const R={name:"Set Width for Selected Doors",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{A(R.oldValues)},redo:()=>{y(R.oldValues,R.newValue)}};n(R),i(r+1);break}case re.AllObjectsOfThisType:{const b=new Map;l(H=>{for(const F of H.elements)if(F.type===z.Door&&!F.locked){const E=F,N=E?s(E):null;b.set(F.id,E.lx*(N?N.lx:1)),E.lx=N?x/N.lx:x}});const R={name:"Set Width for All Doors",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{A(R.oldValues)},redo:()=>{y(R.oldValues,R.newValue)}};n(R),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(c.foundationId){const b=new Map;l(H=>{for(const F of H.elements)if(F.type===z.Door&&F.foundationId===c.foundationId&&!F.locked){const E=F,N=E?s(E):null;b.set(F.id,E.lx*(N?N.lx:1)),E.lx=N?x/N.lx:x}});const R={name:"Set Width for All Doors Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:c.foundationId,undo:()=>{A(R.oldValues)},redo:()=>{y(R.oldValues,R.newValue)}};n(R),i(r+1)}break;case re.OnlyThisSide:if(c.parentId){const b=new Map;l(H=>{for(const F of H.elements)if(F.type===z.Door&&F.parentId===c.parentId&&!F.locked){const E=F,N=E?s(E):null;b.set(F.id,E.lx*(N?N.lx:1)),E.lx=N?x/N.lx:x}});const R={name:"Set Width for All Doors On the Same Wall",timestamp:Date.now(),oldValues:b,newValue:x,groupId:c.parentId,undo:()=>{A(R.oldValues)},redo:()=>{y(R.oldValues,R.newValue)}};n(R),i(r+1)}break;default:if(c){const b=a(c.id),R=c?s(b):null,H=(b.lx??c.lx??.1)*(R?R.lx:1),F={name:"Set Door Width",timestamp:Date.now(),oldValue:H,newValue:x,changedElementId:c.id,changedElementType:c.type,undo:()=>{g(F.changedElementId,F.oldValue)},redo:()=>{g(F.changedElementId,F.newValue)}};n(F),g(c.id,x),i(r+1)}}},P=()=>{t(!1)},v=()=>{C(d)},T=c?s(c):null,w=T&&c?2*T.lx*Math.min(Math.abs(.5-c.cx),Math.abs(-.5-c.cx)):100;return h.jsx(so,{width:550,title:Y.t("word.Width",p),onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:w,style:{width:120},step:.1,precision:2,value:d,formatter:x=>Number(x).toFixed(2),onChange:x=>f(x)}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [0.1, ",w.toFixed(1),"]",Y.t("word.MeterAbbreviation",p)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",p)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:x=>M.getState().setDoorActionScope(x.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("doorMenu.OnlyThisDoor",p)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("doorMenu.AllDoorsOnWall",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("doorMenu.AllDoorsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("doorMenu.AllSelectedDoors",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("doorMenu.AllDoors",p)})]})})})]})})},I1o=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(Ww),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=M(Gr),c=uo(z.Door),u=m.useMemo(()=>{const x=c?c.lz:1,b=c?s(c):null;return b?x*b.lz:x},[c==null?void 0:c.lz]),[d,f]=m.useState(u),p=$t(),g=(x,b)=>{l(R=>{for(const H of R.elements)if(H.id===x&&H.type===z.Door){const F=H,E=s(F);F.lz=E?b/E.lz:b,E&&(F.cz=-(E.lz-b)/(2*E.lz));break}})},A=x=>{for(const[b,R]of x.entries())g(b,R)},y=(x,b)=>{for(const R of x.keys())g(R,b)},S=x=>{if(c){switch(o){case re.AllSelectedObjectsOfThisType:{for(const b of e)if(b.type===z.Door&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)){const R=s(b);if(R&&x!==b.lz*R.lz)return!0}break}case re.AllObjectsOfThisType:{for(const b of e)if(b.type===z.Door&&!b.locked){const R=s(b);if(R&&x!==b.lz*R.lz)return!0}break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const b of e)if(b.type===z.Door&&b.foundationId===c.foundationId&&!b.locked){const R=s(b);if(R&&x!==b.lz*R.lz)return!0}break}case re.OnlyThisSide:{for(const b of e)if(b.type===z.Door&&b.parentId===c.parentId&&!b.locked){const R=s(b);if(R&&x!==b.lz*R.lz)return!0}break}default:{const b=s(c);if(b&&x!==c.lz*b.lz)return!0;break}}return!1}},C=x=>{if(c&&S(x))switch(o){case re.AllSelectedObjectsOfThisType:{const b=new Map;l(H=>{for(const F of H.elements)if(F.type===z.Door&&!F.locked&&M.getState().selectedElementIdSet.has(F.id)){const E=F,N=E?s(E):null;b.set(F.id,E.lz*(N?N.lz:1)),E.lz=N?x/N.lz:x,N&&(E.cz=-(N.lz-x)/(2*N.lz))}});const R={name:"Set Height for Selected Doors",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{A(R.oldValues)},redo:()=>{y(R.oldValues,R.newValue)}};n(R),i(r+1);break}case re.AllObjectsOfThisType:{const b=new Map;l(H=>{for(const F of H.elements)if(F.type===z.Door&&!F.locked){const E=F,N=E?s(E):null;b.set(F.id,E.lz*(N?N.lz:1)),E.lz=N?x/N.lz:x,N&&(E.cz=-(N.lz-x)/(2*N.lz))}});const R={name:"Set Height for All Doors",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{A(R.oldValues)},redo:()=>{y(R.oldValues,R.newValue)}};n(R),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(c.foundationId){const b=new Map;l(H=>{for(const F of H.elements)if(F.type===z.Door&&F.foundationId===c.foundationId&&!F.locked){const E=F,N=E?s(E):null;b.set(F.id,E.lz*(N?N.lz:1)),E.lz=N?x/N.lz:x,N&&(E.cz=-(N.lz-x)/(2*N.lz))}});const R={name:"Set Height for All Doors Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:c.foundationId,undo:()=>{A(R.oldValues)},redo:()=>{y(R.oldValues,R.newValue)}};n(R),i(r+1)}break;case re.OnlyThisSide:if(c.parentId){const b=new Map;l(H=>{for(const F of H.elements)if(F.type===z.Door&&F.parentId===c.parentId&&!F.locked){const E=F,N=E?s(E):null;b.set(F.id,E.lz*(N?N.lz:1)),E.lz=N?x/N.lz:x,N&&(E.cz=-(N.lz-x)/(2*N.lz))}});const R={name:"Set Height for All Doors On the Same Wall",timestamp:Date.now(),oldValues:b,newValue:x,groupId:c.parentId,undo:()=>{A(R.oldValues)},redo:()=>{y(R.oldValues,R.newValue)}};n(R),i(r+1)}break;default:if(c){const b=a(c.id),R=c?s(b):null,H=(b.lz??c.lz??.2)*(R?R.lz:1),F={name:"Set Door Height",timestamp:Date.now(),oldValue:H,newValue:x,changedElementId:c.id,changedElementType:c.type,undo:()=>{g(F.changedElementId,F.oldValue)},redo:()=>{g(F.changedElementId,F.newValue)}};n(F),g(c.id,x),i(r+1)}}},P=()=>{f(u),t(!1)},v=()=>{C(d)},T=c?s(c):null,w=(T==null?void 0:T.lz)??20;return h.jsx(so,{width:550,title:Y.t("word.Height",p),onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:w,style:{width:120},step:.1,precision:2,value:d,formatter:x=>Number(x).toFixed(2),onChange:x=>{x!==null&&f(x)}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [0.1, ",w.toFixed(1),"]",Y.t("word.MeterAbbreviation",p)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",p)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:x=>M.getState().setDoorActionScope(x.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("doorMenu.OnlyThisDoor",p)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("doorMenu.AllDoorsOnWall",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("doorMenu.AllDoorsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("doorMenu.AllSelectedDoors",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("doorMenu.AllDoors",p)})]})})})]})})},z1o=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(Ww),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Door),[c,u]=m.useState((s==null?void 0:s.opacity)??1),d=$t(),f=(P,v)=>{l(T=>{for(const w of T.elements)if(w.id===P){w.opacity=v;break}})},p=P=>{for(const[v,T]of P.entries())f(v,T)},g=(P,v)=>{for(const T of P.keys())f(T,v)},A=P=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const v of e)if(v.type===z.Door&&P!==v.opacity&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of e)if(v.type===z.Door&&P!==v.opacity&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of e)if(v.type===z.Door&&v.foundationId===s.foundationId&&P!==v.opacity&&!v.locked)return!0;break;case re.OnlyThisSide:for(const v of e)if(v.type===z.Door&&v.parentId===s.parentId&&P!==v.opacity&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.opacity))return!0;break}return!1}},y=P=>{if(s&&A(P)){switch(o){case re.AllSelectedObjectsOfThisType:{const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Door&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)){const b=x;v.set(x.id,b.opacity??1),b.opacity=P}});const T={name:"Set Opacity for Selected Doors",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisType:{const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Door&&!x.locked){const b=x;v.set(x.id,b.opacity??1),b.opacity=P}});const T={name:"Set Opacity for All Doors",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Door&&x.foundationId===s.foundationId&&!x.locked){const b=x;v.set(x.id,b.opacity??1),b.opacity=P}});const T={name:"Set Opacity for All Doors Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break;case re.OnlyThisSide:if(s.parentId){const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Door&&x.parentId===s.parentId&&!x.locked){const b=x;v.set(x.id,b.opacity??1),b.opacity=P}});const T={name:"Set Opacity for All Doors On the Same Wall",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.parentId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break;default:if(s){const T=a(s.id).opacity??s.opacity??1,w={name:"Set Opacity of Door",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};n(w),f(s.id,P),i(r+1)}}l(v=>{v.actionState.doorOpacity=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("wallMenu.Opacity",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:c,formatter:P=>Number(P).toFixed(2),onChange:P=>u(P)}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:["kWh/(m³·℃)",h.jsx("br",{}),h.jsx("br",{}),Y.t("word.Range",d),": [0.01, 100]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P=>M.getState().setDoorActionScope(P.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("doorMenu.OnlyThisDoor",d)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("doorMenu.AllDoorsOnWall",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("doorMenu.AllDoorsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("doorMenu.AllSelectedDoors",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("doorMenu.AllDoors",d)})]})})})]})})},D1o=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(Ww),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Door),[c,u]=m.useState((s==null?void 0:s.uValue)??J4),[d,f]=m.useState(ye.toUValueInUS(c)),p=$t(),g=(T,w)=>{l(x=>{for(const b of x.elements)if(b.id===T){b.uValue=w;break}})},A=T=>{for(const[w,x]of T.entries())g(w,x)},y=(T,w)=>{for(const x of T.keys())g(x,w)},S=T=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const w of e)if(w.type===z.Door&&T!==w.uValue&&!w.locked&&M.getState().selectedElementIdSet.has(w.id))return!0;break;case re.AllObjectsOfThisType:for(const w of e)if(w.type===z.Door&&T!==w.uValue&&!w.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const w of e)if(w.type===z.Door&&w.foundationId===s.foundationId&&T!==w.uValue&&!w.locked)return!0;break;case re.OnlyThisSide:for(const w of e)if(w.type===z.Door&&w.parentId===s.parentId&&T!==w.uValue&&!w.locked)return!0;break;default:if(T!==(s==null?void 0:s.uValue))return!0;break}return!1}},C=T=>{if(s&&S(T)){switch(o){case re.AllSelectedObjectsOfThisType:{const w=new Map;l(b=>{for(const R of b.elements)if(R.type===z.Door&&!R.locked){const H=R;w.set(R.id,H.uValue??J4),H.uValue=T}});const x={name:"Set U-Value for Selected Doors",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1);break}case re.AllObjectsOfThisType:{const w=new Map;l(b=>{for(const R of b.elements)if(R.type===z.Door&&!R.locked){const H=R;w.set(R.id,H.uValue??J4),H.uValue=T}});const x={name:"Set U-Value for All Doors",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const w=new Map;l(b=>{for(const R of b.elements)if(R.type===z.Door&&R.foundationId===s.foundationId&&!R.locked){const H=R;w.set(R.id,H.uValue??J4),H.uValue=T}});const x={name:"Set U-Value for All Doors Above Foundation",timestamp:Date.now(),oldValues:w,newValue:T,groupId:s.foundationId,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1)}break;case re.OnlyThisSide:if(s.parentId){const w=new Map;l(b=>{for(const R of b.elements)if(R.type===z.Door&&R.parentId===s.parentId&&!R.locked){const H=R;w.set(R.id,H.uValue??J4),H.uValue=T}});const x={name:"Set U-Value for All Doors On the Same Wall",timestamp:Date.now(),oldValues:w,newValue:T,groupId:s.parentId,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1)}break;default:if(s){const x=a(s.id).uValue??s.uValue??J4,b={name:"Set Door U-Value",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:s.id,changedElementType:s.type,undo:()=>{g(b.changedElementId,b.oldValue)},redo:()=>{g(b.changedElementId,b.newValue)}};n(b),g(s.id,T),i(r+1)}}l(w=>{w.actionState.doorUValue=T})}},P=()=>{t(!1)},v=()=>{C(c)};return h.jsx(so,{width:550,title:`${Y.t("word.UValue",p)+" "}(${Y.t("word.ThermalTransmittance",p)})`,onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:c,formatter:T=>Number(T).toFixed(2),onChange:T=>{T!==null&&(u(T),f(ye.toUValueInUS(T)))}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [0.01, 100]",h.jsx("br",{}),Y.t("word.SIUnit",p),": W/(m²·℃)"]}),h.jsx("br",{}),h.jsx(Sn,{min:ye.toUValueInUS(.01),max:ye.toUValueInUS(100),style:{width:120},step:.01,precision:2,value:d,formatter:T=>Number(T).toFixed(2),onChange:T=>{T!==null&&(f(T),u(ye.toUValueInSI(T)))}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [",ye.toUValueInUS(.01).toFixed(3),", ",ye.toUValueInUS(100).toFixed(1),"]",h.jsx("br",{}),Y.t("word.USUnit",p),": Btu/(h·ft²·℉)"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:T=>M.getState().setDoorActionScope(T.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("doorMenu.OnlyThisDoor",p)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("doorMenu.AllDoorsOnWall",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("doorMenu.AllDoorsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("doorMenu.AllSelectedDoors",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("doorMenu.AllDoors",p)})]})})})]})})},E1o=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(Ww),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Door),[c,u]=m.useState((s==null?void 0:s.volumetricHeatCapacity)??.5),d=$t(),f=(P,v)=>{l(T=>{for(const w of T.elements)if(w.id===P){w.volumetricHeatCapacity=v;break}})},p=P=>{for(const[v,T]of P.entries())f(v,T)},g=(P,v)=>{for(const T of P.keys())f(T,v)},A=P=>{switch(o){case re.AllSelectedObjectsOfThisType:for(const v of e)if(v.type===z.Door&&P!==v.volumetricHeatCapacity&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of e)if(v.type===z.Door&&P!==v.volumetricHeatCapacity&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of e)if(v.type===z.Door&&v.foundationId===(s==null?void 0:s.foundationId)&&P!==v.volumetricHeatCapacity&&!v.locked)return!0;break;case re.OnlyThisSide:for(const v of e)if(v.type===z.Door&&v.parentId===(s==null?void 0:s.parentId)&&P!==v.volumetricHeatCapacity&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.volumetricHeatCapacity))return!0;break}return!1},y=P=>{if(s&&A(P)){switch(o){case re.AllSelectedObjectsOfThisType:{const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Door&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)){const b=x;v.set(x.id,b.volumetricHeatCapacity??.5),b.volumetricHeatCapacity=P}});const T={name:"Set Volumetric Heat Capacity for Selected Doors",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisType:{const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Door&&!x.locked){const b=x;v.set(x.id,b.volumetricHeatCapacity??.5),b.volumetricHeatCapacity=P}});const T={name:"Set Volumetric Heat Capacity for All Doors",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Door&&x.foundationId===s.foundationId&&!x.locked){const b=x;v.set(x.id,b.volumetricHeatCapacity??.5),b.volumetricHeatCapacity=P}});const T={name:"Set Volumetric Heat Capacity for All Doors Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break;case re.OnlyThisSide:if(s.parentId){const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Door&&x.parentId===s.parentId&&!x.locked){const b=x;v.set(x.id,b.volumetricHeatCapacity??.5),b.volumetricHeatCapacity=P}});const T={name:"Set Volumetric Heat Capacity for All Doors On the Same Wall",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.parentId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break;default:if(s){const T=a(s.id).volumetricHeatCapacity??s.volumetricHeatCapacity??.5,w={name:"Set Volumetric Heat Capacity of Door",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};n(w),f(s.id,P),i(r+1)}}l(v=>{v.actionState.doorVolumetricHeatCapacity=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("word.VolumetricHeatCapacity",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:c,formatter:P=>Number(P).toFixed(2),onChange:P=>{P!==null&&u(P)}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:["kWh/(m³·℃)",h.jsx("br",{}),h.jsx("br",{}),Y.t("word.Range",d),": [0.01, 100]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P=>M.getState().setDoorActionScope(P.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("doorMenu.OnlyThisDoor",d)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("doorMenu.AllDoorsOnWall",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("doorMenu.AllDoorsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("doorMenu.AllSelectedDoors",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("doorMenu.AllDoors",d)})]})})})]})})},F1o=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(Ww),r=M(no),i=M(Qn),a=M(pn),l=M(Jn),s=uo(z.Door),[c,u]=m.useState((s==null?void 0:s.textureType)??sr.Default),d=$t(),{Option:f}=Uo,p=(v,T)=>{a(w=>{for(const x of w.elements)if(x.id===v){x.locked||(x.textureType=T);break}})},g=(v,T)=>{for(const w of v.keys())p(w,T)},A=v=>{for(const[T,w]of v.entries())p(T,w)},y=v=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const T of e)if(T.type===z.Door&&v!==T.textureType&&!T.locked&&M.getState().selectedElementIdSet.has(T.id))return!0;break;case re.AllObjectsOfThisType:for(const T of e)if(T.type===z.Door&&v!==T.textureType&&!T.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const T of e)if(T.type===z.Door&&T.foundationId===s.foundationId&&v!==T.textureType&&!T.locked)return!0;break;case re.OnlyThisSide:for(const T of e)if(T.type===z.Door&&T.parentId===s.parentId&&v!==T.textureType&&!T.locked)return!0;break;default:if(v!==(s==null?void 0:s.textureType))return!0;break}return!1}},S=v=>{if(s&&y(v)){switch(o){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of M.getState().elements)x.type===z.Door&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&T.set(x.id,x.textureType??sr.Default);const w={name:"Set Texture for Selected Doors",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{A(w.oldValues)},redo:()=>{g(w.oldValues,w.newValue)}};n(w),g(T,v),i(r+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of M.getState().elements)x.type===z.Door&&!x.locked&&T.set(x.id,x.textureType??sr.Default);const w={name:"Set Texture for All Doors",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{A(w.oldValues)},redo:()=>{g(w.oldValues,w.newValue)}};n(w),g(T,v),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const T=new Map;for(const x of M.getState().elements)x.type===z.Door&&x.foundationId===s.foundationId&&!x.locked&&T.set(x.id,x.textureType);const w={name:"Set Texture for All Doors Above Foundation",timestamp:Date.now(),oldValues:T,newValue:v,groupId:s.foundationId,undo:()=>{A(w.oldValues)},redo:()=>{w.groupId&&g(w.oldValues,w.newValue)}};n(w),g(T,v),i(r+1)}break;case re.OnlyThisSide:if(s.parentId){const T=new Map;for(const x of M.getState().elements)x.type===z.Door&&x.parentId===s.parentId&&!x.locked&&T.set(x.id,x.textureType);const w={name:"Set Texture for All Doors On the Same Wall",timestamp:Date.now(),oldValues:T,newValue:v,groupId:s.parentId,undo:()=>{A(w.oldValues)},redo:()=>{w.groupId&&g(w.oldValues,w.newValue)}};n(w),g(T,v),i(r+1)}break;default:if(s){const T=l(s.id),w=T?T.textureType:s.textureType,x={name:"Set Texture of Selected Door",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};n(x),p(s.id,v),i(r+1)}}a(T=>{T.actionState.doorTexture=v})}},C=()=>{t(!1)},P=()=>{S(c)};return h.jsx(so,{width:550,title:Y.t("word.Texture",d),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:9,children:h.jsxs(Uo,{style:{width:"150px"},value:c,onChange:v=>u(v),children:[h.jsxs(f,{value:sr.NoTexture,children:[h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"12px",width:"32px",height:"20px",border:"1px dashed dimGray"},children:" "}),Y.t("shared.NoTexture",d)]},sr.NoTexture),h.jsxs(f,{value:sr.Default,children:[h.jsx("img",{alt:sr.Default,src:Y$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.TextureDefault",d)]},sr.Default),h.jsxs(f,{value:sr.Texture01,children:[h.jsx("img",{alt:sr.Texture01,src:O$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture01",d)]},sr.Texture01),h.jsxs(f,{value:sr.Texture02,children:[h.jsx("img",{alt:sr.Texture02,src:ude,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture02",d)]},sr.Texture02),h.jsxs(f,{value:sr.Texture03,children:[h.jsx("img",{alt:sr.Texture03,src:V$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture03",d)]},sr.Texture03),h.jsxs(f,{value:sr.Texture04,children:[h.jsx("img",{alt:sr.Texture04,src:_$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture04",d)]},sr.Texture04),h.jsxs(f,{value:sr.Texture05,children:[h.jsx("img",{alt:sr.Texture05,src:G$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture05",d)]},sr.Texture05),h.jsxs(f,{value:sr.Texture06,children:[h.jsx("img",{alt:sr.Texture06,src:X$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture06",d)]},sr.Texture06),h.jsxs(f,{value:sr.Texture07,children:[h.jsx("img",{alt:sr.Texture07,src:J$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture07",d)]},sr.Texture07),h.jsxs(f,{value:sr.Texture08,children:[h.jsx("img",{alt:sr.Texture08,src:K$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture08",d)]},sr.Texture08),h.jsxs(f,{value:sr.Texture09,children:[h.jsx("img",{alt:sr.Texture09,src:q$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture09",d)]},sr.Texture09),h.jsxs(f,{value:sr.Texture10,children:[h.jsx("img",{alt:sr.Texture10,src:$$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture10",d)]},sr.Texture10),h.jsxs(f,{value:sr.Texture11,children:[h.jsx("img",{alt:sr.Texture11,src:Q$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture11",d)]},sr.Texture11),h.jsxs(f,{value:sr.Texture12,children:[h.jsx("img",{alt:sr.Texture12,src:Z$e,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture12",d)]},sr.Texture12),h.jsxs(f,{value:sr.Texture13,children:[h.jsx("img",{alt:sr.Texture13,src:eQe,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture13",d)]},sr.Texture13),h.jsxs(f,{value:sr.Texture14,children:[h.jsx("img",{alt:sr.Texture14,src:tQe,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture14",d)]},sr.Texture14),h.jsxs(f,{value:sr.Texture15,children:[h.jsx("img",{alt:sr.Texture15,src:nQe,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture15",d)]},sr.Texture15),h.jsxs(f,{value:sr.Texture16,children:[h.jsx("img",{alt:sr.Texture16,src:oQe,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture16",d)]},sr.Texture16),h.jsxs(f,{value:sr.Texture17,children:[h.jsx("img",{alt:sr.Texture17,src:rQe,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("doorMenu.Texture17",d)]},sr.Texture17)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:15,children:h.jsx(Le.Group,{onChange:v=>M.getState().setDoorActionScope(v.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("doorMenu.OnlyThisDoor",d)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("doorMenu.AllDoorsOnWall",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("doorMenu.AllDoorsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("doorMenu.AllSelectedDoors",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("doorMenu.AllDoors",d)})]})})})]})})},k1o=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(Ww),i=M(no),a=M(Qn),l=M(Jn),s=uo(z.Door),[c,u]=m.useState((s==null?void 0:s.color)??"#ffffff"),d=$t(),f=(P,v)=>{e(T=>{for(const w of T.elements)if(w.id===P){w.locked||(w.color=v);break}})},p=(P,v)=>{for(const T of P.keys())f(T,v)},g=P=>{for(const[v,T]of P.entries())f(v,T)},A=P=>{switch(r){case re.AllSelectedObjectsOfThisType:for(const v of n)if(v.type===z.Door&&P!==v.color&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of n)if(v.type===z.Door&&P!==v.color&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of n)if(v.type===z.Door&&v.foundationId===(s==null?void 0:s.foundationId)&&P!==v.color&&!v.locked)return!0;break;case re.OnlyThisSide:for(const v of n)if(v.type===z.Door&&v.parentId===(s==null?void 0:s.parentId)&&P!==v.color&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.color))return!0;break}return!1},y=P=>{if(s&&A(P)){switch(r){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of M.getState().elements)w.type===z.Door&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)&&v.set(w.id,w.color??"#ffffff");const T={name:"Set Color for Selected Doors",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of M.getState().elements)w.type===z.Door&&!w.locked&&v.set(w.id,w.color??"#ffffff");const T={name:"Set Color for All Doors",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;for(const w of M.getState().elements)w.type===z.Door&&w.foundationId===s.foundationId&&!s.locked&&v.set(w.id,w.color??"#ffffff");const T={name:"Set Color for All Doors Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{g(T.oldValues)},redo:()=>{T.groupId&&p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1)}break;case re.OnlyThisSide:if(s.parentId){const v=new Map;for(const w of M.getState().elements)w.type===z.Door&&w.parentId===s.parentId&&!s.locked&&v.set(w.id,w.color??"#ffffff");const T={name:"Set Color for All Doors On the Same Wall",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.parentId,undo:()=>{g(T.oldValues)},redo:()=>{T.groupId&&p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1)}break;default:if(s){const v=l(s.id),T=(v?v.color:s.color)??"#ffffff",w={name:"Set Color of Selected Door",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};o(w),f(s.id,P),a(i+1)}}e(v=>{v.actionState.doorColor=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:640,title:Y.t("word.Color",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:c,onChangeComplete:P=>{u(P.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:P=>M.getState().setDoorActionScope(P.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("doorMenu.OnlyThisDoor",d)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("doorMenu.AllDoorsOnWall",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("doorMenu.AllDoorsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("doorMenu.AllSelectedDoors",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("doorMenu.AllDoors",d)})]})})})]})})},L1o=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(Ww),i=M(no),a=M(Qn),l=M(Jn),s=uo(z.Door),[c,u]=m.useState((s==null?void 0:s.frameColor)??"#ffffff"),d=$t(),f=(P,v)=>{e(T=>{for(const w of T.elements)if(w.id===P){!w.locked&&w.type===z.Door&&(w.frameColor=v);break}})},p=(P,v)=>{for(const T of P.keys())f(T,v)},g=P=>{for(const[v,T]of P.entries())f(v,T)},A=P=>{switch(r){case re.AllSelectedObjectsOfThisType:for(const v of n)if(v.type===z.Door&&!v.locked&&M.getState().selectedElementIdSet.has(v.id)&&P!==v.frameColor)return!0;break;case re.AllObjectsOfThisType:for(const v of n)if(v.type===z.Door&&!v.locked&&P!==v.frameColor)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of n)if(v.type===z.Door&&v.foundationId===(s==null?void 0:s.foundationId)&&!v.locked&&P!==v.frameColor)return!0;break;case re.OnlyThisSide:for(const v of n)if(v.type===z.Door&&v.parentId===(s==null?void 0:s.parentId)&&!v.locked&&P!==v.frameColor)return!0;break;default:if(P!==(s==null?void 0:s.frameColor))return!0;break}return!1},y=P=>{if(s&&A(P)){switch(r){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of M.getState().elements)w.type===z.Door&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)&&v.set(w.id,w.frameColor??"#ffffff");const T={name:"Set Color for Selected Doors",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of M.getState().elements)w.type===z.Door&&!w.locked&&v.set(w.id,w.frameColor??"#ffffff");const T={name:"Set Color for All Doors",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;for(const w of M.getState().elements)w.type===z.Door&&w.foundationId===s.foundationId&&!s.locked&&v.set(w.id,w.frameColor??"#ffffff");const T={name:"Set Color for All Doors Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{g(T.oldValues)},redo:()=>{T.groupId&&p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1)}break;case re.OnlyThisSide:if(s.parentId){const v=new Map;for(const w of M.getState().elements)w.type===z.Door&&w.parentId===s.parentId&&!s.locked&&v.set(w.id,w.frameColor??"#ffffff");const T={name:"Set Color for All Doors On the Same Wall",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.parentId,undo:()=>{g(T.oldValues)},redo:()=>{T.groupId&&p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1)}break;default:if(s){const v=l(s.id),T=(v?v.frameColor:s.frameColor)??"#ffffff",w={name:"Set Color of Selected Door",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};o(w),f(s.id,P),a(i+1)}}e(v=>{v.actionState.doorColor=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:640,title:Y.t("doorMenu.FrameColor",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:c??(s==null?void 0:s.frameColor)??"#ffffff",onChangeComplete:P=>{u(P.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:P=>M.getState().setDoorActionScope(P.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("doorMenu.OnlyThisDoor",d)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("doorMenu.AllDoorsOnWall",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("doorMenu.AllDoorsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("doorMenu.AllSelectedDoors",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("doorMenu.AllDoors",d)})]})})})]})})},W1o=t=>{const e=[];if(t.type!==z.Door)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language};return e.push({key:"door-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"door-cut",label:h.jsx(kd,{})}),e.push({key:"door-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&(e.push({key:"door-filled",label:h.jsx(C1o,{door:n})},{key:"door-interior",label:h.jsx(R1o,{door:n})}),e.push({key:"door-type-submenu",label:h.jsx(an,{children:Y.t("doorMenu.DoorType",r)}),children:[{key:"door-type-radio-group",label:h.jsx(H1o,{door:n}),style:{backgroundColor:"white"}}]},{key:"door-width",label:h.jsxs(eo,{Dialog:M1o,children:[Y.t("word.Width",r)," ..."]})},{key:"door-height",label:h.jsxs(eo,{Dialog:I1o,children:[Y.t("word.Height",r)," ..."]})}),n.filled&&(e.push({key:"door-u-value",label:h.jsxs(eo,{Dialog:D1o,children:[Y.t("word.UValue",r)," ..."]})},{key:"door-heat-capacity",label:h.jsxs(eo,{Dialog:E1o,children:[Y.t("word.VolumetricHeatCapacity",r)," ..."]})},{key:"door-texture",label:h.jsxs(eo,{Dialog:F1o,children:[Y.t("word.Texture",r)," ..."]})},{key:"door-color",label:h.jsxs(eo,{Dialog:k1o,children:[Y.t("word.Color",r)," ..."]})},{key:"door-frame-color",label:h.jsxs(eo,{Dialog:L1o,children:[Y.t("doorMenu.FrameColor",r)," ..."]})}),(n.textureType===sr.Default||n.textureType===sr.NoTexture)&&e.push({key:"door-opacity",label:h.jsxs(eo,{Dialog:z1o,children:[Y.t("wallMenu.Opacity",r)," ..."]})}))),{items:e}},N1o=({windowModel:t,dataType:e,attributeKey:n,range:o,step:r,unit:i,note:a,digit:l,setDialogVisible:s})=>{const c=M(Kn),u=M(En),d=M(MW),f=M(no),p=M(Qn),g=M(pn),A=M(Gr),y=m.useMemo(()=>{const W=t[n],k=A(t);if(k&&t.parentType!==z.Roof){if(n==="lx")return W*k.lx;if(n==="lz")return W*k.lz}return n==="sillWidth"&&W===void 0?.2:W},[n,t]),[S,C]=m.useState(y),P=$t(),v=(W,k,D)=>{const L=A(W);L&&(k==="lx"||k==="lz")?W.parentType===z.Roof?W[k]=D:W[k]=D/L[k]:W[k]=D},T=(W,k)=>{g(D=>{for(const L of D.elements)if(L.id===W){!L.locked&&L.type===z.Window&&v(L,n,k);break}})},w=(W,k)=>{W&&g(D=>{for(const L of D.elements)!L.locked&&L.type===z.Window&&L.parentId===W&&v(L,n,k)})},x=(W,k)=>{W&&g(D=>{for(const L of D.elements)!L.locked&&L.type===z.Window&&L.foundationId===W&&v(L,n,k)})},b=W=>{g(k=>{for(const D of k.elements)!D.locked&&D.type===z.Window&&v(D,n,W)})},R=(W,k)=>{g(D=>{for(const L of D.elements)!L.locked&&L.type===z.Window&&W.has(L.id)&&v(L,n,k)})},H=W=>{for(const[k,D]of W.entries())T(k,D)},F=W=>{switch(d){case re.AllSelectedObjectsOfThisType:{for(const k of c)if(k.type===z.Window&&!k.locked&&M.getState().selectedElementIdSet.has(k.id)){const D=k,L=A(D);if(L&&D.parentType!==z.Roof){if(n==="lx"){if(W!==D[n]*L.lx)return!0}else if(n==="lz"){if(W!==D[n]*L.lz)return!0}else if(W!==D[n])return!0}else if(W!==D[n])return!0}break}case re.AllObjectsOfThisType:{for(const k of c)if(k.type===z.Window&&!k.locked){const D=k,L=A(D);if(L&&D.parentType!==z.Roof){if(n==="lx"){if(W!==D[n]*L.lx)return!0}else if(n==="lz"){if(W!==D[n]*L.lz)return!0}else if(W!==D[n])return!0}else if(W!==D[n])return!0}break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const k of c)if(k.type===z.Window&&k.foundationId===t.foundationId&&!k.locked){const D=k,L=A(D);if(L&&D.parentType!==z.Roof){if(n==="lx"){if(W!==D[n]*L.lx)return!0}else if(n==="lz"){if(W!==D[n]*L.lz)return!0}else if(W!==D[n])return!0}else if(W!==D[n])return!0}break}case re.OnlyThisSide:{for(const k of c)if(k.type===z.Window&&k.parentId===t.parentId&&!k.locked){const D=k,L=A(D);if(L&&D.parentType!==z.Roof){if(n==="lx"){if(W!==D[n]*L.lx)return!0}else if(n==="lz"){if(W!==D[n]*L.lz)return!0}else if(W!==D[n])return!0}else if(W!==D[n])return!0}break}default:{const k=A(t);if(k&&t.parentType!==z.Roof){if(n==="lx"){if(W!==t[n]*k.lx)return!0}else if(n==="lz"){if(W!==t[n]*k.lz)return!0}else if(W!==t[n])return!0}else if(W!==t[n])return!0;break}}return!1},E=W=>{if(t&&F(W)){switch(d){case re.AllSelectedObjectsOfThisType:{const k=new Map;for(const L of c)if(L.type===z.Window&&!L.locked&&M.getState().selectedElementIdSet.has(L.id)){const j=L,B=A(j);let O=j[n];B&&j.parentType!==z.Roof&&(n==="lx"?O*=B.lx:n==="lz"&&(O*=B.lz)),k.set(L.id,O)}const D={name:`Set ${e} for Selected Windows`,timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{H(D.oldValues)},redo:()=>{R(D.oldValues,D.newValue)}};u(D),R(k,W),p(f+1);break}case re.AllObjectsOfThisType:{const k=new Map;for(const L of c)if(L.type===z.Window&&!L.locked){const j=L,B=A(j);let O=j[n];B&&j.parentType!==z.Roof&&(n==="lx"?O*=B.lx:n==="lz"&&(O*=B.lz)),k.set(L.id,O)}const D={name:`Set ${e} for All Windows`,timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{H(D.oldValues)},redo:()=>{b(D.newValue)}};u(D),b(W),p(f+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(t.foundationId){const k=new Map;for(const L of c)if(L.type===z.Window&&L.foundationId===t.foundationId&&!L.locked){const j=L,B=A(j);let O=j[n];B&&j.parentType!==z.Roof&&(n==="lx"?O*=B.lx:n==="lz"&&(O*=B.lz)),k.set(L.id,O)}const D={name:`Set ${e} for All Windows Above Foundation`,timestamp:Date.now(),oldValues:k,newValue:W,groupId:t.foundationId,undo:()=>{H(D.oldValues)},redo:()=>{x(t.foundationId,D.newValue)}};u(D),x(t.foundationId,W),p(f+1)}break;case re.OnlyThisSide:if(t.parentId){const k=new Map;for(const L of c)if(L.type===z.Window&&L.parentId===t.parentId&&!L.locked){const j=L,B=A(j);let O=j[n];B&&j.parentType!==z.Roof&&(n==="lx"?O*=B.lx:n==="lz"&&(O*=B.lz)),k.set(L.id,O)}const D={name:`Set ${e} for All Windows On the Same Parent`,timestamp:Date.now(),oldValues:k,newValue:W,groupId:t.parentId,undo:()=>{H(D.oldValues)},redo:()=>{w(t.parentId,D.newValue)}};u(D),w(t.parentId,W),p(f+1)}break;default:if(t){let k=t[n];const D=A(t);D&&t.parentType!==z.Roof&&(n==="lx"?k*=D.lx:n==="lz"&&(k*=D.lz));const L={name:`Set Window ${e}`,timestamp:Date.now(),oldValue:k,newValue:W,changedElementId:t.id,changedElementType:t.type,undo:()=>{T(L.changedElementId,L.oldValue)},redo:()=>{T(L.changedElementId,L.newValue)}};u(L),T(t.id,W),p(f+1)}}g(k=>{switch(e){case Qh.Width:k.actionState.windowWidth=W;break;case Qh.Height:k.actionState.windowHeight=W;break;case Qh.Opacity:k.actionState.windowOpacity=W;break;case Qh.FrameWidth:k.actionState.windowFrameWidth=W;break;case Qh.SillWidth:k.actionState.windowSillWidth=W;break;case Qh.HorizontalMullionSpacing:k.actionState.windowHorizontalMullionSpacing=W;break;case Qh.VerticalMullionSpacing:k.actionState.windowVerticalMullionSpacing=W;break;case Qh.MullionWidth:k.actionState.windowMullionWidth=W;break}})}},N=()=>{s(!1)},U=()=>{E(S)};return h.jsx(so,{width:550,title:Y.t(`windowMenu.${e}`,P),onApply:U,onClose:N,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:o[0],max:o[1],style:{width:120},step:r,precision:2,value:S,formatter:W=>Number(W).toFixed(2),onChange:W=>{W!==null&&C(W)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",P),": [",o[0].toFixed(o[0]===0?0:l??0),","," ",o[1].toFixed(l??0),"] ",i," ",h.jsx("br",{}),h.jsx("br",{})," ",a]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:i}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:W=>M.getState().setWindowActionScope(W.target.value),value:d,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windowMenu.OnlyThisWindow",P)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("windowMenu.AllWindowsOnSurface",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windowMenu.AllWindowsAboveFoundation",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windowMenu.AllSelectedWindows",P)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windowMenu.AllWindows",P)})]})})})]})})},U1o=({window:t,dataType:e,attributeKey:n,setDialogVisible:o})=>{const r=M(Kn),i=M(pn),a=M(En),l=M(MW),s=M(no),c=M(Qn),[u,d]=ZZ(t[n]??"#ffffff"),f=$t(),p=(x,b)=>{i(R=>{for(const H of R.elements)if(H.id===x){!H.locked&&H.type===z.Window&&(H[n]=b);break}})},g=(x,b)=>{i(R=>{for(const H of R.elements)!H.locked&&H.type===z.Window&&H.parentId===x&&(H[n]=b)})},A=(x,b)=>{i(R=>{for(const H of R.elements)!H.locked&&H.type===z.Window&&H.foundationId===x&&(H[n]=b)})},y=x=>{i(b=>{for(const R of b.elements)!R.locked&&R.type===z.Window&&(R[n]=x)})},S=(x,b)=>{i(R=>{for(const H of R.elements)!H.locked&&H.type===z.Window&&x.has(H.id)&&(H[n]=b)})},C=x=>{for(const[b,R]of x.entries())p(b,R)},P=x=>{switch(l){case re.AllSelectedObjectsOfThisType:for(const b of r)if(b.type===z.Window&&x!==b[n]&&!b.locked&&M.getState().selectedElementIdSet.has(b.id))return!0;break;case re.AllObjectsOfThisType:for(const b of r)if(b.type===z.Window&&x!==b[n]&&!b.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const b of r)if(b.type===z.Window&&b.foundationId===t.foundationId&&x!==b[n]&&!b.locked)return!0;break;case re.OnlyThisSide:for(const b of r)if(b.type===z.Window&&b.parentId===t.parentId&&x!==b[n]&&!b.locked)return!0;break;default:if(x!==t[n])return!0;break}return!1},v=x=>{if(t&&P(x)){switch(l){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of r)H.type===z.Window&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&b.set(H.id,H[n]);const R={name:`Set ${e} for Selected Windows`,timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{C(R.oldValues)},redo:()=>{S(R.oldValues,R.newValue)}};a(R),S(b,x),c(s+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of r)H.type===z.Window&&!H.locked&&b.set(H.id,H[n]);const R={name:`Set ${e} for All Windows`,timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{C(R.oldValues)},redo:()=>{y(R.newValue)}};a(R),y(x),c(s+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(t.foundationId){const b=new Map;for(const H of r)H.type===z.Window&&H.foundationId===t.foundationId&&!t.locked&&b.set(H.id,H[n]);const R={name:`Set ${e} for All Windows Above Foundation`,timestamp:Date.now(),oldValues:b,newValue:x,groupId:t.foundationId,undo:()=>{C(R.oldValues)},redo:()=>{A(R.groupId,R.newValue)}};a(R),A(t.foundationId,x),c(s+1)}break}case re.OnlyThisSide:{if(t.parentId){const b=new Map;for(const H of r)H.type===z.Window&&H.parentId===t.parentId&&!H.locked&&b.set(H.id,H[n]);const R={name:`Set ${e} for All Windows On the Same Wall`,timestamp:Date.now(),oldValues:b,newValue:x,groupId:t.parentId,undo:()=>{C(R.oldValues)},redo:()=>{g(t.parentId,R.newValue)}};a(R),g(t.parentId,x),c(s+1)}break}default:{if(t){const b=t[n],R={name:`Set ${e} of Selected window`,timestamp:Date.now(),oldValue:b,newValue:x,changedElementId:t.id,changedElementType:t.type,undo:()=>{p(R.changedElementId,R.oldValue)},redo:()=>{p(R.changedElementId,R.newValue)}};a(R),p(t.id,x),c(s+1)}break}}i(b=>{switch(e){case Qh.Tint:b.actionState.windowTint=x;break;case Qh.MullionColor:b.actionState.windowMullionColor=x;break;case Qh.Color:b.actionState.windowColor=x;break}})}},T=()=>{o()},w=()=>{t[n]!==u&&v(u)};return h.jsx(so,{width:640,title:Y.t(`windowMenu.${e}`,f),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:u??"#73D8FF",onChangeComplete:d})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:x=>M.getState().setWindowActionScope(x.target.value),value:l,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windowMenu.OnlyThisWindow",f)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("windowMenu.AllWindowsOnSurface",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windowMenu.AllWindowsAboveFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windowMenu.AllSelectedWindows",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windowMenu.AllWindows",f)})]})})})]})})},j1o=({window:t,dataType:e,attributeKey:n,setDialogVisible:o})=>{const r=M(Kn),i=M(pn),a=M(En),l=M(MW),s=M(no),c=M(Qn),[u,d]=m.useState(t[n]),f=$t(),p=(x,b)=>{i(R=>{for(const H of R.elements)if(H.id===x&&!H.locked&&H.type===z.Window){H[n]=b;break}})},g=(x,b)=>{i(R=>{for(const H of R.elements)!H.locked&&H.type===z.Window&&H.parentId===x&&(H[n]=b)})},A=(x,b)=>{i(R=>{for(const H of R.elements)!H.locked&&H.type===z.Window&&H.foundationId===x&&(H[n]=b)})},y=x=>{i(b=>{for(const R of b.elements)!R.locked&&R.type===z.Window&&(R[n]=x)})},S=(x,b)=>{i(R=>{for(const H of R.elements)!H.locked&&H.type===z.Window&&x.has(H.id)&&(H[n]=b)})},C=x=>{for(const[b,R]of x.entries())p(b,R)},P=x=>{switch(l){case re.AllSelectedObjectsOfThisType:for(const b of r)if(b.type===z.Window&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&b[n]!==x)return!0;break;case re.AllObjectsOfThisType:for(const b of r)if(b.type===z.Window&&!b.locked&&b[n]!==x)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const b of r)if(b.type===z.Window&&b.foundationId===t.foundationId&&!b.locked&&b[n]!==x)return!0;break;case re.OnlyThisSide:for(const b of r)if(b.type===z.Window&&b.parentId===t.parentId&&!b.locked&&b[n]!==x)return!0;break;default:if(t[n]!==x)return!0;break}return!1},v=x=>{if(t&&P(x))switch(l){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of r)H.type===z.Window&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&b.set(H.id,H[n]);const R={name:`Set ${e} for Selected Windows`,timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{C(R.oldValues)},redo:()=>{S(R.oldValues,R.newValue)}};a(R),S(b,x),c(s+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of r)H.type===z.Window&&!H.locked&&b.set(H.id,H[n]);const R={name:`Set ${e} for All Windows`,timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{C(R.oldValues)},redo:()=>{y(R.newValue)}};a(R),y(x),c(s+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(t.foundationId){const b=new Map;for(const H of r)H.type===z.Window&&H.foundationId===t.foundationId&&!t.locked&&b.set(H.id,H[n]);const R={name:`Set ${e} for All Windows Above Foundation`,timestamp:Date.now(),oldValues:b,newValue:x,groupId:t.foundationId,undo:()=>{C(R.oldValues)},redo:()=>{A(R.groupId,R.newValue)}};a(R),A(t.foundationId,x),c(s+1)}break}case re.OnlyThisSide:{if(t.parentId){const b=new Map;for(const H of r)H.type===z.Window&&H.parentId===t.parentId&&!H.locked&&b.set(H.id,H[n]);const R={name:`Set ${e} for All Windows On the Same Wall`,timestamp:Date.now(),oldValues:b,newValue:x,groupId:t.parentId,undo:()=>{C(R.oldValues)},redo:()=>{g(t.parentId,R.newValue)}};a(R),g(t.parentId,x),c(s+1)}break}default:{if(t){const b=t[n],R={name:`Set ${e} of Selected window`,timestamp:Date.now(),oldValue:b,newValue:x,changedElementId:t.id,changedElementType:t.type,undo:()=>{p(R.changedElementId,R.oldValue)},redo:()=>{p(R.changedElementId,R.newValue)}};a(R),p(t.id,x),c(s+1)}break}}},T=()=>{o()},w=()=>{t[n]!==u&&v(u)};return h.jsx(so,{width:500,title:Y.t(`windowMenu.${e}`,f),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:4,children:h.jsx(vc,{checked:u,onChange:x=>{d(x)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:20,children:h.jsx(Le.Group,{onChange:x=>M.getState().setWindowActionScope(x.target.value),value:l,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windowMenu.OnlyThisWindow",f)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("windowMenu.AllWindowsOnSurface",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windowMenu.AllWindowsAboveFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windowMenu.AllSelectedWindows",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windowMenu.AllWindows",f)})]})})})]})})},{Option:B1o}=Uo,Y1o=({window:t,dataType:e,attributeKey:n,options:o,optionsText:r,setDialogVisible:i})=>{const a=M(Kn),l=M(pn),s=M(En),c=M(MW),u=M(no),d=M(Qn),[f,p]=m.useState(t[n]),g=$t(),A=(R,H)=>{l(F=>{for(const E of F.elements)if(E.id===R){!E.locked&&E.type===z.Window&&(E[n]=H);break}})},y=(R,H)=>{l(F=>{for(const E of F.elements)!E.locked&&E.type===z.Window&&E.parentId===R&&(E[n]=H)})},S=(R,H)=>{l(F=>{for(const E of F.elements)!E.locked&&E.type===z.Window&&E.foundationId===R&&(E[n]=H)})},C=R=>{l(H=>{for(const F of H.elements)!F.locked&&F.type===z.Window&&(F[n]=R)})},P=(R,H)=>{l(F=>{for(const E of F.elements)!E.locked&&E.type===z.Window&&R.has(E.id)&&(E[n]=H)})},v=R=>{for(const[H,F]of R.entries())A(H,F)},T=R=>{if(t){switch(c){case re.AllSelectedObjectsOfThisType:for(const H of a)if(H.type===z.Window&&R!==H[n]&&!H.locked&&M.getState().selectedElementIdSet.has(H.id))return!0;break;case re.AllObjectsOfThisType:for(const H of a)if(H.type===z.Window&&R!==H[n]&&!H.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const H of a)if(H.type===z.Window&&H.foundationId===t.foundationId&&R!==H[n]&&!H.locked)return!0;break;case re.OnlyThisSide:for(const H of a)if(H.type===z.Window&&H.parentId===t.parentId&&R!==H[n]&&!H.locked)return!0;break;default:if(R!==t[n])return!0;break}return!1}},w=R=>{if(t&&T(R)){switch(c){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of a)E.type===z.Window&&!E.locked&&M.getState().selectedElementIdSet.has(E.id)&&H.set(E.id,E[n]);const F={name:`Set ${e} for Selected Windows`,timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{v(F.oldValues)},redo:()=>{P(F.oldValues,F.newValue)}};s(F),P(H,R),d(u+1);break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of a)E.type===z.Window&&!E.locked&&H.set(E.id,E[n]);const F={name:`Set ${e} for All Windows`,timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{v(F.oldValues)},redo:()=>{C(F.newValue)}};s(F),C(R),d(u+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(t.foundationId){const H=new Map;for(const E of a)E.type===z.Window&&E.foundationId===t.foundationId&&!t.locked&&H.set(E.id,E[n]);const F={name:`Set ${e} for All Windows Above Foundation`,timestamp:Date.now(),oldValues:H,newValue:R,groupId:t.foundationId,undo:()=>{v(F.oldValues)},redo:()=>{S(F.groupId,F.newValue)}};s(F),S(t.foundationId,R),d(u+1)}break}case re.OnlyThisSide:{if(t.parentId){const H=new Map;for(const E of a)E.type===z.Window&&E.parentId===t.parentId&&!E.locked&&H.set(E.id,E[n]);const F={name:`Set ${e} for All Windows On the Same Wall`,timestamp:Date.now(),oldValues:H,newValue:R,groupId:t.parentId,undo:()=>{v(F.oldValues)},redo:()=>{y(t.parentId,F.newValue)}};s(F),y(t.parentId,R),d(u+1)}break}default:{if(t){const H=t[n],F={name:`Set ${e} of Selected window`,timestamp:Date.now(),oldValue:H,newValue:R,changedElementId:t.id,changedElementType:t.type,undo:()=>{A(F.changedElementId,F.oldValue)},redo:()=>{A(F.changedElementId,F.newValue)}};s(F),A(t.id,R),d(u+1)}break}}l(H=>{switch(e){case Qh.Tint:H.actionState.windowTint=R;break;case Qh.MullionColor:H.actionState.windowMullionColor=R;break;case Qh.Color:H.actionState.windowColor=R;break}})}},x=()=>{i()},b=()=>{w(f)};return h.jsx(so,{width:560,title:Y.t(`windowMenu.${e}`,g),onApply:b,onClose:x,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:8,children:h.jsx(Uo,{style:{width:"150px"},value:f,onChange:R=>p(R),children:o.map((R,H)=>h.jsx(B1o,{value:R,children:r[H]},R))})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:R=>M.getState().setWindowActionScope(R.target.value),value:c,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windowMenu.OnlyThisWindow",g)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("windowMenu.AllWindowsOnSurface",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windowMenu.AllWindowsAboveFoundation",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windowMenu.AllSelectedWindows",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windowMenu.AllWindows",g)})]})})})]})})};var wg=(t=>(t.Opacity="Opacity",t.Width="Width",t.Height="Height",t.Setback="Setback",t.HorizontalMullionSpacing="HorizontalMullionSpacing",t.VerticalMullionSpacing="VerticalMullionSpacing",t.MullionWidth="MullionWidth",t.SillWidth="SillWidth",t.FrameWidth="FrameWidth",t.ShutterWidth="ShutterWidth",t))(wg||{}),tU=(t=>(t.ShutterColor="ShutterColor",t.Color="Color",t.MullionColor="MullionColor",t.Tint="Tint",t))(tU||{}),$R=(t=>(t.Frame="Frame",t.LeftShutter="LeftShutter",t.RightShutter="RightShutter",t.HorizontalMullion="HorizontalMullion",t.VerticalMullion="VerticalMullion",t))($R||{}),krt=(t=>(t.WindowType="WindowType",t))(krt||{});const A9=({dataType:t,noPadding:e})=>{const n=$t(),[o,r]=m.useState(!1),i=uo(z.Window),a=i?M.getState().getParent(i):null,l=()=>{M.getState().setApplyCount(0),r(!0)},s=Z1o[t];return t===wg.Width?s.range[1]=a&&i&&i.parentType!==z.Roof?2*a.lx*Math.min(Math.abs(.5-i.cx),Math.abs(-.5-i.cx)):100:t===wg.Height&&(s.range[1]=a&&i&&i.parentType!==z.Roof?2*a.lz*Math.min(Math.abs(.5-i.cz),Math.abs(-.5-i.cz)):100),h.jsxs(h.Fragment,{children:[h.jsxs(an,{noPadding:e,onClick:l,children:[Y.t(`windowMenu.${t}`,n)," ..."]}),o&&s&&i&&h.jsx(N1o,{windowModel:i,dataType:t,attributeKey:s.attributeKey,range:s.range,step:s.step,unit:s.unit?Y.t(s.unit,n):void 0,note:s.note?Y.t(s.note,n):void 0,digit:s.digit??0,setDialogVisible:r})]})},yee=({dataType:t,noPadding:e})=>{const[n,o]=m.useState(!1),r=$t(),i=uo(z.Window),a=()=>{M.getState().setApplyCount(0),o(!0)},l=q1o[t];return h.jsxs(h.Fragment,{children:[h.jsxs(an,{noPadding:e,onClick:a,children:[Y.t(`windowMenu.${t}`,r)," ..."]}),n&&l&&i&&h.jsx(U1o,{window:i,dataType:t,attributeKey:l.attributeKey,setDialogVisible:()=>o(!1)})]})},Yk=({dataType:t,noPadding:e})=>{const[n,o]=m.useState(!1),r=$t(),i=uo(z.Window),a=()=>{M.getState().setApplyCount(0),o(!0)},l=$1o[t];return h.jsxs(h.Fragment,{children:[h.jsxs(an,{noPadding:e,onClick:a,children:[Y.t(`windowMenu.${t}`,r)," ..."]}),n&&l&&i&&h.jsx(j1o,{window:i,dataType:t,attributeKey:l.attributeKey,setDialogVisible:()=>o(!1)})]})},O1o=({dataType:t,noPadding:e})=>{const n=$t(),[o,r]=m.useState(!1),i=uo(z.Window),a=()=>{M.getState().setApplyCount(0),r(!0)},l=Q1o[t];return h.jsxs(h.Fragment,{children:[h.jsxs(an,{noPadding:e,onClick:a,children:[Y.t(`windowMenu.${t}`,n)," ..."]}),o&&l&&i&&h.jsx(Y1o,{window:i,dataType:t,attributeKey:l.attributeKey,options:[Ci.Default,Ci.Arched,Ci.Polygonal],optionsText:[Y.t("windowMenu.Default",n),Y.t("windowMenu.Arched",n),Y.t("windowMenu.Polygonal",n)],setDialogVisible:()=>r(!1)})]})},V1o=({window:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.id===r&&l.type===z.Window){l.empty=i;break}})},o=r=>{const i=r.target.checked,a={name:"Empty Window",timestamp:Date.now(),checked:i,selectedElementId:t.id,selectedElementType:t.type,undo:()=>{n(t.id,!a.checked)},redo:()=>{n(t.id,a.checked)}};M.getState().addUndoable(a),n(t.id,i),M.getState().set(l=>{l.actionState.windowEmpty=i})};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:!!t.empty,onChange:o,children:Y.t("windowMenu.Empty",e)})})},_1o=({window:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{for(const l of a.elements)if(l.id===r&&l.type===z.Window){l.interior=i;break}})},o=r=>{const i=r.target.checked,a={name:"Interior Window",timestamp:Date.now(),checked:i,selectedElementId:t.id,selectedElementType:t.type,undo:()=>{n(t.id,!a.checked)},redo:()=>{n(t.id,a.checked)}};M.getState().addUndoable(a),n(t.id,i),M.getState().set(l=>{l.actionState.windowInterior=i})};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:!!t.interior,onChange:o,children:Y.t("windowMenu.Interior",e)})})},G1o=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(MW),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Window),[c,u]=m.useState((s==null?void 0:s.uValue)??X4),[d,f]=m.useState(ye.toUValueInUS(c)),p=$t(),g=(T,w)=>{l(x=>{for(const b of x.elements)if(b.id===T){b.uValue=w;break}})},A=T=>{for(const[w,x]of T.entries())g(w,x)},y=(T,w)=>{for(const x of T.keys())g(x,w)},S=T=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const w of e)if(w.type===z.Window&&T!==w.uValue&&!w.locked&&M.getState().selectedElementIdSet.has(w.id))return!0;break;case re.AllObjectsOfThisType:for(const w of e)if(w.type===z.Window&&T!==w.uValue&&!w.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const w of e)if(w.type===z.Window&&w.foundationId===s.foundationId&&T!==w.uValue&&!w.locked)return!0;break;case re.OnlyThisSide:for(const w of e)if(w.type===z.Window&&w.parentId===s.parentId&&T!==w.uValue&&!w.locked)return!0;break;default:if(T!==(s==null?void 0:s.uValue))return!0;break}return!1}},C=T=>{if(s&&S(T)){switch(o){case re.AllSelectedObjectsOfThisType:{const w=new Map;for(const b of e)if(b.type===z.Window&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)){const R=b;w.set(b.id,R.uValue??X4),g(R.id,T)}const x={name:"Set U-Value for Selected Windows",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1);break}case re.AllObjectsOfThisType:{const w=new Map;for(const b of e)if(b.type===z.Window&&!b.locked){const R=b;w.set(b.id,R.uValue??X4),g(R.id,T)}const x={name:"Set U-Value for All Windows",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(s.foundationId){const w=new Map;for(const b of e)if(b.type===z.Window&&b.foundationId===s.foundationId&&!b.locked){const R=b;w.set(b.id,R.uValue??X4),g(R.id,T)}const x={name:"Set U-Value for All Windows Above Foundation",timestamp:Date.now(),oldValues:w,newValue:T,groupId:s.foundationId,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1)}break}case re.OnlyThisSide:{if(s.parentId){const w=new Map;for(const b of e)if(b.type===z.Window&&b.parentId===s.parentId&&!b.locked){const R=b;w.set(b.id,R.uValue??X4),g(R.id,T)}const x={name:"Set U-Value for All Windows On the Same Wall",timestamp:Date.now(),oldValues:w,newValue:T,groupId:s.parentId,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1)}break}default:{if(s){const x=a(s.id).uValue??s.uValue??X4,b={name:"Set Window U-Value",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:s.id,changedElementType:s.type,undo:()=>{g(b.changedElementId,b.oldValue)},redo:()=>{g(b.changedElementId,b.newValue)}};n(b),g(s.id,T),i(r+1)}break}}l(w=>{w.actionState.windowUValue=T})}},P=()=>{t(!1)},v=()=>{C(c)};return h.jsx(so,{width:550,title:`${Y.t("word.UValue",p)+" "}(${Y.t("word.ThermalTransmittance",p)})`,onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:c,formatter:T=>Number(T).toFixed(2),onChange:T=>{T!==null&&(u(T),f(ye.toUValueInUS(T)))}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [0.01, 100]",h.jsx("br",{}),Y.t("word.SIUnit",p),": W/(m²·℃)"]}),h.jsx("br",{}),h.jsx(Sn,{min:ye.toUValueInUS(.01),max:ye.toUValueInUS(100),style:{width:120},step:.01,precision:2,value:d,formatter:T=>Number(T).toFixed(2),onChange:T=>{T!==null&&(f(T),u(ye.toUValueInSI(T)))}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [",ye.toUValueInUS(.01).toFixed(3),", ",ye.toUValueInUS(100).toFixed(1),"]",h.jsx("br",{}),Y.t("word.USUnit",p),": Btu/(h·ft²·℉)"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:T=>M.getState().setWindowActionScope(T.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windowMenu.OnlyThisWindow",p)}),h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisSide,children:Y.t("windowMenu.AllWindowsOnSurface",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windowMenu.AllWindowsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windowMenu.AllSelectedWindows",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windowMenu.AllWindows",p)})]})})})]})})},X1o=t=>{const e=[];return e.push({key:"window-frame-boolean",label:h.jsx(Yk,{noPadding:!0,dataType:$R.Frame})}),t.frame&&e.push({type:"divider"},{key:"window-frame-width",label:h.jsx(A9,{noPadding:!0,dataType:wg.FrameWidth})},{key:"window-sill-width",label:h.jsx(A9,{noPadding:!0,dataType:wg.SillWidth})},{key:"window-frame-color",label:h.jsx(yee,{noPadding:!0,dataType:tU.Color})}),e},J1o=t=>{const e=[];return e.push({key:"window-horizontal-mullion",label:h.jsx(Yk,{noPadding:!0,dataType:$R.HorizontalMullion})},{key:"window-vertical-mullion",label:h.jsx(Yk,{noPadding:!0,dataType:$R.VerticalMullion})}),(t.horizontalMullion||t.verticalMullion)&&(e.push({type:"divider"},{key:"window-mullion-width",label:h.jsx(A9,{noPadding:!0,dataType:wg.MullionWidth})},{key:"window-mullion-color",label:h.jsx(yee,{noPadding:!0,dataType:tU.MullionColor})}),t.horizontalMullion&&e.push({key:"window-horizontal-mullion-spacing",label:h.jsx(A9,{noPadding:!0,dataType:wg.HorizontalMullionSpacing})}),t.verticalMullion&&e.push({key:"window-vertical-mullion-spacing",label:h.jsx(A9,{noPadding:!0,dataType:wg.VerticalMullionSpacing})})),e},K1o=t=>{const e=[];return e.push({key:"window-left-shutter",label:h.jsx(Yk,{noPadding:!0,dataType:$R.LeftShutter})},{key:"window-right-shutter",label:h.jsx(Yk,{noPadding:!0,dataType:$R.RightShutter})}),(t.leftShutter||t.rightShutter)&&e.push({type:"divider"},{key:"window-shutter-color",label:h.jsx(yee,{noPadding:!0,dataType:tU.ShutterColor})},{key:"window-shutter-width",label:h.jsx(A9,{noPadding:!0,dataType:wg.ShutterWidth})}),e};var Qh=(t=>(t.Color="Color",t.Tint="Tint",t.Opacity="Opacity",t.WindowType="WindowType",t.MullionWidth="MullionWidth",t.HorizontalMullionSpacing="HorizontalMullionSpacing",t.VerticalMullionSpacing="VerticalMullionSpacing",t.MullionColor="MullionColor",t.Frame="Frame",t.FrameWidth="FrameWidth",t.SillWidth="SillWidth",t.Width="Width",t.Height="Height",t))(Qh||{});const q1o={Tint:{attributeKey:"tint"},Color:{attributeKey:"color"},MullionColor:{attributeKey:"mullionColor"},ShutterColor:{attributeKey:"shutterColor"}},$1o={HorizontalMullion:{attributeKey:"horizontalMullion"},VerticalMullion:{attributeKey:"verticalMullion"},Frame:{attributeKey:"frame"},LeftShutter:{attributeKey:"leftShutter"},RightShutter:{attributeKey:"rightShutter"}},Q1o={WindowType:{attributeKey:"windowType",options:[Ci.Default,Ci.Arched,Ci.Polygonal]}},Z1o={Opacity:{attributeKey:"opacity",range:[0,.9],step:.1,note:"windowMenu.SolarHeatGainCoefficient",digit:1},Width:{attributeKey:"lx",range:[.1,100],step:.1,unit:"word.MeterAbbreviation",digit:1},Height:{attributeKey:"lz",range:[.1,100],step:.1,unit:"word.MeterAbbreviation",digit:1},Setback:{attributeKey:"cy",range:[0,1],step:.01,unit:"",digit:0,note:"windowMenu.RelativeToWallThickness"},MullionWidth:{attributeKey:"mullionWidth",range:[0,.5],step:.1,unit:"word.MeterAbbreviation",digit:1},ShutterWidth:{attributeKey:"shutterWidth",range:[0,.5],step:.01,unit:"",digit:1},HorizontalMullionSpacing:{attributeKey:"horizontalMullionSpacing",range:[.1,10],step:.01,unit:"word.MeterAbbreviation",digit:1},VerticalMullionSpacing:{attributeKey:"verticalMullionSpacing",range:[.1,10],step:.01,unit:"word.MeterAbbreviation",digit:1},FrameWidth:{attributeKey:"frameWidth",range:[.05,.2],step:.01,unit:"word.MeterAbbreviation",digit:2},SillWidth:{attributeKey:"sillWidth",range:[0,.5],step:.01,unit:"word.MeterAbbreviation",digit:2}},ego=t=>{const e=[];if(t.type!==z.Window)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language};return e.push({key:"window-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"window-cut",label:h.jsx(kd,{})}),e.push({key:"window-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&e.push({key:"window-empty",label:h.jsx(V1o,{window:n})},{key:"window-interior",label:h.jsx(_1o,{window:n})}),o&&e.push({key:"window-type",label:h.jsx(O1o,{dataType:krt.WindowType})},{key:"window-width",label:h.jsx(A9,{dataType:wg.Width})},{key:"window-height",label:h.jsx(A9,{dataType:wg.Height})},{key:"window-setback",label:h.jsx(A9,{dataType:wg.Setback})},{key:"window-opacity",label:h.jsx(A9,{dataType:wg.Opacity})},{key:"window-tint",label:h.jsx(yee,{dataType:tU.Tint})},{key:"window-u-value",label:h.jsxs(eo,{Dialog:G1o,children:[Y.t("word.UValue",r)," ..."]})},{key:"window-mullion-submenu",label:h.jsx(an,{children:Y.t("windowMenu.Mullion",r)}),children:J1o(n)},{key:"window-frame-submenu",label:h.jsx(an,{children:Y.t("windowMenu.Frame",r)}),children:X1o(n)},{key:"window-shutter-submenu",label:h.jsx(an,{children:Y.t("windowMenu.Shutter",r)}),children:K1o(n)}),{items:e}},tgo=({roof:t})=>{const e=$t(),n=(r,i)=>{M.getState().set(a=>{const l=a.elements.find(s=>s.id===r&&s.type===z.Roof);l&&(l.ceiling=i,a.actionState.roofCeiling=i)})},o=r=>{const i=r.target.checked,a={name:"Roof Ceiling",timestamp:Date.now(),checked:i,selectedElementId:t.id,selectedElementType:t.type,undo:()=>{n(t.id,!a.checked)},redo:()=>{n(t.id,a.checked)}};M.getState().addUndoable(a),n(t.id,i)};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Li,{style:{width:"100%"},checked:t.ceiling,onChange:o,children:Y.t("roofMenu.Ceiling",e)})})},ngo=({roof:t,objectType:e,modalTitle:n,onClickOk:o,children:r})=>{const i=M.getState().removeAllChildElementsByType,a=()=>{const s=M.getState().elements.filter(d=>!d.locked&&d.type===e&&d.parentId===t.id);i(t.id,e);const c=JSON.parse(JSON.stringify(s)),u={name:`Remove All ${e}s on Roof`,timestamp:Date.now(),parentId:t.id,removedElements:c,undo:()=>{M.getState().set(d=>{d.elements.push(...u.removedElements)})},redo:()=>{i(u.parentId,e)}};M.getState().addUndoable(u)},l=()=>{const s=o??a;xi.confirm({title:n,icon:h.jsx(ny,{}),onOk:s})};return h.jsx(an,{update:!0,noPadding:!0,onClick:l,children:r})},WHe=({roof:t,objectType:e,lock:n,children:o})=>{const r=M.getState().updateElementLockById,i=M.getState().updateElementLockByParentId,a=()=>{const l=e.replaceAll(" ",""),s=new Map;for(const d of M.getState().elements)d.parentId===t.id&&d.type===e&&s.set(d.id,!!d.locked);i(t.id,e,n);const u={name:n?`Lock All Unlocked ${l} on Roof`:`Unlock All Locked ${l} on Roof`,timestamp:Date.now(),oldValues:s,newValue:!0,undo:()=>{for(const[d,f]of u.oldValues.entries())r(d,f)},redo:()=>{i(t.id,e,n)}};M.getState().addUndoable(u)};return h.jsx(an,{stayAfterClick:!0,update:!0,noPadding:!0,onClick:a,children:o})},ogo=({roof:t})=>{const e=$t(),n=M.getState().updateRoofStructureById,o=r=>{const i={name:"Select Roof Structure",timestamp:Date.now(),oldValue:t.roofStructure??Ac.Default,newValue:r.target.value,changedElementId:t.id,changedElementType:t.type,undo:()=>{n(i.changedElementId,i.oldValue)},redo:()=>{n(i.changedElementId,i.newValue)}};M.getState().addUndoable(i),n(t.id,r.target.value),M.getState().set(a=>{a.actionState.roofStructure=r.target.value})};return h.jsx(an,{stayAfterClick:!0,noPadding:!0,children:h.jsx(Le.Group,{value:t.roofStructure??Ac.Default,onChange:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:Ac.Default,children:Y.t("roofMenu.DefaultStructure",e)}),h.jsx(Le,{style:{width:"100%"},value:Ac.Rafter,children:Y.t("roofMenu.RafterStructure",e)}),h.jsx(Le,{style:{width:"100%"},value:Ac.Glass,children:Y.t("roofMenu.GlassStructure",e)})]})})})},Kae=[{key:"solarPanelCount",lockedKey:"lockedSolarPanelCount",objectType:z.SolarPanel},{key:"windowCount",lockedKey:"lockedWindowCount",objectType:z.Window},{key:"sensorCount",lockedKey:"lockedSensorCount",objectType:z.Sensor},{key:"outsideLightCount",lockedKey:"lockedLightCount",objectType:z.Light}],rgo=(t,e)=>{const n={lng:M.getState().language};let o="",r="";switch(t){case z.SolarPanel:{o=`${Y.t("roofMenu.RemoveAllUnlockedSolarPanels",n)} (${e})`,r=`${Y.t("roofMenu.DoYouReallyWantToRemoveAllSolarPanelsOnThisRoof",n)} (${e} ${Y.t("roofMenu.SolarPanels",n)})`;break}case z.Window:{o=`${Y.t("roofMenu.RemoveAllUnlockedWindows",n)} (${e})`,r=`${Y.t("roofMenu.DoYouReallyWantToRemoveAllWindowsOnThisRoof",n)} (${e} ${Y.t("roofMenu.Windows",n)})`;break}case z.Sensor:{o=`${Y.t("roofMenu.RemoveAllUnlockedSensors",n)} (${e})`,r=`${Y.t("roofMenu.DoYouReallyWantToRemoveAllSensorsOnThisRoof",n)} (${e} ${Y.t("roofMenu.Sensors",n)})`;break}case z.Light:{o=`${Y.t("roofMenu.RemoveAllUnlockedLights",n)} (${e})`,r=`${Y.t("roofMenu.DoYouReallyWantToRemoveAllLightsOnThisRoof",n)} (${e} ${Y.t("roofMenu.Lights",n)})`;break}}return{itemLabel:o,modalTitle:r}},qae=(t,e,n,o)=>n===z.Light?o?t.lockedLightCount:t.insideLightCount+t.outsideLightCount:t[e],igo=(t,e,n)=>{const o=[],r={lng:M.getState().language};return Kae.forEach(({key:i,objectType:a})=>{const l=qae(n,i,a);if(typeof l=="number"&&l>0){const{itemLabel:s,modalTitle:c}=rgo(a,l),u=a.replaceAll(" ","");o.push({key:`remove-all-${u}s-on-roof`,label:h.jsx(ngo,{roof:t,objectType:a,modalTitle:c,children:s})})}}),Kae.forEach(({key:i,objectType:a})=>{const l=qae(n,i,a);if(typeof l=="number"&&l>0){const s=a.replaceAll(" ","");o.push({key:`lock-all-${s}s-on-roof`,label:h.jsxs(WHe,{roof:t,objectType:a,lock:!0,children:[Y.t(`wallMenu.LockAllUnlocked${s}s`,r)," (",l,")"]})})}}),Kae.forEach(({lockedKey:i,objectType:a})=>{const l=qae(e,i,a,!0);if(typeof l=="number"&&l>0){const s=a.replaceAll(" ","");o.push({key:`unlock-all-${s}s-on-wall`,label:h.jsxs(WHe,{roof:t,objectType:a,lock:!1,children:[Y.t(`wallMenu.UnlockAllLocked${s}s`,r)," (",l,")"]})})}}),e.outsideLightCount>0&&o.push({key:"inside-lights-on-wall",label:h.jsxs(wX,{element:t,inside:!0,children:[Y.t("wallMenu.AllLightsOnWallInside",r)," (",e.outsideLightCount,")"]})}),e.insideLightCount>0&&o.push({key:"outside-lights-on-wall",label:h.jsxs(wX,{element:t,inside:!1,children:[Y.t("wallMenu.AllLightsOnWallOutside",r)," (",e.insideLightCount,")"]})}),o},ago=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(sy),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.thickness)??.4),d=$t(),f=(P,v)=>{l(T=>{for(const w of T.elements)w.id===P&&(w.thickness=v,T.updateElementOnRoofFlag=!0),w.parentId===P&&w.type===z.Window&&(w.ly=v)})},p=P=>{for(const[v,T]of P.entries())f(v,T)},g=(P,v)=>{for(const T of P.keys())f(T,v)},A=P=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.thickness&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.thickness&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of e)if(v.type===z.Roof&&v.foundationId===s.foundationId&&P!==v.thickness&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.thickness))return!0;break}return!1}},y=P=>{if(s&&A(P)){switch(o){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of e)if(w.type===z.Roof&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)){const x=w;v.set(w.id,x.thickness),f(x.id,P)}const T={name:"Set Thickness for Selected Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of e)if(w.type===z.Roof&&!w.locked){const x=w;v.set(w.id,x.thickness),f(x.id,P)}const T={name:"Set Thickness for All Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;for(const w of e)if(w.type===z.Roof&&w.foundationId===s.foundationId&&!w.locked){const x=w;v.set(w.id,x.thickness),f(x.id,P)}const T={name:"Set Thickness for All Roofs Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break;default:if(s){const T=a(s.id).thickness??s.thickness??.4,w={name:"Set Roof Thickness",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};n(w),f(s.id,P),i(r+1)}}l(v=>{v.actionState.roofThickness=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("word.Thickness",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.05,max:1,style:{width:120},step:.01,precision:2,value:c,formatter:P=>Number(P).toFixed(2),onChange:P=>u(P)}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [0.05, 1] ",Y.t("word.MeterAbbreviation",d)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",d)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P=>M.getState().setRoofActionScope(P.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",d)})]})})})]})})},lgo=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(sy),r=M(no),i=M(Qn),a=M(Jn),l=uo(z.Roof),[s,c]=m.useState((l==null?void 0:l.rise)??0),u=$t(),d=(C,P)=>{M.getState().updateRoofRiseById(C,P),M.getState().set(v=>{v.updateElementOnRoofFlag=!0})},f=C=>{for(const[P,v]of C.entries())d(P,v)},p=(C,P)=>{for(const v of C.keys())d(v,P)},g=C=>{if(l){switch(o){case re.AllSelectedObjectsOfThisType:for(const P of e)if(P.type===z.Roof&&C!==P.rise&&!P.locked&&M.getState().selectedElementIdSet.has(P.id))return!0;break;case re.AllObjectsOfThisType:for(const P of e)if(P.type===z.Roof&&C!==P.rise&&!P.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const P of e)if(P.type===z.Roof&&P.foundationId===l.foundationId&&C!==P.rise&&!P.locked)return!0;break;default:if(C!==(l==null?void 0:l.rise))return!0;break}return!1}},A=C=>{if(l&&g(C))switch(M.getState().roofActionScope){case re.AllSelectedObjectsOfThisType:{const P=new Map;for(const T of e)T.type===z.Roof&&!T.locked&&(P.set(T.id,T.rise),d(T.id,C));const v={name:"Set Rise for Selected Roofs",timestamp:Date.now(),oldValues:P,newValue:C,undo:()=>{f(v.oldValues)},redo:()=>{p(v.oldValues,v.newValue)}};n(v),i(r+1);break}case re.AllObjectsOfThisType:{const P=new Map;for(const T of e)T.type===z.Roof&&!T.locked&&(P.set(T.id,T.rise),d(T.id,C));const v={name:"Set Rise for All Roofs",timestamp:Date.now(),oldValues:P,newValue:C,undo:()=>{f(v.oldValues)},redo:()=>{p(v.oldValues,v.newValue)}};n(v),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(l.foundationId){const P=new Map;for(const T of e)T.type===z.Roof&&T.foundationId===l.foundationId&&!T.locked&&(P.set(T.id,T.rise),d(T.id,C));const v={name:"Set Rise for All Roofs Above Foundation",timestamp:Date.now(),oldValues:P,newValue:C,groupId:l.foundationId,undo:()=>{f(v.oldValues)},redo:()=>{p(v.oldValues,v.newValue)}};n(v),i(r+1)}break;default:if(l){const P=a(l.id),v=(P==null?void 0:P.rise)??(l==null?void 0:l.rise)??0,T={name:"Set Roof Rise",timestamp:Date.now(),oldValue:v,newValue:C,changedElementId:l.id,changedElementType:l.type,undo:()=>{d(T.changedElementId,T.oldValue)},redo:()=>{d(T.changedElementId,T.newValue)}};n(T),d(l.id,C),i(r+1)}}},y=()=>{t(!1)},S=()=>{A(s)};return h.jsx(so,{width:550,title:Y.t("roofMenu.Rise",u),onApply:S,onClose:y,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:0,max:200,style:{width:120},step:.1,precision:2,value:s,formatter:C=>Number(C).toFixed(2),onChange:C=>c(C)}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",u),": [0, 200] ",Y.t("word.MeterAbbreviation",u)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",u)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:C=>M.getState().setRoofActionScope(C.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",u)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",u)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",u)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",u)})]})})})]})})},sgo=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(sy),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.rValue)??a8),[d,f]=m.useState(ye.toRValueInUS(c)),p=$t(),g=(T,w)=>{l(x=>{for(const b of x.elements)if(b.id===T){b.rValue=w;break}})},A=T=>{for(const[w,x]of T.entries())g(w,x)},y=(T,w)=>{for(const x of T.keys())g(x,w)},S=T=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const w of e)if(w.type===z.Roof&&T!==w.rValue&&!w.locked&&M.getState().selectedElementIdSet.has(w.id))return!0;break;case re.AllObjectsOfThisType:for(const w of e)if(w.type===z.Roof&&T!==w.rValue&&!w.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const w of e)if(w.type===z.Roof&&w.foundationId===s.foundationId&&T!==w.rValue&&!w.locked)return!0;break;default:if(T!==(s==null?void 0:s.rValue))return!0;break}return!1}},C=T=>{if(s&&S(T)){switch(o){case re.AllSelectedObjectsOfThisType:{const w=new Map;for(const b of e)if(b.type===z.Roof&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)){const R=b;w.set(b.id,R.rValue??a8),g(R.id,T)}const x={name:"Set R-Value for Selected Roofs",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1);break}case re.AllObjectsOfThisType:{const w=new Map;for(const b of e)if(b.type===z.Roof&&!b.locked){const R=b;w.set(b.id,R.rValue??a8),g(R.id,T)}const x={name:"Set R-Value for All Roofs",timestamp:Date.now(),oldValues:w,newValue:T,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const w=new Map;for(const b of e)if(b.type===z.Roof&&b.foundationId===s.foundationId&&!b.locked){const R=b;w.set(b.id,R.rValue??a8),g(R.id,T)}const x={name:"Set R-Value for All Roofs Above Foundation",timestamp:Date.now(),oldValues:w,newValue:T,groupId:s.foundationId,undo:()=>{A(x.oldValues)},redo:()=>{y(x.oldValues,x.newValue)}};n(x),i(r+1)}break;default:if(s){const x=a(s.id).rValue??s.rValue??a8,b={name:"Set Roof R-Value",timestamp:Date.now(),oldValue:x,newValue:T,changedElementId:s.id,changedElementType:s.type,undo:()=>{g(b.changedElementId,b.oldValue)},redo:()=>{g(b.changedElementId,b.newValue)}};n(b),g(s.id,T),i(r+1)}}l(w=>{w.actionState.roofRValue=T})}},P=()=>{t(!1)},v=()=>{C(c)};return h.jsx(so,{width:550,title:`${Y.t("roofMenu.RoofRValue",p)+" "}(${Y.t("word.ThermalResistance",p)})`,onApply:v,onClose:P,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:c,formatter:T=>Number(T).toFixed(2),onChange:T=>{T!==null&&(u(T),f(ye.toRValueInUS(T)))}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [0.01, 100]",h.jsx("br",{}),Y.t("word.SIUnit",p),": m²·℃/W"]}),h.jsx("br",{}),h.jsx(Sn,{min:ye.toRValueInUS(.01),max:ye.toRValueInUS(100),style:{width:120},step:.01,precision:2,value:d,formatter:T=>Number(T).toFixed(2),onChange:T=>{T!==null&&(f(T),u(ye.toRValueInSI(T)))}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [",ye.toRValueInUS(.01).toFixed(3),", ",ye.toRValueInUS(100).toFixed(1),"]",h.jsx("br",{}),Y.t("word.USUnit",p),": h·ft²·℉/Btu"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:T=>M.getState().setRoofActionScope(T.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",p)})]})})})]})})},cgo=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(g3),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.volumetricHeatCapacity)??.5),d=$t(),f=(P,v)=>{l(T=>{for(const w of T.elements)if(w.id===P){w.volumetricHeatCapacity=v;break}})},p=P=>{for(const[v,T]of P.entries())f(v,T)},g=(P,v)=>{for(const T of P.keys())f(T,v)},A=P=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.volumetricHeatCapacity&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.volumetricHeatCapacity&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of e)if(v.type===z.Roof&&v.foundationId===s.foundationId&&P!==v.volumetricHeatCapacity&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.volumetricHeatCapacity))return!0;break}return!1}},y=P=>{if(s&&A(P)){switch(o){case re.AllSelectedObjectsOfThisType:{const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Roof&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)){const b=x;v.set(x.id,b.volumetricHeatCapacity??.5),b.volumetricHeatCapacity=P}});const T={name:"Set Volumetric Heat Capacity for Selected Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisType:{const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Roof&&!x.locked){const b=x;v.set(x.id,b.volumetricHeatCapacity??.5),b.volumetricHeatCapacity=P}});const T={name:"Set Volumetric Heat Capacity for All Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;l(w=>{for(const x of w.elements)if(x.type===z.Roof&&x.foundationId===s.foundationId&&!x.locked){const b=x;v.set(x.id,b.volumetricHeatCapacity??.5),b.volumetricHeatCapacity=P}});const T={name:"Set Volumetric Heat Capacity for All Roofs Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break;default:if(s){const T=a(s.id).volumetricHeatCapacity??s.volumetricHeatCapacity??.5,w={name:"Set Volumetric Heat Capacity of Roof",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};n(w),f(s.id,P),i(r+1)}}l(v=>{v.actionState.roofVolumetricHeatCapacity=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("word.VolumetricHeatCapacity",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:c,formatter:P=>Number(P).toFixed(2),onChange:P=>u(P)}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:["kWh/(m³·℃)",h.jsx("br",{}),h.jsx("br",{}),Y.t("word.Range",d),": [0.01, 100]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P=>M.getState().setRoofActionScope(P.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",d)})]})})})]})})},ugo="/aladdin/assets/roof_edge-DBy_1Q5D.png",dgo="/aladdin/assets/roof_01-BwuyLpwq.png",fgo="/aladdin/assets/roof_02-DAbYjnV7.png",hgo="/aladdin/assets/roof_03-haZGIixv.png",pgo="/aladdin/assets/roof_04-DDuwUcDr.png",ggo="/aladdin/assets/roof_05-CtBb5xIW.png",mgo="/aladdin/assets/roof_06-DuyyebV8.png",ygo="/aladdin/assets/roof_07-DXWGQN8a.png",Ago=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(sy),r=M(no),i=M(Qn),a=M(pn),l=M(Jn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.textureType)??Ur.Default),d=$t(),{Option:f}=Uo,p=(v,T)=>{a(w=>{for(const x of w.elements)if(x.id===v){x.locked||(x.textureType=T);break}})},g=(v,T)=>{for(const w of v.keys())p(w,T)},A=v=>{for(const[T,w]of v.entries())p(T,w)},y=v=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const T of e)if(T.type===z.Roof&&v!==T.textureType&&!T.locked&&M.getState().selectedElementIdSet.has(T.id))return!0;break;case re.AllObjectsOfThisType:for(const T of e)if(T.type===z.Roof&&v!==T.textureType&&!T.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const T of e)if(T.type===z.Roof&&T.foundationId===s.foundationId&&v!==T.textureType&&!T.locked)return!0;break;default:if(v!==(s==null?void 0:s.textureType))return!0;break}return!1}},S=v=>{if(s&&y(v)){switch(o){case re.AllSelectedObjectsOfThisType:{const T=new Map;for(const x of e)x.type===z.Roof&&!x.locked&&M.getState().selectedElementIdSet.has(x.id)&&T.set(x.id,x.textureType??Ur.Default);const w={name:"Set Texture for Selected Roofs",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{A(w.oldValues)},redo:()=>{g(w.oldValues,w.newValue)}};n(w),g(T,v),i(r+1);break}case re.AllObjectsOfThisType:{const T=new Map;for(const x of e)x.type===z.Roof&&!x.locked&&T.set(x.id,x.textureType??Ur.Default);const w={name:"Set Texture for All Roofs",timestamp:Date.now(),oldValues:T,newValue:v,undo:()=>{A(w.oldValues)},redo:()=>{g(w.oldValues,w.newValue)}};n(w),g(T,v),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const T=new Map;for(const x of e)x.type===z.Roof&&x.foundationId===s.foundationId&&!x.locked&&T.set(x.id,x.textureType);const w={name:"Set Texture for All Roofs Above Foundation",timestamp:Date.now(),oldValues:T,newValue:v,groupId:s.foundationId,undo:()=>{A(w.oldValues)},redo:()=>{w.groupId&&g(w.oldValues,w.newValue)}};n(w),g(T,v),i(r+1)}break;default:if(s){const T=l(s.id),w=T?T.textureType:s.textureType,x={name:"Set Texture of Selected Roof",timestamp:Date.now(),oldValue:w,newValue:v,changedElementId:s.id,changedElementType:s.type,undo:()=>{p(x.changedElementId,x.oldValue)},redo:()=>{p(x.changedElementId,x.newValue)}};n(x),p(s.id,v),i(r+1)}}a(T=>{T.actionState.roofTexture=v})}},C=()=>{t(!1)},P=()=>{S(c)};return h.jsx(so,{width:550,title:Y.t("word.Texture",d),onApply:P,onClose:C,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:9,children:h.jsxs(Uo,{style:{width:"150px"},value:c,onChange:v=>u(v),children:[h.jsxs(f,{value:Ur.NoTexture,children:[h.jsx("div",{style:{display:"inline-block",verticalAlign:"middle",marginRight:"12px",width:"32px",height:"20px",border:"1px dashed dimGray"},children:" "}),Y.t("shared.NoTexture",d)]},Ur.NoTexture),h.jsxs(f,{value:Ur.Default,children:[h.jsx("img",{alt:Ur.Default,src:ugo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("roofMenu.TextureDefault",d)]},Ur.Default),h.jsxs(f,{value:Ur.Texture01,children:[h.jsx("img",{alt:Ur.Texture01,src:dgo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("roofMenu.Texture01",d)]},Ur.Texture01),h.jsxs(f,{value:Ur.Texture02,children:[h.jsx("img",{alt:Ur.Texture02,src:fgo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("roofMenu.Texture02",d)]},Ur.Texture02),h.jsxs(f,{value:Ur.Texture03,children:[h.jsx("img",{alt:Ur.Texture03,src:hgo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("roofMenu.Texture03",d)]},Ur.Texture03),h.jsxs(f,{value:Ur.Texture04,children:[h.jsx("img",{alt:Ur.Texture04,src:pgo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("roofMenu.Texture04",d)]},Ur.Texture04),h.jsxs(f,{value:Ur.Texture05,children:[h.jsx("img",{alt:Ur.Texture05,src:ggo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("roofMenu.Texture05",d)]},Ur.Texture05),h.jsxs(f,{value:Ur.Texture06,children:[h.jsx("img",{alt:Ur.Texture06,src:mgo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("roofMenu.Texture06",d)]},Ur.Texture06),h.jsxs(f,{value:Ur.Texture07,children:[h.jsx("img",{alt:Ur.Texture07,src:ygo,height:20,width:40,style:{paddingRight:"8px"}})," ",Y.t("roofMenu.Texture07",d)]},Ur.Texture07)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:15,children:h.jsx(Le.Group,{onChange:v=>M.getState().setRoofActionScope(v.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",d)})]})})})]})})},wgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(sy),i=M(no),a=M(Qn),l=M(Jn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.color)??"#ffffff"),d=$t(),f=(P,v)=>{e(T=>{for(const w of T.elements)if(w.id===P){w.locked||(w.color=v);break}})},p=(P,v)=>{for(const T of P.keys())f(T,v)},g=P=>{for(const[v,T]of P.entries())f(v,T)},A=P=>{if(s){switch(r){case re.AllSelectedObjectsOfThisType:for(const v of n)if(v.type===z.Roof&&P!==v.color&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of n)if(v.type===z.Roof&&P!==v.color&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of n)if(v.type===z.Roof&&v.foundationId===s.foundationId&&P!==v.color&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.color))return!0;break}return!1}},y=P=>{if(s&&A(P)){switch(r){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of n)w.type===z.Roof&&!w.locked&&v.set(w.id,w.color??"#ffffff");const T={name:"Set Color for Selected Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of n)w.type===z.Roof&&!w.locked&&v.set(w.id,w.color??"#ffffff");const T={name:"Set Color for All Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;for(const w of n)w.type===z.Roof&&w.foundationId===s.foundationId&&!s.locked&&v.set(w.id,w.color??"#ffffff");const T={name:"Set Color for All Roofs Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{g(T.oldValues)},redo:()=>{T.groupId&&p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1)}break;default:if(s){const v=l(s.id),T=(v?v.color:s.color)??"#ffffff",w={name:"Set Color of Selected Roof",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};o(w),f(s.id,P),a(i+1)}}e(v=>{v.actionState.roofColor=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:640,title:Y.t("roofMenu.RoofColor",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:c,onChangeComplete:P=>{u(P.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:P=>M.getState().setRoofActionScope(P.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",d)})]})})})]})})},vgo=({setDialogVisible:t})=>{const e=M(Kn),n=M(pn),o=M(En),r=M(sy),i=M(no),a=M(Qn),l=M(Jn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.sideColor)??"#ffffff"),d=$t(),f=(P,v)=>{n(T=>{for(const w of T.elements)if(w.id===P){w.locked||(w.sideColor=v);break}})},p=(P,v)=>{for(const T of P.keys())f(T,v)},g=P=>{for(const[v,T]of P.entries())f(v,T)},A=P=>{if(s){switch(r){case re.AllSelectedObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.sideColor&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.sideColor&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of e)if(v.type===z.Roof&&v.foundationId===s.foundationId&&P!==v.sideColor&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.sideColor))return!0;break}return!1}},y=P=>{if(s&&A(P)){switch(r){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of e)w.type===z.Roof&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)&&v.set(w.id,w.sideColor??"#ffffff");const T={name:"Set Side Color for Selected Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of e)w.type===z.Roof&&!w.locked&&v.set(w.id,w.sideColor??"#ffffff");const T={name:"Set Side Color for All Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;for(const w of e)w.type===z.Roof&&w.foundationId===s.foundationId&&!s.locked&&v.set(w.id,w.sideColor??"#ffffff");const T={name:"Set Side Color for All Roofs Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{g(T.oldValues)},redo:()=>{T.groupId&&p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1)}break;default:if(s){const v=l(s.id),T=(v?v.sideColor:s.sideColor)??"#ffffff",w={name:"Set Side Color of Selected Roof",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};o(w),f(s.id,P),a(i+1)}}n(v=>{v.actionState.roofSideColor=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:640,title:Y.t("roofMenu.RoofSideColor",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:c??(s==null?void 0:s.sideColor)??"#ffffff",onChangeComplete:P=>{u(P.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:P=>M.getState().setRoofActionScope(P.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",d)})]})})})]})})},xgo=({setDialogVisible:t})=>{const e=M(m0),n=M(c3),o=M(En),r=M(sy),i=M(ROe),a=M(no),l=M(Qn),s=M(Xi),c=M(Jn),u=M(pn),d=M(W=>{if(n){for(const k of W.elements)if(k.id===n.id)return k}return null}),[f,p]=m.useState((d==null?void 0:d.ceilingRValue)??w6),[g,A]=m.useState(ye.toRValueInUS(f)),[y,S]=m.useState(!1),[C,P]=m.useState({left:0,top:0,bottom:0,right:0}),v=m.useRef(null),T={lng:e};m.useEffect(()=>{d&&p((d==null?void 0:d.ceilingRValue)??w6)},[d==null?void 0:d.ceilingRValue]);const w=(W,k)=>{u(D=>{for(const L of D.elements)if(L.id===W){L.ceilingRValue=k;break}})},x=W=>{for(const[k,D]of W.entries())w(k,D)},b=(W,k)=>{for(const D of W.keys())w(D,k)},R=W=>{if(d){switch(r){case re.AllObjectsOfThisType:{const k=new Map;u(L=>{for(const j of L.elements)if(j.type===z.Roof&&!j.locked){const B=j;k.set(j.id,B.ceilingRValue??w6),B.ceilingRValue=W}});const D={name:"Set R-Value for All Ceilings",timestamp:Date.now(),oldValues:k,newValue:W,undo:()=>{x(D.oldValues)},redo:()=>{b(D.oldValues,D.newValue)}};o(D),l(a+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(d.foundationId){const k=new Map;u(L=>{for(const j of L.elements)if(j.type===z.Roof&&j.foundationId===d.foundationId&&!j.locked){const B=j;k.set(j.id,B.ceilingRValue??w6),B.ceilingRValue=W}});const D={name:"Set R-Value for All Ceilings Above Foundation",timestamp:Date.now(),oldValues:k,newValue:W,groupId:d.foundationId,undo:()=>{x(D.oldValues)},redo:()=>{b(D.oldValues,D.newValue)}};o(D),l(a+1)}break}default:{if(d){const D=c(d.id).ceilingRValue??d.ceilingRValue??w6,L={name:"Set Ceiling R-Value",timestamp:Date.now(),oldValue:D,newValue:W,changedElementId:d.id,changedElementType:d.type,undo:()=>{w(L.changedElementId,L.oldValue)},redo:()=>{w(L.changedElementId,L.newValue)}};o(L),w(d.id,W),l(a+1)}break}}u(k=>{k.actionState.roofRValue=W})}},H=(W,k)=>{if(v.current){const{clientWidth:D,clientHeight:L}=window.document.documentElement,j=v.current.getBoundingClientRect();P({left:-j.left+k.x,right:D-(j.right-k.x),top:-j.top+k.y,bottom:L-((j==null?void 0:j.bottom)-k.y)})}},F=()=>{p((d==null?void 0:d.ceilingRValue)??w6),t(!1)},E=()=>{F(),s()},N=()=>{R(f),t(!1),l(0)},U=()=>{R(f)};return h.jsx(h.Fragment,{children:h.jsx(xi,{width:550,open:!0,title:h.jsxs("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>S(!0),onMouseOut:()=>S(!1),children:[Y.t("roofMenu.CeilingRValue",T)+" ","(",Y.t("word.ThermalResistance",T),")"]}),footer:[h.jsx(io,{onClick:U,children:Y.t("word.Apply",T)},"Apply"),h.jsx(io,{onClick:E,children:Y.t("word.Cancel",T)},"Cancel"),h.jsx(io,{type:"primary",onClick:N,children:Y.t("word.OK",T)},"OK")],onCancel:F,maskClosable:!1,destroyOnClose:!1,modalRender:W=>h.jsx(Bi,{disabled:!y,bounds:C,onStart:(k,D)=>H(k,D),children:h.jsx("div",{ref:v,children:W})}),children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:.01,max:100,style:{width:120},step:.05,precision:2,value:f,formatter:W=>Number(W).toFixed(2),onChange:W=>{W!==null&&(p(W),A(ye.toRValueInUS(W)))},onPressEnter:N}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",T),": [0.01, 100]",h.jsx("br",{}),Y.t("word.SIUnit",T),": m²·℃/W"]}),h.jsx("br",{}),h.jsx(Sn,{min:ye.toRValueInUS(.01),max:ye.toRValueInUS(100),style:{width:120},step:.01,precision:2,value:g,formatter:W=>Number(W).toFixed(2),onChange:W=>{W!==null&&(A(W),p(ye.toRValueInSI(W)))},onPressEnter:N}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",T),": [",ye.toRValueInUS(.01).toFixed(3),", ",ye.toRValueInUS(100).toFixed(1),"]",h.jsx("br",{}),Y.t("word.USUnit",T),": h·ft²·℉/Btu"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:W=>i(W.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisCeiling",T)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllCeilingsAboveFoundation",T)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllCeilings",T)})]})})})]})})})},bgo=t=>{const e={lng:M.getState().language},n=[];return n.push({key:"roof-ceiling",label:h.jsx(tgo,{roof:t})}),t.ceiling&&n.push({type:"divider"},{key:"ceiling-r-value",label:h.jsxs(eo,{noPadding:!0,Dialog:xgo,children:[Y.t("roofMenu.CeilingRValue",e)," ..."]})}),n},Sgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(En),r=M(sy),i=M(no),a=M(Qn),l=M(Jn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.rafterColor)??"#ffffff"),d=$t(),f=(P,v)=>{e(T=>{for(const w of T.elements)if(w.id===P){w.locked||(w.rafterColor=v);break}})},p=(P,v)=>{for(const T of P.keys())f(T,v)},g=P=>{for(const[v,T]of P.entries())f(v,T)},A=P=>{if(s){switch(r){case re.AllSelectedObjectsOfThisType:for(const v of n)if(v.type===z.Roof&&P!==v.rafterColor&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of n)if(v.type===z.Roof&&P!==v.rafterColor&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of n)if(v.type===z.Roof&&v.foundationId===s.foundationId&&P!==v.rafterColor&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.rafterColor))return!0;break}return!1}},y=P=>{if(s&&A(P))switch(r){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of n)w.type===z.Roof&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)&&v.set(w.id,w.rafterColor??"#ffffff");const T={name:"Set Rafter Color for Selected Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of n)w.type===z.Roof&&!w.locked&&v.set(w.id,w.rafterColor??"#ffffff");const T={name:"Set Rafter Color for All Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{g(T.oldValues)},redo:()=>{p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;for(const w of n)w.type===z.Roof&&w.foundationId===s.foundationId&&!s.locked&&v.set(w.id,w.rafterColor??"#ffffff");const T={name:"Set Rafter Color for All Roofs Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{g(T.oldValues)},redo:()=>{T.groupId&&p(T.oldValues,T.newValue)}};o(T),p(v,P),a(i+1)}break;default:if(s){const v=l(s.id),T=(v?v.rafterColor:s.rafterColor)??"#ffffff",w={name:"Set Rafter Color of Selected Roof",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};o(w),f(s.id,P),a(i+1)}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:640,title:Y.t("roofMenu.RoofColor",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:c,onChangeComplete:P=>{u(P.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:P=>M.getState().setRoofActionScope(P.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",d)})]})})})]})})},Tgo=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(sy),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.rafterSpacing)??1),d=$t(),f=(P,v)=>{l(T=>{for(const w of T.elements)if(w.id===P){w.rafterSpacing=v;break}})},p=P=>{for(const[v,T]of P.entries())f(v,T)},g=(P,v)=>{for(const T of P.keys())f(T,v)},A=P=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.rafterSpacing&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.rafterSpacing&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of e)if(v.type===z.Roof&&v.foundationId===s.foundationId&&P!==v.rafterSpacing&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.rafterSpacing))return!0;break}return!1}},y=P=>{if(s&&A(P))switch(o){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of e)w.type===z.Roof&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)&&(v.set(w.id,w.rafterSpacing??1),f(w.id,P));const T={name:"Set Rafter Spacing for Selected Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of e)w.type===z.Roof&&!w.locked&&(v.set(w.id,w.rafterSpacing??1),f(w.id,P));const T={name:"Set Rafter Spacing for All Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;for(const w of e)w.type===z.Roof&&w.foundationId===s.foundationId&&!w.locked&&(v.set(w.id,w.rafterSpacing??1),f(w.id,P));const T={name:"Set Rafter Spacing for All Roofs Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break;default:if(s){const T=a(s.id).rafterSpacing??s.rafterSpacing??1,w={name:"Set Roof Rafter Spacing",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};n(w),f(s.id,P),i(r+1)}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("roofMenu.RafterSpacing",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:100,style:{width:120},step:.1,precision:2,value:c,formatter:P=>Number(P).toFixed(2),onChange:P=>u(P)}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [0.1, 100] ",Y.t("word.MeterAbbreviation",d)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",d)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P=>M.getState().setRoofActionScope(P.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",d)})]})})})]})})},Pgo=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(sy),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.rafterWidth)??.1),d=$t(),f=(P,v)=>{l(T=>{for(const w of T.elements)if(w.id===P){w.rafterWidth=v;break}})},p=P=>{for(const[v,T]of P.entries())f(v,T)},g=(P,v)=>{for(const T of P.keys())f(T,v)},A=P=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.rafterWidth&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.rafterWidth&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of e)if(v.type===z.Roof&&v.foundationId===s.foundationId&&P!==v.rafterWidth&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.rafterWidth))return!0;break}return!1}},y=P=>{if(s&&A(P))switch(o){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of e)w.type===z.Roof&&!w.locked&&M.getState().selectedElementIdSet.has(w.id)&&(v.set(w.id,w.rafterWidth??.1),f(w.id,P));const T={name:"Set Rafter Width for Selected Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of e)w.type===z.Roof&&!w.locked&&(v.set(w.id,w.rafterWidth??.1),f(w.id,P));const T={name:"Set Rafter Width for All Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;for(const w of e)w.type===z.Roof&&w.foundationId===s.foundationId&&!w.locked&&(v.set(w.id,w.rafterWidth??.1),f(w.id,P));const T={name:"Set Rafter Width for All Roofs Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break;default:if(s){const T=a(s.id).rafterWidth??s.rafterWidth??.1,w={name:"Set Roof Rafter Width",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};n(w),f(s.id,P),i(r+1)}}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("roofMenu.RafterWidth",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.01,max:1,style:{width:120},step:.01,precision:2,value:c,formatter:P=>Number(P).toFixed(2),onChange:P=>u(P)}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [0.01, 1] ",Y.t("word.MeterAbbreviation",d)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",d)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P=>M.getState().setRoofActionScope(P.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",d)})]})})})]})})},Cgo=({setDialogVisible:t})=>{const e=M(pn),n=M(c3),o=M(En),r=M(sy),i=M(ROe),a=M(no),l=M(Qn),s=M(Xi),c=M(Jn),[u,d]=m.useState((n==null?void 0:n.glassTint)??"#73D8FF"),[f,p]=m.useState(!1),[g,A]=m.useState({left:0,top:0,bottom:0,right:0}),y=m.useRef(null),S=m.useRef(null);m.useEffect(()=>{var E;(E=S.current)==null||E.focus()});const C=$t();m.useEffect(()=>{n&&d((n==null?void 0:n.glassTint)??"#73D8FF")},[n]);const P=(E,N)=>{e(U=>{for(const W of U.elements)if(W.id===E){W.locked||(W.glassTint=N);break}})},v=(E,N)=>{for(const U of E.keys())P(U,N)},T=E=>{for(const[N,U]of E.entries())P(N,U)},w=E=>{if(n)switch(r){case re.AllObjectsOfThisType:{const N=new Map;for(const W of M.getState().elements)W.type===z.Roof&&!W.locked&&N.set(W.id,W.glassTint??"#73D8FF");const U={name:"Set Glass Tint for All Roofs",timestamp:Date.now(),oldValues:N,newValue:E,undo:()=>{T(U.oldValues)},redo:()=>{v(U.oldValues,U.newValue)}};o(U),v(N,E),l(a+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(n.foundationId){const N=new Map;for(const W of M.getState().elements)W.type===z.Roof&&W.foundationId===n.foundationId&&!n.locked&&N.set(W.id,W.glassTint??"#73D8FF");const U={name:"Set Glass Tint for All Roofs Above Foundation",timestamp:Date.now(),oldValues:N,newValue:E,groupId:n.foundationId,undo:()=>{T(U.oldValues)},redo:()=>{U.groupId&&v(U.oldValues,U.newValue)}};o(U),v(N,E),l(a+1)}break}default:{if(n){const N=c(n.id),U=(N?N.glassTint:n.glassTint)??"#73D8FF",W={name:"Set Glass Tint of Selected Roof",timestamp:Date.now(),oldValue:U,newValue:E,changedElementId:n.id,changedElementType:n.type,undo:()=>{P(W.changedElementId,W.oldValue)},redo:()=>{P(W.changedElementId,W.newValue)}};o(W),P(n.id,E),l(a+1)}break}}},x=(E,N)=>{if(y.current){const{clientWidth:U,clientHeight:W}=window.document.documentElement,k=y.current.getBoundingClientRect();A({left:-k.left+N.x,right:U-(k.right-N.x),top:-k.top+N.y,bottom:W-((k==null?void 0:k.bottom)-N.y)})}},b=()=>{n!=null&&n.glassTint&&d(n.glassTint),t(!1)},R=()=>{b(),s()},H=()=>{const E=c(n.id);E&&E.glassTint!==u&&w(u),t(!1),l(0)},F=()=>{w(u)};return h.jsx(h.Fragment,{children:h.jsx(xi,{width:640,open:!0,title:h.jsx("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>p(!0),onMouseOut:()=>p(!1),children:Y.t("roofMenu.GlassTint",C)}),footer:[h.jsx(io,{onClick:F,children:Y.t("word.Apply",C)},"Apply"),h.jsx(io,{onClick:R,children:Y.t("word.Cancel",C)},"Cancel"),h.jsx(io,{type:"primary",ref:S,onClick:H,children:Y.t("word.OK",C)},"OK")],onCancel:b,maskClosable:!1,destroyOnClose:!1,modalRender:E=>h.jsx(Bi,{disabled:!f,bounds:g,onStart:(N,U)=>x(N,U),children:h.jsx("div",{ref:y,children:E})}),children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:11,children:h.jsx(Ld,{color:u??(n==null?void 0:n.glassTint)??"#73D8FF",onChangeComplete:E=>{d(E.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:13,children:h.jsx(Le.Group,{onChange:E=>i(E.target.value),value:r,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",C)})]})})})]})})})},Rgo=t=>{const e={lng:M.getState().language},n=[];return n.push({key:"roof-structure-radio-group",label:h.jsx(ogo,{roof:t}),style:{backgroundColor:"white"}}),t.roofStructure===Ac.Rafter&&n.push({type:"divider"},{key:"roof-rafter-spacing",label:h.jsxs(eo,{noPadding:!0,Dialog:Tgo,children:[Y.t("roofMenu.RafterSpacing",e)," ..."]})},{key:"roof-rafter-width",label:h.jsxs(eo,{noPadding:!0,Dialog:Pgo,children:[Y.t("roofMenu.RafterWidth",e)," ..."]})},{key:"roof-rafter-color",label:h.jsxs(eo,{noPadding:!0,Dialog:Sgo,children:[Y.t("roofMenu.RafterColor",e)," ..."]})}),t.roofStructure===Ac.Glass&&n.push({type:"divider"},{key:"roof-glass-tint-selection",label:h.jsxs(eo,{noPadding:!0,Dialog:Cgo,children:[Y.t("roofMenu.GlassTint",e)," ..."]})}),n},Hgo=({setDialogVisible:t})=>{const e=M(Kn),n=M(En),o=M(sy),r=M(no),i=M(Qn),a=M(Jn),l=M(pn),s=uo(z.Roof),[c,u]=m.useState((s==null?void 0:s.opacity)!==void 0?s.opacity:.5),d=$t(),f=(P,v)=>{l(T=>{for(const w of T.elements)if(w.id===P){w.opacity=v;break}})},p=P=>{for(const[v,T]of P.entries())f(v,T)},g=(P,v)=>{for(const T of P.keys())f(T,v)},A=P=>{if(s){switch(o){case re.AllSelectedObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.opacity&&!v.locked&&M.getState().selectedElementIdSet.has(v.id))return!0;break;case re.AllObjectsOfThisType:for(const v of e)if(v.type===z.Roof&&P!==v.opacity&&!v.locked)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const v of e)if(v.type===z.Roof&&v.foundationId===s.foundationId&&P!==v.opacity&&!v.locked)return!0;break;default:if(P!==(s==null?void 0:s.opacity))return!0;break}return!1}},y=P=>{if(s&&A(P)){switch(o){case re.AllSelectedObjectsOfThisType:{const v=new Map;for(const w of e)if(w.type===z.Roof&&!w.locked){const x=w;v.set(w.id,x.opacity),f(x.id,P)}const T={name:"Set Opacity for Selected Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisType:{const v=new Map;for(const w of e)if(w.type===z.Roof&&!w.locked){const x=w;v.set(w.id,x.opacity),f(x.id,P)}const T={name:"Set Opacity for All Roofs",timestamp:Date.now(),oldValues:v,newValue:P,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1);break}case re.AllObjectsOfThisTypeAboveFoundation:if(s.foundationId){const v=new Map;for(const w of e)if(w.type===z.Roof&&w.foundationId===s.foundationId&&!w.locked){const x=w;v.set(w.id,x.opacity),f(x.id,P)}const T={name:"Set Opacity for All Roofs Above Foundation",timestamp:Date.now(),oldValues:v,newValue:P,groupId:s.foundationId,undo:()=>{p(T.oldValues)},redo:()=>{g(T.oldValues,T.newValue)}};n(T),i(r+1)}break;default:if(s){const v=a(s.id),T=v.opacity!==void 0?v.opacity:s.opacity!==void 0?s.opacity:.5,w={name:"Set Roof Opacity",timestamp:Date.now(),oldValue:T,newValue:P,changedElementId:s.id,changedElementType:s.type,undo:()=>{f(w.changedElementId,w.oldValue)},redo:()=>{f(w.changedElementId,w.newValue)}};n(w),f(s.id,P),i(r+1)}}l(v=>{v.actionState.roofGlassOpacity=P})}},S=()=>{t(!1)},C=()=>{y(c)};return h.jsx(so,{width:550,title:Y.t("roofMenu.Opacity",d),onApply:C,onClose:S,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx(Sn,{min:0,max:1,style:{width:120},step:.01,precision:2,value:c,formatter:P=>Number(P).toFixed(2),onChange:P=>u(P)}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",d),": [0, 1]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:P=>M.getState().setRoofActionScope(P.target.value),value:o,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("roofMenu.OnlyThisRoof",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("roofMenu.AllRoofsAboveFoundation",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("roofMenu.AllSelectedRoofs",d)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("roofMenu.AllRoofs",d)})]})})})]})})},Mgo=()=>{const t=M.getState().elementsToPaste;if(t&&t.length>0)switch(t[0].type){case z.Window:case z.SolarPanel:case z.SolarWaterHeater:case z.Sensor:case z.Light:return!0}return!1},Igo=t=>{const e=[];if(t.type!==z.Roof)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language},i=M.getState().countAllOffspringsByTypeAtOnce,a=i(n.id,!0),l=i(n.id,!1),s=n.roofStructure!==Ac.Rafter||n.opacity===void 0||n.opacity>0;return Mgo()&&e.push({key:"roof-paste",label:h.jsx(nM,{})}),e.push({key:"roof-lock",label:h.jsx(Ku,{selectedElement:n})}),n.rise>0&&e.push({key:"roof-ceiling-submenu",label:h.jsx(an,{children:Y.t("roofMenu.Ceiling",r)}),children:bgo(n)}),a.gotSome()&&e.push({key:"lock-unlock-clear-on-roof",label:h.jsx(an,{children:Y.t("word.Elements",r)}),children:igo(n,a,l)}),o&&(n.roofType===Go.Gable&&(e.push({key:"roof-structure-submenu",label:h.jsx(an,{children:Y.t("roofMenu.RoofStructure",r)}),children:Rgo(n)}),(n.roofStructure===Ac.Rafter||n.roofStructure===Ac.Glass)&&e.push({key:"opacity",label:h.jsxs(eo,{Dialog:Hgo,children:[Y.t("roofMenu.Opacity",r)," ..."]})})),e.push({key:"roof-thickness",label:h.jsxs(eo,{Dialog:ago,children:[Y.t(n.roofStructure===Ac.Rafter?"roofMenu.RafterThickness":"word.Thickness",r)," ","..."]})}),e.push({key:"roof-rise",label:h.jsxs(eo,{Dialog:lgo,children:[Y.t("roofMenu.Rise",r)," ..."]})}),s&&(e.push({key:"roof-r-value",label:h.jsxs(eo,{Dialog:sgo,children:[Y.t("roofMenu.RoofRValue",r)," ..."]})},{key:"roof-heat-capacity",label:h.jsxs(eo,{Dialog:cgo,children:[Y.t("word.VolumetricHeatCapacity",r)," ..."]})},{key:"roof-texture",label:h.jsxs(eo,{Dialog:Ago,children:[Y.t("word.Texture",r)," ..."]})}),(n.textureType===Ur.NoTexture||n.textureType===Ur.Default)&&e.push({key:"roof-color",label:h.jsxs(eo,{Dialog:wgo,children:[Y.t("roofMenu.RoofColor",r)," ..."]})}),e.push({key:"roof-side-color",label:h.jsxs(eo,{Dialog:vgo,children:[Y.t("roofMenu.RoofSideColor",r)," ..."]})}))),{items:e}},zgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=uo(z.WindTurbine),[d,f]=m.useState((u==null?void 0:u.relativeYawAngle)??0),p=$t(),g=R=>{a(R.target.value)},A=R=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const H of n)if(H.type===z.WindTurbine&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&Math.abs((H.relativeYawAngle??0)-R)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const H of n)if(H.type===z.WindTurbine&&H.foundationId===(u==null?void 0:u.foundationId)&&!H.locked&&Math.abs((H.relativeYawAngle??0)-R)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const H of n)if(H.type===z.WindTurbine&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&Math.abs((H.relativeYawAngle??0)-R)>Et)return!0;break;default:if(Math.abs(((u==null?void 0:u.relativeYawAngle)??0)-R)>Et)return!0}return!1}},y=(R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&E.id===R&&!E.locked){const N=E;N.relativeYawAngle=H;break}})},S=(R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&E.foundationId===R&&!E.locked){const N=E;N.relativeYawAngle=H}})},C=R=>{e(H=>{for(const F of H.elements)if(F.type===z.WindTurbine&&!F.locked){const E=F;E.relativeYawAngle=R}})},P=(R,H)=>{M.getState().set(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&!E.locked&&R.has(E.id)){const N=E;N.relativeYawAngle=H}})},v=R=>{if(u&&A(R)){switch(i){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(E.id)&&H.set(E.id,E.relativeYawAngle);const F={name:"Set Relative Yaw Angle for Selected Wind Turbines",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{P(F.oldValues,F.newValue)}};r(F),P(H,R),s(l+1);break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.WindTurbine&&H.set(E.id,E.relativeYawAngle);const F={name:"Set Relative Yaw Angle for All Wind Turbines",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{C(F.newValue)}};r(F),C(R),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const H=new Map;for(const E of n)E.type===z.WindTurbine&&E.foundationId===u.foundationId&&H.set(E.id,E.relativeYawAngle);const F={name:"Set Relative Yaw Angle for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:H,newValue:R,groupId:u.foundationId,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{F.groupId&&S(F.groupId,F.newValue)}};r(F),S(u.foundationId,R),s(l+1)}break}default:{const H=o(u.id),F=H?H.relativeYawAngle:u.relativeYawAngle,E={name:"Set Wind Turbine Relative Yaw Angle",timestamp:Date.now(),oldValue:F,newValue:R,changedElementId:u.id,changedElementType:u.type,undo:()=>{y(E.changedElementId,E.oldValue)},redo:()=>{y(E.changedElementId,E.newValue)}};r(E),y(u.id,R),s(l+1);break}}e(H=>{H.actionState.windTurbineRelativeYawAngle=R})}},T=()=>{t(!1)},w=()=>{T(),c()},x=()=>{v(d),t(!1),s(0)},b=()=>{v(d)};return h.jsx(so,{width:550,title:Y.t("windTurbineMenu.RelativeYawAngle",p),onApply:b,onClose:T,onClickCancel:w,onClickOk:x,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:-180,max:180,style:{width:120},precision:2,step:1,value:parseFloat(ye.toDegrees(d).toFixed(2)),formatter:R=>`${R}°`,onChange:R=>{R!==null&&f(ye.toRadians(R))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [-180°, 180°]",h.jsx("br",{}),Y.t("message.SouthFacingIsZero",p),h.jsx("br",{}),Y.t("message.CounterclockwiseAzimuthIsPositive",p)]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:g,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",p)})]})})})]})})},Dgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=uo(z.WindTurbine),[d,f]=m.useState((u==null?void 0:u.numberOfBlades)??3),p=$t(),{Option:g}=Uo,A=H=>{a(H.target.value)},y=H=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const F of n)if(F.type===z.WindTurbine&&!F.locked&&M.getState().selectedElementIdSet.has(F.id)&&Math.abs((F.numberOfBlades??0)-H)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const F of n)if(F.type===z.WindTurbine&&F.foundationId===(u==null?void 0:u.foundationId)&&!F.locked&&Math.abs((F.numberOfBlades??0)-H)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const F of n)if(F.type===z.WindTurbine&&!F.locked&&M.getState().selectedElementIdSet.has(F.id)&&Math.abs((F.numberOfBlades??0)-H)>Et)return!0;break;default:if(Math.abs(((u==null?void 0:u.numberOfBlades)??0)-H)>Et)return!0}return!1}},S=(H,F)=>{e(E=>{for(const N of E.elements)if(N.type===z.WindTurbine&&N.id===H&&!N.locked){const U=N;U.numberOfBlades=F;break}})},C=(H,F)=>{e(E=>{for(const N of E.elements)if(N.type===z.WindTurbine&&N.foundationId===H&&!N.locked){const U=N;U.numberOfBlades=F}})},P=H=>{e(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&!E.locked){const N=E;N.numberOfBlades=H}})},v=(H,F)=>{M.getState().set(E=>{for(const N of E.elements)if(N.type===z.WindTurbine&&!N.locked&&H.has(N.id)){const U=N;U.numberOfBlades=F}})},T=H=>{if(u&&y(H)){switch(i){case re.AllSelectedObjectsOfThisType:{const F=new Map;for(const N of n)N.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(N.id)&&F.set(N.id,N.numberOfBlades??3);const E={name:"Select Blade Number for Selected Wind Turbines",timestamp:Date.now(),oldValues:F,newValue:H,undo:()=>{for(const[N,U]of E.oldValues.entries())S(N,U)},redo:()=>{v(E.oldValues,E.newValue)}};r(E),v(F,H),s(l+1);break}case re.AllObjectsOfThisType:{const F=new Map;for(const N of n)N.type===z.WindTurbine&&F.set(N.id,N.numberOfBlades??3);const E={name:"Select Blade Number for All Wind Turbines",timestamp:Date.now(),oldValues:F,newValue:H,undo:()=>{for(const[N,U]of E.oldValues.entries())S(N,U)},redo:()=>{P(E.newValue)}};r(E),P(H),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const F=new Map;for(const N of n)N.type===z.WindTurbine&&N.foundationId===u.foundationId&&F.set(N.id,N.numberOfBlades??3);const E={name:"Select Blade Number for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:F,newValue:H,groupId:u.foundationId,undo:()=>{for(const[N,U]of E.oldValues.entries())S(N,U)},redo:()=>{E.groupId&&C(E.groupId,E.newValue)}};r(E),C(u.foundationId,H),s(l+1)}break}default:{const F=o(u.id),E=F?F.numberOfBlades??3:u.numberOfBlades??3,N={name:"Select Wind Turbine Blade Number",timestamp:Date.now(),oldValue:E,newValue:H,changedElementId:u.id,changedElementType:u.type,undo:()=>{S(N.changedElementId,N.oldValue)},redo:()=>{S(N.changedElementId,N.newValue)}};r(N),S(u.id,H),s(l+1);break}}e(F=>{F.actionState.windTurbineNumberOfBlades=H})}},w=()=>{t(!1)},x=()=>{w(),c()},b=()=>{T(d),t(!1),s(0)},R=()=>{T(d)};return h.jsx(so,{width:550,title:Y.t("windTurbineMenu.BladeNumber",p),onApply:R,onClose:w,onClickCancel:x,onClickOk:b,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:4,children:h.jsxs(Uo,{style:{width:"60px"},value:d,onChange:H=>{H!==null&&f(H)},children:[h.jsx(g,{value:1,children:"1"},1),h.jsx(g,{value:2,children:"2"},2),h.jsx(g,{value:3,children:"3"},3),h.jsx(g,{value:4,children:"4"},4),h.jsx(g,{value:8,children:"8"},8)]})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:20,children:h.jsx(Le.Group,{onChange:A,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",p)})]})})})]})})},Ego=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=uo(z.WindTurbine),[d,f]=m.useState((u==null?void 0:u.initialRotorAngle)??0),p=$t(),g=R=>{a(R.target.value)},A=R=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const H of n)if(H.type===z.WindTurbine&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&Math.abs((H.initialRotorAngle??0)-R)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const H of n)if(H.type===z.WindTurbine&&H.foundationId===(u==null?void 0:u.foundationId)&&!H.locked&&Math.abs((H.initialRotorAngle??0)-R)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const H of n)if(H.type===z.WindTurbine&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&Math.abs((H.initialRotorAngle??0)-R)>Et)return!0;break;default:if(Math.abs(((u==null?void 0:u.initialRotorAngle)??0)-R)>Et)return!0}return!1}},y=(R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&E.id===R&&!E.locked){const N=E;N.initialRotorAngle=H;break}})},S=(R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&E.foundationId===R&&!E.locked){const N=E;N.initialRotorAngle=H}})},C=R=>{e(H=>{for(const F of H.elements)if(F.type===z.WindTurbine&&!F.locked){const E=F;E.initialRotorAngle=R}})},P=(R,H)=>{M.getState().set(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&!E.locked&&R.has(E.id)){const N=E;N.initialRotorAngle=H}})},v=R=>{if(u&&A(R)){switch(i){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(E.id)&&H.set(E.id,E.initialRotorAngle);const F={name:"Set Rotor Initial Angle for Selected Wind Turbines",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{P(F.oldValues,F.newValue)}};r(F),P(H,R),s(l+1);break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.WindTurbine&&H.set(E.id,E.initialRotorAngle);const F={name:"Set Rotor Initial Angle for All Wind Turbines",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{C(F.newValue)}};r(F),C(R),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const H=new Map;for(const E of n)E.type===z.WindTurbine&&E.foundationId===u.foundationId&&H.set(E.id,E.initialRotorAngle);const F={name:"Set Rotor Initial Angle for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:H,newValue:R,groupId:u.foundationId,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{F.groupId&&S(F.groupId,F.newValue)}};r(F),S(u.foundationId,R),s(l+1)}break}default:{const H=o(u.id),F=H?H.initialRotorAngle:u.initialRotorAngle,E={name:"Set Wind Turbine Rotor Initial Angle",timestamp:Date.now(),oldValue:F,newValue:R,changedElementId:u.id,changedElementType:u.type,undo:()=>{y(E.changedElementId,E.oldValue)},redo:()=>{y(E.changedElementId,E.newValue)}};r(E),y(u.id,R),s(l+1);break}}e(H=>{H.actionState.windTurbineInitialRotorAngle=R})}},T=()=>{t(!1)},w=()=>{T(),c()},x=()=>{v(d),t(!1),s(0)},b=()=>{v(d)};return h.jsx(so,{width:550,title:Y.t("windTurbineMenu.RotorInitialAngle",p),onApply:b,onClose:T,onClickCancel:w,onClickOk:x,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:0,max:360,style:{width:120},precision:1,step:1,value:parseFloat(ye.toDegrees(d).toFixed(2)),formatter:R=>`${R}°`,onChange:R=>{R!==null&&f(ye.toRadians(R))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [0°, 360°]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:g,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",p)})]})})})]})})},Fgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=ye.toRadians(10),d=uo(z.WindTurbine),[f,p]=m.useState((d==null?void 0:d.pitchAngle)??u),g=$t(),A=H=>{a(H.target.value)},y=H=>{if(d){switch(i){case re.AllObjectsOfThisType:for(const F of n)if(F.type===z.WindTurbine&&!F.locked&&M.getState().selectedElementIdSet.has(F.id)&&Math.abs((F.pitchAngle??u)-H)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const F of n)if(F.type===z.WindTurbine&&F.foundationId===(d==null?void 0:d.foundationId)&&!F.locked&&Math.abs((F.pitchAngle??u)-H)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const F of n)if(F.type===z.WindTurbine&&!F.locked&&M.getState().selectedElementIdSet.has(F.id)&&Math.abs((F.pitchAngle??u)-H)>Et)return!0;break;default:if(Math.abs(((d==null?void 0:d.pitchAngle)??u)-H)>Et)return!0}return!1}},S=(H,F)=>{e(E=>{for(const N of E.elements)if(N.type===z.WindTurbine&&N.id===H&&!N.locked){const U=N;U.pitchAngle=F;break}})},C=(H,F)=>{e(E=>{for(const N of E.elements)if(N.type===z.WindTurbine&&N.foundationId===H&&!N.locked){const U=N;U.pitchAngle=F}})},P=H=>{e(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&!E.locked){const N=E;N.pitchAngle=H}})},v=(H,F)=>{M.getState().set(E=>{for(const N of E.elements)if(N.type===z.WindTurbine&&!N.locked&&H.has(N.id)){const U=N;U.pitchAngle=F}})},T=H=>{if(d&&y(H)){switch(i){case re.AllSelectedObjectsOfThisType:{const F=new Map;for(const N of n)N.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(N.id)&&F.set(N.id,N.pitchAngle);const E={name:"Set Pitch Angle for Selected Wind Turbines",timestamp:Date.now(),oldValues:F,newValue:H,undo:()=>{for(const[N,U]of E.oldValues.entries())S(N,U)},redo:()=>{v(E.oldValues,E.newValue)}};r(E),v(F,H),s(l+1);break}case re.AllObjectsOfThisType:{const F=new Map;for(const N of n)N.type===z.WindTurbine&&F.set(N.id,N.pitchAngle);const E={name:"Set Pitch Angle for All Wind Turbines",timestamp:Date.now(),oldValues:F,newValue:H,undo:()=>{for(const[N,U]of E.oldValues.entries())S(N,U)},redo:()=>{P(E.newValue)}};r(E),P(H),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(d.foundationId){const F=new Map;for(const N of n)N.type===z.WindTurbine&&N.foundationId===d.foundationId&&F.set(N.id,N.pitchAngle);const E={name:"Set Pitch Angle for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:F,newValue:H,groupId:d.foundationId,undo:()=>{for(const[N,U]of E.oldValues.entries())S(N,U)},redo:()=>{E.groupId&&C(E.groupId,E.newValue)}};r(E),C(d.foundationId,H),s(l+1)}break}default:{const F=o(d.id),E=F?F.pitchAngle:d.pitchAngle,N={name:"Set Wind Turbine Pitch Angle",timestamp:Date.now(),oldValue:E,newValue:H,changedElementId:d.id,changedElementType:d.type,undo:()=>{S(N.changedElementId,N.oldValue)},redo:()=>{S(N.changedElementId,N.newValue)}};r(N),S(d.id,H),s(l+1);break}}e(F=>{F.actionState.windTurbinePitchAngle=H})}},w=()=>{t(!1)},x=()=>{w(),c()},b=()=>{T(f),t(!1),s(0)},R=()=>{T(f)};return h.jsx(so,{width:550,title:Y.t("windTurbineMenu.RotorBladePitchAngle",g),onApply:R,onClose:w,onClickCancel:x,onClickOk:b,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:-180,max:180,style:{width:120},precision:2,step:1,value:parseFloat(ye.toDegrees(f).toFixed(2)),formatter:H=>`${H}°`,onChange:H=>{H!==null&&p(ye.toRadians(H))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",g),": [-180°, 180°]"]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:A,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",g)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",g)})]})})})]})})},kgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=uo(z.WindTurbine),[d,f]=m.useState((u==null?void 0:u.bladeRadius)??0),p=m.useRef(!1),g=m.useRef(),A=$t(),y=E=>{a(E.target.value)},S=E=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const N of n)if(N.type===z.WindTurbine&&!N.locked&&M.getState().selectedElementIdSet.has(N.id)&&Math.abs(N.bladeRadius-E)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const N of n)if(N.type===z.WindTurbine&&N.foundationId===(u==null?void 0:u.foundationId)&&!N.locked&&Math.abs(N.bladeRadius-E)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const N of n)if(N.type===z.WindTurbine&&!N.locked&&M.getState().selectedElementIdSet.has(N.id)&&Math.abs(N.bladeRadius-E)>Et)return!0;break;default:if(Math.abs((u==null?void 0:u.bladeRadius)-E)>Et)return!0}return!1}},C=(E,N)=>{e(U=>{for(const W of U.elements)if(W.type===z.WindTurbine&&W.id===E&&!W.locked){const k=W;k.bladeRadius=N,k.lx=k.ly=N*2,k.lz=k.towerHeight+N;break}})},P=(E,N)=>{e(U=>{for(const W of U.elements)if(W.type===z.WindTurbine&&W.foundationId===E&&!W.locked){const k=W;k.bladeRadius=N,k.lx=k.ly=N*2,k.lz=k.towerHeight+N}})},v=E=>{e(N=>{for(const U of N.elements)if(U.type===z.WindTurbine&&!U.locked){const W=U;W.bladeRadius=E,W.lx=W.ly=E*2,W.lz=W.towerHeight+E}})},T=(E,N)=>{M.getState().set(U=>{for(const W of U.elements)if(W.type===z.WindTurbine&&!W.locked&&E.has(W.id)){const k=W;k.bladeRadius=N,k.lx=k.ly=N*2,k.lz=k.towerHeight+N}})},w=E=>{if(u&&S(E)){switch(g.current=void 0,i){case re.AllSelectedObjectsOfThisType:{p.current=!1;for(const N of n)if(N.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(N.id)&&N.towerHeight{for(const[W,k]of U.oldValues.entries())C(W,k)},redo:()=>{T(U.oldValues,U.newValue)}};r(U),T(N,E),s(l+1)}break}case re.AllObjectsOfThisType:{p.current=!1;for(const N of n)if(N.type===z.WindTurbine&&N.towerHeight{for(const[W,k]of U.oldValues.entries())C(W,k)},redo:()=>{v(U.newValue)}};r(U),v(E),s(l+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){p.current=!1;for(const N of n)if(N.type===z.WindTurbine&&N.foundationId===u.foundationId&&N.towerHeight{for(const[W,k]of U.oldValues.entries())C(W,k)},redo:()=>{U.groupId&&P(U.groupId,U.newValue)}};r(U),P(u.foundationId,E),s(l+1)}}break}default:{const N=o(u.id),U=N?N.bladeRadius:u.bladeRadius;if(p.current=u.towerHeight{C(W.changedElementId,W.oldValue)},redo:()=>{C(W.changedElementId,W.newValue)}};r(W),C(u.id,E),s(l+1)}break}}e(N=>{N.actionState.windTurbineBladeRadius=E})}},x=()=>{p.current=!1,t(!1)},b=()=>{x(),c()},R=()=>{w(d),p.current||(t(!1),s(0))},H=()=>{w(d)},F=p.current?": "+Y.t("message.NotApplicableToSelectedAction",A)+(g.current!==void 0?" ("+g.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("windTurbineMenu.RotorBladeRadius",A),rejectedMessage:F,onApply:H,onClose:x,onClickCancel:b,onClickOk:R,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:100,style:{width:120},step:.1,precision:1,value:d,onChange:E=>{E!==null&&f(E)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [1, 100] ",Y.t("word.MeterAbbreviation",A)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",A)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",A)})]})})})]})})},Lgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=uo(z.WindTurbine),[d,f]=m.useState((u==null?void 0:u.bladeRootRadius)??.3),[p,g]=m.useState((u==null?void 0:u.maximumChordLength)??1),[A,y]=m.useState((u==null?void 0:u.maximumChordRadius)??3),S=m.useRef(null),C=$t(),P=555;m.useEffect(()=>{if(!S.current||!u)return;const q=S.current.getContext("2d");if(!q)return;const se=S.current.width,Z=S.current.height,ee=20,te=Z*.7;q.clearRect(0,0,se,Z),q.setLineDash([]),q.strokeStyle="gray",q.lineWidth=1,q.rect(0,0,se,Z),q.stroke();const oe=(se-ee*2)/u.bladeRadius,de=oe*u.bladeTipWidth,he=oe*A,pe=oe*p,me=oe*u.bladeRadius,le=oe*d,Te=pe-le,ge=me-he/3,Se=[];Se.push(new Kt(ee,te-le)),Se.push(new Kt(ee+me-ge,te-Te/2)),Se.push(new Kt(ee+he,te-Te)),Se.push(new Kt(ee+me,te+le-de));const De=new Sq(Se).getPoints(50);q.beginPath(),q.moveTo(De[0].x,De[0].y);for(let Ae=1;Ae{a(q.target.value)},T=q=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const se of n)if(se.type===z.WindTurbine&&!se.locked&&M.getState().selectedElementIdSet.has(se.id)&&Math.abs(se.bladeRootRadius-q)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const se of n)if(se.type===z.WindTurbine&&se.foundationId===(u==null?void 0:u.foundationId)&&!se.locked&&Math.abs(se.bladeRootRadius-q)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const se of n)if(se.type===z.WindTurbine&&!se.locked&&M.getState().selectedElementIdSet.has(se.id)&&Math.abs(se.bladeRootRadius-q)>Et)return!0;break;default:if(Math.abs(((u==null?void 0:u.bladeRootRadius)??.3)-q)>Et)return!0}return!1}},w=(q,se)=>{e(Z=>{for(const ee of Z.elements)if(ee.type===z.WindTurbine&&ee.id===q&&!ee.locked){const te=ee;te.bladeRootRadius=se;break}})},x=(q,se)=>{e(Z=>{for(const ee of Z.elements)if(ee.type===z.WindTurbine&&ee.foundationId===q&&!ee.locked){const te=ee;te.bladeRootRadius=se}})},b=q=>{e(se=>{for(const Z of se.elements)if(Z.type===z.WindTurbine&&!Z.locked){const ee=Z;ee.bladeRootRadius=q}})},R=(q,se)=>{M.getState().set(Z=>{for(const ee of Z.elements)if(ee.type===z.WindTurbine&&!ee.locked&&q.has(ee.id)){const te=ee;te.bladeRootRadius=se}})},H=q=>{if(u&&T(q)){switch(i){case re.AllSelectedObjectsOfThisType:{const se=new Map;for(const ee of n)ee.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(ee.id)&&se.set(ee.id,ee.bladeRootRadius);const Z={name:"Set Root Radius for Selected Wind Turbines",timestamp:Date.now(),oldValues:se,newValue:q,undo:()=>{for(const[ee,te]of Z.oldValues.entries())w(ee,te)},redo:()=>{R(Z.oldValues,Z.newValue)}};r(Z),R(se,q),s(l+1);break}case re.AllObjectsOfThisType:{const se=new Map;for(const ee of n)ee.type===z.WindTurbine&&se.set(ee.id,ee.bladeRootRadius);const Z={name:"Set Root Radius for All Wind Turbines",timestamp:Date.now(),oldValues:se,newValue:q,undo:()=>{for(const[ee,te]of Z.oldValues.entries())w(ee,te)},redo:()=>{b(Z.newValue)}};r(Z),b(q),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const se=new Map;for(const ee of n)ee.type===z.WindTurbine&&ee.foundationId===u.foundationId&&se.set(ee.id,ee.bladeRootRadius);const Z={name:"Set Root Radius for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:se,newValue:q,groupId:u.foundationId,undo:()=>{for(const[ee,te]of Z.oldValues.entries())w(ee,te)},redo:()=>{Z.groupId&&x(Z.groupId,Z.newValue)}};r(Z),x(u.foundationId,q),s(l+1)}break}default:{const se=o(u.id),Z=se?se.bladeRootRadius:u.bladeRootRadius,ee={name:"Set Wind Turbine Root Radius",timestamp:Date.now(),oldValue:Z,newValue:q,changedElementId:u.id,changedElementType:u.type,undo:()=>{w(ee.changedElementId,ee.oldValue)},redo:()=>{w(ee.changedElementId,ee.newValue)}};r(ee),w(u.id,q),s(l+1);break}}e(se=>{se.actionState.windTurbineBladeRootRadius=q})}},F=q=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const se of n)if(se.type===z.WindTurbine&&!se.locked&&M.getState().selectedElementIdSet.has(se.id)&&Math.abs(se.maximumChordLength-q)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const se of n)if(se.type===z.WindTurbine&&se.foundationId===(u==null?void 0:u.foundationId)&&!se.locked&&Math.abs(se.maximumChordLength-q)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const se of n)if(se.type===z.WindTurbine&&!se.locked&&M.getState().selectedElementIdSet.has(se.id)&&Math.abs(se.maximumChordLength-q)>Et)return!0;break;default:if(Math.abs((u==null?void 0:u.maximumChordLength)-q)>Et)return!0}return!1}},E=(q,se)=>{e(Z=>{for(const ee of Z.elements)if(ee.type===z.WindTurbine&&ee.id===q&&!ee.locked){const te=ee;te.maximumChordLength=se;break}})},N=(q,se)=>{e(Z=>{for(const ee of Z.elements)if(ee.type===z.WindTurbine&&ee.foundationId===q&&!ee.locked){const te=ee;te.maximumChordLength=se}})},U=q=>{e(se=>{for(const Z of se.elements)if(Z.type===z.WindTurbine&&!Z.locked){const ee=Z;ee.maximumChordLength=q}})},W=(q,se)=>{M.getState().set(Z=>{for(const ee of Z.elements)if(ee.type===z.WindTurbine&&!ee.locked&&q.has(ee.id)){const te=ee;te.maximumChordLength=se}})},k=q=>{if(u&&F(q)){switch(i){case re.AllSelectedObjectsOfThisType:{const se=new Map;for(const ee of n)ee.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(ee.id)&&se.set(ee.id,ee.maximumChordLength);const Z={name:"Set Chord Length for Selected Wind Turbines",timestamp:Date.now(),oldValues:se,newValue:q,undo:()=>{for(const[ee,te]of Z.oldValues.entries())E(ee,te)},redo:()=>{W(Z.oldValues,Z.newValue)}};r(Z),W(se,q),s(l+1);break}case re.AllObjectsOfThisType:{const se=new Map;for(const ee of n)ee.type===z.WindTurbine&&se.set(ee.id,ee.maximumChordLength);const Z={name:"Set Chord Length for All Wind Turbines",timestamp:Date.now(),oldValues:se,newValue:q,undo:()=>{for(const[ee,te]of Z.oldValues.entries())E(ee,te)},redo:()=>{U(Z.newValue)}};r(Z),U(q),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const se=new Map;for(const ee of n)ee.type===z.WindTurbine&&ee.foundationId===u.foundationId&&se.set(ee.id,ee.maximumChordLength);const Z={name:"Set Chord Length for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:se,newValue:q,groupId:u.foundationId,undo:()=>{for(const[ee,te]of Z.oldValues.entries())E(ee,te)},redo:()=>{Z.groupId&&N(Z.groupId,Z.newValue)}};r(Z),N(u.foundationId,q),s(l+1)}break}default:{const se=o(u.id),Z=se?se.maximumChordLength:u.maximumChordLength,ee={name:"Set Wind Turbine Chord Length",timestamp:Date.now(),oldValue:Z,newValue:q,changedElementId:u.id,changedElementType:u.type,undo:()=>{E(ee.changedElementId,ee.oldValue)},redo:()=>{E(ee.changedElementId,ee.newValue)}};r(ee),E(u.id,q),s(l+1);break}}e(se=>{se.actionState.windTurbineBladeMaximumChordLength=q})}},D=q=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const se of n)if(se.type===z.WindTurbine&&!se.locked&&M.getState().selectedElementIdSet.has(se.id)&&Math.abs(se.maximumChordRadius-q)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const se of n)if(se.type===z.WindTurbine&&se.foundationId===(u==null?void 0:u.foundationId)&&!se.locked&&Math.abs(se.maximumChordRadius-q)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const se of n)if(se.type===z.WindTurbine&&!se.locked&&M.getState().selectedElementIdSet.has(se.id)&&Math.abs(se.maximumChordRadius-q)>Et)return!0;break;default:if(Math.abs((u==null?void 0:u.maximumChordRadius)-q)>Et)return!0}return!1}},L=(q,se)=>{e(Z=>{for(const ee of Z.elements)if(ee.type===z.WindTurbine&&ee.id===q&&!ee.locked){const te=ee;te.maximumChordRadius=se;break}})},j=(q,se)=>{e(Z=>{for(const ee of Z.elements)if(ee.type===z.WindTurbine&&ee.foundationId===q&&!ee.locked){const te=ee;te.maximumChordRadius=se}})},B=q=>{e(se=>{for(const Z of se.elements)if(Z.type===z.WindTurbine&&!Z.locked){const ee=Z;ee.maximumChordRadius=q}})},O=(q,se)=>{M.getState().set(Z=>{for(const ee of Z.elements)if(ee.type===z.WindTurbine&&!ee.locked&&q.has(ee.id)){const te=ee;te.maximumChordRadius=se}})},V=q=>{if(u&&D(q)){switch(i){case re.AllSelectedObjectsOfThisType:{const se=new Map;for(const ee of n)ee.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(ee.id)&&se.set(ee.id,ee.maximumChordRadius);const Z={name:"Set Chord Radius for Selected Wind Turbines",timestamp:Date.now(),oldValues:se,newValue:q,undo:()=>{for(const[ee,te]of Z.oldValues.entries())L(ee,te)},redo:()=>{O(Z.oldValues,Z.newValue)}};r(Z),O(se,q),s(l+1);break}case re.AllObjectsOfThisType:{const se=new Map;for(const ee of n)ee.type===z.WindTurbine&&se.set(ee.id,ee.maximumChordRadius);const Z={name:"Set Chord Radius for All Wind Turbines",timestamp:Date.now(),oldValues:se,newValue:q,undo:()=>{for(const[ee,te]of Z.oldValues.entries())L(ee,te)},redo:()=>{B(Z.newValue)}};r(Z),B(q),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const se=new Map;for(const ee of n)ee.type===z.WindTurbine&&ee.foundationId===u.foundationId&&se.set(ee.id,ee.maximumChordRadius);const Z={name:"Set Chord Radius for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:se,newValue:q,groupId:u.foundationId,undo:()=>{for(const[ee,te]of Z.oldValues.entries())L(ee,te)},redo:()=>{Z.groupId&&j(Z.groupId,Z.newValue)}};r(Z),j(u.foundationId,q),s(l+1)}break}default:{const se=o(u.id),Z=se?se.maximumChordRadius:u.maximumChordRadius,ee={name:"Set Wind Turbine Chord Radius",timestamp:Date.now(),oldValue:Z,newValue:q,changedElementId:u.id,changedElementType:u.type,undo:()=>{L(ee.changedElementId,ee.oldValue)},redo:()=>{L(ee.changedElementId,ee.newValue)}};r(ee),L(u.id,q),s(l+1);break}}e(se=>{se.actionState.windTurbineBladeMaximumChordRadius=q})}},G=()=>{t(!1)},Q=()=>{G(),c()},$=()=>{k(p),V(A),H(d),t(!1),s(0)},ie=()=>{k(p),V(A),H(d)};return h.jsxs(so,{width:600,title:Y.t("windTurbineMenu.RotorBladeDesign",C),onApply:ie,onClose:G,onClickCancel:Q,onClickOk:$,children:[h.jsx(nn,{children:h.jsx(Ke,{span:24,children:h.jsx("canvas",{ref:S,id:"blade-design-canvas",width:P,height:P*.25,style:{paddingBottom:"12px"}})})}),h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:8,children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"8px"},children:[h.jsx(Ke,{style:{textAlign:"center",fontStyle:"italic"},children:"A: "}),h.jsx(Ke,{children:h.jsx(Sn,{min:.1,max:1,style:{width:"70px"},step:.01,precision:2,value:d,onChange:q=>{q&&f(q)}})}),h.jsxs(Ke,{style:{paddingTop:"5px",textAlign:"left",fontSize:"11px"},children:["[0.1, 1] ",Y.t("word.MeterAbbreviation",C)]})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"8px"},children:[h.jsx(Ke,{style:{textAlign:"center",fontStyle:"italic"},children:"C: "}),h.jsx(Ke,{children:h.jsx(Sn,{min:.5,max:2,style:{width:"70px"},step:.01,precision:2,value:p,onChange:q=>{q&&g(q)}})}),h.jsxs(Ke,{style:{paddingTop:"5px",textAlign:"left",fontSize:"11px"},children:["[0.5, 2] ",Y.t("word.MeterAbbreviation",C)]})]}),h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{style:{textAlign:"center",fontStyle:"italic"},children:"D:"}),h.jsx(Ke,{children:h.jsx(Sn,{min:2,max:((u==null?void 0:u.bladeRadius)??10)/2,style:{width:70},step:.01,precision:2,value:A,onChange:q=>{q&&y(q)}})}),h.jsxs(Ke,{style:{paddingTop:"5px",textAlign:"left",fontSize:"11px"},children:["[2, ",((u==null?void 0:u.bladeRadius)??10)/2,"] ",Y.t("word.MeterAbbreviation",C)]})]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:v,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",C)})]})})})]})]})},Wgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=uo(z.WindTurbine),[d,f]=m.useState((u==null?void 0:u.hubRadius)??0),[p,g]=m.useState((u==null?void 0:u.hubLength)??0),A=$t(),y=F=>{a(F.target.value)},S=(F,E)=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const N of n)if(N.type===z.WindTurbine&&!N.locked&&M.getState().selectedElementIdSet.has(N.id)){const U=N;if(Math.abs(U.hubRadius-F)>Et||Math.abs(U.hubLength-E)>Et)return!0}break;case re.AllObjectsOfThisTypeAboveFoundation:for(const N of n)if(N.type===z.WindTurbine&&N.foundationId===(u==null?void 0:u.foundationId)&&!N.locked){const U=N;if(Math.abs(U.hubRadius-F)>Et||Math.abs(U.hubLength-E)>Et)return!0}break;case re.AllSelectedObjectsOfThisType:for(const N of n)if(N.type===z.WindTurbine&&!N.locked&&M.getState().selectedElementIdSet.has(N.id)){const U=N;if(Math.abs(U.hubRadius-F)>Et||Math.abs(U.hubLength-E)>Et)return!0}break;default:if(Math.abs((u==null?void 0:u.hubRadius)-F)>Et||Math.abs((u==null?void 0:u.hubLength)-E)>Et)return!0}return!1}},C=(F,E)=>{e(N=>{for(const U of N.elements)if(U.type===z.WindTurbine&&U.id===F&&!U.locked){const W=U;W.hubRadius=E[0],W.hubLength=E[1];break}})},P=(F,E)=>{e(N=>{for(const U of N.elements)if(U.type===z.WindTurbine&&U.foundationId===F&&!U.locked){const W=U;W.hubRadius=E[0],W.hubLength=E[1]}})},v=F=>{e(E=>{for(const N of E.elements)if(N.type===z.WindTurbine&&!N.locked){const U=N;U.hubRadius=F[0],U.hubLength=F[1]}})},T=(F,E)=>{M.getState().set(N=>{for(const U of N.elements)if(U.type===z.WindTurbine&&!U.locked&&F.has(U.id)){const W=U;W.hubRadius=E[0],W.hubLength=E[1]}})},w=F=>{if(u&&S(F[0],F[1])){switch(i){case re.AllSelectedObjectsOfThisType:{const E=new Map;for(const U of n)if(U.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(U.id)){const W=U;E.set(U.id,[W.hubRadius,W.hubLength])}const N={name:"Set Hub Parameters for Selected Wind Turbines",timestamp:Date.now(),oldValues:E,newValue:F,undo:()=>{for(const[U,W]of N.oldValues.entries())C(U,W)},redo:()=>{T(N.oldValues,N.newValue)}};r(N),T(E,F),s(l+1);break}case re.AllObjectsOfThisType:{const E=new Map;for(const U of n)if(U.type===z.WindTurbine){const W=U;E.set(U.id,[W.hubRadius,W.hubLength])}const N={name:"Set Hub Parameters for All Wind Turbines",timestamp:Date.now(),oldValues:E,newValue:F,undo:()=>{for(const[U,W]of N.oldValues.entries())C(U,W)},redo:()=>{v(N.newValue)}};r(N),v(F),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const E=new Map;for(const U of n)if(U.type===z.WindTurbine&&U.foundationId===u.foundationId){const W=U;E.set(U.id,[W.hubRadius,W.hubLength])}const N={name:"Set Hub Parameters for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:E,newValue:F,groupId:u.foundationId,undo:()=>{for(const[U,W]of N.oldValues.entries())C(U,W)},redo:()=>{N.groupId&&P(N.groupId,N.newValue)}};r(N),P(u.foundationId,F),s(l+1)}break}default:{const E=o(u.id),N=E?E.hubRadius:u.hubRadius,U=E?E.hubLength:u.hubLength,W={name:"Set Wind Turbine Hub Parameters",timestamp:Date.now(),oldValue:[N,U],newValue:F,changedElementId:u.id,changedElementType:u.type,undo:()=>{C(W.changedElementId,W.oldValue)},redo:()=>{C(W.changedElementId,W.newValue)}};r(W),C(u.id,F),s(l+1);break}}e(E=>{E.actionState.windTurbineHubRadius=F[0],E.actionState.windTurbineHubLength=F[1]})}},x=()=>{t(!1)},b=()=>{x(),c()},R=()=>{w([d,p]),t(!1),s(0)},H=()=>{w([d,p])};return h.jsx(so,{width:550,title:Y.t("windTurbineMenu.HubDesign",A),onApply:H,onClose:x,onClickCancel:b,onClickOk:R,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:7,children:[h.jsx("div",{style:{marginTop:"-20px",textAlign:"left",fontSize:"12px"},children:Y.t("windTurbineMenu.HubRadius",A)}),h.jsx(Sn,{min:.5,max:5,style:{width:120},step:.01,precision:2,value:d,onChange:F=>{F!==null&&f(F)}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [0.5, 5] ",Y.t("word.MeterAbbreviation",A)]}),h.jsx("div",{style:{paddingTop:"10px",textAlign:"left",fontSize:"12px"},children:Y.t("windTurbineMenu.HubLength",A)}),h.jsx(Sn,{min:1,max:10,style:{width:120},step:.01,precision:2,value:p,onChange:F=>{F!==null&&g(F)}}),h.jsxs("div",{style:{paddingTop:"4px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [1, 10] ",Y.t("word.MeterAbbreviation",A)]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",A)})]})})})]})})},Ngo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=uo(z.WindTurbine),[d,f]=m.useState((u==null?void 0:u.birdSafe)??uc.None),[p,g]=m.useState((u==null?void 0:u.bladeColor)??t9),[A,y]=m.useState((u==null?void 0:u.stripeColor)??n9),S=$t(),{Option:C}=Uo,P=U=>{a(U.target.value)},v=(U,W,k)=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const D of n)if(D.type===z.WindTurbine&&!D.locked&&M.getState().selectedElementIdSet.has(D.id)){const L=D;if((L.birdSafe??uc.None)!==U||(L.bladeColor??t9)!==W||(L.stripeColor??n9)!==k)return!0}break;case re.AllObjectsOfThisTypeAboveFoundation:for(const D of n)if(D.type===z.WindTurbine&&D.foundationId===(u==null?void 0:u.foundationId)&&!D.locked){const L=D;if((L.birdSafe??uc.None)!==U||(L.bladeColor??t9)!==W||(L.stripeColor??n9)!==k)return!0}break;case re.AllSelectedObjectsOfThisType:for(const D of n)if(D.type===z.WindTurbine&&!D.locked&&M.getState().selectedElementIdSet.has(D.id)){const L=D;if((L.birdSafe??uc.None)!==U||(L.bladeColor??t9)!==W||(L.stripeColor??n9)!==k)return!0}break;default:if((u.birdSafe??uc.None)!==U||(u.bladeColor??t9)!==W||(u.stripeColor??n9)!==k)return!0}return!1}},T=(U,W,k,D)=>{e(L=>{for(const j of L.elements)if(j.type===z.WindTurbine&&j.id===U&&!j.locked){const B=j;B.birdSafe=W,B.bladeColor=k,B.stripeColor=D;break}})},w=(U,W,k,D)=>{e(L=>{for(const j of L.elements)if(j.type===z.WindTurbine&&j.foundationId===U&&!j.locked){const B=j;B.birdSafe=W,B.bladeColor=k,B.stripeColor=D}})},x=(U,W,k)=>{e(D=>{for(const L of D.elements)if(L.type===z.WindTurbine&&!L.locked){const j=L;j.birdSafe=U,j.bladeColor=W,j.stripeColor=k}})},b=(U,W,k,D)=>{M.getState().set(L=>{for(const j of L.elements)if(j.type===z.WindTurbine&&!j.locked&&U.has(j.id)){const B=j;B.birdSafe=W,B.bladeColor=k,B.stripeColor=D}})},R=(U,W,k)=>{if(u&&v(U,W,k)){switch(i){case re.AllSelectedObjectsOfThisType:{const D=new Map;for(const j of n)if(j.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(j.id)){const B=j;D.set(j.id,[(B.birdSafe??uc.None).toString(),B.bladeColor,B.stripeColor])}const L={name:"Select Bird-Safe Design for Selected Wind Turbines",timestamp:Date.now(),oldValues:D,newValue:[U.toString(),W,k],undo:()=>{for(const[j,B]of L.oldValues.entries()){const O=B;T(j,Number(O[0]),O[1],O[2])}},redo:()=>{const j=L.newValue;b(L.oldValues,Number(j[0]),j[1],j[2])}};r(L),b(D,U,W,k),s(l+1);break}case re.AllObjectsOfThisType:{const D=new Map;for(const j of n)if(j.type===z.WindTurbine){const B=j;D.set(j.id,[(B.birdSafe??uc.None).toString(),B.bladeColor,B.stripeColor])}const L={name:"Select Bird-Safe Design for All Wind Turbines",timestamp:Date.now(),oldValues:D,newValue:[U.toString(),W,k],undo:()=>{for(const[j,B]of L.oldValues.entries()){const O=B;T(j,Number(O[0]),O[1],O[2])}},redo:()=>{const j=L.newValue;x(Number(j[0]),j[1],j[2])}};r(L),x(U,W,k),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const D=new Map;for(const j of n)if(j.type===z.WindTurbine&&j.foundationId===u.foundationId){const B=j;D.set(j.id,[(B.birdSafe??uc.None).toString(),B.bladeColor,B.stripeColor])}const L={name:"Select Bird-Safe Design for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:D,newValue:[U.toString(),W,k],groupId:u.foundationId,undo:()=>{for(const[j,B]of L.oldValues.entries()){const O=B;T(j,Number(O[0]),O[1],O[2])}},redo:()=>{if(L.groupId){const j=L.newValue;w(L.groupId,Number(j[0]),j[1],j[2])}}};r(L),w(u.foundationId,U,W,k),s(l+1)}break}default:{const D=o(u.id),L=D?D.birdSafe??uc.None:u.birdSafe??uc.None,j=D?D.bladeColor??t9:u.bladeColor??t9,B=D?D.stripeColor??n9:u.stripeColor??n9,O=[L.toString(),j,B],V={name:"Select Bird-Safe Design for Wind Turbine",timestamp:Date.now(),oldValue:O,newValue:[U.toString(),W,k],changedElementId:u.id,changedElementType:u.type,undo:()=>{const G=V.oldValue;T(V.changedElementId,Number(G[0]),G[1],G[2])},redo:()=>{T(V.changedElementId,U,W,k)}};r(V),T(u.id,U,W,k),s(l+1);break}}e(D=>{D.actionState.windTurbineBirdSafeDesign=U,D.actionState.windTurbineBladeColor=W,D.actionState.windTurbineStripeColor=k})}},H=()=>{t(!1)},F=()=>{H(),c()},E=()=>{R(d,p,A),t(!1),s(0)},N=()=>{R(d,p,A)};return h.jsx(so,{width:600,title:Y.t("windTurbineMenu.BirdSafeDesign",S),onApply:N,onClose:H,onClickCancel:F,onClickOk:E,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:8,children:[h.jsxs("span",{children:[Y.t("word.Pattern",S),": "]}),h.jsxs(Uo,{style:{width:"116px"},value:d,onChange:U=>{U!==null&&f(U)},children:[h.jsx(C,{value:uc.None,children:Y.t("windTurbineMenu.BirdSafeNone",S)},uc.None),h.jsx(C,{value:uc.Bicolor,children:Y.t("windTurbineMenu.BirdSafeBicolor",S)},uc.Bicolor),h.jsx(C,{value:uc.Striped,children:Y.t("windTurbineMenu.BirdSafeStriped",S)},uc.Striped)]}),h.jsxs("div",{style:{marginTop:"10px"},children:[h.jsxs("span",{children:[Y.t("word.Color",S)," 1: "]}),h.jsx("input",{type:"color",value:p,onChange:U=>{g(U.target.value)}})]}),h.jsxs("div",{style:{marginTop:"10px"},children:[h.jsxs("span",{children:[Y.t("word.Color",S)," 2: "]}),h.jsx("input",{type:"color",value:A,onChange:U=>{y(U.target.value)}})]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:16,children:h.jsx(Le.Group,{onChange:P,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",S)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",S)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",S)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",S)})]})})})]})})},Ugo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=uo(z.WindTurbine),[d,f]=m.useState((u==null?void 0:u.towerHeight)??0),p=m.useRef(!1),g=m.useRef(),A=$t(),y=E=>{a(E.target.value)},S=E=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const N of n)if(N.type===z.WindTurbine&&!N.locked&&M.getState().selectedElementIdSet.has(N.id)&&Math.abs(N.towerHeight-E)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const N of n)if(N.type===z.WindTurbine&&N.foundationId===(u==null?void 0:u.foundationId)&&!N.locked&&Math.abs(N.towerHeight-E)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const N of n)if(N.type===z.WindTurbine&&!N.locked&&M.getState().selectedElementIdSet.has(N.id)&&Math.abs(N.towerHeight-E)>Et)return!0;break;default:if(Math.abs((u==null?void 0:u.towerHeight)-E)>Et)return!0}return!1}},C=(E,N)=>{e(U=>{for(const W of U.elements)if(W.type===z.WindTurbine&&W.id===E&&!W.locked){const k=W;k.towerHeight=N,k.lz=N+k.bladeRadius;break}})},P=(E,N)=>{e(U=>{for(const W of U.elements)if(W.type===z.WindTurbine&&W.foundationId===E&&!W.locked){const k=W;k.towerHeight=N,k.lz=N+k.bladeRadius}})},v=E=>{e(N=>{for(const U of N.elements)if(U.type===z.WindTurbine&&!U.locked){const W=U;W.towerHeight=E,W.lz=E+W.bladeRadius}})},T=(E,N)=>{M.getState().set(U=>{for(const W of U.elements)if(W.type===z.WindTurbine&&!W.locked&&E.has(W.id)){const k=W;k.towerHeight=N,k.lz=N+k.bladeRadius}})},w=E=>{if(u&&S(E)){switch(g.current=void 0,i){case re.AllSelectedObjectsOfThisType:{p.current=!1;for(const N of n)if(N.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(N.id)&&N.bladeRadius>E){p.current=!0;break}if(p.current)g.current=E,f(u.towerHeight);else{const N=new Map;for(const W of n)W.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(W.id)&&N.set(W.id,W.towerHeight);const U={name:"Set Tower Height for Selected Wind Turbines",timestamp:Date.now(),oldValues:N,newValue:E,undo:()=>{for(const[W,k]of U.oldValues.entries())C(W,k)},redo:()=>{T(U.oldValues,U.newValue)}};r(U),T(N,E),s(l+1)}break}case re.AllObjectsOfThisType:{p.current=!1;for(const N of n)if(N.type===z.WindTurbine&&N.bladeRadius>E){p.current=!0;break}if(p.current)g.current=E,f(u.towerHeight);else{const N=new Map;for(const W of n)W.type===z.WindTurbine&&N.set(W.id,W.towerHeight);const U={name:"Set Tower Height for All Wind Turbines",timestamp:Date.now(),oldValues:N,newValue:E,undo:()=>{for(const[W,k]of U.oldValues.entries())C(W,k)},redo:()=>{v(U.newValue)}};r(U),v(E),s(l+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){p.current=!1;for(const N of n)if(N.type===z.WindTurbine&&N.foundationId===u.foundationId&&N.bladeRadius>E){p.current=!0;break}if(p.current)g.current=E,f(u.towerHeight);else{const N=new Map;for(const W of n)W.type===z.WindTurbine&&W.foundationId===u.foundationId&&N.set(W.id,W.towerHeight);const U={name:"Set Tower Height for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:N,newValue:E,groupId:u.foundationId,undo:()=>{for(const[W,k]of U.oldValues.entries())C(W,k)},redo:()=>{U.groupId&&P(U.groupId,U.newValue)}};r(U),P(u.foundationId,E),s(l+1)}}break}default:{const N=o(u.id),U=N?N.towerHeight:u.towerHeight;if(p.current=u.bladeRadius>E,p.current)g.current=E,f(U);else{const W={name:"Set Wind Turbine Tower Height",timestamp:Date.now(),oldValue:U,newValue:E,changedElementId:u.id,changedElementType:u.type,undo:()=>{C(W.changedElementId,W.oldValue)},redo:()=>{C(W.changedElementId,W.newValue)}};r(W),C(u.id,E),s(l+1)}break}}e(N=>{N.actionState.windTurbineTowerHeight=E})}},x=()=>{p.current=!1,t(!1)},b=()=>{x(),c()},R=()=>{w(d),p.current||(t(!1),s(0))},H=()=>{w(d)},F=p.current?": "+Y.t("message.NotApplicableToSelectedAction",A)+(g.current!==void 0?" ("+g.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("windTurbineMenu.TowerHeight",A),rejectedMessage:F,onApply:H,onClose:x,onClickCancel:b,onClickOk:R,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:1,max:100,style:{width:120},step:.1,precision:1,value:d,onChange:E=>{E!==null&&f(E)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",A),": [1, 100] ",Y.t("word.MeterAbbreviation",A)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",A)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:y,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",A)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",A)})]})})})]})})},jgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(En),i=M(f3),a=M(h3),l=M(no),s=M(Qn),c=M(Xi),u=uo(z.WindTurbine),[d,f]=m.useState((u==null?void 0:u.towerRadius)??0),p=$t(),g=R=>{a(R.target.value)},A=R=>{if(u){switch(i){case re.AllObjectsOfThisType:for(const H of n)if(H.type===z.WindTurbine&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&Math.abs(H.towerRadius-R)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const H of n)if(H.type===z.WindTurbine&&H.foundationId===(u==null?void 0:u.foundationId)&&!H.locked&&Math.abs(H.towerRadius-R)>Et)return!0;break;case re.AllSelectedObjectsOfThisType:for(const H of n)if(H.type===z.WindTurbine&&!H.locked&&M.getState().selectedElementIdSet.has(H.id)&&Math.abs(H.towerRadius-R)>Et)return!0;break;default:if(Math.abs((u==null?void 0:u.towerRadius)-R)>Et)return!0}return!1}},y=(R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&E.id===R&&!E.locked){const N=E;N.towerRadius=H;break}})},S=(R,H)=>{e(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&E.foundationId===R&&!E.locked){const N=E;N.towerRadius=H}})},C=R=>{e(H=>{for(const F of H.elements)if(F.type===z.WindTurbine&&!F.locked){const E=F;E.towerRadius=R}})},P=(R,H)=>{M.getState().set(F=>{for(const E of F.elements)if(E.type===z.WindTurbine&&!E.locked&&R.has(E.id)){const N=E;N.towerRadius=H}})},v=R=>{if(u&&A(R)){switch(i){case re.AllSelectedObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.WindTurbine&&M.getState().selectedElementIdSet.has(E.id)&&H.set(E.id,E.towerRadius);const F={name:"Set Tower Radius for Selected Wind Turbines",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{P(F.oldValues,F.newValue)}};r(F),P(H,R),s(l+1);break}case re.AllObjectsOfThisType:{const H=new Map;for(const E of n)E.type===z.WindTurbine&&H.set(E.id,E.towerRadius);const F={name:"Set Tower Radius for All Wind Turbines",timestamp:Date.now(),oldValues:H,newValue:R,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{C(F.newValue)}};r(F),C(R),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(u.foundationId){const H=new Map;for(const E of n)E.type===z.WindTurbine&&E.foundationId===u.foundationId&&H.set(E.id,E.towerRadius);const F={name:"Set Tower Radius for All Wind Turbines Above Foundation",timestamp:Date.now(),oldValues:H,newValue:R,groupId:u.foundationId,undo:()=>{for(const[E,N]of F.oldValues.entries())y(E,N)},redo:()=>{F.groupId&&S(F.groupId,F.newValue)}};r(F),S(u.foundationId,R),s(l+1)}break}default:{const H=o(u.id),F=H?H.towerRadius:u.towerRadius,E={name:"Set Wind Turbine Tower Radius",timestamp:Date.now(),oldValue:F,newValue:R,changedElementId:u.id,changedElementType:u.type,undo:()=>{y(E.changedElementId,E.oldValue)},redo:()=>{y(E.changedElementId,E.newValue)}};r(E),y(u.id,R),s(l+1);break}}e(H=>{H.actionState.windTurbineTowerRadius=R})}},T=()=>{t(!1)},w=()=>{T(),c()},x=()=>{v(d),t(!1),s(0)},b=()=>{v(d)};return h.jsx(so,{width:550,title:Y.t("windTurbineMenu.TowerRadius",p),onApply:b,onClose:T,onClickCancel:w,onClickOk:x,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:.1,max:2,style:{width:120},step:.01,precision:2,value:d,onChange:R=>{R!==null&&f(R)}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",p),": [0.1, 2] ",Y.t("word.MeterAbbreviation",p)]})]}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",p)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:g,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("windTurbineMenu.OnlyThisWindTurbine",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("windTurbineMenu.AllWindTurbinesAboveFoundation",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("windTurbineMenu.AllSelectedWindTurbines",p)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("windTurbineMenu.AllWindTurbines",p)})]})})})]})})},Bgo=t=>{const e=[];if(t.type!==z.WindTurbine)return{items:e};const n=t,o={lng:M.getState().language},r=!n.locked;return e.push({key:"wind-turbine-copy",label:h.jsx(Fd,{})}),r&&e.push({key:"wind-turbine-cut",label:h.jsx(kd,{})}),e.push({key:"wind-turbine-lock",label:h.jsx(Ku,{selectedElement:n})}),r&&e.push({key:"wind-turbine-relative-yaw-angle",label:h.jsxs(eo,{Dialog:zgo,children:[Y.t("windTurbineMenu.RelativeYawAngle",o)," ..."]})},{key:"wind-turbine-rotor-submenu",label:h.jsx(an,{children:Y.t("windTurbineMenu.Rotor",o)}),children:[{key:"wind-turbine-rotor-blade-number",label:h.jsxs(eo,{noPadding:!0,Dialog:Dgo,children:[Y.t("windTurbineMenu.BladeNumber",o)," ..."]})},{key:"wind-turbine-rotor-initial-angle",label:h.jsxs(eo,{noPadding:!0,Dialog:Ego,children:[Y.t("windTurbineMenu.RotorInitialAngle",o)," ..."]})},{key:"wind-turbine-rotor-blade-pitch-angle",label:h.jsxs(eo,{noPadding:!0,Dialog:Fgo,children:[Y.t("windTurbineMenu.RotorBladePitchAngle",o)," ..."]})},{key:"wind-turbine-rotor-blade-radius",label:h.jsxs(eo,{noPadding:!0,Dialog:kgo,children:[Y.t("windTurbineMenu.RotorBladeRadius",o)," ..."]})},{key:"wind-turbine-rotor-blade-design",label:h.jsxs(eo,{noPadding:!0,Dialog:Lgo,children:[Y.t("windTurbineMenu.RotorBladeDesign",o)," ..."]})},{key:"wind-turbine-hub-design",label:h.jsxs(eo,{noPadding:!0,Dialog:Wgo,children:[Y.t("windTurbineMenu.HubDesign",o)," ..."]})},{key:"wind-turbine-bird-safe-blade",label:h.jsxs(eo,{noPadding:!0,Dialog:Ngo,children:[Y.t("windTurbineMenu.BirdSafeDesign",o)," ..."]})}]},{key:"wind-turbine-tower-submenu",label:h.jsx(an,{children:Y.t("windTurbineMenu.Tower",o)}),children:[{key:"wind-turbine-tower-height",label:h.jsxs(eo,{noPadding:!0,Dialog:Ugo,children:[Y.t("windTurbineMenu.TowerHeight",o)," ..."]})},{key:"wind-turbine-tower-radius",label:h.jsxs(eo,{noPadding:!0,Dialog:jgo,children:[Y.t("windTurbineMenu.TowerRadius",o)," ..."]})}]},{key:"wind-turbine-label",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",o)}),children:v3(n)}),{items:e}},Ygo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(En),a=M(Yge),l=M(Oge),s=M(no),c=M(Qn),u=M(Xi),d=uo(z.SolarWaterHeater),[f,p]=m.useState((d==null?void 0:d.lx)??1),g=m.useRef(!1),A=m.useRef(),y=$t(),S=(k,D)=>{e(L=>{for(const j of L.elements)if(j.type===z.SolarWaterHeater&&j.id===k&&!j.locked){j.lx=D;break}})},C=(k,D)=>{e(L=>{for(const j of L.elements)j.type===z.SolarWaterHeater&&j.foundationId===k&&!j.locked&&(j.lx=D)})},P=(k,D,L)=>{e(j=>{for(const B of j.elements)if(B.type===z.SolarWaterHeater&&!B.locked){let O;D?O=B.parentId===k&&ye.isIdentical(B.normal,D):O=B.parentId===k,O&&(B.lx=L)}})},v=k=>{e(D=>{for(const L of D.elements)L.type===z.SolarWaterHeater&&!L.locked&&(L.lx=k)})},T=(k,D)=>{M.getState().set(L=>{for(const j of L.elements)j.type===z.SolarWaterHeater&&!j.locked&&k.has(j.id)&&(j.lx=D)})},w=k=>{l(k.target.value)},x=(k,D)=>{const L=r(k);if(L){if(L.type===z.Cuboid&&!ye.isIdentical(k.normal,as))return!0;const j=JSON.parse(JSON.stringify(k));return j.lx=D,L.type===z.Roof?!0:ye.isSolarCollectorWithinHorizontalSurface(j,L)}return!1},b=(k,D)=>!x(k,D),R=k=>{if(d){switch(a){case re.AllSelectedObjectsOfThisType:{for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&M.getState().selectedElementIdSet.has(D.id)&&Math.abs(D.lx-k)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&Math.abs(D.lx-k)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const D of n)if(D.type===z.SolarWaterHeater&&D.foundationId===(d==null?void 0:d.foundationId)&&!D.locked&&Math.abs(D.lx-k)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const D=r(d);if(D){if(D.type===z.Cuboid){for(const j of n)if(j.type===z.SolarWaterHeater&&j.parentId===d.parentId&&ye.isIdentical(j.normal,d.normal)&&!j.locked&&Math.abs(j.lx-k)>Et)return!0}else for(const j of n)if(j.type===z.SolarWaterHeater&&j.parentId===d.parentId&&!j.locked&&Math.abs(j.lx-k)>Et)return!0}break}default:{if(Math.abs((d==null?void 0:d.lx)-k)>Et)return!0;break}}return!1}},H=k=>{if(d&&R(k))switch(A.current=void 0,a){case re.AllSelectedObjectsOfThisType:{g.current=!1;for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&M.getState().selectedElementIdSet.has(D.id)&&b(D,k)){g.current=!0;break}if(g.current)A.current=k,p(d.lx);else{const D=new Map;for(const j of n)j.type===z.SolarWaterHeater&&M.getState().selectedElementIdSet.has(j.id)&&D.set(j.id,j.lx);const L={name:"Set Length for Selected Water Heater",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())S(j,B)},redo:()=>{T(L.oldValues,L.newValue)}};i(L),T(D,k),c(s+1)}break}case re.AllObjectsOfThisType:{g.current=!1;for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&b(D,k)){g.current=!0;break}if(g.current)A.current=k,p(d.lx);else{const D=new Map;for(const j of n)j.type===z.SolarWaterHeater&&M.getState().selectedElementIdSet.has(j.id)&&D.set(j.id,j.lx);const L={name:"Set Length for All Water Heater",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())S(j,B)},redo:()=>{v(L.newValue)}};i(L),v(k),c(s+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(d.foundationId){g.current=!1;for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&D.foundationId===d.foundationId&&b(D,k)){g.current=!0;break}if(g.current)A.current=k,p(d.lx);else{const D=new Map;for(const j of n)j.type===z.SolarWaterHeater&&j.foundationId===d.foundationId&&D.set(j.id,j.lx);const L={name:"Set Length for All Water Heater Above Foundation",timestamp:Date.now(),oldValues:D,newValue:k,groupId:d.foundationId,undo:()=>{for(const[j,B]of L.oldValues.entries())S(j,B)},redo:()=>{L.groupId&&C(L.groupId,L.newValue)}};i(L),C(d.foundationId,k),c(s+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{const D=r(d);if(D){if(g.current=!1,D.type===z.Cuboid){for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&j.parentId===d.parentId&&ye.isIdentical(j.normal,d.normal)&&b(j,k)){g.current=!0;break}}else for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&j.parentId===d.parentId&&b(j,k)){g.current=!0;break}if(g.current)A.current=k,p(d.lx);else{const j=new Map,B=D.type===z.Cuboid;if(B)for(const G of n)G.type===z.SolarWaterHeater&&G.parentId===d.parentId&&ye.isIdentical(G.normal,d.normal)&&j.set(G.id,G.lx);else for(const G of n)G.type===z.SolarWaterHeater&&G.parentId===d.parentId&&j.set(G.id,G.lx);const O=B?d.normal:void 0,V={name:"Set Length for All Water Heater on Surface",timestamp:Date.now(),oldValues:j,newValue:k,groupId:d.parentId,normal:O,undo:()=>{for(const[G,Q]of V.oldValues.entries())S(G,Q)},redo:()=>{V.groupId&&P(V.groupId,V.normal,V.newValue)}};i(V),P(d.parentId,O,k),c(s+1)}}break}default:{const D=o(d.id),L=D?D.lx:d.lx;if(g.current=b(d,k),g.current)A.current=k,p(L);else{const j={name:"Set Water Heater Length",timestamp:Date.now(),oldValue:L,newValue:k,changedElementId:d.id,changedElementType:d.type,undo:()=>{S(j.changedElementId,j.oldValue)},redo:()=>{S(j.changedElementId,j.newValue)}};i(j),S(d.id,k),c(s+1)}break}}},F=()=>{g.current=!1,t(!1)},E=()=>{F(),u()},N=()=>{H(f),g.current||(t(!1),c(0))},U=()=>{H(f)},W=g.current?": "+Y.t("message.NotApplicableToSelectedAction",y)+(A.current!==void 0?" ("+A.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("word.Length",y),rejectedMessage:W,onApply:U,onClose:F,onClickCancel:E,onClickOk:N,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:6,children:h.jsx(Sn,{min:0,max:100,step:.1,style:{width:120},precision:2,value:f,onChange:k=>{k!==null&&p(k)}})}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",y)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:w,value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarWaterHeaterMenu.OnlyThisSolarWaterHeater",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersOnSurface",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersAboveFoundation",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSelectedSolarWaterHeaters",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeaters",y)})]})})})]})})},Ogo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(En),a=M(vh),l=M(xh),s=M(no),c=M(Qn),u=M(Xi),d=uo(z.SolarWaterHeater),[f,p]=m.useState(0),[g,A]=m.useState((d==null?void 0:d.ly)??1),y=m.useRef(!1),S=m.useRef(),C=$t();m.useEffect(()=>{d&&p(Number((d.lz-.3).toFixed(2)))},[d]);const P=(L,j)=>{e(B=>{for(const O of B.elements)if(O.type===z.SolarWaterHeater&&O.id===L&&!O.locked){O.ly=j;break}})},v=(L,j)=>{e(B=>{for(const O of B.elements)O.type===z.SolarWaterHeater&&O.foundationId===L&&!O.locked&&(O.ly=j)})},T=(L,j,B)=>{e(O=>{for(const V of O.elements)if(V.type===z.SolarWaterHeater&&!V.locked){let G;j?G=V.parentId===L&&ye.isIdentical(V.normal,j):G=V.parentId===L,G&&(V.ly=B)}})},w=L=>{e(j=>{for(const B of j.elements)B.type===z.SolarWaterHeater&&!B.locked&&(B.ly=L)})},x=(L,j)=>{M.getState().set(B=>{for(const O of B.elements)O.type===z.SolarWaterHeater&&!O.locked&&L.has(O.id)&&(O.ly=j)})},b=L=>{l(L.target.value)},R=(L,j)=>{const B=r(L);if(B){if(B.type===z.Cuboid&&!ye.isIdentical(L.normal,as))return!0;const O=JSON.parse(JSON.stringify(L));return O.ly=j,B.type===z.Roof?!0:ye.isSolarCollectorWithinHorizontalSurface(O,B)}return!1},H=(L,j)=>!R(L,j),F=L=>{if(d){switch(a){case re.AllSelectedObjectsOfThisType:{for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&M.getState().selectedElementIdSet.has(j.id)&&Math.abs(j.ly-L)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&Math.abs(j.ly-L)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const j of n)if(j.type===z.SolarWaterHeater&&j.foundationId===(d==null?void 0:d.foundationId)&&!j.locked&&Math.abs(j.ly-L)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const j=r(d);if(j){if(j.type===z.Cuboid){for(const O of n)if(O.type===z.SolarWaterHeater&&O.parentId===d.parentId&&ye.isIdentical(O.normal,d.normal)&&!O.locked&&Math.abs(O.ly-L)>Et)return!0}else for(const O of n)if(O.type===z.SolarWaterHeater&&O.parentId===d.parentId&&!O.locked&&Math.abs(O.ly-L)>Et)return!0}break}default:{if(Math.abs((d==null?void 0:d.ly)-L)>Et)return!0;break}}return!1}},E=L=>{if(d&&F(L))switch(S.current=void 0,a){case re.AllSelectedObjectsOfThisType:{y.current=!1;for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&M.getState().selectedElementIdSet.has(j.id)&&H(j,L)){y.current=!0;break}if(y.current)S.current=L,A(d.ly);else{const j=new Map;for(const O of n)O.type===z.SolarWaterHeater&&!O.locked&&M.getState().selectedElementIdSet.has(O.id)&&j.set(O.id,O.ly);const B={name:"Set Width for Selected Water Heater",timestamp:Date.now(),oldValues:j,newValue:L,undo:()=>{for(const[O,V]of B.oldValues.entries())P(O,V)},redo:()=>{x(B.oldValues,B.newValue)}};i(B),x(j,L),c(s+1)}break}case re.AllObjectsOfThisType:{y.current=!1;for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&H(j,L)){y.current=!0;break}if(y.current)S.current=L,A(d.ly);else{const j=new Map;for(const O of n)O.type===z.SolarWaterHeater&&!O.locked&&j.set(O.id,O.ly);const B={name:"Set Length for All Water Heater",timestamp:Date.now(),oldValues:j,newValue:L,undo:()=>{for(const[O,V]of B.oldValues.entries())P(O,V)},redo:()=>{w(B.newValue)}};i(B),w(L),c(s+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(d.foundationId){y.current=!1;for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&j.foundationId===d.foundationId&&H(j,L)){y.current=!0;break}if(y.current)S.current=L,A(d.ly);else{const j=new Map;for(const O of n)O.type===z.SolarWaterHeater&&!O.locked&&O.foundationId===d.foundationId&&j.set(O.id,O.ly);const B={name:"Set Width for All Water Heater Above Foundation",timestamp:Date.now(),oldValues:j,newValue:L,groupId:d.foundationId,undo:()=>{for(const[O,V]of B.oldValues.entries())P(O,V)},redo:()=>{B.groupId&&v(B.groupId,B.newValue)}};i(B),v(d.foundationId,L),c(s+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{const j=r(d);if(j){if(y.current=!1,j.type===z.Cuboid){for(const O of n)if(O.type===z.SolarWaterHeater&&O.parentId===d.parentId&&ye.isIdentical(O.normal,d.normal)&&!O.locked&&H(O,L)){y.current=!0;break}}else for(const O of n)if(O.type===z.SolarWaterHeater&&O.parentId===d.parentId&&!O.locked&&H(O,L)){y.current=!0;break}if(y.current)S.current=L,A(d.ly);else{const O=new Map,V=j.type===z.Cuboid;if(V)for(const $ of n)$.type===z.SolarWaterHeater&&$.parentId===d.parentId&&ye.isIdentical($.normal,d.normal)&&!$.locked&&O.set($.id,$.ly);else for(const $ of n)$.type===z.SolarWaterHeater&&$.parentId===d.parentId&&!$.locked&&O.set($.id,$.ly);const G=V?d.normal:void 0,Q={name:"Set Width for All Water Heater on Surface",timestamp:Date.now(),oldValues:O,newValue:L,groupId:d.parentId,normal:G,undo:()=>{for(const[$,ie]of Q.oldValues.entries())P($,ie)},redo:()=>{Q.groupId&&T(Q.groupId,Q.normal,Q.newValue)}};i(Q),T(d.parentId,G,L),c(s+1)}}break}default:{const j=o(d.id),B=j?j.ly:d.ly;if(y.current=H(d,L),y.current)S.current=L,A(B);else{const O={name:"Set Water Heater Width",timestamp:Date.now(),oldValue:B,newValue:L,changedElementId:d.id,changedElementType:d.type,undo:()=>{P(O.changedElementId,O.oldValue)},redo:()=>{P(O.changedElementId,O.newValue)}};i(O),P(d.id,L),c(s+1)}break}}},N=()=>{y.current=!1,t(!1)},U=()=>{N(),u()},W=()=>{E(g),y.current||(t(!1),c(0))},k=()=>{E(g)},D=y.current?": "+Y.t("message.NotApplicableToSelectedAction",C)+(S.current!==void 0?" ("+S.current.toFixed(2)+")":""):null;return console.log("min",f),h.jsx(so,{width:550,title:Y.t("word.Width",C),rejectedMessage:D,onApply:k,onClose:N,onClickCancel:U,onClickOk:W,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:6,children:h.jsx(Sn,{min:f,max:100,step:.1,style:{width:120},precision:2,value:g,onChange:L=>{L!==null&&A(L)}})}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",C)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:b,value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarWaterHeaterMenu.OnlyThisSolarWaterHeater",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersOnSurface",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersAboveFoundation",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSelectedSolarWaterHeaters",C)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeaters",C)})]})})})]})})},Vgo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Qq),i=M(yYe),a=M(AYe),l=M(wYe),s=M(Gr),c=M(En),u=M(Yge),d=M(Oge),f=M(no),p=M(Qn),g=M(Xi),A=uo(z.SolarWaterHeater),y=m.useRef(!1),S=m.useRef(),[C,P]=m.useState(A?-A.relativeAzimuth:0),v=$t(),T=k=>{d(k.target.value)},w=(k,D)=>{const L=s(k);if(L){if(L.type===z.Cuboid&&!ye.isIdentical(k.normal,as))return!0;const j=JSON.parse(JSON.stringify(k));return j.relativeAzimuth=-D,L.type===z.Roof?!0:ye.isSolarCollectorWithinHorizontalSurface(j,L)}return!1},x=(k,D)=>!w(k,D),b=k=>{if(A){switch(u){case re.AllSelectedObjectsOfThisType:for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&M.getState().selectedElementIdSet.has(D.id)&&Math.abs(-D.relativeAzimuth-k)>Et)return!0;break;case re.AllObjectsOfThisType:for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&Math.abs(-D.relativeAzimuth-k)>Et)return!0;break;case re.AllObjectsOfThisTypeAboveFoundation:for(const D of n)if(D.type===z.SolarWaterHeater&&D.foundationId===(A==null?void 0:A.foundationId)&&!D.locked&&Math.abs(-D.relativeAzimuth-k)>Et)return!0;break;case re.AllObjectsOfThisTypeOnSurface:if(A!=null&&A.parentId){const D=s(A);if(D){if(D.type===z.Cuboid){for(const j of n)if(j.type===z.SolarWaterHeater&&j.parentId===A.parentId&&ye.isIdentical(j.normal,A.normal)&&!j.locked&&Math.abs(-j.relativeAzimuth-k)>Et)return!0}else for(const j of n)if(j.type===z.SolarWaterHeater&&j.parentId===A.parentId&&!j.locked&&Math.abs(-j.relativeAzimuth-k)>Et)return!0}}break;default:if(Math.abs(-(A==null?void 0:A.relativeAzimuth)-k)>Et)return!0}return!1}},R=(k,D)=>{M.getState().set(L=>{for(const j of L.elements)if(j.type===z.SolarWaterHeater&&!j.locked&&k.has(j.id)){const B=j;B.relativeAzimuth=D}})},H=k=>{if(A&&b(k)){switch(S.current=void 0,u){case re.AllSelectedObjectsOfThisType:{y.current=!1;for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&M.getState().selectedElementIdSet.has(D.id)&&x(D,k)){y.current=!0;break}if(y.current)S.current=k,P(-A.relativeAzimuth);else{const D=new Map;for(const j of n)j.type===z.SolarWaterHeater&&M.getState().selectedElementIdSet.has(j.id)&&D.set(j.id,-j.relativeAzimuth);const L={name:"Set Relative Azimuth for Selected Water Heater",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())r(j,-B)},redo:()=>{R(L.oldValues,L.newValue)}};c(L),R(D,-k),p(f+1)}break}case re.AllObjectsOfThisType:{y.current=!1;for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&x(D,k)){y.current=!0;break}if(y.current)S.current=k,P(-A.relativeAzimuth);else{const D=new Map;for(const j of n)j.type===z.SolarWaterHeater&&D.set(j.id,-j.relativeAzimuth);const L={name:"Set Relative Azimuth for All Water Heater",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())r(j,-B)},redo:()=>{l(z.SolarWaterHeater,-L.newValue)}};c(L),l(z.SolarWaterHeater,-k),p(f+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(A.foundationId){y.current=!1;for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&D.foundationId===A.foundationId&&x(D,k)){y.current=!0;break}if(y.current)S.current=k,P(-A.relativeAzimuth);else{const D=new Map;for(const j of n)j.type===z.SolarWaterHeater&&j.foundationId===A.foundationId&&D.set(j.id,-j.relativeAzimuth);const L={name:"Set Relative Azimuth for All Water Heater Above Foundation",timestamp:Date.now(),oldValues:D,newValue:k,groupId:A.foundationId,undo:()=>{for(const[j,B]of L.oldValues.entries())r(j,-B)},redo:()=>{L.groupId&&a(z.SolarWaterHeater,L.groupId,-L.newValue)}};c(L),a(z.SolarWaterHeater,A.foundationId,-k),p(f+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{if(A.parentId){const D=s(A);if(D){if(y.current=!1,D.type===z.Cuboid){for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&j.parentId===A.parentId&&ye.isIdentical(j.normal,A.normal)&&x(j,k)){y.current=!0;break}}else for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&j.parentId===A.parentId&&x(j,k)){y.current=!0;break}if(y.current)S.current=k,P(-A.relativeAzimuth);else{const j=new Map,B=D.type===z.Cuboid;if(B)for(const G of n)G.type===z.SolarWaterHeater&&G.parentId===A.parentId&&ye.isIdentical(G.normal,A.normal)&&j.set(G.id,-G.relativeAzimuth);else for(const G of n)G.type===z.SolarWaterHeater&&G.parentId===A.parentId&&j.set(G.id,-G.relativeAzimuth);const O=B?A.normal:void 0,V={name:"Set Relative Azimuth for All Water Heater on Surface",timestamp:Date.now(),oldValues:j,newValue:k,groupId:A.parentId,normal:O,undo:()=>{for(const[G,Q]of V.oldValues.entries())r(G,-Q)},redo:()=>{V.groupId&&i(z.SolarWaterHeater,V.groupId,V.normal,-V.newValue)}};c(V),i(z.SolarWaterHeater,A.parentId,O,-k),p(f+1)}}}break}default:{const D=o(A.id),L=D?-D.relativeAzimuth:-A.relativeAzimuth;if(y.current=x(A,k),y.current)S.current=k,P(L);else{const j={name:"Set Solar Panel Array Relative Azimuth",timestamp:Date.now(),oldValue:L,newValue:k,changedElementId:A.id,changedElementType:A.type,undo:()=>{r(j.changedElementId,-j.oldValue)},redo:()=>{r(j.changedElementId,-j.newValue)}};c(j),r(A.id,-k),p(f+1)}break}}e(D=>{D.actionState.solarWaterHeaterRelativeAzimuth=-k})}},F=()=>{y.current=!1,t(!1)},E=()=>{F(),g()},N=()=>{H(C),y.current||(t(!1),p(0))},U=()=>{H(C)},W=y.current?": "+Y.t("message.NotApplicableToSelectedAction",v)+(S.current!==void 0?" ("+ye.toDegrees(S.current).toFixed(1)+"°)":null):null;return h.jsx(so,{width:550,title:Y.t("solarCollectorMenu.RelativeAzimuth",v),rejectedMessage:W,onApply:U,onClose:F,onClickCancel:E,onClickOk:N,children:h.jsxs(nn,{gutter:6,children:[h.jsxs(Ke,{span:6,children:[h.jsx(Sn,{min:-180,max:180,style:{width:120},precision:2,step:1,value:parseFloat(ye.toDegrees(C).toFixed(2)),formatter:k=>`${k}°`,onChange:k=>{k!==null&&P(ye.toRadians(k))}}),h.jsxs("div",{style:{paddingTop:"20px",textAlign:"left",fontSize:"11px"},children:[Y.t("word.Range",v),": [-180°, 180°]",h.jsx("br",{}),Y.t("message.AzimuthOfNorthIsZero",v),h.jsx("br",{}),Y.t("message.CounterclockwiseAzimuthIsPositive",v)]})]}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:18,children:h.jsx(Le.Group,{onChange:T,value:u,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarWaterHeaterMenu.OnlyThisSolarWaterHeater",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersOnSurface",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersAboveFoundation",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSelectedSolarWaterHeaters",v)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeaters",v)})]})})})]})})},_go=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Jn),r=M(Gr),i=M(En),a=M(Yge),l=M(Oge),s=M(no),c=M(Qn),u=M(Xi),d=uo(z.SolarWaterHeater),[f,p]=m.useState((d==null?void 0:d.lz)??1),g=m.useRef(!1),A=m.useRef(),y=$t(),S=(k,D)=>{e(L=>{for(const j of L.elements)if(j.type===z.SolarWaterHeater&&j.id===k&&!j.locked){j.lz=D;break}})},C=(k,D)=>{e(L=>{for(const j of L.elements)j.type===z.SolarWaterHeater&&j.foundationId===k&&!j.locked&&(j.lz=D)})},P=(k,D,L)=>{e(j=>{for(const B of j.elements)if(B.type===z.SolarWaterHeater&&!B.locked){let O;D?O=B.parentId===k&&ye.isIdentical(B.normal,D):O=B.parentId===k,O&&(B.lz=L)}})},v=k=>{e(D=>{for(const L of D.elements)L.type===z.SolarWaterHeater&&!L.locked&&(L.lz=k)})},T=(k,D)=>{M.getState().set(L=>{for(const j of L.elements)j.type===z.SolarWaterHeater&&!j.locked&&k.has(j.id)&&(j.lz=D)})},w=k=>{l(k.target.value)},x=(k,D)=>{const L=r(k);if(L){if(L.type===z.Cuboid&&!ye.isIdentical(k.normal,as))return!0;const j=JSON.parse(JSON.stringify(k));return j.lz=D,L.type===z.Roof?!0:ye.isSolarCollectorWithinHorizontalSurface(j,L)}return!1},b=(k,D)=>!x(k,D),R=k=>{if(d){switch(a){case re.AllSelectedObjectsOfThisType:{for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&M.getState().selectedElementIdSet.has(D.id)&&Math.abs(D.lz-k)>Et)return!0;break}case re.AllObjectsOfThisType:{for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&Math.abs(D.lz-k)>Et)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const D of n)if(D.type===z.SolarWaterHeater&&D.foundationId===(d==null?void 0:d.foundationId)&&!D.locked&&Math.abs(D.lz-k)>Et)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const D=r(d);if(D){if(D.type===z.Cuboid){for(const j of n)if(j.type===z.SolarWaterHeater&&j.parentId===d.parentId&&ye.isIdentical(j.normal,d.normal)&&!j.locked&&Math.abs(j.lz-k)>Et)return!0}else for(const j of n)if(j.type===z.SolarWaterHeater&&j.parentId===d.parentId&&!j.locked&&Math.abs(j.lz-k)>Et)return!0}break}default:{if(Math.abs((d==null?void 0:d.lz)-k)>Et)return!0;break}}return!1}},H=k=>{if(d&&R(k)){switch(A.current=void 0,a){case re.AllSelectedObjectsOfThisType:{g.current=!1;for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&M.getState().selectedElementIdSet.has(D.id)&&b(D,k)){g.current=!0;break}if(g.current)A.current=k,p(d.lz);else{const D=new Map;for(const j of n)j.type===z.SolarWaterHeater&&M.getState().selectedElementIdSet.has(j.id)&&D.set(j.id,j.lz);const L={name:"Set Height for Selected Water Heater",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())S(j,B)},redo:()=>{T(L.oldValues,L.newValue)}};i(L),T(D,k),c(s+1)}break}case re.AllObjectsOfThisType:{g.current=!1;for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&b(D,k)){g.current=!0;break}if(g.current)A.current=k,p(d.lz);else{const D=new Map;for(const j of n)j.type===z.SolarWaterHeater&&D.set(j.id,j.lz);const L={name:"Set Height for All Water Heater",timestamp:Date.now(),oldValues:D,newValue:k,undo:()=>{for(const[j,B]of L.oldValues.entries())S(j,B)},redo:()=>{v(L.newValue)}};i(L),v(k),c(s+1)}break}case re.AllObjectsOfThisTypeAboveFoundation:{if(d.foundationId){g.current=!1;for(const D of n)if(D.type===z.SolarWaterHeater&&!D.locked&&D.foundationId===d.foundationId&&b(D,k)){g.current=!0;break}if(g.current)A.current=k,p(d.lz);else{const D=new Map;for(const j of n)j.type===z.SolarWaterHeater&&j.foundationId===d.foundationId&&D.set(j.id,j.lz);const L={name:"Set Height for All Water Heater Above Foundation",timestamp:Date.now(),oldValues:D,newValue:k,groupId:d.foundationId,undo:()=>{for(const[j,B]of L.oldValues.entries())S(j,B)},redo:()=>{L.groupId&&C(L.groupId,L.newValue)}};i(L),C(d.foundationId,k),c(s+1)}}break}case re.AllObjectsOfThisTypeOnSurface:{const D=r(d);if(D){if(g.current=!1,D.type===z.Cuboid){for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&j.parentId===d.parentId&&ye.isIdentical(j.normal,d.normal)&&b(j,k)){g.current=!0;break}}else for(const j of n)if(j.type===z.SolarWaterHeater&&!j.locked&&j.parentId===d.parentId&&b(j,k)){g.current=!0;break}if(g.current)A.current=k,p(d.lz);else{const j=new Map,B=D.type===z.Cuboid;if(B)for(const G of n)G.type===z.SolarWaterHeater&&G.parentId===d.parentId&&ye.isIdentical(G.normal,d.normal)&&j.set(G.id,G.lz);else for(const G of n)G.type===z.SolarWaterHeater&&G.parentId===d.parentId&&j.set(G.id,G.lz);const O=B?d.normal:void 0,V={name:"Set Height for All Water Heater on Surface",timestamp:Date.now(),oldValues:j,newValue:k,groupId:d.parentId,normal:O,undo:()=>{for(const[G,Q]of V.oldValues.entries())S(G,Q)},redo:()=>{V.groupId&&P(V.groupId,V.normal,V.newValue)}};i(V),P(d.parentId,O,k),c(s+1)}}break}default:{const D=o(d.id),L=D?D.lz:d.lz;if(g.current=b(d,k),g.current)A.current=k,p(L);else{const j={name:"Set Water Heater Height",timestamp:Date.now(),oldValue:L,newValue:k,changedElementId:d.id,changedElementType:d.type,undo:()=>{S(j.changedElementId,j.oldValue)},redo:()=>{S(j.changedElementId,j.newValue)}};i(j),S(d.id,k),c(s+1)}break}}e(D=>{D.actionState.solarWaterHeaterHeight=k})}},F=()=>{g.current=!1,t(!1)},E=()=>{F(),u()},N=()=>{H(f),g.current||(t(!1),c(0))},U=()=>{H(f)},W=g.current?": "+Y.t("message.NotApplicableToSelectedAction",y)+(A.current!==void 0?" ("+A.current.toFixed(2)+")":""):null;return h.jsx(so,{width:550,title:Y.t("word.Height",y),rejectedMessage:W,onApply:U,onClose:F,onClickCancel:E,onClickOk:N,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:6,children:h.jsx(Sn,{min:.6,max:10,step:.1,style:{width:120},precision:2,value:f,onChange:k=>{k!==null&&p(k)}})}),h.jsx(Ke,{span:1,style:{verticalAlign:"middle",paddingTop:"6px"},children:Y.t("word.MeterAbbreviation",y)}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:17,children:h.jsx(Le.Group,{onChange:w,value:a,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarWaterHeaterMenu.OnlyThisSolarWaterHeater",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersOnSurface",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersAboveFoundation",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSelectedSolarWaterHeaters",y)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeaters",y)})]})})})]})})},Ggo=({setDialogVisible:t})=>{const e=M(pn),n=M(Kn),o=M(Gr),r=M(En),i=M(vh),a=M(xh),l=M(no),s=M(Qn),c=uo(z.SolarWaterHeater),[u,d]=m.useState((c==null?void 0:c.color)??"grey"),f=$t(),p=(x,b)=>{e(R=>{for(const H of R.elements)if(H.type===z.SolarWaterHeater&&H.id===x&&!H.locked){H.color=b;break}})},g=(x,b)=>{e(R=>{for(const H of R.elements)H.type===z.SolarWaterHeater&&H.foundationId===x&&!H.locked&&(H.color=b)})},A=(x,b,R)=>{e(H=>{for(const F of H.elements)if(F.type===z.SolarWaterHeater&&!F.locked){let E;b?E=F.parentId===x&&ye.isIdentical(F.normal,b):E=F.parentId===x,E&&(F.color=R)}})},y=x=>{e(b=>{for(const R of b.elements)R.type===z.SolarWaterHeater&&!R.locked&&(R.color=x)})},S=(x,b)=>{M.getState().set(R=>{for(const H of R.elements)H.type===z.SolarWaterHeater&&!H.locked&&x.has(H.id)&&(H.color=b)})},C=x=>{a(x.target.value)},P=x=>{if(c){switch(i){case re.AllSelectedObjectsOfThisType:{for(const b of n)if(b.type===z.SolarWaterHeater&&!b.locked&&M.getState().selectedElementIdSet.has(b.id)&&b.color!==x)return!0;break}case re.AllObjectsOfThisType:{for(const b of n)if(b.type===z.SolarWaterHeater&&!b.locked&&b.color!==x)return!0;break}case re.AllObjectsOfThisTypeAboveFoundation:{for(const b of n)if(b.type===z.SolarWaterHeater&&b.foundationId===(c==null?void 0:c.foundationId)&&!b.locked&&b.color!==x)return!0;break}case re.AllObjectsOfThisTypeOnSurface:{const b=o(c);if(b){if(b.type===z.Cuboid){for(const H of n)if(H.type===z.SolarWaterHeater&&H.parentId===c.parentId&&ye.isIdentical(H.normal,c.normal)&&!H.locked&&H.color!==x)return!0}else for(const H of n)if(H.type===z.SolarWaterHeater&&H.parentId===c.parentId&&!H.locked&&H.color!==x)return!0}break}default:{if((c==null?void 0:c.color)!==x)return!0;break}}return!1}},v=x=>{if(c&&P(x)){switch(i){case re.AllSelectedObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.SolarWaterHeater&&M.getState().selectedElementIdSet.has(H.id)&&!H.locked&&b.set(H.id,H.color??"grey");const R={name:"Set Color for Selected Solar Water Heaters",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())p(H,F)},redo:()=>{S(R.oldValues,R.newValue)}};r(R),S(b,x),s(l+1);break}case re.AllObjectsOfThisType:{const b=new Map;for(const H of n)H.type===z.SolarWaterHeater&&!H.locked&&b.set(H.id,H.color??"grey");const R={name:"Set Color for All Solar Water Heaters",timestamp:Date.now(),oldValues:b,newValue:x,undo:()=>{for(const[H,F]of R.oldValues.entries())p(H,F)},redo:()=>{y(R.newValue)}};r(R),y(x),s(l+1);break}case re.AllObjectsOfThisTypeAboveFoundation:{if(c.foundationId){const b=new Map;for(const H of n)H.type===z.SolarWaterHeater&&!H.locked&&H.foundationId===c.foundationId&&b.set(H.id,H.color??"grey");const R={name:"Set Color for All Water Heaters Above Foundation",timestamp:Date.now(),oldValues:b,newValue:x,groupId:c.foundationId,undo:()=>{for(const[H,F]of R.oldValues.entries())p(H,F)},redo:()=>{R.groupId&&g(R.groupId,R.newValue)}};r(R),g(c.foundationId,x),s(l+1)}break}case re.AllObjectsOfThisTypeOnSurface:{const b=o(c);if(b){const R=new Map,H=b.type===z.Cuboid;if(H)for(const N of n)N.type===z.SolarWaterHeater&&!N.locked&&N.parentId===c.parentId&&ye.isIdentical(N.normal,c.normal)&&R.set(N.id,N.color??"grey");else for(const N of n)N.type===z.SolarWaterHeater&&!N.locked&&N.parentId===c.parentId&&R.set(N.id,N.color??"grey");const F=H?c.normal:void 0,E={name:"Set Color for All Water Heaters on Surface",timestamp:Date.now(),oldValues:R,newValue:x,groupId:c.parentId,normal:F,undo:()=>{for(const[N,U]of E.oldValues.entries())p(N,U)},redo:()=>{E.groupId&&A(E.groupId,E.normal,E.newValue)}};r(E),A(c.parentId,F,x),s(l+1)}break}default:{const b=c?c.color:"grey",R={name:"Set Color of Selected Water Heater",timestamp:Date.now(),oldValue:b,newValue:x,changedElementId:c.id,changedElementType:c.type,undo:()=>{p(c.id,R.oldValue)},redo:()=>{p(c.id,R.newValue)}};r(R),p(c.id,x),s(l+1);break}}e(b=>{b.actionState.solarWaterHeaterColor=x})}},T=()=>{t(!1)},w=()=>{v(u)};return h.jsx(so,{width:680,title:Y.t("word.Color",f),onApply:w,onClose:T,children:h.jsxs(nn,{gutter:6,children:[h.jsx(Ke,{span:10,children:h.jsx(Ld,{color:u??(c==null?void 0:c.color)??"grey",onChangeComplete:x=>{d(x.hex)}})}),h.jsx(Ke,{style:{border:"2px dashed #ccc",paddingTop:"8px",paddingLeft:"12px",paddingBottom:"8px"},span:14,children:h.jsx(Le.Group,{onChange:C,value:i,children:h.jsxs(on,{direction:"vertical",children:[h.jsx(Le,{style:{width:"100%"},value:re.OnlyThisObject,children:Y.t("solarWaterHeaterMenu.OnlyThisSolarWaterHeater",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeOnSurface,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersOnSurface",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisTypeAboveFoundation,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeatersAboveFoundation",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllSelectedObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSelectedSolarWaterHeaters",f)}),h.jsx(Le,{style:{width:"100%"},value:re.AllObjectsOfThisType,children:Y.t("solarWaterHeaterMenu.AllSolarWaterHeaters",f)})]})})})]})})},Xgo=t=>{const e=[];if(t.type!==z.SolarWaterHeater)return{items:e};const n=t,o=!n.locked,r={lng:M.getState().language},i=t.type===z.SolarWaterHeater&&ye.isIdentical(n.normal,as);return e.push({key:"water-heater-copy",label:h.jsx(Fd,{})}),o&&e.push({key:"water-heater-cut",label:h.jsx(kd,{})}),e.push({key:"water-heater-lock",label:h.jsx(Ku,{selectedElement:n})}),o&&(e.push({key:"water-heater-length",label:h.jsxs(eo,{Dialog:Ygo,children:[Y.t("word.Length",r)," ..."]})},{key:"water-heater-width",label:h.jsxs(eo,{Dialog:Ogo,children:[Y.t("word.Width",r)," ..."]})},{key:"water-heater-height",label:h.jsxs(eo,{Dialog:_go,children:[Y.t("word.Height",r)," ..."]})}),i&&e.push({key:"water-heater-relative-azimuth",label:h.jsxs(eo,{Dialog:Vgo,children:[Y.t("solarCollectorMenu.RelativeAzimuth",r)," ..."]})}),e.push({key:"water-heater-frame-color",label:h.jsxs(eo,{Dialog:Ggo,children:[Y.t("word.Color",r)," ..."]})}),e.push({key:"solar-water-heater-label",label:h.jsx(an,{children:Y.t("labelSubMenu.Label",r)}),children:v3(n)})),{items:e}},Jgo=()=>{const t=M(S7t),e=uo(),n=m.useRef(t),o=m.useRef(e);return t!==null?(n.current=t,o.current=e):setTimeout(()=>{n.current=t,o.current=t===null?void 0:e},200),[n.current,o.current]},Kgo=({children:t})=>{dt(r=>r.contextMenuFlag);const[e,n]=Jgo(),o=()=>{if(!n)return e===z.Ground?$fo():e===z.Sky?opo():{items:[]};switch(e){case z.Foundation:return mfo(n);case z.Cuboid:return jfo(n);case z.Wall:return P1o(n);case z.Roof:return Igo(n);case z.SolarPanel:return ypo(n);case z.Window:return ego(n);case z.Door:return W1o(n);case z.Sensor:return Bho(n);case z.Light:return Gho(n);case z.Human:return sho(n);case z.Tree:return o1o(n);case z.Flower:return uho(n);case z.ParabolicTrough:return Rpo(n);case z.ParabolicDish:return Wpo(n);case z.FresnelReflector:return Gpo(n);case z.Heliostat:return t1o(n);case z.Polygon:return Fho(n);case z.PolygonVertex:return Nho(n);case z.WindTurbine:return Bgo(n);case z.SolarWaterHeater:return Xgo(n);default:return{items:[]}}};return h.jsx(rA,{trigger:["contextMenu"],menu:o(),overlayClassName:"my-overlay",children:t})},qgo=be.memo(Kgo);(function(){var t,e=typeof Object.defineProperties=="function"?Object.defineProperty:function(I,_,ce){I!=Array.prototype&&I!=Object.prototype&&(I[_]=ce.value)};function n(I){I=[typeof window=="object"&&window,typeof self=="object"&&self,typeof global=="object"&&global,I];for(var _=0;_>>0),P=0;function v(I,_,ce){return I.call.apply(I.bind,arguments)}function T(I,_,ce){if(!I)throw Error();if(2I.b&&(I.b++,_.next=I.a,I.a=_)}function G(){this.b=this.a=null}var Q=new O(function(){return new ie},function(I){I.reset()});G.prototype.add=function(I,_){var ce=Q.get();ce.set(I,_),this.b?this.b.next=ce:this.a=ce,this.b=ce};function $(){var I=So,_=null;return I.a&&(_=I.a,I.a=I.a.next,I.a||(I.b=null),_.next=null),_}function ie(){this.next=this.b=this.a=null}ie.prototype.set=function(I,_){this.a=I,this.b=_,this.next=null},ie.prototype.reset=function(){this.next=this.b=this.a=null};var q=Array.prototype.indexOf?function(I,_){return Array.prototype.indexOf.call(I,_,void 0)}:function(I,_){if(typeof I=="string")return typeof _!="string"||_.length!=1?-1:I.indexOf(_,0);for(var ce=0;ce_?null:typeof I=="string"?I.charAt(_):I[_]}function he(I,_){return 0<=q(I,_)}function pe(I,_){_=q(I,_);var ce;return(ce=0<=_)&&Array.prototype.splice.call(I,_,1),ce}function me(I,_){var ce=0;Z(I,function(Ce,_e){_.call(void 0,Ce,_e,I)&&Array.prototype.splice.call(I,_e,1).length==1&&ce++})}function le(I){return Array.prototype.concat.apply([],arguments)}function Te(I){var _=I.length;if(0<_){for(var ce=Array(_),Ce=0;Ce<_;Ce++)ce[Ce]=I[Ce];return ce}return[]}var ge=String.prototype.trim?function(I){return I.trim()}:function(I){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(I)[1]},Se=/&/g,Re=//g,Ae=/"/g,ue=/'/g,fe=/\x00/g,ve=/[\x00&<>"']/;function we(I,_){return I.indexOf(_)!=-1}function Pe(I,_){return I<_?-1:I>_?1:0}var Ie;e:{var Me=s.navigator;if(Me){var ze=Me.userAgent;if(ze){Ie=ze;break e}}Ie=""}function Ne(I){return we(Ie,I)}function Je(I,_){for(var ce in I)_.call(void 0,I[ce],ce,I)}function Ue(I){for(var _ in I)return!1;return!0}function nt(I){var _={},ce;for(ce in I)_[ce]=I[ce];return _}var We="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Ee(I,_){for(var ce,Ce,_e=1;_e"}else St=I===void 0?"undefined":I===null?"null":typeof I;B("Argument is not a %s (or a non-Element, non-Location mock); got: %s",_,St)}}function Oe(I,_){this.a=I===xt&&_||"",this.b=je}Oe.prototype.ta=!0,Oe.prototype.sa=function(){return this.a},Oe.prototype.toString=function(){return"Const{"+this.a+"}"};function st(I){return I instanceof Oe&&I.constructor===Oe&&I.b===je?I.a:(B("expected object of type Const, got '"+I+"'"),"type_error:Const")}var je={},xt={},gt;function Ye(){if(gt===void 0){var I=null,_=s.trustedTypes;if(_&&_.createPolicy){try{I=_.createPolicy("goog#html",{createHTML:R,createScript:R,createScriptURL:R})}catch(ce){s.console&&s.console.error(ce.message)}gt=I}else gt=I}return gt}function it(I,_){this.a=_===Be?I:""}it.prototype.ta=!0,it.prototype.sa=function(){return this.a.toString()},it.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};function ut(I){return I instanceof it&&I.constructor===it?I.a:(B("expected object of type TrustedResourceUrl, got '"+I+"' of type "+p(I)),"type_error:TrustedResourceUrl")}function Qe(I,_){var ce=st(I);if(!Ze.test(ce))throw Error("Invalid TrustedResourceUrl format: "+ce);return I=ce.replace(lt,function(Ce,_e){if(!Object.prototype.hasOwnProperty.call(_,_e))throw Error('Found marker, "'+_e+'", in format string, "'+ce+'", but no valid label mapping found in args: '+JSON.stringify(_));return Ce=_[_e],Ce instanceof Oe?st(Ce):encodeURIComponent(String(Ce))}),$e(I)}var lt=/%{(\w+)}/g,Ze=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,Be={};function $e(I){var _=Ye();return I=_?_.createScriptURL(I):I,new it(I,Be)}function wt(I,_){this.a=_===ht?I:""}wt.prototype.ta=!0,wt.prototype.sa=function(){return this.a.toString()},wt.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};function vt(I){return I instanceof wt&&I.constructor===wt?I.a:(B("expected object of type SafeUrl, got '"+I+"' of type "+p(I)),"type_error:SafeUrl")}var Rt=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)|font\/\w+|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime|x-matroska))(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i,Gt=/^data:(.*);base64,[a-z0-9+\/]+=*$/i,At=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function pt(I){if(I instanceof wt)return I;if(I=typeof I=="object"&&I.ta?I.sa():String(I),At.test(I))I=new wt(I,ht);else{I=String(I),I=I.replace(/(%0A|%0D)/g,"");var _=I.match(Gt);I=_&&Rt.test(_[1])?new wt(I,ht):null}return I}function Wt(I){return I instanceof wt?I:(I=typeof I=="object"&&I.ta?I.sa():String(I),At.test(I)||(I="about:invalid#zClosurez"),new wt(I,ht))}var ht={},ct=new wt("about:invalid#zClosurez",ht);function It(I,_,ce){this.a=ce===Ve?I:""}It.prototype.ta=!0,It.prototype.sa=function(){return this.a.toString()},It.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};function Ft(I){return I instanceof It&&I.constructor===It?I.a:(B("expected object of type SafeHtml, got '"+I+"' of type "+p(I)),"type_error:SafeHtml")}var Ve={};function ft(I,_){ke(I,"HTMLScriptElement"),I.src=ut(_),(_=I.ownerDocument&&I.ownerDocument.defaultView)&&_!=s?_=d(_.document):(u===null&&(u=d(s.document)),_=u),_&&I.setAttribute("nonce",_)}function kt(I,_,ce,Ce){return I=I instanceof wt?I:Wt(I),_=_||s,ce=ce instanceof Oe?st(ce):ce||"",_.open(vt(I),ce,Ce,void 0)}function rt(I,_){for(var ce=I.split("%s"),Ce="",_e=Array.prototype.slice.call(arguments,1);_e.length&&1")!=-1&&(I=I.replace(De,">")),I.indexOf('"')!=-1&&(I=I.replace(Ae,""")),I.indexOf("'")!=-1&&(I=I.replace(ue,"'")),I.indexOf("\0")!=-1&&(I=I.replace(fe,"�"))),I}function Ge(I){return Ge[" "](I),I}Ge[" "]=f;function yt(I,_){var ce=yo;return Object.prototype.hasOwnProperty.call(ce,I)?ce[I]:ce[I]=_(I)}var Pt=Ne("Opera"),ot=Ne("Trident")||Ne("MSIE"),bt=Ne("Edge"),zt=bt||ot,Bt=Ne("Gecko")&&!(we(Ie.toLowerCase(),"webkit")&&!Ne("Edge"))&&!(Ne("Trident")||Ne("MSIE"))&&!Ne("Edge"),tt=we(Ie.toLowerCase(),"webkit")&&!Ne("Edge");function Ht(){var I=s.document;return I?I.documentMode:void 0}var _t;e:{var qt="",un=function(){var I=Ie;if(Bt)return/rv:([^\);]+)(\)|;)/.exec(I);if(bt)return/Edge\/([\d\.]+)/.exec(I);if(ot)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(I);if(tt)return/WebKit\/(\S+)/.exec(I);if(Pt)return/(?:Version)[ \/]?(\S+)/.exec(I)}();if(un&&(qt=un?un[1]:""),ot){var Rn=Ht();if(Rn!=null&&Rn>parseFloat(qt)){_t=String(Rn);break e}}_t=qt}var yo={};function Ao(I){return yt(I,function(){for(var _=0,ce=ge(String(_t)).split("."),Ce=ge(String(I)).split("."),_e=Math.max(ce.length,Ce.length),St=0;_==0&&St<_e;St++){var Lt=ce[St]||"",dn=Ce[St]||"";do{if(Lt=/(\d*)(\D*)(.*)/.exec(Lt)||["","","",""],dn=/(\d*)(\D*)(.*)/.exec(dn)||["","","",""],Lt[0].length==0&&dn[0].length==0)break;_=Pe(Lt[1].length==0?0:parseInt(Lt[1],10),dn[1].length==0?0:parseInt(dn[1],10))||Pe(Lt[2].length==0,dn[2].length==0)||Pe(Lt[2],dn[2]),Lt=Lt[3],dn=dn[3]}while(_==0)}return 0<=_})}var wo;if(s.document&&ot){var Io=Ht();wo=Io||parseInt(_t,10)||void 0}else wo=void 0;var po=wo;try{new self.OffscreenCanvas(0,0).getContext("2d")}catch{}var On=!ot||9<=Number(po);function fo(I){var _=document;return typeof I=="string"?_.getElementById(I):I}function ir(I,_){Je(_,function(ce,Ce){ce&&typeof ce=="object"&&ce.ta&&(ce=ce.sa()),Ce=="style"?I.style.cssText=ce:Ce=="class"?I.className=ce:Ce=="for"?I.htmlFor=ce:Rr.hasOwnProperty(Ce)?I.setAttribute(Rr[Ce],ce):Ce.lastIndexOf("aria-",0)==0||Ce.lastIndexOf("data-",0)==0?I.setAttribute(Ce,ce):I[Ce]=ce})}var Rr={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function br(I,_,ce){var Ce=arguments,_e=document,St=String(Ce[0]),Lt=Ce[1];if(!On&&Lt&&(Lt.name||Lt.type)){if(St=["<",St],Lt.name&&St.push(' name="',at(Lt.name),'"'),Lt.type){St.push(' type="',at(Lt.type),'"');var dn={};Ee(dn,Lt),delete dn.type,Lt=dn}St.push(">"),St=St.join("")}return St=jo(_e,St),Lt&&(typeof Lt=="string"?St.className=Lt:Array.isArray(Lt)?St.className=Lt.join(" "):ir(St,Lt)),2"u"&&typeof window<"u"&&window.postMessage&&window.addEventListener&&!Ne("Presto")&&(I=function(){var _e=jo(document,"IFRAME");_e.style.display="none",document.documentElement.appendChild(_e);var St=_e.contentWindow;_e=St.document,_e.open(),_e.close();var Lt="callImmediate"+Math.random(),dn=St.location.protocol=="file:"?"*":St.location.protocol+"//"+St.location.host;_e=w(function(lo){(dn=="*"||lo.origin==dn)&&lo.data==Lt&&this.port1.onmessage()},this),St.addEventListener("message",_e,!1),this.port1={},this.port2={postMessage:function(){St.postMessage(Lt,dn)}}}),typeof I<"u"&&!Ne("Trident")&&!Ne("MSIE")){var _=new I,ce={},Ce=ce;return _.port1.onmessage=function(){if(ce.next!==void 0){ce=ce.next;var _e=ce.Hb;ce.Hb=null,_e()}},function(_e){Ce.next={Hb:_e},Ce=Ce.next,_.port2.postMessage(0)}}return function(_e){s.setTimeout(_e,0)}}function Wo(I,_){to||Bn(),Ko||(to(),Ko=!0),So.add(I,_)}var to;function Bn(){if(s.Promise&&s.Promise.resolve){var I=s.Promise.resolve(void 0);to=function(){I.then(Qo)}}else to=function(){var _=Qo;!A(s.setImmediate)||s.Window&&s.Window.prototype&&!Ne("Edge")&&s.Window.prototype.setImmediate==s.setImmediate?(In||(In=ar()),In(_)):s.setImmediate(_)}}var Ko=!1,So=new G;function Qo(){for(var I;I=$();){try{I.a.call(I.b)}catch(_){wn(_)}V(Q,I)}Ko=!1}function Yo(I,_){if(this.a=lr,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,I!=f)try{var ce=this;I.call(_,function(Ce){Fs(ce,fr,Ce)},function(Ce){if(!(Ce instanceof mu))try{throw Ce instanceof Error?Ce:Error("Promise rejected.")}catch{}Fs(ce,ei,Ce)})}catch(Ce){Fs(this,ei,Ce)}}var lr=0,fr=2,ei=3;function hr(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}hr.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var tr=new O(function(){return new hr},function(I){I.reset()});function bi(I,_,ce){var Ce=tr.get();return Ce.g=I,Ce.b=_,Ce.f=ce,Ce}function Fo(I){if(I instanceof Yo)return I;var _=new Yo(f);return Fs(_,fr,I),_}function Si(I){return new Yo(function(_,ce){ce(I)})}function hl(I,_,ce){ks(I,_,ce,null)||Wo(x(_,I))}function nr(I){return new Yo(function(_,ce){var Ce=I.length,_e=[];if(Ce)for(var St=function(Mo,Mi){Ce--,_e[Mo]=Mi,Ce==0&&_(_e)},Lt=function(Mo){ce(Mo)},dn=0,lo;dn=I.keyCode)&&(I.keyCode=-1)}catch{}},Tt.prototype.g=function(){return this.a};var Zt="closure_listenable_"+(1e6*Math.random()|0),cn=0;function yn(I,_,ce,Ce,_e){this.listener=I,this.proxy=null,this.src=_,this.type=ce,this.capture=!!Ce,this.Wa=_e,this.key=++cn,this.wa=this.Qa=!1}function An(I){I.wa=!0,I.listener=null,I.proxy=null,I.src=null,I.Wa=null}function Tn(I){this.src=I,this.a={},this.b=0}Tn.prototype.add=function(I,_,ce,Ce,_e){var St=I.toString();I=this.a[St],I||(I=this.a[St]=[],this.b++);var Lt=Yn(I,_,Ce,_e);return-1Ce.keyCode||Ce.returnValue!=null)){e:{var _e=!1;if(Ce.keyCode==0)try{Ce.keyCode=-1;break e}catch{_e=!0}(_e||Ce.returnValue==null)&&(Ce.returnValue=!0)}for(Ce=[],_e=_.b;_e;_e=_e.parentNode)Ce.push(_e);for(I=I.type,_e=Ce.length-1;0<=_e;_e--){_.b=Ce[_e];var St=Qu(Ce[_e],I,!0,_);ce=ce&&St}for(_e=0;_e>>0);function zf(I){return A(I)?I:(I[ed]||(I[ed]=function(_){return I.handleEvent(_)}),I[ed])}function Kl(){fn.call(this),this.v=new Tn(this),this.bc=this,this.hb=null}b(Kl,fn),Kl.prototype[Zt]=!0,Kl.prototype.addEventListener=function(I,_,ce,Ce){qn(this,I,_,ce,Ce)},Kl.prototype.removeEventListener=function(I,_,ce,Ce){Or(this,I,_,ce,Ce)},Kl.prototype.dispatchEvent=function(I){var _,ce=this.hb;if(ce)for(_=[];ce;ce=ce.hb)_.push(ce);ce=this.bc;var Ce=I.type||I;if(typeof I=="string")I=new Nt(I,ce);else if(I instanceof Nt)I.target=I.target||ce;else{var _e=I;I=new Nt(Ce,ce),Ee(I,_e)}if(_e=!0,_)for(var St=_.length-1;0<=St;St--){var Lt=I.b=_[St];_e=bp(Lt,Ce,!0,I)&&_e}if(Lt=I.b=ce,_e=bp(Lt,Ce,!0,I)&&_e,_e=bp(Lt,Ce,!1,I)&&_e,_)for(St=0;St<_.length;St++)Lt=I.b=_[St],_e=bp(Lt,Ce,!1,I)&&_e;return _e},Kl.prototype.Da=function(){if(Kl.bb.Da.call(this),this.v){var I=this.v,_;for(_ in I.a){for(var ce=I.a[_],Ce=0;Ce_)throw Error("Bad port number "+_);I.g=_}else I.g=null}function Og(I,_,ce){_ instanceof Vg?(I.b=_,i7(I.b,I.i)):(ce||(_=zh(_,Dh)),I.b=new Vg(_,I.i))}function ol(I,_,ce){I.b.set(_,ce)}function Ud(I,_){return I.b.get(_)}function wu(I){return I instanceof Ls?new Ls(I):new Ls(I,void 0)}function p5(I,_,ce,Ce){var _e=new Ls(null,void 0);return I&&ec(_e,I),_&&(_e.a=_),ce&&xl(_e,ce),Ce&&(_e.f=Ce),_e}function wy(I,_){return I?_?decodeURI(I.replace(/%25/g,"%2525")):decodeURIComponent(I):""}function zh(I,_,ce){return typeof I=="string"?(I=encodeURI(I).replace(_,P3),ce&&(I=I.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),I):null}function P3(I){return I=I.charCodeAt(0),"%"+(I>>4&15).toString(16)+(I&15).toString(16)}var vy=/[#\/\?@]/g,C3=/[#\?:]/g,g5=/[#\?]/g,Dh=/[#\?@]/g,R3=/#/g;function Vg(I,_){this.b=this.a=null,this.c=I||null,this.f=!!_}function jd(I){I.a||(I.a=new V0,I.b=0,I.c&&Au(I.c,function(_,ce){I.add(decodeURIComponent(_.replace(/\+/g," ")),ce)}))}function r7(I){var _=g1(I);if(typeof _>"u")throw Error("Keys are undefined");var ce=new Vg(null,void 0);I=yu(I);for(var Ce=0;Ce<_.length;Ce++){var _e=_[Ce],St=I[Ce];Array.isArray(St)?xy(ce,_e,St):ce.add(_e,St)}return ce}t=Vg.prototype,t.add=function(I,_){jd(this),this.c=null,I=vu(this,I);var ce=this.a.get(I);return ce||this.a.set(I,ce=[]),ce.push(_),this.b+=1,this};function Gc(I,_){jd(I),_=vu(I,_),Yg(I.a.b,_)&&(I.c=null,I.b-=I.a.get(_).length,I=I.a,Yg(I.b,_)&&(delete I.b[_],I.c--,I.a.length>2*I.c&&Ih(I)))}t.clear=function(){this.a=this.c=null,this.b=0};function ys(I,_){return jd(I),_=vu(I,_),Yg(I.a.b,_)}t.forEach=function(I,_){jd(this),this.a.forEach(function(ce,Ce){se(ce,function(_e){I.call(_,_e,Ce,this)},this)},this)},t.Y=function(){jd(this);for(var I=this.a.X(),_=this.a.Y(),ce=[],Ce=0;Ce<_.length;Ce++)for(var _e=I[Ce],St=0;St<_e.length;St++)ce.push(_[Ce]);return ce},t.X=function(I){jd(this);var _=[];if(typeof I=="string")ys(this,I)&&(_=le(_,this.a.get(vu(this,I))));else{I=this.a.X();for(var ce=0;ceI?!1:!ot||!po||9',I=(Ce=Ye())?Ce.createHTML(I):I,I=new It(I,null,Ve),Ce=Lt.document)&&(Ce.write(Ft(I)),Ce.close())):(Lt=kt(_,Ce,ce,Lt))&&I.noopener&&(Lt.opener=null),Lt)try{Lt.focus()}catch{}return Lt}function _g(I){return new Yo(function(_){function ce(){_c(2e3).then(function(){if(!I||I.closed)_();else return ce()})}return ce()})}var H3=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,m5=/^[^@]+@[^@]+$/;function Ws(){var I=null;return new Yo(function(_){s.document.readyState=="complete"?_():(I=function(){_()},Qi(window,"load",I))}).o(function(_){throw Or(window,"load",I),_})}function y5(){return ja(void 0)?Ws().then(function(){return new Yo(function(I,_){var ce=s.document,Ce=setTimeout(function(){_(Error("Cordova framework is not ready."))},1e3);ce.addEventListener("deviceready",function(){clearTimeout(Ce),I()},!1)})}):Si(Error("Cordova must run in an Android or iOS file scheme."))}function ja(I){return I=I||tc(),!(Bd()!=="file:"&&Bd()!=="ionic:"||!I.toLowerCase().match(/iphone|ipad|ipod|android/))}function M3(){var I=s.window;try{return!(!I||I==I.top)}catch{return!1}}function Rc(){return typeof s.WorkerGlobalScope<"u"&&typeof s.importScripts=="function"}function Ns(){return $n.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":$n.INTERNAL.hasOwnProperty("node")?"Node":Rc()?"Worker":"Browser"}function Gg(){var I=Ns();return I==="ReactNative"||I==="Node"}function DA(){for(var I=50,_=[];0"u"?null:Sy(I)}function S5(I){var _={},ce;for(ce in I)I.hasOwnProperty(ce)&&I[ce]!==null&&I[ce]!==void 0&&(_[ce]=I[ce]);return _}function Ty(I){if(I!==null)return JSON.parse(I)}function Jg(I){return I||Math.floor(1e9*Math.random()).toString()}function T5(I){return I=I||tc(),!(td(I)=="Safari"||I.toLowerCase().match(/iphone|ipad|ipod/))}function P5(){var I=s.___jsl;if(I&&I.H){for(var _ in I.H)if(I.H[_].r=I.H[_].r||[],I.H[_].L=I.H[_].L||[],I.H[_].r=I.H[_].L.concat(),I.CP)for(var ce=0;ce_)throw Error("Short delay should be less than long delay!");this.a=I,this.c=_,I=tc(),_=Ns(),this.b=Xc(I)||_==="ReactNative"}Df.prototype.get=function(){var I=s.navigator;return!(I&&typeof I.onLine=="boolean"&&(b5()||Bd()==="chrome-extension:"||typeof I.connection<"u"))||I.onLine?this.b?this.c:this.a:Math.min(5e3,this.a)};function EA(){var I=s.document;return I&&typeof I.visibilityState<"u"?I.visibilityState=="visible":!0}function a7(){var I=s.document,_=null;return EA()||!I?Fo():new Yo(function(ce){_=function(){EA()&&(I.removeEventListener("visibilitychange",_,!1),ce())},I.addEventListener("visibilitychange",_,!1)}).o(function(ce){throw I.removeEventListener("visibilitychange",_,!1),ce})}function I3(I){try{var _=new Date(parseInt(I,10));if(!isNaN(_.getTime())&&!/[^0-9]/.test(I))return _.toUTCString()}catch{}return null}function l7(){return!(!ql("fireauth.oauthhelper",s)&&!ql("fireauth.iframe",s))}function Jc(){var I=s.navigator;return I&&I.serviceWorker&&I.serviceWorker.controller||null}function G0(){var I=s.navigator;return I&&I.serviceWorker?Fo().then(function(){return I.serviceWorker.ready}).then(function(_){return _.active||null}).o(function(){return null}):Fo(null)}var s7={};function FA(I){s7[I]||(s7[I]=!0,typeof console<"u"&&typeof console.warn=="function"&&console.warn(I))}var z3;try{var kA={};Object.defineProperty(kA,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(kA,"abcd",{configurable:!0,enumerable:!0,value:2}),z3=kA.abcd==2}catch{z3=!1}function Hr(I,_,ce){z3?Object.defineProperty(I,_,{configurable:!0,enumerable:!0,value:ce}):I[_]=ce}function Kc(I,_){if(_)for(var ce in _)_.hasOwnProperty(ce)&&Hr(I,ce,_[ce])}function Ef(I){var _={};return Kc(_,I),_}function C5(I){var _={},ce;for(ce in I)I.hasOwnProperty(ce)&&(_[ce]=I[ce]);return _}function Py(I,_){if(!_||!_.length)return!0;if(!I)return!1;for(var ce=0;ce<_.length;ce++){var Ce=I[_[ce]];if(Ce==null||Ce==="")return!1}return!0}function y1(I){var _=I;if(typeof I=="object"&&I!=null){_="length"in I?[]:{};for(var ce in I)Hr(_,ce,y1(I[ce]))}return _}function R5(I){var _=I&&(I[NA]?"phone":null);if(_&&I&&I[WA]){Hr(this,"uid",I[WA]),Hr(this,"displayName",I[c7]||null);var ce=null;I[LA]&&(ce=new Date(I[LA]).toUTCString()),Hr(this,"enrollmentTime",ce),Hr(this,"factorId",_)}else throw new H("internal-error","Internal assert: invalid MultiFactorInfo object")}R5.prototype.w=function(){return{uid:this.uid,displayName:this.displayName,factorId:this.factorId,enrollmentTime:this.enrollmentTime}};function A1(I){try{var _=new rd(I)}catch{_=null}return _}var c7="displayName",LA="enrolledAt",WA="mfaEnrollmentId",NA="phoneInfo";function rd(I){R5.call(this,I),Hr(this,"phoneNumber",I[NA])}b(rd,R5),rd.prototype.w=function(){var I=rd.bb.w.call(this);return I.phoneNumber=this.phoneNumber,I};function D3(I){var _={},ce=I[v1],Ce=I[X0],_e=I[di];if(I=A1(I[E3]),!_e||_e!=w1&&_e!=Ut&&!ce||_e==Ut&&!Ce||_e==Eh&&!I)throw Error("Invalid checkActionCode response!");_e==Ut?(_[xS]=ce||null,_[Us]=ce||null,_[vS]=Ce):(_[xS]=Ce||null,_[Us]=Ce||null,_[vS]=ce||null),_[Yd]=I||null,Hr(this,SS,_e),Hr(this,bS,y1(_))}var Eh="REVERT_SECOND_FACTOR_ADDITION",w1="EMAIL_SIGNIN",Ut="VERIFY_AND_CHANGE_EMAIL",v1="email",E3="mfaInfo",X0="newEmail",di="requestType",vS="email",xS="fromEmail",Yd="multiFactorInfo",Us="previousEmail",bS="data",SS="operation";function UA(I){I=wu(I);var _=Ud(I,u7)||null,ce=Ud(I,d7)||null,Ce=Ud(I,jA)||null;if(Ce=Ce&&CS[Ce]||null,!_||!ce||!Ce)throw new H("argument-error",u7+", "+d7+"and "+jA+" are required in a valid action code URL.");Kc(this,{apiKey:_,operation:Ce,code:ce,continueUrl:Ud(I,Fh)||null,languageCode:Ud(I,TS)||null,tenantId:Ud(I,PS)||null})}var u7="apiKey",d7="oobCode",Fh="continueUrl",TS="languageCode",jA="mode",PS="tenantId",CS={recoverEmail:"RECOVER_EMAIL",resetPassword:"PASSWORD_RESET",revertSecondFactorAddition:Eh,signIn:w1,verifyAndChangeEmail:Ut,verifyEmail:"VERIFY_EMAIL"};function F3(I){try{return new UA(I)}catch{return null}}function xu(I){var _=I[OA];if(typeof _>"u")throw new H("missing-continue-uri");if(typeof _!="string"||typeof _=="string"&&!_.length)throw new H("invalid-continue-uri");this.h=_,this.b=this.a=null,this.g=!1;var ce=I[f7];if(ce&&typeof ce=="object"){_=ce[p7];var Ce=ce[x1];if(ce=ce[VA],typeof _=="string"&&_.length){if(this.a=_,typeof Ce<"u"&&typeof Ce!="boolean")throw new H("argument-error",x1+" property must be a boolean when specified.");if(this.g=!!Ce,typeof ce<"u"&&(typeof ce!="string"||typeof ce=="string"&&!ce.length))throw new H("argument-error",VA+" property must be a non empty string when specified.");this.b=ce||null}else{if(typeof _<"u")throw new H("argument-error",p7+" property must be a non empty string when specified.");if(typeof Ce<"u"||typeof ce<"u")throw new H("missing-android-pkg-name")}}else if(typeof ce<"u")throw new H("argument-error",f7+" property must be a non null object when specified.");if(this.f=null,(_=I[h7])&&typeof _=="object"){if(_=_[Hc],typeof _=="string"&&_.length)this.f=_;else if(typeof _<"u")throw new H("argument-error",Hc+" property must be a non empty string when specified.")}else if(typeof _<"u")throw new H("argument-error",h7+" property must be a non null object when specified.");if(_=I[YA],typeof _<"u"&&typeof _!="boolean")throw new H("argument-error",YA+" property must be a boolean when specified.");if(this.c=!!_,I=I[BA],typeof I<"u"&&(typeof I!="string"||typeof I=="string"&&!I.length))throw new H("argument-error",BA+" property must be a non empty string when specified.");this.i=I||null}var f7="android",BA="dynamicLinkDomain",YA="handleCodeInApp",h7="iOS",OA="url",x1="installApp",VA="minimumVersion",p7="packageName",Hc="bundleId";function _A(I){var _={};_.continueUrl=I.h,_.canHandleCodeInApp=I.c,(_.androidPackageName=I.a)&&(_.androidMinimumVersion=I.b,_.androidInstallApp=I.g),_.iOSBundleId=I.f,_.dynamicLinkDomain=I.i;for(var ce in _)_[ce]===null&&delete _[ce];return _}function YM(I){return te(I,function(_){return _=_.toString(16),1<_.length?_:"0"+_}).join("")}var Kg=null;function Cy(I){var _=[];return OM(I,function(ce){_.push(ce)}),_}function OM(I,_){function ce(lo){for(;Ce>4),Lt!=64&&(_(St<<4&240|Lt>>2),dn!=64&&_(Lt<<6&192|dn))}}function Ar(){if(!Kg){Kg={};for(var I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),_=["+/=","+/","-_=","-_.","-_"],ce=0;5>ce;ce++)for(var Ce=I.concat(_[ce].split("")),_e=0;_ethis.a?this.a:I),this.b=_.provider_id||_.firebase&&_.firebase.sign_in_provider||null,this.f=_.firebase&&_.firebase.tenant||null,this.c=!!_.is_anonymous||this.b=="anonymous"}qg.prototype.T=function(){return this.f},qg.prototype.l=function(){return this.c},qg.prototype.toString=function(){return this.h};function H5(I){try{return new qg(I)}catch{return null}}function g7(I){if(!I||(I=I.split("."),I.length!=3))return null;I=I[1];for(var _=(4-I.length%4)%4,ce=0;ce<_;ce++)I+=".";try{var Ce=Cy(I);for(I=[],ce=_=0;__e)I[ce++]=String.fromCharCode(_e);else if(191<_e&&224>_e){var St=Ce[_++];I[ce++]=String.fromCharCode((_e&31)<<6|St&63)}else if(239<_e&&365>_e){St=Ce[_++];var Lt=Ce[_++],dn=Ce[_++],lo=((_e&7)<<18|(St&63)<<12|(Lt&63)<<6|dn&63)-65536;I[ce++]=String.fromCharCode(55296+(lo>>10)),I[ce++]=String.fromCharCode(56320+(lo&1023))}else St=Ce[_++],Lt=Ce[_++],I[ce++]=String.fromCharCode((_e&15)<<12|(St&63)<<6|Lt&63)}return JSON.parse(I.join(""))}catch{}return null}var GA="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),id=["client_id","response_type","scope","redirect_uri","state"],Pp={nd:{Ja:"locale",va:700,ua:600,fa:"facebook.com",Ya:id},pd:{Ja:null,va:500,ua:750,fa:"github.com",Ya:id},qd:{Ja:"hl",va:515,ua:680,fa:"google.com",Ya:id},wd:{Ja:"lang",va:485,ua:705,fa:"twitter.com",Ya:GA},kd:{Ja:"locale",va:640,ua:600,fa:"apple.com",Ya:[]}};function k3(I){for(var _ in Pp)if(Pp[_].fa==I)return Pp[_];return null}function XA(I){var _={};_["facebook.com"]=ad,_["google.com"]=L3,_["github.com"]=KA,_["twitter.com"]=qA;var ce=I&&I[kh];try{if(ce)return _[ce]?new _[ce](I):new w0(I);if(typeof I[JA]<"u")return new M5(I)}catch{}return null}var JA="idToken",kh="providerId";function M5(I){var _=I[kh];if(!_&&I[JA]){var ce=H5(I[JA]);ce&&ce.b&&(_=ce.b)}if(!_)throw Error("Invalid additional user info!");(_=="anonymous"||_=="custom")&&(_=null),ce=!1,typeof I.isNewUser<"u"?ce=!!I.isNewUser:I.kind==="identitytoolkit#SignupNewUserResponse"&&(ce=!0),Hr(this,"providerId",_),Hr(this,"isNewUser",ce)}function w0(I){M5.call(this,I),I=Ty(I.rawUserInfo||"{}"),Hr(this,"profile",y1(I||{}))}b(w0,M5);function ad(I){if(w0.call(this,I),this.providerId!="facebook.com")throw Error("Invalid provider ID!")}b(ad,w0);function KA(I){if(w0.call(this,I),this.providerId!="github.com")throw Error("Invalid provider ID!");Hr(this,"username",this.profile&&this.profile.login||null)}b(KA,w0);function L3(I){if(w0.call(this,I),this.providerId!="google.com")throw Error("Invalid provider ID!")}b(L3,w0);function qA(I){if(w0.call(this,I),this.providerId!="twitter.com")throw Error("Invalid provider ID!");Hr(this,"username",I.screenName||null)}b(qA,w0);function $g(I){var _=wu(I),ce=Ud(_,"link"),Ce=Ud(wu(ce),"link");return _=Ud(_,"deep_link_id"),Ud(wu(_),"link")||_||Ce||ce||I}function ld(I,_){if(!I&&!_)throw new H("internal-error","Internal assert: no raw session string available");if(I&&_)throw new H("internal-error","Internal assert: unable to determine the session type");this.a=I||null,this.b=_||null,this.type=this.a?I5:$A}var I5="enroll",$A="signin";ld.prototype.Ha=function(){return this.a?Fo(this.a):Fo(this.b)},ld.prototype.w=function(){return this.type==I5?{multiFactorSession:{idToken:this.a}}:{multiFactorSession:{pendingCredential:this.b}}};function Cp(){}Cp.prototype.ka=function(){},Cp.prototype.b=function(){},Cp.prototype.c=function(){},Cp.prototype.w=function(){};function Ry(I,_){return I.then(function(ce){if(ce[rn]){var Ce=H5(ce[rn]);if(!Ce||_!=Ce.i)throw new H("user-mismatch");return ce}throw new H("user-mismatch")}).o(function(ce){throw ce&&ce.code&&ce.code==E+"user-not-found"?new H("user-mismatch"):ce})}function b1(I,_){if(_)this.a=_;else throw new H("internal-error","failed to construct a credential");Hr(this,"providerId",I),Hr(this,"signInMethod",I)}b1.prototype.ka=function(I){return IS(I,Mc(this))},b1.prototype.b=function(I,_){var ce=Mc(this);return ce.idToken=_,$0(I,ce)},b1.prototype.c=function(I,_){return Ry(XM(I,Mc(this)),_)};function Mc(I){return{pendingToken:I.a,requestUri:"http://localhost"}}b1.prototype.w=function(){return{providerId:this.providerId,signInMethod:this.signInMethod,pendingToken:this.a}};function z5(I){if(I&&I.providerId&&I.signInMethod&&I.providerId.indexOf("saml.")==0&&I.pendingToken)try{return new b1(I.providerId,I.pendingToken)}catch{}return null}function Od(I,_,ce){if(this.a=null,_.idToken||_.accessToken)_.idToken&&Hr(this,"idToken",_.idToken),_.accessToken&&Hr(this,"accessToken",_.accessToken),_.nonce&&!_.pendingToken&&Hr(this,"nonce",_.nonce),_.pendingToken&&(this.a=_.pendingToken);else if(_.oauthToken&&_.oauthTokenSecret)Hr(this,"accessToken",_.oauthToken),Hr(this,"secret",_.oauthTokenSecret);else throw new H("internal-error","failed to construct a credential");Hr(this,"providerId",I),Hr(this,"signInMethod",ce)}Od.prototype.ka=function(I){return IS(I,bu(this))},Od.prototype.b=function(I,_){var ce=bu(this);return ce.idToken=_,$0(I,ce)},Od.prototype.c=function(I,_){var ce=bu(this);return Ry(XM(I,ce),_)};function bu(I){var _={};return I.idToken&&(_.id_token=I.idToken),I.accessToken&&(_.access_token=I.accessToken),I.secret&&(_.oauth_token_secret=I.secret),_.providerId=I.providerId,I.nonce&&!I.a&&(_.nonce=I.nonce),_={postBody:r7(_).toString(),requestUri:"http://localhost"},I.a&&(delete _.postBody,_.pendingToken=I.a),_}Od.prototype.w=function(){var I={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(I.oauthIdToken=this.idToken),this.accessToken&&(I.oauthAccessToken=this.accessToken),this.secret&&(I.oauthTokenSecret=this.secret),this.nonce&&(I.nonce=this.nonce),this.a&&(I.pendingToken=this.a),I};function D5(I){if(I&&I.providerId&&I.signInMethod){var _={idToken:I.oauthIdToken,accessToken:I.oauthTokenSecret?null:I.oauthAccessToken,oauthTokenSecret:I.oauthTokenSecret,oauthToken:I.oauthTokenSecret&&I.oauthAccessToken,nonce:I.nonce,pendingToken:I.pendingToken};try{return new Od(I.providerId,_,I.signInMethod)}catch{}}return null}function Vd(I,_){this.Qc=_||[],Kc(this,{providerId:I,isOAuthProvider:!0}),this.Jb={},this.qb=(k3(I)||{}).Ja||null,this.pb=null}Vd.prototype.Ka=function(I){return this.Jb=nt(I),this};function Ff(I){if(typeof I!="string"||I.indexOf("saml.")!=0)throw new H("argument-error",'SAML provider IDs must be prefixed with "saml."');Vd.call(this,I,[])}b(Ff,Vd);function J0(I){Vd.call(this,I,id),this.a=[]}b(J0,Vd),J0.prototype.Ca=function(I){return he(this.a,I)||this.a.push(I),this},J0.prototype.Rb=function(){return Te(this.a)},J0.prototype.credential=function(I,_){var ce;if(y(I)?ce={idToken:I.idToken||null,accessToken:I.accessToken||null,nonce:I.rawNonce||null}:ce={idToken:I||null,accessToken:_||null},!ce.idToken&&!ce.accessToken)throw new H("argument-error","credential failed: must provide the ID token and/or the access token.");return new Od(this.providerId,ce,this.providerId)};function Ms(){J0.call(this,"facebook.com")}b(Ms,J0),Hr(Ms,"PROVIDER_ID","facebook.com"),Hr(Ms,"FACEBOOK_SIGN_IN_METHOD","facebook.com");function E5(I){if(!I)throw new H("argument-error","credential failed: expected 1 argument (the OAuth access token).");var _=I;return y(I)&&(_=I.accessToken),new Ms().credential({accessToken:_})}function Qg(){J0.call(this,"github.com")}b(Qg,J0),Hr(Qg,"PROVIDER_ID","github.com"),Hr(Qg,"GITHUB_SIGN_IN_METHOD","github.com");function QA(I){if(!I)throw new H("argument-error","credential failed: expected 1 argument (the OAuth access token).");var _=I;return y(I)&&(_=I.accessToken),new Qg().credential({accessToken:_})}function Hy(){J0.call(this,"google.com"),this.Ca("profile")}b(Hy,J0),Hr(Hy,"PROVIDER_ID","google.com"),Hr(Hy,"GOOGLE_SIGN_IN_METHOD","google.com");function My(I,_){var ce=I;return y(I)&&(ce=I.idToken,_=I.accessToken),new Hy().credential({idToken:ce,accessToken:_})}function Zg(){Vd.call(this,"twitter.com",GA)}b(Zg,Vd),Hr(Zg,"PROVIDER_ID","twitter.com"),Hr(Zg,"TWITTER_SIGN_IN_METHOD","twitter.com");function $l(I,_){var ce=I;if(y(ce)||(ce={oauthToken:I,oauthTokenSecret:_}),!ce.oauthToken||!ce.oauthTokenSecret)throw new H("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new Od("twitter.com",ce,"twitter.com")}function Hi(I,_,ce){this.a=I,this.f=_,Hr(this,"providerId","password"),Hr(this,"signInMethod",ce===rl.EMAIL_LINK_SIGN_IN_METHOD?rl.EMAIL_LINK_SIGN_IN_METHOD:rl.EMAIL_PASSWORD_SIGN_IN_METHOD)}Hi.prototype.ka=function(I){return this.signInMethod==rl.EMAIL_LINK_SIGN_IN_METHOD?ka(I,jy,{email:this.a,oobCode:this.f}):ka(I,eI,{email:this.a,password:this.f})},Hi.prototype.b=function(I,_){return this.signInMethod==rl.EMAIL_LINK_SIGN_IN_METHOD?ka(I,qd,{idToken:_,email:this.a,oobCode:this.f}):ka(I,$M,{idToken:_,email:this.a,password:this.f})},Hi.prototype.c=function(I,_){return Ry(this.ka(I),_)},Hi.prototype.w=function(){return{email:this.a,password:this.f,signInMethod:this.signInMethod}};function Ic(I){return I&&I.email&&I.password?new Hi(I.email,I.password,I.signInMethod):null}function rl(){Kc(this,{providerId:"password",isOAuthProvider:!1})}function js(I,_){if(_=Su(_),!_)throw new H("argument-error","Invalid email link!");return new Hi(I,_.code,rl.EMAIL_LINK_SIGN_IN_METHOD)}function Su(I){return I=$g(I),(I=F3(I))&&I.operation===w1?I:null}Kc(rl,{PROVIDER_ID:"password"}),Kc(rl,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),Kc(rl,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"});function _d(I){if(!(I.fb&&I.eb||I.La&&I.ea))throw new H("internal-error");this.a=I,Hr(this,"providerId","phone"),this.fa="phone",Hr(this,"signInMethod","phone")}_d.prototype.ka=function(I){return I.gb(Rp(this))},_d.prototype.b=function(I,_){var ce=Rp(this);return ce.idToken=_,ka(I,FU,ce)},_d.prototype.c=function(I,_){var ce=Rp(this);return ce.operation="REAUTH",I=ka(I,lm,ce),Ry(I,_)},_d.prototype.w=function(){var I={providerId:"phone"};return this.a.fb&&(I.verificationId=this.a.fb),this.a.eb&&(I.verificationCode=this.a.eb),this.a.La&&(I.temporaryProof=this.a.La),this.a.ea&&(I.phoneNumber=this.a.ea),I};function nc(I){if(I&&I.providerId==="phone"&&(I.verificationId&&I.verificationCode||I.temporaryProof&&I.phoneNumber)){var _={};return se(["verificationId","verificationCode","temporaryProof","phoneNumber"],function(ce){I[ce]&&(_[ce]=I[ce])}),new _d(_)}return null}function Rp(I){return I.a.La&&I.a.ea?{temporaryProof:I.a.La,phoneNumber:I.a.ea}:{sessionInfo:I.a.fb,code:I.a.eb}}function sd(I){try{this.a=I||$n.auth()}catch{throw new H("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}Kc(this,{providerId:"phone",isOAuthProvider:!1})}sd.prototype.gb=function(I,_){var ce=this.a.a;return Fo(_.verify()).then(function(Ce){if(typeof Ce!="string")throw new H("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(_.type){case"recaptcha":var _e=y(I)?I.session:null,St=y(I)?I.phoneNumber:I,Lt;return _e&&_e.type==I5?Lt=_e.Ha().then(function(dn){return l4(ce,{idToken:dn,phoneEnrollmentInfo:{phoneNumber:St,recaptchaToken:Ce}})}):_e&&_e.type==$A?Lt=_e.Ha().then(function(dn){return HS(ce,{mfaPendingCredential:dn,mfaEnrollmentId:I.multiFactorHint&&I.multiFactorHint.uid||I.multiFactorUid,phoneSignInInfo:{recaptchaToken:Ce}})}):Lt=a4(ce,{phoneNumber:St,recaptchaToken:Ce}),Lt.then(function(dn){return typeof _.reset=="function"&&_.reset(),dn},function(dn){throw typeof _.reset=="function"&&_.reset(),dn});default:throw new H("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}})};function W3(I,_){if(!I)throw new H("missing-verification-id");if(!_)throw new H("missing-verification-code");return new _d({fb:I,eb:_})}Kc(sd,{PROVIDER_ID:"phone"}),Kc(sd,{PHONE_SIGN_IN_METHOD:"phone"});function N3(I){if(I.temporaryProof&&I.phoneNumber)return new _d({La:I.temporaryProof,ea:I.phoneNumber});var _=I&&I.providerId;if(!_||_==="password")return null;var ce=I&&I.oauthAccessToken,Ce=I&&I.oauthTokenSecret,_e=I&&I.nonce,St=I&&I.oauthIdToken,Lt=I&&I.pendingToken;try{switch(_){case"google.com":return My(St,ce);case"facebook.com":return E5(ce);case"github.com":return QA(ce);case"twitter.com":return $l(ce,Ce);default:return ce||Ce||St||Lt?Lt?_.indexOf("saml.")==0?new b1(_,Lt):new Od(_,{pendingToken:Lt,idToken:I.oauthIdToken,accessToken:I.oauthAccessToken},_):new J0(_).credential({idToken:St,accessToken:ce,rawNonce:_e}):null}}catch{return null}}function em(I){if(!I.isOAuthProvider)throw new H("invalid-oauth-provider")}function Ql(I,_,ce,Ce,_e,St,Lt){if(this.c=I,this.b=_||null,this.g=ce||null,this.f=Ce||null,this.i=St||null,this.h=Lt||null,this.a=_e||null,this.g||this.a){if(this.g&&this.a)throw new H("invalid-auth-event");if(this.g&&!this.f)throw new H("invalid-auth-event")}else throw new H("invalid-auth-event")}Ql.prototype.getUid=function(){var I=[];return I.push(this.c),this.b&&I.push(this.b),this.f&&I.push(this.f),this.h&&I.push(this.h),I.join("-")},Ql.prototype.T=function(){return this.h},Ql.prototype.w=function(){return{type:this.c,eventId:this.b,urlResponse:this.g,sessionId:this.f,postBody:this.i,tenantId:this.h,error:this.a&&this.a.w()}};function ZA(I){return I=I||{},I.type?new Ql(I.type,I.eventId,I.urlResponse,I.sessionId,I.error&&F(I.error),I.postBody,I.tenantId):null}function U3(){this.b=null,this.a=[]}var S1=null;function j3(I){var _=S1;_.a.push(I),_.b||(_.b=function(ce){for(var Ce=0;Ce<_.a.length;Ce++)_.a[Ce](ce)},I=ql("universalLinks.subscribe",s),typeof I=="function"&&I(null,_.b))}function F5(I){var _="unauthorized-domain",ce=void 0,Ce=wu(I);I=Ce.a,Ce=Ce.c,Ce=="chrome-extension"?ce=rt("This chrome extension ID (chrome-extension://%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",I):Ce=="http"||Ce=="https"?ce=rt("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",I):_="operation-not-supported-in-this-environment",H.call(this,_,ce)}b(F5,H);function Tu(I,_,ce){H.call(this,I,ce),I=_||{},I.Kb&&Hr(this,"email",I.Kb),I.ea&&Hr(this,"phoneNumber",I.ea),I.credential&&Hr(this,"credential",I.credential),I.$b&&Hr(this,"tenantId",I.$b)}b(Tu,H),Tu.prototype.w=function(){var I={code:this.code,message:this.message};this.email&&(I.email=this.email),this.phoneNumber&&(I.phoneNumber=this.phoneNumber),this.tenantId&&(I.tenantId=this.tenantId);var _=this.credential&&this.credential.w();return _&&Ee(I,_),I},Tu.prototype.toJSON=function(){return this.w()};function Iy(I){if(I.code){var _=I.code||"";_.indexOf(E)==0&&(_=_.substring(E.length));var ce={credential:N3(I),$b:I.tenantId};if(I.email)ce.Kb=I.email;else if(I.phoneNumber)ce.ea=I.phoneNumber;else if(!ce.credential)return new H(_,I.message||void 0);return new Tu(_,ce,I.message)}return null}function Gd(){}Gd.prototype.c=null;function k5(I){return I.c||(I.c=I.b())}var zy;function Dy(){}b(Dy,Gd),Dy.prototype.a=function(){var I=B3(this);return I?new ActiveXObject(I):new XMLHttpRequest},Dy.prototype.b=function(){var I={};return B3(this)&&(I[0]=!0,I[1]=!0),I};function B3(I){if(!I.f&&typeof XMLHttpRequest>"u"&&typeof ActiveXObject<"u"){for(var _=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],ce=0;ce<_.length;ce++){var Ce=_[ce];try{return new ActiveXObject(Ce),I.f=Ce}catch{}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return I.f}zy=new Dy;function T1(){}b(T1,Gd),T1.prototype.a=function(){var I=new XMLHttpRequest;if("withCredentials"in I)return I;if(typeof XDomainRequest<"u")return new v0;throw Error("Unsupported browser")},T1.prototype.b=function(){return{}};function v0(){this.a=new XDomainRequest,this.readyState=0,this.onreadystatechange=null,this.responseType=this.responseText=this.response="",this.status=-1,this.statusText="",this.a.onload=w(this.qc,this),this.a.onerror=w(this.Tb,this),this.a.onprogress=w(this.rc,this),this.a.ontimeout=w(this.vc,this)}t=v0.prototype,t.open=function(I,_,ce){if(ce!=null&&!ce)throw Error("Only async requests are supported.");this.a.open(I,_)},t.send=function(I){if(I)if(typeof I=="string")this.a.send(I);else throw Error("Only string data is supported");else this.a.send()},t.abort=function(){this.a.abort()},t.setRequestHeader=function(){},t.getResponseHeader=function(I){return I.toLowerCase()=="content-type"?this.a.contentType:""},t.qc=function(){this.status=200,this.response=this.responseText=this.a.responseText,kf(this,4)},t.Tb=function(){this.status=500,this.response=this.responseText="",kf(this,4)},t.vc=function(){this.Tb()},t.rc=function(){this.status=200,kf(this,1)};function kf(I,_){I.readyState=_,I.onreadystatechange&&I.onreadystatechange()}t.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType};function cd(I,_,ce){this.reset(I,_,ce,void 0,void 0)}cd.prototype.a=null,cd.prototype.reset=function(I,_,ce,Ce,_e){delete this.a};function tm(I){this.f=I,this.b=this.c=this.a=null}function $r(I,_){this.name=I,this.value=_}$r.prototype.toString=function(){return this.name};var m7=new $r("SEVERE",1e3),Y3=new $r("WARNING",900),Ey=new $r("CONFIG",700),RS=new $r("FINE",500);function P1(I){return I.c?I.c:I.a?P1(I.a):(B("Root logger has no level set."),null)}tm.prototype.log=function(I,_,ce){if(I.value>=P1(this).value)for(A(_)&&(_=_()),I=new cd(I,String(_),this.f),ce&&(I.a=ce),ce=this;ce;)ce=ce.a};var e4={},K0=null;function O3(I){K0||(K0=new tm(""),e4[""]=K0,K0.c=Ey);var _;if(!(_=e4[I])){_=new tm(I);var ce=I.lastIndexOf("."),Ce=I.substr(ce+1);ce=O3(I.substr(0,ce)),ce.b||(ce.b={}),ce.b[Ce]=_,_.a=ce,e4[I]=_}return _}function oc(I,_){I&&I.log(RS,_,void 0)}function Fy(I){this.f=I}b(Fy,Gd),Fy.prototype.a=function(){return new L5(this.f)},Fy.prototype.b=function(I){return function(){return I}}({});function L5(I){Kl.call(this),this.u=I,this.h=void 0,this.readyState=W5,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.l=new Headers,this.b=null,this.s="GET",this.f="",this.a=!1,this.i=O3("goog.net.FetchXmlHttp"),this.m=this.c=this.g=null}b(L5,Kl);var W5=0;t=L5.prototype,t.open=function(I,_){if(this.readyState!=W5)throw this.abort(),Error("Error reopening a connection");this.s=I,this.f=_,this.readyState=1,ky(this)},t.send=function(I){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.a=!0;var _={headers:this.l,method:this.s,credentials:this.h,cache:void 0};I&&(_.body=I),this.u.fetch(new Request(this.f,_)).then(this.uc.bind(this),this.Va.bind(this))},t.abort=function(){this.response=this.responseText="",this.l=new Headers,this.status=0,this.c&&this.c.cancel("Request was aborted."),1<=this.readyState&&this.a&&this.readyState!=4&&(this.a=!1,Lf(this)),this.readyState=W5},t.uc=function(I){this.a&&(this.g=I,this.b||(this.status=this.g.status,this.statusText=this.g.statusText,this.b=I.headers,this.readyState=2,ky(this)),this.a&&(this.readyState=3,ky(this),this.a&&(this.responseType==="arraybuffer"?I.arrayBuffer().then(this.sc.bind(this),this.Va.bind(this)):typeof s.ReadableStream<"u"&&"body"in I?(this.response=this.responseText="",this.c=I.body.getReader(),this.m=new TextDecoder,x0(this)):I.text().then(this.tc.bind(this),this.Va.bind(this)))))};function x0(I){I.c.read().then(I.pc.bind(I)).catch(I.Va.bind(I))}t.pc=function(I){if(this.a){var _=this.m.decode(I.value?I.value:new Uint8Array(0),{stream:!I.done});_&&(this.response=this.responseText+=_),I.done?Lf(this):ky(this),this.readyState==3&&x0(this)}},t.tc=function(I){this.a&&(this.response=this.responseText=I,Lf(this))},t.sc=function(I){this.a&&(this.response=I,Lf(this))},t.Va=function(I){var _=this.i;_&&_.log(Y3,"Failed to fetch url "+this.f,I instanceof Error?I:Error(I)),this.a&&Lf(this)};function Lf(I){I.readyState=4,I.g=null,I.c=null,I.m=null,ky(I)}t.setRequestHeader=function(I,_){this.l.append(I,_)},t.getResponseHeader=function(I){return this.b?this.b.get(I.toLowerCase())||"":((I=this.i)&&I.log(Y3,"Attempting to get response header but no headers have been received for url: "+this.f,void 0),"")},t.getAllResponseHeaders=function(){if(!this.b){var I=this.i;return I&&I.log(Y3,"Attempting to get all response headers but no headers have been received for url: "+this.f,void 0),""}I=[];for(var _=this.b.entries(),ce=_.next();!ce.done;)ce=ce.value,I.push(ce[0]+": "+ce[1]),ce=_.next();return I.join(`\r `)};function ky(I){I.onreadystatechange&&I.onreadystatechange.call(I)}Object.defineProperty(L5.prototype,"withCredentials",{get:function(){return this.h==="include"},set:function(I){this.h=I?"include":"same-origin"}});function Ly(I){Kl.call(this),this.headers=new V0,this.D=I||null,this.c=!1,this.C=this.a=null,this.h=this.P=this.l="",this.f=this.N=this.i=this.J=!1,this.g=0,this.s=null,this.m=N5,this.u=this.S=!1}b(Ly,Kl);var N5="";Ly.prototype.b=O3("goog.net.XhrIo");var nm=/^https?$/i,y7=["POST","PUT"];function om(I,_,ce,Ce,_e){if(I.a)throw Error("[goog.net.XhrIo] Object is active with another request="+I.l+"; newUri="+_);ce=ce?ce.toUpperCase():"GET",I.l=_,I.h="",I.P=ce,I.J=!1,I.c=!0,I.a=I.D?I.D.a():zy.a(),I.C=I.D?k5(I.D):k5(zy),I.a.onreadystatechange=w(I.Wb,I);try{oc(I.b,Lh(I,"Opening Xhr")),I.N=!0,I.a.open(ce,String(_),!0),I.N=!1}catch(Lt){oc(I.b,Lh(I,"Error opening Xhr: "+Lt.message)),C1(I,Lt);return}_=Ce||"";var St=new V0(I.headers);_e&&m1(_e,function(Lt,dn){St.set(dn,Lt)}),_e=de(St.Y()),Ce=s.FormData&&_ instanceof s.FormData,!he(y7,ce)||_e||Ce||St.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),St.forEach(function(Lt,dn){this.a.setRequestHeader(dn,Lt)},I),I.m&&(I.a.responseType=I.m),"withCredentials"in I.a&&I.a.withCredentials!==I.S&&(I.a.withCredentials=I.S);try{n4(I),0=_.l&&_.cancel())}this.u?this.u.call(this.s,this):this.v=!0,this.a||(I=new U5,Wy(this),Xd(this,!1,I))}},im.prototype.m=function(I,_){this.i=!1,Xd(this,I,_)};function Xd(I,_,ce){I.a=!0,I.c=ce,I.f=!_,Jd(I)}function Wy(I){if(I.a){if(!I.v)throw new r4;I.v=!1}}function am(I,_){Ny(I,null,_,void 0)}function Ny(I,_,ce,Ce){I.g.push([_,ce,Ce]),I.a&&Jd(I)}im.prototype.then=function(I,_,ce){var Ce,_e,St=new Yo(function(Lt,dn){Ce=Lt,_e=dn});return Ny(this,Ce,function(Lt){Lt instanceof U5?St.cancel():_e(Lt)}),St.then(I,_,ce)},im.prototype.$goog_Thenable=!0;function b0(I){return oe(I.g,function(_){return A(_[1])})}function Jd(I){if(I.h&&I.a&&b0(I)){var _=I.h,ce=Hp[_];ce&&(s.clearTimeout(ce.a),delete Hp[_]),I.h=0}I.b&&(I.b.l--,delete I.b),_=I.c;for(var Ce=ce=!1;I.g.length&&!I.i;){var _e=I.g.shift(),St=_e[0],Lt=_e[1];if(_e=_e[2],St=I.f?Lt:St)try{var dn=St.call(_e||I.s,_);dn!==void 0&&(I.f=I.f&&(dn==_||dn instanceof Error),I.c=_=dn),(D(_)||typeof s.Promise=="function"&&_ instanceof s.Promise)&&(Ce=!0,I.i=!0)}catch(lo){_=lo,I.f=!0,b0(I)||(ce=!0)}}I.c=_,Ce&&(dn=w(I.m,I,!0),Ce=w(I.m,I,!1),_ instanceof im?(Ny(_,dn,Ce),_.C=!0):_.then(dn,Ce)),ce&&(_=new j5(_),Hp[_.a]=_,I.h=_.a)}function r4(){L.call(this)}b(r4,L),r4.prototype.message="Deferred has already fired",r4.prototype.name="AlreadyCalledError";function U5(){L.call(this)}b(U5,L),U5.prototype.message="Deferred was canceled",U5.prototype.name="CanceledError";function j5(I){this.a=s.setTimeout(w(this.c,this),0),this.b=I}j5.prototype.c=function(){throw delete Hp[this.a],this.b};var Hp={};function _3(I){var _={},ce=_.document||document,Ce=ut(I).toString(),_e=jo(document,"SCRIPT"),St={Xb:_e,Ma:void 0},Lt=new im(St),dn=null,lo=_.timeout!=null?_.timeout:5e3;return 0"u"||typeof s.Headers>"u"||typeof s.Request>"u"))throw new H("operation-not-supported-in-this-environment","fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment.");var Lt=new Ly(this.f);if(St){Lt.g=Math.max(0,St);var dn=setTimeout(function(){Lt.dispatchEvent("timeout")},St)}O0(Lt,"complete",function(){dn&&clearTimeout(dn);var lo=null;try{lo=JSON.parse(Wf(this))||null}catch{lo=null}_&&_(lo)}),Mh(Lt,"ready",function(){dn&&clearTimeout(dn),Ot(this)}),Mh(Lt,"timeout",function(){dn&&clearTimeout(dn),Ot(this),_&&_(null)}),om(Lt,I,ce,Ce,_e)};var Kd=new Oe(xt,"https://apis.google.com/js/client.js?onload=%{onload}"),Fn="__fcb"+Math.floor(1e6*Math.random()).toString();function Mn(I,_){if(((window.gapi||{}).client||{}).request)I();else{s[Fn]=function(){((window.gapi||{}).client||{}).request?I():_(Error("CORS_UNSUPPORTED"))};var ce=Qe(Kd,{onload:Fn});am(_3(ce),function(){_(Error("CORS_UNSUPPORTED"))})}}Xe.prototype.s=function(I,_,ce,Ce,_e){var St=this;mt.then(function(){window.gapi.client.setApiKey(St.c);var Lt=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:I,method:ce,body:Ce,headers:_e,authType:"none",callback:function(dn){window.gapi.auth.setToken(Lt),_&&_(dn)}})}).o(function(Lt){_&&_({error:{message:Lt&&Lt.message||"CORS_UNSUPPORTED"}})})};function _n(I,_){return new Yo(function(ce,Ce){_.grant_type=="refresh_token"&&_.refresh_token||_.grant_type=="authorization_code"&&_.code?S0(I,I.l+"?key="+encodeURIComponent(I.c),function(_e){_e?_e.error?Ce(nI(_e)):_e.access_token&&_e.refresh_token?ce(_e):Ce(new H("internal-error")):Ce(new H("network-request-failed"))},"POST",r7(_).toString(),I.g,I.m.get()):Ce(new H("internal-error"))})}function xr(I,_,ce,Ce,_e,St,Lt){var dn=wu(_+ce);ol(dn,"key",I.c),Lt&&ol(dn,"cb",Date.now().toString());var lo=Ce=="GET";if(lo)for(var Mo in _e)_e.hasOwnProperty(Mo)&&ol(dn,Mo,_e[Mo]);return new Yo(function(Mi,bl){S0(I,dn.toString(),function(gl){gl?gl.error?bl(nI(gl,St||{})):Mi(gl):bl(new H("network-request-failed"))},Ce,lo?void 0:Sy(S5(_e)),I.a,I.v.get())})}function Fr(I){if(I=I.email,typeof I!="string"||!m5.test(I))throw new H("invalid-email")}function Zi(I){"email"in I&&Fr(I)}function Vi(I,_){return ka(I,Mte,{identifier:_,continueUri:b5()?ui():"http://localhost"}).then(function(ce){return ce.signinMethods||[]})}function ra(I){return ka(I,MU,{}).then(function(_){return _.authorizedDomains||[]})}function Ba(I){if(!I[rn])throw I.mfaPendingCredential?new H("multi-factor-auth-required",null,nt(I)):new H("internal-error")}function Pa(I){if(I.phoneNumber||I.temporaryProof){if(!I.phoneNumber||!I.temporaryProof)throw new H("internal-error")}else{if(!I.sessionInfo)throw new H("missing-verification-id");if(!I.code)throw new H("missing-verification-code")}}Xe.prototype.Ab=function(){return ka(this,zU,{})},Xe.prototype.Cb=function(I,_){return ka(this,IU,{idToken:I,email:_})},Xe.prototype.Db=function(I,_){return ka(this,$M,{idToken:I,password:_})};var Mp={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};t=Xe.prototype,t.Eb=function(I,_){var ce={idToken:I},Ce=[];return Je(Mp,function(_e,St){var Lt=_[St];Lt===null?Ce.push(_e):St in _&&(ce[St]=Lt)}),Ce.length&&(ce.deleteAttribute=Ce),ka(this,IU,ce)},t.wb=function(I,_){return I={requestType:"PASSWORD_RESET",email:I},Ee(I,_),ka(this,HU,I)},t.xb=function(I,_){return I={requestType:"EMAIL_SIGNIN",email:I},Ee(I,_),ka(this,Ete,I)},t.vb=function(I,_){return I={requestType:"VERIFY_EMAIL",idToken:I},Ee(I,_),ka(this,Fte,I)},t.Fb=function(I,_,ce){return I={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:I,newEmail:_},Ee(I,ce),ka(this,w7,I)};function a4(I,_){return ka(I,Wte,_)}t.gb=function(I){return ka(this,zS,I)};function l4(I,_){return ka(I,Nte,_).then(function(ce){return ce.phoneSessionInfo.sessionInfo})}function gi(I){if(!I.phoneVerificationInfo)throw new H("internal-error");if(!I.phoneVerificationInfo.sessionInfo)throw new H("missing-verification-id");if(!I.phoneVerificationInfo.code)throw new H("missing-verification-code")}function HS(I,_){return ka(I,QM,_).then(function(ce){return ce.phoneResponseInfo.sessionInfo})}function _M(I,_,ce){return ka(I,zte,{idToken:_,deleteProvider:ce})}function Uy(I){if(!I.requestUri||!I.sessionId&&!I.postBody&&!I.pendingToken)throw new H("internal-error")}function GM(I,_){return _.oauthIdToken&&_.providerId&&_.providerId.indexOf("oidc.")==0&&!_.pendingToken&&(I.sessionId?_.nonce=I.sessionId:I.postBody&&(I=new Vg(I.postBody),ys(I,"nonce")&&(_.nonce=I.get("nonce")))),_}function MS(I){var _=null;if(I.needConfirmation?(I.code="account-exists-with-different-credential",_=Iy(I)):I.errorMessage=="FEDERATED_USER_ID_ALREADY_LINKED"?(I.code="credential-already-in-use",_=Iy(I)):I.errorMessage=="EMAIL_EXISTS"?(I.code="email-already-in-use",_=Iy(I)):I.errorMessage&&(_=tI(I.errorMessage)),_)throw _;Ba(I)}function IS(I,_){return _.returnIdpCredential=!0,ka(I,DU,_)}function $0(I,_){return _.returnIdpCredential=!0,ka(I,ZM,_)}function XM(I,_){return _.returnIdpCredential=!0,_.autoCreate=!1,ka(I,v7,_)}function JM(I){if(!I.oobCode)throw new H("invalid-action-code")}t.ob=function(I,_){return ka(this,Lte,{oobCode:I,newPassword:_})},t.Sa=function(I){return ka(this,Hte,{oobCode:I})},t.kb=function(I){return ka(this,CU,{oobCode:I})};var CU={endpoint:"setAccountInfo",A:JM,Z:"email",B:!0},Hte={endpoint:"resetPassword",A:JM,G:function(I){var _=I.requestType;if(!_||!I.email&&_!="EMAIL_SIGNIN"&&_!="VERIFY_AND_CHANGE_EMAIL")throw new H("internal-error")},B:!0},RU={endpoint:"signupNewUser",A:function(I){if(Fr(I),!I.password)throw new H("weak-password")},G:Ba,V:!0,B:!0},Mte={endpoint:"createAuthUri",B:!0},Ite={endpoint:"deleteAccount",O:["idToken"]},zte={endpoint:"setAccountInfo",O:["idToken","deleteProvider"],A:function(I){if(!Array.isArray(I.deleteProvider))throw new H("internal-error")}},jy={endpoint:"emailLinkSignin",O:["email","oobCode"],A:Fr,G:Ba,V:!0,B:!0},qd={endpoint:"emailLinkSignin",O:["idToken","email","oobCode"],A:Fr,G:Ba,V:!0},KM={endpoint:"accounts/mfaEnrollment:finalize",O:["idToken","phoneVerificationInfo"],A:gi,G:Ba,B:!0,Na:!0},Dte={endpoint:"accounts/mfaSignIn:finalize",O:["mfaPendingCredential","phoneVerificationInfo"],A:gi,G:Ba,B:!0,Na:!0},qM={endpoint:"getAccountInfo"},Ete={endpoint:"getOobConfirmationCode",O:["requestType"],A:function(I){if(I.requestType!="EMAIL_SIGNIN")throw new H("internal-error");Fr(I)},Z:"email",B:!0},Fte={endpoint:"getOobConfirmationCode",O:["idToken","requestType"],A:function(I){if(I.requestType!="VERIFY_EMAIL")throw new H("internal-error")},Z:"email",B:!0},w7={endpoint:"getOobConfirmationCode",O:["idToken","newEmail","requestType"],A:function(I){if(I.requestType!="VERIFY_AND_CHANGE_EMAIL")throw new H("internal-error")},Z:"email",B:!0},HU={endpoint:"getOobConfirmationCode",O:["requestType"],A:function(I){if(I.requestType!="PASSWORD_RESET")throw new H("internal-error");Fr(I)},Z:"email",B:!0},MU={mb:!0,endpoint:"getProjectConfig",Vb:"GET"},kte={mb:!0,endpoint:"getRecaptchaParam",Vb:"GET",G:function(I){if(!I.recaptchaSiteKey)throw new H("internal-error")}},Lte={endpoint:"resetPassword",A:JM,Z:"email",B:!0},Wte={endpoint:"sendVerificationCode",O:["phoneNumber","recaptchaToken"],Z:"sessionInfo",B:!0},IU={endpoint:"setAccountInfo",O:["idToken"],A:Zi,V:!0},$M={endpoint:"setAccountInfo",O:["idToken"],A:function(I){if(Zi(I),!I.password)throw new H("weak-password")},G:Ba,V:!0},zU={endpoint:"signupNewUser",G:Ba,V:!0,B:!0},Nte={endpoint:"accounts/mfaEnrollment:start",O:["idToken","phoneEnrollmentInfo"],A:function(I){if(!I.phoneEnrollmentInfo)throw new H("internal-error");if(!I.phoneEnrollmentInfo.phoneNumber)throw new H("missing-phone-number");if(!I.phoneEnrollmentInfo.recaptchaToken)throw new H("missing-app-credential")},G:function(I){if(!I.phoneSessionInfo||!I.phoneSessionInfo.sessionInfo)throw new H("internal-error")},B:!0,Na:!0},QM={endpoint:"accounts/mfaSignIn:start",O:["mfaPendingCredential","mfaEnrollmentId","phoneSignInInfo"],A:function(I){if(!I.phoneSignInInfo||!I.phoneSignInInfo.recaptchaToken)throw new H("missing-app-credential")},G:function(I){if(!I.phoneResponseInfo||!I.phoneResponseInfo.sessionInfo)throw new H("internal-error")},B:!0,Na:!0},DU={endpoint:"verifyAssertion",A:Uy,Za:GM,G:MS,V:!0,B:!0},v7={endpoint:"verifyAssertion",A:Uy,Za:GM,G:function(I){if(I.errorMessage&&I.errorMessage=="USER_NOT_FOUND")throw new H("user-not-found");if(I.errorMessage)throw tI(I.errorMessage);Ba(I)},V:!0,B:!0},ZM={endpoint:"verifyAssertion",A:function(I){if(Uy(I),!I.idToken)throw new H("internal-error")},Za:GM,G:MS,V:!0},EU={endpoint:"verifyCustomToken",A:function(I){if(!I.token)throw new H("invalid-custom-token")},G:Ba,V:!0,B:!0},eI={endpoint:"verifyPassword",A:function(I){if(Fr(I),!I.password)throw new H("wrong-password")},G:Ba,V:!0,B:!0},zS={endpoint:"verifyPhoneNumber",A:Pa,G:Ba,B:!0},FU={endpoint:"verifyPhoneNumber",A:function(I){if(!I.idToken)throw new H("internal-error");Pa(I)},G:function(I){if(I.temporaryProof)throw I.code="credential-already-in-use",Iy(I);Ba(I)}},lm={Ib:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",A:Pa,G:Ba,B:!0},X3={endpoint:"accounts/mfaEnrollment:withdraw",O:["idToken","mfaEnrollmentId"],G:function(I){if(!!I[rn]^!!I.refreshToken)throw new H("internal-error")},B:!0,Na:!0};function ka(I,_,ce){if(!Py(ce,_.O))return Si(new H("internal-error"));var Ce=!!_.Na,_e=_.Vb||"POST",St;return Fo(ce).then(_.A).then(function(){return _.V&&(ce.returnSecureToken=!0),_.B&&I.b&&typeof ce.tenantId>"u"&&(ce.tenantId=I.b),Ce?xr(I,I.i,_.endpoint,_e,ce,_.Ib,_.mb||!1):xr(I,I.h,_.endpoint,_e,ce,_.Ib,_.mb||!1)}).then(function(Lt){return St=Lt,_.Za?_.Za(ce,St):St}).then(_.G).then(function(){if(!_.Z)return St;if(!(_.Z in St))throw new H("internal-error");return St[_.Z]})}function tI(I){return nI({error:{errors:[{message:I}],code:400,message:I}})}function nI(I,_){var ce=(I.error&&I.error.errors&&I.error.errors[0]||{}).reason||"",Ce={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(ce=Ce[ce]?new H(Ce[ce]):null)return ce;ce=I.error&&I.error.message||"",Ce={INVALID_CUSTOM_TOKEN:"invalid-custom-token",CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_OR_INVALID_NONCE:"missing-or-invalid-nonce",INVALID_MESSAGE_PAYLOAD:"invalid-message-payload",INVALID_RECIPIENT_EMAIL:"invalid-recipient-email",INVALID_SENDER:"invalid-sender",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",INVALID_PROVIDER_ID:"invalid-provider-id",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",CORS_UNSUPPORTED:"cors-unsupported",DYNAMIC_LINK_NOT_ACTIVATED:"dynamic-link-not-activated",INVALID_APP_ID:"invalid-app-id",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled",CAPTCHA_CHECK_FAILED:"captcha-check-failed",INVALID_APP_CREDENTIAL:"invalid-app-credential",INVALID_CODE:"invalid-verification-code",INVALID_PHONE_NUMBER:"invalid-phone-number",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_APP_CREDENTIAL:"missing-app-credential",MISSING_CODE:"missing-verification-code",MISSING_PHONE_NUMBER:"missing-phone-number",MISSING_SESSION_INFO:"missing-verification-id",QUOTA_EXCEEDED:"quota-exceeded",SESSION_EXPIRED:"code-expired",REJECTED_CREDENTIAL:"rejected-credential",INVALID_CONTINUE_URI:"invalid-continue-uri",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",MISSING_IOS_BUNDLE_ID:"missing-ios-bundle-id",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_DYNAMIC_LINK_DOMAIN:"invalid-dynamic-link-domain",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",INVALID_CERT_HASH:"invalid-cert-hash",UNSUPPORTED_TENANT_OPERATION:"unsupported-tenant-operation",INVALID_TENANT_ID:"invalid-tenant-id",TENANT_ID_MISMATCH:"tenant-id-mismatch",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",EMAIL_CHANGE_NEEDS_VERIFICATION:"email-change-needs-verification",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",UNSUPPORTED_FIRST_FACTOR:"unsupported-first-factor",UNVERIFIED_EMAIL:"unverified-email"},Ee(Ce,_||{}),_=(_=ce.match(/^[^\s]+\s*:\s*([\s\S]*)$/))&&1<_.length?_[1]:void 0;for(var _e in Ce)if(ce.indexOf(_e)===0)return new H(Ce[_e],_);return!_&&I&&(_=Tp(I)),new H("internal-error",_)}function Ute(I){this.b=I,this.a=null,this.sb=jte(this)}function jte(I){return Gte().then(function(){return new Yo(function(_,ce){ql("gapi.iframes.getContext")().open({where:document.body,url:I.b,messageHandlersFilter:ql("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},function(Ce){function _e(){clearTimeout(St),_()}I.a=Ce,I.a.restyle({setHideOnLeave:!1});var St=setTimeout(function(){ce(Error("Network Error"))},_te.get());Ce.ping(_e).then(_e,function(){ce(Error("Network Error"))})})})})}function Bte(I,_){return I.sb.then(function(){return new Yo(function(ce){I.a.send(_.type,_,ce,ql("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})})}function Yte(I,_){I.sb.then(function(){I.a.register("authEvent",_,ql("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})}var Ote=new Oe(xt,"https://apis.google.com/js/api.js?onload=%{onload}"),Vte=new Df(3e4,6e4),_te=new Df(5e3,15e3),DS=null;function Gte(){return DS||(DS=new Yo(function(I,_){function ce(){P5(),ql("gapi.load")("gapi.iframes",{callback:I,ontimeout:function(){P5(),_(Error("Network Error"))},timeout:Vte.get()})}if(ql("gapi.iframes.Iframe"))I();else if(ql("gapi.load"))ce();else{var Ce="__iframefcb"+Math.floor(1e6*Math.random()).toString();s[Ce]=function(){ql("gapi.load")?ce():_(Error("Network Error"))},Ce=Qe(Ote,{onload:Ce}),Fo(_3(Ce)).o(function(){_(Error("Network Error"))})}}).o(function(I){throw DS=null,I}))}function kU(I,_,ce,Ce){this.l=I,this.h=_,this.i=ce,this.g=Ce,this.f=null,this.g?(I=wu(this.g.url),I=p5(I.c,I.a,I.g,"/emulator/auth/iframe")):I=p5("https",this.l,null,"/__/auth/iframe"),this.a=I,ol(this.a,"apiKey",this.h),ol(this.a,"appName",this.i),this.b=null,this.c=[]}kU.prototype.toString=function(){return this.f?ol(this.a,"v",this.f):Gc(this.a.b,"v"),this.b?ol(this.a,"eid",this.b):Gc(this.a.b,"eid"),this.c.length?ol(this.a,"fw",this.c.join(",")):Gc(this.a.b,"fw"),this.a.toString()};function ES(I,_,ce,Ce,_e,St){this.u=I,this.s=_,this.c=ce,this.m=Ce,this.v=St,this.i=this.g=this.l=null,this.a=_e,this.h=this.f=null}ES.prototype.zb=function(I){return this.h=I,this},ES.prototype.toString=function(){if(this.v){var I=wu(this.v.url);I=p5(I.c,I.a,I.g,"/emulator/auth/handler")}else I=p5("https",this.u,null,"/__/auth/handler");if(ol(I,"apiKey",this.s),ol(I,"appName",this.c),ol(I,"authType",this.m),this.a.isOAuthProvider){var _=this.a;try{var ce=$n.app(this.c).auth().la()}catch{ce=null}_.pb=ce,ol(I,"providerId",this.a.providerId),ce=this.a,_=S5(ce.Jb);for(var Ce in _)_[Ce]=_[Ce].toString();Ce=ce.Qc,_=nt(_);for(var _e=0;_e"u"&&delete dn[lo]}),I.ports[0].postMessage({status:"done",eventId:ce,eventType:_,response:Lt})})}};function Wh(I,_,ce){Ue(I.a)&&I.b.addEventListener("message",I.f),typeof I.a[_]>"u"&&(I.a[_]=[]),I.a[_].push(ce)}function YU(I){this.a=I}YU.prototype.postMessage=function(I,_){this.a.postMessage(I,_)};function OU(I){this.c=I,this.b=!1,this.a=[]}function VU(I,_,ce,Ce){var _e,St=ce||{},Lt,dn,lo,Mo=null;if(I.b)return Si(Error("connection_unavailable"));var Mi=Ce?800:50,bl=typeof MessageChannel<"u"?new MessageChannel:null;return new Yo(function(gl,Q0){bl?(_e=Math.floor(Math.random()*Math.pow(10,20)).toString(),bl.port1.start(),dn=setTimeout(function(){Q0(Error("unsupported_event"))},Mi),Lt=function(Oy){Oy.data.eventId===_e&&(Oy.data.status==="ack"?(clearTimeout(dn),lo=setTimeout(function(){Q0(Error("timeout"))},3e3)):Oy.data.status==="done"?(clearTimeout(lo),typeof Oy.data.response<"u"?gl(Oy.data.response):Q0(Error("unknown_error"))):(clearTimeout(dn),clearTimeout(lo),Q0(Error("invalid_response"))))},Mo={messageChannel:bl,onMessage:Lt},I.a.push(Mo),bl.port1.addEventListener("message",Lt),I.c.postMessage({eventType:_,eventId:_e,data:St},[bl.port2])):Q0(Error("connection_unavailable"))}).then(function(gl){return kS(I,Mo),gl}).o(function(gl){throw kS(I,Mo),gl})}function kS(I,_){if(_){var ce=_.messageChannel,Ce=_.onMessage;ce&&(ce.port1.removeEventListener("message",Ce),ce.port1.close()),me(I.a,function(_e){return _e==_})}}OU.prototype.close=function(){for(;0"u"&&(Ce=null);var _e=s.localStorage.getItem(ce);_e!==Ce&&(this.b[ce]=_e,this.nb(ce))}else if(_.indexOf("firebase:")==0&&this.a[_]){if(typeof I.a.a<"u"?J3(this,"local").ia(this.f):dI(this),this.m){if(ce=s.localStorage.getItem(_),Ce=I.a.newValue,Ce!==ce)Ce!==null?s.localStorage.setItem(_,Ce):s.localStorage.removeItem(_);else if(this.b[_]===Ce&&typeof I.a.a>"u")return}var St=this;ce=function(){(typeof I.a.a<"u"||St.b[_]!==s.localStorage.getItem(_))&&(St.b[_]=s.localStorage.getItem(_),St.nb(_))},ot&&po&&po==10&&s.localStorage.getItem(_)!==I.a.newValue&&I.a.newValue!==I.a.oldValue?setTimeout(ce,10):ce()}}else se(I,w(this.nb,this))},t.nb=function(I){this.a[I]&&se(this.a[I],function(_){_()})};function ane(I){this.a=I,this.b=P7()}var fI={name:"authEvent",F:"local"};function lne(I){return I.b.get(fI,I.a).then(function(_){return ZA(_)})}function sne(){this.a=P7()}function cne(){this.b=-1}function NS(I,_){this.b=tj,this.f=s.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=I,this.h=_,this.l=s.Int32Array?new Int32Array(64):Array(64),US===void 0&&(s.Int32Array?US=new Int32Array(mI):US=mI),this.reset()}var US;b(NS,cne);for(var tj=64,une=tj-1,nj=[],hI=0;hI_;_++){_e=ce[_-15]|0,Ce=ce[_-2]|0;var St=(ce[_-16]|0)+((_e>>>7|_e<<25)^(_e>>>18|_e<<14)^_e>>>3)|0,Lt=(ce[_-7]|0)+((Ce>>>17|Ce<<15)^(Ce>>>19|Ce<<13)^Ce>>>10)|0;ce[_]=St+Lt|0}Ce=I.a[0]|0,_e=I.a[1]|0;var dn=I.a[2]|0,lo=I.a[3]|0,Mo=I.a[4]|0,Mi=I.a[5]|0,bl=I.a[6]|0;for(St=I.a[7]|0,_=0;64>_;_++){var gl=((Ce>>>2|Ce<<30)^(Ce>>>13|Ce<<19)^(Ce>>>22|Ce<<10))+(Ce&_e^Ce&dn^_e&dn)|0;Lt=Mo&Mi^~Mo&bl,St=St+((Mo>>>6|Mo<<26)^(Mo>>>11|Mo<<21)^(Mo>>>25|Mo<<7))|0,Lt=Lt+(US[_]|0)|0,Lt=St+(Lt+(ce[_]|0)|0)|0,St=bl,bl=Mi,Mi=Mo,Mo=lo+Lt|0,lo=dn,dn=_e,_e=Ce,Ce=Lt+gl|0}I.a[0]=I.a[0]+Ce|0,I.a[1]=I.a[1]+_e|0,I.a[2]=I.a[2]+dn|0,I.a[3]=I.a[3]+lo|0,I.a[4]=I.a[4]+Mo|0,I.a[5]=I.a[5]+Mi|0,I.a[6]=I.a[6]+bl|0,I.a[7]=I.a[7]+St|0}function gI(I,_,ce){ce===void 0&&(ce=_.length);var Ce=0,_e=I.c;if(typeof _=="string")for(;Ce=St&&St==(St|0)))throw Error("message must be a byte array");I.f[_e++]=St,_e==I.b&&(pI(I),_e=0)}else throw Error("message must be string or array");I.c=_e,I.g+=ce}var mI=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function yI(){NS.call(this,8,dne)}b(yI,NS);var dne=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function rj(I,_,ce,Ce,_e,St){this.v=I,this.i=_,this.l=ce,this.m=Ce||null,this.u=_e||null,this.s=St,this.h=_+":"+ce,this.C=new sne,this.g=new ane(this.h),this.f=null,this.b=[],this.a=this.c=null}function jS(I){return new H("invalid-cordova-configuration",I)}t=rj.prototype,t.ma=function(){return this.Ia?this.Ia:this.Ia=y5().then(function(){if(typeof ql("universalLinks.subscribe",s)!="function")throw jS("cordova-universal-links-plugin-fix is not installed");if(typeof ql("BuildInfo.packageName",s)>"u")throw jS("cordova-plugin-buildinfo is not installed");if(typeof ql("cordova.plugins.browsertab.openUrl",s)!="function")throw jS("cordova-plugin-browsertab is not installed");if(typeof ql("cordova.InAppBrowser.open",s)!="function")throw jS("cordova-plugin-inappbrowser is not installed")},function(){throw new H("cordova-not-ready")})};function fne(){for(var I=20,_=[];0_.c?gI(_,oj,56-_.c):gI(_,oj,_.b-(_.c-56));for(var Ce=63;56<=Ce;Ce--)_.f[Ce]=ce&255,ce/=256;for(pI(_),Ce=ce=0;Ce<_.i;Ce++)for(var _e=24;0<=_e;_e-=8)I[ce++]=_.a[Ce]>>_e&255;return YM(I)}t.Pb=function(I,_){return _(new H("operation-not-supported-in-this-environment")),Fo()},t.Nb=function(){return Si(new H("operation-not-supported-in-this-environment"))},t.ac=function(){return!1},t.Yb=function(){return!0},t.Ub=function(){return!0},t.Ob=function(I,_,ce,Ce){if(this.c)return Si(new H("redirect-operation-pending"));var _e=this,St=s.document,Lt=null,dn=null,lo=null,Mo=null;return this.c=Fo().then(function(){return em(_),aj(_e)}).then(function(){return hne(_e,I,_,ce,Ce)}).then(function(){return new Yo(function(Mi,bl){dn=function(){var gl=ql("cordova.plugins.browsertab.close",s);return Mi(),typeof gl=="function"&&gl(),_e.a&&typeof _e.a.close=="function"&&(_e.a.close(),_e.a=null),!1},_e.Ea(dn),lo=function(){Lt||(Lt=_c(2e3).then(function(){bl(new H("redirect-cancelled-by-user"))}))},Mo=function(){EA()&&lo()},St.addEventListener("resume",lo,!1),tc().toLowerCase().match(/android/)||St.addEventListener("visibilitychange",Mo,!1)}).o(function(Mi){return AI(_e).then(function(){throw Mi})})}).oa(function(){lo&&St.removeEventListener("resume",lo,!1),Mo&&St.removeEventListener("visibilitychange",Mo,!1),Lt&&Lt.cancel(),dn&&_e.Ta(dn),_e.c=null})};function hne(I,_,ce,Ce,_e){var St=fne(),Lt=new Ql(_,Ce,null,St,new H("no-auth-event"),null,_e),dn=ql("BuildInfo.packageName",s);if(typeof dn!="string")throw new H("invalid-cordova-configuration");var lo=ql("BuildInfo.displayName",s),Mo={};if(tc().toLowerCase().match(/iphone|ipad|ipod/))Mo.ibi=dn;else if(tc().toLowerCase().match(/android/))Mo.apn=dn;else return Si(new H("operation-not-supported-in-this-environment"));lo&&(Mo.appDisplayName=lo),St=BS(St),Mo.sessionId=St;var Mi=s4(I.v,I.i,I.l,_,ce,null,Ce,I.m,Mo,I.u,_e,I.s);return I.ma().then(function(){var bl=I.h;return I.C.a.set(fI,Lt.w(),bl)}).then(function(){var bl=ql("cordova.plugins.browsertab.isAvailable",s);if(typeof bl!="function")throw new H("invalid-cordova-configuration");var gl=null;bl(function(Q0){if(Q0){if(gl=ql("cordova.plugins.browsertab.openUrl",s),typeof gl!="function")throw new H("invalid-cordova-configuration");gl(Mi)}else{if(gl=ql("cordova.InAppBrowser.open",s),typeof gl!="function")throw new H("invalid-cordova-configuration");Q0=tc(),I.a=gl(Mi,Q0.match(/(iPad|iPhone|iPod).*OS 7_\d/i)||Q0.match(/(iPad|iPhone|iPod).*OS 8_\d/i)?"_blank":"_system","location=yes")}})})}function ij(I,_){for(var ce=0;ceI.f&&(I.a=I.f),_)}function MI(I,_){I.stop(),I.b=_c(Tne(I,_)).then(function(){return a7()}).then(function(){return I.h()}).then(function(){MI(I,!0)}).o(function(ce){I.i(ce)&&MI(I,!1)})}HI.prototype.stop=function(){this.b&&(this.b.cancel(),this.b=null)};function I7(I){this.f=I,this.b=this.a=null,this.c=Date.now()}I7.prototype.w=function(){return{apiKey:this.f.c,refreshToken:this.a,accessToken:this.b&&this.b.toString(),expirationTime:this.c}};function wj(I,_){typeof _>"u"&&(I.b?(_=I.b,_=_.a-_.g):_=0),I.c=Date.now()+1e3*_}function cm(I,_){I.b=H5(_[rn]||""),I.a=_.refreshToken,_=_.expiresIn,wj(I,typeof _<"u"?Number(_):void 0)}function vj(I,_){I.b=_.b,I.a=_.a,I.c=_.c}function GS(I,_){return _n(I.f,_).then(function(ce){return I.b=H5(ce.access_token),I.a=ce.refresh_token,wj(I,ce.expires_in),{accessToken:I.b.toString(),refreshToken:I.a}}).o(function(ce){throw ce.code=="auth/user-token-expired"&&(I.a=null),ce})}I7.prototype.getToken=function(I){return I=!!I,this.b&&!this.a?Si(new H("user-token-expired")):I||!this.b||Date.now()>this.c-3e4?this.a?GS(this,{grant_type:"refresh_token",refresh_token:this.a}):Fo(null):Fo({accessToken:this.b.toString(),refreshToken:this.a})};function ws(I,_){this.a=I||null,this.b=_||null,Kc(this,{lastSignInTime:I3(_||null),creationTime:I3(I||null)})}function Dc(I){return new ws(I.a,I.b)}ws.prototype.w=function(){return{lastLoginAt:this.b,createdAt:this.a}};function xj(I,_,ce,Ce,_e,St){Kc(this,{uid:I,displayName:Ce||null,photoURL:_e||null,email:ce||null,phoneNumber:St||null,providerId:_})}function Nh(I,_,ce){this.N=[],this.l=I.apiKey,this.m=I.appName,this.s=I.authDomain||null;var Ce=$n.SDK_VERSION?Xg($n.SDK_VERSION):null;this.a=new Xe(this.l,W(k),Ce),(this.u=I.emulatorConfig||null)&&Xr(this.a,this.u),this.h=new I7(this.a),KS(this,_[rn]),cm(this.h,_),Hr(this,"refreshToken",this.h.a),bj(this,ce||{}),Kl.call(this),this.P=!1,this.s&&nd()&&(this.b=d4(this.s,this.l,this.m,this.u)),this.W=[],this.i=null,this.D=D7(this),this.ba=w(this.ib,this);var _e=this;this.za=null,this.Pa=function(St){_e.xa(St.h)},this.qa=null,this.Ba=function(St){II(_e,St.c)},this.$=null,this.aa=[],this.Oa=function(St){z7(_e,St.f)},this.ja=null,this.S=new sm(this,ce),Hr(this,"multiFactor",this.S)}b(Nh,Kl),Nh.prototype.xa=function(I){this.za=I,Ei(this.a,I)};function II(I,_){I.u=_,Xr(I.a,_),I.b&&(_=I.b,I.b=d4(I.s,I.l,I.m,I.u),I.P&&(H7(_,I),R7(I.b,I)))}Nh.prototype.la=function(){return this.za};function zI(I,_){I.qa&&Or(I.qa,"languageCodeChanged",I.Pa),(I.qa=_)&&qn(_,"languageCodeChanged",I.Pa)}function DI(I,_){I.$&&Or(I.$,"emulatorConfigChanged",I.Ba),(I.$=_)&&qn(_,"emulatorConfigChanged",I.Ba)}function z7(I,_){I.aa=_,Vr(I.a,$n.SDK_VERSION?Xg($n.SDK_VERSION,I.aa):null)}Nh.prototype.Ga=function(){return Te(this.aa)};function EI(I,_){I.ja&&Or(I.ja,"frameworkChanged",I.Oa),(I.ja=_)&&qn(_,"frameworkChanged",I.Oa)}Nh.prototype.ib=function(){this.D.b&&(this.D.stop(),this.D.start())};function XS(I){try{return $n.app(I.m).auth()}catch{throw new H("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+I.m+"'!")}}function D7(I){return new HI(function(){return I.I(!0)},function(_){return!!(_&&_.code=="auth/network-request-failed")},function(){var _=I.h.c-Date.now()-3e5;return 0<_?_:0})}function JS(I){I.J||I.D.b||(I.D.start(),Or(I,"tokenChanged",I.ba),qn(I,"tokenChanged",I.ba))}function FI(I){Or(I,"tokenChanged",I.ba),I.D.stop()}function KS(I,_){I.Aa=_,Hr(I,"_lat",_)}function qS(I,_){me(I.W,function(ce){return ce==_})}function T0(I){for(var _=[],ce=0;ce"u"||Ue(I)?{}:_A(new xu(I))}).then(function(Ce){return _.a.vb(ce,Ce)}).then(function(Ce){if(_.email!=Ce)return _.reload()}).then(function(){}))},t.Fb=function(I,_){var ce=this,Ce=null;return P0(this,this.I().then(function(_e){return Ce=_e,typeof _>"u"||Ue(_)?{}:_A(new xu(_))}).then(function(_e){return ce.a.Fb(Ce,I,_e)}).then(function(_e){if(ce.email!=_e)return ce.reload()}).then(function(){}))};function P0(I,_,ce){var Ce=Cne(I,_,ce);return I.N.push(Ce),Ce.oa(function(){pe(I.N,Ce)}),Ce.o(function(_e){var St=null;throw _e&&_e.code==="auth/multi-factor-auth-required"&&(St=Aj(_e.w(),XS(I),w(I.jc,I))),St||_e})}t.jc=function(I){var _=null,ce=this;return I=Ry(Fo(I),ce.uid).then(function(Ce){return _=E7(ce,Ce,"reauthenticate"),qc(ce,Ce),ce.i=null,ce.reload()}).then(function(){return _}),P0(this,I,!0)};function Cne(I,_,ce){return I.i&&!ce?(_.cancel(),Si(I.i)):_.o(function(Ce){throw!Ce||Ce.code!="auth/user-disabled"&&Ce.code!="auth/user-token-expired"||(I.i||I.dispatchEvent(new h4("userInvalidated")),I.i=Ce),Ce})}t.toJSON=function(){return this.w()},t.w=function(){var I={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,phoneNumber:this.phoneNumber,isAnonymous:this.isAnonymous,tenantId:this.tenantId,providerData:[],apiKey:this.l,appName:this.m,authDomain:this.s,stsTokenManager:this.h.w(),redirectEventId:this.ga||null};return this.metadata&&Ee(I,this.metadata.w()),se(this.providerData,function(_){I.providerData.push(C5(_))}),Ee(I,this.S.w()),I};function Rj(I){if(!I.apiKey)return null;var _={apiKey:I.apiKey,authDomain:I.authDomain,appName:I.appName,emulatorConfig:I.emulatorConfig},ce={};if(I.stsTokenManager&&I.stsTokenManager.accessToken){ce[rn]=I.stsTokenManager.accessToken,ce.refreshToken=I.stsTokenManager.refreshToken||null;var Ce=I.stsTokenManager.expirationTime;Ce&&(ce.expiresIn=(Ce-Date.now())/1e3)}else return null;var _e=new Nh(_,ce,I);return I.providerData&&se(I.providerData,function(St){St&&WI(_e,Ef(St))}),I.redirectEventId&&(_e.ga=I.redirectEventId),_e}function Rne(I,_,ce,Ce){var _e=new Nh(I,_);return ce&&(_e.ha=ce),Ce&&z7(_e,Ce),_e.reload().then(function(){return _e})}function Hne(I,_,ce,Ce){var _e=I.h,St={};return St[rn]=_e.b&&_e.b.toString(),St.refreshToken=_e.a,_=new Nh(_||{apiKey:I.l,authDomain:I.s,appName:I.m},St),ce&&(_.ha=ce),Ce&&z7(_,Ce),Ji(_,I),_}function Mne(I){this.a=I,this.b=P7()}var jI={name:"redirectUser",F:"session"};function Hj(I){return By(I.b,jI,I.a)}function Ine(I,_){return I.b.get(jI,I.a).then(function(ce){return ce&&_&&(ce.authDomain=_),Rj(ce||{})})}function BI(I){this.a=I,this.b=P7(),this.c=null,this.f=OI(this),this.b.addListener(zp("local"),this.a,w(this.g,this))}BI.prototype.g=function(){var I=this,_=zp("local");R0(this,function(){return Fo().then(function(){return I.c&&I.c.F!="local"?I.b.get(_,I.a):null}).then(function(ce){if(ce)return YI(I,"local").then(function(){I.c=_})})})};function YI(I,_){var ce=[],Ce;for(Ce in u4)u4[Ce]!==_&&ce.push(By(I.b,zp(u4[Ce]),I.a));return ce.push(By(I.b,VI,I.a)),nr(ce)}function OI(I){var _=zp("local"),ce=zp("session"),Ce=zp("none");return rne(I.b,_,I.a).then(function(){return I.b.get(ce,I.a)}).then(function(_e){return _e?ce:I.b.get(Ce,I.a).then(function(St){return St?Ce:I.b.get(_,I.a).then(function(Lt){return Lt?_:I.b.get(VI,I.a).then(function(dn){return dn?zp(dn):_})})})}).then(function(_e){return I.c=_e,YI(I,_e.F)}).o(function(){I.c||(I.c=_)})}var VI={name:"persistence",F:"session"};function zp(I){return{name:"authUser",F:I}}BI.prototype.yb=function(I){var _=null,ce=this;return one(I),R0(this,function(){return I!=ce.c.F?ce.b.get(ce.c,ce.a).then(function(Ce){return _=Ce,YI(ce,I)}).then(function(){if(ce.c=zp(I),_)return ce.b.set(ce.c,_,ce.a)}):Fo()})};function zne(I){return R0(I,function(){return I.b.set(VI,I.c.F,I.a)})}function Mj(I,_){return R0(I,function(){return I.b.set(I.c,_.w(),I.a)})}function Ij(I){return R0(I,function(){return By(I.b,I.c,I.a)})}function C0(I,_,ce){return R0(I,function(){return I.b.get(I.c,I.a).then(function(Ce){return Ce&&_&&(Ce.authDomain=_),Ce&&ce&&(Ce.emulatorConfig=ce),Rj(Ce||{})})})}function R0(I,_){return I.f=I.f.then(_,_),I.f}function H1(I){if(this.l=!1,Hr(this,"settings",new mj),Hr(this,"app",I),Zl(this).options&&Zl(this).options.apiKey)I=$n.SDK_VERSION?Xg($n.SDK_VERSION):null,this.a=new Xe(Zl(this).options&&Zl(this).options.apiKey,W(k),I);else throw new H("invalid-api-key");this.P=[],this.s=[],this.N=[],this.Pa=$n.INTERNAL.createSubscribe(w(this.zc,this)),this.W=void 0,this.ib=$n.INTERNAL.createSubscribe(w(this.Ac,this)),p4(this,null),this.i=new BI(Zl(this).options.apiKey+":"+Zl(this).name),this.D=new Mne(Zl(this).options.apiKey+":"+Zl(this).name),this.$=Ec(this,Lj(this)),this.h=Ec(this,kne(this)),this.ba=!1,this.ja=w(this.Zc,this),this.Ba=w(this.da,this),this.qa=w(this.mc,this),this.za=w(this.wc,this),this.Aa=w(this.xc,this),this.b=null,Ej(this),this.INTERNAL={},this.INTERNAL.delete=w(this.delete,this),this.INTERNAL.logFramework=w(this.Gc,this),this.u=0,Kl.call(this),Ene(this),this.J=[],this.R=null}b(H1,Kl);function zj(I){Nt.call(this,"languageCodeChanged"),this.h=I}b(zj,Nt);function Dj(I){Nt.call(this,"emulatorConfigChanged"),this.c=I}b(Dj,Nt);function _I(I){Nt.call(this,"frameworkChanged"),this.f=I}b(_I,Nt),t=H1.prototype,t.yb=function(I){return I=this.i.yb(I),Ec(this,I)},t.xa=function(I){this.aa===I||this.l||(this.aa=I,Ei(this.a,this.aa),this.dispatchEvent(new zj(this.la())))},t.la=function(){return this.aa},t.fd=function(){var I=s.navigator;this.xa(I&&(I.languages&&I.languages[0]||I.language||I.userLanguage)||null)},t.gd=function(I,_){if(!this.R){if(!/^https?:\/\//.test(I))throw new H("argument-error","Emulator URL must start with a valid scheme (http:// or https://).");_=_?!!_.disableWarnings:!1,Dne(_),this.R={url:I,ec:_},this.settings.jb=!0,Xr(this.a,this.R),this.dispatchEvent(new Dj(this.R))}};function Dne(I){typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),s.document&&!I&&Ws().then(function(){var _=s.document.createElement("div");_.innerText="Running in emulator mode. Do not use with production credentials.",_.style.position="fixed",_.style.width="100%",_.style.backgroundColor="#ffffff",_.style.border=".1em solid #000000",_.style.color="#b50000",_.style.bottom="0px",_.style.left="0px",_.style.margin="0px",_.style.zIndex=1e4,_.style.textAlign="center",_.classList.add("firebase-emulator-warning"),s.document.body.appendChild(_)})}t.Gc=function(I){this.J.push(I),Vr(this.a,$n.SDK_VERSION?Xg($n.SDK_VERSION,this.J):null),this.dispatchEvent(new _I(this.J))},t.Ga=function(){return Te(this.J)},t.zb=function(I){this.S===I||this.l||(this.S=I,this.a.b=this.S)},t.T=function(){return this.S};function Ene(I){Object.defineProperty(I,"lc",{get:function(){return this.la()},set:function(_){this.xa(_)},enumerable:!1}),I.aa=null,Object.defineProperty(I,"ti",{get:function(){return this.T()},set:function(_){this.zb(_)},enumerable:!1}),I.S=null,Object.defineProperty(I,"emulatorConfig",{get:function(){if(this.R){var _=wu(this.R.url);_=Ef({protocol:_.c,host:_.a,port:_.g,options:Ef({disableWarnings:this.R.ec})})}else _=null;return _},enumerable:!1})}t.toJSON=function(){return{apiKey:Zl(this).options.apiKey,authDomain:Zl(this).options.authDomain,appName:Zl(this).name,currentUser:la(this)&&la(this).w()}};function GI(I){return I.Oa||Si(new H("auth-domain-config-required"))}function Ej(I){var _=Zl(I).options.authDomain,ce=Zl(I).options.apiKey;_&&nd()&&(I.Oa=I.$.then(function(){if(!I.l){if(I.b=d4(_,ce,Zl(I).name,I.R),R7(I.b,I),la(I)&&um(la(I)),I.m){um(I.m);var Ce=I.m;Ce.xa(I.la()),zI(Ce,I),Ce=I.m,z7(Ce,I.J),EI(Ce,I),Ce=I.m,II(Ce,I.R),DI(Ce,I),I.m=null}return I.b}}))}t.Gb=function(I,_){switch(I){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.g==_&&!!this.f;default:return!1}},t.na=function(I,_,ce,Ce){I=="signInViaPopup"&&this.g==Ce&&(ce&&this.C?this.C(ce):_&&!ce&&this.f&&this.f(_),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.C)},t.Fa=function(I,_){return I=="signInViaRedirect"||I=="signInViaPopup"&&this.g==_&&this.f?w(this.ic,this):null},t.ic=function(I,_,ce,Ce){var _e=this,St={requestUri:I,postBody:Ce,sessionId:_,tenantId:ce};return this.c&&(this.c.cancel(),this.c=null),_e.$.then(function(){return $3(_e,IS(_e.a,St))})},t.Xc=function(I){if(!nd())return Si(new H("operation-not-supported-in-this-environment"));var _=this,ce=k3(I.providerId),Ce=Jg(),_e=null;(!od()||M3())&&Zl(this).options.authDomain&&I.isOAuthProvider&&(_e=s4(Zl(this).options.authDomain,Zl(this).options.apiKey,Zl(this).name,"signInViaPopup",I,null,Ce,$n.SDK_VERSION||null,null,null,this.T(),this.R));var St=_0(_e,ce&&ce.va,ce&&ce.ua);return ce=GI(this).then(function(Lt){return bI(Lt,St,"signInViaPopup",I,Ce,!!_e,_.T())}).then(function(){return new Yo(function(Lt,dn){_.na("signInViaPopup",null,new H("cancelled-popup-request"),_.g),_.f=Lt,_.C=dn,_.g=Ce,_.c=dj(_.b,_,"signInViaPopup",St,Ce)})}).then(function(Lt){return St&&As(St),Lt?Ef(Lt):null}).o(function(Lt){throw St&&As(St),Lt}),Ec(this,ce)},t.Yc=function(I){if(!nd())return Si(new H("operation-not-supported-in-this-environment"));var _=this,ce=GI(this).then(function(){return zne(_.i)}).then(function(){return uj(_.b,"signInViaRedirect",I,void 0,_.T())});return Ec(this,ce)};function Fj(I){if(!nd())return Si(new H("operation-not-supported-in-this-environment"));var _=GI(I).then(function(){return I.b.ra()}).then(function(ce){return ce?Ef(ce):null});return Ec(I,_)}t.ra=function(){var I=this;return Fj(this).then(function(_){return I.b&&f4(I.b.b),_}).o(function(_){throw I.b&&f4(I.b.b),_})},t.dd=function(I){if(!I)return Si(new H("null-user"));if(this.S!=I.tenantId)return Si(new H("tenant-id-mismatch"));var _=this,ce={};ce.apiKey=Zl(this).options.apiKey,ce.authDomain=Zl(this).options.authDomain,ce.appName=Zl(this).name;var Ce=Hne(I,ce,_.D,_.Ga());return Ec(this,this.h.then(function(){if(Zl(_).options.apiKey!=I.l)return Ce.reload()}).then(function(){return la(_)&&I.uid==la(_).uid?(Ji(la(_),I),_.da(I)):(p4(_,Ce),um(Ce),_.da(Ce))}).then(function(){k7(_)}))};function Fne(I,_){var ce={};return ce.apiKey=Zl(I).options.apiKey,ce.authDomain=Zl(I).options.authDomain,ce.appName=Zl(I).name,I.R&&(ce.emulatorConfig=I.R),I.$.then(function(){return Rne(ce,_,I.D,I.Ga())}).then(function(Ce){return la(I)&&Ce.uid==la(I).uid?(Ji(la(I),Ce),I.da(Ce)):(p4(I,Ce),um(Ce),I.da(Ce))}).then(function(){k7(I)})}function p4(I,_){la(I)&&(qS(la(I),I.Ba),Or(la(I),"tokenChanged",I.qa),Or(la(I),"userDeleted",I.za),Or(la(I),"userInvalidated",I.Aa),FI(la(I))),_&&(_.W.push(I.Ba),qn(_,"tokenChanged",I.qa),qn(_,"userDeleted",I.za),qn(_,"userInvalidated",I.Aa),0this.u&&(this.u=0),this.u==0&&la(this)&&FI(la(this)),this.removeAuthTokenListener(I)},t.addAuthTokenListener=function(I){var _=this;this.s.push(I),Ec(this,this.h.then(function(){_.l||he(_.s,I)&&I(Yy(_))}))},t.removeAuthTokenListener=function(I){me(this.s,function(_){return _==I})};function Lne(I,_){I.N.push(_),Ec(I,I.h.then(function(){!I.l&&he(I.N,_)&&I.W!==I.getUid()&&(I.W=I.getUid(),_(Yy(I)))}))}t.delete=function(){this.l=!0;for(var I=0;I"u"||Ue(_)?{}:_A(new xu(_))}).then(function(Ce){return ce.a.wb(I,Ce)}).then(function(){}))},t.Wc=function(I,_){return Ec(this,PI(this,I,_,w(this.ab,this)))},t.Vc=function(I,_){var ce=this;return Ec(this,Fo().then(function(){var Ce=_||ui(),_e=js(I,Ce);if(Ce=Su(Ce),!Ce)throw new H("argument-error","Invalid email link!");if(Ce.tenantId!==ce.T())throw new H("tenant-id-mismatch");return ce.ab(_e)}))};function L7(){}L7.prototype.render=function(){},L7.prototype.reset=function(){},L7.prototype.getResponse=function(){},L7.prototype.execute=function(){};function g4(){this.a={},this.b=1e12}var QS=null;g4.prototype.render=function(I,_){return this.a[this.b.toString()]=new eT(I,_),this.b++},g4.prototype.reset=function(I){var _=ZS(this,I);I=Wj(I),_&&I&&(_.delete(),delete this.a[I])},g4.prototype.getResponse=function(I){return(I=ZS(this,I))?I.getResponse():null},g4.prototype.execute=function(I){(I=ZS(this,I))&&I.execute()};function ZS(I,_){return(_=Wj(_))&&I.a[_]||null}function Wj(I){return(I=typeof I>"u"?1e12:I)?I.toString():null}function eT(I,_){this.g=!1,this.c=_,this.a=this.b=null,this.h=this.c.size!=="invisible",this.f=fo(I);var ce=this;this.i=function(){ce.execute()},this.h?this.execute():qn(this.f,"click",this.i)}eT.prototype.getResponse=function(){return XI(this),this.b},eT.prototype.execute=function(){XI(this);var I=this;this.a||(this.a=setTimeout(function(){I.b=DA();var _=I.c.callback,ce=I.c["expired-callback"];if(_)try{_(I.b)}catch{}I.a=setTimeout(function(){if(I.a=null,I.b=null,ce)try{ce()}catch{}I.h&&I.execute()},6e4)},500))},eT.prototype.delete=function(){XI(this),this.g=!0,clearTimeout(this.a),this.a=null,Or(this.f,"click",this.i)};function XI(I){if(I.g)throw Error("reCAPTCHA mock was already deleted!")}function JI(){}Hr(JI,"FACTOR_ID","phone");function KI(){}KI.prototype.g=function(){return QS||(QS=new g4),Fo(QS)},KI.prototype.c=function(){};var qI=null;function $I(){this.b=s.grecaptcha?1/0:0,this.f=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}var Wne=new Oe(xt,"https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),Nne=new Df(3e4,6e4);$I.prototype.g=function(I){var _=this;return new Yo(function(ce,Ce){var _e=setTimeout(function(){Ce(new H("network-request-failed"))},Nne.get());if(!s.grecaptcha||I!==_.f&&!_.b){s[_.a]=function(){if(s.grecaptcha){_.f=I;var Lt=s.grecaptcha.render;s.grecaptcha.render=function(dn,lo){return dn=Lt(dn,lo),_.b++,dn},clearTimeout(_e),ce(s.grecaptcha)}else clearTimeout(_e),Ce(new H("internal-error"));delete s[_.a]};var St=Qe(Wne,{onload:_.a,hl:I||""});Fo(_3(St)).o(function(){clearTimeout(_e),Ce(new H("internal-error","Unable to load external reCAPTCHA dependencies!"))})}else clearTimeout(_e),ce(s.grecaptcha)})},$I.prototype.c=function(){this.b--};var QI=null;function ZI(I,_,ce,Ce,_e,St,Lt){if(Hr(this,"type","recaptcha"),this.c=this.f=null,this.J=!1,this.v=_,this.g=null,Lt?(qI||(qI=new KI),Lt=qI):(QI||(QI=new $I),Lt=QI),this.m=Lt,this.a=ce||{theme:"light",type:"image"},this.h=[],this.a[jj])throw new H("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.i=this.a[Une]==="invisible",!s.document)throw new H("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!fo(_)||!this.i&&fo(_).hasChildNodes())throw new H("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.s=new Xe(I,St||null,_e||null),this.u=Ce||function(){return null};var dn=this;this.l=[];var lo=this.a[Nj];this.a[Nj]=function(Mi){if(Bj(dn,Mi),typeof lo=="function")lo(Mi);else if(typeof lo=="string"){var bl=ql(lo,s);typeof bl=="function"&&bl(Mi)}};var Mo=this.a[Uj];this.a[Uj]=function(){if(Bj(dn,null),typeof Mo=="function")Mo();else if(typeof Mo=="string"){var Mi=ql(Mo,s);typeof Mi=="function"&&Mi()}}}var Nj="callback",Uj="expired-callback",jj="sitekey",Une="size";function Bj(I,_){for(var ce=0;ce_e||_e>=Oj.length)throw new H("internal-error","Argument validator received an unsupported number of arguments.");ce=Oj[_e],Ce=(Ce?"":ce+" argument ")+(_.name?'"'+_.name+'" ':"")+"must be "+_.K+".";break e}Ce=null}}if(Ce)throw new H("argument-error",I+" failed: "+Ce)}var Oj="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");function Nr(I,_){return{name:I||"",K:"a valid string",optional:!!_,M:function(ce){return typeof ce=="string"}}}function nz(I,_){return{name:I||"",K:"a boolean",optional:!!_,M:function(ce){return typeof ce=="boolean"}}}function c0(I,_){return{name:I||"",K:"a valid object",optional:!!_,M:y}}function Y5(I,_){return{name:I||"",K:"a function",optional:!!_,M:function(ce){return typeof ce=="function"}}}function M1(I,_){return{name:I||"",K:"null",optional:!!_,M:function(ce){return ce===null}}}function Vj(){return{name:"",K:"an HTML element",optional:!1,M:function(I){return!!(I&&I instanceof Element)}}}function Bne(){return{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(I){return!!(I&&I instanceof H1)}}}function Yne(){return{name:"app",K:"an instance of Firebase App",optional:!0,M:function(I){return!!(I&&I instanceof $n.app.App)}}}function O5(I){return{name:I?I+"Credential":"credential",K:I?"a valid "+I+" credential":"a valid credential",optional:!1,M:function(_){if(!_)return!1;var ce=!I||_.providerId===I;return!(!_.ka||!ce)}}}function nT(){return{name:"multiFactorAssertion",K:"a valid multiFactorAssertion",optional:!1,M:function(I){return I?!!I.tb:!1}}}function m4(){return{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(I){return!!(I&&I.providerId&&I.hasOwnProperty&&I.hasOwnProperty("isOAuthProvider"))}}}function oz(I,_){return y(I)&&typeof I.type=="string"&&I.type===_&&typeof I.Ha=="function"}function _j(I){return y(I)&&typeof I.uid=="string"}function Pu(){return{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(I){return!(!I||typeof I.type!="string"||typeof I.verify!="function")}}}function rc(I,_,ce,Ce){return{name:ce||"",K:I.K+" or "+_.K,optional:!!Ce,M:function(_e){return I.M(_e)||_.M(_e)}}}function ic(I,_){for(var ce in _){var Ce=_[ce].name;I[Ce]=Xj(Ce,I[ce],_[ce].j)}}function Gj(I,_){for(var ce in _){var Ce=_[ce].name;Ce!==ce&&Object.defineProperty(I,Ce,{get:x(function(_e){return this[_e]},ce),set:x(function(_e,St,Lt,dn){Yj(_e,[Lt],[dn],!0),this[St]=dn},Ce,ce,_[ce].lb),enumerable:!0})}}function $c(I,_,ce,Ce){I[_]=Xj(_,ce,Ce)}function Xj(I,_,ce){function Ce(){var Lt=Array.prototype.slice.call(arguments);return Yj(_e,ce,Lt),_.apply(this,Lt)}if(!ce)return _;var _e=rz(I),St;for(St in _)Ce[St]=_[St];for(St in _.prototype)Ce.prototype[St]=_.prototype[St];return Ce}function rz(I){return I=I.split("."),I[I.length-1]}ic(H1.prototype,{kb:{name:"applyActionCode",j:[Nr("code")]},Sa:{name:"checkActionCode",j:[Nr("code")]},ob:{name:"confirmPasswordReset",j:[Nr("code"),Nr("newPassword")]},dc:{name:"createUserWithEmailAndPassword",j:[Nr("email"),Nr("password")]},hc:{name:"fetchSignInMethodsForEmail",j:[Nr("email")]},ra:{name:"getRedirectResult",j:[]},Bc:{name:"isSignInWithEmailLink",j:[Nr("emailLink")]},Hc:{name:"onAuthStateChanged",j:[rc(c0(),Y5(),"nextOrObserver"),Y5("opt_error",!0),Y5("opt_completed",!0)]},Ic:{name:"onIdTokenChanged",j:[rc(c0(),Y5(),"nextOrObserver"),Y5("opt_error",!0),Y5("opt_completed",!0)]},wb:{name:"sendPasswordResetEmail",j:[Nr("email"),rc(c0("opt_actionCodeSettings",!0),M1(null,!0),"opt_actionCodeSettings",!0)]},xb:{name:"sendSignInLinkToEmail",j:[Nr("email"),c0("actionCodeSettings")]},yb:{name:"setPersistence",j:[Nr("persistence")]},Sc:{name:"signInAndRetrieveDataWithCredential",j:[O5()]},Ab:{name:"signInAnonymously",j:[]},ab:{name:"signInWithCredential",j:[O5()]},Tc:{name:"signInWithCustomToken",j:[Nr("token")]},Uc:{name:"signInWithEmailAndPassword",j:[Nr("email"),Nr("password")]},Vc:{name:"signInWithEmailLink",j:[Nr("email"),Nr("emailLink",!0)]},Wc:{name:"signInWithPhoneNumber",j:[Nr("phoneNumber"),Pu()]},Xc:{name:"signInWithPopup",j:[m4()]},Yc:{name:"signInWithRedirect",j:[m4()]},dd:{name:"updateCurrentUser",j:[rc(function(I){return{name:"user",K:"an instance of Firebase User",optional:!!I,M:function(_){return!!(_&&_ instanceof Nh)}}}(),M1(),"user")]},Bb:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[Nr(null,!0)]},fd:{name:"useDeviceLanguage",j:[]},gd:{name:"useEmulator",j:[Nr("url"),c0("options",!0)]},jd:{name:"verifyPasswordResetCode",j:[Nr("code")]}}),Gj(H1.prototype,{lc:{name:"languageCode",lb:rc(Nr(),M1(),"languageCode")},ti:{name:"tenantId",lb:rc(Nr(),M1(),"tenantId")}}),H1.Persistence=u4,H1.Persistence.LOCAL="local",H1.Persistence.SESSION="session",H1.Persistence.NONE="none",ic(Nh.prototype,{delete:{name:"delete",j:[]},oc:{name:"getIdTokenResult",j:[nz("opt_forceRefresh",!0)]},I:{name:"getIdToken",j:[nz("opt_forceRefresh",!0)]},Cc:{name:"linkAndRetrieveDataWithCredential",j:[O5()]},rb:{name:"linkWithCredential",j:[O5()]},Dc:{name:"linkWithPhoneNumber",j:[Nr("phoneNumber"),Pu()]},Ec:{name:"linkWithPopup",j:[m4()]},Fc:{name:"linkWithRedirect",j:[m4()]},Lc:{name:"reauthenticateAndRetrieveDataWithCredential",j:[O5()]},ub:{name:"reauthenticateWithCredential",j:[O5()]},Mc:{name:"reauthenticateWithPhoneNumber",j:[Nr("phoneNumber"),Pu()]},Nc:{name:"reauthenticateWithPopup",j:[m4()]},Oc:{name:"reauthenticateWithRedirect",j:[m4()]},reload:{name:"reload",j:[]},vb:{name:"sendEmailVerification",j:[rc(c0("opt_actionCodeSettings",!0),M1(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[Nr(null,!0)]},cd:{name:"unlink",j:[Nr("provider")]},Cb:{name:"updateEmail",j:[Nr("email")]},Db:{name:"updatePassword",j:[Nr("password")]},ed:{name:"updatePhoneNumber",j:[O5("phone")]},Eb:{name:"updateProfile",j:[c0("profile")]},Fb:{name:"verifyBeforeUpdateEmail",j:[Nr("email"),rc(c0("opt_actionCodeSettings",!0),M1(null,!0),"opt_actionCodeSettings",!0)]}}),ic(g4.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),ic(L7.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),ic(Yo.prototype,{oa:{name:"finally"},o:{name:"catch"},then:{name:"then"}}),Gj(mj.prototype,{appVerificationDisabled:{name:"appVerificationDisabledForTesting",lb:nz("appVerificationDisabledForTesting")}}),ic(TI.prototype,{confirm:{name:"confirm",j:[Nr("verificationCode")]}}),$c(Cp,"fromJSON",function(I){I=typeof I=="string"?JSON.parse(I):I;for(var _,ce=[D5,Ic,nc,z5],Ce=0;Ce{const e=M.getState().world,n=M(oa),o=M(hu)??g0,r=M(pn),i=M(RW),a=new Date(M(Al)),l=M(J4t),s=dt(zge),c=dt(Xq),u=dt(Lwt),d=dt(Cf),f=ye.hasSolarPanels(M.getState().elements),p=Cn(nOe),g=Cn(oOe),A=Cn(rOe),y=M(Sc),S=m.useRef(null),C=m.useRef(),P=S.current?S.current.clientWidth+40:l?l.width+40:640,v=S.current?S.current.clientHeight+100:l?l.height+100:600,[T,w]=m.useState({x:l?Math.max(l.x,P-window.innerWidth):0,y:l?Math.min(l.y,window.innerHeight-v):0}),x=be.useRef(null),b=$t(),R=u1(t),H=zs[a.getMonth()],F=e.daysPerYear??6,E=12/F,[N,U]=m.useState(0),[W,k]=m.useState(0),[D,L]=m.useState(0),[j,B]=m.useState(0),[O,V]=m.useState(["Heater","AC","Solar","Net"]),[G,Q]=m.useState([]),{sum:$,sumHeaterMap:ie,sumAcMap:q,sumSolarPanelMap:se,dataLabels:Z}=p0t(a,R,f),ee=m.useRef(new Array(F).fill({})),te=m.useRef(new Array(F).fill(0)),oe=m.useRef(new Array(F).fill(0)),de=m.useRef(new Array(F).fill(0)),he=m.useRef(new Array(F).fill(0)),pe=m.useRef([]),me=m.useRef([]),le=m.useRef([]),Te=m.useRef([]);m.useEffect(()=>{ge()},[F,u]),m.useEffect(()=>{c&&ge()},[c]);const ge=()=>{ee.current=new Array(F).fill({}),te.current=new Array(F).fill(0),oe.current=new Array(F).fill(0),de.current=new Array(F).fill(0),he.current=new Array(F).fill(0),Q([]),U(0),k(0),L(0),B(0),V([])};m.useEffect(()=>{const ve=Math.floor(a.getMonth()/E),we=(Object.keys($[0]).length-1)/(f?4:3);if(pe.current=[],me.current=[],Te.current=[],le.current=[],we>1){const Ue=new Map,nt=new Map,We=new Map,Ee=new Map;for(const je of $){let xt=0;for(let gt=0;gt6&&(Ee=" "+je.substring(6).trim());break}const ke="Heater"+Ee,Oe="AC"+Ee,st="Net"+Ee;if(f){const je="Solar"+Ee;let xt=0;V([ke,Oe,je,st]);for(const Ye of $)Ue+=Ye[ke],nt+=Ye[Oe],xt+=Ye[je],We+=Ye[st];const gt={};gt.Month=zs[a.getMonth()],gt[ke]=30*Ue,gt[Oe]=30*nt,gt[je]=30*xt,gt[st]=30*We,ee.current[ve]=gt}else{V([ke,Oe,st]);for(const xt of $)Ue+=xt[ke],nt+=xt[Oe],We+=xt[st];const je={};je.Month=zs[a.getMonth()],je[ke]=30*Ue,je[Oe]=30*nt,je[st]=30*We,ee.current[ve]=je}}Q([...ee.current]);let Pe=0;if(ie)for(const Ue of ie.keys())Pe+=ie.get(Ue)??0;let Ie=0;if(q)for(const Ue of q.keys())Ie+=q.get(Ue)??0;let Me=0;if(se&&f)for(const Ue of se.keys())Me+=se.get(Ue)??0;te.current[ve]=Pe*E*30,oe.current[ve]=Ie*E*30,de.current[ve]=Me*E*30,he.current[ve]=te.current[ve]+oe.current[ve]-de.current[ve];const ze=te.current.slice(0,ve+1).reduce((Ue,nt)=>Ue+nt,0);U(ze);const Ne=oe.current.slice(0,ve+1).reduce((Ue,nt)=>Ue+nt,0);k(Ne);const Je=de.current.slice(0,ve+1).reduce((Ue,nt)=>Ue+nt,0);L(Je),B(he.current.slice(0,ve+1).reduce((Ue,nt)=>Ue+nt,0)),p(ze),g(Ne),A(Je),dt.getState().showSolarRadiationHeatmap||Cn.getState().clearDataStore()},[s]),m.useEffect(()=>{w({x:Math.max(l==null?void 0:l.x,P-window.innerWidth),y:Math.min(l==null?void 0:l.y,window.innerHeight-v)})},[l,P,v]),m.useEffect(()=>{const ve=()=>{w({x:Math.max(l==null?void 0:l.x,P-window.innerWidth),y:Math.min(l==null?void 0:l.y,window.innerHeight-v)})};return window.addEventListener("resize",ve),()=>{window.removeEventListener("resize",ve)}},[l,P,v]),m.useEffect(()=>(S.current&&(C.current||(C.current=new ResizeObserver(()=>{r(ve=>{S.current&&(ve.viewState.yearlyBuildingEnergyPanelRect||(ve.viewState.yearlyBuildingEnergyPanelRect=new cr(0,0,600,500)),ve.viewState.yearlyBuildingEnergyPanelRect.width=S.current.offsetWidth,ve.viewState.yearlyBuildingEnergyPanelRect.height=S.current.offsetHeight)})})),C.current.observe(S.current)),()=>{var ve;(ve=C.current)==null||ve.disconnect()}),[]);const Se=(ve,we)=>{w({x:Math.max(we.x,P-window.innerWidth),y:Math.min(we.y,window.innerHeight-v)})},Re=(ve,we)=>{r(Pe=>{Pe.viewState.yearlyBuildingEnergyPanelRect||(Pe.viewState.yearlyBuildingEnergyPanelRect=new cr(0,0,600,360)),Pe.viewState.yearlyBuildingEnergyPanelRect.x=Math.max(we.x,P-window.innerWidth),Pe.viewState.yearlyBuildingEnergyPanelRect.y=Math.min(we.y,window.innerHeight-v)})},De=()=>{r(ve=>{ve.viewState.showYearlyBuildingEnergyPanel=!1,n&&(ve.actionInfo={name:"Close Yearly Building Energy Graph",timestamp:new Date().getTime()})})},Ae=Y.t("word.Month",b),ue=Y.t("word.Energy",b),fe=G&&G[0]?Object.keys(G[0]).length===0:!0;return h.jsx(Bi,{nodeRef:x,handle:".handle",bounds:"parent",axis:"both",position:T,onDrag:Se,onStop:Re,onMouseDown:()=>{r(ve=>{ve.selectedFloatingWindow="yearlyBuildingEnergyPanel"})},children:h.jsx(gBo,{ref:x,style:{zIndex:y==="yearlyBuildingEnergyPanel"?bc:9},children:h.jsxs(mBo,{ref:S,style:{opacity:o,width:(l?l.width:600)+"px",height:(l?l.height:400)+"px"},children:[h.jsxs(yBo,{className:"handle",style:{direction:"ltr"},children:[h.jsxs("span",{children:[Y.t("buildingEnergyPanel.YearlyBuildingEnergy",b)+": ",h.jsx("span",{style:{fontSize:"10px"},children:Y.t("sensorPanel.WeatherDataFrom",b)+" "+t+" | "+a.getFullYear()})]}),h.jsx("span",{style:{cursor:"pointer"},onTouchStart:()=>{De()},onMouseDown:()=>{De()},children:`${Y.t("word.Close",b)}`})]}),h.jsx(g0t,{type:wi.YearlyBuildingEnergy,dataSource:G,hasSolarPanels:f,labels:O,height:100,dataKeyAxisX:"Month",labelX:Ae,labelY:ue,unitY:Y.t("word.kWh",b),yMin:0,curveType:"linear",fractionDigits:2,referenceX:H}),!d&&h.jsxs(on,{style:{alignSelf:"center",direction:"ltr"},children:[pe.current.length===0?h.jsx(on,{style:{cursor:"default"},children:Y.t("buildingEnergyPanel.Heater",b)+": "+N.toFixed(0)}):h.jsx(Ml,{content:pe.current.map((ve,we)=>h.jsx("div",{children:ve},we)),children:h.jsx(on,{style:{cursor:"help"},children:Y.t("buildingEnergyPanel.Heater",b)+": "+N.toFixed(0)})}),me.current.length===0?h.jsx(on,{style:{cursor:"default"},children:Y.t("buildingEnergyPanel.AC",b)+": "+W.toFixed(0)}):h.jsx(Ml,{content:me.current.map((ve,we)=>h.jsx("div",{children:ve},we)),children:h.jsx(on,{style:{cursor:"help"},children:Y.t("buildingEnergyPanel.AC",b)+": "+W.toFixed(0)})}),D!==0&&h.jsx(h.Fragment,{children:le.current.length===0?h.jsx(on,{style:{cursor:"default"},children:Y.t("buildingEnergyPanel.SolarPanel",b)+": "+D.toFixed(0)}):h.jsx(Ml,{content:le.current.map((ve,we)=>h.jsx("div",{children:ve},we)),children:h.jsx(on,{style:{cursor:"help"},children:Y.t("buildingEnergyPanel.SolarPanel",b)+": "+D.toFixed(0)})})}),Te.current.length===0?h.jsx(on,{style:{cursor:"default"},children:Y.t("buildingEnergyPanel.Net",b)+": "+j.toFixed(0)}):h.jsx(Ml,{content:Te.current.map((ve,we)=>h.jsx("div",{children:ve},we)),children:h.jsx(on,{style:{cursor:"help"},children:Y.t("buildingEnergyPanel.Net",b)+": "+j.toFixed(0)})}),h.jsx(io,{type:"default",icon:fe?h.jsx(Th,{}):h.jsx(Rf,{}),title:Y.t(fe?"word.Run":"word.Update",b),onClick:()=>{const ve=M.getState().elements,we=M.getState().countElementsByType,Pe=M.getState().getChildrenOfType,Ie=bX(ve,we,Pe);if(Ie.status===rg.NO_BUILDING){gn(Y.t("analysisManager.NoBuildingForAnalysis",b));return}if(Ie.status===rg.AT_LEAST_ONE_BAD_NO_GOOD){let Me;switch(Ie.buildingCompletion){case Uc.WALL_DISJOINED:Me=Y.t("message.WallsAreNotConnected",b);break;case Uc.WALL_EMPTY:Me=Y.t("message.BuildingContainsEmptyWall",b);break;case Uc.ROOF_MISSING:Me=Y.t("message.BuildingRoofMissing",b);break;default:Me=Y.t("message.UnknownErrors",b)}co(Y.t("message.SimulationWillNotStartDueToErrors",b)+": "+Me);return}Ie.status===rg.AT_LEAST_ONE_BAD_AT_LEAST_ONE_GOOD&&PR(Y.t("message.SimulationWillStartDespiteWarnings",b)),gn(Y.t("message.SimulationStarted",b)),setTimeout(()=>{i(),dt.getState().set(Me=>{Me.runYearlyThermalSimulation=!0,Me.pauseYearlyThermalSimulation=!1,Me.simulationInProgress=!0}),r(Me=>{n&&(Me.actionInfo={name:"Run Yearly Building Energy Analysis",timestamp:new Date().getTime()})})},100)}}),h.jsx(io,{type:"default",icon:h.jsx(_u,{}),title:Y.t("word.SaveAsImage",b),onClick:()=>{Ed("line-graph-"+Ae+"-"+ue,"yearly-building-energy").then(()=>{gn(Y.t("message.ScreenshotSaved",b)),n&&r(ve=>{ve.actionInfo={name:"Take Screenshot of Yearly Building Energy Graph",timestamp:new Date().getTime()}})})}}),ee.current&&ee.current.length>0&&h.jsx(io,{type:"default",icon:h.jsx(Hf,{}),title:Y.t("word.SaveAsCsv",b),onClick:()=>{Sh(ee.current,"yearly-building-energy.csv"),gn(Y.t("message.CsvFileSaved",b)),n&&r(ve=>{ve.actionInfo={name:"Export Yearly Building Energy Result as CSV",timestamp:new Date().getTime()}})}})]})]})})})}),wBo=be.memo(({setDialogVisible:t})=>{const e=M(pn),n=M(En),o=M(j8t),r=M(B8t),[i,a]=m.useState(!1),[l,s]=m.useState(!1),[c,u]=m.useState({left:0,top:0,bottom:0,right:0}),d=m.useRef(null),f=m.useRef(null),p=m.useRef(o),g=m.useRef(r),A=$t();m.useEffect(()=>{var w;(w=f.current)==null||w.focus()},[]);const y=(w,x)=>{if(d.current){const{clientWidth:b,clientHeight:R}=window.document.documentElement,H=d.current.getBoundingClientRect();u({left:-H.left+x.x,right:b-(H.right-x.x),top:-H.top+x.y,bottom:R-((H==null?void 0:H.bottom)-x.y)})}},S=w=>{e(x=>{x.minimumNavigationMoveSpeed=w}),dt.getState().set(x=>{x.navigationMoveSpeed=w})},C=w=>{e(x=>{x.minimumNavigationTurnSpeed=w}),dt.getState().set(x=>{x.navigationTurnSpeed=w})},P=()=>{const w=o,x=p.current;if(w!==x){const H={name:"Minimum Navigation Move Speed",timestamp:Date.now(),oldValue:w,newValue:x,undo:()=>{S(H.oldValue)},redo:()=>{S(H.newValue)}};n(H),S(x)}const b=r,R=g.current;if(b!==R){const H={name:"Minimum Navigation Turn Speed",timestamp:Date.now(),oldValue:b,newValue:R,undo:()=>{C(H.oldValue)},redo:()=>{C(H.newValue)}};n(H),C(R)}},v=()=>{t(!1)},T=()=>{P(),t(!1)};return h.jsxs(xi,{width:500,open:!0,title:h.jsx("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>s(!0),onMouseOut:()=>s(!1),children:`${Y.t("navigationPanel.NavigationParameters",A)}`}),footer:[h.jsx(io,{onClick:v,children:`${Y.t("word.Cancel",A)}`},"Cancel"),h.jsx(io,{type:"primary",ref:f,onClick:T,children:`${Y.t("word.OK",A)}`},"OK")],onCancel:()=>{t(!1)},maskClosable:!1,destroyOnClose:!1,modalRender:w=>h.jsx(Bi,{disabled:!l,bounds:c,onStart:(x,b)=>y(x,b),children:h.jsx("div",{ref:d,children:w})}),children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("navigationPanel.MinimumMoveSpeed",A)+" ([1, 10]): "}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{min:1,max:10,style:{width:"100%"},precision:0,value:p.current,step:1,onChange:w=>{p.current=Number(w),a(!i)},onBlur:w=>{const x=w.target.value,b=parseFloat(x);p.current=Number.isNaN(b)?3:b,a(!i)},onPressEnter:w=>{const x=w.target.value,b=parseFloat(x);p.current=Number.isNaN(b)?3:b,a(!i)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("navigationPanel.MinimumTurnSpeed",A)+" ([1, 5]): "}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{min:1,max:5,style:{width:"100%"},precision:0,value:g.current,step:1,onChange:w=>{g.current=Number(w),a(!i)},onBlur:w=>{const x=w.target.value,b=parseFloat(x);g.current=Number.isNaN(b)?3:b,a(!i)},onPressEnter:w=>{const x=w.target.value,b=parseFloat(x);g.current=Number.isNaN(b)?3:b,a(!i)}})})]})]})}),vBo=be.memo(({setDialogVisible:t})=>{const e=M(pn),n=M(En),o=M(Oq),r=ye.getShadowMapSize(),i=4096,a=1e4,[l,s]=m.useState(!1),[c,u]=m.useState(!1),[d,f]=m.useState({left:0,top:0,bottom:0,right:0}),p=m.useRef(null),g=m.useRef(null),A=m.useRef(o?Math.round(o)/a:1),y=m.useRef(r?Math.round(r/i):1),S=$t();m.useEffect(()=>{var b;(b=g.current)==null||b.focus()},[]);const C=(b,R)=>{if(p.current){const{clientWidth:H,clientHeight:F}=window.document.documentElement,E=p.current.getBoundingClientRect();f({left:-E.left+R.x,right:H-(E.right-R.x),top:-E.top+R.y,bottom:F-((E==null?void 0:E.bottom)-R.y)})}},P=b=>{e(R=>{R.viewState.shadowCameraFar=b})},v=b=>{localStorage.setItem("aladdin-shadow-map-size",b.toString())},T=()=>{const b=o,R=A.current*a;if(b!==R){const E={name:"Shadow Camera Far Distance",timestamp:Date.now(),oldValue:b,newValue:R,undo:()=>{P(E.oldValue)},redo:()=>{P(E.newValue)}};n(E),P(R)}const H=r,F=y.current*i;if(H!==F){const E={name:"Shadow Map Size",timestamp:Date.now(),oldValue:H,newValue:F,undo:()=>{v(E.oldValue)},redo:()=>{v(E.newValue)}};n(E),v(F)}},w=()=>{t(!1)},x=()=>{T(),t(!1),window.location.reload()};return h.jsxs(xi,{width:500,open:!0,title:h.jsx("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>u(!0),onMouseOut:()=>u(!1),children:`${Y.t("shadowSettingsPanel.ShadowSettings",S)}`}),footer:[h.jsx(io,{onClick:w,children:`${Y.t("word.Cancel",S)}`},"Cancel"),h.jsx(io,{type:"primary",ref:g,onClick:x,children:`${Y.t("word.OK",S)}`},"OK")],onCancel:()=>{t(!1)},maskClosable:!1,destroyOnClose:!1,modalRender:b=>h.jsx(Bi,{disabled:!c,bounds:d,onStart:(R,H)=>C(R,H),children:h.jsx("div",{ref:p,children:b})}),children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:18,children:Y.t("shadowSettingsPanel.ShadowCameraFarDistance",S)+" ([1, 1000]×"+a+"): "}),h.jsx(Ke,{span:6,children:h.jsx(Sn,{min:1,max:1e3,style:{width:"100%"},precision:0,value:A.current,step:1,onChange:b=>{A.current=Number(b),s(!l)},onBlur:b=>{const R=b.target.value,H=parseFloat(R);A.current=Number.isNaN(H)?1:H,s(!l)},onPressEnter:b=>{const R=b.target.value,H=parseFloat(R);A.current=Number.isNaN(H)?1:H,s(!l)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"10px"},children:[h.jsx(Ke,{span:18,children:Y.t("shadowSettingsPanel.ShadowMapSize",S)+" ([1, 4]×"+i+"): "}),h.jsx(Ke,{span:6,children:h.jsx(Sn,{min:1,max:4,style:{width:"100%"},precision:0,value:y.current,step:1,onChange:b=>{y.current=Number(b),s(!l)},onBlur:b=>{const R=b.target.value,H=parseFloat(R);y.current=Number.isNaN(H)?1:H,s(!l)},onPressEnter:b=>{const R=b.target.value,H=parseFloat(R);y.current=Number.isNaN(H)?1:H,s(!l)}})})]}),h.jsx(nn,{style:{fontSize:"10px"},children:h.jsxs(Ke,{span:24,children:[Y.t("shadowSettingsPanel.Notes",S),":",h.jsx("br",{}),h.jsxs("ul",{children:[h.jsx("li",{children:Y.t("shadowSettingsPanel.RefreshPageNote",S)}),h.jsx("li",{children:Y.t("shadowSettingsPanel.MapSizeWarning",S)})]})]})})]})}),{Option:bD}=Uo,xBo=be.memo(({setDialogVisible:t})=>{const e=M(DH),n=M(ewt),o=M(twt),[r,i]=m.useState(!1),[a,l]=m.useState(!1),[s,c]=m.useState({left:0,top:0,bottom:0,right:0}),u=m.useRef(null),d=m.useRef("Unknown"),f=m.useRef("Unknown"),p=m.useRef("Monocrystalline"),g=m.useRef(12),A=m.useRef(8),y=m.useRef("Black"),S=m.useRef(1),C=m.useRef(1.5),P=m.useRef(0),v=m.useRef(.2),T=m.useRef(45),w=m.useRef(300),x=m.useRef(-.002),b=m.useRef(.005),R=m.useRef(30),H=m.useRef(30),F=m.useRef(10),E=m.useRef(40),N=m.useRef(15),U=$t(),W=(G,Q)=>{if(u.current){const{clientWidth:$,clientHeight:ie}=window.document.documentElement,q=u.current.getBoundingClientRect();c({left:-q.left+Q.x,right:$-(q.right-Q.x),top:-q.top+Q.y,bottom:ie-((q==null?void 0:q.bottom)-Q.y)})}},k=m.useMemo(()=>{const G=[];for(const Q in e)G.push(Q);return G},[e]),D=()=>{const G={name:d.current,brand:f.current,cellType:p.current,efficiency:v.current,length:C.current,nominalLength:C.current,width:S.current,nominalWidth:S.current,thickness:b.current,m:g.current,n:A.current,pmax:w.current,vmpp:H.current,impp:F.current,voc:E.current,isc:N.current,pmaxTC:x.current,noct:T.current,weight:R.current,color:y.current,shadeTolerance:m8.PARTIAL,bifacialityFactor:P.current};n(G)},L=()=>{if(d.current.trim()===""){xi.info({title:Y.t("pvModelPanel.CannotAddCustomSolarPanel",U),content:Y.t("pvModelPanel.CustomSolarPanelMustHaveModelName",U)+"."});return}k.includes(d.current)?xi.info({title:Y.t("pvModelPanel.CannotAddCustomSolarPanel",U),content:Y.t("pvModelPanel.CustomSolarPanelExists",U)+': "'+d.current+'"'}):D()},j=G=>{d.current=G.name,f.current=G.brand,p.current=G.cellType,v.current=G.efficiency,C.current=G.length,S.current=G.width,b.current=G.thickness,g.current=G.m,A.current=G.n,w.current=G.pmax,H.current=G.vmpp,F.current=G.impp,E.current=G.voc,N.current=G.isc,x.current=G.pmaxTC,T.current=G.noct,R.current=G.weight,y.current=G.color,P.current=G.bifacialityFactor},B=()=>{xi.confirm({title:Y.t("pvModelPanel.DoYouReallyWantToImportCustomSolarPanel",U)+"?",content:h.jsxs("span",{style:{color:"red",fontWeight:"bold"},children:[h.jsx(nb,{style:{marginRight:"6px"}}),Y.t("word.Warning",U)+": "+Y.t("pvModelPanel.ExistingSettingsWillBeOverwritten",U)+"."]}),icon:h.jsx(Zx,{}),onOk:()=>{navigator.clipboard.readText().then(G=>{const Q=JSON.parse(G);if(!Q.cellType||!Q.pmax){co(Y.t("pvModelPanel.FailInImportingDataFromClipboard",U));return}j(Q),i(!r)}).catch(G=>{co(Y.t("pvModelPanel.FailInImportingDataFromClipboard",U)+":"+G)})}})},O=G=>{xi.confirm({title:Y.t("pvModelPanel.DoYouReallyWantToRemoveThisCustomSolarPanel",U)+' "'+G+'"?',content:h.jsxs("span",{style:{color:"red",fontWeight:"bold"},children:[h.jsx(nb,{style:{marginRight:"6px"}}),Y.t("word.Warning",U)+": "+Y.t("pvModelPanel.MakeSureThisCustomSolarPanelIsNotUsed",U)+"."]}),icon:h.jsx(Zx,{}),onOk:()=>{o(G)}})},V=[{key:"1",label:Y.t("pvModelPanel.General",U),children:h.jsxs(h.Fragment,{children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:14,children:Y.t("pvModelPanel.Model",U)+": "}),h.jsx(Ke,{span:10,children:h.jsx(jl,{style:{width:"100%"},value:d.current,onChange:G=>{d.current=G.target.value,i(!r)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:14,children:Y.t("word.BrandName",U)+": "}),h.jsx(Ke,{span:10,children:h.jsx(jl,{style:{width:"100%"},value:f.current,onChange:G=>{f.current=G.target.value,i(!r)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:14,children:Y.t("pvModelPanel.CellType",U)+":"}),h.jsx(Ke,{span:10,children:h.jsxs(Uo,{style:{width:"100%"},value:p.current,onChange:G=>{p.current=G,i(!r)},children:[h.jsx(bD,{value:"Monocrystalline",children:Y.t("pvModelPanel.Monocrystalline",U)},"Monocrystalline"),h.jsx(bD,{value:"Polycrystalline",children:Y.t("pvModelPanel.Polycrystalline",U)},"Polycrystalline"),h.jsx(bD,{value:"Thin Film",children:Y.t("pvModelPanel.ThinFilm",U)},"Thin Film")]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:14,children:Y.t("word.Length",U)+" ([0.1, 3]"+Y.t("word.MeterAbbreviation",U)+"): "}),h.jsx(Ke,{span:10,children:h.jsx(Sn,{min:.1,max:3,style:{width:"100%"},precision:3,value:C.current,step:.01,onChange:G=>{G!==null&&(C.current=G,i(!r))},onBlur:G=>{const Q=parseFloat(G.target.value);C.current=Number.isNaN(Q)?1:Q,i(!r)},onPressEnter:G=>{const Q=parseFloat(G.target.value);C.current=Number.isNaN(Q)?1:Q,i(!r)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:14,children:Y.t("word.Width",U)+" ([0.1, 3]"+Y.t("word.MeterAbbreviation",U)+"): "}),h.jsx(Ke,{span:10,children:h.jsx(Sn,{min:.1,max:3,style:{width:"100%"},precision:3,value:S.current,step:.01,onChange:G=>{G!==null&&(S.current=G,i(!r))},onBlur:G=>{const Q=parseFloat(G.target.value);S.current=Number.isNaN(Q)?1:Q,i(!r)},onPressEnter:G=>{const Q=parseFloat(G.target.value);S.current=Number.isNaN(Q)?1:Q,i(!r)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:14,children:Y.t("pvModelPanel.BifacialityFactor",U)+" ([0, 1]):"}),h.jsx(Ke,{span:10,children:h.jsx(Sn,{style:{width:"100%"},precision:2,step:.01,value:P.current,onChange:G=>{G!==null&&(P.current=G,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:14,children:Y.t("pvModelPanel.Weight",U)+" ("+Y.t("pvModelPanel.Kilogram",U)+"):"}),h.jsx(Ke,{span:10,children:h.jsx(Sn,{style:{width:"100%"},precision:1,step:.1,value:R.current,onChange:G=>{G!==null&&(R.current=G,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:14,children:Y.t("word.Thickness",U)+" ("+Y.t("word.MeterAbbreviation",U)+"):"}),h.jsx(Ke,{span:10,children:h.jsx(Sn,{style:{width:"100%"},precision:4,step:1e-4,value:b.current,onChange:G=>{G!==null&&(b.current=G,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:14,children:Y.t("word.Color",U)+":"}),h.jsx(Ke,{span:10,children:h.jsxs(Uo,{style:{width:"100%"},value:y.current,onChange:G=>{y.current=G,i(!r)},children:[h.jsx(bD,{value:"Black",children:Y.t("pvModelPanel.Black",U)},"Black"),h.jsx(bD,{value:"Blue",children:Y.t("pvModelPanel.Blue",U)},"Blue")]})})]})]})},{key:"2",label:Y.t("pvModelPanel.Electrical",U),children:h.jsxs(h.Fragment,{children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.SolarCellEfficiency",U)+" (%):"}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{style:{width:"100%"},precision:1,step:.1,value:100*v.current,onChange:G=>{G!==null&&(v.current=G*.01,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.CellCountInXDirection",U)+": "}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{min:1,max:36,style:{width:"100%"},precision:0,value:g.current,step:1,onChange:G=>{G!==null&&(g.current=G,i(!r))},onBlur:G=>{const Q=parseFloat(G.target.value);g.current=Number.isNaN(Q)?1:Q,i(!r)},onPressEnter:G=>{const Q=parseFloat(G.target.value);g.current=Number.isNaN(Q)?1:Q,i(!r)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.CellCountInYDirection",U)+": "}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{min:1,max:36,style:{width:"100%"},precision:0,value:A.current,step:1,onChange:G=>{G!==null&&(A.current=G,i(!r))},onBlur:G=>{const Q=parseFloat(G.target.value);A.current=Number.isNaN(Q)?1:Q,i(!r)},onPressEnter:G=>{const Q=parseFloat(G.target.value);A.current=Number.isNaN(Q)?1:Q,i(!r)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.MaximumRatedPower",U)+" Pmax ("+Y.t("word.WattAbbreviation",U)+"):"}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{style:{width:"100%"},precision:1,step:1,value:w.current,onChange:G=>{G!==null&&(w.current=G,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.TemperatureCoefficientOfPmax",U)+" (%/°C):"}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{style:{width:"100%"},step:1e-4,value:x.current,onChange:G=>{G!==null&&(x.current=G,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.NominalOperatingCellTemperature",U)+" (°C):"}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{style:{width:"100%"},step:1,precision:1,value:T.current,onChange:G=>{G!==null&&(T.current=G,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.RatedVoltage",U)+" Vmpp ("+Y.t("word.VoltAbbreviation",U)+"):"}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{style:{width:"100%"},precision:1,step:.1,value:H.current,onChange:G=>{G!==null&&(H.current=G,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.RatedCurrent",U)+" Impp ("+Y.t("word.AmpereAbbreviation",U)+"):"}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{style:{width:"100%"},precision:2,step:.1,value:F.current,onChange:G=>{G!==null&&(F.current=G,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.OpenCircuitVoltage",U)+" Voc ("+Y.t("word.VoltAbbreviation",U)+"):"}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{style:{width:"100%"},precision:1,step:.1,value:E.current,onChange:G=>{G!==null&&(E.current=G,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.ShortCircuitCurrent",U)+" Isc ("+Y.t("word.AmpereAbbreviation",U)+"):"}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{style:{width:"100%"},precision:2,step:.1,value:N.current,onChange:G=>{G!==null&&(N.current=G,i(!r))}})})]})]})}];return h.jsx(xi,{width:720,open:!0,title:h.jsx("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>l(!0),onMouseOut:()=>l(!1),children:Y.t("menu.settings.CustomizeSolarPanel",U)}),footer:[h.jsx(io,{onClick:()=>t(!1),children:Y.t("word.Close",U)},"Close")],onCancel:()=>t(!1),maskClosable:!1,destroyOnClose:!1,modalRender:G=>h.jsx(Bi,{disabled:!a,bounds:s,onStart:(Q,$)=>W(Q,$),children:h.jsx("div",{ref:u,children:G})}),children:h.jsxs(nn,{style:{justifyContent:"space-between"},children:[h.jsx(Ke,{flex:3,children:h.jsx(hQ,{defaultActiveKey:"1",type:"card",items:V})}),h.jsx(Ke,{flex:.5,children:h.jsxs(on,{style:{height:"100%",justifyContent:"center",marginLeft:"12px"},direction:"vertical",children:[h.jsx(Vnn,{title:Y.t("word.Add",U),style:{cursor:"pointer",fontSize:"20px",color:"dimgray",border:"2px solid lightgray",borderRadius:"6px",padding:"4px"},onClick:()=>L()}),h.jsx(mue,{style:{marginTop:"12px",marginBottom:"12px"}}),h.jsx(Bnn,{title:Y.t("pvModelPanel.ImportCustomSolarPanelFromClipboard",U),style:{cursor:"pointer",fontSize:"20px",color:"dimgray",border:"2px solid lightgray",borderRadius:"6px",padding:"4px"},onClick:()=>{B()}})]})}),h.jsx(Ke,{flex:2,children:h.jsx(pk,{style:{marginTop:"56px",marginLeft:"8px"},size:"small",header:h.jsx("div",{style:{fontWeight:"bold"},children:Y.t("pvModelPanel.AddedCustomSolarPanels",U)}),bordered:!0,dataSource:k,renderItem:G=>h.jsxs(pk.Item,{children:[h.jsx(yon,{title:Y.t("pvModelPanel.ExportThisCustomSolarPanel",U),style:{paddingRight:"4px",cursor:"pointer"},onClick:()=>{const Q=e[G];navigator.clipboard.writeText(JSON.stringify(Q)).then(()=>{gn(Y.t("pvModelPanel.CustomSolarPanelExportedToClipboard",U)+" ("+G+").")})}}),h.jsx(eqe,{title:Y.t("word.Delete",U),style:{paddingRight:"6px",cursor:"pointer"},onClick:()=>O(G)}),G]},G)})})]})})}),bBo=be.memo(()=>{const t=M(Tge),e=M(Vq),n=M(FBe),o=M(W4t),r=M(kBe),i=M(LBe),a=M(j4t),l=M(Y4t),s=dt(L8t),c=dt(W8t),u=dt(N8t),d=dt(U8t),f=dt(hs),p=M(WBe),g=M(q4t),A=M(NBe),y=M(t8t),S=M(o8t),C=M(UBe),P=M(a8t),v=M(jBe),T=M(c8t),w=M(BBe),x=M(f8t),b=M(YBe),R=M(g8t),H=M(OBe),F=M(A8t),E=M(_4t),N=M(X4t),U=M(v8t),W=M(HW),k=M(s0),D=M(Mb),L=M(qYe),j=M(KYe),B=M(Jge),O=M(Yq)??!1,[V,G]=m.useState("Boston MA, USA");return m.useEffect(()=>{if(Object.keys(B).length===0)return;const Q=L(k,D)??"Boston MA, USA";G(Q),j(Q)},[k,D,B]),h.jsxs(h.Fragment,{children:[o&&h.jsx(a8o,{}),r&&h.jsx(u8o,{}),i&&h.jsx(LUo,{}),t&&h.jsx(ijo,{}),e&&h.jsx(ZUo,{}),(n||O)&&!W&&h.jsx(UUo,{}),a&&h.jsx(Sko,{city:V,graphs:[wi.MonthlyTemperatures,wi.SunshineHours]}),l&&h.jsx(Zjo,{city:V}),s&&h.jsx(xBo,{setDialogVisible:Q=>{dt.getState().set($=>{$.showSolarPanelCustomizationPanel=Q})}}),c&&h.jsx(cBo,{setDialogVisible:Q=>{dt.getState().set($=>{$.showEconomicsPanel=Q})}}),u&&h.jsx(wBo,{setDialogVisible:Q=>{dt.getState().set($=>{$.showNavigationPanel=Q})}}),d&&h.jsx(vBo,{setDialogVisible:Q=>{dt.getState().set($=>{$.showShadowSettings=Q})}}),g&&h.jsx(Rko,{city:V}),p&&h.jsx(zUo,{city:V}),y&&h.jsx(OUo,{city:V}),A&&h.jsx(XUo,{city:V}),S&&h.jsx(fjo,{}),P&&h.jsx(mjo,{city:V}),C&&h.jsx(vjo,{city:V}),T&&h.jsx(Hjo,{city:V}),v&&h.jsx(Tjo,{city:V}),w&&h.jsx(Djo,{city:V}),x&&h.jsx(Ljo,{city:V}),b&&h.jsx(jjo,{city:V}),R&&h.jsx(Vjo,{city:V}),H&&h.jsx(Kjo,{city:V}),F&&h.jsx(oBo,{city:V}),E&&h.jsx(pBo,{city:V}),N&&h.jsx(ABo,{city:V}),f&&h.jsx(sjo,{}),U&&h.jsx(sBo,{})]})});class ll{static computeSolarPanelOutput(e,n,o,r,i,a,l,s,c){const u=i.parentType===z.Roof,d=i.parentType===z.Wall;u&&(a=l);const f=d?ye.absoluteCoordinates(i.cx,i.cy,i.cz,a,l,i.lz):ye.absoluteCoordinates(i.cx,i.cy,i.cz,a,void 0,void 0,!0),p=a.rotation[2];let g=i.tiltAngle,A=p+i.relativeAzimuth,y=!0;if(u&&(f.z=i.cz+i.lz+.02+a.cz,ye.isZero(i.rotation[0])?f.z+=i.poleHeight:(g=i.rotation[0],A=p,y=!1)),d&&!ye.isZero(i.tiltAngle)){const $=a,q=(l?l.rotation[2]+$.relativeAngle:$.relativeAngle)-Qt,se=i.ly*Math.abs(Math.sin(i.tiltAngle))/2;f.x+=se*Math.cos(q),f.y+=se*Math.sin(q)}const S=new ae().fromArray(i.normal),C=e.getMonth(),P=ye.dayOfYear(e),v=n.solarRadiationHeatmapGridCellSize??.5;let T,w,x,b,R;n.discretization===Em.EXACT?(T=i.lx,w=i.ly,i.orientation===vr.portrait?(x=Math.max(1,Math.round(i.lx/r.width)),b=Math.max(1,Math.round(i.ly/r.length)),x*=r.n,b*=r.m):(x=Math.max(1,Math.round(i.lx/r.length)),b=Math.max(1,Math.round(i.ly/r.width)),x*=r.m,b*=r.n),R=i.lx/x):(T=i.lx,w=i.ly,x=Math.max(2,Math.round(i.lx/v)),b=Math.max(2,Math.round(i.ly/v)),x%2!==0&&(x+=1),b%2!==0&&(b+=1),R=v);const H=T/x,F=w/b,E=f.x-(T-R)/2,N=f.y-(w-R)/2,U=u||d?f.z:a.lz+i.poleHeight+i.lz,W=new Kt(f.x,f.y),k=new ae,D=Array.from(Array(x),()=>new Array(b));let L=new ln(u&&!y?0:g,0,A,"ZYX");if(i.trackerType!==Ll.NO_TRACKER){const $=p?o.clone().applyAxisAngle(ko,-p):o.clone();switch(i.trackerType){case Ll.ALTAZIMUTH_DUAL_AXIS_TRACKER:{const ie=new Ts().setFromUnitVectors(ko,$);L=new ln().setFromQuaternion(ie),L.z+=A;break}case Ll.HORIZONTAL_SINGLE_AXIS_TRACKER:{const ie=new Ts().setFromUnitVectors(ko,new ae($.x,0,$.z).normalize());L=new ln().setFromQuaternion(ie),L.z+=A;break}case Ll.VERTICAL_SINGLE_AXIS_TRACKER:{const ie=new ae($.x,-$.y,0).normalize(),q=Math.acos(Yc.dot(ie))*Math.sign(ie.x);L=new ln(i.tiltAngle,0,q+p,"ZYX");break}case Ll.TILTED_SINGLE_AXIS_TRACKER:break}}S.applyEuler(L),u&&!y&&(L.x=i.rotation[0],L.z=i.rotation[2]+p),d&&(L.x=Qt+i.tiltAngle,L.z=a.relativeAngle+p);const j=vi(o,P,s,li.SPHERE_MODEL),B=qr(n.ground,C,S,j),O=S.dot(o),V=new Kt,G=new ae;for(let $=0;$0&&(V.set(E+$*H,N+ie*F),G.set(V.x-W.x,V.y-W.y,0),G.applyEuler(L),k.set(f.x+G.x,f.y+G.y,U+G.z),c(i.id,k,o)<0&&(D[$][ie]+=O*j));let Q=0;switch(r.shadeTolerance){case m8.NONE:{let $=Number.MAX_VALUE;for(let ie=0;ieArray(S).fill(0)),D=Array(y).fill(0).map(()=>Array(S).fill(0));let L;for(let j=0;j0)for(const $ of a){if($.type!==z.Window)continue;const ie=$.cx*r.lx,q=$.cz*r.lz,se=$.lx*r.lx/2,Z=$.lz*r.lz/2,ee=$;if(ee.windowType===Ci.Arched){const te=T.clone().add(new ae(ee.cx*r.lx,0,ee.cz*r.lz));ll.pointWithinArch(R,ee.lx,ee.lz,ee.archHeight,te)&&(L=!1)}else if(G.x>=ie-se&&G.x=q-Z&&G.y0)for(const $ of l){if($.type!==z.Door)continue;const ie=$.cx*r.lx,q=$.cz*r.lz,se=$.lx*r.lx/2,Z=$.lz*r.lz/2,ee=$;if(ee.doorType===Rd.Arched){const te=T.clone().add(new ae(ee.cx*r.lx,0,ee.cz*r.lz));ll.pointWithinArch(R,ee.lx,ee.lz,ee.archHeight,te)&&(L=!1)}else if(G.x>=ie-se&&G.x=q-Z&&G.y0)for(const $ of s){const ie=$.cx*r.lx,q=$.cz*r.lz,se=$.lx/2,Z=$.ly/2;if(G.x>=ie-se&&G.x=q-Z&&G.yc6||ie<0)&&$&&(k[j][B]+=U),W>0&&ie<0&&(D[j][B]+=W*N,$&&(k[j][B]+=W*N))}}}return{intensity:k,unitArea:C*P,heatmap:D}}static computeDoorSolarRadiationEnergy(e,n,o,r,i,a,l,s){const c=ye.dayOfYear(e),u=n.solarRadiationHeatmapGridCellSize??.5,d=r.lx*i.lx,f=r.lz*i.lz,p=Math.max(2,Math.round(d/u)),g=Math.max(2,Math.round(f/u)),A=d/p,y=f/g,S=a.rotation[2]+i.relativeAngle,P=ye.wallAbsolutePosition(new ae(i.cx,i.cy,i.cz),a).setZ(i.lz/2+a.lz).clone().add(new ae(r.cx*i.lx,0,r.cz*i.lz)),v=new ae(Math.cos(S-Qt),Math.sin(S-Qt),0),T=A*Math.cos(S),w=A*Math.sin(S),x=new ae,b=vi(o,c,l,li.SPHERE_MODEL),R=qr(n.ground,e.getMonth(),v,b),H=v.dot(o),F=Array(p).fill(0).map(()=>Array(g).fill(0));if(r.doorType===Rd.Arched)for(let E=0;E0&&s(r.id,x,o)<0&&(F[E][N]+=H*b))}else for(let E=0;E0){const U=E-p/2+.5,W=N-g/2+.5;x.set(P.x+U*T,P.y+U*w,P.z+W*y),s(r.id,x,o)<0&&(F[E][N]+=H*b)}return{intensity:F,unitArea:A*y}}static pointWithinArch(e,n,o,r,i){if(r>0){const a=.5*n,l=Math.min(r,o,a),s=.5*(l+a*a/l),c=e.x-i.x,u=e.y-i.y,d=c*c+u*u;let f=e.z-i.z;return d-o/2?!0:(f=e.z-(o-s),d+f*fArray(g).fill(0));if(r.windowType===Ci.Arched)for(let E=0;E0&&s(r.id,x,o)<0&&(F[E][N]+=H*b))}else for(let E=0;E0){const U=E-p/2+.5,W=N-g/2+.5;x.set(P.x+U*T,P.y+U*w,P.z+W*y),s(r.id,x,o)<0&&(F[E][N]+=H*b)}return{intensity:F,unitArea:A*y}}static computeRoofWindowSolarRadiationEnergy(e,n,o,r,i,a,l,s){const c=ye.dayOfYear(e),u=n.solarRadiationHeatmapGridCellSize??.5,d=r.lx,f=r.lz,p=Math.max(2,Math.round(d/u)),g=Math.max(2,Math.round(f/u)),A=d/p,y=f/g,S=new ae(r.cx,r.cy,r.cz).applyEuler(new ln(0,0,a.rotation[2]));S.x+=a.cx,S.y+=a.cy,S.z+=a.lz;const C=new ln(r.rotation[0],r.rotation[1],r.rotation[2]+a.rotation[2],"ZXY"),P=new ae(0,0,1).applyEuler(C),v=new ae,T=vi(o,c,l,li.SPHERE_MODEL),w=qr(n.ground,e.getMonth(),P,T),x=P.dot(o),b=Array(p).fill(0).map(()=>Array(g).fill(0));if(r.windowType===Ci.Arched)for(let R=0;R0&&s(r.id,v,o)<0&&(b[R][H]+=x*T))}else for(let R=0;R0){const F=R-p/2+.5,E=H-g/2+.5,N=new ae(F,E,0);N.applyEuler(C),v.set(S.x+N.x,S.y+N.y,S.z+N.z),s(r.id,v,o)<0&&(b[R][H]+=x*T)}return{intensity:b,unitArea:A*y}}static computePyramidRoofSolarRadiationEnergy(e,n,o,r,i,a,l,s,c,u,d,f){if(i)return ll.computeFlatRoofSolarRadiationEnergy(e,n,o,r,a,l,s,c,u,d,f);const p=n.solarRadiationHeatmapGridCellSize??.5,g=ye.dayOfYear(e),A=new ln(0,0,s.rotation[2],"ZYX"),y=vi(o,g,d,li.SPHERE_MODEL),S=[],C=[];for(const[P,v]of l.entries()){const T=r.id+"-"+P,w=v[0].clone().applyEuler(A),x=v[1].clone().applyEuler(A),b=v[2].clone().applyEuler(A),R=new ae().subVectors(x,w),H=new ae().subVectors(b,w),F=new ae().subVectors(b,x),E=R.length(),N=new ae().crossVectors(H,F).length()/E,U=Math.max(2,Math.round(E/p)),W=Math.max(2,Math.round(N/p)),k=Array(U).fill(0).map(()=>Array(W).fill(0));S.push(k),R.normalize();const D=U*H.dot(R)/E;H.normalize(),F.normalize();const L=new ae().crossVectors(H,F).normalize(),j=R.multiplyScalar(.5*E/U),B=new ae().crossVectors(L,R).normalize().multiplyScalar(.5*N/W),O=new ae(s.cx+w.x,s.cy+w.y,s.lz+w.z+k0+(a?r.thickness:0));O.add(j).add(B),j.multiplyScalar(2),B.multiplyScalar(2),C.push(j.length()*B.length());const V=new ae,G=[],Q=.01;G.push({x:-Q,y:-Q}),G.push({x:U+Q,y:-Q}),G.push({x:D,y:W+Q});const $=qr(n.ground,e.getMonth(),L,y),ie=L.dot(o);for(let q=0;qc6||te<0)&&(k[q][Z]+=$),ie>0&&te<0&&(k[q][Z]+=ie*y)}}}}return{segmentIntensities:S,segmentUnitArea:C}}static computeHipRoofSolarRadiationEnergy(e,n,o,r,i,a,l,s,c,u,d,f){if(i)return ll.computeFlatRoofSolarRadiationEnergy(e,n,o,r,a,l,s,c,u,d,f);const p=ye.dayOfYear(e),g=n.solarRadiationHeatmapGridCellSize??.5,A=new ln(0,0,s.rotation[2],"ZYX"),y=vi(o,p,d,li.SPHERE_MODEL),S=[],C=[];for(const[P,v]of l.entries()){const T=r.id+"-"+P,w=v[0].clone().applyEuler(A),x=v[1].clone().applyEuler(A),b=v[2].clone().applyEuler(A),R=new ae().subVectors(x,w),H=new ae().subVectors(b,w),F=new ae().subVectors(b,x),E=R.length(),N=new ae().crossVectors(H,F).length()/E,U=Math.max(2,Math.round(E/g)),W=Math.max(2,Math.round(N/g)),k=Array(U).fill(0).map(()=>Array(W).fill(0));S.push(k),R.normalize();const D=U*H.dot(R)/E;H.normalize(),F.normalize();const L=new ae().crossVectors(H,F).normalize(),j=R.multiplyScalar(.5*E/U),B=new ae().crossVectors(L,R).normalize().multiplyScalar(.5*N/W),O=new ae,V=new ae(s.cx+w.x,s.cy+w.y,s.lz+w.z+k0+(a?r.thickness:0));V.add(j).add(B),j.multiplyScalar(2),B.multiplyScalar(2),C.push(j.length()*B.length());const G=qr(n.ground,e.getMonth(),L,y),Q=L.dot(o),$=[];for(const ie of v)$.push({x:ie.x,y:ie.y});if(P%2===0)for(let ie=0;iec6||ee<0)&&(k[ie][se]+=G),Q>0&&ee<0&&(k[ie][se]+=Q*y)}}}else{const ie=[];ie.push({x:-.01,y:-.01}),ie.push({x:U+.01,y:-.01}),ie.push({x:D,y:W+.01});for(let se=0;sec6||oe<0)&&(k[se][ee]+=G),Q>0&&oe<0&&(k[se][ee]+=Q*y)}}}}}return{segmentIntensities:S,segmentUnitArea:C}}static computeGambrelRoofSolarRadiationEnergy(e,n,o,r,i,a,l,s,c,u,d,f){if(i)return ll.computeFlatRoofSolarRadiationEnergy(e,n,o,r,a,l,s,c,u,d,f);const p=ye.dayOfYear(e),g=n.solarRadiationHeatmapGridCellSize??.5,A=new ln(0,0,s.rotation[2],"ZYX"),y=vi(o,p,d,li.SPHERE_MODEL),S=[],C=[];for(const[P,v]of l.entries()){const T=r.id+"-"+P,w=v[0].clone().applyEuler(A),x=v[1].clone().applyEuler(A),b=v[2].clone().applyEuler(A),R=new ae().subVectors(x,w),H=new ae().subVectors(b,w),F=new ae().subVectors(b,x),E=R.length(),N=new ae().crossVectors(H,F).length()/E,U=Math.max(2,Math.round(E/g)),W=Math.max(2,Math.round(N/g)),k=Array(U).fill(0).map(()=>Array(W).fill(0));S.push(k),R.normalize(),H.normalize(),F.normalize();const D=new ae().crossVectors(H,F).normalize(),L=R.multiplyScalar(.5*E/U),j=new ae().crossVectors(D,R).normalize().multiplyScalar(.5*N/W),B=new ae(s.cx+w.x,s.cy+w.y,s.lz+w.z+k0+(a?r.thickness:0));B.add(L).add(j),L.multiplyScalar(2),j.multiplyScalar(2),C.push(L.length()*j.length());const O=new ae,V=qr(n.ground,e.getMonth(),D,y),G=D.dot(o);for(let Q=0;Qc6||q<0)&&(k[Q][ie]+=V),G>0&&q<0&&(k[Q][ie]+=G*y)}}}return{segmentIntensities:S,segmentUnitArea:C}}static computeMansardRoofSolarRadiationEnergy(e,n,o,r,i,a,l,s,c,u,d,f){if(i)return ll.computeFlatRoofSolarRadiationEnergy(e,n,o,r,a,l,s,c,u,d,f);const p=ye.dayOfYear(e),g=n.solarRadiationHeatmapGridCellSize??.5,A=new ln(0,0,s.rotation[2],"ZYX"),y=vi(o,p,d,li.SPHERE_MODEL),S=[],C=[];for(const[P,v]of l.entries()){const T=r.id+"-"+P;if(P===l.length-1){let w=Number.MAX_VALUE,x=Number.MAX_VALUE,b=-Number.MAX_VALUE,R=-Number.MAX_VALUE;for(const B of v){const O=B.clone().applyEuler(A);O.x>b&&(b=O.x),O.xR&&(R=O.y),O.yArray(E).fill(0));S.push(W);const k=new ae(w+g/2,x+g/2,s.lz+H+k0+(a?r.thickness:0)),D=new ae(0,0,k.z),L=qr(n.ground,e.getMonth(),ko,y),j=ko.dot(o);for(let B=0;Bc6||V<0)&&(W[B][O]+=L),j>0&&V<0&&(W[B][O]+=j*y)}}}else{const w=v[0].clone().applyEuler(A),x=v[1].clone().applyEuler(A),b=v[2].clone().applyEuler(A),R=new ae().subVectors(x,w),H=new ae().subVectors(b,w),F=new ae().subVectors(b,x),E=R.length(),N=new ae().crossVectors(H,F).length()/E,U=Math.max(2,Math.round(E/g)),W=Math.max(2,Math.round(N/g)),k=Array(U).fill(0).map(()=>Array(W).fill(0));S.push(k),R.normalize(),H.normalize(),F.normalize();const D=new ae().crossVectors(H,F).normalize(),L=R.multiplyScalar(.5*E/U),j=new ae().crossVectors(D,R).normalize().multiplyScalar(.5*N/W),B=new ae(s.cx+w.x,s.cy+w.y,s.lz+w.z+k0+(a?r.thickness:0));B.add(L).add(j),L.multiplyScalar(2),j.multiplyScalar(2),C.push(L.length()*j.length());const O=new ae,V=qr(n.ground,e.getMonth(),D,y),G=D.dot(o);for(let Q=0;Qc6||q<0)&&(k[Q][ie]+=V),G>0&&q<0&&(k[Q][ie]+=G*y)}}}}return{segmentIntensities:S,segmentUnitArea:C}}static computeFlatRoofSolarRadiationEnergy(e,n,o,r,i,a,l,s,c,u,d){const f=ye.dayOfYear(e),p=n.solarRadiationHeatmapGridCellSize??.5,g=new ln(0,0,l.rotation[2],"ZYX"),A=vi(o,f,u,li.SPHERE_MODEL),y=[],S=[];let C=Number.MAX_VALUE,P=Number.MAX_VALUE,v=-Number.MAX_VALUE,T=-Number.MAX_VALUE;for(const k of a)for(const D of k){const L=D.clone().applyEuler(g);L.x>v&&(v=L.x),L.xT&&(T=L.y),L.yArray(x).fill(0));y.push(H),S.push(b*R);const F=a[0][0].z,E=new ae(C+p/2,P+p/2,l.lz+F+k0+(i?r.thickness:0)),N=new ae(0,0,E.z),U=qr(n.ground,e.getMonth(),ko,A),W=ko.dot(o);for(let k=0;kc6||L<0)&&(H[k][D]+=U),W>0&&L<0&&(H[k][D]+=W*A)}}return{segmentIntensities:y,segmentUnitArea:S}}static computeGableRoofSolarRadiationEnergy(e,n,o,r,i,a,l,s,c,u,d){const f=ye.dayOfYear(e),p=n.solarRadiationHeatmapGridCellSize??.5,g=new ln(0,0,l.rotation[2],"ZYX"),A=vi(o,f,u,li.SPHERE_MODEL),y=[],S=[];for(const[C,P]of a.entries()){const v=r.id+"-"+C,T=P[0].clone().applyEuler(g),w=P[1].clone().applyEuler(g),x=P[2].clone().applyEuler(g),b=new ae().subVectors(w,T),R=new ae().subVectors(x,T),H=new ae().subVectors(x,w),F=b.length(),E=new ae().crossVectors(R,H).length()/F,N=Math.max(2,Math.round(F/p)),U=Math.max(2,Math.round(E/p)),W=Array(N).fill(0).map(()=>Array(U).fill(0));y.push(W),b.normalize(),R.normalize(),H.normalize();const k=new ae().crossVectors(R,H).normalize(),D=b.multiplyScalar(.5*F/N),L=new ae().crossVectors(k,b).normalize().multiplyScalar(.5*E/U),j=new ae(l.cx+T.x,l.cy+T.y,l.lz+T.z+k0+(i?r.thickness:0));j.add(D).add(L),D.multiplyScalar(2),L.multiplyScalar(2),S.push(D.length()*L.length());const B=new ae,O=qr(n.ground,e.getMonth(),k,A),V=k.dot(o);for(let G=0;Gc6||ie<0)&&(W[G][$]+=O),V>0&&ie<0&&(W[G][$]+=V*A)}}}return{segmentIntensities:y,segmentUnitArea:S}}static isPointRoof(e,n,o,r){if(n&&n.length>0)for(const i of n){const a=bn.getAbsoluteWindowVerticesOnRoof(i,r),l=ye.getPoints(a);if(ye.isPointInside(e.x,e.y,l))return!1}if(o&&o.length>0)for(const i of o){const a=bn.getAbsoluteSolarPanelVerticesOnRoof(i,r),l=ye.getPoints(a);if(ye.isPointInside(e.x,e.y,l))return!1}return!0}}const SBo=be.memo(({city:t})=>{const e=M(pn),n=dt(bh),o=M(yA),r=M(Gr),i=M(s3),a=M(t5),l=Cn(Ige),s=Cn(mW),c=Cn(Dge),u=Cn(V8t),d=Cn(G8t),f=Cn(J8t),p=M(oa),g=dt(AW),A=dt(Ewt),y=dt(Xq),S=dt(Fwt),C=M.getState().world,P=M.getState().elements,v=C.noAnimationForThermalSimulation,T=C.highestTemperatureTimeInMinutes??900,w=m.useRef(0),x=m.useRef(!1),b=m.useRef(new Date(C.date)),R=m.useRef(0),H=m.useRef(!1),F=m.useRef(new Date(C.date)),E=m.useRef(0),N=m.useRef({high:20,low:0}),U=m.useRef(20),W=m.useRef(20),k=m.useRef(new Map),D=m.useRef(new Map),L=m.useRef(new Map),j=m.useRef([]),B=m.useRef([]),O=m.useRef(),V=m.useRef(),G=m.useRef(0),Q=m.useRef(new Map),$=$t(),ie=u1(t),q=new Date(C.date),se=t?ie==null?void 0:ie.elevation:0,Z=C.monthlyIrradianceLosses??new Array(12).fill(.05),ee=C.timesPerHour??4,te=60/ee,oe=C.daysPerYear??6,de=12/oe,{scene:he}=ri(),pe=m.useMemo(()=>new l0,[]),me=()=>a9(1,Xye(q),yN(q),ye.toRadians(C.latitude)).normalize(),le=(Be,$e,wt)=>{if(j.current.length>1){B.current.length=0,pe.set($e,wt);const vt=j.current.filter(Rt=>Rt.uuid!==Be);if(pe.intersectObjects(vt,!1,B.current),B.current.length>0)return B.current[0].distance}return-1},Te=()=>{const Be=he.children.filter($e=>$e.name==="Content");if(Be.length>0){const $e=Be[0].children;j.current.length=0;for(const wt of $e)ye.fetchSimulationElements(wt,j.current)}},ge=Be=>{if(ie){N.current=rb(q,ie.lowestTemperatures,ie.highestTemperatures);const $e=ye.minutesIntoDay(Be);U.current=ob(N.current.high,N.current.low,C.diurnalTemperatureModel??y2.Sinusoidal,T,dl(Be,C.latitude),$e),W.current=wZe(C.latitude,ye.dayOfYear(q),$e,ie.lowestTemperatures,ie.highestTemperatures,T,.5*(N.current.high-N.current.low),C.ground.thermalDiffusivity??.05,ije)}},Se=(Be,$e)=>{let wt=k.current.get(Be);wt||(wt=new Array(24).fill(0),k.current.set(Be,wt)),wt[q.getHours()]+=$e},Re=(Be,$e)=>{let wt=D.current.get(Be);wt||(wt=new Array(24).fill(0),D.current.set(Be,wt)),wt[q.getHours()]+=$e},De=(Be,$e)=>{let wt=L.current.get(Be);wt||(wt=new Array(24).fill(0),L.current.set(Be,wt)),wt[q.getHours()]+=$e},Ae=()=>{var Be,$e,wt,vt;for(const Rt of P){if(ye.onBuildingEnvelope(Rt)&&((Be=k.current.get(Rt.id))==null||Be.fill(0)),Rt.type===z.Roof)for(const Gt of k.current.keys())Gt!==Rt.id&&Gt.startsWith(Rt.id)&&(($e=k.current.get(Gt))==null||$e.fill(0));Rt.type===z.Foundation&&((wt=D.current.get(Rt.id))==null||wt.fill(0),(vt=L.current.get(Rt.id))==null||vt.fill(0))}},ue=()=>{Q.current.clear()};m.useEffect(()=>{if(g)if(v&&!ye.hasMovingParts(P))fe();else return Te(),ve(),w.current=requestAnimationFrame(Pe),()=>{cancelAnimationFrame(w.current),x.current||(gn(Y.t("message.SimulationAborted",$)),e(Be=>{Be.world.date=b.current.toLocaleString("en-US")}),dt.getState().set(Be=>{Be.simulationInProgress=!1,Be.simulationPaused=!1})),H.current=!1}},[g]),m.useEffect(()=>{H.current=A,A?(F.current=new Date(q.getTime()),cancelAnimationFrame(w.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",$))):(n("simulationPaused",!1),q.setHours(q.getHours(),q.getMinutes()+te),Pe())},[A]);const fe=()=>{Je()},ve=()=>{H.current?(q.setTime(F.current.getTime()),H.current=!1):(b.current=new Date(C.date),E.current=ye.dayOfYear(q),q.setHours(0,te/2)),x.current=!1,Ae(),ue()},we=()=>{for(const Be of P){if(ye.onBuildingEnvelope(Be)||Be.type===z.SolarPanel){const $e=k.current.get(Be.id);$e&&u(Be.id,[...$e]);const wt=Q.current.get(Be.id);wt&&l(Be.id,wt.map(vt=>[...vt]))}if(Be.type===z.Roof){for(const $e of k.current.keys())if($e!==Be.id&&$e.startsWith(Be.id)){const wt=k.current.get($e);wt&&u($e,[...wt]);const vt=Q.current.get($e);vt&&l($e,vt.map(Rt=>[...Rt]))}}if(Be.type===z.Foundation){let $e=D.current.get(Be.id);$e&&d(Be.id,[...$e]),$e=L.current.get(Be.id),$e&&f(Be.id,[...$e])}}dt.getState().set(Be=>{Be.flagOfDailySimulation=!Be.flagOfDailySimulation,Be.runYearlyThermalSimulation||(Be.showSolarRadiationHeatmap=!0,Be.showHeatFluxes=!0)}),p&&!y&&setTimeout(()=>{e(Be=>{const $e=Cn.getState().totalBuildingHeater,wt=Cn.getState().totalBuildingAc,vt=Cn.getState().totalBuildingSolarPanel;Be.actionInfo={name:"Daily Building Energy Analysis Completed",result:{Heater:$e.toFixed(2),AC:wt.toFixed(2),SolarPanel:vt.toFixed(2),Net:($e+wt-vt).toFixed(2)},timestamp:new Date().getTime()}})},10)},Pe=()=>{if(g&&!H.current){if(q.getMinutes()+q.getHours()*60+(ye.dayOfYear(q)-E.current)*T2+te>T2){Je(),cancelAnimationFrame(w.current),e($e=>{$e.world.date=b.current.toLocaleString("en-US"),$e.viewState.showDailyBuildingEnergyPanel=!0,$e.selectedFloatingWindow="dailyBuildingEnergyPanel"}),dt.getState().set($e=>{$e.runDailyThermalSimulation=!1,$e.simulationPaused=!1,$e.simulationInProgress=!1}),gn(Y.t("message.SimulationCompleted",$)),x.current=!0,we();return}e($e=>{$e.world.date=q.toLocaleString("en-US")}),Je(),w.current=requestAnimationFrame(Pe),q.setHours(q.getHours(),q.getMinutes()+te)}},[Ie,Me]=m.useState(q.getMonth());m.useEffect(()=>{setTimeout(()=>{Te()},200)},[Ie]),m.useEffect(()=>{if(y)if(dt.getState().set(Be=>{Be.showSolarRadiationHeatmap=!1,Be.showHeatFluxes=!1}),v&&!ye.hasMovingParts(P))setTimeout(()=>{},50);else return ze(),Me(q.getMonth()),Te(),w.current=requestAnimationFrame(Ne),()=>{cancelAnimationFrame(w.current),x.current||(gn(Y.t("message.SimulationAborted",$)),e(Be=>{Be.world.date=b.current.toLocaleString("en-US")}),dt.getState().set(Be=>{Be.simulationInProgress=!1,Be.simulationPaused=!1})),H.current=!1}},[y]),m.useEffect(()=>{H.current=S,S?(F.current=new Date(q.getTime()),cancelAnimationFrame(w.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",$))):(n("simulationPaused",!1),q.setHours(q.getHours(),q.getMinutes()+te),Ne())},[S]);const ze=()=>{H.current?(q.setTime(F.current.getTime()),H.current=!1):(b.current=new Date(C.date),R.current=0,q.setMonth(0,22),E.current=ye.dayOfYear(q),q.setHours(0,te/2),e(Be=>{Be.viewState.showYearlyBuildingEnergyPanel=!0,Be.selectedFloatingWindow="yearlyBuildingEnergyPanel",Be.world.date=q.toLocaleString("en-US")})),Ae(),ue(),x.current=!1},Ne=()=>{y&&!H.current&&(q.getMinutes()+q.getHours()*60+(ye.dayOfYear(q)-E.current)*T2{$e.world.date=q.toLocaleString("en-US")}),Je(),q.setHours(q.getHours(),q.getMinutes()+te),w.current=requestAnimationFrame(Ne)):(we(),R.current++,R.current===oe?(cancelAnimationFrame(w.current),setTimeout(()=>{e($e=>{$e.world.date=b.current.toLocaleString("en-US")})},10),dt.getState().set($e=>{$e.runYearlyThermalSimulation=!1,$e.simulationInProgress=!1,$e.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",$)),x.current=!0,p&&setTimeout(()=>{e($e=>{const wt=Cn.getState().totalBuildingHeater,vt=Cn.getState().totalBuildingAc,Rt=Cn.getState().totalBuildingSolarPanel;$e.actionInfo={name:"Yearly Building Energy Analysis Completed",result:{Heater:wt.toFixed(2),AC:vt.toFixed(2),SolarPanel:Rt.toFixed(2),Net:(wt+vt-Rt).toFixed(2)},timestamp:new Date().getTime()}})},10)):(q.setMonth(R.current*de,22),q.setHours(0,te/2),Me(q.getMonth()),E.current=ye.dayOfYear(q),Ae(),ue(),w.current=requestAnimationFrame(Ne))))},Je=()=>{ge(q),V.current=dl(q,C.latitude);const Be=V.current.daylight()/60;G.current=Be>Et?ie.sunshineHours[q.getMonth()]/(30*Be*ee):0,O.current=me();for(const $e of P)switch($e.type){case z.Door:{st($e);break}case z.Window:{ke($e),Oe($e);break}case z.Wall:{je($e);break}case z.Roof:{const wt=$e;Ye(wt),xt(wt);break}case z.SolarPanel:{Ee($e);break}}},Ue=(Be,$e)=>{let wt=$e.efficiency;return $e.cellType==="Monocrystalline"&&(wt*=.95),wt*(1+$e.pmaxTC*(Be-25))},nt=()=>{if(!V.current)throw new Error("sun minutes not set");const Be=V.current.daylight()/60;return Be>Et?ie.sunshineHours[q.getMonth()]/(30*Be*ee):0},We=Be=>{if(!a(Be.pvModelName))throw new Error("PV model not found");return Be.lx*Be.ly*(Be.inverterEfficiency??.95)*(1-Z[q.getMonth()])},Ee=Be=>{const $e=o(Be);if($e){const wt=r(Be);if(wt){const vt=a(Be.pvModelName);if(O.current&&O.current.z>0){const Rt=ll.computeSolarPanelOutput(q,C,O.current,vt,Be,wt,$e,se,le),Gt=Ue(U.current,vt)*nt()*We(Be);if(De($e.id,Rt.average*Gt),g){for(let pt=0;pt{var wt;if(Be.interior)return;const $e=o(Be);if($e){const vt=r(Be);if(vt){const Rt=((wt=$e.hvacSystem)==null?void 0:wt.thermostatSetpoint)??20,Gt=ye.getWindowArea(Be,Be.parentType===z.Roof?void 0:vt),At=U.current-Rt;Be.empty?Se(Be.id,At*Gt*SO*.001/ee):Se(Be.id,At*Gt*(Be.uValue??X4)*.001/ee)}}},Oe=Be=>{if(Be.interior)return;const $e=o(Be);if($e){const wt=r(Be);if(wt){let vt=0;if(Be.parentType===z.Roof){const Rt=s(wt.id);if(!Rt)return;for(let Gt=0;Gt0){const At=ll.computeRoofWindowSolarRadiationEnergy(q,C,O.current,Be,wt,$e,se,le);for(let pt=0;pt0){const Rt=ll.computeWallWindowSolarRadiationEnergy(q,C,O.current,Be,wt,$e,se,le);for(let Gt=0;Gt{var wt;if(Be.interior)return;const $e=o(Be);if($e){const vt=r(Be);if(vt){const Rt=((wt=$e.hvacSystem)==null?void 0:wt.thermostatSetpoint)??20,Gt=ye.getDoorArea(Be,vt);if(Be.filled){const At=Z7(Be);let pt=0;if(O.current&&O.current.z>0){const ct=ll.computeDoorSolarRadiationEnergy(q,C,O.current,Be,vt,$e,se,le);for(let It=0;It{var wt;const $e=o(Be);if($e){const vt=Be.fill!==Fl.Empty&&Be.wallStructure===gc.Default,Rt=((wt=$e.hvacSystem)==null?void 0:wt.thermostatSetpoint)??20;if(vt){const Gt=Be.fill===Fl.Partial&&!ye.isPartialWallFull(Be),At=ye.getWallVertices(Be,0),pt=Gt?ye.getPartialWallVertices(Be,0):At,Wt=ye.getPolygonArea(At);let ht=Gt?ye.getPolygonArea(pt):Wt;const ct=i(z.Window,Be.id),It=i(z.Door,Be.id),Ft=Z7(Be);let Ve=0;if(O.current&&O.current.z>0){const at=(Gt?pt.length:At.length)===4,Ge=i(z.SolarPanel,Be.id),yt=ll.computeWallSolarRadiationEnergy(q,C,O.current,Be,$e,ct,It,Ge,at?0:1,se,le);for(let Pt=0;Pt0)for(const at of ct)ht-=ye.getWindowArea(at,Be);if(It&&It.length>0)for(const at of It)ht-=at.lx*at.lz*Be.lx*Be.lz;const ft=ye.isZero(Ve)||ye.isZero(Ft)?0:Ve*Ft/((Be.volumetricHeatCapacity??.5)*ht*Be.ly);let rt=(U.current+ft-Rt)*ht/(Be.rValue??p6)*.001/ee;Gt&&Be.openToOutside&&(rt+=(U.current-Rt)*(Wt-ht)*SO*.001/ee),Se(Be.id,rt)}else if(Be.openToOutside){const Gt=ye.getWallVertices(Be,0),At=ye.getPolygonArea(Gt),pt=U.current-Rt;Se(Be.id,pt*At*SO*.001/ee)}}},xt=Be=>{var Gt;const $e=o(Be);if(!$e)return;const wt=((Gt=$e.hvacSystem)==null?void 0:Gt.thermostatSetpoint)??20,vt=ye.calculateBuildingArea(Be),Rt=W.current-wt;Se($e.id,Rt*vt/($e.rValue??i8)*.001/ee)},gt=(Be,$e,wt)=>{const vt=1/(Be.rValue??a8),Rt=1/(Be.ceilingRValue??w6);return(vt*$e+Rt*wt)/(vt+Rt)},Ye=Be=>{var Rt;const $e=o(Be);if(!$e)return;const wt=s(Be.id);if(!wt)return;let vt;switch(Be.roofType){case Go.Pyramid:vt=it(Be,wt,$e);break;case Go.Hip:vt=ut(Be,wt,$e);break;case Go.Gable:vt=Ze(Be,wt,$e);break;case Go.Gambrel:vt=Qe(Be,wt,$e);break;case Go.Mansard:vt=lt(Be,wt,$e);break}if(vt){const Gt=((Rt=$e.hvacSystem)==null?void 0:Rt.thermostatSetpoint)??20;let At=0;for(const[pt,Wt]of vt.entries()){const ct=(Wt.surfaceTemperature-(Be.ceiling?gt(Be,Wt.surfaceTemperature,Gt):Gt))*Wt.totalArea/(Be.rValue??a8)*.001/ee;Se(Be.id+"-"+pt,ct),At+=ct}Se(Be.id,At)}},it=(Be,$e,wt)=>{if(Be.roofType!==Go.Pyramid)throw new Error("roof is not pyramid");const vt=$e.length;if(vt===0)return;let Rt=!0;const Gt=$e[0][0].z;for(const Ve of $e)for(const ft of Ve)if(Math.abs(ft.z-Gt)>.01){Rt=!1;break}const At=Rt?1:vt,pt=i(z.Window,Be.id),Wt=[];if(Rt){let Ve=0;for(const ft of $e){const kt=[];for(const rt of ft)kt.push(ye.mapVector3ToPoint2(rt));Ve+=ye.getPolygonArea(kt)}if(pt.length>0){for(const ft of pt)Ve-=ft.lx*ft.lz;Ve<0&&(Ve=0)}Wt.push(Ve)}else for(const Ve of $e){let ft=ye.getTriangleArea(Ve[0],Ve[1],Ve[2]);if(pt.length>0){for(const kt of pt)bn.onSegment(Ve,kt.cx,kt.cy)&&(ft-=kt.lx*kt.lz);ft<0&&(ft=0)}Wt.push(ft)}const ht=Z7(Be),ct=Array(At).fill(0);if(O.current&&O.current.z>0){const Ve=i(z.SolarPanel,Be.id),ft=ll.computePyramidRoofSolarRadiationEnergy(q,C,O.current,Be,Rt,!0,$e,wt,pt,Ve,se,le);for(let kt=0;kt{if(Be.roofType!==Go.Hip)throw new Error("roof is not hip");const vt=$e.length;if(vt===0)return;let Rt=!0;const Gt=$e[0][0].z;for(const ft of $e)for(const kt of ft)if(Math.abs(kt.z-Gt)>.01){Rt=!1;break}const At=Rt?1:vt,pt=[],Wt=i(z.Window,Be.id);for(const ft of $e){let kt=0;if(ft.length===3?kt=ye.getTriangleArea(ft[0],ft[1],ft[2]):ft.length===4&&(kt=ye.getTriangleArea(ft[0],ft[1],ft[2])+ye.getTriangleArea(ft[2],ft[3],ft[0])),Wt.length>0){for(const rt of Wt)bn.onSegment(ft,rt.cx,rt.cy)&&(kt-=rt.lx*rt.lz);kt<0&&(kt=0)}pt.push(kt)}const ht=Rt?[pt.reduce((ft,kt)=>ft+kt,0)]:pt,ct=Z7(Be),It=Array(At).fill(0);if(O.current&&O.current.z>0){const ft=i(z.SolarPanel,Be.id),kt=ll.computeHipRoofSolarRadiationEnergy(q,C,O.current,Be,Rt,!0,$e,wt,Wt,ft,se,le);for(let rt=0;rt{if(Be.roofType!==Go.Gambrel)throw new Error("roof is not gambrel");const vt=$e.length;if(vt===0)return;let Rt=!0;const Gt=$e[0][0].z;for(const ft of $e)for(const kt of ft)if(Math.abs(kt.z-Gt)>.01){Rt=!1;break}const At=Rt?1:vt,pt=[],Wt=i(z.Window,Be.id);for(const ft of $e){let kt=ye.getTriangleArea(ft[0],ft[1],ft[2])+ye.getTriangleArea(ft[2],ft[3],ft[0]);if(Wt.length>0){for(const rt of Wt)bn.onSegment(ft,rt.cx,rt.cy)&&(kt-=rt.lx*rt.lz);kt<0&&(kt=0)}pt.push(kt)}const ht=Rt?[pt.reduce((ft,kt)=>ft+kt,0)]:pt,ct=Z7(Be),It=Array(At).fill(0);if(O.current&&O.current.z>0){const ft=i(z.SolarPanel,Be.id),kt=ll.computeGambrelRoofSolarRadiationEnergy(q,C,O.current,Be,Rt,!0,$e,wt,Wt,ft,se,le);for(let rt=0;rt{if(Be.roofType!==Go.Mansard)throw new Error("roof is not mansard");const vt=$e.length;if(vt===0)return;let Rt=!0;const Gt=$e[0][0].z;for(const at of $e)for(const Ge of at)if(Math.abs(Ge.z-Gt)>.01){Rt=!1;break}const At=Rt?1:vt,pt=[],Wt=i(z.Window,Be.id);for(let at=0;at0){for(const Pt of Wt)bn.onSegment(Ge,Pt.cx,Pt.cy)&&(yt-=Pt.lx*Pt.lz);yt<0&&(yt=0)}pt.push(yt)}const ht=$e[vt-1],ct=new Array;for(const at of ht)ct.push({x:at.x,y:at.y});let It=ye.getPolygonArea(ct);if(Wt.length>0){for(let at=Wt.length-1;at>=0;at--){const Ge=Wt[at];bn.onSegment(ht,Ge.cx,Ge.cy)&&(It-=Ge.lx*Ge.lz,Wt.splice(at,1))}It<0&&(It=0)}pt.push(It);const Ft=Rt?[pt.reduce((at,Ge)=>at+Ge,0)]:pt,Ve=Z7(Be),ft=Array(At).fill(0);if(O.current&&O.current.z>0){const at=i(z.SolarPanel,Be.id),Ge=ll.computeMansardRoofSolarRadiationEnergy(q,C,O.current,Be,Rt,!0,$e,wt,Wt,at,se,le);for(let yt=0;yt{if(Be.roofType!==Go.Gable)throw new Error("roof is not gable");const vt=$e.length;if(vt===0)return;const Rt=i(z.Window,Be.id),Gt=[];for(const ct of $e){let It=ye.getTriangleArea(ct[0],ct[1],ct[2])+ye.getTriangleArea(ct[2],ct[3],ct[0]);if(Rt.length>0){for(const Ft of Rt)bn.onSegment(ct,Ft.cx,Ft.cy)&&(It-=Ft.lx*Ft.lz);It<0&&(It=0)}Gt.push(It)}const At=Z7(Be),pt=Array(vt).fill(0);if(O.current&&O.current.z>0){const ct=i(z.SolarPanel,Be.id),It=ll.computeGableRoofSolarRadiationEnergy(q,C,O.current,Be,!0,$e,wt,Rt,ct,se,le);for(let Ft=0;Ft{const e=M.getState().world,n=M.getState().elements,o=M(Gr),r=M(yA),i=Cn(Ige),a=Cn(JBe),l=dt(Lge),s=Cn(Dge),{scene:c}=ri(),u=$t(),d=u1(t),f=new Date(e.date),p=t?d==null?void 0:d.elevation:0,g=60/e.timesPerHour,A=m.useMemo(()=>new l0,[]),y=e.solarRadiationHeatmapGridCellSize??.5,S=m.useRef([]),C=m.useRef([]);m.useEffect(()=>{l&&n&&n.length>0&&(a(),T(),dt.getState().set(B=>{B.runStaticSimulation=!1,B.simulationInProgress=!1,B.showSolarRadiationHeatmap=!0}),gn(Y.t("message.SimulationCompleted",u)))},[l]);const P=(B,O,V)=>{if(S.current.length>1){C.current.length=0,A.set(O,V);const G=S.current.filter(Q=>Q.uuid!==B);return A.intersectObjects(G,!1,C.current),C.current.length>0}return!1},v=()=>{const B=c.children.filter(O=>O.name==="Content");if(B.length>0){const O=B[0].children;S.current.length=0;for(const V of O)ye.fetchSimulationElements(V,S.current)}},T=()=>{v();for(const B of n)switch(B.type){case z.Foundation:{const O=B;x(O),O.solarStructure===Dn.UpdraftTower&&b(O);break}case z.Cuboid:{w(B);break}case z.SolarPanel:{R(B);break}case z.SolarWaterHeater:{H(B);break}case z.Wall:{F(B);break}case z.Door:{E(B);break}case z.Roof:{const O=B;switch(O.roofType){case Go.Pyramid:N(O);break;case Go.Gable:L(O);break;case Go.Gambrel:W(O);break;case Go.Mansard:U(O);break;case Go.Hip:k(O);break}break}}},w=B=>{const O=f.getFullYear(),V=f.getMonth(),G=f.getDate(),Q=ye.dayOfYear(f),$=B.lx,ie=B.ly,q=B.lz,se=Math.max(2,Math.round($/y)),Z=Math.max(2,Math.round(ie/y)),ee=Math.max(2,Math.round(q/y)),te=$/se,oe=ie/Z,de=q/ee,he=o(B);let pe=B.cx,me=B.cy,le=B.cz;if(he&&he.type===z.Cuboid){const ke=ye.getWorldDataById(B.id);pe=ke.pos.x,me=ke.pos.y,le=ke.pos.z}const Te=Array(se).fill(0).map(()=>Array(Z).fill(0)),ge=Array(se).fill(0).map(()=>Array(ee).fill(0)),Se=Array(se).fill(0).map(()=>Array(ee).fill(0));let Re=Array(Z).fill(0).map(()=>Array(ee).fill(0)),De=Array(Z).fill(0).map(()=>Array(ee).fill(0));const Ae=ko,ue=_p.clone().applyAxisAngle(ko,B.rotation[2]),fe=Yc.clone().applyAxisAngle(ko,B.rotation[2]),ve=Vp.clone().applyAxisAngle(ko,B.rotation[2]),we=Op.clone().applyAxisAngle(ko,B.rotation[2]),Pe=new ae;let Ie=0;const Me=new Kt(pe,me),ze=new Kt,Ne=me-ie/2,Je=me+ie/2,Ue=pe-$/2,nt=pe+$/2;for(let ke=0;ke<24;ke++)for(let Oe=0;Oe0){Ie++;const xt=vi(je,Q,p,li.SPHERE_MODEL);let gt=qr(e.ground,V,Ae,xt),Ye=Ae.dot(je),it=pe-$/2,ut=me-ie/2;const Qe=le+q/2;for(let lt=0;lt0&&(ze.set(it+(lt+.5)*te,ut+(Ze+.5)*oe),ze.rotateAround(Me,B.rotation[2]),Pe.set(ze.x,ze.y,Qe),P(B.id,Pe,je)||(Te[lt][Ze]+=Ye*xt));it=pe-$/2,ut=le-q/2,gt=qr(e.ground,V,ue,xt),Ye=ue.dot(je);for(let lt=0;lt0&&(ze.set(it+(lt+.5)*te,Ne),ze.rotateAround(Me,B.rotation[2]),Pe.set(ze.x,ze.y,ut+(Ze+.5)*de),P(B.id,Pe,je)||(ge[lt][Ze]+=Ye*xt));gt=qr(e.ground,V,fe,xt),Ye=fe.dot(je);for(let lt=0;lt0&&(ze.set(it+(lt+.5)*te,Je),ze.rotateAround(Me,B.rotation[2]),Pe.set(ze.x,ze.y,ut+(ee-(Ze+.5))*de),P(B.id,Pe,je)||(Se[lt][Ze]+=Ye*xt));it=me-ie/2,ut=le-q/2,gt=qr(e.ground,V,ve,xt),Ye=ve.dot(je);for(let lt=0;lt0&&(ze.set(Ue,it+(lt+.5)*oe),ze.rotateAround(Me,B.rotation[2]),Pe.set(ze.x,ze.y,ut+(Ze+.5)*de),P(B.id,Pe,je)||(Re[lt][Ze]+=Ye*xt));gt=qr(e.ground,V,we,xt),Ye=we.dot(je);for(let lt=0;lt0&&(ze.set(nt,it+(lt+.5)*oe),ze.rotateAround(Me,B.rotation[2]),Pe.set(ze.x,ze.y,ut+(Ze+.5)*de),P(B.id,Pe,je)||(De[lt][Ze]+=Ye*xt))}}Re=ye.transpose(Re),De=ye.transpose(De);const We=Ie*g/60,Ee=We>Et?d.sunshineHours[V]/(30*We*e.timesPerHour):0;j(Te,Ee),j(ge,Ee),j(Se,Ee),j(Re,Ee),j(De,Ee),i(B.id+"-top",Te),i(B.id+"-south",ge),i(B.id+"-north",Se),i(B.id+"-west",Re),i(B.id+"-east",De)},x=B=>{const O=f.getFullYear(),V=f.getMonth(),G=f.getDate(),Q=ye.dayOfYear(f),$=B.lx,ie=B.ly,q=B.lz,se=Math.max(2,Math.round($/y)),Z=Math.max(2,Math.round(ie/y)),ee=$/se,te=ie/Z,oe=B.cx-$/2,de=B.cy-ie/2,he=new Kt(B.cx,B.cy),pe=new ae,me=Array(se).fill(0).map(()=>Array(Z).fill(0));let le=0;for(let Se=0;Se<24;Se++)for(let Re=0;Re0){le++;const ue=vi(Ae,Q,p,li.SPHERE_MODEL),fe=qr(e.ground,V,ko,ue),ve=ko.dot(Ae),we=new Kt;for(let Pe=0;Pe0&&(we.set(oe+(Pe+.5)*ee,de+(Ie+.5)*te),we.rotateAround(he,B.rotation[2]),pe.set(we.x,we.y,q),P(B.id,pe,Ae)||(me[Pe][Ie]+=ve*ue))}}const Te=le*g/60,ge=Te>Et?d.sunshineHours[V]/(30*Te*e.timesPerHour):0;j(me,ge),i(B.id,me)},b=B=>{const O=B.solarUpdraftTower;if(!O)return;const V=f.getFullYear(),G=f.getMonth(),Q=f.getDate(),$=ye.dayOfYear(f),ie=O.collectorRadius,q=Math.max(2,Math.round(ie*2/y)),se=B.cx-ie+y/2,Z=B.cy-ie+y/2,ee=B.lz+O.collectorHeight,te=Array(q).fill(0).map(()=>Array(q).fill(0)),oe=new ae(0,0,ee),de=ie*ie;let he=0,pe,me;for(let ge=0;ge<24;ge++)for(let Se=0;Se0){he++;const Ae=vi(De,$,p,li.SPHERE_MODEL),ue=qr(e.ground,G,ko,Ae),fe=ko.dot(De);for(let ve=0;vede)&&(te[ve][we]+=ue,fe>0&&(P(B.id+"-sut",oe,De)||(te[ve][we]+=fe*Ae)))}}}const le=he*g/60,Te=le>Et?d.sunshineHours[G]/(30*le*e.timesPerHour):0;j(te,Te),i(B.id+"-sut",te)},R=B=>{if(B.trackerType!==Ll.NO_TRACKER)throw new Error("trackers cannot use static simulation");let O=o(B);if(!O)throw new Error("parent of solar panel does not exist");const V=B.parentType===z.Roof,G=B.parentType===z.Wall;if(V&&(O=r(O),!O))throw new Error("foundation of solar panel does not exist");const Q=G?ye.absoluteCoordinates(B.cx,B.cy,B.cz,O,r(B),B.lz):ye.absoluteCoordinates(B.cx,B.cy,B.cz,O,void 0,void 0,!0),$=new ae().fromArray(B.normal);G&&$.applyEuler(new ln(0,0,O.relativeAngle));const ie=O.rotation[2];let q=ie+(G?0:B.relativeAzimuth),se=B.tiltAngle,Z=!0;if(V&&(Q.z=B.cz+B.lz+.02+O.cz,ye.isZero(B.rotation[0])?Q.z+=B.poleHeight:(se=B.rotation[0],q=ie,Z=!1)),G&&!ye.isZero(B.tiltAngle)){const Me=O,ze=r(O),Je=(ze?ze.rotation[2]+Me.relativeAngle:Me.relativeAngle)-Qt,Ue=B.ly*Math.abs(Math.sin(B.tiltAngle))/2;Q.x+=Ue*Math.cos(Je),Q.y+=Ue*Math.sin(Je)}const ee=new ln(V&&!Z?0:se,0,q,"ZYX");$.applyEuler(ee);const te=f.getFullYear(),oe=f.getMonth(),de=f.getDate(),he=ye.dayOfYear(f),pe=B.lx,me=B.ly,le=Math.max(2,Math.round(B.lx/y)),Te=Math.max(2,Math.round(B.ly/y)),ge=pe/le,Se=me/Te,Re=Q.x-(pe-y)/2,De=Q.y-(me-y)/2,Ae=V||G?Q.z:O.lz+B.poleHeight+B.lz,ue=new Kt(Q.x,Q.y),fe=new ae,ve=Array(le).fill(0).map(()=>Array(Te).fill(0));let we=0;if(V&&!Z&&(ee.x=B.rotation[0],ee.z=B.rotation[2]+ie),G){const Me=o(B);Me&&(ee.x=Qt+B.tiltAngle,ee.z=O.relativeAngle+Me.rotation[2])}for(let Me=0;Me<24;Me++)for(let ze=0;ze0){we++;const Ue=vi(Je,he,p,li.SPHERE_MODEL),nt=qr(e.ground,oe,$,Ue),We=$.dot(Je),Ee=new Kt,ke=new ae;for(let Oe=0;Oe0&&(Ee.set(Re+Oe*ge,De+st*Se),ke.set(Ee.x-ue.x,Ee.y-ue.y,0),ke.applyEuler(ee),fe.set(Q.x+ke.x,Q.y+ke.y,Ae+ke.z),P(B.id,fe,Je)||(ve[Oe][st]+=We*Ue))}}const Pe=we*g/60,Ie=Pe>Et?d.sunshineHours[oe]/(30*Pe*e.timesPerHour):0;j(ve,Ie),i(B.id,ve)},H=B=>{const O=o(B);if(!O)throw new Error("parent of solar water heater does not exist");const V=r(O);if(!V)throw new Error("foundation of solar water heater does not exist");const G=ye.absoluteCoordinates(B.cx,B.cy,B.cz,V,void 0,void 0,!0),Q=new ln,$=(B.lz-B.waterTankRadius)/2,ie=Math.atan2(B.lz-B.waterTankRadius,B.ly);ye.isZero(B.rotation[0])?(Q.set(ie,0,B.relativeAzimuth+V.rotation[2],"ZXY"),G.z+=$):(Q.set(B.rotation[0]+ie,0,B.rotation[2]+V.rotation[2],"ZXY"),G.add(new ae(0,0,$).applyEuler(Q)));const se=new ae(0,0,1).applyEuler(Q),Z=f.getFullYear(),ee=f.getMonth(),te=f.getDate(),oe=ye.dayOfYear(f),de=B.lx,he=Math.hypot(B.ly,B.lz-B.waterTankRadius),pe=Math.max(2,Math.round(B.lx/y)),me=Math.max(2,Math.round(B.ly/y)),le=de/pe,Te=he/me,ge=-(de-y)/2,Se=-(he-y)/2,Re=Array(pe).fill(0).map(()=>Array(me).fill(0));let De=0;for(let fe=0;fe<24;fe++)for(let ve=0;ve0){De++;const Ie=vi(Pe,oe,p,li.SPHERE_MODEL),Me=qr(e.ground,ee,se,Ie),ze=se.dot(Pe),Ne=new Kt,Je=new ae;for(let Ue=0;Ue0&&(Ne.set(ge+Ue*le,Se+nt*Te),Je.set(Ne.x,Ne.y,0).applyEuler(Q).add(G),P(B.id,Je,Pe)||(Re[Ue][nt]+=ze*Ie))}}const Ae=De*g/60,ue=Ae>Et?d.sunshineHours[ee]/(30*Ae*e.timesPerHour):0;j(Re,ue),i(B.id,Re)},F=B=>{const O=r(B);if(!O)throw new Error("foundation of wall not found");const V=f.getFullYear(),G=f.getMonth(),Q=f.getDate(),$=ye.dayOfYear(f),ie=B.lx,q=ye.getHighestPointOfWall(B),se=Math.max(2,Math.round(ie/y)),Z=Math.max(2,Math.round(q/y)),ee=ie/se,te=q/Z,oe=O.rotation[2]+B.relativeAngle,de=ye.wallAbsolutePosition(new ae(B.cx,B.cy,q/2),O).setZ(q/2+O.lz),he=new ae(Math.cos(oe-Qt),Math.sin(oe-Qt),0),pe=new ae,me=Array(se).fill(0).map(()=>Array(Z).fill(0));let le=0;const Te=ee*Math.cos(oe),ge=ee*Math.sin(oe),Se=ye.getWallVertices(B,2),Re=(q-B.lz)/2;for(let ue=0;ue<24;ue++)for(let fe=0;fe0){le++;const Pe=vi(we,$,p,li.SPHERE_MODEL),Ie=qr(e.ground,G,he,Pe),Me=he.dot(we);for(let ze=0;ze0&&(pe.set(de.x+Je*Te,de.y+Je*ge,de.z+Ue*te),P(B.id,pe,we)||(me[ze][Ne]+=Me*Pe)))}}}const De=le*g/60,Ae=De>Et?d.sunshineHours[G]/(30*De*e.timesPerHour):0;j(me,Ae),i(B.id,me)},E=B=>{const O=r(B);if(!O)throw new Error("foundation of door not found");const V=o(B);if(!V)throw new Error("parent of door not found");const G=V,Q=f.getFullYear(),$=f.getMonth(),ie=f.getDate(),q=ye.dayOfYear(f),se=B.lx*G.lx,Z=B.lz*G.lz,ee=Math.max(2,Math.round(se/y)),te=Math.max(2,Math.round(Z/y)),oe=se/ee,de=Z/te,he=O.rotation[2]+G.relativeAngle,me=ye.wallAbsolutePosition(new ae(G.cx,G.cy,G.cz),O).setZ(G.lz/2+O.lz).clone().add(new ae(B.cx*G.lx,0,B.cz*G.lz)),le=new ae(Math.cos(he-Qt),Math.sin(he-Qt),0),Te=new ae,ge=Array(ee).fill(0).map(()=>Array(te).fill(0));let Se=0;const Re=oe*Math.cos(he),De=oe*Math.sin(he);for(let fe=0;fe<24;fe++)for(let ve=0;ve0){Se++;const Ie=vi(Pe,q,p,li.SPHERE_MODEL),Me=qr(e.ground,$,le,Ie),ze=le.dot(Pe);if(B.doorType===Rd.Arched)for(let Ne=0;Ne0&&(P(B.id,Te,Pe)||(ge[Ne][Je]+=ze*Ie)))}else for(let Ne=0;Ne0&&(Te.set(me.x+Ue*Re,me.y+Ue*De,me.z+nt*de),P(B.id,Te,Pe)||(ge[Ne][Je]+=ze*Ie))}}}const Ae=Se*g/60,ue=Ae>Et?d.sunshineHours[$]/(30*Ae*e.timesPerHour):0;j(ge,ue),i(B.id,ge)},N=B=>{if(B.roofType!==Go.Pyramid)throw new Error("roof is not pyramid");const O=r(B);if(!O)throw new Error("foundation of wall not found");const V=s(B.id);if(!V||V.length===0)return;let G=!0;const Q=V[0][0].z;for(const $ of V)for(const ie of $)if(Math.abs(ie.z-Q)>.01){G=!1;break}if(G)D(B,O,V);else{const $=f.getFullYear(),ie=f.getMonth(),q=f.getDate(),se=ye.dayOfYear(f),Z=new ln(0,0,O.rotation[2],"ZYX");for(const[ee,te]of V.entries()){const oe=B.id+"-"+ee,de=te[0].clone().applyEuler(Z),he=te[1].clone().applyEuler(Z),pe=te[2].clone().applyEuler(Z),me=new ae().subVectors(he,de),le=new ae().subVectors(pe,de),Te=new ae().subVectors(pe,he),ge=me.length(),Se=new ae().crossVectors(le,Te).length()/ge,Re=Math.max(2,Math.round(ge/y)),De=Math.max(2,Math.round(Se/y)),Ae=Array(Re).fill(0).map(()=>Array(De).fill(0));me.normalize(),le.normalize(),Te.normalize();const ue=new ae().crossVectors(le,Te).normalize(),fe=me.multiplyScalar(.5*ge/Re),ve=new ae().crossVectors(ue,me).normalize().multiplyScalar(.5*Se/De),we=new ae(O.cx+de.x,O.cy+de.y,O.lz+de.z+k0);we.add(fe).add(ve),fe.multiplyScalar(2),ve.multiplyScalar(2);let Pe=0;const Ie=new ae;for(let Ne=0;Ne<24;Ne++)for(let Je=0;Je0){Pe++;const We=vi(nt,se,p,li.SPHERE_MODEL),Ee=qr(e.ground,ie,ue,We),ke=ue.dot(nt);for(let Oe=0;Oe0&&(Ie.copy(we).add(st).add(ve.clone().multiplyScalar(je)),P(oe,Ie,nt)||(Ae[Oe][je]+=ke*We))}}}const Me=Pe*g/60,ze=Me>Et?d.sunshineHours[ie]/(30*Me*e.timesPerHour):0;j(Ae,ze),i(oe,Ae)}}},U=B=>{if(B.roofType!==Go.Mansard)throw new Error("roof is not mansard");const O=r(B);if(!O)throw new Error("foundation of wall not found");const V=s(B.id);if(!V||V.length===0)return;let G=!0;const Q=V[0][0].z;for(const $ of V)for(const ie of $)if(Math.abs(ie.z-Q)>.01){G=!1;break}if(G)D(B,O,V);else{const $=f.getFullYear(),ie=f.getMonth(),q=f.getDate(),se=ye.dayOfYear(f),Z=new ln(0,0,O.rotation[2],"ZYX");for(const[ee,te]of V.entries()){const oe=B.id+"-"+ee;if(ee===V.length-1){let de=Number.MAX_VALUE,he=Number.MAX_VALUE,pe=-Number.MAX_VALUE,me=-Number.MAX_VALUE;for(const Pe of te){const Ie=Pe.clone().applyEuler(Z);Ie.x>pe&&(pe=Ie.x),Ie.xme&&(me=Ie.y),Ie.yArray(ge).fill(0)),Ae=new ae(de+y/2,he+y/2,O.lz+le+k0);let ue=0;const fe=new ae(0,0,Ae.z);for(let Pe=0;Pe<24;Pe++)for(let Ie=0;Ie0){ue++;const Ne=vi(ze,se,p,li.SPHERE_MODEL),Je=qr(e.ground,ie,ko,Ne),Ue=ko.dot(ze);for(let nt=0;nt0&&(fe.y=Ae.y+We*Re,P(oe,fe,ze)||(De[nt][We]+=Ue*Ne))}}}const ve=ue*g/60,we=ve>Et?d.sunshineHours[ie]/(30*ve*e.timesPerHour):0;j(De,we),i(oe,De)}else{const de=te[0].clone().applyEuler(Z),he=te[1].clone().applyEuler(Z),pe=te[2].clone().applyEuler(Z),me=new ae().subVectors(he,de),le=new ae().subVectors(pe,de),Te=new ae().subVectors(pe,he),ge=me.length(),Se=new ae().crossVectors(le,Te).length()/ge,Re=Math.max(2,Math.round(ge/y)),De=Math.max(2,Math.round(Se/y)),Ae=Array(Re).fill(0).map(()=>Array(De).fill(0));me.normalize(),le.normalize(),Te.normalize();const ue=new ae().crossVectors(le,Te).normalize(),fe=me.multiplyScalar(.5*ge/Re),ve=new ae().crossVectors(ue,me).normalize().multiplyScalar(.5*Se/De),we=new ae(O.cx+de.x,O.cy+de.y,O.lz+de.z+k0);we.add(fe).add(ve),fe.multiplyScalar(2),ve.multiplyScalar(2);let Pe=0;const Ie=new ae;for(let Ne=0;Ne<24;Ne++)for(let Je=0;Je0){Pe++;const We=vi(nt,se,p,li.SPHERE_MODEL),Ee=qr(e.ground,ie,ue,We),ke=ue.dot(nt);for(let Oe=0;Oe0&&(Ie.copy(we).add(st).add(ve.clone().multiplyScalar(je)),P(oe,Ie,nt)||(Ae[Oe][je]+=ke*We))}}}const Me=Pe*g/60,ze=Me>Et?d.sunshineHours[ie]/(30*Me*e.timesPerHour):0;j(Ae,ze),i(oe,Ae)}}}},W=B=>{if(B.roofType!==Go.Gambrel)throw new Error("roof is not gambrel");const O=r(B);if(!O)throw new Error("foundation of wall not found");const V=s(B.id);if(!V||V.length===0)return;let G=!0;const Q=V[0][0].z;for(const $ of V)for(const ie of $)if(Math.abs(ie.z-Q)>.01){G=!1;break}if(G)D(B,O,V);else{const $=f.getFullYear(),ie=f.getMonth(),q=f.getDate(),se=ye.dayOfYear(f),Z=new ln(0,0,O.rotation[2],"ZYX");for(const[ee,te]of V.entries()){const oe=B.id+"-"+ee,de=te[0].clone().applyEuler(Z),he=te[1].clone().applyEuler(Z),pe=te[2].clone().applyEuler(Z),me=new ae().subVectors(he,de),le=new ae().subVectors(pe,de),Te=new ae().subVectors(pe,he),ge=me.length(),Se=new ae().crossVectors(le,Te).length()/ge,Re=Math.max(2,Math.round(ge/y)),De=Math.max(2,Math.round(Se/y)),Ae=Array(Re).fill(0).map(()=>Array(De).fill(0));me.normalize(),le.normalize(),Te.normalize();const ue=new ae().crossVectors(le,Te).normalize(),fe=me.multiplyScalar(.5*ge/Re),ve=new ae().crossVectors(ue,me).normalize().multiplyScalar(.5*Se/De),we=new ae(O.cx+de.x,O.cy+de.y,O.lz+de.z+k0);we.add(fe).add(ve),fe.multiplyScalar(2),ve.multiplyScalar(2);let Pe=0;const Ie=new ae;for(let Ne=0;Ne<24;Ne++)for(let Je=0;Je0){Pe++;const We=vi(nt,se,p,li.SPHERE_MODEL),Ee=qr(e.ground,ie,ue,We),ke=ue.dot(nt);for(let Oe=0;Oe0&&(Ie.copy(we).add(st).add(ve.clone().multiplyScalar(je)),P(oe,Ie,nt)||(Ae[Oe][je]+=ke*We))}}}const Me=Pe*g/60,ze=Me>Et?d.sunshineHours[ie]/(30*Me*e.timesPerHour):0;j(Ae,ze),i(oe,Ae)}}},k=B=>{if(B.roofType!==Go.Hip)throw new Error("roof is not hip");const O=r(B);if(!O)throw new Error("foundation of wall not found");const V=s(B.id);if(!V||V.length===0)return;let G=!0;const Q=V[0][0].z;for(const $ of V)for(const ie of $)if(Math.abs(ie.z-Q)>.01){G=!1;break}if(G)D(B,O,V);else{const $=f.getFullYear(),ie=f.getMonth(),q=f.getDate(),se=ye.dayOfYear(f),Z=new ln(0,0,O.rotation[2],"ZYX");for(const[ee,te]of V.entries()){const oe=B.id+"-"+ee,de=te[0].clone().applyEuler(Z),he=te[1].clone().applyEuler(Z),pe=te[2].clone().applyEuler(Z),me=new ae().subVectors(he,de),le=new ae().subVectors(pe,de),Te=new ae().subVectors(pe,he),ge=me.length(),Se=new ae().crossVectors(le,Te).length()/ge,Re=Math.max(2,Math.round(ge/y)),De=Math.max(2,Math.round(Se/y)),Ae=Array(Re).fill(0).map(()=>Array(De).fill(0));me.normalize(),le.normalize(),Te.normalize();const ue=new ae().crossVectors(le,Te).normalize(),fe=me.multiplyScalar(.5*ge/Re),ve=new ae().crossVectors(ue,me).normalize().multiplyScalar(.5*Se/De);let we=0;const Pe=new ae,Ie=new ae(O.cx+de.x,O.cy+de.y,O.lz+de.z+k0);if(Ie.add(fe).add(ve),fe.multiplyScalar(2),ve.multiplyScalar(2),ee%2===0)for(let Ne=0;Ne<24;Ne++)for(let Je=0;Je0){we++;const We=vi(nt,se,p,li.SPHERE_MODEL),Ee=qr(e.ground,ie,ue,We),ke=ue.dot(nt);for(let Oe=0;Oe0&&(Pe.copy(Ie).add(st).add(ve.clone().multiplyScalar(je)),P(oe,Pe,nt)||(Ae[Oe][je]+=ke*We))}}}else for(let Ne=0;Ne<24;Ne++)for(let Je=0;Je0){we++;const We=vi(nt,se,p,li.SPHERE_MODEL),Ee=qr(e.ground,ie,ue,We),ke=ue.dot(nt);for(let Oe=0;Oe0&&(Pe.copy(Ie).add(st).add(ve.clone().multiplyScalar(je)),P(oe,Pe,nt)||(Ae[Oe][je]+=ke*We))}}}const Me=we*g/60,ze=Me>Et?d.sunshineHours[ie]/(30*Me*e.timesPerHour):0;j(Ae,ze),i(oe,Ae)}}},D=(B,O,V)=>{const G=f.getFullYear(),Q=f.getMonth(),$=f.getDate(),ie=ye.dayOfYear(f),q=new ln(0,0,O.rotation[2],"ZYX"),se=V[0][0].z;let Z=Number.MAX_VALUE,ee=Number.MAX_VALUE,te=-Number.MAX_VALUE,oe=-Number.MAX_VALUE;for(const Ae of V)for(const ue of Ae){const fe=ue.clone().applyEuler(q);fe.x>te&&(te=fe.x),fe.xoe&&(oe=fe.y),fe.yArray(he).fill(0)),Te=new ae(Z+y/2,ee+y/2,O.lz+se+k0);let ge=0;const Se=new ae(0,0,Te.z);for(let Ae=0;Ae<24;Ae++)for(let ue=0;ue0){ge++;const we=vi(ve,ie,p,li.SPHERE_MODEL),Pe=qr(e.ground,Q,ko,we),Ie=ko.dot(ve);for(let Me=0;Me0&&(Se.y=Te.y+ze*me,P(B.id,Se,ve)||(le[Me][ze]+=Ie*we))}}}const Re=ge*g/60,De=Re>Et?d.sunshineHours[Q]/(30*Re*e.timesPerHour):0;j(le,De),i(B.id,le)},L=B=>{if(B.roofType!==Go.Gable)throw new Error("roof is not gable");const O=r(B);if(!O)throw new Error("foundation of wall not found");const V=s(B.id);if(!V||V.length===0)return;const G=f.getFullYear(),Q=f.getMonth(),$=f.getDate(),ie=ye.dayOfYear(f),q=new ln(0,0,O.rotation[2],"ZYX");for(const[se,Z]of V.entries()){const ee=B.id+"-"+se,te=Z[0].clone().applyEuler(q),oe=Z[1].clone().applyEuler(q),de=Z[2].clone().applyEuler(q),he=new ae().subVectors(oe,te),pe=new ae().subVectors(de,te),me=new ae().subVectors(de,oe),le=he.length(),Te=new ae().crossVectors(pe,me).length()/le,ge=Math.max(2,Math.round(le/y)),Se=Math.max(2,Math.round(Te/y)),Re=Array(ge).fill(0).map(()=>Array(Se).fill(0));he.normalize(),pe.normalize(),me.normalize();const De=new ae().crossVectors(pe,me).normalize(),Ae=he.multiplyScalar(.5*le/ge),ue=new ae().crossVectors(De,he).normalize().multiplyScalar(.5*Te/Se),fe=new ae(O.cx+te.x,O.cy+te.y,O.lz+te.z+k0);fe.add(Ae).add(ue),Ae.multiplyScalar(2),ue.multiplyScalar(2);let ve=0;const we=new ae;for(let Me=0;Me<24;Me++)for(let ze=0;ze0){ve++;const Ue=vi(Je,ie,p,li.SPHERE_MODEL),nt=qr(e.ground,Q,De,Ue),We=De.dot(Je);for(let Ee=0;Ee0&&(we.copy(fe).add(ke).add(ue.clone().multiplyScalar(Oe)),P(ee,we,Je)||(Re[Ee][Oe]+=We*Ue))}}}const Pe=ve*g/60,Ie=Pe>Et?d.sunshineHours[Q]/(30*Pe*e.timesPerHour):0;j(Re,Ie),i(ee,Re)}},j=(B,O)=>{for(let V=0;V{const e=M(pn),n=dt(bh),o=M.getState().world,r=M.getState().elements,i=M(Gr),a=M(yA),l=Cn(Ige),s=Cn(JBe),c=dt(wW),u=dt(Wwt),d=M(xge),f=Cn(Dge),{scene:p}=ri(),g=$t(),A=u1(t),y=new Date(o.date),S=t?A==null?void 0:A.elevation:0,C=60/o.timesPerHour,P=m.useMemo(()=>new l0,[]),v=o.solarRadiationHeatmapGridCellSize??.5,T=m.useRef([]),w=m.useRef([]),x=m.useRef(0),b=m.useRef(!1),R=m.useRef(new Date(o.date)),H=m.useRef(new Map),F=m.useRef(!1),E=m.useRef(new Date(o.date)),N=m.useMemo(()=>dl(y,o.latitude),[o.date,o.latitude]);m.useEffect(()=>{if(c)return U(),x.current=requestAnimationFrame(D),()=>{cancelAnimationFrame(x.current),b.current||(gn(Y.t("message.SimulationAborted",g)),e(le=>{le.world.date=R.current.toLocaleString("en-US")}),n("simulationInProgress",!1))}},[c]),m.useEffect(()=>{F.current=u,u?(E.current=new Date(y.getTime()),cancelAnimationFrame(x.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",g))):(n("simulationPaused",!1),D())},[u]);const U=()=>{n("simulationInProgress",!0),y.setHours(Math.floor(N.sunrise/60),N.sunrise%60),R.current=new Date(o.date),b.current=!1,j();for(const le of r)switch(le.type){case z.Wall:case z.Door:case z.SolarPanel:case z.SolarWaterHeater:case z.ParabolicTrough:case z.ParabolicDish:case z.FresnelReflector:case z.Heliostat:{H.current.delete(le.id);break}case z.Cuboid:{H.current.delete(le.id+"-top"),H.current.delete(le.id+"-north"),H.current.delete(le.id+"-south"),H.current.delete(le.id+"-west"),H.current.delete(le.id+"-east");break}case z.Roof:{const Te=le,ge=f(Te.id);if(ge){const Se=ge.length;for(let Re=0;Re{s();const le=N.daylight()/60,Te=le>Et?A.sunshineHours[y.getMonth()]/(30*le*o.timesPerHour):0;for(const ge of r){switch(ge.type){case z.Foundation:case z.Wall:case z.Door:case z.SolarPanel:case z.SolarWaterHeater:case z.ParabolicTrough:case z.ParabolicDish:case z.FresnelReflector:case z.Heliostat:{const Se=H.current.get(ge.id);if(Se){for(let Re=0;Re[...Re]))}break}case z.Cuboid:{k(ge.id,"top",Te),k(ge.id,"south",Te),k(ge.id,"north",Te),k(ge.id,"west",Te),k(ge.id,"east",Te);break}case z.Roof:{const Se=ge,Re=f(Se.id);if(Re&&Re.length>0){if(Se.roofType===Go.Pyramid||Se.roofType===Go.Mansard||Se.roofType===Go.Gambrel||Se.roofType===Go.Hip){let De=!0;const Ae=Re[0][0].z;for(const ue of Re)for(const fe of ue)if(Math.abs(fe.z-Ae)>.01){De=!1;break}if(De){const ue=H.current.get(Se.id);if(ue){for(let fe=0;fe[...fe]))}break}}for(let De=0;De[...fe]))}}}break}}if(ge.type===z.Foundation){const Se=ge;if(Se.solarStructure===Dn.UpdraftTower&&Se.solarUpdraftTower){const Re=ge.id+"-sut",De=H.current.get(Re);if(De){for(let Ae=0;Ae[...Ae]))}}}}},k=(le,Te,ge)=>{const Se=H.current.get(le+"-"+Te);if(Se){for(let Re=0;Re{if(c&&!F.current){if(y.getMinutes()+y.getHours()*60>=N.sunset){cancelAnimationFrame(x.current),dt.getState().set(Te=>{Te.runDynamicSimulation=!1}),e(Te=>{Te.world.date=R.current.toLocaleString("en-US")}),gn(Y.t("message.SimulationCompleted",g)),b.current=!0,W(),setTimeout(()=>{n("simulationInProgress",!1),n("showSolarRadiationHeatmap",!0)},10);return}if(y.setHours(y.getHours(),y.getMinutes()+C),e(Te=>{Te.world.date=y.toLocaleString("en-US")}),d)for(const Te of r)switch(Te.type){case z.FresnelReflector:he(Te);break;case z.Heliostat:pe(Te);break}else for(const Te of r)switch(Te.type){case z.Foundation:{const ge=Te;O(ge),ge.solarStructure===Dn.UpdraftTower&&me(ge);break}case z.Cuboid:{B(Te);break}case z.SolarPanel:{ee(Te);break}case z.SolarWaterHeater:{te(Te);break}case z.ParabolicTrough:{oe(Te);break}case z.ParabolicDish:{de(Te);break}case z.FresnelReflector:{he(Te);break}case z.Heliostat:{pe(Te);break}case z.Wall:{V(Te);break}case z.Door:{G(Te);break}case z.Roof:{const ge=Te;switch(ge.roofType){case Go.Pyramid:$(ge);break;case Go.Gable:Z(ge);break;case Go.Gambrel:q(ge);break;case Go.Mansard:ie(ge);break;case Go.Hip:se(ge);break}break}}x.current=requestAnimationFrame(D)}},L=(le,Te,ge)=>{if(T.current.length>1){w.current.length=0,P.set(Te,ge);const Se=T.current.filter(Re=>Re.uuid!==le);return P.intersectObjects(Se,!1,w.current),w.current.length>0}return!1},j=()=>{const le=p.children.filter(Te=>Te.name==="Content");if(le.length>0){const Te=le[0].children;T.current.length=0;for(const ge of Te)ye.fetchSimulationElements(ge,T.current)}},B=le=>{const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=ye.dayOfYear(y),Se=le.lx,Re=le.ly,De=le.lz,Ae=Math.max(2,Math.round(Se/v)),ue=Math.max(2,Math.round(Re/v)),fe=Math.max(2,Math.round(De/v)),ve=Se/Ae,we=Re/ue,Pe=De/fe;let Ie=H.current.get(le.id+"-top");(!Ie||Ie.length!==Ae||Ie[0].length!==ue)&&(Ie=Array(Ae).fill(0).map(()=>Array(ue).fill(0)),H.current.set(le.id+"-top",Ie));let Me=H.current.get(le.id+"-south");(!Me||Me.length!==Ae||Me[0].length!==fe)&&(Me=Array(Ae).fill(0).map(()=>Array(fe).fill(0)),H.current.set(le.id+"-south",Me));let ze=H.current.get(le.id+"-north");(!ze||ze.length!==Ae||ze[0].length!==fe)&&(ze=Array(Ae).fill(0).map(()=>Array(fe).fill(0)),H.current.set(le.id+"-north",ze));let Ne=H.current.get(le.id+"-west");(!Ne||Ne.length!==ue||Ne[0].length!==fe)&&(Ne=Array(ue).fill(0).map(()=>Array(fe).fill(0)),H.current.set(le.id+"-west",Ne));let Je=H.current.get(le.id+"-east");(!Je||Je.length!==ue||Je[0].length!==fe)&&(Je=Array(ue).fill(0).map(()=>Array(fe).fill(0)),H.current.set(le.id+"-east",Je));const Ue=ko,nt=_p.clone().applyAxisAngle(ko,le.rotation[2]),We=Yc.clone().applyAxisAngle(ko,le.rotation[2]),Ee=Vp.clone().applyAxisAngle(ko,le.rotation[2]),ke=Op.clone().applyAxisAngle(ko,le.rotation[2]),Oe=i(le);let st=le.cx,je=le.cy,xt=le.cz;if(Oe&&Oe.type===z.Cuboid){const At=ye.getWorldDataById(le.id);st=At.pos.x,je=At.pos.y,xt=At.pos.z}const gt=new ae,Ye=new Kt(st,je),it=new Kt,ut=je-Re/2,Qe=je+Re/2,lt=st-Se/2,Ze=st+Se/2,Be=vi(Te,ge,S,li.SPHERE_MODEL);let $e=qr(o.ground,y.getMonth(),Ue,Be),wt=Ue.dot(Te),vt=st-Se/2,Rt=je-Re/2;const Gt=xt+De/2;for(let At=0;At0&&(it.set(vt+(At+.5)*ve,Rt+(pt+.5)*we),it.rotateAround(Ye,le.rotation[2]),gt.set(it.x,it.y,Gt),L(le.id,gt,Te)||(Ie[At][pt]+=wt*Be));vt=st-Se/2,Rt=xt-De/2,$e=qr(o.ground,y.getMonth(),nt,Be),wt=nt.dot(Te);for(let At=0;At0&&(it.set(vt+(At+.5)*ve,ut),it.rotateAround(Ye,le.rotation[2]),gt.set(it.x,it.y,Rt+(pt+.5)*Pe),L(le.id,gt,Te)||(Me[At][pt]+=wt*Be));$e=qr(o.ground,y.getMonth(),We,Be),wt=We.dot(Te);for(let At=0;At0&&(it.set(vt+(At+.5)*ve,Qe),it.rotateAround(Ye,le.rotation[2]),gt.set(it.x,it.y,Rt+(fe-(pt+.5))*Pe),L(le.id,gt,Te)||(ze[At][pt]+=wt*Be));vt=je-Re/2,Rt=xt-De/2,$e=qr(o.ground,y.getMonth(),Ee,Be),wt=Ee.dot(Te);for(let At=0;At0&&(it.set(lt,vt+(At+.5)*we),it.rotateAround(Ye,le.rotation[2]),gt.set(it.x,it.y,Rt+(pt+.5)*Pe),L(le.id,gt,Te)||(Ne[At][pt]+=wt*Be));$e=qr(o.ground,y.getMonth(),ke,Be),wt=ke.dot(Te);for(let At=0;At0&&(it.set(Ze,vt+(At+.5)*we),it.rotateAround(Ye,le.rotation[2]),gt.set(it.x,it.y,Rt+(pt+.5)*Pe),L(le.id,gt,Te)||(Je[At][pt]+=wt*Be))},O=le=>{const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=ye.dayOfYear(y),Se=le.lx,Re=le.ly,De=le.lz,Ae=Math.max(2,Math.round(Se/v)),ue=Math.max(2,Math.round(Re/v)),fe=Se/Ae,ve=Re/ue,we=le.cx-Se/2,Pe=le.cy-Re/2,Ie=new Kt(le.cx,le.cy),Me=new ae;let ze=H.current.get(le.id);(!ze||ze.length!==Ae||ze[0].length!==ue)&&(ze=Array(Ae).fill(0).map(()=>Array(ue).fill(0)),H.current.set(le.id,ze));const Ne=vi(Te,ge,S,li.SPHERE_MODEL),Je=qr(o.ground,y.getMonth(),ko,Ne),Ue=ko.dot(Te),nt=new Kt;for(let We=0;We0&&(nt.set(we+(We+.5)*fe,Pe+(Ee+.5)*ve),nt.rotateAround(Ie,le.rotation[2]),Me.set(nt.x,nt.y,De),L(le.id,Me,Te)||(ze[We][Ee]+=Ue*Ne))},V=le=>{const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=a(le);if(!ge)throw new Error("foundation of wall not found");const Se=ye.dayOfYear(y),Re=le.lx,De=ye.getHighestPointOfWall(le),Ae=Math.max(2,Math.round(Re/v)),ue=Math.max(2,Math.round(De/v)),fe=Re/Ae,ve=De/ue,we=ge.rotation[2]+le.relativeAngle,Pe=ye.wallAbsolutePosition(new ae(le.cx,le.cy,le.cz),ge).setZ(De/2+ge.lz),Ie=new ae(Math.cos(we-Qt),Math.sin(we-Qt),0),Me=fe*Math.cos(we),ze=fe*Math.sin(we),Ne=new ae;let Je=H.current.get(le.id);(!Je||Je.length!==Ae||Je[0].length!==ue)&&(Je=Array(Ae).fill(0).map(()=>Array(ue).fill(0)),H.current.set(le.id,Je));const Ue=ye.getWallVertices(le,1),nt=(De-le.lz)/2,We=vi(Te,Se,S,li.SPHERE_MODEL),Ee=qr(o.ground,y.getMonth(),Ie,We),ke=Ie.dot(Te);for(let Oe=0;Oe0&&(Ne.set(Pe.x+je*Me,Pe.y+je*ze,Pe.z+xt*ve),L(le.id,Ne,Te)||(Je[Oe][st]+=ke*We)))}},G=le=>{const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=a(le);if(!ge)throw new Error("foundation of door not found");const Se=i(le);if(!Se)throw new Error("parent of door not found");const Re=ye.dayOfYear(y),De=Se,Ae=le.lx*De.lx,ue=le.lz*De.lz,fe=Math.max(2,Math.round(Ae/v)),ve=Math.max(2,Math.round(ue/v)),we=Ae/fe,Pe=ue/ve,Ie=ge.rotation[2]+De.relativeAngle,ze=ye.wallAbsolutePosition(new ae(De.cx,De.cy,De.cz),ge).setZ(De.lz/2+ge.lz).clone().add(new ae(le.cx*De.lx,0,le.cz*De.lz)),Ne=new ae(Math.cos(Ie-Qt),Math.sin(Ie-Qt),0),Je=we*Math.cos(Ie),Ue=we*Math.sin(Ie),nt=new ae;let We=H.current.get(le.id);(!We||We.length!==fe||We[0].length!==ve)&&(We=Array(fe).fill(0).map(()=>Array(ve).fill(0)),H.current.set(le.id,We));const Ee=vi(Te,Re,S,li.SPHERE_MODEL),ke=qr(o.ground,y.getMonth(),Ne,Ee),Oe=Ne.dot(Te);if(le.doorType===Rd.Arched)for(let st=0;st0&&(L(le.id,nt,Te)||(We[st][je]+=Oe*Ee)))}else for(let st=0;st0){const xt=st-fe/2+.5,gt=je-ve/2+.5;nt.set(ze.x+xt*Je,ze.y+xt*Ue,ze.z+gt*Pe),L(le.id,nt,Te)||(We[st][je]+=Oe*Ee)}},Q=(le,Te,ge,Se)=>{const Re=Se[0][0].z,De=ye.dayOfYear(y),Ae=vi(le,De,S,li.SPHERE_MODEL),ue=new ln(0,0,ge.rotation[2],"ZYX");let fe=Number.MAX_VALUE,ve=Number.MAX_VALUE,we=-Number.MAX_VALUE,Pe=-Number.MAX_VALUE;for(const ke of Se)for(const Oe of ke){const st=Oe.clone().applyEuler(ue);st.x>we&&(we=st.x),st.xPe&&(Pe=st.y),st.yArray(Me).fill(0)),H.current.set(Te.id,Je));const Ue=new ae(fe+v/2,ve+v/2,ge.lz+Re+k0),nt=new ae(0,0,Ue.z),We=qr(o.ground,y.getMonth(),ko,Ae),Ee=ko.dot(le);for(let ke=0;ke0&&(nt.y=Ue.y+Oe*Ne,L(Te.id,nt,le)||(Je[ke][Oe]+=Ee*Ae))}},$=le=>{if(le.roofType!==Go.Pyramid)throw new Error("roof is not pyramid");const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=a(le);if(!ge)throw new Error("foundation of wall not found");const Se=f(le.id);if(!Se||Se.length===0)return;let Re=!0;const De=Se[0][0].z;for(const Ae of Se)for(const ue of Ae)if(Math.abs(ue.z-De)>.01){Re=!1;break}if(Re)Q(Te,le,ge,Se);else{const Ae=ye.dayOfYear(y),ue=new ln(0,0,ge.rotation[2],"ZYX"),fe=vi(Te,Ae,S,li.SPHERE_MODEL);for(const[ve,we]of Se.entries()){const Pe=le.id+"-"+ve,Ie=we[0].clone().applyEuler(ue),Me=we[1].clone().applyEuler(ue),ze=we[2].clone().applyEuler(ue),Ne=new ae().subVectors(Me,Ie),Je=new ae().subVectors(ze,Ie),Ue=new ae().subVectors(ze,Me),nt=Ne.length(),We=new ae().crossVectors(Je,Ue).length()/nt,Ee=Math.max(2,Math.round(nt/v)),ke=Math.max(2,Math.round(We/v));let Oe=H.current.get(Pe);(!Oe||Oe.length!==Ee||Oe[0].length!==ke)&&(Oe=Array(Ee).fill(0).map(()=>Array(ke).fill(0)),H.current.set(Pe,Oe)),Ne.normalize(),Je.normalize(),Ue.normalize();const st=new ae().crossVectors(Je,Ue).normalize(),je=Ne.multiplyScalar(.5*nt/Ee),xt=new ae().crossVectors(st,Ne).normalize().multiplyScalar(.5*We/ke),gt=new ae(ge.cx+Ie.x,ge.cy+Ie.y,ge.lz+Ie.z+k0);gt.add(je).add(xt),je.multiplyScalar(2),xt.multiplyScalar(2);const Ye=new ae,it=qr(o.ground,y.getMonth(),st,fe),ut=st.dot(Te);for(let Qe=0;Qe0&&(Ye.copy(gt).add(lt).add(xt.clone().multiplyScalar(Ze)),L(Pe,Ye,Te)||(Oe[Qe][Ze]+=ut*fe))}}}},ie=le=>{if(le.roofType!==Go.Mansard)throw new Error("roof is not mansard");const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=a(le);if(!ge)throw new Error("foundation of wall not found");const Se=f(le.id);if(!Se||Se.length===0)return;let Re=!0;const De=Se[0][0].z;for(const Ae of Se)for(const ue of Ae)if(Math.abs(ue.z-De)>.01){Re=!1;break}if(Re)Q(Te,le,ge,Se);else{const Ae=ye.dayOfYear(y),ue=new ln(0,0,ge.rotation[2],"ZYX"),fe=vi(Te,Ae,S,li.SPHERE_MODEL);for(const[ve,we]of Se.entries()){const Pe=le.id+"-"+ve;if(ve===Se.length-1){let Ie=Number.MAX_VALUE,Me=Number.MAX_VALUE,ze=-Number.MAX_VALUE,Ne=-Number.MAX_VALUE;for(const gt of we){const Ye=gt.clone().applyEuler(ue);Ye.x>ze&&(ze=Ye.x),Ye.xNe&&(Ne=Ye.y),Ye.yArray(nt).fill(0)),H.current.set(Pe,ke));const Oe=new ae(Ie+v/2,Me+v/2,ge.lz+Je+k0),st=new ae(0,0,Oe.z),je=qr(o.ground,y.getMonth(),ko,fe),xt=ko.dot(Te);for(let gt=0;gt0&&(st.y=Oe.y+Ye*Ee,L(Pe,st,Te)||(ke[gt][Ye]+=xt*fe))}}else{const Ie=we[0].clone().applyEuler(ue),Me=we[1].clone().applyEuler(ue),ze=we[2].clone().applyEuler(ue),Ne=new ae().subVectors(Me,Ie),Je=new ae().subVectors(ze,Ie),Ue=new ae().subVectors(ze,Me),nt=Ne.length(),We=new ae().crossVectors(Je,Ue).length()/nt,Ee=Math.max(2,Math.round(nt/v)),ke=Math.max(2,Math.round(We/v));let Oe=H.current.get(Pe);(!Oe||Oe.length!==Ee||Oe[0].length!==ke)&&(Oe=Array(Ee).fill(0).map(()=>Array(ke).fill(0)),H.current.set(Pe,Oe)),Ne.normalize(),Je.normalize(),Ue.normalize();const st=new ae().crossVectors(Je,Ue).normalize(),je=Ne.multiplyScalar(.5*nt/Ee),xt=new ae().crossVectors(st,Ne).normalize().multiplyScalar(.5*We/ke),gt=new ae(ge.cx+Ie.x,ge.cy+Ie.y,ge.lz+Ie.z+k0);gt.add(je).add(xt),je.multiplyScalar(2),xt.multiplyScalar(2);const Ye=new ae,it=qr(o.ground,y.getMonth(),st,fe),ut=st.dot(Te);for(let Qe=0;Qe0&&(Ye.copy(gt).add(lt).add(xt.clone().multiplyScalar(Ze)),L(Pe,Ye,Te)||(Oe[Qe][Ze]+=ut*fe))}}}}},q=le=>{if(le.roofType!==Go.Gambrel)throw new Error("roof is not gambrel");const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=a(le);if(!ge)throw new Error("foundation of wall not found");const Se=f(le.id);if(!Se||Se.length===0)return;let Re=!0;const De=Se[0][0].z;for(const Ae of Se)for(const ue of Ae)if(Math.abs(ue.z-De)>.01){Re=!1;break}if(Re)Q(Te,le,ge,Se);else{const Ae=ye.dayOfYear(y),ue=new ln(0,0,ge.rotation[2],"ZYX"),fe=vi(Te,Ae,S,li.SPHERE_MODEL);for(const[ve,we]of Se.entries()){const Pe=le.id+"-"+ve,Ie=we[0].clone().applyEuler(ue),Me=we[1].clone().applyEuler(ue),ze=we[2].clone().applyEuler(ue),Ne=new ae().subVectors(Me,Ie),Je=new ae().subVectors(ze,Ie),Ue=new ae().subVectors(ze,Me),nt=Ne.length(),We=new ae().crossVectors(Je,Ue).length()/nt,Ee=Math.max(2,Math.round(nt/v)),ke=Math.max(2,Math.round(We/v));let Oe=H.current.get(Pe);(!Oe||Oe.length!==Ee||Oe[0].length!==ke)&&(Oe=Array(Ee).fill(0).map(()=>Array(ke).fill(0)),H.current.set(Pe,Oe)),Ne.normalize(),Je.normalize(),Ue.normalize();const st=new ae().crossVectors(Je,Ue).normalize(),je=Ne.multiplyScalar(.5*nt/Ee),xt=new ae().crossVectors(st,Ne).normalize().multiplyScalar(.5*We/ke),gt=new ae(ge.cx+Ie.x,ge.cy+Ie.y,ge.lz+Ie.z+k0);gt.add(je).add(xt),je.multiplyScalar(2),xt.multiplyScalar(2);const Ye=new ae,it=qr(o.ground,y.getMonth(),st,fe),ut=st.dot(Te);for(let Qe=0;Qe0&&(Ye.copy(gt).add(lt).add(xt.clone().multiplyScalar(Ze)),L(Pe,Ye,Te)||(Oe[Qe][Ze]+=ut*fe))}}}},se=le=>{if(le.roofType!==Go.Hip)throw new Error("roof is not hip");const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=a(le);if(!ge)throw new Error("foundation of wall not found");const Se=f(le.id);if(!Se||Se.length===0)return;let Re=!0;const De=Se[0][0].z;for(const Ae of Se)for(const ue of Ae)if(Math.abs(ue.z-De)>.01){Re=!1;break}if(Re)Q(Te,le,ge,Se);else{const Ae=ye.dayOfYear(y),ue=new ln(0,0,ge.rotation[2],"ZYX"),fe=vi(Te,Ae,S,li.SPHERE_MODEL);for(const[ve,we]of Se.entries()){const Pe=le.id+"-"+ve,Ie=we[0].clone().applyEuler(ue),Me=we[1].clone().applyEuler(ue),ze=we[2].clone().applyEuler(ue),Ne=new ae().subVectors(Me,Ie),Je=new ae().subVectors(ze,Ie),Ue=new ae().subVectors(ze,Me),nt=Ne.length(),We=new ae().crossVectors(Je,Ue).length()/nt,Ee=Math.max(2,Math.round(nt/v)),ke=Math.max(2,Math.round(We/v));let Oe=H.current.get(Pe);(!Oe||Oe.length!==Ee||Oe[0].length!==ke)&&(Oe=Array(Ee).fill(0).map(()=>Array(ke).fill(0)),H.current.set(Pe,Oe)),Ne.normalize(),Je.normalize(),Ue.normalize();const st=new ae().crossVectors(Je,Ue).normalize(),je=Ne.multiplyScalar(.5*nt/Ee),xt=new ae().crossVectors(st,Ne).normalize().multiplyScalar(.5*We/ke),gt=new ae,Ye=new ae(ge.cx+Ie.x,ge.cy+Ie.y,ge.lz+Ie.z+k0);Ye.add(je).add(xt),je.multiplyScalar(2),xt.multiplyScalar(2);const it=qr(o.ground,y.getMonth(),st,fe),ut=st.dot(Te);for(let Qe=0;Qe0&&(gt.copy(Ye).add(lt).add(xt.clone().multiplyScalar(Ze)),L(Pe,gt,Te)||(Oe[Qe][Ze]+=ut*fe))}}}},Z=le=>{if(le.roofType!==Go.Gable)throw new Error("roof is not gable");const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=a(le);if(!ge)throw new Error("foundation of wall not found");const Se=f(le.id);if(!Se||Se.length===0)return;const Re=ye.dayOfYear(y),De=new ln(0,0,ge.rotation[2],"ZYX"),Ae=vi(Te,Re,S,li.SPHERE_MODEL);for(const[ue,fe]of Se.entries()){const ve=le.id+"-"+ue,we=fe[0].clone().applyEuler(De),Pe=fe[1].clone().applyEuler(De),Ie=fe[2].clone().applyEuler(De),Me=new ae().subVectors(Pe,we),ze=new ae().subVectors(Ie,we),Ne=new ae().subVectors(Ie,Pe),Je=Me.length(),Ue=new ae().crossVectors(ze,Ne).length()/Je,nt=Math.max(2,Math.round(Je/v)),We=Math.max(2,Math.round(Ue/v));let Ee=H.current.get(ve);(!Ee||Ee.length!==nt||Ee[0].length!==We)&&(Ee=Array(nt).fill(0).map(()=>Array(We).fill(0)),H.current.set(ve,Ee)),Me.normalize(),ze.normalize(),Ne.normalize();const ke=new ae().crossVectors(ze,Ne).normalize(),Oe=Me.multiplyScalar(.5*Je/nt),st=new ae().crossVectors(ke,Me).normalize().multiplyScalar(.5*Ue/We),je=new ae(ge.cx+we.x,ge.cy+we.y,ge.lz+we.z+k0);je.add(Oe).add(st),Oe.multiplyScalar(2),st.multiplyScalar(2);const xt=new ae,gt=qr(o.ground,y.getMonth(),ke,Ae),Ye=ke.dot(Te);for(let it=0;it0&&(xt.copy(je).add(ut).add(st.clone().multiplyScalar(Qe)),L(ve,xt,Te)||(Ee[it][Qe]+=Ye*Ae))}}},ee=le=>{const Te=ki(y,o.latitude);if(Te.z<=0)return;let ge=i(le);if(!ge)throw new Error("parent of solar panel does not exist");const Se=le.parentType===z.Roof,Re=le.parentType===z.Wall;if(Se&&(ge=a(ge),!ge))throw new Error("foundation of solar panel does not exist");const De=ye.dayOfYear(y),Ae=Re?ye.absoluteCoordinates(le.cx,le.cy,le.cz,ge,a(le),le.lz):ye.absoluteCoordinates(le.cx,le.cy,le.cz,ge,void 0,void 0,!0),ue=ge.rotation[2];let fe=ue+(Re?0:le.relativeAzimuth),ve=le.tiltAngle,we=!0;if(Se&&(Ae.z=le.cz+le.lz+.02+ge.cz,ye.isZero(le.rotation[0])?Ae.z+=le.poleHeight:(ve=le.rotation[0],fe=ue,we=!1)),Re&&!ye.isZero(le.tiltAngle)){const Qe=ge,lt=a(ge),Be=(lt?lt.rotation[2]+Qe.relativeAngle:Qe.relativeAngle)-Qt,$e=le.ly*Math.abs(Math.sin(le.tiltAngle))/2;Ae.x+=$e*Math.cos(Be),Ae.y+=$e*Math.sin(Be)}const Pe=new ae().fromArray(le.normal),Ie=le.lx,Me=le.ly,ze=Math.max(2,Math.round(le.lx/v)),Ne=Math.max(2,Math.round(le.ly/v)),Je=Ie/ze,Ue=Me/Ne,nt=Ae.x-(Ie-v)/2,We=Ae.y-(Me-v)/2,Ee=Se||Re?Ae.z:ge.lz+le.poleHeight+le.lz,ke=new Kt(Ae.x,Ae.y),Oe=new ae;let st=H.current.get(le.id);(!st||st.length!==ze||st[0].length!==Ne)&&(st=Array(ze).fill(0).map(()=>Array(Ne).fill(0)),H.current.set(le.id,st));let je=new ln(Se&&!we?0:ve,0,fe,"ZYX");if(le.trackerType!==Ll.NO_TRACKER){const Qe=ue?Te.clone().applyAxisAngle(ko,-ue):Te.clone();switch(le.trackerType){case Ll.ALTAZIMUTH_DUAL_AXIS_TRACKER:{const lt=new Ts().setFromUnitVectors(ko,Qe);je=new ln().setFromQuaternion(lt),je.z+=fe;break}case Ll.HORIZONTAL_SINGLE_AXIS_TRACKER:{const lt=new Ts().setFromUnitVectors(ko,new ae(Qe.x,0,Qe.z).normalize());je=new ln().setFromQuaternion(lt),je.z+=fe;break}case Ll.VERTICAL_SINGLE_AXIS_TRACKER:{if(Math.abs(le.tiltAngle)>.001){const lt=new ae(Qe.x,-Qe.y,0).normalize(),Ze=Math.acos(Yc.dot(lt))*Math.sign(lt.x);je=new ln(le.tiltAngle,0,Ze+ue,"ZYX")}break}case Ll.TILTED_SINGLE_AXIS_TRACKER:break}}if(Re&&Pe.applyEuler(new ln(0,0,ge.relativeAngle)),Pe.applyEuler(je),Se&&!we&&(je.x=le.rotation[0],je.z=le.rotation[2]+ue),Re){const Qe=i(le);Qe&&(je.x=Qt+le.tiltAngle,je.z=ge.relativeAngle+Qe.rotation[2])}const xt=vi(Te,De,S,li.SPHERE_MODEL),gt=qr(o.ground,y.getMonth(),Pe,xt),Ye=Pe.dot(Te),it=new Kt,ut=new ae;for(let Qe=0;Qe0&&(it.set(nt+Qe*Je,We+lt*Ue),ut.set(it.x-ke.x,it.y-ke.y,0),ut.applyEuler(je),Oe.set(Ae.x+ut.x,Ae.y+ut.y,Ee+ut.z),L(le.id,Oe,Te)||(st[Qe][lt]+=Ye*xt))},te=le=>{const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=i(le);if(!ge)throw new Error("parent of solar water heater does not exist");const Se=a(ge);if(!Se)throw new Error("foundation of solar water heater does not exist");const Re=ye.absoluteCoordinates(le.cx,le.cy,le.cz,Se,void 0,void 0,!0),De=new ln,Ae=(le.lz-le.waterTankRadius)/2,ue=Math.atan2(le.lz-le.waterTankRadius,le.ly);ye.isZero(le.rotation[0])?(De.set(ue,0,le.relativeAzimuth+Se.rotation[2],"ZXY"),Re.z+=Ae):(De.set(le.rotation[0]+ue,0,le.rotation[2]+Se.rotation[2],"ZXY"),Re.add(new ae(0,0,Ae).applyEuler(De)));const ve=le.lx,we=Math.hypot(le.ly,le.lz-le.waterTankRadius),Pe=Math.max(2,Math.round(ve/v)),Ie=Math.max(2,Math.round(we/v)),Me=ve/Pe,ze=we/Ie,Ne=-(ve-v)/2,Je=-(we-v)/2;let Ue=H.current.get(le.id);(!Ue||Ue.length!==Pe||Ue[0].length!==Ie)&&(Ue=Array(Pe).fill(0).map(()=>Array(Ie).fill(0)),H.current.set(le.id,Ue));const nt=new ae(0,0,1).applyEuler(De),We=vi(Te,ye.dayOfYear(y),S,li.SPHERE_MODEL),Ee=qr(o.ground,y.getMonth(),nt,We),ke=nt.dot(Te),Oe=new Kt,st=new ae;for(let je=0;je0&&(Oe.set(Ne+je*Me,Je+xt*ze),st.set(Oe.x,Oe.y,0).applyEuler(De).add(Re),L(le.id,st,Te)||(Ue[je][xt]+=ke*We))},oe=le=>{const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=i(le);if(!ge)throw new Error("parent of parabolic trough does not exist");const Se=ye.dayOfYear(y),Re=ye.absoluteCoordinates(le.cx,le.cy,le.cz,ge),De=new ae().fromArray(le.normal),Ae=De.clone(),ue=le.lx,fe=le.ly,ve=ue*ue/(4*le.latusRectum),we=le.poleHeight+ue/2,Pe=Math.max(2,Math.round(le.lx/v)),Ie=Math.max(2,Math.round(le.ly/v)),Me=ue/Pe,ze=fe/Ie,Ne=Re.x-(ue-v)/2,Je=Re.y-(fe-v)/2,Ue=ge.lz+we+le.lz+ve,nt=new Kt(Re.x,Re.y),We=new ae;let Ee=H.current.get(le.id);(!Ee||Ee.length!==Pe||Ee[0].length!==Ie)&&(Ee=Array(Pe).fill(0).map(()=>Array(Ie).fill(0)),H.current.set(le.id,Ee));const ke=ge.rotation[2],Oe=ke+le.relativeAzimuth,st=ye.isZero(Oe),je=st?1:Math.cos(Oe),xt=st?0:Math.sin(Oe),gt=ke?Te.clone().applyAxisAngle(ko,-ke):Te.clone(),Ye=new Ts().setFromUnitVectors(ko,new ae(gt.x*je,gt.x*xt,gt.z).normalize()),it=new ln().setFromQuaternion(Ye);De.copy(Ae.clone().applyEuler(it));const ut=vi(Te,Se,S,li.SPHERE_MODEL),Qe=qr(o.ground,y.getMonth(),De,ut),lt=De.dot(Te),Ze=new Kt,Be=new ae;let $e=0,wt=0,vt=1;const Rt=4/(le.latusRectum*le.latusRectum);for(let Gt=0;Gt0&&(Ze.set($e,Je+At*ze),st||Ze.rotateAround(nt,Oe),Be.set(Ze.x-nt.x,Ze.y-nt.y,0),Be.applyEuler(it),We.set(Re.x+Be.x,Re.y+Be.y,Ue+Be.z),L(le.id,We,Te)||(Ee[Gt][At]+=lt*ut*vt))}},de=le=>{const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=i(le);if(!ge)throw new Error("parent of parabolic dish does not exist");const Se=ye.dayOfYear(y),Re=ye.absoluteCoordinates(le.cx,le.cy,le.cz,ge),De=new ae().fromArray(le.normal),Ae=De.clone(),ue=le.lx,fe=le.ly,ve=ue*ue/(4*le.latusRectum),we=le.poleHeight+ue/2,Pe=Math.max(2,Math.round(le.lx/v)),Ie=Math.max(2,Math.round(le.ly/v)),Me=ue/Pe,ze=fe/Ie,Ne=Re.x-(ue-v)/2,Je=Re.y-(fe-v)/2,Ue=ge.lz+we+le.lz+ve,nt=new Kt(Re.x,Re.y),We=new ae;let Ee=H.current.get(le.id);(!Ee||Ee.length!==Pe||Ee[0].length!==Ie)&&(Ee=Array(Pe).fill(0).map(()=>Array(Ie).fill(0)),H.current.set(le.id,Ee));const ke=ge.rotation[2],Oe=ke+le.relativeAzimuth,st=ye.isZero(Oe),je=ke?Te.clone().applyAxisAngle(ko,-ke):Te.clone(),xt=new Ts().setFromUnitVectors(ko,je),gt=new ln().setFromQuaternion(xt);De.copy(Ae.clone().applyEuler(gt));const Ye=vi(Te,Se,S,li.SPHERE_MODEL),it=qr(o.ground,y.getMonth(),De,Ye),ut=De.dot(Te),Qe=new Kt,lt=new ae;let Ze=0,Be=0,$e=0,wt=0,vt=1;const Rt=4/(le.latusRectum*le.latusRectum);for(let Gt=0;Gtue/2))for(let At=0;Atfe/2)&&(Ee[Gt][At]+=it,ut>0&&(Qe.set(Ze,Be),st||Qe.rotateAround(nt,Oe),lt.set(Qe.x-nt.x,Qe.y-nt.y,0),lt.applyEuler(gt),We.set(Re.x+lt.x,Re.y+lt.y,Ue+lt.z),L(le.id,We,Te)||(vt=1/Math.sqrt(1+($e*$e+wt*wt)*Rt),Ee[Gt][At]+=ut*Ye*vt)))},he=le=>{const Te=ki(y,o.latitude);if(Te.zArray(Me).fill(0)),H.current.set(le.id,ke));const st=ge.rotation[2]+le.relativeAzimuth,je=ye.isZero(st),xt=je?1:Math.cos(st),gt=je?0:Math.sin(st),Ye=Se.solarStructure===Dn.FocusPipe?new ae((Se.cx-Ae.x)*xt,(Se.cy-Ae.y)*gt,Se.cz-Ae.z+Se.lz/2+(Re.absorberHeight??10)):void 0,it=new ae(gt,xt,0),ut=new ae;let Qe,lt;if(Ye){ut.set(Ye.x,Ye.y,Ye.z);const Gt=-Ye.z*(Te.y*it.y+Te.x*it.x)/Te.z;ut.x+=Gt*it.x,ut.y-=Gt*it.y,lt=ut.clone().normalize();let At=lt.add(Te).normalize();ye.isSame(At,ko)&&(At=new ae(-.001,0,1).normalize()),je||At.applyAxisAngle(ko,-st),Qe=new ln(0,Math.atan2(At.x,At.z),st,"ZXY"),ue.copy(fe.clone().applyEuler(Qe))}else lt=new ae(0,0,1),Qe=new ln;const Ze=vi(Te,De,S,li.SPHERE_MODEL),Be=qr(o.ground,y.getMonth(),ue,Ze),$e=ue.dot(Te),wt=new Kt,vt=new ae;let Rt=0;if(d)for(let Gt=0;Gt0&&(wt.set(Rt,Ue+At*Ne),vt.set(wt.x-We.x,wt.y-We.y,0),vt.applyEuler(Qe),Ee.set(Ae.x+vt.x,Ae.y+vt.y,nt+vt.z),!L(le.id,Ee,Te)&&!L(le.id,Ee,lt)&&(ke[Gt][At]+=$e*Ze))}else for(let Gt=0;Gt0&&(wt.set(Rt,Ue+At*Ne),vt.set(wt.x-We.x,wt.y-We.y,0),vt.applyEuler(Qe),Ee.set(Ae.x+vt.x,Ae.y+vt.y,nt+vt.z),L(le.id,Ee,Te)||(ke[Gt][At]+=$e*Ze))}},pe=le=>{const Te=ki(y,o.latitude);if(Te.zArray(Me).fill(0)),H.current.set(le.id,ke));const Oe=ge.rotation[2],st=Se.solarStructure===Dn.FocusTower?new ae(Se.cx-Ae.x,Se.cy-Ae.y,Se.cz-Ae.z+(Re.towerHeight??20)):void 0;let je,xt;if(st){je=st.clone().normalize();let Ze=je.clone().add(Te).normalize();ye.isSame(Ze,ko)&&(Ze=new ae(-.001,0,1).normalize()),Oe&&Ze.applyAxisAngle(ko,-Oe);const Be=Math.hypot(Ze.x,Ze.y);xt=new ln(Math.atan2(Be,Ze.z),0,Math.atan2(Ze.y,Ze.x)+Qt,"ZXY"),ue.copy(fe.clone().applyEuler(xt))}else je=new ae(0,0,1),xt=new ln;const gt=vi(Te,De,S,li.SPHERE_MODEL),Ye=qr(o.ground,y.getMonth(),ue,gt),it=ue.dot(Te),ut=new Kt,Qe=new ae;let lt=0;if(d)for(let Ze=0;Ze0&&(ut.set(lt,Ue+Be*Ne),Qe.set(ut.x-We.x,ut.y-We.y,0),Qe.applyEuler(xt),Ee.set(Ae.x+Qe.x,Ae.y+Qe.y,nt+Qe.z),!L(le.id,Ee,Te)&&!L(le.id,Ee,je)&&(ke[Ze][Be]+=it*gt))}else for(let Ze=0;Ze0&&(ut.set(lt,Ue+Be*Ne),Qe.set(ut.x-We.x,ut.y-We.y,0),Qe.applyEuler(xt),Ee.set(Ae.x+Qe.x,Ae.y+Qe.y,nt+Qe.z),L(le.id,Ee,Te)||(ke[Ze][Be]+=it*gt))}},me=le=>{const Te=le.solarUpdraftTower;if(!Te)return;const ge=ki(y,o.latitude);if(ge.z<=0)return;const Se=ye.dayOfYear(y),Re=new ae().fromArray(le.normal),De=Te.collectorRadius,Ae=Math.max(2,Math.round(De*2/v)),ue=le.cx-De+v/2,fe=le.cy-De+v/2,ve=le.lz+Te.collectorHeight,we=le.id+"-sut";let Pe=H.current.get(we);(!Pe||Pe.length!==Ae||Pe[0].length!==Ae)&&(Pe=Array(Ae).fill(0).map(()=>Array(Ae).fill(0)),H.current.set(we,Pe));const Ie=vi(ge,Se,S,li.SPHERE_MODEL),Me=qr(o.ground,y.getMonth(),Re,Ie),ze=new ae(0,0,ve),Ne=Re.dot(ge),Je=De*De;let Ue,nt;for(let We=0;WeJe)&&(Pe[We][Ee]+=Me,Ne>0&&(L(we,ze,ge)||(Pe[We][Ee]+=Ne*Ie)))}};return h.jsx(h.Fragment,{})}),CBo=be.memo(({city:t})=>{const e=M(pn),n=dt(bh),o=M(oa),r=M.getState().world,i=M.getState().elements,a=M(Gr),l=Cn(pvt),s=M(bW),c=Cn(mvt),u=M(SW),d=M(iOe),f=M(aOe),p=Cn(yvt),g=dt(cvt),A=dt(uvt),y=dt(dvt),S=dt(fvt),C=M(UBe),{scene:P}=ri(),v=$t(),T=u1(t),w=new Date(r.date),x=t?T==null?void 0:T.elevation:0,b=r.cspTimesPerHour??4,R=60/b,H=r.cspDaysPerYear??6,F=12/H,E=m.useMemo(()=>new l0,[]),N=r.monthlyIrradianceLosses??new Array(12).fill(.05),U=r.cspGridCellSize??.5,W=m.useRef([]),k=m.useRef([]),D=m.useRef(0),L=m.useRef(!1),j=m.useRef(new Date(r.date)),B=m.useRef(new Map),O=m.useRef(new Map),V=m.useRef(0),G=m.useRef(!1),Q=m.useRef(new Date(r.date)),$=m.useMemo(()=>dl(w,r.latitude),[r.date,r.latitude]),ie=m.useRef($),q=ye.daysInYear(w)/12;m.useEffect(()=>{if(g)return se(),D.current=requestAnimationFrame(Z),()=>{cancelAnimationFrame(D.current),L.current||(gn(Y.t("message.SimulationAborted",v)),e(ue=>{ue.world.date=j.current.toLocaleString("en-US")}),dt.getState().set(ue=>{ue.simulationInProgress=!1,ue.simulationPaused=!1})),G.current=!1}},[g]),m.useEffect(()=>{G.current=y,y?(Q.current=new Date(w.getTime()),cancelAnimationFrame(D.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),Z())},[y]);const se=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(j.current=new Date(r.date),w.setHours(Math.floor($.sunrise/60),R/2-30)),L.current=!1,Re(),De()},Z=()=>{if(g&&!G.current){if(w.getMinutes()+w.getHours()*60>=$.sunset){cancelAnimationFrame(D.current),e(fe=>{fe.world.date=j.current.toLocaleString("en-US"),fe.viewState.showDailyParabolicTroughYieldPanel=!0,fe.selectedFloatingWindow="dailyParabolicTroughYieldPanel"}),dt.getState().set(fe=>{fe.runDailySimulationForParabolicTroughs=!1,fe.simulationInProgress=!1,fe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),L.current=!0,ee(),o&&e(fe=>{const ve=Cn.getState().sumDailyParabolicTroughYield();fe.actionInfo={name:"Daily Simulation for Parabolic Troughs Completed",result:{totalYield:ve},details:Cn.getState().dailyParabolicTroughYield,timestamp:new Date().getTime()}});return}w.setHours(w.getHours(),w.getMinutes()+R),e(fe=>{fe.world.date=w.toLocaleString("en-US")});for(const fe of i)fe.type===z.ParabolicTrough&&me(fe);D.current=requestAnimationFrame(Z)}},ee=()=>{const ue=le();for(const fe of i)if(fe.type===z.ParabolicTrough){const ve=fe,we=B.current.get(ve.id);if(we){const Pe=ge(ve)*ue;for(let Ie=0;Ie{var ue;if(d){const fe=new Array(24).fill(0),ve=new Map;let we=0;const Pe=[];for(const Me of i)if(Me.type===z.ParabolicTrough){const ze=B.current.get(Me.id);if(ze){s(Me.id,ze.reduce((Ne,Je)=>Ne+Je,0)),we++,ve.set("Trough"+we,ze),Pe.push(Me.label??"Trough"+we);for(let Ne=0;Ne<24;Ne++)fe[Ne]+=ze[Ne]}}const Ie=[];for(let Me=0;Me<24;Me++){const ze={};ze.Hour=Me;for(let Ne=1;Ne<=we;Ne++){const Je="Trough"+Ne;ze[Pe[Ne-1]]=(ue=ve.get(Je))==null?void 0:ue[Me]}Ie.push(ze)}l(Ie),p(Pe)}else{const fe=new Array(24).fill(0);for(const we of i)if(we.type===z.ParabolicTrough){const Pe=B.current.get(we.id);if(Pe){s(we.id,Pe.reduce((Ie,Me)=>Ie+Me,0));for(let Ie=0;Ie<24;Ie++)fe[Ie]+=Pe[Ie]}}const ve=[];for(let we=0;we<24;we++)ve.push({Hour:we,Total:fe[we]});l(ve)}};m.useEffect(()=>{if(A)return oe(),D.current=requestAnimationFrame(de),()=>{cancelAnimationFrame(D.current),L.current||(gn(Y.t("message.SimulationAborted",v)),e(ue=>{ue.world.date=j.current.toLocaleString("en-US")}),dt.getState().set(ue=>{ue.simulationInProgress=!1,ue.simulationPaused=!1})),G.current=!1}},[A]),m.useEffect(()=>{G.current=S,S?(Q.current=new Date(w.getTime()),cancelAnimationFrame(D.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),de())},[S]);const oe=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(j.current=new Date(r.date),V.current=0,w.setMonth(0,22),ie.current=dl(w,r.latitude),w.setHours(Math.floor(ie.current.sunrise/60),R/2-30),e(ue=>{ue.world.date=w.toLocaleString("en-US")})),L.current=!1,Re(),De(),Ae()},de=()=>{if(A&&!G.current)if(w.getMinutes()+w.getHours()*60{fe.world.date=w.toLocaleString("en-US")});for(const fe of i)fe.type===z.ParabolicTrough&&me(fe);D.current=requestAnimationFrame(de)}else{if(he(),V.current++,V.current===H){cancelAnimationFrame(D.current),e(fe=>{fe.world.date=j.current.toLocaleString("en-US"),fe.viewState.showYearlyParabolicTroughYieldPanel=!0,fe.selectedFloatingWindow="yearlyParabolicTroughYieldPanel"}),dt.getState().set(fe=>{fe.runYearlySimulationForParabolicTroughs=!1,fe.simulationInProgress=!1,fe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),L.current=!0,pe(),o&&e(fe=>{const ve=Cn.getState().sumYearlyParabolicTroughYield();fe.actionInfo={name:"Yearly Simulation for Parabolic Troughs Completed",result:{totalYield:ve},details:Cn.getState().yearlyParabolicTroughYield,timestamp:new Date().getTime()}});return}w.setMonth(V.current*F,22),ie.current=dl(w,r.latitude),w.setHours(Math.floor(ie.current.sunrise/60),R/2-30),De(),D.current=requestAnimationFrame(de)}},he=()=>{const ue=Te();for(const fe of i)if(fe.type===z.ParabolicTrough){const ve=fe,we=B.current.get(ve.id);if(we){const Pe=O.current.get(ve.id);if(Pe){const Ie=we.reduce((Me,ze)=>Me+ze,0);Pe[V.current]+=Ie*ue*ge(ve)}}}C&&ee()},pe=()=>{if(f){const ue=[],fe=[];let ve=0;for(const Pe of i)if(Pe.type===z.ParabolicTrough){const Ie=O.current.get(Pe.id);Ie&&(u(Pe.id,Ie.reduce((Me,ze)=>Me+ze,0)*F*q),ue.push(Ie),ve++,fe.push(Pe.label??"Trough"+ve))}const we=[];for(let Pe=0;Pe<12;Pe+=F){const Ie={};Ie.Month=zs[Pe];for(const[Me,ze]of ue.entries())Ie[fe[Me]]=ze[Pe/F]*q;we.push(Ie)}c(we),p(fe)}else{const ue=[];for(const ve of i)if(ve.type===z.ParabolicTrough){const we=O.current.get(ve.id);we&&(u(ve.id,we.reduce((Pe,Ie)=>Pe+Ie,0)*F*q),ue.push(we))}const fe=[];for(let ve=0;ve<12;ve+=F){let we=0;for(const Pe of ue)we+=Pe[ve/F];fe.push({Month:zs[ve],Total:we*q})}c(fe)}},me=ue=>{const fe=ki(w,r.latitude);if(fe.z0&&(Rt.set(je+Wt*Ee,xt+ht*ke),Ne||Rt.rotateAround(Ye,ze),Gt.set(Rt.x-Ye.x,Rt.y-Ye.y,0),Gt.applyEuler($e),it.set(Pe.x+Gt.x,Pe.y+Gt.y,gt+Gt.z),Se(ue.id,it,fe)||(At+=vt*wt));const pt=B.current.get(ue.id);if(pt){const Wt=w.getMinutes()>=30?w.getHours()+1===24?0:w.getHours()+1:w.getHours();pt[Wt]+=At/(nt*We)}},le=()=>{const ue=$.daylight()/60;return ue>Et?T.sunshineHours[w.getMonth()]/(30*ue*b):0},Te=()=>{const ue=ie.current.daylight()/60;return ue>Et?T.sunshineHours[w.getMonth()]/(30*ue*b):0},ge=ue=>ue.lx*ue.ly*ue.opticalEfficiency*ue.thermalEfficiency*ue.absorptance*ue.reflectance*(1-N[w.getMonth()]),Se=(ue,fe,ve)=>{if(W.current.length>1){k.current.length=0,E.set(fe,ve);const we=W.current.filter(Pe=>Pe.uuid!==ue);return E.intersectObjects(we,!1,k.current),k.current.length>0}return!1},Re=()=>{const ue=P.children.filter(fe=>fe.name==="Content");if(ue.length>0){const fe=ue[0].children;W.current.length=0;for(const ve of fe)ye.fetchSimulationElements(ve,W.current)}},De=()=>{for(const ue of i)if(ue.type===z.ParabolicTrough){const fe=B.current.get(ue.id);fe?fe.fill(0):B.current.set(ue.id,new Array(24).fill(0))}},Ae=()=>{for(const ue of i)if(ue.type===z.ParabolicTrough){const fe=O.current.get(ue.id);fe&&fe.length===H?fe.fill(0):O.current.set(ue.id,new Array(H).fill(0))}};return h.jsx(h.Fragment,{})}),RBo=be.memo(({city:t})=>{const e=M(pn),n=dt(bh),o=M(oa),r=M.getState().world,i=M.getState().elements,a=M(Gr),l=Cn(Qvt),s=M(bW),c=Cn(ext),u=M(SW),d=M(yOe),f=M(AOe),p=Cn(txt),g=dt(Xvt),A=dt(Jvt),y=dt(Kvt),S=dt(qvt),C=M(jBe),{scene:P}=ri(),v=$t(),T=u1(t),w=new Date(r.date),x=t?T==null?void 0:T.elevation:0,b=r.cspTimesPerHour??4,R=60/b,H=r.cspDaysPerYear??6,F=12/H,E=m.useMemo(()=>new l0,[]),N=r.monthlyIrradianceLosses??new Array(12).fill(.05),U=r.cspGridCellSize??.5,W=m.useRef([]),k=m.useRef([]),D=m.useRef(0),L=m.useRef(!1),j=m.useRef(new Date(r.date)),B=m.useRef(new Map),O=m.useRef(new Map),V=m.useRef(0),G=m.useRef(!1),Q=m.useRef(new Date(r.date)),$=m.useMemo(()=>dl(w,r.latitude),[r.date,r.latitude]),ie=m.useRef($),q=ye.daysInYear(w)/12;m.useEffect(()=>{if(g)return se(),D.current=requestAnimationFrame(Z),()=>{cancelAnimationFrame(D.current),L.current||(gn(Y.t("message.SimulationAborted",v)),e(ue=>{ue.world.date=j.current.toLocaleString("en-US")}),dt.getState().set(ue=>{ue.simulationInProgress=!1,ue.simulationPaused=!1})),G.current=!1}},[g]),m.useEffect(()=>{G.current=y,y?(Q.current=new Date(w.getTime()),cancelAnimationFrame(D.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),Z())},[y]);const se=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(j.current=new Date(r.date),w.setHours(Math.floor($.sunrise/60),R/2-30)),L.current=!1,Re(),De()},Z=()=>{if(g&&!G.current){if(w.getMinutes()+w.getHours()*60>=$.sunset){cancelAnimationFrame(D.current),e(fe=>{fe.world.date=j.current.toLocaleString("en-US"),fe.viewState.showDailyParabolicDishYieldPanel=!0,fe.selectedFloatingWindow="dailyParabolicDishYieldPanel"}),dt.getState().set(fe=>{fe.runDailySimulationForParabolicDishes=!1,fe.simulationInProgress=!1,fe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),L.current=!0,ee(),o&&e(fe=>{const ve=Cn.getState().sumDailyParabolicDishYield();fe.actionInfo={name:"Daily Simulation for Parabolic Dishes Completed",result:{totalYield:ve},details:Cn.getState().dailyParabolicDishYield,timestamp:new Date().getTime()}});return}w.setHours(w.getHours(),w.getMinutes()+R),e(fe=>{fe.world.date=w.toLocaleString("en-US")});for(const fe of i)fe.type===z.ParabolicDish&&me(fe);D.current=requestAnimationFrame(Z)}},ee=()=>{const ue=le();for(const fe of i)if(fe.type===z.ParabolicDish){const ve=fe,we=B.current.get(ve.id);if(we){const Pe=ge(ve)*ue;for(let Ie=0;Ie{var ue;if(d){const fe=new Array(24).fill(0),ve=new Map;let we=0;const Pe=[];for(const Me of i)if(Me.type===z.ParabolicDish){const ze=B.current.get(Me.id);if(ze){s(Me.id,ze.reduce((Ne,Je)=>Ne+Je,0)),we++,ve.set("Dish"+we,ze),Pe.push(Me.label??"Dish"+we);for(let Ne=0;Ne<24;Ne++)fe[Ne]+=ze[Ne]}}const Ie=[];for(let Me=0;Me<24;Me++){const ze={};ze.Hour=Me;for(let Ne=1;Ne<=we;Ne++){const Je="Dish"+Ne;ze[Pe[Ne-1]]=(ue=ve.get(Je))==null?void 0:ue[Me]}Ie.push(ze)}l(Ie),p(Pe)}else{const fe=new Array(24).fill(0);for(const we of i)if(we.type===z.ParabolicDish){const Pe=B.current.get(we.id);if(Pe){s(we.id,Pe.reduce((Ie,Me)=>Ie+Me,0));for(let Ie=0;Ie<24;Ie++)fe[Ie]+=Pe[Ie]}}const ve=[];for(let we=0;we<24;we++)ve.push({Hour:we,Total:fe[we]});l(ve)}};m.useEffect(()=>{if(A)return oe(),D.current=requestAnimationFrame(de),()=>{cancelAnimationFrame(D.current),L.current||(gn(Y.t("message.SimulationAborted",v)),e(ue=>{ue.world.date=j.current.toLocaleString("en-US")}),dt.getState().set(ue=>{ue.simulationInProgress=!1,ue.simulationPaused=!1})),G.current=!1}},[A]),m.useEffect(()=>{G.current=S,S?(Q.current=new Date(w.getTime()),cancelAnimationFrame(D.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),de())},[S]);const oe=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(j.current=new Date(r.date),V.current=0,w.setMonth(0,22),ie.current=dl(w,r.latitude),w.setHours(Math.floor(ie.current.sunrise/60),R/2-30),e(ue=>{ue.world.date=w.toLocaleString("en-US")})),L.current=!1,Re(),De(),Ae()},de=()=>{if(A&&!G.current)if(w.getMinutes()+w.getHours()*60{fe.world.date=w.toLocaleString("en-US")});for(const fe of i)fe.type===z.ParabolicDish&&me(fe);D.current=requestAnimationFrame(de)}else{if(he(),V.current++,V.current===H){cancelAnimationFrame(D.current),e(fe=>{fe.world.date=j.current.toLocaleString("en-US"),fe.viewState.showYearlyParabolicDishYieldPanel=!0,fe.selectedFloatingWindow="yearlyParabolicDishYieldPanel"}),dt.getState().set(fe=>{fe.runYearlySimulationForParabolicDishes=!1,fe.simulationInProgress=!1,fe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),L.current=!0,pe(),o&&e(fe=>{const ve=Cn.getState().sumYearlyParabolicDishYield();fe.actionInfo={name:"Yearly Simulation for Parabolic Dishes Completed",result:{totalYield:ve},details:Cn.getState().yearlyParabolicDishYield,timestamp:new Date().getTime()}});return}w.setMonth(V.current*F,22),ie.current=dl(w,r.latitude),w.setHours(Math.floor(ie.current.sunrise/60),R/2-30),De(),D.current=requestAnimationFrame(de)}},he=()=>{const ue=Te();for(const fe of i)if(fe.type===z.ParabolicDish){const ve=fe,we=B.current.get(ve.id);if(we){const Pe=O.current.get(ve.id);if(Pe){const Ie=we.reduce((Me,ze)=>Me+ze,0);Pe[V.current]+=Ie*ue*ge(ve)}}}C&&ee()},pe=()=>{if(f){const ue=[],fe=[];let ve=0;for(const Pe of i)if(Pe.type===z.ParabolicDish){const Ie=O.current.get(Pe.id);Ie&&(u(Pe.id,Ie.reduce((Me,ze)=>Me+ze,0)*F*q),ue.push(Ie),ve++,fe.push(Pe.label??"Dish"+ve))}const we=[];for(let Pe=0;Pe<12;Pe+=F){const Ie={};Ie.Month=zs[Pe];for(const[Me,ze]of ue.entries())Ie[fe[Me]]=ze[Pe/F]*q;we.push(Ie)}c(we),p(fe)}else{const ue=[];for(const ve of i)if(ve.type===z.ParabolicDish){const we=O.current.get(ve.id);we&&(u(ve.id,we.reduce((Pe,Ie)=>Pe+Ie,0)*F*q),ue.push(we))}const fe=[];for(let ve=0;ve<12;ve+=F){let we=0;for(const Pe of ue)we+=Pe[ve/F];fe.push({Month:zs[ve],Total:we*q})}c(fe)}},me=ue=>{const fe=ki(w,r.latitude);if(fe.z0&&(wt.set(Oe+At*nt,st+pt*We),ut||wt.rotateAround(xt,it),vt.set(wt.x-xt.x,wt.y-xt.y,0),vt.applyEuler(Ze),gt.set(Pe.x+vt.x,Pe.y+vt.y,je+vt.z),Se(ue.id,gt,fe)||(Rt+=$e*Be));const Gt=B.current.get(ue.id);if(Gt){const At=w.getMinutes()>=30?w.getHours()+1===24?0:w.getHours()+1:w.getHours();Gt[At]+=Rt/(Je*Ue)}},le=()=>{const ue=$.daylight()/60;return ue>Et?T.sunshineHours[w.getMonth()]/(30*ue*b):0},Te=()=>{const ue=ie.current.daylight()/60;return ue>Et?T.sunshineHours[w.getMonth()]/(30*ue*b):0},ge=ue=>ue.lx*ue.ly*ue.opticalEfficiency*ue.thermalEfficiency*ue.absorptance*ue.reflectance*(1-N[w.getMonth()]),Se=(ue,fe,ve)=>{if(W.current.length>1){k.current.length=0,E.set(fe,ve);const we=W.current.filter(Pe=>Pe.uuid!==ue);return E.intersectObjects(we,!1,k.current),k.current.length>0}return!1},Re=()=>{const ue=P.children.filter(fe=>fe.name==="Content");if(ue.length>0){const fe=ue[0].children;W.current.length=0;for(const ve of fe)ye.fetchSimulationElements(ve,W.current)}},De=()=>{for(const ue of i)if(ue.type===z.ParabolicDish){const fe=B.current.get(ue.id);fe?fe.fill(0):B.current.set(ue.id,new Array(24).fill(0))}},Ae=()=>{for(const ue of i)if(ue.type===z.ParabolicDish){const fe=O.current.get(ue.id);fe&&fe.length===H?fe.fill(0):O.current.set(ue.id,new Array(H).fill(0))}};return h.jsx(h.Fragment,{})}),HBo=be.memo(({city:t})=>{const e=M(pn),n=dt(bh),o=M(oa),r=M.getState().world,i=M.getState().elements,a=M(Gr),l=Cn(Svt),s=M(bW),c=M(sOe),u=Cn(Pvt),d=M(SW),f=M(cOe),p=Cn(Cvt),g=dt(Avt),A=dt(wvt),y=dt(vvt),S=dt(xvt),C=M(BBe),{scene:P}=ri(),v=$t(),T=u1(t),w=new Date(r.date),x=t?T==null?void 0:T.elevation:0,b=r.cspTimesPerHour??4,R=60/b,H=r.cspDaysPerYear??6,F=12/H,E=m.useMemo(()=>new l0,[]),N=r.monthlyIrradianceLosses??new Array(12).fill(.05),U=r.cspGridCellSize??.5,W=m.useRef([]),k=m.useRef([]),D=m.useRef(0),L=m.useRef(!1),j=m.useRef(new Date(r.date)),B=m.useRef(new Map),O=m.useRef(new Map),V=m.useRef(0),G=m.useRef(!1),Q=m.useRef(new Date(r.date)),$=m.useMemo(()=>dl(w,r.latitude),[r.date,r.latitude]),ie=m.useRef($),q=ye.daysInYear(w)/12;m.useEffect(()=>{if(g)return se(),D.current=requestAnimationFrame(Z),()=>{cancelAnimationFrame(D.current),L.current||(gn(Y.t("message.SimulationAborted",v)),e(ue=>{ue.world.date=j.current.toLocaleString("en-US")}),dt.getState().set(ue=>{ue.simulationInProgress=!1,ue.simulationPaused=!1})),G.current=!1}},[g]),m.useEffect(()=>{G.current=y,y?(Q.current=new Date(w.getTime()),cancelAnimationFrame(D.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),Z())},[y]);const se=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(j.current=new Date(r.date),w.setHours(Math.floor($.sunrise/60),R/2-30)),L.current=!1,Re(),De()},Z=()=>{if(g&&!G.current){if(w.getMinutes()+w.getHours()*60>=$.sunset){cancelAnimationFrame(D.current),e(fe=>{fe.world.date=j.current.toLocaleString("en-US"),fe.viewState.showDailyFresnelReflectorYieldPanel=!0,fe.selectedFloatingWindow="dailyFresnelReflectorYieldPanel"}),dt.getState().set(fe=>{fe.runDailySimulationForFresnelReflectors=!1,fe.simulationInProgress=!1,fe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),L.current=!0,ee(),o&&e(fe=>{const ve=Cn.getState().sumDailyFresnelReflectorYield();fe.actionInfo={name:"Daily Simulation for Fresnel Reflectors Completed",result:{totalYield:ve},details:Cn.getState().dailyFresnelReflectorYield,timestamp:new Date().getTime()}});return}w.setHours(w.getHours(),w.getMinutes()+R),e(fe=>{fe.world.date=w.toLocaleString("en-US")});for(const fe of i)fe.type===z.FresnelReflector&&me(fe);D.current=requestAnimationFrame(Z)}},ee=()=>{const ue=le();for(const fe of i)if(fe.type===z.FresnelReflector){const ve=fe,we=B.current.get(ve.id);if(we){const Pe=ge(ve)*ue;for(let Ie=0;Ie{var ue;if(c){const fe=new Array(24).fill(0),ve=new Map;let we=0;const Pe=[];for(const Me of i)if(Me.type===z.FresnelReflector){const ze=B.current.get(Me.id);if(ze){s(Me.id,ze.reduce((Ne,Je)=>Ne+Je,0)),we++,ve.set("Reflector"+we,ze),Pe.push(Me.label??"Reflector"+we);for(let Ne=0;Ne<24;Ne++)fe[Ne]+=ze[Ne]}}const Ie=[];for(let Me=0;Me<24;Me++){const ze={};ze.Hour=Me;for(let Ne=1;Ne<=we;Ne++){const Je="Reflector"+Ne;ze[Pe[Ne-1]]=(ue=ve.get(Je))==null?void 0:ue[Me]}Ie.push(ze)}l(Ie),p(Pe)}else{const fe=new Array(24).fill(0);for(const we of i)if(we.type===z.FresnelReflector){const Pe=B.current.get(we.id);if(Pe){s(we.id,Pe.reduce((Ie,Me)=>Ie+Me,0));for(let Ie=0;Ie<24;Ie++)fe[Ie]+=Pe[Ie]}}const ve=[];for(let we=0;we<24;we++)ve.push({Hour:we,Total:fe[we]});l(ve)}};m.useEffect(()=>{if(A)return oe(),D.current=requestAnimationFrame(de),()=>{cancelAnimationFrame(D.current),L.current||(gn(Y.t("message.SimulationAborted",v)),e(ue=>{ue.world.date=j.current.toLocaleString("en-US")}),dt.getState().set(ue=>{ue.simulationInProgress=!1,ue.simulationPaused=!1})),G.current=!1}},[A]),m.useEffect(()=>{G.current=S,S?(Q.current=new Date(w.getTime()),cancelAnimationFrame(D.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),de())},[S]);const oe=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(j.current=new Date(r.date),V.current=0,w.setMonth(0,22),ie.current=dl(w,r.latitude),w.setHours(Math.floor(ie.current.sunrise/60),R/2-30),e(ue=>{ue.world.date=w.toLocaleString("en-US")})),L.current=!1,Re(),De(),Ae()},de=()=>{if(A&&!G.current)if(w.getMinutes()+w.getHours()*60{fe.world.date=w.toLocaleString("en-US")});for(const fe of i)fe.type===z.FresnelReflector&&me(fe);D.current=requestAnimationFrame(de)}else{if(he(),V.current++,V.current===H){cancelAnimationFrame(D.current),e(fe=>{fe.world.date=j.current.toLocaleString("en-US"),fe.viewState.showYearlyFresnelReflectorYieldPanel=!0,fe.selectedFloatingWindow="yearlyFresnelReflectorYieldPanel"}),dt.getState().set(fe=>{fe.runYearlySimulationForFresnelReflectors=!1,fe.simulationInProgress=!1,fe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),L.current=!0,pe(),o&&e(fe=>{const ve=Cn.getState().sumYearlyFresnelReflectorYield();fe.actionInfo={name:"Yearly Simulation for Fresnel Reflectors Completed",result:{totalYield:ve},details:Cn.getState().yearlyFresnelReflectorYield,timestamp:new Date().getTime()}});return}w.setMonth(V.current*F,22),ie.current=dl(w,r.latitude),w.setHours(Math.floor(ie.current.sunrise/60),R/2-30),De(),D.current=requestAnimationFrame(de)}},he=()=>{const ue=Te();for(const fe of i)if(fe.type===z.FresnelReflector){const ve=fe,we=B.current.get(ve.id);if(we){const Pe=O.current.get(ve.id);if(Pe){const Ie=we.reduce((Me,ze)=>Me+ze,0);Pe[V.current]+=Ie*ue*ge(ve)}}}C&&ee()},pe=()=>{if(f){const ue=[],fe=[];let ve=0;for(const Pe of i)if(Pe.type===z.FresnelReflector){const Ie=O.current.get(Pe.id);Ie&&(d(Pe.id,Ie.reduce((Me,ze)=>Me+ze,0)*F*q),ue.push(Ie),ve++,fe.push(Pe.label??"Reflector"+ve))}const we=[];for(let Pe=0;Pe<12;Pe+=F){const Ie={};Ie.Month=zs[Pe];for(const[Me,ze]of ue.entries())Ie[fe[Me]]=ze[Pe/F]*q;we.push(Ie)}u(we),p(fe)}else{const ue=[];for(const ve of i)if(ve.type===z.FresnelReflector){const we=O.current.get(ve.id);we&&(d(ve.id,we.reduce((Pe,Ie)=>Pe+Ie,0)*F*q),ue.push(we))}const fe=[];for(let ve=0;ve<12;ve+=F){let we=0;for(const Pe of ue)we+=Pe[ve/F];fe.push({Month:zs[ve],Total:we*q})}u(fe)}},me=ue=>{const fe=ki(w,r.latitude);if(fe.z0&&(pt.set(ct,je+Ve*Oe),Wt.set(pt.x-gt.x,pt.y-gt.y,0),Wt.applyEuler(vt),Ye.set(Me.x+Wt.x,Me.y+Wt.y,xt+Wt.z),!Se(ue.id,Ye,fe)&&!Se(ue.id,Ye,Rt)&&(ht+=At*Gt))}const It=B.current.get(ue.id);if(It){const Ft=w.getMinutes()>=30?w.getHours()+1===24?0:w.getHours()+1:w.getHours();It[Ft]+=ht/(We*Ee)}},le=()=>{const ue=$.daylight()/60;return ue>Et?T.sunshineHours[w.getMonth()]/(30*ue*b):0},Te=()=>{const ue=ie.current.daylight()/60;return ue>Et?T.sunshineHours[w.getMonth()]/(30*ue*b):0},ge=ue=>{const fe=a(ue);if(!fe)throw new Error("parent of Fresnel reflector does not exist");let ve=1;if(fe.type===z.Foundation){const Pe=fe.solarAbsorberPipe;ve*=((Pe==null?void 0:Pe.absorberOpticalEfficiency)??.7)*((Pe==null?void 0:Pe.absorberThermalEfficiency)??.3)*((Pe==null?void 0:Pe.absorberAbsorptance)??.95)}return ue.lx*ue.ly*ue.reflectance*ve*(1-N[w.getMonth()])},Se=(ue,fe,ve)=>{if(W.current.length>1){k.current.length=0,E.set(fe,ve);const we=W.current.filter(Pe=>Pe.uuid!==ue);return E.intersectObjects(we,!1,k.current),k.current.length>0}return!1},Re=()=>{const ue=P.children.filter(fe=>fe.name==="Content");if(ue.length>0){const fe=ue[0].children;W.current.length=0;for(const ve of fe)ye.fetchSimulationElements(ve,W.current)}},De=()=>{for(const ue of i)if(ue.type===z.FresnelReflector){const fe=B.current.get(ue.id);fe?fe.fill(0):B.current.set(ue.id,new Array(24).fill(0))}},Ae=()=>{for(const ue of i)if(ue.type===z.FresnelReflector){const fe=O.current.get(ue.id);fe&&fe.length===H?fe.fill(0):O.current.set(ue.id,new Array(H).fill(0))}};return h.jsx(h.Fragment,{})}),MBo=be.memo(({city:t})=>{const e=M(pn),n=dt(bh),o=M(oa),r=M.getState().world,i=M.getState().elements,a=M(Gr),l=Cn(Dvt),s=M(bW),c=M(dOe),u=Cn(Fvt),d=M(SW),f=M(fOe),p=Cn(kvt),g=dt(Rvt),A=dt(Hvt),y=dt(Mvt),S=dt(Ivt),C=M(YBe),{scene:P}=ri(),v=$t(),T=u1(t),w=new Date(r.date),x=t?T==null?void 0:T.elevation:0,b=r.cspTimesPerHour??4,R=60/b,H=r.cspDaysPerYear??6,F=12/H,E=m.useMemo(()=>new l0,[]),N=r.monthlyIrradianceLosses??new Array(12).fill(.05),U=r.cspGridCellSize??.5,W=m.useRef([]),k=m.useRef([]),D=m.useRef(0),L=m.useRef(!1),j=m.useRef(new Date(r.date)),B=m.useRef(new Map),O=m.useRef(new Map),V=m.useRef(0),G=m.useRef(!1),Q=m.useRef(new Date(r.date)),$=m.useMemo(()=>dl(w,r.latitude),[r.date,r.latitude]),ie=m.useRef($),q=ye.daysInYear(w)/12;m.useEffect(()=>{if(g)return se(),D.current=requestAnimationFrame(Z),()=>{cancelAnimationFrame(D.current),L.current||(gn(Y.t("message.SimulationAborted",v)),e(ue=>{ue.world.date=j.current.toLocaleString("en-US")}),dt.getState().set(ue=>{ue.simulationInProgress=!1,ue.simulationPaused=!1})),G.current=!1}},[g]),m.useEffect(()=>{G.current=y,y?(Q.current=new Date(w.getTime()),cancelAnimationFrame(D.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),Z())},[y]);const se=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(j.current=new Date(r.date),w.setHours(Math.floor($.sunrise/60),R/2-30)),L.current=!1,Re(),De()},Z=()=>{if(g&&!G.current){if(w.getMinutes()+w.getHours()*60>=$.sunset){cancelAnimationFrame(D.current),e(fe=>{fe.world.date=j.current.toLocaleString("en-US"),fe.viewState.showDailyHeliostatYieldPanel=!0,fe.selectedFloatingWindow="dailyHeliostatYieldPanel"}),dt.getState().set(fe=>{fe.runDailySimulationForHeliostats=!1,fe.simulationInProgress=!1,fe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),L.current=!0,ee(),o&&e(fe=>{const ve=Cn.getState().sumDailyHeliostatYield();fe.actionInfo={name:"Daily Simulation for Heliostats Completed",result:{totalYield:ve},details:Cn.getState().dailyHeliostatYield,timestamp:new Date().getTime()}});return}w.setHours(w.getHours(),w.getMinutes()+R),e(fe=>{fe.world.date=w.toLocaleString("en-US")});for(const fe of i)fe.type===z.Heliostat&&me(fe);D.current=requestAnimationFrame(Z)}},ee=()=>{const ue=le();for(const fe of i)if(fe.type===z.Heliostat){const ve=fe,we=B.current.get(ve.id);if(we){const Pe=ge(ve)*ue;for(let Ie=0;Ie{var ue;if(c){const fe=new Array(24).fill(0),ve=new Map;let we=0;const Pe=[];for(const Me of i)if(Me.type===z.Heliostat){const ze=B.current.get(Me.id);if(ze){s(Me.id,ze.reduce((Ne,Je)=>Ne+Je,0)),we++,ve.set("Heliostat"+we,ze),Pe.push(Me.label??"Heliostat"+we);for(let Ne=0;Ne<24;Ne++)fe[Ne]+=ze[Ne]}}const Ie=[];for(let Me=0;Me<24;Me++){const ze={};ze.Hour=Me;for(let Ne=1;Ne<=we;Ne++){const Je="Heliostat"+Ne;ze[Pe[Ne-1]]=(ue=ve.get(Je))==null?void 0:ue[Me]}Ie.push(ze)}l(Ie),p(Pe)}else{const fe=new Array(24).fill(0);for(const we of i)if(we.type===z.Heliostat){const Pe=B.current.get(we.id);if(Pe){s(we.id,Pe.reduce((Ie,Me)=>Ie+Me,0));for(let Ie=0;Ie<24;Ie++)fe[Ie]+=Pe[Ie]}}const ve=[];for(let we=0;we<24;we++)ve.push({Hour:we,Total:fe[we]});l(ve)}};m.useEffect(()=>{if(A)return oe(),D.current=requestAnimationFrame(de),()=>{cancelAnimationFrame(D.current),L.current||(gn(Y.t("message.SimulationAborted",v)),e(ue=>{ue.world.date=j.current.toLocaleString("en-US")}),dt.getState().set(ue=>{ue.simulationInProgress=!1,ue.simulationPaused=!1})),G.current=!1}},[A]),m.useEffect(()=>{G.current=S,S?(Q.current=new Date(w.getTime()),cancelAnimationFrame(D.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),de())},[S]);const oe=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(j.current=new Date(r.date),V.current=0,w.setMonth(0,22),ie.current=dl(w,r.latitude),w.setHours(Math.floor(ie.current.sunrise/60),R/2-30),e(ue=>{ue.world.date=w.toLocaleString("en-US")})),L.current=!1,Re(),De(),Ae()},de=()=>{if(A&&!G.current)if(w.getMinutes()+w.getHours()*60{fe.world.date=w.toLocaleString("en-US")});for(const fe of i)fe.type===z.Heliostat&&me(fe);D.current=requestAnimationFrame(de)}else{if(he(),V.current++,V.current===H){cancelAnimationFrame(D.current),e(fe=>{fe.world.date=j.current.toLocaleString("en-US"),fe.viewState.showYearlyHeliostatYieldPanel=!0,fe.selectedFloatingWindow="yearlyHeliostatYieldPanel"}),dt.getState().set(fe=>{fe.runYearlySimulationForHeliostats=!1,fe.simulationInProgress=!1,fe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),L.current=!0,pe(),o&&e(fe=>{const ve=Cn.getState().sumYearlyHeliostatYield();fe.actionInfo={name:"Yearly Simulation for Heliostats Completed",result:{totalYield:ve},details:Cn.getState().yearlyHeliostatYield,timestamp:new Date().getTime()}});return}w.setMonth(V.current*F,22),ie.current=dl(w,r.latitude),w.setHours(Math.floor(ie.current.sunrise/60),R/2-30),De(),D.current=requestAnimationFrame(de)}},he=()=>{const ue=Te();for(const fe of i)if(fe.type===z.Heliostat){const ve=fe,we=B.current.get(ve.id);if(we){const Pe=O.current.get(ve.id);if(Pe){const Ie=we.reduce((Me,ze)=>Me+ze,0);Pe[V.current]+=Ie*ue*ge(ve)}}}C&&ee()},pe=()=>{if(f){const ue=[],fe=[];let ve=0;for(const Pe of i)if(Pe.type===z.Heliostat){const Ie=O.current.get(Pe.id);Ie&&(d(Pe.id,Ie.reduce((Me,ze)=>Me+ze,0)*F*q),ue.push(Ie),ve++,fe.push(Pe.label??"Heliostat"+ve))}const we=[];for(let Pe=0;Pe<12;Pe+=F){const Ie={};Ie.Month=zs[Pe];for(const[Me,ze]of ue.entries())Ie[fe[Me]]=ze[Pe/F]*q;we.push(Ie)}u(we),p(fe)}else{const ue=[];for(const ve of i)if(ve.type===z.Heliostat){const we=O.current.get(ve.id);we&&(d(ve.id,we.reduce((Pe,Ie)=>Pe+Ie,0)*F*q),ue.push(we))}const fe=[];for(let ve=0;ve<12;ve+=F){let we=0;for(const Pe of ue)we+=Pe[ve/F];fe.push({Month:zs[ve],Total:we*q})}u(fe)}},me=ue=>{const fe=ki(w,r.latitude);if(fe.z0&&($e.set(Rt,je+pt*Oe),wt.set($e.x-gt.x,$e.y-gt.y,0),wt.applyEuler(lt),Ye.set(Me.x+wt.x,Me.y+wt.y,xt+wt.z),!Se(ue.id,Ye,fe)&&!Se(ue.id,Ye,Qe)&&(vt+=Be*Ze))}const Gt=B.current.get(ue.id);if(Gt){const At=w.getMinutes()>=30?w.getHours()+1===24?0:w.getHours()+1:w.getHours();Gt[At]+=vt/(We*Ee)}},le=()=>{const ue=$.daylight()/60;return ue>Et?T.sunshineHours[w.getMonth()]/(30*ue*b):0},Te=()=>{const ue=ie.current.daylight()/60;return ue>Et?T.sunshineHours[w.getMonth()]/(30*ue*b):0},ge=ue=>{const fe=a(ue);if(!fe)throw new Error("parent of heliostat does not exist");let ve=1;if(fe.type===z.Foundation){const Pe=fe.solarPowerTower;ve*=((Pe==null?void 0:Pe.receiverOpticalEfficiency)??.7)*((Pe==null?void 0:Pe.receiverThermalEfficiency)??.3)*((Pe==null?void 0:Pe.receiverAbsorptance)??.95)}return ue.lx*ue.ly*ue.reflectance*ve*(1-N[w.getMonth()])},Se=(ue,fe,ve)=>{if(W.current.length>1){k.current.length=0,E.set(fe,ve);const we=W.current.filter(Pe=>Pe.uuid!==ue);return E.intersectObjects(we,!1,k.current),k.current.length>0}return!1},Re=()=>{const ue=P.children.filter(fe=>fe.name==="Content");if(ue.length>0){const fe=ue[0].children;W.current.length=0;for(const ve of fe)ye.fetchSimulationElements(ve,W.current)}},De=()=>{for(const ue of i)if(ue.type===z.Heliostat){const fe=B.current.get(ue.id);fe?fe.fill(0):B.current.set(ue.id,new Array(24).fill(0))}},Ae=()=>{for(const ue of i)if(ue.type===z.Heliostat){const fe=O.current.get(ue.id);fe&&fe.length===H?fe.fill(0):O.current.set(ue.id,new Array(H).fill(0))}};return h.jsx(h.Fragment,{})}),IBo=be.memo(({city:t})=>{const e=M(pn),n=dt(bh),o=M(oa),r=M.getState().world,i=M.getState().elements,a=Cn(Gvt),l=Cn(Bvt),s=Cn(Yvt),c=Cn(_vt),u=dt(pOe),d=dt(Lvt),f=dt(gOe),p=dt(Wvt),g=M(OBe),A=M(XBe),y=M(pW)??900,S=r.sutGridCellSize??1,{scene:C}=ri(),P=$t(),v=u1(t),T=new Date(r.date),w=v?v.elevation:0,x=r.sutTimesPerHour??4,b=60/x,R=r.sutDaysPerYear??6,H=12/R,F=m.useMemo(()=>new l0,[]),E=m.useRef([]),N=m.useRef([]),U=m.useRef(0),W=m.useRef(!1),k=m.useRef(new Date(r.date)),D=m.useRef(new Array(24).fill(0)),L=m.useRef(new Map),j=m.useRef(new Map),B=m.useRef(new Map),O=m.useRef(new Map),V=m.useRef(0),G=m.useRef(!1),Q=m.useRef(new Date(r.date)),$=m.useRef(0),ie=m.useMemo(()=>dl(T,r.latitude),[r.date,r.latitude]),q=m.useRef(ie),se=ye.daysInYear(T)/12;m.useEffect(()=>{if(u)if(A&&!ye.hasMovingParts(i))Z();else return ee(),U.current=requestAnimationFrame(te),()=>{cancelAnimationFrame(U.current),W.current||(gn(Y.t("message.SimulationAborted",P)),e(we=>{we.world.date=k.current.toLocaleString("en-US")}),dt.getState().set(we=>{we.simulationInProgress=!1,we.simulationPaused=!1})),G.current=!1}},[u]),m.useEffect(()=>{G.current=d,d?(Q.current=new Date(T.getTime()),cancelAnimationFrame(U.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",P))):(n("simulationPaused",!1),te())},[d]);const Z=()=>{fe(),ge();for(const we of i)if(we.type===z.Foundation){const Pe=we;Pe.solarStructure===Dn.UpdraftTower&&Pe.solarUpdraftTower&&De(Pe)}e(we=>{we.viewState.showDailyUpdraftTowerYieldPanel=!0,we.selectedFloatingWindow="dailySolarUpdraftTowerYieldPanel"}),dt.getState().set(we=>{we.runDailySimulationForUpdraftTower=!1,we.simulationInProgress=!1,we.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",P)),W.current=!0,oe(),o&&e(we=>{const Pe=Cn.getState().sumDailyUpdraftTowerYield();we.actionInfo={name:"Static Daily Simulation for Updraft Tower Completed",result:{totalYield:Pe},details:Cn.getState().dailyUpdraftTowerYield,timestamp:new Date().getTime()}})},ee=()=>{G.current?(T.setTime(Q.current.getTime()),G.current=!1):(k.current=new Date(r.date),$.current=T.getDay(),T.setHours(Math.floor(ie.sunrise/60),-b/2)),W.current=!1,fe(),ge()},te=()=>{if(u&&!G.current){if(T.getMinutes()+T.getHours()*60+(T.getDay()-$.current)*T2+b>=ie.sunset){cancelAnimationFrame(U.current),e(Pe=>{Pe.world.date=k.current.toLocaleString("en-US"),Pe.viewState.showDailyUpdraftTowerYieldPanel=!0,Pe.selectedFloatingWindow="dailySolarUpdraftTowerYieldPanel"}),dt.getState().set(Pe=>{Pe.runDailySimulationForUpdraftTower=!1,Pe.simulationInProgress=!1,Pe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",P)),W.current=!0,oe(),o&&e(Pe=>{const Ie=Cn.getState().sumDailyUpdraftTowerYield();Pe.actionInfo={name:"Dynamic Daily Simulation for Updraft Tower Completed",result:{totalYield:Ie},details:Cn.getState().dailyUpdraftTowerYield,timestamp:new Date().getTime()}});return}T.setHours(T.getHours(),T.getMinutes()+b),e(Pe=>{Pe.world.date=T.toLocaleString("en-US")});for(const Pe of i)if(Pe.type===z.Foundation){const Ie=Pe;Ie.solarStructure===Dn.UpdraftTower&&Ie.solarUpdraftTower&&Re(Ie)}U.current=requestAnimationFrame(te)}},oe=()=>{const we=Ae();for(const Pe of i)if(Pe.type===z.Foundation){const Ie=Pe;if(Ie.solarStructure===Dn.UpdraftTower&&Ie.solarUpdraftTower){const Me=Ie.solarUpdraftTower.collectorTransmissivity??.9,ze=Ie.solarUpdraftTower.turbineEfficiency??.3,Ne=Ie.solarUpdraftTower.dischargeCoefficient??.65,Je=Math.PI*Ie.solarUpdraftTower.chimneyRadius*Ie.solarUpdraftTower.chimneyRadius,Ue=Math.PI*Ie.solarUpdraftTower.collectorRadius*Ie.solarUpdraftTower.collectorRadius,nt=mO*zSe*Je,We=2*ISe*Ie.solarUpdraftTower.chimneyHeight,Ee=L.current.get(Pe.id+"-sut"),ke=j.current.get(Pe.id+"-sut"),Oe=B.current.get(Pe.id+"-sut");if(Oe&&Ee&&ke){const st=.5*Ne*ze*mO*Je,je=new Date(r.date);let xt;v&&(xt=rb(je,v.lowestTemperatures,v.highestTemperatures));for(let gt=0;gt0&>>0&&Ee[gt-1]>Ye){const Ze=(Ee[gt-1]+Ye)/2,Be=(r.airConvectiveCoefficient??5)*Ue*(Ze-Ye),$e=Ze+H4,wt=$e*$e*$e*$e,vt=it*it*it*it,Rt=(Ie.solarUpdraftTower.collectorEmissivity??.95)*DSe*Ue*(wt-vt);Oe[gt]-=Be+Rt,Oe[gt]<0&&(Oe[gt]=0)}const ut=Oe[gt]/(nt*it),Qe=it*(1+Math.cbrt(ut*ut/We))-H4,lt=Qe>Ye?Math.sqrt(We*((Qe+H4)/it-1)):0;Oe[gt]=st*lt*lt*lt*.001,Ee[gt]=Qe,ke[gt]=lt}}}}de()},de=()=>{var Ne,Je,Ue;const we=new Map;let Pe=0;const Ie=[];for(const nt of i)if(nt.type===z.Foundation){const We=nt;if(We.solarStructure===Dn.UpdraftTower&&We.solarUpdraftTower){Pe++;const Ee=L.current.get(nt.id+"-sut");Ee&&we.set("Temperature Tower"+Pe,Ee);const ke=j.current.get(nt.id+"-sut");ke&&we.set("Wind Speed Tower"+Pe,ke);const Oe=B.current.get(nt.id+"-sut");Oe&&(we.set("Tower"+Pe,Oe),Ie.push(nt.label?nt.label:"Tower"+Pe))}}const Me=[];for(let nt=0;nt<24;nt++){const We={};We.Hour=nt;for(let Ee=1;Ee<=Pe;Ee++){const ke="Tower"+Ee;We[Ie[Ee-1]]=(Ne=we.get(ke))==null?void 0:Ne[nt]}Me.push(We)}s(Me);const ze=[];for(let nt=0;nt<24;nt++){const We={};We.Hour=nt,We.T_Ambient=D.current[nt];for(let Ee=1;Ee<=Pe;Ee++){let ke="Temperature Tower"+Ee;We["T_"+Ie[Ee-1]]=(Je=we.get(ke))==null?void 0:Je[nt],ke="Wind Speed Tower"+Ee,We["V_"+Ie[Ee-1]]=(Ue=we.get(ke))==null?void 0:Ue[nt]}ze.push(We)}l(ze),a(Ie)};m.useEffect(()=>{if(f)if(A&&!ye.hasMovingParts(i))pe();else return he(),U.current=requestAnimationFrame(me),()=>{cancelAnimationFrame(U.current),W.current||(gn(Y.t("message.SimulationAborted",P)),e(we=>{we.world.date=k.current.toLocaleString("en-US")}),dt.getState().set(we=>{we.simulationInProgress=!1,we.simulationPaused=!1})),G.current=!1}},[f]),m.useEffect(()=>{G.current=p,p?(Q.current=new Date(T.getTime()),cancelAnimationFrame(U.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",P))):(n("simulationPaused",!1),me())},[p]);const he=()=>{G.current?(T.setTime(Q.current.getTime()),G.current=!1):(k.current=new Date(r.date),V.current=0,T.setMonth(0,22),$.current=T.getDay(),q.current=dl(T,r.latitude),T.setHours(Math.floor(q.current.sunrise/60),-b/2),e(we=>{we.world.date=T.toLocaleString("en-US")})),W.current=!1,fe(),ge(),Se()},pe=()=>{fe(),ge(),Se(),k.current=new Date(r.date),V.current=0;for(let we=0;we<12;we+=H){T.setMonth(we,22),q.current=dl(T,r.latitude),ge();for(const Pe of i)if(Pe.type===z.Foundation){const Ie=Pe;Ie.solarStructure===Dn.UpdraftTower&&Ie.solarUpdraftTower&&De(Ie)}le(),V.current++}e(we=>{we.world.date=k.current.toLocaleString("en-US"),we.viewState.showYearlyUpdraftTowerYieldPanel=!0,we.selectedFloatingWindow="yearlySolarUpdraftTowerYieldPanel"}),dt.getState().set(we=>{we.runYearlySimulationForUpdraftTower=!1,we.simulationInProgress=!1,we.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",P)),W.current=!0,Te(),o&&e(we=>{const Pe=Cn.getState().sumYearlyUpdraftTowerYield();we.actionInfo={name:"Static Yearly Simulation for Updraft Tower Completed",result:{totalYield:Pe},details:Cn.getState().yearlyUpdraftTowerYield,timestamp:new Date().getTime()}})},me=()=>{if(f&&!G.current)if(T.getMinutes()+T.getHours()*60+(T.getDay()-$.current)*T2+b{Pe.world.date=T.toLocaleString("en-US")});for(const Pe of i)if(Pe.type===z.Foundation){const Ie=Pe;Ie.solarStructure===Dn.UpdraftTower&&Ie.solarUpdraftTower&&Re(Ie)}U.current=requestAnimationFrame(me)}else{if(le(),V.current++,V.current===R){cancelAnimationFrame(U.current),e(Pe=>{Pe.world.date=k.current.toLocaleString("en-US"),Pe.viewState.showYearlyUpdraftTowerYieldPanel=!0,Pe.selectedFloatingWindow="yearlySolarUpdraftTowerYieldPanel"}),dt.getState().set(Pe=>{Pe.runYearlySimulationForUpdraftTower=!1,Pe.simulationInProgress=!1,Pe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",P)),W.current=!0,Te(),o&&e(Pe=>{const Ie=Cn.getState().sumYearlyUpdraftTowerYield();Pe.actionInfo={name:"Dynamic Yearly Simulation for Updraft Tower Completed",result:{totalYield:Ie},details:Cn.getState().yearlyUpdraftTowerYield,timestamp:new Date().getTime()}});return}T.setMonth(V.current*H,22),$.current=T.getDay(),q.current=dl(T,r.latitude),T.setHours(Math.floor(q.current.sunrise/60),-b/2),ge(),U.current=requestAnimationFrame(me)}},le=()=>{const we=ue();for(const Pe of i)if(Pe.type===z.Foundation){const Ie=Pe;if(Ie.solarStructure===Dn.UpdraftTower&&Ie.solarUpdraftTower){const Me=B.current.get(Ie.id+"-sut"),ze=L.current.get(Pe.id+"-sut"),Ne=j.current.get(Pe.id+"-sut");if(Me&&ze&&Ne){const Je=Ie.solarUpdraftTower.collectorTransmissivity??.9,Ue=Ie.solarUpdraftTower.turbineEfficiency??.3,nt=Ie.solarUpdraftTower.dischargeCoefficient??.65,We=Math.PI*Ie.solarUpdraftTower.chimneyRadius*Ie.solarUpdraftTower.chimneyRadius,Ee=Math.PI*Ie.solarUpdraftTower.collectorRadius*Ie.solarUpdraftTower.collectorRadius,ke=mO*zSe*We,Oe=2*ISe*Ie.solarUpdraftTower.chimneyHeight,st=.5*nt*Ue*mO*We;let je;v&&(je=rb(T,v.lowestTemperatures,v.highestTemperatures));for(let gt=0;gt0&>>0&&ze[gt-1]>Ye){const Ze=(ze[gt-1]+Ye)/2,Be=(r.airConvectiveCoefficient??5)*Ee*(Ze-Ye),$e=Ze+H4,wt=$e*$e*$e*$e,vt=it*it*it*it,Rt=(Ie.solarUpdraftTower.collectorEmissivity??.95)*DSe*Ee*(wt-vt);Me[gt]-=Be+Rt,Me[gt]<0&&(Me[gt]=0)}const ut=Me[gt]/(ke*it),Qe=it*(1+Math.cbrt(ut*ut/Oe))-H4,lt=Qe>Ye?Math.sqrt(Oe*((Qe+H4)/it-1)):0;Me[gt]=st*lt*lt*lt*.001,ze[gt]=Qe,Ne[gt]=lt}const xt=O.current.get(Ie.id+"-sut");if(xt){const gt=Me.reduce((Ye,it)=>Ye+it,0);xt[V.current]+=gt}}}}g&&de()},Te=()=>{const we=[],Pe=[];let Ie=0;for(const ze of i)if(ze.type===z.Foundation){const Ne=ze;if(Ne.solarStructure===Dn.UpdraftTower&&Ne.solarUpdraftTower){const Je=O.current.get(ze.id+"-sut");Je&&(we.push(Je),Pe.push(ze.label?ze.label:"Tower"+ ++Ie))}}const Me=[];for(let ze=0;ze<12;ze+=H){const Ne={};Ne.Month=zs[ze];for(const[Je,Ue]of we.entries())Ne[Pe[Je]]=Ue[ze/H]*se;Me.push(Ne)}c(Me),a(Pe)},ge=()=>{for(const we of i)if(we.type===z.Foundation){const Pe=we;if(Pe.solarStructure===Dn.UpdraftTower&&Pe.solarUpdraftTower){const Ie=L.current.get(we.id+"-sut");Ie?Ie.fill(0):L.current.set(we.id+"-sut",new Array(24).fill(0));const Me=j.current.get(we.id+"-sut");Me?Me.fill(0):j.current.set(we.id+"-sut",new Array(24).fill(0));const ze=B.current.get(we.id+"-sut");ze?ze.fill(0):B.current.set(we.id+"-sut",new Array(24).fill(0))}}},Se=()=>{for(const we of i)if(we.type===z.Foundation){const Pe=we;if(Pe.solarStructure===Dn.UpdraftTower&&Pe.solarUpdraftTower){const Ie=O.current.get(we.id+"-sut");Ie&&Ie.length===R?Ie.fill(0):O.current.set(we.id+"-sut",new Array(R).fill(0))}}},Re=we=>{const Pe=we.solarUpdraftTower;if(!Pe)return;const Ie=ki(T,r.latitude);if(Ie.zxt)&&(Ye++,gt+=Oe,je>0&&(ve(we.id+"-sut",st,Ie)||(gt+=je*ke)))}Ye&&(gt/=Ye);const Qe=T.getMinutes()>=30?T.getHours()+1===24?0:T.getHours()+1:T.getHours(),lt=Math.PI*Pe.collectorRadius*Pe.collectorRadius;Me[Qe]+=gt*lt}},De=we=>{const Pe=we.solarUpdraftTower;if(!Pe)return;const Ie=B.current.get(we.id+"-sut");if(!Ie)return;const Me=new ae().fromArray(we.normal),ze=T.getFullYear(),Ne=T.getMonth(),Je=T.getDate(),Ue=ye.dayOfYear(T),nt=Pe.collectorRadius,We=Math.max(2,Math.round(nt*2/S)),Ee=we.cx-nt+S/2,ke=we.cy-nt+S/2,Oe=we.lz+Pe.collectorHeight,st=new ae(0,0,Oe),je=nt*nt;let xt=0,gt,Ye;const it=Math.PI*Pe.collectorRadius*Pe.collectorRadius;for(let ut=0;ut<24;ut++){for(let Qe=0;Qe0){const Be=vi(Ze,Ue,w,li.SPHERE_MODEL),$e=qr(r.ground,Ne,ko,Be),wt=Me.dot(Ze);xt=0;for(let vt=0;vtje)&&(xt++,Ie[ut]+=$e,wt>0&&(ve(we.id+"-sut",st,Ze)||(Ie[ut]+=wt*Be)))}}}xt&&(Ie[ut]/=xt),Ie[ut]*=it}},Ae=()=>{const we=ie.daylight()/60;return we>Et?v.sunshineHours[T.getMonth()]/(30*we*x):0},ue=()=>{const we=T.getMonth(),Pe=q.current.daylight()/60;return Pe>Et?v.sunshineHours[we]/(30*Pe*x):0},fe=()=>{const we=C.children.filter(Pe=>Pe.name==="Content");if(we.length>0){const Pe=we[0].children;E.current.length=0;for(const Ie of Pe)ye.fetchSimulationElements(Ie,E.current)}},ve=(we,Pe,Ie)=>{if(E.current.length>1){N.current.length=0,F.set(Pe,Ie);const Me=E.current.filter(ze=>ze.uuid!==we);return F.intersectObjects(Me,!1,N.current),N.current.length>0}return!1};return h.jsx(h.Fragment,{})});class zBo{constructor(e,n){this.position=e,this.observer=n}}const DBo=be.memo(()=>{const t=M.getState().world,e=M.getState().elements,n=M(pn),o=dt(bh),r=M(Gr),i=M(yA),a=dt(Q7t),{scene:l}=ri(),s=$t(),c=m.useMemo(()=>new l0,[]),u=t.solarPanelVisibilityGridCellSize??.2,d=m.useRef([]),f=m.useRef([]),p=m.useRef([]);m.useEffect(()=>{a&&e&&e.length>0&&(y(),o("runSolarPanelVisibilityAnalysis",!1),n(P=>{P.viewState.showSolarPanelVisibilityResultsPanel=!0,P.selectedFloatingWindow="visibilityResultsPanel"}),gn(Y.t("message.SimulationCompleted",s))),o("simulationInProgress",!1)},[a]);const g=()=>{const P=l.children.filter(v=>v.name==="Content");if(P.length>0){const v=P[0].children;f.current.length=0;for(const T of v)ye.fetchSimulationElements(T,f.current)}},A=()=>{d.current=[];for(const P of e)if(P.type===z.Human){const v=P;if(v.observer){const T=r(v),w=T?ye.absoluteHumanOrTreeCoordinates(v.cx,v.cy,v.cz,T):new ae(v.cx,v.cy,v.cz);w.z+=v.lz,d.current.push(new zBo(w,v))}}},y=()=>{if(Cn.getState().clearSolarPanelVisibilityResults(),A(),d.current.length!==0){g();for(const P of d.current){const v=new Map;for(const T of e)if(T.type===z.SolarPanel){const w=T;v.set(w.parentId,0)}for(const T of e)if(T.type===z.SolarPanel){const w=T;let x=v.get(w.parentId)??0;x+=S(w,P.position)*100,v.set(w.parentId,x)}Cn.getState().setSolarPanelVisibilityResult(P,v)}}},S=(P,v)=>{let T=r(P);if(!T)throw new Error("parent of solar panel does not exist");let w=!1;const x=P.parentType===z.Wall;if(T.type===z.Roof){if(T=i(T),!T)throw new Error("foundation of solar panel does not exist");w=!0}const b=x?ye.absoluteCoordinates(P.cx,P.cy,P.cz,T,i(P),P.lz):ye.absoluteCoordinates(P.cx,P.cy,P.cz,T,void 0,void 0,!0);w&&(b.z=P.cz+T.cz);const R=new ae().fromArray(P.normal);x&&R.applyEuler(new ln(0,0,T.relativeAngle));const H=T.rotation[2]+P.relativeAzimuth;Math.abs(P.tiltAngle)>.001&&R.applyEuler(new ln(P.tiltAngle,0,H,"ZYX"));const F=P.lx,E=P.ly*Math.cos(P.tiltAngle),N=P.ly*Math.abs(Math.sin(P.tiltAngle)),U=Math.max(2,Math.round(P.lx/u)),W=Math.max(2,Math.round(P.ly/u)),k=F/U,D=E/W,L=N/W,j=b.x-F/2,B=b.y-E/2,O=(w?b.z:P.poleHeight+b.z)-N/2,V=new Kt(b.x,b.y);let G=0;const Q=new ae,$=new ae;let ie;const q=new Kt,se=ye.isZero(H);for(let Z=0;Z0&&($.normalize(),C(P.id,Q,$)&&(G+=Math.abs($.dot(R))/(ie*ie)));return G*u*u/(4*Math.PI)},C=(P,v,T)=>{if(f.current.length>1){p.current.length=0,c.set(v,T);const w=f.current.filter(x=>x.uuid!==P);if(c.intersectObjects(w,!1,p.current),p.current.length===0)return!0;for(const[x,b]of p.current.entries())if(b.object.name.endsWith("eyeball")&&x===0)return!0;return!1}return!0};return h.jsx(h.Fragment,{})}),EBo=be.memo(({city:t})=>{const e=M(pn),n=dt(bh),o=M(oa),r=M.getState().world,i=M.getState().elements,a=M(Gr),l=M(yA),s=M(X7t),c=M(K7t),u=Cn(sxt),d=Cn(ixt),f=Cn(lxt),p=dt(vOe),g=dt(nxt),A=dt(xOe),y=dt(oxt),S=M(WBe),C=M(Hge),{scene:P}=ri(),v=$t(),T=u1(t),w=new Date(r.date),x=m.useMemo(()=>s(t??"Boston MA, USA"),[t]),b=m.useMemo(()=>c(t??"Boston MA, USA"),[t]),R=t?T==null?void 0:T.elevation:0,H=r.timesPerHour??4,F=60/H,E=m.useMemo(()=>new l0,[]),N=m.useRef([]),U=m.useRef([]),W=m.useRef(0),k=m.useRef(!1),D=m.useRef(new Date(r.date)),L=m.useRef(new Map),j=m.useRef(new Map),B=m.useRef(new Array(12).fill(0)),O=m.useRef(new Array(12).fill(0)),V=m.useRef(0),G=m.useRef(!1),Q=m.useRef(new Date(r.date)),$=m.useRef(0),ie=m.useMemo(()=>dl(w,r.latitude),[r.date,r.latitude]),q=m.useRef(ie);m.useEffect(()=>{if(p)if(C&&!ye.hasMovingParts(i))se();else return Z(),W.current=requestAnimationFrame(ee),()=>{cancelAnimationFrame(W.current),k.current||(gn(Y.t("message.SimulationAborted",v)),e(ve=>{ve.world.date=D.current.toLocaleString("en-US")}),dt.getState().set(ve=>{ve.simulationInProgress=!1,ve.simulationPaused=!1})),G.current=!1}},[p]),m.useEffect(()=>{G.current=g,g?(Q.current=new Date(w.getTime()),cancelAnimationFrame(W.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),ee())},[g]);const se=()=>{ue(),Te();for(const ve of i)ve.type===z.Sensor&&Re(ve);e(ve=>{ve.viewState.showDailyLightSensorPanel=!0,ve.selectedFloatingWindow="dailyLightSensorPanel"}),dt.getState().set(ve=>{ve.runDailyLightSensor=!1,ve.simulationInProgress=!1,ve.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),k.current=!0,te(),o&&e(ve=>{ve.actionInfo={name:"Static Daily Simulation for Sensors Completed",details:Cn.getState().dailyLightSensorData,timestamp:new Date().getTime()}})},Z=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(D.current=new Date(r.date),$.current=w.getDay(),w.setHours(Math.floor(ie.sunrise/60),-F/2)),k.current=!1,ue(),Te()},ee=()=>{if(p&&!G.current){if(w.getMinutes()+w.getHours()*60+(w.getDay()-$.current)*T2+F>=ie.sunset){cancelAnimationFrame(W.current),e(we=>{we.world.date=D.current.toLocaleString("en-US"),we.viewState.showDailyLightSensorPanel=!0,we.selectedFloatingWindow="dailyLightSensorPanel"}),dt.getState().set(we=>{we.runDailyLightSensor=!1,we.simulationInProgress=!1,we.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),k.current=!0,te(),o&&e(we=>{we.actionInfo={name:"Dynamic Daily Simulation for Sensors Completed",details:Cn.getState().dailyLightSensorData,timestamp:new Date().getTime()}});return}w.setHours(w.getHours(),w.getMinutes()+F),e(we=>{we.world.date=w.toLocaleString("en-US")});for(const we of i)we.type===z.Sensor&&Se(we);W.current=requestAnimationFrame(ee)}},te=()=>{const ve=De();for(const we of i)if(we.type===z.Sensor){const Pe=L.current.get(we.id);if(Pe)for(let Ie=0;Ie{var Me;const ve=new Map;let we=0;const Pe=[];for(const ze of i)if(ze.type===z.Sensor){const Ne=L.current.get(ze.id);Ne&&(ve.set("Radiation"+ ++we,Ne),Pe.push(ze.label?ze.label:"Radiation"+we))}const Ie=[];for(let ze=0;ze<24;ze++){const Ne={};Ne.Hour=ze;for(let Je=1;Je<=we;Je++){const Ue="Radiation"+Je;Ne[Pe[Je-1]]=(Me=ve.get(Ue))==null?void 0:Me[ze]}Ie.push(Ne)}d(Ie),u(Pe)};m.useEffect(()=>{if(A)if(C&&!ye.hasMovingParts(i))he();else return de(),W.current=requestAnimationFrame(pe),()=>{cancelAnimationFrame(W.current),k.current||(gn(Y.t("message.SimulationAborted",v)),e(ve=>{ve.world.date=D.current.toLocaleString("en-US")}),dt.getState().set(ve=>{ve.simulationInProgress=!1,ve.simulationPaused=!1})),G.current=!1}},[A]),m.useEffect(()=>{G.current=y,y?(Q.current=new Date(w.getTime()),cancelAnimationFrame(W.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),pe())},[y]);const de=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(D.current=new Date(r.date),V.current=0,w.setMonth(0,22),$.current=w.getDay(),q.current=dl(w,r.latitude),w.setHours(Math.floor(q.current.sunrise/60),-F/2),e(ve=>{ve.world.date=w.toLocaleString("en-US")})),k.current=!1,ue(),Te(),ge()},he=()=>{ue(),Te(),ge(),D.current=new Date(r.date),V.current=0;for(let ve=0;ve<12;ve++){w.setMonth(ve,22),q.current=dl(w,r.latitude),Te();for(const we of i)we.type===z.Sensor&&Re(we);me(),V.current++}e(ve=>{ve.world.date=D.current.toLocaleString("en-US"),ve.viewState.showYearlyLightSensorPanel=!0,ve.selectedFloatingWindow="yearlyLightSensorPanel"}),dt.getState().set(ve=>{ve.runYearlyLightSensor=!1,ve.simulationInProgress=!1,ve.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),k.current=!0,le(),o&&e(ve=>{ve.actionInfo={name:"Static Yearly Simulation for Sensors Completed",details:Cn.getState().yearlyLightSensorData,timestamp:new Date().getTime()}})},pe=()=>{if(A&&!G.current)if(w.getMinutes()+w.getHours()*60+(w.getDay()-$.current)*T2+F{we.world.date=w.toLocaleString("en-US")});for(const we of i)we.type===z.Sensor&&Se(we);W.current=requestAnimationFrame(pe)}else{if(me(),V.current++,V.current===12){cancelAnimationFrame(W.current),e(we=>{we.world.date=D.current.toLocaleString("en-US"),we.viewState.showYearlyLightSensorPanel=!0,we.selectedFloatingWindow="yearlyLightSensorPanel"}),dt.getState().set(we=>{we.runYearlyLightSensor=!1,we.simulationInProgress=!1,we.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),k.current=!0,le(),o&&e(we=>{we.actionInfo={name:"Dynamic Yearly Simulation for Sensors Completed",details:Cn.getState().yearlyLightSensorData,timestamp:new Date().getTime()}});return}w.setMonth(V.current,22),$.current=w.getDay(),q.current=dl(w,r.latitude),w.setHours(Math.floor(q.current.sunrise/60),-F/2),Te(),W.current=requestAnimationFrame(pe)}},me=()=>{const ve=Ae();for(const we of i)if(we.type===z.Sensor){const Pe=L.current.get(we.id);if(Pe){const Ie=j.current.get(we.id);if(Ie){const Me=Pe.reduce((ze,Ne)=>ze+Ne,0);Ie[V.current]+=Me*ve}}}S&&te()},le=()=>{const ve=[],we=[];let Pe=0,Ie=!1,Me=!1;for(const Ue of i)if(Ue.type===z.Sensor){const nt=j.current.get(Ue.id);nt&&(ve.push(nt),we.push(Ue.label?Ue.label:"Radiation"+ ++Pe),!Ie&&ye.isIdentical(Ue.normal,as)&&(Ie=!0),!Me&&ye.isIdentical(Ue.normal,cAt)&&(Me=!0))}const ze=Ie&&x;ze&&we.push("Measured (Hor.)");const Ne=Me&&b;Ne&&we.push("Measured (Ver.)");const Je=[];for(let Ue=0;Ue<12;Ue++){const nt={};nt.Month=zs[Ue];for(const[We,Ee]of ve.entries())nt.Daylight=B.current[Ue],nt.Clearness=O.current[Ue]*100,ze&&(nt["Measured (Hor.)"]=x.data[Ue]),Ne&&(nt["Measured (Ver.)"]=b.data[Ue]),nt[we[We]]=Ee[Ue];Je.push(nt)}f(Je),u(we)},Te=()=>{for(const ve of i)if(ve.type===z.Sensor){const we=L.current.get(ve.id);we?we.fill(0):L.current.set(ve.id,new Array(24).fill(0))}},ge=()=>{for(const ve of i)if(ve.type===z.Sensor){const we=j.current.get(ve.id);we?we.fill(0):j.current.set(ve.id,new Array(12).fill(0))}},Se=ve=>{const we=ki(w,r.latitude);if(we.z0&&(fe(ve.id,Me,we)||(nt+=Ue*Je));const We=L.current.get(ve.id);if(We){const Ee=w.getMinutes()>=30?w.getHours()+1===24?0:w.getHours()+1:w.getHours();We[Ee]+=nt}},Re=ve=>{const we=a(ve);if(!we)throw new Error("parent of sensor does not exist");const Pe=L.current.get(ve.id);if(!Pe)return;let Ie=null;we.type===z.Wall&&(Ie=l(ve));const Me=ye.absoluteCoordinates(ve.cx,ve.cy,ve.cz,we,Ie||void 0),ze=new ae().fromArray(ve.normal);ze.applyAxisAngle(ko,we.rotation[2]);const Ne=w.getFullYear(),Je=w.getMonth(),Ue=w.getDate(),nt=ye.dayOfYear(w);for(let We=0;We<24;We++)for(let Ee=0;Ee0){const st=vi(Oe,nt,R,li.SPHERE_MODEL),je=ze.dot(Oe);je>0&&(fe(ve.id,Me,Oe)||(Pe[We]+=je*st)),Pe[We]+=qr(r.ground,Je,ze,st)}}},De=()=>{const ve=ie.daylight()/60;return ve>Et?T.sunshineHours[w.getMonth()]/(30*ve*H):0},Ae=()=>{const ve=w.getMonth(),we=q.current.daylight()/60;return we>Et?(B.current[ve]=we,O.current[ve]=T.sunshineHours[ve]/(30*we),O.current[ve]/H):(B.current[ve]=0,O.current[ve]=0,0)},ue=()=>{const ve=P.children.filter(we=>we.name==="Content");if(ve.length>0){const we=ve[0].children;N.current.length=0;for(const Pe of we)ye.fetchSimulationElements(Pe,N.current)}},fe=(ve,we,Pe)=>{if(N.current.length>1){U.current.length=0,E.set(we,Pe);const Ie=N.current.filter(Me=>Me.uuid!==ve);return E.intersectObjects(Ie,!1,U.current),U.current.length>0}return!1};return h.jsx(h.Fragment,{})}),jFe=(t,e)=>{let n=e.efficiency;return e.cellType==="Monocrystalline"&&(n*=.95),n*(1+e.pmaxTC*(t-25))},FBo=be.memo(({city:t})=>{const e=M(pn),n=dt(bh),o=M(oa),r=M.getState().world,i=M.getState().elements,a=M(t5),l=M(Gr),s=M(yA),c=Cn(ivt),u=M(bW),d=Cn(lvt),f=M(SW),p=M(ZYe),g=M(eOe),A=Cn(svt),y=dt($Ye),S=dt(evt),C=dt(nvt),P=dt(QYe),v=dt(tvt),T=dt(ovt),w=M(NBe),x=M(Mge),b=M(pW)??900,R=dt(n5),{scene:H}=ri(),F=$t(),E=u1(t),N=new Date(r.date),U=t?E==null?void 0:E.elevation:0,W=r.timesPerHour??4,k=60/W,D=r.daysPerYear??6,L=12/D,j=m.useMemo(()=>new l0,[]),B=r.monthlyIrradianceLosses??new Array(12).fill(.05),O=r.pvGridCellSize??.25,V=m.useRef([]),G=m.useRef([]),Q=m.useRef(0),$=m.useRef(!1),ie=m.useRef(new Date(r.date)),q=m.useRef(new Map),se=m.useRef(new Map),Z=m.useRef(0),ee=m.useRef(!1),te=m.useRef(new Date(r.date)),oe=m.useRef(0),de=m.useRef(20),he=m.useMemo(()=>dl(N,r.latitude),[r.date,r.latitude]),pe=m.useRef(he),me=ye.daysInYear(N)/12;m.useEffect(()=>{if(y)if(x&&!ye.hasMovingParts(i))setTimeout(()=>{le(!1)},50);else return Te(),Q.current=requestAnimationFrame(ge),()=>{cancelAnimationFrame(Q.current),$.current||(gn(Y.t("message.SimulationAborted",F)),e(Ee=>{Ee.world.date=ie.current.toLocaleString("en-US")}),dt.getState().set(Ee=>{Ee.simulationInProgress=!1,Ee.simulationPaused=!1})),ee.current=!1}},[y]),m.useEffect(()=>{S&&x&&!ye.hasMovingParts(i)&&setTimeout(()=>{le(!0)},50)},[S]),m.useEffect(()=>{ee.current=C,C?(te.current=new Date(N.getTime()),cancelAnimationFrame(Q.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",F))):(n("simulationPaused",!1),ge())},[C]);const le=Ee=>{We(),Ie();for(const ke of i)ke.type===z.SolarPanel&&we(ke);if(e(ke=>{!R&&!Ee&&(ke.viewState.showDailyPvYieldPanel=!0,ke.selectedFloatingWindow="dailyPvYieldPanel")}),dt.getState().set(ke=>{Ee?ke.runDailySimulationForSolarPanelsLastStep=!1:ke.runDailySimulationForSolarPanels=!1,ke.simulationInProgress=!1,ke.simulationPaused=!1}),$.current=!0,Se(),!R&&!Ee&&(gn(Y.t("message.SimulationCompleted",F)),o)){const ke=Cn.getState().sumDailyPvYield(),Oe=Cn.getState().getDailyPvProfit(),st=Cn.getState().dailyPvYield;e(je=>{je.actionInfo={name:"Static Daily Simulation for Solar Panels Completed",result:{totalYield:ke.toFixed(2),profit:Oe.toFixed(2)},details:st,timestamp:new Date().getTime()}})}},Te=()=>{ee.current?(N.setTime(te.current.getTime()),ee.current=!1):(ie.current=new Date(r.date),oe.current=N.getDay(),N.setHours(Math.floor(he.sunrise/60),-k/2)),$.current=!1,We(),Ie()},ge=()=>{if(y&&!ee.current){if(N.getMinutes()+N.getHours()*60+(N.getDay()-oe.current)*T2+k>=he.sunset){if(cancelAnimationFrame(Q.current),e(ke=>{ke.world.date=ie.current.toLocaleString("en-US"),R||(ke.viewState.showDailyPvYieldPanel=!0,ke.selectedFloatingWindow="dailyPvYieldPanel")}),dt.getState().set(ke=>{ke.runDailySimulationForSolarPanels=!1,ke.simulationInProgress=!1,ke.simulationPaused=!1}),$.current=!0,Se(),!R&&(gn(Y.t("message.SimulationCompleted",F)),o)){const ke=Cn.getState().sumDailyPvYield(),Oe=Cn.getState().getDailyPvProfit(),st=Cn.getState().dailyPvYield;e(je=>{je.actionInfo={name:"Dynamic Daily Simulation for Solar Panels Completed",result:{totalYield:ke.toFixed(2),profit:Oe.toFixed(2)},details:st,timestamp:new Date().getTime()}})}return}N.setHours(N.getHours(),N.getMinutes()+k),e(ke=>{ke.world.date=N.toLocaleString("en-US")});for(const ke of i)ke.type===z.SolarPanel&&Pe(ke);Q.current=requestAnimationFrame(ge)}},Se=()=>{const Ee=ze();for(const ke of i)if(ke.type===z.SolarPanel){const Oe=ke,st=q.current.get(ke.id);if(st){const je=Je(Oe)*Ee;for(let xt=0;xt{var Ee;if(p){const ke=new Array(24).fill(0),Oe=new Map;let st=0;const je=[];for(const gt of i)if(gt.type===z.SolarPanel){const Ye=q.current.get(gt.id);if(Ye){u(gt.id,Ye.reduce((it,ut)=>it+ut,0)),st++,Oe.set("Panel"+st,Ye),je.push(gt.label?gt.label:"Panel"+st);for(let it=0;it<24;it++)ke[it]+=Ye[it]}}const xt=[];for(let gt=0;gt<24;gt++){const Ye={};Ye.Hour=gt;for(let it=1;it<=st;it++){const ut="Panel"+it;Ye[je[it-1]]=(Ee=Oe.get(ut))==null?void 0:Ee[gt]}xt.push(Ye)}c(xt),A(je)}else{const ke=new Array(24).fill(0);for(const st of i)if(st.type===z.SolarPanel){const je=q.current.get(st.id);if(je){u(st.id,je.reduce((xt,gt)=>xt+gt,0));for(let xt=0;xt<24;xt++)ke[xt]+=je[xt]}}const Oe=[];for(let st=0;st<24;st++)Oe.push({Hour:st,Total:ke[st]});c(Oe)}};m.useEffect(()=>{if(P)if(x&&!ye.hasMovingParts(i))setTimeout(()=>{Ae(!1)},50);else return De(),Q.current=requestAnimationFrame(ue),()=>{cancelAnimationFrame(Q.current),$.current||(gn(Y.t("message.SimulationAborted",F)),e(Ee=>{Ee.world.date=ie.current.toLocaleString("en-US")}),dt.getState().set(Ee=>{Ee.simulationInProgress=!1,Ee.simulationPaused=!1})),ee.current=!1}},[P]),m.useEffect(()=>{v&&x&&!ye.hasMovingParts(i)&&setTimeout(()=>{Ae(!0)},50)},[v]),m.useEffect(()=>{ee.current=T,T?(te.current=new Date(N.getTime()),cancelAnimationFrame(Q.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",F))):(n("simulationPaused",!1),ue())},[T]);const De=()=>{ee.current?(N.setTime(te.current.getTime()),ee.current=!1):(ie.current=new Date(r.date),Z.current=0,N.setMonth(0,22),oe.current=N.getDay(),pe.current=dl(N,r.latitude),N.setHours(Math.floor(pe.current.sunrise/60),-k/2),e(Ee=>{Ee.world.date=N.toLocaleString("en-US")})),$.current=!1,We(),Ie(),Me()},Ae=Ee=>{We(),Ie(),Me(),ie.current=new Date(r.date),Z.current=0;for(let ke=0;ke<12;ke+=L){N.setMonth(ke,22),pe.current=dl(N,r.latitude),Ie();for(const Oe of i)Oe.type===z.SolarPanel&&we(Oe);fe(),Z.current++}if(e(ke=>{ke.world.date=ie.current.toLocaleString("en-US"),!R&&!Ee&&(ke.viewState.showYearlyPvYieldPanel=!0,ke.selectedFloatingWindow="yearlyPvYieldPanel")}),dt.getState().set(ke=>{Ee?ke.runYearlySimulationForSolarPanelsLastStep=!1:ke.runYearlySimulationForSolarPanels=!1,ke.simulationInProgress=!1,ke.simulationPaused=!1}),$.current=!0,ve(),!R&&!Ee&&(gn(Y.t("message.SimulationCompleted",F)),o)){const ke=Cn.getState().sumYearlyPvYield(),Oe=Cn.getState().getYearlyPvProfit(),st=Cn.getState().yearlyPvYield;e(je=>{je.actionInfo={name:"Static Yearly Simulation for Solar Panels Completed",result:{totalYield:ke.toFixed(2),profit:Oe.toFixed(2)},details:st,timestamp:new Date().getTime()}})}},ue=()=>{if(P&&!ee.current)if(N.getMinutes()+N.getHours()*60+(N.getDay()-oe.current)*T2+k{ke.world.date=N.toLocaleString("en-US")});for(const ke of i)ke.type===z.SolarPanel&&Pe(ke);Q.current=requestAnimationFrame(ue)}else{if(fe(),Z.current++,Z.current===D){if(cancelAnimationFrame(Q.current),e(ke=>{ke.world.date=ie.current.toLocaleString("en-US"),R||(ke.viewState.showYearlyPvYieldPanel=!0,ke.selectedFloatingWindow="yearlyPvYieldPanel")}),dt.getState().set(ke=>{ke.runYearlySimulationForSolarPanels=!1,ke.simulationInProgress=!1,ke.simulationPaused=!1}),$.current=!0,ve(),!R&&(gn(Y.t("message.SimulationCompleted",F)),o)){const ke=Cn.getState().sumYearlyPvYield(),Oe=Cn.getState().getYearlyPvProfit(),st=Cn.getState().yearlyPvYield;e(je=>{je.actionInfo={name:"Dynamic Yearly Simulation for Solar Panels Completed",result:{totalYield:ke.toFixed(2),profit:Oe.toFixed(2)},details:st,timestamp:new Date().getTime()}})}return}N.setMonth(Z.current*L,22),oe.current=N.getDay(),pe.current=dl(N,r.latitude),N.setHours(Math.floor(pe.current.sunrise/60),-k/2),Ie(),Q.current=requestAnimationFrame(ue)}},fe=()=>{const Ee=Ne();for(const ke of i)if(ke.type===z.SolarPanel){const Oe=ke,st=q.current.get(ke.id);if(st){const je=se.current.get(ke.id);if(je){const xt=st.reduce((gt,Ye)=>gt+Ye,0);je[Z.current]+=xt*Ee*Je(Oe)}}}!R&&w&&Se()},ve=()=>{if(g){const Ee=[],ke=[];let Oe=0;for(const je of i)if(je.type===z.SolarPanel){const xt=se.current.get(je.id);xt&&(f(je.id,xt.reduce((gt,Ye)=>gt+Ye,0)*L*me),Ee.push(xt),Oe++,ke.push(je.label??"Panel"+Oe))}const st=[];for(let je=0;je<12;je+=L){const xt={};xt.Month=zs[je];for(const[gt,Ye]of Ee.entries())xt[ke[gt]]=Ye[je/L]*me;st.push(xt)}d(st),A(ke)}else{const Ee=[];for(const Oe of i)if(Oe.type===z.SolarPanel){const st=se.current.get(Oe.id);st&&(f(Oe.id,st.reduce((je,xt)=>je+xt,0)*L*me),Ee.push(st))}const ke=[];for(let Oe=0;Oe<12;Oe+=L){let st=0;for(const je of Ee)st+=je[Oe/L];ke.push({Month:zs[Oe],Total:st*me})}d(ke)}},we=Ee=>{if(Ee.trackerType!==Ll.NO_TRACKER)throw new Error("static simulation is not for solar panel with tracker");let ke=l(Ee);if(!ke)throw new Error("parent of solar panel does not exist");const Oe=Ee.parentType===z.Roof,st=Ee.parentType===z.Wall;if(Oe&&(ke=s(ke),!ke))throw new Error("foundation of solar panel does not exist");const je=a(Ee.pvModelName);if(!je)throw new Error("PV model not found");const xt=q.current.get(Ee.id);if(!xt)return;const gt=st?ye.absoluteCoordinates(Ee.cx,Ee.cy,Ee.cz,ke,s(Ee),Ee.lz):ye.absoluteCoordinates(Ee.cx,Ee.cy,Ee.cz,ke,void 0,void 0,!0),Ye=ke.rotation[2];let it=Ye+Ee.relativeAzimuth,ut=Ee.tiltAngle,Qe=!0;if(Oe&&(gt.z=Ee.cz+Ee.lz+.02+ke.cz,ye.isZero(Ee.rotation[0])?gt.z+=Ee.poleHeight:(ut=Ee.rotation[0],it=Ye,Qe=!1)),st&&!ye.isZero(Ee.tiltAngle)){const at=ke,Ge=s(ke),Pt=(Ge?Ge.rotation[2]+at.relativeAngle:at.relativeAngle)-Qt,ot=Ee.ly*Math.abs(Math.sin(Ee.tiltAngle))/2;gt.x+=ot*Math.cos(Pt),gt.y+=ot*Math.sin(Pt)}const lt=new ae().fromArray(Ee.normal),Ze=new ln(Oe&&!Qe?0:ut,0,it,"ZYX");lt.applyEuler(Ze);const Be=N.getFullYear(),$e=N.getMonth(),wt=N.getDate(),vt=ye.dayOfYear(N);let Rt,Gt,At,pt,Wt;r.discretization===Em.EXACT?(Rt=Ee.lx,Gt=Ee.ly,Ee.orientation===vr.portrait?(At=Math.max(1,Math.round(Ee.lx/je.width)),pt=Math.max(1,Math.round(Ee.ly/je.length)),At*=je.n,pt*=je.m):(At=Math.max(1,Math.round(Ee.lx/je.length)),pt=Math.max(1,Math.round(Ee.ly/je.width)),At*=je.m,pt*=je.n),Wt=Ee.lx/At):(Rt=Ee.lx,Gt=Ee.ly,At=Math.max(2,Math.round(Ee.lx/O)),pt=Math.max(2,Math.round(Ee.ly/O)),At%2!==0&&(At+=1),pt%2!==0&&(pt+=1),Wt=O);const ht=Rt/At,ct=Gt/pt,It=gt.x-(Rt-Wt)/2,Ft=gt.y-(Gt-Wt)/2,Ve=Oe||st?gt.z:ke.lz+Ee.poleHeight+Ee.lz,ft=new Kt(gt.x,gt.y),kt=new ae,rt=Array.from(Array(At),()=>new Array(pt));Oe&&!Qe&&(Ze.x=Ee.rotation[0],Ze.z=Ee.rotation[2]+Ye),st&&(Ze.x=Qt+Ee.tiltAngle,Ze.z=ke.relativeAngle+Ye);for(let at=0;at<24;at++)for(let Ge=0;Ge0){const ot=vi(Pt,vt,U,li.SPHERE_MODEL),bt=qr(r.ground,$e,lt,ot),zt=lt.dot(Pt),Bt=new Kt,tt=new ae;if(je.bifacialityFactor>0){const qt=lt.clone().negate(),un=qr(r.ground,$e,qt,ot),Rn=bt+un*je.bifacialityFactor;for(let yo=0;yo0?zt:-zt*je.bifacialityFactor)*ot)}else for(let qt=0;qt0&&(Bt.set(It+qt*ht,Ft+un*ct),tt.set(Bt.x-ft.x,Bt.y-ft.y,0),tt.applyEuler(Ze),kt.set(gt.x+tt.x,gt.y+tt.y,Ve+tt.z),nt(Ee.id,kt,Pt)||(rt[qt][un]+=zt*ot));let Ht=0;Ue(yt);const _t=jFe(de.current,je);switch(je.shadeTolerance){case m8.NONE:{let qt=Number.MAX_VALUE;for(let un=0;un{let ke=l(Ee);if(!ke)throw new Error("parent of solar panel does not exist");const Oe=Ee.parentType===z.Roof,st=Ee.parentType===z.Wall;if(Oe&&(ke=s(ke),!ke))throw new Error("foundation of solar panel does not exist");const je=a(Ee.pvModelName);if(!je)throw new Error("PV model not found");const xt=ki(N,r.latitude);if(xt.z<=0)return;const gt=st?ye.absoluteCoordinates(Ee.cx,Ee.cy,Ee.cz,ke,s(Ee),Ee.lz):ye.absoluteCoordinates(Ee.cx,Ee.cy,Ee.cz,ke,void 0,void 0,!0),Ye=ke.rotation[2];let it=Ee.tiltAngle,ut=Ye+(st?0:Ee.relativeAzimuth),Qe=!0;if(Oe&&(gt.z=Ee.cz+Ee.lz+.02+ke.cz,ye.isZero(Ee.rotation[0])?gt.z+=Ee.poleHeight:(it=Ee.rotation[0],ut=Ye,Qe=!1)),st&&!ye.isZero(Ee.tiltAngle)){const bt=ke,zt=s(ke),tt=(zt?zt.rotation[2]+bt.relativeAngle:bt.relativeAngle)-Qt,Ht=Ee.ly*Math.abs(Math.sin(Ee.tiltAngle))/2;gt.x+=Ht*Math.cos(tt),gt.y+=Ht*Math.sin(tt)}const lt=new ae().fromArray(Ee.normal),Ze=N.getMonth(),Be=ye.dayOfYear(N);let $e,wt,vt,Rt,Gt;r.discretization===Em.EXACT?($e=Ee.lx,wt=Ee.ly,Ee.orientation===vr.portrait?(vt=Math.max(1,Math.round(Ee.lx/je.width)),Rt=Math.max(1,Math.round(Ee.ly/je.length)),vt*=je.n,Rt*=je.m):(vt=Math.max(1,Math.round(Ee.lx/je.length)),Rt=Math.max(1,Math.round(Ee.ly/je.width)),vt*=je.m,Rt*=je.n),Gt=Ee.lx/vt):($e=Ee.lx,wt=Ee.ly,vt=Math.max(2,Math.round(Ee.lx/O)),Rt=Math.max(2,Math.round(Ee.ly/O)),vt%2!==0&&(vt+=1),Rt%2!==0&&(Rt+=1),Gt=O);const At=$e/vt,pt=wt/Rt,Wt=gt.x-($e-Gt)/2,ht=gt.y-(wt-Gt)/2,ct=Oe||st?gt.z:ke.lz+Ee.poleHeight+Ee.lz,It=new Kt(gt.x,gt.y),Ft=new ae,Ve=Array.from(Array(vt),()=>new Array(Rt));let ft=new ln(Oe&&!Qe?0:it,0,ut,"ZYX");if(Ee.trackerType!==Ll.NO_TRACKER){const bt=Ye?xt.clone().applyAxisAngle(ko,-Ye):xt.clone();switch(Ee.trackerType){case Ll.ALTAZIMUTH_DUAL_AXIS_TRACKER:{const zt=new Ts().setFromUnitVectors(ko,bt);ft=new ln().setFromQuaternion(zt),ft.z+=ut;break}case Ll.HORIZONTAL_SINGLE_AXIS_TRACKER:{const zt=new Ts().setFromUnitVectors(ko,new ae(bt.x,0,bt.z).normalize());ft=new ln().setFromQuaternion(zt),ft.z+=ut;break}case Ll.VERTICAL_SINGLE_AXIS_TRACKER:{const zt=new ae(bt.x,-bt.y,0).normalize(),Bt=Math.acos(Yc.dot(zt))*Math.sign(zt.x);ft=new ln(Ee.tiltAngle,0,Bt+Ye,"ZYX");break}case Ll.TILTED_SINGLE_AXIS_TRACKER:break}}if(st&<.applyEuler(new ln(0,0,ke.relativeAngle)),lt.applyEuler(ft),Oe&&!Qe&&(ft.x=Ee.rotation[0],ft.z=Ee.rotation[2]+Ye),st){const bt=l(Ee);bt&&(ft.x=Qt+Ee.tiltAngle,ft.z=ke.relativeAngle+bt.rotation[2])}const kt=vi(xt,Be,U,li.SPHERE_MODEL),rt=qr(r.ground,Ze,lt,kt),at=lt.dot(xt),Ge=new Kt,yt=new ae;if(je.bifacialityFactor>0){const bt=lt.clone().negate(),zt=qr(r.ground,Ze,bt,kt),Bt=rt+zt*je.bifacialityFactor;for(let tt=0;tt0?at:-at*je.bifacialityFactor)*kt)}else for(let bt=0;bt0&&(Ge.set(Wt+bt*At,ht+zt*pt),yt.set(Ge.x-It.x,Ge.y-It.y,0),yt.applyEuler(ft),Ft.set(gt.x+yt.x,gt.y+yt.y,ct+yt.z),nt(Ee.id,Ft,xt)||(Ve[bt][zt]+=at*kt));let Pt=0;switch(je.shadeTolerance){case m8.NONE:{let bt=Number.MAX_VALUE;for(let zt=0;zt=30?N.getHours()+1===24?0:N.getHours()+1:N.getHours();ot[zt]+=bt*Pt/(vt*Rt)}},Ie=()=>{for(const Ee of i)if(Ee.type===z.SolarPanel){const ke=q.current.get(Ee.id);ke?ke.fill(0):q.current.set(Ee.id,new Array(24).fill(0))}},Me=()=>{for(const Ee of i)if(Ee.type===z.SolarPanel){const ke=se.current.get(Ee.id);ke&&ke.length===D?ke.fill(0):se.current.set(Ee.id,new Array(D).fill(0))}},ze=()=>{const Ee=he.daylight()/60;return Ee>Et?E.sunshineHours[N.getMonth()]/(30*Ee*W):0},Ne=()=>{const Ee=pe.current.daylight()/60;return Ee>Et?E.sunshineHours[N.getMonth()]/(30*Ee*W):0},Je=Ee=>{if(!a(Ee.pvModelName))throw new Error("PV model not found");return Ee.lx*Ee.ly*(Ee.inverterEfficiency??.95)*(1-B[N.getMonth()])},Ue=Ee=>{if(E){const ke=rb(Ee,E.lowestTemperatures,E.highestTemperatures);de.current=ob(ke.high,ke.low,r.diurnalTemperatureModel,b,dl(Ee,r.latitude),ye.minutesIntoDay(Ee))}},nt=(Ee,ke,Oe)=>{if(V.current.length>1){G.current.length=0,j.set(ke,Oe);const st=V.current.filter(je=>je.uuid!==Ee);return j.intersectObjects(st,!1,G.current),G.current.length>0}return!1},We=()=>{const Ee=H.children.filter(ke=>ke.name==="Content");if(Ee.length>0){const ke=Ee[0].children;V.current.length=0;for(const Oe of ke)ye.fetchSimulationElements(Oe,V.current)}};return h.jsx(h.Fragment,{})}),kBo=be.memo(()=>{const t=M(s0),e=M(Mb),n=M(qYe),o=M(KYe),r=M(Jge),[i,a]=m.useState("Boston MA, USA");return m.useEffect(()=>{if(Object.keys(r).length===0)return;const l=n(t,e)??"Boston MA, USA";a(l),o(l)},[t,e,r]),h.jsxs(h.Fragment,{children:[h.jsx(SBo,{city:i}),h.jsx(TBo,{city:i}),h.jsx(PBo,{city:i}),h.jsx(EBo,{city:i}),h.jsx(FBo,{city:i}),h.jsx(DBo,{}),h.jsx(CBo,{city:i}),h.jsx(RBo,{city:i}),h.jsx(HBo,{city:i}),h.jsx(MBo,{city:i}),h.jsx(IBo,{city:i})]})}),pV="/aladdin/assets/image_fail_try_again-CaxVXMjm.png";var GL=(t=>(t[t.None=0]="None",t[t.Equal=1]="Equal",t[t.LessThan=2]="LessThan",t[t.GreaterThan=3]="GreaterThan",t[t.Between=4]="Between",t))(GL||{});const LBo=5,WBo=be.memo(({yScale:t,tickLength:e,tickIntegers:n,variable:o,name:r,unit:i,type:a,digits:l,min:s,max:c,step:u,value:d,filter:f,hover:p})=>{const g=M(pn),A=M(yp),y=M(En),S=M(m0),C=M(XYe),P=M(Xge),v=M(JYe),T=M(oa),[w,x]=m.useState(!1),b=m.useRef(s),R=m.useRef(c);m.useEffect(()=>{b.current=s},[s]),m.useEffect(()=>{R.current=c},[c]);const H={lng:S},F=A.uid===C,E=t.range(),N=t(s)-t(c),U=40,W=m.useMemo(()=>{const Z=E[0]-E[1],ee=a==="number"?Math.floor(Z/e):1;return(n?t.ticks(ee).filter(oe=>Number.isInteger(oe)):t.ticks(ee)).map(oe=>({value:oe,yOffset:t(oe)}))},[t,e,a,n,E]),k=()=>{g(Z=>{Z.projectState.selectedProperty=Z.projectState.selectedProperty!==o?o:null,T&&(Z.actionInfo={name:"Select Property",timestamp:new Date().getTime(),details:Z.projectState.selectedProperty})}),dt.getState().set(Z=>{Z.updateProjectsFlag=!0})},D=()=>{F&&C&&P?KGn(C,P,v!==o?o:null).then(()=>{k()}):k()},L=(Z,ee)=>h.jsx("span",{style:{display:"block",width:ee+"px"},children:Z}),j=()=>h.jsx("text",{onClick:D,x:0,y:-20,style:{fontSize:"10px",textAnchor:"middle",fill:"dimgray",cursor:"pointer",fontWeight:v===o?"bold":"normal"},children:r}),B=m.useMemo(()=>o==="yearlyProfit"||o==="unitCost"||o==="sellingPrice"||o==="totalYearlyCost",[o]),O=()=>o==="totalYearlyCost"||o==="totalYearlyYield"||o==="meanYearlyYield"||o==="unitCost"||o==="poleHeight"||o==="interRowSpacing"?0:o==="tiltAngle"||o==="latitude"?-90:o==="rowWidth"?1:Number.MIN_SAFE_INTEGER,V=()=>o==="tiltAngle"||o==="latitude"?90:Number.MAX_SAFE_INTEGER,G=Z=>{if(Z===null)return;const ee=b.current,te={name:"Set Minimum: "+r,timestamp:Date.now(),oldValue:ee,newValue:Z,undo:()=>{Q(ee)},redo:()=>{Q(Z)}};y(te),Q(Z)},Q=Z=>{g(ee=>{if(ee.projectState.ranges){let te=-1,oe=null;for(const[de,he]of ee.projectState.ranges.entries())if(he.variable===o){te=de,oe=he;break}if(te>=0&&oe)ee.projectState.ranges[te]={variable:oe.variable,minimum:Z,maximum:oe.maximum},A.uid&&ee.projectState.title&&YCe(A.uid,ee.projectState.title,ee.projectState.ranges).then(()=>{});else{const de={variable:o,minimum:Z,maximum:c};ee.projectState.ranges.push(de),A.uid&&ee.projectState.title&&NO(A.uid,ee.projectState.title,de).then(()=>{})}}else{const te={variable:o,minimum:Z,maximum:c};ee.projectState.ranges=[te],A.uid&&ee.projectState.title&&NO(A.uid,ee.projectState.title,te).then(()=>{})}}),b.current=Number(Z),x(!w)},$=Z=>{if(Z===null)return;const ee=R.current,te={name:"Set Maximum: "+r,timestamp:Date.now(),oldValue:ee,newValue:Z,undo:()=>{ie(ee)},redo:()=>{ie(Z)}};y(te),ie(Z)},ie=Z=>{g(ee=>{if(ee.projectState.ranges){let te=-1,oe=null;for(const[de,he]of ee.projectState.ranges.entries())if(he.variable===o){te=de,oe=he;break}if(te>=0&&oe)ee.projectState.ranges[te]={variable:oe.variable,minimum:oe.minimum,maximum:Z},A.uid&&ee.projectState.title&&YCe(A.uid,ee.projectState.title,ee.projectState.ranges).then(()=>{});else{const de={variable:o,minimum:s,maximum:Z};ee.projectState.ranges.push(de),A.uid&&ee.projectState.title&&NO(A.uid,ee.projectState.title,de).then(()=>{})}}else{const te={variable:o,minimum:s,maximum:Z};ee.projectState.ranges=[te],A.uid&&ee.projectState.title&&NO(A.uid,ee.projectState.title,te).then(()=>{})}}),R.current=Number(Z),x(!w)},q=Z=>{if(!f)return;const ee=[f.lowerBound,f.upperBound],te={name:"Set Filter: "+r,timestamp:Date.now(),oldValue:ee,newValue:Z,undo:()=>{se(ee)},redo:()=>{se(Z)}};y(te),se(Z)},se=Z=>{f&&(f.lowerBound=Z[0],f.upperBound=Z[1],p&&p(-1),g(ee=>{if(ee.projectState.filters){let te=-1;for(const[oe,de]of ee.projectState.filters.entries())if(de.variable===o){te=oe;break}if(te>=0)ee.projectState.filters[te]={variable:f.variable,type:f.type,lowerBound:f.lowerBound,upperBound:f.upperBound};else{const oe={variable:o,type:f.type,lowerBound:f.lowerBound,upperBound:f.upperBound};ee.projectState.filters.push(oe)}}}),x(!w))};return h.jsxs(h.Fragment,{children:[o!=="orientation"?h.jsx(Ml,{content:h.jsxs("div",{children:[h.jsx(Sn,{style:{width:"240px"},addonBefore:L(Y.t("word.Minimum",H)+(B?" $":""),80),addonAfter:i,min:O(),max:R.current-u,step:u,value:b.current,onPressEnter:Z=>G(Number.parseFloat(Z.target.value)),onStep:Z=>G(Z)}),h.jsx("br",{}),h.jsx(Sn,{style:{width:"240px"},addonBefore:L(Y.t("word.Maximum",H)+(B?" $":""),80),addonAfter:i,min:b.current+u,max:V(),step:u,value:R.current,onPressEnter:Z=>$(Number.parseFloat(Z.target.value)),onStep:Z=>$(Z)})]}),children:j()}):h.jsx(h.Fragment,{children:j()}),d!==void 0&&h.jsx("text",{x:0,y:-8,style:{fontSize:"9px",textAnchor:"middle",fill:"dimgray"},children:B?d.toLocaleString("en-US",{style:"currency",currency:"USD",maximumFractionDigits:l})+(o==="yearlyProfit"||o==="totalYearlyCost"?"K":""):(o==="orientation"?Y.t(d===0?"solarPanelMenu.Landscape":"solarPanelMenu.Portrait",H)+(d===0?" (▭)":" (▯)"):d.toFixed(l))+(i!==""?i:"")}),f&&f.type===GL.Between&&h.jsx("rect",{x:-5,y:t(f.upperBound??c),width:10,height:t((f==null?void 0:f.lowerBound)??s)-t((f==null?void 0:f.upperBound)??c),fill:"lightgray"}),h.jsx("rect",{x:-U/2,y:0,width:U,height:N,fill:"gold",fillOpacity:v===o?.25:0}),W.map(({value:Z,yOffset:ee})=>h.jsxs("g",{transform:`translate(0, ${ee})`,shapeRendering:"crispEdges",children:[h.jsx("line",{x1:-LBo,x2:0,stroke:"black",strokeWidth:1}),h.jsx("text",{style:{fontSize:"10px",textAnchor:"start",alignmentBaseline:"central",transform:"translateX(-25px)"},children:o==="orientation"?Z===0?"▭":"▯":Z},Z)]},Z)),h.jsx("line",{x1:0,x2:0,y1:t(s),y2:t(c),stroke:"black",strokeWidth:2}),f&&f.type===GL.Between&&h.jsx("foreignObject",{x:-U/2,y:4,width:U,height:N-3,children:h.jsx(fy,{theme:{components:{Slider:{railBg:"black",railSize:0,handleSize:8}}},children:h.jsx(Iu,{style:{marginLeft:U/2+"px"},min:s,max:c,step:(c-s)/100,value:[f.lowerBound??s,f.upperBound??c],onChange:Z=>se(Z),onChangeComplete:Z=>q(Z),range:!0,vertical:!0})})})]})}),lP={top:30,right:55,bottom:36,left:55},NBo=["#e0ac2b","#e85252","#6689c6","#9a6fb0","#a53253","#69b3a2","#556b2f","#8b008b","#ff1493","#d2691e","#2f4f4f","#dc143c"],UBo=be.memo(({id:t,width:e,height:n,data:o,types:r,minima:i,maxima:a,filters:l,steps:s,variables:c,titles:u,units:d,digits:f,tickIntegers:p,hover:g,hoveredIndex:A,selectedIndex:y})=>{const S=e-lP.right-lP.left,C=n-lP.top-lP.bottom,P=m.useMemo(()=>[...new Set(o.map(H=>H.group))],[o]),v=m.useMemo(()=>YC().range([0,S]).domain(c).padding(0),[c,S]),T=m.useMemo(()=>{const H={};return c.forEach((F,E)=>{H[F]=mL().range([C,0]).domain([i[E]??0,a[E]??1])}),H},[c,i,a,C]),w=m.useMemo(()=>nte().domain(P).range(NBo),[P]),x=I3e(),b=m.useMemo(()=>o.map((H,F)=>{if(H.invisible)return null;const E=c.map(U=>{const W=T[U],k=v(U)??0,D=W(H[U]);return[k,D]}),N=x(E);if(N)return h.jsx("path",{onMouseOver:()=>{g(F)},d:N,stroke:H.hovered?"red":w(H.group),fill:"none",strokeWidth:H.excluded?.25:H.selected?3:1,strokeDasharray:H.hovered?"3,3":"none"},F)}),[o,c,v,T,w]),R=m.useMemo(()=>c.map((H,F)=>{const E=T[H];return h.jsx("g",{transform:"translate("+v(H)+",0)",children:h.jsx(WBo,{yScale:E,tickLength:40,tickIntegers:p[F],type:r[F]??"number",variable:c[F],name:u[F],unit:d[F],digits:f[F],min:i[F],max:a[F],step:s[F],value:A>=0&&!o[A].invisible?o[A][H]:y>=0&&!o[y].invisible?o[y][H]:void 0,filter:l[F],hover:g})},F)}),[c,o,v,T,p,r,u,d,f,i,a,s,l,y,A]);return h.jsx("svg",{id:t,width:e,height:n,onMouseLeave:()=>{g&&g(-1)},onContextMenu:H=>{H.stopPropagation()},children:h.jsxs("g",{width:S,height:C,transform:`translate(${[lP.left,lP.top].join(",")})`,children:[b,R]})})});var vpe={};(function(t){(function(){var e=t||!1||this||window;e.default=e;var n="http://www.w3.org/2000/xmlns/",o="http://www.w3.org/1999/xhtml",r="http://www.w3.org/2000/svg",i=']>',a=/url\(["']?(.+?)["']?\)/,l={woff2:"font/woff2",woff:"font/woff",otf:"application/x-font-opentype",ttf:"application/x-font-ttf",eot:"application/vnd.ms-fontobject",sfnt:"application/font-sfnt",svg:"image/svg+xml"},s=function(E){return E instanceof HTMLElement||E instanceof SVGElement},c=function(E){if(!s(E))throw new Error("an HTMLElement or SVGElement is required; got "+E)},u=function(E){return new Promise(function(N,U){s(E)?N(E):U(new Error("an HTMLElement or SVGElement is required; got "+E))})},d=function(E){return E&&E.lastIndexOf("http",0)===0&&E.lastIndexOf(window.location.host)===-1},f=function(E){var N=Object.keys(l).filter(function(U){return E.indexOf("."+U)>0}).map(function(U){return l[U]});return N?N[0]:(console.error("Unknown font format for "+E+". Fonts may not be working correctly."),"application/octet-stream")},p=function(E){for(var N="",U=new Uint8Array(E),W=0;W"u"||W===null||isNaN(parseFloat(W))?0:W},A=function(E,N,U,W){if(E.tagName==="svg")return{width:U||g(E,N,"width"),height:W||g(E,N,"height")};if(E.getBBox){var k=E.getBBox(),D=k.x,L=k.y,j=k.width,B=k.height;return{width:D+j,height:L+B}}},y=function(E){return decodeURIComponent(encodeURIComponent(E).replace(/%([0-9A-F]{2})/g,function(N,U){var W=String.fromCharCode("0x"+U);return W==="%"?"%25":W}))},S=function(E){for(var N=window.atob(E.split(",")[1]),U=E.split(",")[0].split(":")[1].split(";")[0],W=new ArrayBuffer(N.length),k=new Uint8Array(W),D=0;D{const e=M.getState().world,n=M(oa),o=M(hu)??g0,r=M(pn),i=M(RW),a=new Date(M(Al)),l=M(J4t),s=dt(zge),c=dt(Xq),u=dt(Lwt),d=dt(Cf),f=ye.hasSolarPanels(M.getState().elements),p=Cn(nOe),g=Cn(oOe),A=Cn(rOe),y=M(Sc),S=m.useRef(null),C=m.useRef(),P=S.current?S.current.clientWidth+40:l?l.width+40:640,v=S.current?S.current.clientHeight+100:l?l.height+100:600,[T,w]=m.useState({x:l?Math.max(l.x,P-window.innerWidth):0,y:l?Math.min(l.y,window.innerHeight-v):0}),x=be.useRef(null),b=$t(),R=u1(t),H=zs[a.getMonth()],F=e.daysPerYear??6,E=12/F,[N,U]=m.useState(0),[W,k]=m.useState(0),[D,L]=m.useState(0),[j,B]=m.useState(0),[O,V]=m.useState(["Heater","AC","Solar","Net"]),[G,Q]=m.useState([]),{sum:$,sumHeaterMap:ie,sumAcMap:q,sumSolarPanelMap:se,dataLabels:Z}=p0t(a,R,f),ee=m.useRef(new Array(F).fill({})),te=m.useRef(new Array(F).fill(0)),oe=m.useRef(new Array(F).fill(0)),de=m.useRef(new Array(F).fill(0)),he=m.useRef(new Array(F).fill(0)),pe=m.useRef([]),me=m.useRef([]),le=m.useRef([]),Te=m.useRef([]);m.useEffect(()=>{ge()},[F,u]),m.useEffect(()=>{c&&ge()},[c]);const ge=()=>{ee.current=new Array(F).fill({}),te.current=new Array(F).fill(0),oe.current=new Array(F).fill(0),de.current=new Array(F).fill(0),he.current=new Array(F).fill(0),Q([]),U(0),k(0),L(0),B(0),V([])};m.useEffect(()=>{const ve=Math.floor(a.getMonth()/E),we=(Object.keys($[0]).length-1)/(f?4:3);if(pe.current=[],me.current=[],Te.current=[],le.current=[],we>1){const Ue=new Map,nt=new Map,We=new Map,Ee=new Map;for(const je of $){let xt=0;for(let gt=0;gt6&&(Ee=" "+je.substring(6).trim());break}const ke="Heater"+Ee,Oe="AC"+Ee,st="Net"+Ee;if(f){const je="Solar"+Ee;let xt=0;V([ke,Oe,je,st]);for(const Ye of $)Ue+=Ye[ke],nt+=Ye[Oe],xt+=Ye[je],We+=Ye[st];const gt={};gt.Month=zs[a.getMonth()],gt[ke]=30*Ue,gt[Oe]=30*nt,gt[je]=30*xt,gt[st]=30*We,ee.current[ve]=gt}else{V([ke,Oe,st]);for(const xt of $)Ue+=xt[ke],nt+=xt[Oe],We+=xt[st];const je={};je.Month=zs[a.getMonth()],je[ke]=30*Ue,je[Oe]=30*nt,je[st]=30*We,ee.current[ve]=je}}Q([...ee.current]);let Pe=0;if(ie)for(const Ue of ie.keys())Pe+=ie.get(Ue)??0;let Ie=0;if(q)for(const Ue of q.keys())Ie+=q.get(Ue)??0;let Me=0;if(se&&f)for(const Ue of se.keys())Me+=se.get(Ue)??0;te.current[ve]=Pe*E*30,oe.current[ve]=Ie*E*30,de.current[ve]=Me*E*30,he.current[ve]=te.current[ve]+oe.current[ve]-de.current[ve];const ze=te.current.slice(0,ve+1).reduce((Ue,nt)=>Ue+nt,0);U(ze);const Ne=oe.current.slice(0,ve+1).reduce((Ue,nt)=>Ue+nt,0);k(Ne);const Je=de.current.slice(0,ve+1).reduce((Ue,nt)=>Ue+nt,0);L(Je),B(he.current.slice(0,ve+1).reduce((Ue,nt)=>Ue+nt,0)),p(ze),g(Ne),A(Je),dt.getState().showSolarRadiationHeatmap||Cn.getState().clearDataStore()},[s]),m.useEffect(()=>{w({x:Math.max(l==null?void 0:l.x,P-window.innerWidth),y:Math.min(l==null?void 0:l.y,window.innerHeight-v)})},[l,P,v]),m.useEffect(()=>{const ve=()=>{w({x:Math.max(l==null?void 0:l.x,P-window.innerWidth),y:Math.min(l==null?void 0:l.y,window.innerHeight-v)})};return window.addEventListener("resize",ve),()=>{window.removeEventListener("resize",ve)}},[l,P,v]),m.useEffect(()=>(S.current&&(C.current||(C.current=new ResizeObserver(()=>{r(ve=>{S.current&&(ve.viewState.yearlyBuildingEnergyPanelRect||(ve.viewState.yearlyBuildingEnergyPanelRect=new cr(0,0,600,500)),ve.viewState.yearlyBuildingEnergyPanelRect.width=S.current.offsetWidth,ve.viewState.yearlyBuildingEnergyPanelRect.height=S.current.offsetHeight)})})),C.current.observe(S.current)),()=>{var ve;(ve=C.current)==null||ve.disconnect()}),[]);const Se=(ve,we)=>{w({x:Math.max(we.x,P-window.innerWidth),y:Math.min(we.y,window.innerHeight-v)})},Re=(ve,we)=>{r(Pe=>{Pe.viewState.yearlyBuildingEnergyPanelRect||(Pe.viewState.yearlyBuildingEnergyPanelRect=new cr(0,0,600,360)),Pe.viewState.yearlyBuildingEnergyPanelRect.x=Math.max(we.x,P-window.innerWidth),Pe.viewState.yearlyBuildingEnergyPanelRect.y=Math.min(we.y,window.innerHeight-v)})},De=()=>{r(ve=>{ve.viewState.showYearlyBuildingEnergyPanel=!1,n&&(ve.actionInfo={name:"Close Yearly Building Energy Graph",timestamp:new Date().getTime()})})},Ae=Y.t("word.Month",b),ue=Y.t("word.Energy",b),fe=G&&G[0]?Object.keys(G[0]).length===0:!0;return h.jsx(Bi,{nodeRef:x,handle:".handle",bounds:"parent",axis:"both",position:T,onDrag:Se,onStop:Re,onMouseDown:()=>{r(ve=>{ve.selectedFloatingWindow="yearlyBuildingEnergyPanel"})},children:h.jsx(gBo,{ref:x,style:{zIndex:y==="yearlyBuildingEnergyPanel"?bc:9},children:h.jsxs(mBo,{ref:S,style:{opacity:o,width:(l?l.width:600)+"px",height:(l?l.height:400)+"px"},children:[h.jsxs(yBo,{className:"handle",style:{direction:"ltr"},children:[h.jsxs("span",{children:[Y.t("buildingEnergyPanel.YearlyBuildingEnergy",b)+": ",h.jsx("span",{style:{fontSize:"10px"},children:Y.t("sensorPanel.WeatherDataFrom",b)+" "+t+" | "+a.getFullYear()})]}),h.jsx("span",{style:{cursor:"pointer"},onTouchStart:()=>{De()},onMouseDown:()=>{De()},children:`${Y.t("word.Close",b)}`})]}),h.jsx(g0t,{type:wi.YearlyBuildingEnergy,dataSource:G,hasSolarPanels:f,labels:O,height:100,dataKeyAxisX:"Month",labelX:Ae,labelY:ue,unitY:Y.t("word.kWh",b),yMin:0,curveType:"linear",fractionDigits:2,referenceX:H}),!d&&h.jsxs(on,{style:{alignSelf:"center",direction:"ltr"},children:[pe.current.length===0?h.jsx(on,{style:{cursor:"default"},children:Y.t("buildingEnergyPanel.Heater",b)+": "+N.toFixed(0)}):h.jsx(Ml,{content:pe.current.map((ve,we)=>h.jsx("div",{children:ve},we)),children:h.jsx(on,{style:{cursor:"help"},children:Y.t("buildingEnergyPanel.Heater",b)+": "+N.toFixed(0)})}),me.current.length===0?h.jsx(on,{style:{cursor:"default"},children:Y.t("buildingEnergyPanel.AC",b)+": "+W.toFixed(0)}):h.jsx(Ml,{content:me.current.map((ve,we)=>h.jsx("div",{children:ve},we)),children:h.jsx(on,{style:{cursor:"help"},children:Y.t("buildingEnergyPanel.AC",b)+": "+W.toFixed(0)})}),D!==0&&h.jsx(h.Fragment,{children:le.current.length===0?h.jsx(on,{style:{cursor:"default"},children:Y.t("buildingEnergyPanel.SolarPanel",b)+": "+D.toFixed(0)}):h.jsx(Ml,{content:le.current.map((ve,we)=>h.jsx("div",{children:ve},we)),children:h.jsx(on,{style:{cursor:"help"},children:Y.t("buildingEnergyPanel.SolarPanel",b)+": "+D.toFixed(0)})})}),Te.current.length===0?h.jsx(on,{style:{cursor:"default"},children:Y.t("buildingEnergyPanel.Net",b)+": "+j.toFixed(0)}):h.jsx(Ml,{content:Te.current.map((ve,we)=>h.jsx("div",{children:ve},we)),children:h.jsx(on,{style:{cursor:"help"},children:Y.t("buildingEnergyPanel.Net",b)+": "+j.toFixed(0)})}),h.jsx(io,{type:"default",icon:fe?h.jsx(Th,{}):h.jsx(Rf,{}),title:Y.t(fe?"word.Run":"word.Update",b),onClick:()=>{const ve=M.getState().elements,we=M.getState().countElementsByType,Pe=M.getState().getChildrenOfType,Ie=bX(ve,we,Pe);if(Ie.status===rg.NO_BUILDING){gn(Y.t("analysisManager.NoBuildingForAnalysis",b));return}if(Ie.status===rg.AT_LEAST_ONE_BAD_NO_GOOD){let Me;switch(Ie.buildingCompletion){case Uc.WALL_DISJOINED:Me=Y.t("message.WallsAreNotConnected",b);break;case Uc.WALL_EMPTY:Me=Y.t("message.BuildingContainsEmptyWall",b);break;case Uc.ROOF_MISSING:Me=Y.t("message.BuildingRoofMissing",b);break;default:Me=Y.t("message.UnknownErrors",b)}co(Y.t("message.SimulationWillNotStartDueToErrors",b)+": "+Me);return}Ie.status===rg.AT_LEAST_ONE_BAD_AT_LEAST_ONE_GOOD&&PR(Y.t("message.SimulationWillStartDespiteWarnings",b)),gn(Y.t("message.SimulationStarted",b)),setTimeout(()=>{i(),dt.getState().set(Me=>{Me.runYearlyThermalSimulation=!0,Me.pauseYearlyThermalSimulation=!1,Me.simulationInProgress=!0}),r(Me=>{n&&(Me.actionInfo={name:"Run Yearly Building Energy Analysis",timestamp:new Date().getTime()})})},100)}}),h.jsx(io,{type:"default",icon:h.jsx(_u,{}),title:Y.t("word.SaveAsImage",b),onClick:()=>{Ed("line-graph-"+Ae+"-"+ue,"yearly-building-energy").then(()=>{gn(Y.t("message.ScreenshotSaved",b)),n&&r(ve=>{ve.actionInfo={name:"Take Screenshot of Yearly Building Energy Graph",timestamp:new Date().getTime()}})})}}),ee.current&&ee.current.length>0&&h.jsx(io,{type:"default",icon:h.jsx(Hf,{}),title:Y.t("word.SaveAsCsv",b),onClick:()=>{Sh(ee.current,"yearly-building-energy.csv"),gn(Y.t("message.CsvFileSaved",b)),n&&r(ve=>{ve.actionInfo={name:"Export Yearly Building Energy Result as CSV",timestamp:new Date().getTime()}})}})]})]})})})}),wBo=be.memo(({setDialogVisible:t})=>{const e=M(pn),n=M(En),o=M(j8t),r=M(B8t),[i,a]=m.useState(!1),[l,s]=m.useState(!1),[c,u]=m.useState({left:0,top:0,bottom:0,right:0}),d=m.useRef(null),f=m.useRef(null),p=m.useRef(o),g=m.useRef(r),A=$t();m.useEffect(()=>{var w;(w=f.current)==null||w.focus()},[]);const y=(w,x)=>{if(d.current){const{clientWidth:b,clientHeight:R}=window.document.documentElement,H=d.current.getBoundingClientRect();u({left:-H.left+x.x,right:b-(H.right-x.x),top:-H.top+x.y,bottom:R-((H==null?void 0:H.bottom)-x.y)})}},S=w=>{e(x=>{x.minimumNavigationMoveSpeed=w}),dt.getState().set(x=>{x.navigationMoveSpeed=w})},C=w=>{e(x=>{x.minimumNavigationTurnSpeed=w}),dt.getState().set(x=>{x.navigationTurnSpeed=w})},P=()=>{const w=o,x=p.current;if(w!==x){const H={name:"Minimum Navigation Move Speed",timestamp:Date.now(),oldValue:w,newValue:x,undo:()=>{S(H.oldValue)},redo:()=>{S(H.newValue)}};n(H),S(x)}const b=r,R=g.current;if(b!==R){const H={name:"Minimum Navigation Turn Speed",timestamp:Date.now(),oldValue:b,newValue:R,undo:()=>{C(H.oldValue)},redo:()=>{C(H.newValue)}};n(H),C(R)}},v=()=>{t(!1)},T=()=>{P(),t(!1)};return h.jsxs(xi,{width:500,open:!0,title:h.jsx("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>s(!0),onMouseOut:()=>s(!1),children:`${Y.t("navigationPanel.NavigationParameters",A)}`}),footer:[h.jsx(io,{onClick:v,children:`${Y.t("word.Cancel",A)}`},"Cancel"),h.jsx(io,{type:"primary",ref:f,onClick:T,children:`${Y.t("word.OK",A)}`},"OK")],onCancel:()=>{t(!1)},maskClosable:!1,destroyOnClose:!1,modalRender:w=>h.jsx(Bi,{disabled:!l,bounds:c,onStart:(x,b)=>y(x,b),children:h.jsx("div",{ref:d,children:w})}),children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("navigationPanel.MinimumMoveSpeed",A)+" ([1, 10]): "}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{min:1,max:10,style:{width:"100%"},precision:0,value:p.current,step:1,onChange:w=>{p.current=Number(w),a(!i)},onBlur:w=>{const x=w.target.value,b=parseFloat(x);p.current=Number.isNaN(b)?3:b,a(!i)},onPressEnter:w=>{const x=w.target.value,b=parseFloat(x);p.current=Number.isNaN(b)?3:b,a(!i)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("navigationPanel.MinimumTurnSpeed",A)+" ([1, 5]): "}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{min:1,max:5,style:{width:"100%"},precision:0,value:g.current,step:1,onChange:w=>{g.current=Number(w),a(!i)},onBlur:w=>{const x=w.target.value,b=parseFloat(x);g.current=Number.isNaN(b)?3:b,a(!i)},onPressEnter:w=>{const x=w.target.value,b=parseFloat(x);g.current=Number.isNaN(b)?3:b,a(!i)}})})]})]})}),vBo=be.memo(({setDialogVisible:t})=>{const e=M(pn),n=M(En),o=M(Oq),r=ye.getShadowMapSize(),i=4096,a=1e4,[l,s]=m.useState(!1),[c,u]=m.useState(!1),[d,f]=m.useState({left:0,top:0,bottom:0,right:0}),p=m.useRef(null),g=m.useRef(null),A=m.useRef(o?Math.round(o)/a:1),y=m.useRef(r?Math.round(r/i):1),S=$t();m.useEffect(()=>{var b;(b=g.current)==null||b.focus()},[]);const C=(b,R)=>{if(p.current){const{clientWidth:H,clientHeight:F}=window.document.documentElement,E=p.current.getBoundingClientRect();f({left:-E.left+R.x,right:H-(E.right-R.x),top:-E.top+R.y,bottom:F-((E==null?void 0:E.bottom)-R.y)})}},P=b=>{e(R=>{R.viewState.shadowCameraFar=b})},v=b=>{localStorage.setItem("aladdin-shadow-map-size",b.toString())},T=()=>{const b=o,R=A.current*a;if(b!==R){const E={name:"Shadow Camera Far Distance",timestamp:Date.now(),oldValue:b,newValue:R,undo:()=>{P(E.oldValue)},redo:()=>{P(E.newValue)}};n(E),P(R)}const H=r,F=y.current*i;if(H!==F){const E={name:"Shadow Map Size",timestamp:Date.now(),oldValue:H,newValue:F,undo:()=>{v(E.oldValue)},redo:()=>{v(E.newValue)}};n(E),v(F)}},w=()=>{t(!1)},x=()=>{T(),t(!1),window.location.reload()};return h.jsxs(xi,{width:500,open:!0,title:h.jsx("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>u(!0),onMouseOut:()=>u(!1),children:`${Y.t("shadowSettingsPanel.ShadowSettings",S)}`}),footer:[h.jsx(io,{onClick:w,children:`${Y.t("word.Cancel",S)}`},"Cancel"),h.jsx(io,{type:"primary",ref:g,onClick:x,children:`${Y.t("word.OK",S)}`},"OK")],onCancel:()=>{t(!1)},maskClosable:!1,destroyOnClose:!1,modalRender:b=>h.jsx(Bi,{disabled:!c,bounds:d,onStart:(R,H)=>C(R,H),children:h.jsx("div",{ref:p,children:b})}),children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:18,children:Y.t("shadowSettingsPanel.ShadowCameraFarDistance",S)+" ([1, 1000]×"+a+"): "}),h.jsx(Ke,{span:6,children:h.jsx(Sn,{min:1,max:1e3,style:{width:"100%"},precision:0,value:A.current,step:1,onChange:b=>{A.current=Number(b),s(!l)},onBlur:b=>{const R=b.target.value,H=parseFloat(R);A.current=Number.isNaN(H)?1:H,s(!l)},onPressEnter:b=>{const R=b.target.value,H=parseFloat(R);A.current=Number.isNaN(H)?1:H,s(!l)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"10px"},children:[h.jsx(Ke,{span:18,children:Y.t("shadowSettingsPanel.ShadowMapSize",S)+" ([1, 4]×"+i+"): "}),h.jsx(Ke,{span:6,children:h.jsx(Sn,{min:1,max:4,style:{width:"100%"},precision:0,value:y.current,step:1,onChange:b=>{y.current=Number(b),s(!l)},onBlur:b=>{const R=b.target.value,H=parseFloat(R);y.current=Number.isNaN(H)?1:H,s(!l)},onPressEnter:b=>{const R=b.target.value,H=parseFloat(R);y.current=Number.isNaN(H)?1:H,s(!l)}})})]}),h.jsx(nn,{style:{fontSize:"10px"},children:h.jsxs(Ke,{span:24,children:[Y.t("shadowSettingsPanel.Notes",S),":",h.jsx("br",{}),h.jsxs("ul",{children:[h.jsx("li",{children:Y.t("shadowSettingsPanel.RefreshPageNote",S)}),h.jsx("li",{children:Y.t("shadowSettingsPanel.MapSizeWarning",S)})]})]})})]})}),{Option:bD}=Uo,xBo=be.memo(({setDialogVisible:t})=>{const e=M(DH),n=M(ewt),o=M(twt),[r,i]=m.useState(!1),[a,l]=m.useState(!1),[s,c]=m.useState({left:0,top:0,bottom:0,right:0}),u=m.useRef(null),d=m.useRef("Unknown"),f=m.useRef("Unknown"),p=m.useRef("Monocrystalline"),g=m.useRef(12),A=m.useRef(8),y=m.useRef("Black"),S=m.useRef(1),C=m.useRef(1.5),P=m.useRef(0),v=m.useRef(.2),T=m.useRef(45),w=m.useRef(300),x=m.useRef(-.002),b=m.useRef(.005),R=m.useRef(30),H=m.useRef(30),F=m.useRef(10),E=m.useRef(40),N=m.useRef(15),U=$t(),W=(G,Q)=>{if(u.current){const{clientWidth:$,clientHeight:ie}=window.document.documentElement,q=u.current.getBoundingClientRect();c({left:-q.left+Q.x,right:$-(q.right-Q.x),top:-q.top+Q.y,bottom:ie-((q==null?void 0:q.bottom)-Q.y)})}},k=m.useMemo(()=>{const G=[];for(const Q in e)G.push(Q);return G},[e]),D=()=>{const G={name:d.current,brand:f.current,cellType:p.current,efficiency:v.current,length:C.current,nominalLength:C.current,width:S.current,nominalWidth:S.current,thickness:b.current,m:g.current,n:A.current,pmax:w.current,vmpp:H.current,impp:F.current,voc:E.current,isc:N.current,pmaxTC:x.current,noct:T.current,weight:R.current,color:y.current,shadeTolerance:m8.PARTIAL,bifacialityFactor:P.current};n(G)},L=()=>{if(d.current.trim()===""){xi.info({title:Y.t("pvModelPanel.CannotAddCustomSolarPanel",U),content:Y.t("pvModelPanel.CustomSolarPanelMustHaveModelName",U)+"."});return}k.includes(d.current)?xi.info({title:Y.t("pvModelPanel.CannotAddCustomSolarPanel",U),content:Y.t("pvModelPanel.CustomSolarPanelExists",U)+': "'+d.current+'"'}):D()},j=G=>{d.current=G.name,f.current=G.brand,p.current=G.cellType,v.current=G.efficiency,C.current=G.length,S.current=G.width,b.current=G.thickness,g.current=G.m,A.current=G.n,w.current=G.pmax,H.current=G.vmpp,F.current=G.impp,E.current=G.voc,N.current=G.isc,x.current=G.pmaxTC,T.current=G.noct,R.current=G.weight,y.current=G.color,P.current=G.bifacialityFactor},B=()=>{xi.confirm({title:Y.t("pvModelPanel.DoYouReallyWantToImportCustomSolarPanel",U)+"?",content:h.jsxs("span",{style:{color:"red",fontWeight:"bold"},children:[h.jsx(nb,{style:{marginRight:"6px"}}),Y.t("word.Warning",U)+": "+Y.t("pvModelPanel.ExistingSettingsWillBeOverwritten",U)+"."]}),icon:h.jsx(Zx,{}),onOk:()=>{navigator.clipboard.readText().then(G=>{const Q=JSON.parse(G);if(!Q.cellType||!Q.pmax){co(Y.t("pvModelPanel.FailInImportingDataFromClipboard",U));return}j(Q),i(!r)}).catch(G=>{co(Y.t("pvModelPanel.FailInImportingDataFromClipboard",U)+":"+G)})}})},O=G=>{xi.confirm({title:Y.t("pvModelPanel.DoYouReallyWantToRemoveThisCustomSolarPanel",U)+' "'+G+'"?',content:h.jsxs("span",{style:{color:"red",fontWeight:"bold"},children:[h.jsx(nb,{style:{marginRight:"6px"}}),Y.t("word.Warning",U)+": "+Y.t("pvModelPanel.MakeSureThisCustomSolarPanelIsNotUsed",U)+"."]}),icon:h.jsx(Zx,{}),onOk:()=>{o(G)}})},V=[{key:"1",label:Y.t("pvModelPanel.General",U),children:h.jsxs(h.Fragment,{children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:14,children:Y.t("pvModelPanel.Model",U)+": "}),h.jsx(Ke,{span:10,children:h.jsx(jl,{style:{width:"100%"},value:d.current,onChange:G=>{d.current=G.target.value,i(!r)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:14,children:Y.t("word.BrandName",U)+": "}),h.jsx(Ke,{span:10,children:h.jsx(jl,{style:{width:"100%"},value:f.current,onChange:G=>{f.current=G.target.value,i(!r)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:14,children:Y.t("pvModelPanel.CellType",U)+":"}),h.jsx(Ke,{span:10,children:h.jsxs(Uo,{style:{width:"100%"},value:p.current,onChange:G=>{p.current=G,i(!r)},children:[h.jsx(bD,{value:"Monocrystalline",children:Y.t("pvModelPanel.Monocrystalline",U)},"Monocrystalline"),h.jsx(bD,{value:"Polycrystalline",children:Y.t("pvModelPanel.Polycrystalline",U)},"Polycrystalline"),h.jsx(bD,{value:"Thin Film",children:Y.t("pvModelPanel.ThinFilm",U)},"Thin Film")]})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:14,children:Y.t("word.Length",U)+" ([0.1, 3]"+Y.t("word.MeterAbbreviation",U)+"): "}),h.jsx(Ke,{span:10,children:h.jsx(Sn,{min:.1,max:3,style:{width:"100%"},precision:3,value:C.current,step:.01,onChange:G=>{G!==null&&(C.current=G,i(!r))},onBlur:G=>{const Q=parseFloat(G.target.value);C.current=Number.isNaN(Q)?1:Q,i(!r)},onPressEnter:G=>{const Q=parseFloat(G.target.value);C.current=Number.isNaN(Q)?1:Q,i(!r)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:14,children:Y.t("word.Width",U)+" ([0.1, 3]"+Y.t("word.MeterAbbreviation",U)+"): "}),h.jsx(Ke,{span:10,children:h.jsx(Sn,{min:.1,max:3,style:{width:"100%"},precision:3,value:S.current,step:.01,onChange:G=>{G!==null&&(S.current=G,i(!r))},onBlur:G=>{const Q=parseFloat(G.target.value);S.current=Number.isNaN(Q)?1:Q,i(!r)},onPressEnter:G=>{const Q=parseFloat(G.target.value);S.current=Number.isNaN(Q)?1:Q,i(!r)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:14,children:Y.t("pvModelPanel.PowerBifaciality",U)+" ([0, 1]):"}),h.jsx(Ke,{span:10,children:h.jsx(Sn,{style:{width:"100%"},precision:2,step:.01,value:P.current,onChange:G=>{G!==null&&(P.current=G,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:14,children:Y.t("pvModelPanel.Weight",U)+" ("+Y.t("pvModelPanel.Kilogram",U)+"):"}),h.jsx(Ke,{span:10,children:h.jsx(Sn,{style:{width:"100%"},precision:1,step:.1,value:R.current,onChange:G=>{G!==null&&(R.current=G,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:14,children:Y.t("word.Thickness",U)+" ("+Y.t("word.MeterAbbreviation",U)+"):"}),h.jsx(Ke,{span:10,children:h.jsx(Sn,{style:{width:"100%"},precision:4,step:1e-4,value:b.current,onChange:G=>{G!==null&&(b.current=G,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:14,children:Y.t("word.Color",U)+":"}),h.jsx(Ke,{span:10,children:h.jsxs(Uo,{style:{width:"100%"},value:y.current,onChange:G=>{y.current=G,i(!r)},children:[h.jsx(bD,{value:"Black",children:Y.t("pvModelPanel.Black",U)},"Black"),h.jsx(bD,{value:"Blue",children:Y.t("pvModelPanel.Blue",U)},"Blue")]})})]})]})},{key:"2",label:Y.t("pvModelPanel.Electrical",U),children:h.jsxs(h.Fragment,{children:[h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.SolarCellEfficiency",U)+" (%):"}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{style:{width:"100%"},precision:1,step:.1,value:100*v.current,onChange:G=>{G!==null&&(v.current=G*.01,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.CellCountInXDirection",U)+": "}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{min:1,max:36,style:{width:"100%"},precision:0,value:g.current,step:1,onChange:G=>{G!==null&&(g.current=G,i(!r))},onBlur:G=>{const Q=parseFloat(G.target.value);g.current=Number.isNaN(Q)?1:Q,i(!r)},onPressEnter:G=>{const Q=parseFloat(G.target.value);g.current=Number.isNaN(Q)?1:Q,i(!r)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.CellCountInYDirection",U)+": "}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{min:1,max:36,style:{width:"100%"},precision:0,value:A.current,step:1,onChange:G=>{G!==null&&(A.current=G,i(!r))},onBlur:G=>{const Q=parseFloat(G.target.value);A.current=Number.isNaN(Q)?1:Q,i(!r)},onPressEnter:G=>{const Q=parseFloat(G.target.value);A.current=Number.isNaN(Q)?1:Q,i(!r)}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.MaximumRatedPower",U)+" Pmax ("+Y.t("word.WattAbbreviation",U)+"):"}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{style:{width:"100%"},precision:1,step:1,value:w.current,onChange:G=>{G!==null&&(w.current=G,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.TemperatureCoefficientOfPmax",U)+" (%/°C):"}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{style:{width:"100%"},step:1e-4,value:x.current,onChange:G=>{G!==null&&(x.current=G,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.NominalOperatingCellTemperature",U)+" (°C):"}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{style:{width:"100%"},step:1,precision:1,value:T.current,onChange:G=>{G!==null&&(T.current=G,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.RatedVoltage",U)+" Vmpp ("+Y.t("word.VoltAbbreviation",U)+"):"}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{style:{width:"100%"},precision:1,step:.1,value:H.current,onChange:G=>{G!==null&&(H.current=G,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.RatedCurrent",U)+" Impp ("+Y.t("word.AmpereAbbreviation",U)+"):"}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{style:{width:"100%"},precision:2,step:.1,value:F.current,onChange:G=>{G!==null&&(F.current=G,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.OpenCircuitVoltage",U)+" Voc ("+Y.t("word.VoltAbbreviation",U)+"):"}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{style:{width:"100%"},precision:1,step:.1,value:E.current,onChange:G=>{G!==null&&(E.current=G,i(!r))}})})]}),h.jsxs(nn,{gutter:6,style:{paddingBottom:"4px"},children:[h.jsx(Ke,{span:16,children:Y.t("pvModelPanel.ShortCircuitCurrent",U)+" Isc ("+Y.t("word.AmpereAbbreviation",U)+"):"}),h.jsx(Ke,{span:8,children:h.jsx(Sn,{style:{width:"100%"},precision:2,step:.1,value:N.current,onChange:G=>{G!==null&&(N.current=G,i(!r))}})})]})]})}];return h.jsx(xi,{width:720,open:!0,title:h.jsx("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>l(!0),onMouseOut:()=>l(!1),children:Y.t("menu.settings.CustomizeSolarPanel",U)}),footer:[h.jsx(io,{onClick:()=>t(!1),children:Y.t("word.Close",U)},"Close")],onCancel:()=>t(!1),maskClosable:!1,destroyOnClose:!1,modalRender:G=>h.jsx(Bi,{disabled:!a,bounds:s,onStart:(Q,$)=>W(Q,$),children:h.jsx("div",{ref:u,children:G})}),children:h.jsxs(nn,{style:{justifyContent:"space-between"},children:[h.jsx(Ke,{flex:3,children:h.jsx(hQ,{defaultActiveKey:"1",type:"card",items:V})}),h.jsx(Ke,{flex:.5,children:h.jsxs(on,{style:{height:"100%",justifyContent:"center",marginLeft:"12px"},direction:"vertical",children:[h.jsx(Vnn,{title:Y.t("word.Add",U),style:{cursor:"pointer",fontSize:"20px",color:"dimgray",border:"2px solid lightgray",borderRadius:"6px",padding:"4px"},onClick:()=>L()}),h.jsx(mue,{style:{marginTop:"12px",marginBottom:"12px"}}),h.jsx(Bnn,{title:Y.t("pvModelPanel.ImportCustomSolarPanelFromClipboard",U),style:{cursor:"pointer",fontSize:"20px",color:"dimgray",border:"2px solid lightgray",borderRadius:"6px",padding:"4px"},onClick:()=>{B()}})]})}),h.jsx(Ke,{flex:2,children:h.jsx(pk,{style:{marginTop:"56px",marginLeft:"8px"},size:"small",header:h.jsx("div",{style:{fontWeight:"bold"},children:Y.t("pvModelPanel.AddedCustomSolarPanels",U)}),bordered:!0,dataSource:k,renderItem:G=>h.jsxs(pk.Item,{children:[h.jsx(yon,{title:Y.t("pvModelPanel.ExportThisCustomSolarPanel",U),style:{paddingRight:"4px",cursor:"pointer"},onClick:()=>{const Q=e[G];navigator.clipboard.writeText(JSON.stringify(Q)).then(()=>{gn(Y.t("pvModelPanel.CustomSolarPanelExportedToClipboard",U)+" ("+G+").")})}}),h.jsx(eqe,{title:Y.t("word.Delete",U),style:{paddingRight:"6px",cursor:"pointer"},onClick:()=>O(G)}),G]},G)})})]})})}),bBo=be.memo(()=>{const t=M(Tge),e=M(Vq),n=M(FBe),o=M(W4t),r=M(kBe),i=M(LBe),a=M(j4t),l=M(Y4t),s=dt(L8t),c=dt(W8t),u=dt(N8t),d=dt(U8t),f=dt(hs),p=M(WBe),g=M(q4t),A=M(NBe),y=M(t8t),S=M(o8t),C=M(UBe),P=M(a8t),v=M(jBe),T=M(c8t),w=M(BBe),x=M(f8t),b=M(YBe),R=M(g8t),H=M(OBe),F=M(A8t),E=M(_4t),N=M(X4t),U=M(v8t),W=M(HW),k=M(s0),D=M(Mb),L=M(qYe),j=M(KYe),B=M(Jge),O=M(Yq)??!1,[V,G]=m.useState("Boston MA, USA");return m.useEffect(()=>{if(Object.keys(B).length===0)return;const Q=L(k,D)??"Boston MA, USA";G(Q),j(Q)},[k,D,B]),h.jsxs(h.Fragment,{children:[o&&h.jsx(a8o,{}),r&&h.jsx(u8o,{}),i&&h.jsx(LUo,{}),t&&h.jsx(ijo,{}),e&&h.jsx(ZUo,{}),(n||O)&&!W&&h.jsx(UUo,{}),a&&h.jsx(Sko,{city:V,graphs:[wi.MonthlyTemperatures,wi.SunshineHours]}),l&&h.jsx(Zjo,{city:V}),s&&h.jsx(xBo,{setDialogVisible:Q=>{dt.getState().set($=>{$.showSolarPanelCustomizationPanel=Q})}}),c&&h.jsx(cBo,{setDialogVisible:Q=>{dt.getState().set($=>{$.showEconomicsPanel=Q})}}),u&&h.jsx(wBo,{setDialogVisible:Q=>{dt.getState().set($=>{$.showNavigationPanel=Q})}}),d&&h.jsx(vBo,{setDialogVisible:Q=>{dt.getState().set($=>{$.showShadowSettings=Q})}}),g&&h.jsx(Rko,{city:V}),p&&h.jsx(zUo,{city:V}),y&&h.jsx(OUo,{city:V}),A&&h.jsx(XUo,{city:V}),S&&h.jsx(fjo,{}),P&&h.jsx(mjo,{city:V}),C&&h.jsx(vjo,{city:V}),T&&h.jsx(Hjo,{city:V}),v&&h.jsx(Tjo,{city:V}),w&&h.jsx(Djo,{city:V}),x&&h.jsx(Ljo,{city:V}),b&&h.jsx(jjo,{city:V}),R&&h.jsx(Vjo,{city:V}),H&&h.jsx(Kjo,{city:V}),F&&h.jsx(oBo,{city:V}),E&&h.jsx(pBo,{city:V}),N&&h.jsx(ABo,{city:V}),f&&h.jsx(sjo,{}),U&&h.jsx(sBo,{})]})});class ll{static computeSolarPanelOutput(e,n,o,r,i,a,l,s,c){const u=i.parentType===z.Roof,d=i.parentType===z.Wall;u&&(a=l);const f=d?ye.absoluteCoordinates(i.cx,i.cy,i.cz,a,l,i.lz):ye.absoluteCoordinates(i.cx,i.cy,i.cz,a,void 0,void 0,!0),p=a.rotation[2];let g=i.tiltAngle,A=p+i.relativeAzimuth,y=!0;if(u&&(f.z=i.cz+i.lz+.02+a.cz,ye.isZero(i.rotation[0])?f.z+=i.poleHeight:(g=i.rotation[0],A=p,y=!1)),d&&!ye.isZero(i.tiltAngle)){const $=a,q=(l?l.rotation[2]+$.relativeAngle:$.relativeAngle)-Qt,se=i.ly*Math.abs(Math.sin(i.tiltAngle))/2;f.x+=se*Math.cos(q),f.y+=se*Math.sin(q)}const S=new ae().fromArray(i.normal),C=e.getMonth(),P=ye.dayOfYear(e),v=n.solarRadiationHeatmapGridCellSize??.5;let T,w,x,b,R;n.discretization===Em.EXACT?(T=i.lx,w=i.ly,i.orientation===vr.portrait?(x=Math.max(1,Math.round(i.lx/r.width)),b=Math.max(1,Math.round(i.ly/r.length)),x*=r.n,b*=r.m):(x=Math.max(1,Math.round(i.lx/r.length)),b=Math.max(1,Math.round(i.ly/r.width)),x*=r.m,b*=r.n),R=i.lx/x):(T=i.lx,w=i.ly,x=Math.max(2,Math.round(i.lx/v)),b=Math.max(2,Math.round(i.ly/v)),x%2!==0&&(x+=1),b%2!==0&&(b+=1),R=v);const H=T/x,F=w/b,E=f.x-(T-R)/2,N=f.y-(w-R)/2,U=u||d?f.z:a.lz+i.poleHeight+i.lz,W=new Kt(f.x,f.y),k=new ae,D=Array.from(Array(x),()=>new Array(b));let L=new ln(u&&!y?0:g,0,A,"ZYX");if(i.trackerType!==Ll.NO_TRACKER){const $=p?o.clone().applyAxisAngle(ko,-p):o.clone();switch(i.trackerType){case Ll.ALTAZIMUTH_DUAL_AXIS_TRACKER:{const ie=new Ts().setFromUnitVectors(ko,$);L=new ln().setFromQuaternion(ie),L.z+=A;break}case Ll.HORIZONTAL_SINGLE_AXIS_TRACKER:{const ie=new Ts().setFromUnitVectors(ko,new ae($.x,0,$.z).normalize());L=new ln().setFromQuaternion(ie),L.z+=A;break}case Ll.VERTICAL_SINGLE_AXIS_TRACKER:{const ie=new ae($.x,-$.y,0).normalize(),q=Math.acos(Yc.dot(ie))*Math.sign(ie.x);L=new ln(i.tiltAngle,0,q+p,"ZYX");break}case Ll.TILTED_SINGLE_AXIS_TRACKER:break}}S.applyEuler(L),u&&!y&&(L.x=i.rotation[0],L.z=i.rotation[2]+p),d&&(L.x=Qt+i.tiltAngle,L.z=a.relativeAngle+p);const j=vi(o,P,s,li.SPHERE_MODEL),B=qr(n.ground,C,S,j),O=S.dot(o),V=new Kt,G=new ae;for(let $=0;$0&&(V.set(E+$*H,N+ie*F),G.set(V.x-W.x,V.y-W.y,0),G.applyEuler(L),k.set(f.x+G.x,f.y+G.y,U+G.z),c(i.id,k,o)<0&&(D[$][ie]+=O*j));let Q=0;switch(r.shadeTolerance){case m8.NONE:{let $=Number.MAX_VALUE;for(let ie=0;ieArray(S).fill(0)),D=Array(y).fill(0).map(()=>Array(S).fill(0));let L;for(let j=0;j0)for(const $ of a){if($.type!==z.Window)continue;const ie=$.cx*r.lx,q=$.cz*r.lz,se=$.lx*r.lx/2,Z=$.lz*r.lz/2,ee=$;if(ee.windowType===Ci.Arched){const te=T.clone().add(new ae(ee.cx*r.lx,0,ee.cz*r.lz));ll.pointWithinArch(R,ee.lx,ee.lz,ee.archHeight,te)&&(L=!1)}else if(G.x>=ie-se&&G.x=q-Z&&G.y0)for(const $ of l){if($.type!==z.Door)continue;const ie=$.cx*r.lx,q=$.cz*r.lz,se=$.lx*r.lx/2,Z=$.lz*r.lz/2,ee=$;if(ee.doorType===Rd.Arched){const te=T.clone().add(new ae(ee.cx*r.lx,0,ee.cz*r.lz));ll.pointWithinArch(R,ee.lx,ee.lz,ee.archHeight,te)&&(L=!1)}else if(G.x>=ie-se&&G.x=q-Z&&G.y0)for(const $ of s){const ie=$.cx*r.lx,q=$.cz*r.lz,se=$.lx/2,Z=$.ly/2;if(G.x>=ie-se&&G.x=q-Z&&G.yc6||ie<0)&&$&&(k[j][B]+=U),W>0&&ie<0&&(D[j][B]+=W*N,$&&(k[j][B]+=W*N))}}}return{intensity:k,unitArea:C*P,heatmap:D}}static computeDoorSolarRadiationEnergy(e,n,o,r,i,a,l,s){const c=ye.dayOfYear(e),u=n.solarRadiationHeatmapGridCellSize??.5,d=r.lx*i.lx,f=r.lz*i.lz,p=Math.max(2,Math.round(d/u)),g=Math.max(2,Math.round(f/u)),A=d/p,y=f/g,S=a.rotation[2]+i.relativeAngle,P=ye.wallAbsolutePosition(new ae(i.cx,i.cy,i.cz),a).setZ(i.lz/2+a.lz).clone().add(new ae(r.cx*i.lx,0,r.cz*i.lz)),v=new ae(Math.cos(S-Qt),Math.sin(S-Qt),0),T=A*Math.cos(S),w=A*Math.sin(S),x=new ae,b=vi(o,c,l,li.SPHERE_MODEL),R=qr(n.ground,e.getMonth(),v,b),H=v.dot(o),F=Array(p).fill(0).map(()=>Array(g).fill(0));if(r.doorType===Rd.Arched)for(let E=0;E0&&s(r.id,x,o)<0&&(F[E][N]+=H*b))}else for(let E=0;E0){const U=E-p/2+.5,W=N-g/2+.5;x.set(P.x+U*T,P.y+U*w,P.z+W*y),s(r.id,x,o)<0&&(F[E][N]+=H*b)}return{intensity:F,unitArea:A*y}}static pointWithinArch(e,n,o,r,i){if(r>0){const a=.5*n,l=Math.min(r,o,a),s=.5*(l+a*a/l),c=e.x-i.x,u=e.y-i.y,d=c*c+u*u;let f=e.z-i.z;return d-o/2?!0:(f=e.z-(o-s),d+f*fArray(g).fill(0));if(r.windowType===Ci.Arched)for(let E=0;E0&&s(r.id,x,o)<0&&(F[E][N]+=H*b))}else for(let E=0;E0){const U=E-p/2+.5,W=N-g/2+.5;x.set(P.x+U*T,P.y+U*w,P.z+W*y),s(r.id,x,o)<0&&(F[E][N]+=H*b)}return{intensity:F,unitArea:A*y}}static computeRoofWindowSolarRadiationEnergy(e,n,o,r,i,a,l,s){const c=ye.dayOfYear(e),u=n.solarRadiationHeatmapGridCellSize??.5,d=r.lx,f=r.lz,p=Math.max(2,Math.round(d/u)),g=Math.max(2,Math.round(f/u)),A=d/p,y=f/g,S=new ae(r.cx,r.cy,r.cz).applyEuler(new ln(0,0,a.rotation[2]));S.x+=a.cx,S.y+=a.cy,S.z+=a.lz;const C=new ln(r.rotation[0],r.rotation[1],r.rotation[2]+a.rotation[2],"ZXY"),P=new ae(0,0,1).applyEuler(C),v=new ae,T=vi(o,c,l,li.SPHERE_MODEL),w=qr(n.ground,e.getMonth(),P,T),x=P.dot(o),b=Array(p).fill(0).map(()=>Array(g).fill(0));if(r.windowType===Ci.Arched)for(let R=0;R0&&s(r.id,v,o)<0&&(b[R][H]+=x*T))}else for(let R=0;R0){const F=R-p/2+.5,E=H-g/2+.5,N=new ae(F,E,0);N.applyEuler(C),v.set(S.x+N.x,S.y+N.y,S.z+N.z),s(r.id,v,o)<0&&(b[R][H]+=x*T)}return{intensity:b,unitArea:A*y}}static computePyramidRoofSolarRadiationEnergy(e,n,o,r,i,a,l,s,c,u,d,f){if(i)return ll.computeFlatRoofSolarRadiationEnergy(e,n,o,r,a,l,s,c,u,d,f);const p=n.solarRadiationHeatmapGridCellSize??.5,g=ye.dayOfYear(e),A=new ln(0,0,s.rotation[2],"ZYX"),y=vi(o,g,d,li.SPHERE_MODEL),S=[],C=[];for(const[P,v]of l.entries()){const T=r.id+"-"+P,w=v[0].clone().applyEuler(A),x=v[1].clone().applyEuler(A),b=v[2].clone().applyEuler(A),R=new ae().subVectors(x,w),H=new ae().subVectors(b,w),F=new ae().subVectors(b,x),E=R.length(),N=new ae().crossVectors(H,F).length()/E,U=Math.max(2,Math.round(E/p)),W=Math.max(2,Math.round(N/p)),k=Array(U).fill(0).map(()=>Array(W).fill(0));S.push(k),R.normalize();const D=U*H.dot(R)/E;H.normalize(),F.normalize();const L=new ae().crossVectors(H,F).normalize(),j=R.multiplyScalar(.5*E/U),B=new ae().crossVectors(L,R).normalize().multiplyScalar(.5*N/W),O=new ae(s.cx+w.x,s.cy+w.y,s.lz+w.z+k0+(a?r.thickness:0));O.add(j).add(B),j.multiplyScalar(2),B.multiplyScalar(2),C.push(j.length()*B.length());const V=new ae,G=[],Q=.01;G.push({x:-Q,y:-Q}),G.push({x:U+Q,y:-Q}),G.push({x:D,y:W+Q});const $=qr(n.ground,e.getMonth(),L,y),ie=L.dot(o);for(let q=0;qc6||te<0)&&(k[q][Z]+=$),ie>0&&te<0&&(k[q][Z]+=ie*y)}}}}return{segmentIntensities:S,segmentUnitArea:C}}static computeHipRoofSolarRadiationEnergy(e,n,o,r,i,a,l,s,c,u,d,f){if(i)return ll.computeFlatRoofSolarRadiationEnergy(e,n,o,r,a,l,s,c,u,d,f);const p=ye.dayOfYear(e),g=n.solarRadiationHeatmapGridCellSize??.5,A=new ln(0,0,s.rotation[2],"ZYX"),y=vi(o,p,d,li.SPHERE_MODEL),S=[],C=[];for(const[P,v]of l.entries()){const T=r.id+"-"+P,w=v[0].clone().applyEuler(A),x=v[1].clone().applyEuler(A),b=v[2].clone().applyEuler(A),R=new ae().subVectors(x,w),H=new ae().subVectors(b,w),F=new ae().subVectors(b,x),E=R.length(),N=new ae().crossVectors(H,F).length()/E,U=Math.max(2,Math.round(E/g)),W=Math.max(2,Math.round(N/g)),k=Array(U).fill(0).map(()=>Array(W).fill(0));S.push(k),R.normalize();const D=U*H.dot(R)/E;H.normalize(),F.normalize();const L=new ae().crossVectors(H,F).normalize(),j=R.multiplyScalar(.5*E/U),B=new ae().crossVectors(L,R).normalize().multiplyScalar(.5*N/W),O=new ae,V=new ae(s.cx+w.x,s.cy+w.y,s.lz+w.z+k0+(a?r.thickness:0));V.add(j).add(B),j.multiplyScalar(2),B.multiplyScalar(2),C.push(j.length()*B.length());const G=qr(n.ground,e.getMonth(),L,y),Q=L.dot(o),$=[];for(const ie of v)$.push({x:ie.x,y:ie.y});if(P%2===0)for(let ie=0;iec6||ee<0)&&(k[ie][se]+=G),Q>0&&ee<0&&(k[ie][se]+=Q*y)}}}else{const ie=[];ie.push({x:-.01,y:-.01}),ie.push({x:U+.01,y:-.01}),ie.push({x:D,y:W+.01});for(let se=0;sec6||oe<0)&&(k[se][ee]+=G),Q>0&&oe<0&&(k[se][ee]+=Q*y)}}}}}return{segmentIntensities:S,segmentUnitArea:C}}static computeGambrelRoofSolarRadiationEnergy(e,n,o,r,i,a,l,s,c,u,d,f){if(i)return ll.computeFlatRoofSolarRadiationEnergy(e,n,o,r,a,l,s,c,u,d,f);const p=ye.dayOfYear(e),g=n.solarRadiationHeatmapGridCellSize??.5,A=new ln(0,0,s.rotation[2],"ZYX"),y=vi(o,p,d,li.SPHERE_MODEL),S=[],C=[];for(const[P,v]of l.entries()){const T=r.id+"-"+P,w=v[0].clone().applyEuler(A),x=v[1].clone().applyEuler(A),b=v[2].clone().applyEuler(A),R=new ae().subVectors(x,w),H=new ae().subVectors(b,w),F=new ae().subVectors(b,x),E=R.length(),N=new ae().crossVectors(H,F).length()/E,U=Math.max(2,Math.round(E/g)),W=Math.max(2,Math.round(N/g)),k=Array(U).fill(0).map(()=>Array(W).fill(0));S.push(k),R.normalize(),H.normalize(),F.normalize();const D=new ae().crossVectors(H,F).normalize(),L=R.multiplyScalar(.5*E/U),j=new ae().crossVectors(D,R).normalize().multiplyScalar(.5*N/W),B=new ae(s.cx+w.x,s.cy+w.y,s.lz+w.z+k0+(a?r.thickness:0));B.add(L).add(j),L.multiplyScalar(2),j.multiplyScalar(2),C.push(L.length()*j.length());const O=new ae,V=qr(n.ground,e.getMonth(),D,y),G=D.dot(o);for(let Q=0;Qc6||q<0)&&(k[Q][ie]+=V),G>0&&q<0&&(k[Q][ie]+=G*y)}}}return{segmentIntensities:S,segmentUnitArea:C}}static computeMansardRoofSolarRadiationEnergy(e,n,o,r,i,a,l,s,c,u,d,f){if(i)return ll.computeFlatRoofSolarRadiationEnergy(e,n,o,r,a,l,s,c,u,d,f);const p=ye.dayOfYear(e),g=n.solarRadiationHeatmapGridCellSize??.5,A=new ln(0,0,s.rotation[2],"ZYX"),y=vi(o,p,d,li.SPHERE_MODEL),S=[],C=[];for(const[P,v]of l.entries()){const T=r.id+"-"+P;if(P===l.length-1){let w=Number.MAX_VALUE,x=Number.MAX_VALUE,b=-Number.MAX_VALUE,R=-Number.MAX_VALUE;for(const B of v){const O=B.clone().applyEuler(A);O.x>b&&(b=O.x),O.xR&&(R=O.y),O.yArray(E).fill(0));S.push(W);const k=new ae(w+g/2,x+g/2,s.lz+H+k0+(a?r.thickness:0)),D=new ae(0,0,k.z),L=qr(n.ground,e.getMonth(),ko,y),j=ko.dot(o);for(let B=0;Bc6||V<0)&&(W[B][O]+=L),j>0&&V<0&&(W[B][O]+=j*y)}}}else{const w=v[0].clone().applyEuler(A),x=v[1].clone().applyEuler(A),b=v[2].clone().applyEuler(A),R=new ae().subVectors(x,w),H=new ae().subVectors(b,w),F=new ae().subVectors(b,x),E=R.length(),N=new ae().crossVectors(H,F).length()/E,U=Math.max(2,Math.round(E/g)),W=Math.max(2,Math.round(N/g)),k=Array(U).fill(0).map(()=>Array(W).fill(0));S.push(k),R.normalize(),H.normalize(),F.normalize();const D=new ae().crossVectors(H,F).normalize(),L=R.multiplyScalar(.5*E/U),j=new ae().crossVectors(D,R).normalize().multiplyScalar(.5*N/W),B=new ae(s.cx+w.x,s.cy+w.y,s.lz+w.z+k0+(a?r.thickness:0));B.add(L).add(j),L.multiplyScalar(2),j.multiplyScalar(2),C.push(L.length()*j.length());const O=new ae,V=qr(n.ground,e.getMonth(),D,y),G=D.dot(o);for(let Q=0;Qc6||q<0)&&(k[Q][ie]+=V),G>0&&q<0&&(k[Q][ie]+=G*y)}}}}return{segmentIntensities:S,segmentUnitArea:C}}static computeFlatRoofSolarRadiationEnergy(e,n,o,r,i,a,l,s,c,u,d){const f=ye.dayOfYear(e),p=n.solarRadiationHeatmapGridCellSize??.5,g=new ln(0,0,l.rotation[2],"ZYX"),A=vi(o,f,u,li.SPHERE_MODEL),y=[],S=[];let C=Number.MAX_VALUE,P=Number.MAX_VALUE,v=-Number.MAX_VALUE,T=-Number.MAX_VALUE;for(const k of a)for(const D of k){const L=D.clone().applyEuler(g);L.x>v&&(v=L.x),L.xT&&(T=L.y),L.yArray(x).fill(0));y.push(H),S.push(b*R);const F=a[0][0].z,E=new ae(C+p/2,P+p/2,l.lz+F+k0+(i?r.thickness:0)),N=new ae(0,0,E.z),U=qr(n.ground,e.getMonth(),ko,A),W=ko.dot(o);for(let k=0;kc6||L<0)&&(H[k][D]+=U),W>0&&L<0&&(H[k][D]+=W*A)}}return{segmentIntensities:y,segmentUnitArea:S}}static computeGableRoofSolarRadiationEnergy(e,n,o,r,i,a,l,s,c,u,d){const f=ye.dayOfYear(e),p=n.solarRadiationHeatmapGridCellSize??.5,g=new ln(0,0,l.rotation[2],"ZYX"),A=vi(o,f,u,li.SPHERE_MODEL),y=[],S=[];for(const[C,P]of a.entries()){const v=r.id+"-"+C,T=P[0].clone().applyEuler(g),w=P[1].clone().applyEuler(g),x=P[2].clone().applyEuler(g),b=new ae().subVectors(w,T),R=new ae().subVectors(x,T),H=new ae().subVectors(x,w),F=b.length(),E=new ae().crossVectors(R,H).length()/F,N=Math.max(2,Math.round(F/p)),U=Math.max(2,Math.round(E/p)),W=Array(N).fill(0).map(()=>Array(U).fill(0));y.push(W),b.normalize(),R.normalize(),H.normalize();const k=new ae().crossVectors(R,H).normalize(),D=b.multiplyScalar(.5*F/N),L=new ae().crossVectors(k,b).normalize().multiplyScalar(.5*E/U),j=new ae(l.cx+T.x,l.cy+T.y,l.lz+T.z+k0+(i?r.thickness:0));j.add(D).add(L),D.multiplyScalar(2),L.multiplyScalar(2),S.push(D.length()*L.length());const B=new ae,O=qr(n.ground,e.getMonth(),k,A),V=k.dot(o);for(let G=0;Gc6||ie<0)&&(W[G][$]+=O),V>0&&ie<0&&(W[G][$]+=V*A)}}}return{segmentIntensities:y,segmentUnitArea:S}}static isPointRoof(e,n,o,r){if(n&&n.length>0)for(const i of n){const a=bn.getAbsoluteWindowVerticesOnRoof(i,r),l=ye.getPoints(a);if(ye.isPointInside(e.x,e.y,l))return!1}if(o&&o.length>0)for(const i of o){const a=bn.getAbsoluteSolarPanelVerticesOnRoof(i,r),l=ye.getPoints(a);if(ye.isPointInside(e.x,e.y,l))return!1}return!0}}const SBo=be.memo(({city:t})=>{const e=M(pn),n=dt(bh),o=M(yA),r=M(Gr),i=M(s3),a=M(t5),l=Cn(Ige),s=Cn(mW),c=Cn(Dge),u=Cn(V8t),d=Cn(G8t),f=Cn(J8t),p=M(oa),g=dt(AW),A=dt(Ewt),y=dt(Xq),S=dt(Fwt),C=M.getState().world,P=M.getState().elements,v=C.noAnimationForThermalSimulation,T=C.highestTemperatureTimeInMinutes??900,w=m.useRef(0),x=m.useRef(!1),b=m.useRef(new Date(C.date)),R=m.useRef(0),H=m.useRef(!1),F=m.useRef(new Date(C.date)),E=m.useRef(0),N=m.useRef({high:20,low:0}),U=m.useRef(20),W=m.useRef(20),k=m.useRef(new Map),D=m.useRef(new Map),L=m.useRef(new Map),j=m.useRef([]),B=m.useRef([]),O=m.useRef(),V=m.useRef(),G=m.useRef(0),Q=m.useRef(new Map),$=$t(),ie=u1(t),q=new Date(C.date),se=t?ie==null?void 0:ie.elevation:0,Z=C.monthlyIrradianceLosses??new Array(12).fill(.05),ee=C.timesPerHour??4,te=60/ee,oe=C.daysPerYear??6,de=12/oe,{scene:he}=ri(),pe=m.useMemo(()=>new l0,[]),me=()=>a9(1,Xye(q),yN(q),ye.toRadians(C.latitude)).normalize(),le=(Be,$e,wt)=>{if(j.current.length>1){B.current.length=0,pe.set($e,wt);const vt=j.current.filter(Rt=>Rt.uuid!==Be);if(pe.intersectObjects(vt,!1,B.current),B.current.length>0)return B.current[0].distance}return-1},Te=()=>{const Be=he.children.filter($e=>$e.name==="Content");if(Be.length>0){const $e=Be[0].children;j.current.length=0;for(const wt of $e)ye.fetchSimulationElements(wt,j.current)}},ge=Be=>{if(ie){N.current=rb(q,ie.lowestTemperatures,ie.highestTemperatures);const $e=ye.minutesIntoDay(Be);U.current=ob(N.current.high,N.current.low,C.diurnalTemperatureModel??y2.Sinusoidal,T,dl(Be,C.latitude),$e),W.current=wZe(C.latitude,ye.dayOfYear(q),$e,ie.lowestTemperatures,ie.highestTemperatures,T,.5*(N.current.high-N.current.low),C.ground.thermalDiffusivity??.05,ije)}},Se=(Be,$e)=>{let wt=k.current.get(Be);wt||(wt=new Array(24).fill(0),k.current.set(Be,wt)),wt[q.getHours()]+=$e},Re=(Be,$e)=>{let wt=D.current.get(Be);wt||(wt=new Array(24).fill(0),D.current.set(Be,wt)),wt[q.getHours()]+=$e},De=(Be,$e)=>{let wt=L.current.get(Be);wt||(wt=new Array(24).fill(0),L.current.set(Be,wt)),wt[q.getHours()]+=$e},Ae=()=>{var Be,$e,wt,vt;for(const Rt of P){if(ye.onBuildingEnvelope(Rt)&&((Be=k.current.get(Rt.id))==null||Be.fill(0)),Rt.type===z.Roof)for(const Gt of k.current.keys())Gt!==Rt.id&&Gt.startsWith(Rt.id)&&(($e=k.current.get(Gt))==null||$e.fill(0));Rt.type===z.Foundation&&((wt=D.current.get(Rt.id))==null||wt.fill(0),(vt=L.current.get(Rt.id))==null||vt.fill(0))}},ue=()=>{Q.current.clear()};m.useEffect(()=>{if(g)if(v&&!ye.hasMovingParts(P))fe();else return Te(),ve(),w.current=requestAnimationFrame(Pe),()=>{cancelAnimationFrame(w.current),x.current||(gn(Y.t("message.SimulationAborted",$)),e(Be=>{Be.world.date=b.current.toLocaleString("en-US")}),dt.getState().set(Be=>{Be.simulationInProgress=!1,Be.simulationPaused=!1})),H.current=!1}},[g]),m.useEffect(()=>{H.current=A,A?(F.current=new Date(q.getTime()),cancelAnimationFrame(w.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",$))):(n("simulationPaused",!1),q.setHours(q.getHours(),q.getMinutes()+te),Pe())},[A]);const fe=()=>{Je()},ve=()=>{H.current?(q.setTime(F.current.getTime()),H.current=!1):(b.current=new Date(C.date),E.current=ye.dayOfYear(q),q.setHours(0,te/2)),x.current=!1,Ae(),ue()},we=()=>{for(const Be of P){if(ye.onBuildingEnvelope(Be)||Be.type===z.SolarPanel){const $e=k.current.get(Be.id);$e&&u(Be.id,[...$e]);const wt=Q.current.get(Be.id);wt&&l(Be.id,wt.map(vt=>[...vt]))}if(Be.type===z.Roof){for(const $e of k.current.keys())if($e!==Be.id&&$e.startsWith(Be.id)){const wt=k.current.get($e);wt&&u($e,[...wt]);const vt=Q.current.get($e);vt&&l($e,vt.map(Rt=>[...Rt]))}}if(Be.type===z.Foundation){let $e=D.current.get(Be.id);$e&&d(Be.id,[...$e]),$e=L.current.get(Be.id),$e&&f(Be.id,[...$e])}}dt.getState().set(Be=>{Be.flagOfDailySimulation=!Be.flagOfDailySimulation,Be.runYearlyThermalSimulation||(Be.showSolarRadiationHeatmap=!0,Be.showHeatFluxes=!0)}),p&&!y&&setTimeout(()=>{e(Be=>{const $e=Cn.getState().totalBuildingHeater,wt=Cn.getState().totalBuildingAc,vt=Cn.getState().totalBuildingSolarPanel;Be.actionInfo={name:"Daily Building Energy Analysis Completed",result:{Heater:$e.toFixed(2),AC:wt.toFixed(2),SolarPanel:vt.toFixed(2),Net:($e+wt-vt).toFixed(2)},timestamp:new Date().getTime()}})},10)},Pe=()=>{if(g&&!H.current){if(q.getMinutes()+q.getHours()*60+(ye.dayOfYear(q)-E.current)*T2+te>T2){Je(),cancelAnimationFrame(w.current),e($e=>{$e.world.date=b.current.toLocaleString("en-US"),$e.viewState.showDailyBuildingEnergyPanel=!0,$e.selectedFloatingWindow="dailyBuildingEnergyPanel"}),dt.getState().set($e=>{$e.runDailyThermalSimulation=!1,$e.simulationPaused=!1,$e.simulationInProgress=!1}),gn(Y.t("message.SimulationCompleted",$)),x.current=!0,we();return}e($e=>{$e.world.date=q.toLocaleString("en-US")}),Je(),w.current=requestAnimationFrame(Pe),q.setHours(q.getHours(),q.getMinutes()+te)}},[Ie,Me]=m.useState(q.getMonth());m.useEffect(()=>{setTimeout(()=>{Te()},200)},[Ie]),m.useEffect(()=>{if(y)if(dt.getState().set(Be=>{Be.showSolarRadiationHeatmap=!1,Be.showHeatFluxes=!1}),v&&!ye.hasMovingParts(P))setTimeout(()=>{},50);else return ze(),Me(q.getMonth()),Te(),w.current=requestAnimationFrame(Ne),()=>{cancelAnimationFrame(w.current),x.current||(gn(Y.t("message.SimulationAborted",$)),e(Be=>{Be.world.date=b.current.toLocaleString("en-US")}),dt.getState().set(Be=>{Be.simulationInProgress=!1,Be.simulationPaused=!1})),H.current=!1}},[y]),m.useEffect(()=>{H.current=S,S?(F.current=new Date(q.getTime()),cancelAnimationFrame(w.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",$))):(n("simulationPaused",!1),q.setHours(q.getHours(),q.getMinutes()+te),Ne())},[S]);const ze=()=>{H.current?(q.setTime(F.current.getTime()),H.current=!1):(b.current=new Date(C.date),R.current=0,q.setMonth(0,22),E.current=ye.dayOfYear(q),q.setHours(0,te/2),e(Be=>{Be.viewState.showYearlyBuildingEnergyPanel=!0,Be.selectedFloatingWindow="yearlyBuildingEnergyPanel",Be.world.date=q.toLocaleString("en-US")})),Ae(),ue(),x.current=!1},Ne=()=>{y&&!H.current&&(q.getMinutes()+q.getHours()*60+(ye.dayOfYear(q)-E.current)*T2{$e.world.date=q.toLocaleString("en-US")}),Je(),q.setHours(q.getHours(),q.getMinutes()+te),w.current=requestAnimationFrame(Ne)):(we(),R.current++,R.current===oe?(cancelAnimationFrame(w.current),setTimeout(()=>{e($e=>{$e.world.date=b.current.toLocaleString("en-US")})},10),dt.getState().set($e=>{$e.runYearlyThermalSimulation=!1,$e.simulationInProgress=!1,$e.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",$)),x.current=!0,p&&setTimeout(()=>{e($e=>{const wt=Cn.getState().totalBuildingHeater,vt=Cn.getState().totalBuildingAc,Rt=Cn.getState().totalBuildingSolarPanel;$e.actionInfo={name:"Yearly Building Energy Analysis Completed",result:{Heater:wt.toFixed(2),AC:vt.toFixed(2),SolarPanel:Rt.toFixed(2),Net:(wt+vt-Rt).toFixed(2)},timestamp:new Date().getTime()}})},10)):(q.setMonth(R.current*de,22),q.setHours(0,te/2),Me(q.getMonth()),E.current=ye.dayOfYear(q),Ae(),ue(),w.current=requestAnimationFrame(Ne))))},Je=()=>{ge(q),V.current=dl(q,C.latitude);const Be=V.current.daylight()/60;G.current=Be>Et?ie.sunshineHours[q.getMonth()]/(30*Be*ee):0,O.current=me();for(const $e of P)switch($e.type){case z.Door:{st($e);break}case z.Window:{ke($e),Oe($e);break}case z.Wall:{je($e);break}case z.Roof:{const wt=$e;Ye(wt),xt(wt);break}case z.SolarPanel:{Ee($e);break}}},Ue=(Be,$e)=>{let wt=$e.efficiency;return $e.cellType==="Monocrystalline"&&(wt*=.95),wt*(1+$e.pmaxTC*(Be-25))},nt=()=>{if(!V.current)throw new Error("sun minutes not set");const Be=V.current.daylight()/60;return Be>Et?ie.sunshineHours[q.getMonth()]/(30*Be*ee):0},We=Be=>{if(!a(Be.pvModelName))throw new Error("PV model not found");return Be.lx*Be.ly*(Be.inverterEfficiency??.95)*(1-Z[q.getMonth()])},Ee=Be=>{const $e=o(Be);if($e){const wt=r(Be);if(wt){const vt=a(Be.pvModelName);if(O.current&&O.current.z>0){const Rt=ll.computeSolarPanelOutput(q,C,O.current,vt,Be,wt,$e,se,le),Gt=Ue(U.current,vt)*nt()*We(Be);if(De($e.id,Rt.average*Gt),g){for(let pt=0;pt{var wt;if(Be.interior)return;const $e=o(Be);if($e){const vt=r(Be);if(vt){const Rt=((wt=$e.hvacSystem)==null?void 0:wt.thermostatSetpoint)??20,Gt=ye.getWindowArea(Be,Be.parentType===z.Roof?void 0:vt),At=U.current-Rt;Be.empty?Se(Be.id,At*Gt*SO*.001/ee):Se(Be.id,At*Gt*(Be.uValue??X4)*.001/ee)}}},Oe=Be=>{if(Be.interior)return;const $e=o(Be);if($e){const wt=r(Be);if(wt){let vt=0;if(Be.parentType===z.Roof){const Rt=s(wt.id);if(!Rt)return;for(let Gt=0;Gt0){const At=ll.computeRoofWindowSolarRadiationEnergy(q,C,O.current,Be,wt,$e,se,le);for(let pt=0;pt0){const Rt=ll.computeWallWindowSolarRadiationEnergy(q,C,O.current,Be,wt,$e,se,le);for(let Gt=0;Gt{var wt;if(Be.interior)return;const $e=o(Be);if($e){const vt=r(Be);if(vt){const Rt=((wt=$e.hvacSystem)==null?void 0:wt.thermostatSetpoint)??20,Gt=ye.getDoorArea(Be,vt);if(Be.filled){const At=Z7(Be);let pt=0;if(O.current&&O.current.z>0){const ct=ll.computeDoorSolarRadiationEnergy(q,C,O.current,Be,vt,$e,se,le);for(let It=0;It{var wt;const $e=o(Be);if($e){const vt=Be.fill!==Fl.Empty&&Be.wallStructure===gc.Default,Rt=((wt=$e.hvacSystem)==null?void 0:wt.thermostatSetpoint)??20;if(vt){const Gt=Be.fill===Fl.Partial&&!ye.isPartialWallFull(Be),At=ye.getWallVertices(Be,0),pt=Gt?ye.getPartialWallVertices(Be,0):At,Wt=ye.getPolygonArea(At);let ht=Gt?ye.getPolygonArea(pt):Wt;const ct=i(z.Window,Be.id),It=i(z.Door,Be.id),Ft=Z7(Be);let Ve=0;if(O.current&&O.current.z>0){const at=(Gt?pt.length:At.length)===4,Ge=i(z.SolarPanel,Be.id),yt=ll.computeWallSolarRadiationEnergy(q,C,O.current,Be,$e,ct,It,Ge,at?0:1,se,le);for(let Pt=0;Pt0)for(const at of ct)ht-=ye.getWindowArea(at,Be);if(It&&It.length>0)for(const at of It)ht-=at.lx*at.lz*Be.lx*Be.lz;const ft=ye.isZero(Ve)||ye.isZero(Ft)?0:Ve*Ft/((Be.volumetricHeatCapacity??.5)*ht*Be.ly);let rt=(U.current+ft-Rt)*ht/(Be.rValue??p6)*.001/ee;Gt&&Be.openToOutside&&(rt+=(U.current-Rt)*(Wt-ht)*SO*.001/ee),Se(Be.id,rt)}else if(Be.openToOutside){const Gt=ye.getWallVertices(Be,0),At=ye.getPolygonArea(Gt),pt=U.current-Rt;Se(Be.id,pt*At*SO*.001/ee)}}},xt=Be=>{var Gt;const $e=o(Be);if(!$e)return;const wt=((Gt=$e.hvacSystem)==null?void 0:Gt.thermostatSetpoint)??20,vt=ye.calculateBuildingArea(Be),Rt=W.current-wt;Se($e.id,Rt*vt/($e.rValue??i8)*.001/ee)},gt=(Be,$e,wt)=>{const vt=1/(Be.rValue??a8),Rt=1/(Be.ceilingRValue??w6);return(vt*$e+Rt*wt)/(vt+Rt)},Ye=Be=>{var Rt;const $e=o(Be);if(!$e)return;const wt=s(Be.id);if(!wt)return;let vt;switch(Be.roofType){case Go.Pyramid:vt=it(Be,wt,$e);break;case Go.Hip:vt=ut(Be,wt,$e);break;case Go.Gable:vt=Ze(Be,wt,$e);break;case Go.Gambrel:vt=Qe(Be,wt,$e);break;case Go.Mansard:vt=lt(Be,wt,$e);break}if(vt){const Gt=((Rt=$e.hvacSystem)==null?void 0:Rt.thermostatSetpoint)??20;let At=0;for(const[pt,Wt]of vt.entries()){const ct=(Wt.surfaceTemperature-(Be.ceiling?gt(Be,Wt.surfaceTemperature,Gt):Gt))*Wt.totalArea/(Be.rValue??a8)*.001/ee;Se(Be.id+"-"+pt,ct),At+=ct}Se(Be.id,At)}},it=(Be,$e,wt)=>{if(Be.roofType!==Go.Pyramid)throw new Error("roof is not pyramid");const vt=$e.length;if(vt===0)return;let Rt=!0;const Gt=$e[0][0].z;for(const Ve of $e)for(const ft of Ve)if(Math.abs(ft.z-Gt)>.01){Rt=!1;break}const At=Rt?1:vt,pt=i(z.Window,Be.id),Wt=[];if(Rt){let Ve=0;for(const ft of $e){const kt=[];for(const rt of ft)kt.push(ye.mapVector3ToPoint2(rt));Ve+=ye.getPolygonArea(kt)}if(pt.length>0){for(const ft of pt)Ve-=ft.lx*ft.lz;Ve<0&&(Ve=0)}Wt.push(Ve)}else for(const Ve of $e){let ft=ye.getTriangleArea(Ve[0],Ve[1],Ve[2]);if(pt.length>0){for(const kt of pt)bn.onSegment(Ve,kt.cx,kt.cy)&&(ft-=kt.lx*kt.lz);ft<0&&(ft=0)}Wt.push(ft)}const ht=Z7(Be),ct=Array(At).fill(0);if(O.current&&O.current.z>0){const Ve=i(z.SolarPanel,Be.id),ft=ll.computePyramidRoofSolarRadiationEnergy(q,C,O.current,Be,Rt,!0,$e,wt,pt,Ve,se,le);for(let kt=0;kt{if(Be.roofType!==Go.Hip)throw new Error("roof is not hip");const vt=$e.length;if(vt===0)return;let Rt=!0;const Gt=$e[0][0].z;for(const ft of $e)for(const kt of ft)if(Math.abs(kt.z-Gt)>.01){Rt=!1;break}const At=Rt?1:vt,pt=[],Wt=i(z.Window,Be.id);for(const ft of $e){let kt=0;if(ft.length===3?kt=ye.getTriangleArea(ft[0],ft[1],ft[2]):ft.length===4&&(kt=ye.getTriangleArea(ft[0],ft[1],ft[2])+ye.getTriangleArea(ft[2],ft[3],ft[0])),Wt.length>0){for(const rt of Wt)bn.onSegment(ft,rt.cx,rt.cy)&&(kt-=rt.lx*rt.lz);kt<0&&(kt=0)}pt.push(kt)}const ht=Rt?[pt.reduce((ft,kt)=>ft+kt,0)]:pt,ct=Z7(Be),It=Array(At).fill(0);if(O.current&&O.current.z>0){const ft=i(z.SolarPanel,Be.id),kt=ll.computeHipRoofSolarRadiationEnergy(q,C,O.current,Be,Rt,!0,$e,wt,Wt,ft,se,le);for(let rt=0;rt{if(Be.roofType!==Go.Gambrel)throw new Error("roof is not gambrel");const vt=$e.length;if(vt===0)return;let Rt=!0;const Gt=$e[0][0].z;for(const ft of $e)for(const kt of ft)if(Math.abs(kt.z-Gt)>.01){Rt=!1;break}const At=Rt?1:vt,pt=[],Wt=i(z.Window,Be.id);for(const ft of $e){let kt=ye.getTriangleArea(ft[0],ft[1],ft[2])+ye.getTriangleArea(ft[2],ft[3],ft[0]);if(Wt.length>0){for(const rt of Wt)bn.onSegment(ft,rt.cx,rt.cy)&&(kt-=rt.lx*rt.lz);kt<0&&(kt=0)}pt.push(kt)}const ht=Rt?[pt.reduce((ft,kt)=>ft+kt,0)]:pt,ct=Z7(Be),It=Array(At).fill(0);if(O.current&&O.current.z>0){const ft=i(z.SolarPanel,Be.id),kt=ll.computeGambrelRoofSolarRadiationEnergy(q,C,O.current,Be,Rt,!0,$e,wt,Wt,ft,se,le);for(let rt=0;rt{if(Be.roofType!==Go.Mansard)throw new Error("roof is not mansard");const vt=$e.length;if(vt===0)return;let Rt=!0;const Gt=$e[0][0].z;for(const at of $e)for(const Ge of at)if(Math.abs(Ge.z-Gt)>.01){Rt=!1;break}const At=Rt?1:vt,pt=[],Wt=i(z.Window,Be.id);for(let at=0;at0){for(const Pt of Wt)bn.onSegment(Ge,Pt.cx,Pt.cy)&&(yt-=Pt.lx*Pt.lz);yt<0&&(yt=0)}pt.push(yt)}const ht=$e[vt-1],ct=new Array;for(const at of ht)ct.push({x:at.x,y:at.y});let It=ye.getPolygonArea(ct);if(Wt.length>0){for(let at=Wt.length-1;at>=0;at--){const Ge=Wt[at];bn.onSegment(ht,Ge.cx,Ge.cy)&&(It-=Ge.lx*Ge.lz,Wt.splice(at,1))}It<0&&(It=0)}pt.push(It);const Ft=Rt?[pt.reduce((at,Ge)=>at+Ge,0)]:pt,Ve=Z7(Be),ft=Array(At).fill(0);if(O.current&&O.current.z>0){const at=i(z.SolarPanel,Be.id),Ge=ll.computeMansardRoofSolarRadiationEnergy(q,C,O.current,Be,Rt,!0,$e,wt,Wt,at,se,le);for(let yt=0;yt{if(Be.roofType!==Go.Gable)throw new Error("roof is not gable");const vt=$e.length;if(vt===0)return;const Rt=i(z.Window,Be.id),Gt=[];for(const ct of $e){let It=ye.getTriangleArea(ct[0],ct[1],ct[2])+ye.getTriangleArea(ct[2],ct[3],ct[0]);if(Rt.length>0){for(const Ft of Rt)bn.onSegment(ct,Ft.cx,Ft.cy)&&(It-=Ft.lx*Ft.lz);It<0&&(It=0)}Gt.push(It)}const At=Z7(Be),pt=Array(vt).fill(0);if(O.current&&O.current.z>0){const ct=i(z.SolarPanel,Be.id),It=ll.computeGableRoofSolarRadiationEnergy(q,C,O.current,Be,!0,$e,wt,Rt,ct,se,le);for(let Ft=0;Ft{const e=M.getState().world,n=M.getState().elements,o=M(Gr),r=M(yA),i=Cn(Ige),a=Cn(JBe),l=dt(Lge),s=Cn(Dge),{scene:c}=ri(),u=$t(),d=u1(t),f=new Date(e.date),p=t?d==null?void 0:d.elevation:0,g=60/e.timesPerHour,A=m.useMemo(()=>new l0,[]),y=e.solarRadiationHeatmapGridCellSize??.5,S=m.useRef([]),C=m.useRef([]);m.useEffect(()=>{l&&n&&n.length>0&&(a(),T(),dt.getState().set(B=>{B.runStaticSimulation=!1,B.simulationInProgress=!1,B.showSolarRadiationHeatmap=!0}),gn(Y.t("message.SimulationCompleted",u)))},[l]);const P=(B,O,V)=>{if(S.current.length>1){C.current.length=0,A.set(O,V);const G=S.current.filter(Q=>Q.uuid!==B);return A.intersectObjects(G,!1,C.current),C.current.length>0}return!1},v=()=>{const B=c.children.filter(O=>O.name==="Content");if(B.length>0){const O=B[0].children;S.current.length=0;for(const V of O)ye.fetchSimulationElements(V,S.current)}},T=()=>{v();for(const B of n)switch(B.type){case z.Foundation:{const O=B;x(O),O.solarStructure===Dn.UpdraftTower&&b(O);break}case z.Cuboid:{w(B);break}case z.SolarPanel:{R(B);break}case z.SolarWaterHeater:{H(B);break}case z.Wall:{F(B);break}case z.Door:{E(B);break}case z.Roof:{const O=B;switch(O.roofType){case Go.Pyramid:N(O);break;case Go.Gable:L(O);break;case Go.Gambrel:W(O);break;case Go.Mansard:U(O);break;case Go.Hip:k(O);break}break}}},w=B=>{const O=f.getFullYear(),V=f.getMonth(),G=f.getDate(),Q=ye.dayOfYear(f),$=B.lx,ie=B.ly,q=B.lz,se=Math.max(2,Math.round($/y)),Z=Math.max(2,Math.round(ie/y)),ee=Math.max(2,Math.round(q/y)),te=$/se,oe=ie/Z,de=q/ee,he=o(B);let pe=B.cx,me=B.cy,le=B.cz;if(he&&he.type===z.Cuboid){const ke=ye.getWorldDataById(B.id);pe=ke.pos.x,me=ke.pos.y,le=ke.pos.z}const Te=Array(se).fill(0).map(()=>Array(Z).fill(0)),ge=Array(se).fill(0).map(()=>Array(ee).fill(0)),Se=Array(se).fill(0).map(()=>Array(ee).fill(0));let Re=Array(Z).fill(0).map(()=>Array(ee).fill(0)),De=Array(Z).fill(0).map(()=>Array(ee).fill(0));const Ae=ko,ue=_p.clone().applyAxisAngle(ko,B.rotation[2]),fe=Yc.clone().applyAxisAngle(ko,B.rotation[2]),ve=Vp.clone().applyAxisAngle(ko,B.rotation[2]),we=Op.clone().applyAxisAngle(ko,B.rotation[2]),Pe=new ae;let Ie=0;const Me=new Kt(pe,me),ze=new Kt,Ne=me-ie/2,Je=me+ie/2,Ue=pe-$/2,nt=pe+$/2;for(let ke=0;ke<24;ke++)for(let Oe=0;Oe0){Ie++;const xt=vi(je,Q,p,li.SPHERE_MODEL);let gt=qr(e.ground,V,Ae,xt),Ye=Ae.dot(je),it=pe-$/2,ut=me-ie/2;const Qe=le+q/2;for(let lt=0;lt0&&(ze.set(it+(lt+.5)*te,ut+(Ze+.5)*oe),ze.rotateAround(Me,B.rotation[2]),Pe.set(ze.x,ze.y,Qe),P(B.id,Pe,je)||(Te[lt][Ze]+=Ye*xt));it=pe-$/2,ut=le-q/2,gt=qr(e.ground,V,ue,xt),Ye=ue.dot(je);for(let lt=0;lt0&&(ze.set(it+(lt+.5)*te,Ne),ze.rotateAround(Me,B.rotation[2]),Pe.set(ze.x,ze.y,ut+(Ze+.5)*de),P(B.id,Pe,je)||(ge[lt][Ze]+=Ye*xt));gt=qr(e.ground,V,fe,xt),Ye=fe.dot(je);for(let lt=0;lt0&&(ze.set(it+(lt+.5)*te,Je),ze.rotateAround(Me,B.rotation[2]),Pe.set(ze.x,ze.y,ut+(ee-(Ze+.5))*de),P(B.id,Pe,je)||(Se[lt][Ze]+=Ye*xt));it=me-ie/2,ut=le-q/2,gt=qr(e.ground,V,ve,xt),Ye=ve.dot(je);for(let lt=0;lt0&&(ze.set(Ue,it+(lt+.5)*oe),ze.rotateAround(Me,B.rotation[2]),Pe.set(ze.x,ze.y,ut+(Ze+.5)*de),P(B.id,Pe,je)||(Re[lt][Ze]+=Ye*xt));gt=qr(e.ground,V,we,xt),Ye=we.dot(je);for(let lt=0;lt0&&(ze.set(nt,it+(lt+.5)*oe),ze.rotateAround(Me,B.rotation[2]),Pe.set(ze.x,ze.y,ut+(Ze+.5)*de),P(B.id,Pe,je)||(De[lt][Ze]+=Ye*xt))}}Re=ye.transpose(Re),De=ye.transpose(De);const We=Ie*g/60,Ee=We>Et?d.sunshineHours[V]/(30*We*e.timesPerHour):0;j(Te,Ee),j(ge,Ee),j(Se,Ee),j(Re,Ee),j(De,Ee),i(B.id+"-top",Te),i(B.id+"-south",ge),i(B.id+"-north",Se),i(B.id+"-west",Re),i(B.id+"-east",De)},x=B=>{const O=f.getFullYear(),V=f.getMonth(),G=f.getDate(),Q=ye.dayOfYear(f),$=B.lx,ie=B.ly,q=B.lz,se=Math.max(2,Math.round($/y)),Z=Math.max(2,Math.round(ie/y)),ee=$/se,te=ie/Z,oe=B.cx-$/2,de=B.cy-ie/2,he=new Kt(B.cx,B.cy),pe=new ae,me=Array(se).fill(0).map(()=>Array(Z).fill(0));let le=0;for(let Se=0;Se<24;Se++)for(let Re=0;Re0){le++;const ue=vi(Ae,Q,p,li.SPHERE_MODEL),fe=qr(e.ground,V,ko,ue),ve=ko.dot(Ae),we=new Kt;for(let Pe=0;Pe0&&(we.set(oe+(Pe+.5)*ee,de+(Ie+.5)*te),we.rotateAround(he,B.rotation[2]),pe.set(we.x,we.y,q),P(B.id,pe,Ae)||(me[Pe][Ie]+=ve*ue))}}const Te=le*g/60,ge=Te>Et?d.sunshineHours[V]/(30*Te*e.timesPerHour):0;j(me,ge),i(B.id,me)},b=B=>{const O=B.solarUpdraftTower;if(!O)return;const V=f.getFullYear(),G=f.getMonth(),Q=f.getDate(),$=ye.dayOfYear(f),ie=O.collectorRadius,q=Math.max(2,Math.round(ie*2/y)),se=B.cx-ie+y/2,Z=B.cy-ie+y/2,ee=B.lz+O.collectorHeight,te=Array(q).fill(0).map(()=>Array(q).fill(0)),oe=new ae(0,0,ee),de=ie*ie;let he=0,pe,me;for(let ge=0;ge<24;ge++)for(let Se=0;Se0){he++;const Ae=vi(De,$,p,li.SPHERE_MODEL),ue=qr(e.ground,G,ko,Ae),fe=ko.dot(De);for(let ve=0;vede)&&(te[ve][we]+=ue,fe>0&&(P(B.id+"-sut",oe,De)||(te[ve][we]+=fe*Ae)))}}}const le=he*g/60,Te=le>Et?d.sunshineHours[G]/(30*le*e.timesPerHour):0;j(te,Te),i(B.id+"-sut",te)},R=B=>{if(B.trackerType!==Ll.NO_TRACKER)throw new Error("trackers cannot use static simulation");let O=o(B);if(!O)throw new Error("parent of solar panel does not exist");const V=B.parentType===z.Roof,G=B.parentType===z.Wall;if(V&&(O=r(O),!O))throw new Error("foundation of solar panel does not exist");const Q=G?ye.absoluteCoordinates(B.cx,B.cy,B.cz,O,r(B),B.lz):ye.absoluteCoordinates(B.cx,B.cy,B.cz,O,void 0,void 0,!0),$=new ae().fromArray(B.normal);G&&$.applyEuler(new ln(0,0,O.relativeAngle));const ie=O.rotation[2];let q=ie+(G?0:B.relativeAzimuth),se=B.tiltAngle,Z=!0;if(V&&(Q.z=B.cz+B.lz+.02+O.cz,ye.isZero(B.rotation[0])?Q.z+=B.poleHeight:(se=B.rotation[0],q=ie,Z=!1)),G&&!ye.isZero(B.tiltAngle)){const Me=O,ze=r(O),Je=(ze?ze.rotation[2]+Me.relativeAngle:Me.relativeAngle)-Qt,Ue=B.ly*Math.abs(Math.sin(B.tiltAngle))/2;Q.x+=Ue*Math.cos(Je),Q.y+=Ue*Math.sin(Je)}const ee=new ln(V&&!Z?0:se,0,q,"ZYX");$.applyEuler(ee);const te=f.getFullYear(),oe=f.getMonth(),de=f.getDate(),he=ye.dayOfYear(f),pe=B.lx,me=B.ly,le=Math.max(2,Math.round(B.lx/y)),Te=Math.max(2,Math.round(B.ly/y)),ge=pe/le,Se=me/Te,Re=Q.x-(pe-y)/2,De=Q.y-(me-y)/2,Ae=V||G?Q.z:O.lz+B.poleHeight+B.lz,ue=new Kt(Q.x,Q.y),fe=new ae,ve=Array(le).fill(0).map(()=>Array(Te).fill(0));let we=0;if(V&&!Z&&(ee.x=B.rotation[0],ee.z=B.rotation[2]+ie),G){const Me=o(B);Me&&(ee.x=Qt+B.tiltAngle,ee.z=O.relativeAngle+Me.rotation[2])}for(let Me=0;Me<24;Me++)for(let ze=0;ze0){we++;const Ue=vi(Je,he,p,li.SPHERE_MODEL),nt=qr(e.ground,oe,$,Ue),We=$.dot(Je),Ee=new Kt,ke=new ae;for(let Oe=0;Oe0&&(Ee.set(Re+Oe*ge,De+st*Se),ke.set(Ee.x-ue.x,Ee.y-ue.y,0),ke.applyEuler(ee),fe.set(Q.x+ke.x,Q.y+ke.y,Ae+ke.z),P(B.id,fe,Je)||(ve[Oe][st]+=We*Ue))}}const Pe=we*g/60,Ie=Pe>Et?d.sunshineHours[oe]/(30*Pe*e.timesPerHour):0;j(ve,Ie),i(B.id,ve)},H=B=>{const O=o(B);if(!O)throw new Error("parent of solar water heater does not exist");const V=r(O);if(!V)throw new Error("foundation of solar water heater does not exist");const G=ye.absoluteCoordinates(B.cx,B.cy,B.cz,V,void 0,void 0,!0),Q=new ln,$=(B.lz-B.waterTankRadius)/2,ie=Math.atan2(B.lz-B.waterTankRadius,B.ly);ye.isZero(B.rotation[0])?(Q.set(ie,0,B.relativeAzimuth+V.rotation[2],"ZXY"),G.z+=$):(Q.set(B.rotation[0]+ie,0,B.rotation[2]+V.rotation[2],"ZXY"),G.add(new ae(0,0,$).applyEuler(Q)));const se=new ae(0,0,1).applyEuler(Q),Z=f.getFullYear(),ee=f.getMonth(),te=f.getDate(),oe=ye.dayOfYear(f),de=B.lx,he=Math.hypot(B.ly,B.lz-B.waterTankRadius),pe=Math.max(2,Math.round(B.lx/y)),me=Math.max(2,Math.round(B.ly/y)),le=de/pe,Te=he/me,ge=-(de-y)/2,Se=-(he-y)/2,Re=Array(pe).fill(0).map(()=>Array(me).fill(0));let De=0;for(let fe=0;fe<24;fe++)for(let ve=0;ve0){De++;const Ie=vi(Pe,oe,p,li.SPHERE_MODEL),Me=qr(e.ground,ee,se,Ie),ze=se.dot(Pe),Ne=new Kt,Je=new ae;for(let Ue=0;Ue0&&(Ne.set(ge+Ue*le,Se+nt*Te),Je.set(Ne.x,Ne.y,0).applyEuler(Q).add(G),P(B.id,Je,Pe)||(Re[Ue][nt]+=ze*Ie))}}const Ae=De*g/60,ue=Ae>Et?d.sunshineHours[ee]/(30*Ae*e.timesPerHour):0;j(Re,ue),i(B.id,Re)},F=B=>{const O=r(B);if(!O)throw new Error("foundation of wall not found");const V=f.getFullYear(),G=f.getMonth(),Q=f.getDate(),$=ye.dayOfYear(f),ie=B.lx,q=ye.getHighestPointOfWall(B),se=Math.max(2,Math.round(ie/y)),Z=Math.max(2,Math.round(q/y)),ee=ie/se,te=q/Z,oe=O.rotation[2]+B.relativeAngle,de=ye.wallAbsolutePosition(new ae(B.cx,B.cy,q/2),O).setZ(q/2+O.lz),he=new ae(Math.cos(oe-Qt),Math.sin(oe-Qt),0),pe=new ae,me=Array(se).fill(0).map(()=>Array(Z).fill(0));let le=0;const Te=ee*Math.cos(oe),ge=ee*Math.sin(oe),Se=ye.getWallVertices(B,2),Re=(q-B.lz)/2;for(let ue=0;ue<24;ue++)for(let fe=0;fe0){le++;const Pe=vi(we,$,p,li.SPHERE_MODEL),Ie=qr(e.ground,G,he,Pe),Me=he.dot(we);for(let ze=0;ze0&&(pe.set(de.x+Je*Te,de.y+Je*ge,de.z+Ue*te),P(B.id,pe,we)||(me[ze][Ne]+=Me*Pe)))}}}const De=le*g/60,Ae=De>Et?d.sunshineHours[G]/(30*De*e.timesPerHour):0;j(me,Ae),i(B.id,me)},E=B=>{const O=r(B);if(!O)throw new Error("foundation of door not found");const V=o(B);if(!V)throw new Error("parent of door not found");const G=V,Q=f.getFullYear(),$=f.getMonth(),ie=f.getDate(),q=ye.dayOfYear(f),se=B.lx*G.lx,Z=B.lz*G.lz,ee=Math.max(2,Math.round(se/y)),te=Math.max(2,Math.round(Z/y)),oe=se/ee,de=Z/te,he=O.rotation[2]+G.relativeAngle,me=ye.wallAbsolutePosition(new ae(G.cx,G.cy,G.cz),O).setZ(G.lz/2+O.lz).clone().add(new ae(B.cx*G.lx,0,B.cz*G.lz)),le=new ae(Math.cos(he-Qt),Math.sin(he-Qt),0),Te=new ae,ge=Array(ee).fill(0).map(()=>Array(te).fill(0));let Se=0;const Re=oe*Math.cos(he),De=oe*Math.sin(he);for(let fe=0;fe<24;fe++)for(let ve=0;ve0){Se++;const Ie=vi(Pe,q,p,li.SPHERE_MODEL),Me=qr(e.ground,$,le,Ie),ze=le.dot(Pe);if(B.doorType===Rd.Arched)for(let Ne=0;Ne0&&(P(B.id,Te,Pe)||(ge[Ne][Je]+=ze*Ie)))}else for(let Ne=0;Ne0&&(Te.set(me.x+Ue*Re,me.y+Ue*De,me.z+nt*de),P(B.id,Te,Pe)||(ge[Ne][Je]+=ze*Ie))}}}const Ae=Se*g/60,ue=Ae>Et?d.sunshineHours[$]/(30*Ae*e.timesPerHour):0;j(ge,ue),i(B.id,ge)},N=B=>{if(B.roofType!==Go.Pyramid)throw new Error("roof is not pyramid");const O=r(B);if(!O)throw new Error("foundation of wall not found");const V=s(B.id);if(!V||V.length===0)return;let G=!0;const Q=V[0][0].z;for(const $ of V)for(const ie of $)if(Math.abs(ie.z-Q)>.01){G=!1;break}if(G)D(B,O,V);else{const $=f.getFullYear(),ie=f.getMonth(),q=f.getDate(),se=ye.dayOfYear(f),Z=new ln(0,0,O.rotation[2],"ZYX");for(const[ee,te]of V.entries()){const oe=B.id+"-"+ee,de=te[0].clone().applyEuler(Z),he=te[1].clone().applyEuler(Z),pe=te[2].clone().applyEuler(Z),me=new ae().subVectors(he,de),le=new ae().subVectors(pe,de),Te=new ae().subVectors(pe,he),ge=me.length(),Se=new ae().crossVectors(le,Te).length()/ge,Re=Math.max(2,Math.round(ge/y)),De=Math.max(2,Math.round(Se/y)),Ae=Array(Re).fill(0).map(()=>Array(De).fill(0));me.normalize(),le.normalize(),Te.normalize();const ue=new ae().crossVectors(le,Te).normalize(),fe=me.multiplyScalar(.5*ge/Re),ve=new ae().crossVectors(ue,me).normalize().multiplyScalar(.5*Se/De),we=new ae(O.cx+de.x,O.cy+de.y,O.lz+de.z+k0);we.add(fe).add(ve),fe.multiplyScalar(2),ve.multiplyScalar(2);let Pe=0;const Ie=new ae;for(let Ne=0;Ne<24;Ne++)for(let Je=0;Je0){Pe++;const We=vi(nt,se,p,li.SPHERE_MODEL),Ee=qr(e.ground,ie,ue,We),ke=ue.dot(nt);for(let Oe=0;Oe0&&(Ie.copy(we).add(st).add(ve.clone().multiplyScalar(je)),P(oe,Ie,nt)||(Ae[Oe][je]+=ke*We))}}}const Me=Pe*g/60,ze=Me>Et?d.sunshineHours[ie]/(30*Me*e.timesPerHour):0;j(Ae,ze),i(oe,Ae)}}},U=B=>{if(B.roofType!==Go.Mansard)throw new Error("roof is not mansard");const O=r(B);if(!O)throw new Error("foundation of wall not found");const V=s(B.id);if(!V||V.length===0)return;let G=!0;const Q=V[0][0].z;for(const $ of V)for(const ie of $)if(Math.abs(ie.z-Q)>.01){G=!1;break}if(G)D(B,O,V);else{const $=f.getFullYear(),ie=f.getMonth(),q=f.getDate(),se=ye.dayOfYear(f),Z=new ln(0,0,O.rotation[2],"ZYX");for(const[ee,te]of V.entries()){const oe=B.id+"-"+ee;if(ee===V.length-1){let de=Number.MAX_VALUE,he=Number.MAX_VALUE,pe=-Number.MAX_VALUE,me=-Number.MAX_VALUE;for(const Pe of te){const Ie=Pe.clone().applyEuler(Z);Ie.x>pe&&(pe=Ie.x),Ie.xme&&(me=Ie.y),Ie.yArray(ge).fill(0)),Ae=new ae(de+y/2,he+y/2,O.lz+le+k0);let ue=0;const fe=new ae(0,0,Ae.z);for(let Pe=0;Pe<24;Pe++)for(let Ie=0;Ie0){ue++;const Ne=vi(ze,se,p,li.SPHERE_MODEL),Je=qr(e.ground,ie,ko,Ne),Ue=ko.dot(ze);for(let nt=0;nt0&&(fe.y=Ae.y+We*Re,P(oe,fe,ze)||(De[nt][We]+=Ue*Ne))}}}const ve=ue*g/60,we=ve>Et?d.sunshineHours[ie]/(30*ve*e.timesPerHour):0;j(De,we),i(oe,De)}else{const de=te[0].clone().applyEuler(Z),he=te[1].clone().applyEuler(Z),pe=te[2].clone().applyEuler(Z),me=new ae().subVectors(he,de),le=new ae().subVectors(pe,de),Te=new ae().subVectors(pe,he),ge=me.length(),Se=new ae().crossVectors(le,Te).length()/ge,Re=Math.max(2,Math.round(ge/y)),De=Math.max(2,Math.round(Se/y)),Ae=Array(Re).fill(0).map(()=>Array(De).fill(0));me.normalize(),le.normalize(),Te.normalize();const ue=new ae().crossVectors(le,Te).normalize(),fe=me.multiplyScalar(.5*ge/Re),ve=new ae().crossVectors(ue,me).normalize().multiplyScalar(.5*Se/De),we=new ae(O.cx+de.x,O.cy+de.y,O.lz+de.z+k0);we.add(fe).add(ve),fe.multiplyScalar(2),ve.multiplyScalar(2);let Pe=0;const Ie=new ae;for(let Ne=0;Ne<24;Ne++)for(let Je=0;Je0){Pe++;const We=vi(nt,se,p,li.SPHERE_MODEL),Ee=qr(e.ground,ie,ue,We),ke=ue.dot(nt);for(let Oe=0;Oe0&&(Ie.copy(we).add(st).add(ve.clone().multiplyScalar(je)),P(oe,Ie,nt)||(Ae[Oe][je]+=ke*We))}}}const Me=Pe*g/60,ze=Me>Et?d.sunshineHours[ie]/(30*Me*e.timesPerHour):0;j(Ae,ze),i(oe,Ae)}}}},W=B=>{if(B.roofType!==Go.Gambrel)throw new Error("roof is not gambrel");const O=r(B);if(!O)throw new Error("foundation of wall not found");const V=s(B.id);if(!V||V.length===0)return;let G=!0;const Q=V[0][0].z;for(const $ of V)for(const ie of $)if(Math.abs(ie.z-Q)>.01){G=!1;break}if(G)D(B,O,V);else{const $=f.getFullYear(),ie=f.getMonth(),q=f.getDate(),se=ye.dayOfYear(f),Z=new ln(0,0,O.rotation[2],"ZYX");for(const[ee,te]of V.entries()){const oe=B.id+"-"+ee,de=te[0].clone().applyEuler(Z),he=te[1].clone().applyEuler(Z),pe=te[2].clone().applyEuler(Z),me=new ae().subVectors(he,de),le=new ae().subVectors(pe,de),Te=new ae().subVectors(pe,he),ge=me.length(),Se=new ae().crossVectors(le,Te).length()/ge,Re=Math.max(2,Math.round(ge/y)),De=Math.max(2,Math.round(Se/y)),Ae=Array(Re).fill(0).map(()=>Array(De).fill(0));me.normalize(),le.normalize(),Te.normalize();const ue=new ae().crossVectors(le,Te).normalize(),fe=me.multiplyScalar(.5*ge/Re),ve=new ae().crossVectors(ue,me).normalize().multiplyScalar(.5*Se/De),we=new ae(O.cx+de.x,O.cy+de.y,O.lz+de.z+k0);we.add(fe).add(ve),fe.multiplyScalar(2),ve.multiplyScalar(2);let Pe=0;const Ie=new ae;for(let Ne=0;Ne<24;Ne++)for(let Je=0;Je0){Pe++;const We=vi(nt,se,p,li.SPHERE_MODEL),Ee=qr(e.ground,ie,ue,We),ke=ue.dot(nt);for(let Oe=0;Oe0&&(Ie.copy(we).add(st).add(ve.clone().multiplyScalar(je)),P(oe,Ie,nt)||(Ae[Oe][je]+=ke*We))}}}const Me=Pe*g/60,ze=Me>Et?d.sunshineHours[ie]/(30*Me*e.timesPerHour):0;j(Ae,ze),i(oe,Ae)}}},k=B=>{if(B.roofType!==Go.Hip)throw new Error("roof is not hip");const O=r(B);if(!O)throw new Error("foundation of wall not found");const V=s(B.id);if(!V||V.length===0)return;let G=!0;const Q=V[0][0].z;for(const $ of V)for(const ie of $)if(Math.abs(ie.z-Q)>.01){G=!1;break}if(G)D(B,O,V);else{const $=f.getFullYear(),ie=f.getMonth(),q=f.getDate(),se=ye.dayOfYear(f),Z=new ln(0,0,O.rotation[2],"ZYX");for(const[ee,te]of V.entries()){const oe=B.id+"-"+ee,de=te[0].clone().applyEuler(Z),he=te[1].clone().applyEuler(Z),pe=te[2].clone().applyEuler(Z),me=new ae().subVectors(he,de),le=new ae().subVectors(pe,de),Te=new ae().subVectors(pe,he),ge=me.length(),Se=new ae().crossVectors(le,Te).length()/ge,Re=Math.max(2,Math.round(ge/y)),De=Math.max(2,Math.round(Se/y)),Ae=Array(Re).fill(0).map(()=>Array(De).fill(0));me.normalize(),le.normalize(),Te.normalize();const ue=new ae().crossVectors(le,Te).normalize(),fe=me.multiplyScalar(.5*ge/Re),ve=new ae().crossVectors(ue,me).normalize().multiplyScalar(.5*Se/De);let we=0;const Pe=new ae,Ie=new ae(O.cx+de.x,O.cy+de.y,O.lz+de.z+k0);if(Ie.add(fe).add(ve),fe.multiplyScalar(2),ve.multiplyScalar(2),ee%2===0)for(let Ne=0;Ne<24;Ne++)for(let Je=0;Je0){we++;const We=vi(nt,se,p,li.SPHERE_MODEL),Ee=qr(e.ground,ie,ue,We),ke=ue.dot(nt);for(let Oe=0;Oe0&&(Pe.copy(Ie).add(st).add(ve.clone().multiplyScalar(je)),P(oe,Pe,nt)||(Ae[Oe][je]+=ke*We))}}}else for(let Ne=0;Ne<24;Ne++)for(let Je=0;Je0){we++;const We=vi(nt,se,p,li.SPHERE_MODEL),Ee=qr(e.ground,ie,ue,We),ke=ue.dot(nt);for(let Oe=0;Oe0&&(Pe.copy(Ie).add(st).add(ve.clone().multiplyScalar(je)),P(oe,Pe,nt)||(Ae[Oe][je]+=ke*We))}}}const Me=we*g/60,ze=Me>Et?d.sunshineHours[ie]/(30*Me*e.timesPerHour):0;j(Ae,ze),i(oe,Ae)}}},D=(B,O,V)=>{const G=f.getFullYear(),Q=f.getMonth(),$=f.getDate(),ie=ye.dayOfYear(f),q=new ln(0,0,O.rotation[2],"ZYX"),se=V[0][0].z;let Z=Number.MAX_VALUE,ee=Number.MAX_VALUE,te=-Number.MAX_VALUE,oe=-Number.MAX_VALUE;for(const Ae of V)for(const ue of Ae){const fe=ue.clone().applyEuler(q);fe.x>te&&(te=fe.x),fe.xoe&&(oe=fe.y),fe.yArray(he).fill(0)),Te=new ae(Z+y/2,ee+y/2,O.lz+se+k0);let ge=0;const Se=new ae(0,0,Te.z);for(let Ae=0;Ae<24;Ae++)for(let ue=0;ue0){ge++;const we=vi(ve,ie,p,li.SPHERE_MODEL),Pe=qr(e.ground,Q,ko,we),Ie=ko.dot(ve);for(let Me=0;Me0&&(Se.y=Te.y+ze*me,P(B.id,Se,ve)||(le[Me][ze]+=Ie*we))}}}const Re=ge*g/60,De=Re>Et?d.sunshineHours[Q]/(30*Re*e.timesPerHour):0;j(le,De),i(B.id,le)},L=B=>{if(B.roofType!==Go.Gable)throw new Error("roof is not gable");const O=r(B);if(!O)throw new Error("foundation of wall not found");const V=s(B.id);if(!V||V.length===0)return;const G=f.getFullYear(),Q=f.getMonth(),$=f.getDate(),ie=ye.dayOfYear(f),q=new ln(0,0,O.rotation[2],"ZYX");for(const[se,Z]of V.entries()){const ee=B.id+"-"+se,te=Z[0].clone().applyEuler(q),oe=Z[1].clone().applyEuler(q),de=Z[2].clone().applyEuler(q),he=new ae().subVectors(oe,te),pe=new ae().subVectors(de,te),me=new ae().subVectors(de,oe),le=he.length(),Te=new ae().crossVectors(pe,me).length()/le,ge=Math.max(2,Math.round(le/y)),Se=Math.max(2,Math.round(Te/y)),Re=Array(ge).fill(0).map(()=>Array(Se).fill(0));he.normalize(),pe.normalize(),me.normalize();const De=new ae().crossVectors(pe,me).normalize(),Ae=he.multiplyScalar(.5*le/ge),ue=new ae().crossVectors(De,he).normalize().multiplyScalar(.5*Te/Se),fe=new ae(O.cx+te.x,O.cy+te.y,O.lz+te.z+k0);fe.add(Ae).add(ue),Ae.multiplyScalar(2),ue.multiplyScalar(2);let ve=0;const we=new ae;for(let Me=0;Me<24;Me++)for(let ze=0;ze0){ve++;const Ue=vi(Je,ie,p,li.SPHERE_MODEL),nt=qr(e.ground,Q,De,Ue),We=De.dot(Je);for(let Ee=0;Ee0&&(we.copy(fe).add(ke).add(ue.clone().multiplyScalar(Oe)),P(ee,we,Je)||(Re[Ee][Oe]+=We*Ue))}}}const Pe=ve*g/60,Ie=Pe>Et?d.sunshineHours[Q]/(30*Pe*e.timesPerHour):0;j(Re,Ie),i(ee,Re)}},j=(B,O)=>{for(let V=0;V{const e=M(pn),n=dt(bh),o=M.getState().world,r=M.getState().elements,i=M(Gr),a=M(yA),l=Cn(Ige),s=Cn(JBe),c=dt(wW),u=dt(Wwt),d=M(xge),f=Cn(Dge),{scene:p}=ri(),g=$t(),A=u1(t),y=new Date(o.date),S=t?A==null?void 0:A.elevation:0,C=60/o.timesPerHour,P=m.useMemo(()=>new l0,[]),v=o.solarRadiationHeatmapGridCellSize??.5,T=m.useRef([]),w=m.useRef([]),x=m.useRef(0),b=m.useRef(!1),R=m.useRef(new Date(o.date)),H=m.useRef(new Map),F=m.useRef(!1),E=m.useRef(new Date(o.date)),N=m.useMemo(()=>dl(y,o.latitude),[o.date,o.latitude]);m.useEffect(()=>{if(c)return U(),x.current=requestAnimationFrame(D),()=>{cancelAnimationFrame(x.current),b.current||(gn(Y.t("message.SimulationAborted",g)),e(le=>{le.world.date=R.current.toLocaleString("en-US")}),n("simulationInProgress",!1))}},[c]),m.useEffect(()=>{F.current=u,u?(E.current=new Date(y.getTime()),cancelAnimationFrame(x.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",g))):(n("simulationPaused",!1),D())},[u]);const U=()=>{n("simulationInProgress",!0),y.setHours(Math.floor(N.sunrise/60),N.sunrise%60),R.current=new Date(o.date),b.current=!1,j();for(const le of r)switch(le.type){case z.Wall:case z.Door:case z.SolarPanel:case z.SolarWaterHeater:case z.ParabolicTrough:case z.ParabolicDish:case z.FresnelReflector:case z.Heliostat:{H.current.delete(le.id);break}case z.Cuboid:{H.current.delete(le.id+"-top"),H.current.delete(le.id+"-north"),H.current.delete(le.id+"-south"),H.current.delete(le.id+"-west"),H.current.delete(le.id+"-east");break}case z.Roof:{const Te=le,ge=f(Te.id);if(ge){const Se=ge.length;for(let Re=0;Re{s();const le=N.daylight()/60,Te=le>Et?A.sunshineHours[y.getMonth()]/(30*le*o.timesPerHour):0;for(const ge of r){switch(ge.type){case z.Foundation:case z.Wall:case z.Door:case z.SolarPanel:case z.SolarWaterHeater:case z.ParabolicTrough:case z.ParabolicDish:case z.FresnelReflector:case z.Heliostat:{const Se=H.current.get(ge.id);if(Se){for(let Re=0;Re[...Re]))}break}case z.Cuboid:{k(ge.id,"top",Te),k(ge.id,"south",Te),k(ge.id,"north",Te),k(ge.id,"west",Te),k(ge.id,"east",Te);break}case z.Roof:{const Se=ge,Re=f(Se.id);if(Re&&Re.length>0){if(Se.roofType===Go.Pyramid||Se.roofType===Go.Mansard||Se.roofType===Go.Gambrel||Se.roofType===Go.Hip){let De=!0;const Ae=Re[0][0].z;for(const ue of Re)for(const fe of ue)if(Math.abs(fe.z-Ae)>.01){De=!1;break}if(De){const ue=H.current.get(Se.id);if(ue){for(let fe=0;fe[...fe]))}break}}for(let De=0;De[...fe]))}}}break}}if(ge.type===z.Foundation){const Se=ge;if(Se.solarStructure===Dn.UpdraftTower&&Se.solarUpdraftTower){const Re=ge.id+"-sut",De=H.current.get(Re);if(De){for(let Ae=0;Ae[...Ae]))}}}}},k=(le,Te,ge)=>{const Se=H.current.get(le+"-"+Te);if(Se){for(let Re=0;Re{if(c&&!F.current){if(y.getMinutes()+y.getHours()*60>=N.sunset){cancelAnimationFrame(x.current),dt.getState().set(Te=>{Te.runDynamicSimulation=!1}),e(Te=>{Te.world.date=R.current.toLocaleString("en-US")}),gn(Y.t("message.SimulationCompleted",g)),b.current=!0,W(),setTimeout(()=>{n("simulationInProgress",!1),n("showSolarRadiationHeatmap",!0)},10);return}if(y.setHours(y.getHours(),y.getMinutes()+C),e(Te=>{Te.world.date=y.toLocaleString("en-US")}),d)for(const Te of r)switch(Te.type){case z.FresnelReflector:he(Te);break;case z.Heliostat:pe(Te);break}else for(const Te of r)switch(Te.type){case z.Foundation:{const ge=Te;O(ge),ge.solarStructure===Dn.UpdraftTower&&me(ge);break}case z.Cuboid:{B(Te);break}case z.SolarPanel:{ee(Te);break}case z.SolarWaterHeater:{te(Te);break}case z.ParabolicTrough:{oe(Te);break}case z.ParabolicDish:{de(Te);break}case z.FresnelReflector:{he(Te);break}case z.Heliostat:{pe(Te);break}case z.Wall:{V(Te);break}case z.Door:{G(Te);break}case z.Roof:{const ge=Te;switch(ge.roofType){case Go.Pyramid:$(ge);break;case Go.Gable:Z(ge);break;case Go.Gambrel:q(ge);break;case Go.Mansard:ie(ge);break;case Go.Hip:se(ge);break}break}}x.current=requestAnimationFrame(D)}},L=(le,Te,ge)=>{if(T.current.length>1){w.current.length=0,P.set(Te,ge);const Se=T.current.filter(Re=>Re.uuid!==le);return P.intersectObjects(Se,!1,w.current),w.current.length>0}return!1},j=()=>{const le=p.children.filter(Te=>Te.name==="Content");if(le.length>0){const Te=le[0].children;T.current.length=0;for(const ge of Te)ye.fetchSimulationElements(ge,T.current)}},B=le=>{const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=ye.dayOfYear(y),Se=le.lx,Re=le.ly,De=le.lz,Ae=Math.max(2,Math.round(Se/v)),ue=Math.max(2,Math.round(Re/v)),fe=Math.max(2,Math.round(De/v)),ve=Se/Ae,we=Re/ue,Pe=De/fe;let Ie=H.current.get(le.id+"-top");(!Ie||Ie.length!==Ae||Ie[0].length!==ue)&&(Ie=Array(Ae).fill(0).map(()=>Array(ue).fill(0)),H.current.set(le.id+"-top",Ie));let Me=H.current.get(le.id+"-south");(!Me||Me.length!==Ae||Me[0].length!==fe)&&(Me=Array(Ae).fill(0).map(()=>Array(fe).fill(0)),H.current.set(le.id+"-south",Me));let ze=H.current.get(le.id+"-north");(!ze||ze.length!==Ae||ze[0].length!==fe)&&(ze=Array(Ae).fill(0).map(()=>Array(fe).fill(0)),H.current.set(le.id+"-north",ze));let Ne=H.current.get(le.id+"-west");(!Ne||Ne.length!==ue||Ne[0].length!==fe)&&(Ne=Array(ue).fill(0).map(()=>Array(fe).fill(0)),H.current.set(le.id+"-west",Ne));let Je=H.current.get(le.id+"-east");(!Je||Je.length!==ue||Je[0].length!==fe)&&(Je=Array(ue).fill(0).map(()=>Array(fe).fill(0)),H.current.set(le.id+"-east",Je));const Ue=ko,nt=_p.clone().applyAxisAngle(ko,le.rotation[2]),We=Yc.clone().applyAxisAngle(ko,le.rotation[2]),Ee=Vp.clone().applyAxisAngle(ko,le.rotation[2]),ke=Op.clone().applyAxisAngle(ko,le.rotation[2]),Oe=i(le);let st=le.cx,je=le.cy,xt=le.cz;if(Oe&&Oe.type===z.Cuboid){const At=ye.getWorldDataById(le.id);st=At.pos.x,je=At.pos.y,xt=At.pos.z}const gt=new ae,Ye=new Kt(st,je),it=new Kt,ut=je-Re/2,Qe=je+Re/2,lt=st-Se/2,Ze=st+Se/2,Be=vi(Te,ge,S,li.SPHERE_MODEL);let $e=qr(o.ground,y.getMonth(),Ue,Be),wt=Ue.dot(Te),vt=st-Se/2,Rt=je-Re/2;const Gt=xt+De/2;for(let At=0;At0&&(it.set(vt+(At+.5)*ve,Rt+(pt+.5)*we),it.rotateAround(Ye,le.rotation[2]),gt.set(it.x,it.y,Gt),L(le.id,gt,Te)||(Ie[At][pt]+=wt*Be));vt=st-Se/2,Rt=xt-De/2,$e=qr(o.ground,y.getMonth(),nt,Be),wt=nt.dot(Te);for(let At=0;At0&&(it.set(vt+(At+.5)*ve,ut),it.rotateAround(Ye,le.rotation[2]),gt.set(it.x,it.y,Rt+(pt+.5)*Pe),L(le.id,gt,Te)||(Me[At][pt]+=wt*Be));$e=qr(o.ground,y.getMonth(),We,Be),wt=We.dot(Te);for(let At=0;At0&&(it.set(vt+(At+.5)*ve,Qe),it.rotateAround(Ye,le.rotation[2]),gt.set(it.x,it.y,Rt+(fe-(pt+.5))*Pe),L(le.id,gt,Te)||(ze[At][pt]+=wt*Be));vt=je-Re/2,Rt=xt-De/2,$e=qr(o.ground,y.getMonth(),Ee,Be),wt=Ee.dot(Te);for(let At=0;At0&&(it.set(lt,vt+(At+.5)*we),it.rotateAround(Ye,le.rotation[2]),gt.set(it.x,it.y,Rt+(pt+.5)*Pe),L(le.id,gt,Te)||(Ne[At][pt]+=wt*Be));$e=qr(o.ground,y.getMonth(),ke,Be),wt=ke.dot(Te);for(let At=0;At0&&(it.set(Ze,vt+(At+.5)*we),it.rotateAround(Ye,le.rotation[2]),gt.set(it.x,it.y,Rt+(pt+.5)*Pe),L(le.id,gt,Te)||(Je[At][pt]+=wt*Be))},O=le=>{const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=ye.dayOfYear(y),Se=le.lx,Re=le.ly,De=le.lz,Ae=Math.max(2,Math.round(Se/v)),ue=Math.max(2,Math.round(Re/v)),fe=Se/Ae,ve=Re/ue,we=le.cx-Se/2,Pe=le.cy-Re/2,Ie=new Kt(le.cx,le.cy),Me=new ae;let ze=H.current.get(le.id);(!ze||ze.length!==Ae||ze[0].length!==ue)&&(ze=Array(Ae).fill(0).map(()=>Array(ue).fill(0)),H.current.set(le.id,ze));const Ne=vi(Te,ge,S,li.SPHERE_MODEL),Je=qr(o.ground,y.getMonth(),ko,Ne),Ue=ko.dot(Te),nt=new Kt;for(let We=0;We0&&(nt.set(we+(We+.5)*fe,Pe+(Ee+.5)*ve),nt.rotateAround(Ie,le.rotation[2]),Me.set(nt.x,nt.y,De),L(le.id,Me,Te)||(ze[We][Ee]+=Ue*Ne))},V=le=>{const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=a(le);if(!ge)throw new Error("foundation of wall not found");const Se=ye.dayOfYear(y),Re=le.lx,De=ye.getHighestPointOfWall(le),Ae=Math.max(2,Math.round(Re/v)),ue=Math.max(2,Math.round(De/v)),fe=Re/Ae,ve=De/ue,we=ge.rotation[2]+le.relativeAngle,Pe=ye.wallAbsolutePosition(new ae(le.cx,le.cy,le.cz),ge).setZ(De/2+ge.lz),Ie=new ae(Math.cos(we-Qt),Math.sin(we-Qt),0),Me=fe*Math.cos(we),ze=fe*Math.sin(we),Ne=new ae;let Je=H.current.get(le.id);(!Je||Je.length!==Ae||Je[0].length!==ue)&&(Je=Array(Ae).fill(0).map(()=>Array(ue).fill(0)),H.current.set(le.id,Je));const Ue=ye.getWallVertices(le,1),nt=(De-le.lz)/2,We=vi(Te,Se,S,li.SPHERE_MODEL),Ee=qr(o.ground,y.getMonth(),Ie,We),ke=Ie.dot(Te);for(let Oe=0;Oe0&&(Ne.set(Pe.x+je*Me,Pe.y+je*ze,Pe.z+xt*ve),L(le.id,Ne,Te)||(Je[Oe][st]+=ke*We)))}},G=le=>{const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=a(le);if(!ge)throw new Error("foundation of door not found");const Se=i(le);if(!Se)throw new Error("parent of door not found");const Re=ye.dayOfYear(y),De=Se,Ae=le.lx*De.lx,ue=le.lz*De.lz,fe=Math.max(2,Math.round(Ae/v)),ve=Math.max(2,Math.round(ue/v)),we=Ae/fe,Pe=ue/ve,Ie=ge.rotation[2]+De.relativeAngle,ze=ye.wallAbsolutePosition(new ae(De.cx,De.cy,De.cz),ge).setZ(De.lz/2+ge.lz).clone().add(new ae(le.cx*De.lx,0,le.cz*De.lz)),Ne=new ae(Math.cos(Ie-Qt),Math.sin(Ie-Qt),0),Je=we*Math.cos(Ie),Ue=we*Math.sin(Ie),nt=new ae;let We=H.current.get(le.id);(!We||We.length!==fe||We[0].length!==ve)&&(We=Array(fe).fill(0).map(()=>Array(ve).fill(0)),H.current.set(le.id,We));const Ee=vi(Te,Re,S,li.SPHERE_MODEL),ke=qr(o.ground,y.getMonth(),Ne,Ee),Oe=Ne.dot(Te);if(le.doorType===Rd.Arched)for(let st=0;st0&&(L(le.id,nt,Te)||(We[st][je]+=Oe*Ee)))}else for(let st=0;st0){const xt=st-fe/2+.5,gt=je-ve/2+.5;nt.set(ze.x+xt*Je,ze.y+xt*Ue,ze.z+gt*Pe),L(le.id,nt,Te)||(We[st][je]+=Oe*Ee)}},Q=(le,Te,ge,Se)=>{const Re=Se[0][0].z,De=ye.dayOfYear(y),Ae=vi(le,De,S,li.SPHERE_MODEL),ue=new ln(0,0,ge.rotation[2],"ZYX");let fe=Number.MAX_VALUE,ve=Number.MAX_VALUE,we=-Number.MAX_VALUE,Pe=-Number.MAX_VALUE;for(const ke of Se)for(const Oe of ke){const st=Oe.clone().applyEuler(ue);st.x>we&&(we=st.x),st.xPe&&(Pe=st.y),st.yArray(Me).fill(0)),H.current.set(Te.id,Je));const Ue=new ae(fe+v/2,ve+v/2,ge.lz+Re+k0),nt=new ae(0,0,Ue.z),We=qr(o.ground,y.getMonth(),ko,Ae),Ee=ko.dot(le);for(let ke=0;ke0&&(nt.y=Ue.y+Oe*Ne,L(Te.id,nt,le)||(Je[ke][Oe]+=Ee*Ae))}},$=le=>{if(le.roofType!==Go.Pyramid)throw new Error("roof is not pyramid");const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=a(le);if(!ge)throw new Error("foundation of wall not found");const Se=f(le.id);if(!Se||Se.length===0)return;let Re=!0;const De=Se[0][0].z;for(const Ae of Se)for(const ue of Ae)if(Math.abs(ue.z-De)>.01){Re=!1;break}if(Re)Q(Te,le,ge,Se);else{const Ae=ye.dayOfYear(y),ue=new ln(0,0,ge.rotation[2],"ZYX"),fe=vi(Te,Ae,S,li.SPHERE_MODEL);for(const[ve,we]of Se.entries()){const Pe=le.id+"-"+ve,Ie=we[0].clone().applyEuler(ue),Me=we[1].clone().applyEuler(ue),ze=we[2].clone().applyEuler(ue),Ne=new ae().subVectors(Me,Ie),Je=new ae().subVectors(ze,Ie),Ue=new ae().subVectors(ze,Me),nt=Ne.length(),We=new ae().crossVectors(Je,Ue).length()/nt,Ee=Math.max(2,Math.round(nt/v)),ke=Math.max(2,Math.round(We/v));let Oe=H.current.get(Pe);(!Oe||Oe.length!==Ee||Oe[0].length!==ke)&&(Oe=Array(Ee).fill(0).map(()=>Array(ke).fill(0)),H.current.set(Pe,Oe)),Ne.normalize(),Je.normalize(),Ue.normalize();const st=new ae().crossVectors(Je,Ue).normalize(),je=Ne.multiplyScalar(.5*nt/Ee),xt=new ae().crossVectors(st,Ne).normalize().multiplyScalar(.5*We/ke),gt=new ae(ge.cx+Ie.x,ge.cy+Ie.y,ge.lz+Ie.z+k0);gt.add(je).add(xt),je.multiplyScalar(2),xt.multiplyScalar(2);const Ye=new ae,it=qr(o.ground,y.getMonth(),st,fe),ut=st.dot(Te);for(let Qe=0;Qe0&&(Ye.copy(gt).add(lt).add(xt.clone().multiplyScalar(Ze)),L(Pe,Ye,Te)||(Oe[Qe][Ze]+=ut*fe))}}}},ie=le=>{if(le.roofType!==Go.Mansard)throw new Error("roof is not mansard");const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=a(le);if(!ge)throw new Error("foundation of wall not found");const Se=f(le.id);if(!Se||Se.length===0)return;let Re=!0;const De=Se[0][0].z;for(const Ae of Se)for(const ue of Ae)if(Math.abs(ue.z-De)>.01){Re=!1;break}if(Re)Q(Te,le,ge,Se);else{const Ae=ye.dayOfYear(y),ue=new ln(0,0,ge.rotation[2],"ZYX"),fe=vi(Te,Ae,S,li.SPHERE_MODEL);for(const[ve,we]of Se.entries()){const Pe=le.id+"-"+ve;if(ve===Se.length-1){let Ie=Number.MAX_VALUE,Me=Number.MAX_VALUE,ze=-Number.MAX_VALUE,Ne=-Number.MAX_VALUE;for(const gt of we){const Ye=gt.clone().applyEuler(ue);Ye.x>ze&&(ze=Ye.x),Ye.xNe&&(Ne=Ye.y),Ye.yArray(nt).fill(0)),H.current.set(Pe,ke));const Oe=new ae(Ie+v/2,Me+v/2,ge.lz+Je+k0),st=new ae(0,0,Oe.z),je=qr(o.ground,y.getMonth(),ko,fe),xt=ko.dot(Te);for(let gt=0;gt0&&(st.y=Oe.y+Ye*Ee,L(Pe,st,Te)||(ke[gt][Ye]+=xt*fe))}}else{const Ie=we[0].clone().applyEuler(ue),Me=we[1].clone().applyEuler(ue),ze=we[2].clone().applyEuler(ue),Ne=new ae().subVectors(Me,Ie),Je=new ae().subVectors(ze,Ie),Ue=new ae().subVectors(ze,Me),nt=Ne.length(),We=new ae().crossVectors(Je,Ue).length()/nt,Ee=Math.max(2,Math.round(nt/v)),ke=Math.max(2,Math.round(We/v));let Oe=H.current.get(Pe);(!Oe||Oe.length!==Ee||Oe[0].length!==ke)&&(Oe=Array(Ee).fill(0).map(()=>Array(ke).fill(0)),H.current.set(Pe,Oe)),Ne.normalize(),Je.normalize(),Ue.normalize();const st=new ae().crossVectors(Je,Ue).normalize(),je=Ne.multiplyScalar(.5*nt/Ee),xt=new ae().crossVectors(st,Ne).normalize().multiplyScalar(.5*We/ke),gt=new ae(ge.cx+Ie.x,ge.cy+Ie.y,ge.lz+Ie.z+k0);gt.add(je).add(xt),je.multiplyScalar(2),xt.multiplyScalar(2);const Ye=new ae,it=qr(o.ground,y.getMonth(),st,fe),ut=st.dot(Te);for(let Qe=0;Qe0&&(Ye.copy(gt).add(lt).add(xt.clone().multiplyScalar(Ze)),L(Pe,Ye,Te)||(Oe[Qe][Ze]+=ut*fe))}}}}},q=le=>{if(le.roofType!==Go.Gambrel)throw new Error("roof is not gambrel");const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=a(le);if(!ge)throw new Error("foundation of wall not found");const Se=f(le.id);if(!Se||Se.length===0)return;let Re=!0;const De=Se[0][0].z;for(const Ae of Se)for(const ue of Ae)if(Math.abs(ue.z-De)>.01){Re=!1;break}if(Re)Q(Te,le,ge,Se);else{const Ae=ye.dayOfYear(y),ue=new ln(0,0,ge.rotation[2],"ZYX"),fe=vi(Te,Ae,S,li.SPHERE_MODEL);for(const[ve,we]of Se.entries()){const Pe=le.id+"-"+ve,Ie=we[0].clone().applyEuler(ue),Me=we[1].clone().applyEuler(ue),ze=we[2].clone().applyEuler(ue),Ne=new ae().subVectors(Me,Ie),Je=new ae().subVectors(ze,Ie),Ue=new ae().subVectors(ze,Me),nt=Ne.length(),We=new ae().crossVectors(Je,Ue).length()/nt,Ee=Math.max(2,Math.round(nt/v)),ke=Math.max(2,Math.round(We/v));let Oe=H.current.get(Pe);(!Oe||Oe.length!==Ee||Oe[0].length!==ke)&&(Oe=Array(Ee).fill(0).map(()=>Array(ke).fill(0)),H.current.set(Pe,Oe)),Ne.normalize(),Je.normalize(),Ue.normalize();const st=new ae().crossVectors(Je,Ue).normalize(),je=Ne.multiplyScalar(.5*nt/Ee),xt=new ae().crossVectors(st,Ne).normalize().multiplyScalar(.5*We/ke),gt=new ae(ge.cx+Ie.x,ge.cy+Ie.y,ge.lz+Ie.z+k0);gt.add(je).add(xt),je.multiplyScalar(2),xt.multiplyScalar(2);const Ye=new ae,it=qr(o.ground,y.getMonth(),st,fe),ut=st.dot(Te);for(let Qe=0;Qe0&&(Ye.copy(gt).add(lt).add(xt.clone().multiplyScalar(Ze)),L(Pe,Ye,Te)||(Oe[Qe][Ze]+=ut*fe))}}}},se=le=>{if(le.roofType!==Go.Hip)throw new Error("roof is not hip");const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=a(le);if(!ge)throw new Error("foundation of wall not found");const Se=f(le.id);if(!Se||Se.length===0)return;let Re=!0;const De=Se[0][0].z;for(const Ae of Se)for(const ue of Ae)if(Math.abs(ue.z-De)>.01){Re=!1;break}if(Re)Q(Te,le,ge,Se);else{const Ae=ye.dayOfYear(y),ue=new ln(0,0,ge.rotation[2],"ZYX"),fe=vi(Te,Ae,S,li.SPHERE_MODEL);for(const[ve,we]of Se.entries()){const Pe=le.id+"-"+ve,Ie=we[0].clone().applyEuler(ue),Me=we[1].clone().applyEuler(ue),ze=we[2].clone().applyEuler(ue),Ne=new ae().subVectors(Me,Ie),Je=new ae().subVectors(ze,Ie),Ue=new ae().subVectors(ze,Me),nt=Ne.length(),We=new ae().crossVectors(Je,Ue).length()/nt,Ee=Math.max(2,Math.round(nt/v)),ke=Math.max(2,Math.round(We/v));let Oe=H.current.get(Pe);(!Oe||Oe.length!==Ee||Oe[0].length!==ke)&&(Oe=Array(Ee).fill(0).map(()=>Array(ke).fill(0)),H.current.set(Pe,Oe)),Ne.normalize(),Je.normalize(),Ue.normalize();const st=new ae().crossVectors(Je,Ue).normalize(),je=Ne.multiplyScalar(.5*nt/Ee),xt=new ae().crossVectors(st,Ne).normalize().multiplyScalar(.5*We/ke),gt=new ae,Ye=new ae(ge.cx+Ie.x,ge.cy+Ie.y,ge.lz+Ie.z+k0);Ye.add(je).add(xt),je.multiplyScalar(2),xt.multiplyScalar(2);const it=qr(o.ground,y.getMonth(),st,fe),ut=st.dot(Te);for(let Qe=0;Qe0&&(gt.copy(Ye).add(lt).add(xt.clone().multiplyScalar(Ze)),L(Pe,gt,Te)||(Oe[Qe][Ze]+=ut*fe))}}}},Z=le=>{if(le.roofType!==Go.Gable)throw new Error("roof is not gable");const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=a(le);if(!ge)throw new Error("foundation of wall not found");const Se=f(le.id);if(!Se||Se.length===0)return;const Re=ye.dayOfYear(y),De=new ln(0,0,ge.rotation[2],"ZYX"),Ae=vi(Te,Re,S,li.SPHERE_MODEL);for(const[ue,fe]of Se.entries()){const ve=le.id+"-"+ue,we=fe[0].clone().applyEuler(De),Pe=fe[1].clone().applyEuler(De),Ie=fe[2].clone().applyEuler(De),Me=new ae().subVectors(Pe,we),ze=new ae().subVectors(Ie,we),Ne=new ae().subVectors(Ie,Pe),Je=Me.length(),Ue=new ae().crossVectors(ze,Ne).length()/Je,nt=Math.max(2,Math.round(Je/v)),We=Math.max(2,Math.round(Ue/v));let Ee=H.current.get(ve);(!Ee||Ee.length!==nt||Ee[0].length!==We)&&(Ee=Array(nt).fill(0).map(()=>Array(We).fill(0)),H.current.set(ve,Ee)),Me.normalize(),ze.normalize(),Ne.normalize();const ke=new ae().crossVectors(ze,Ne).normalize(),Oe=Me.multiplyScalar(.5*Je/nt),st=new ae().crossVectors(ke,Me).normalize().multiplyScalar(.5*Ue/We),je=new ae(ge.cx+we.x,ge.cy+we.y,ge.lz+we.z+k0);je.add(Oe).add(st),Oe.multiplyScalar(2),st.multiplyScalar(2);const xt=new ae,gt=qr(o.ground,y.getMonth(),ke,Ae),Ye=ke.dot(Te);for(let it=0;it0&&(xt.copy(je).add(ut).add(st.clone().multiplyScalar(Qe)),L(ve,xt,Te)||(Ee[it][Qe]+=Ye*Ae))}}},ee=le=>{const Te=ki(y,o.latitude);if(Te.z<=0)return;let ge=i(le);if(!ge)throw new Error("parent of solar panel does not exist");const Se=le.parentType===z.Roof,Re=le.parentType===z.Wall;if(Se&&(ge=a(ge),!ge))throw new Error("foundation of solar panel does not exist");const De=ye.dayOfYear(y),Ae=Re?ye.absoluteCoordinates(le.cx,le.cy,le.cz,ge,a(le),le.lz):ye.absoluteCoordinates(le.cx,le.cy,le.cz,ge,void 0,void 0,!0),ue=ge.rotation[2];let fe=ue+(Re?0:le.relativeAzimuth),ve=le.tiltAngle,we=!0;if(Se&&(Ae.z=le.cz+le.lz+.02+ge.cz,ye.isZero(le.rotation[0])?Ae.z+=le.poleHeight:(ve=le.rotation[0],fe=ue,we=!1)),Re&&!ye.isZero(le.tiltAngle)){const Qe=ge,lt=a(ge),Be=(lt?lt.rotation[2]+Qe.relativeAngle:Qe.relativeAngle)-Qt,$e=le.ly*Math.abs(Math.sin(le.tiltAngle))/2;Ae.x+=$e*Math.cos(Be),Ae.y+=$e*Math.sin(Be)}const Pe=new ae().fromArray(le.normal),Ie=le.lx,Me=le.ly,ze=Math.max(2,Math.round(le.lx/v)),Ne=Math.max(2,Math.round(le.ly/v)),Je=Ie/ze,Ue=Me/Ne,nt=Ae.x-(Ie-v)/2,We=Ae.y-(Me-v)/2,Ee=Se||Re?Ae.z:ge.lz+le.poleHeight+le.lz,ke=new Kt(Ae.x,Ae.y),Oe=new ae;let st=H.current.get(le.id);(!st||st.length!==ze||st[0].length!==Ne)&&(st=Array(ze).fill(0).map(()=>Array(Ne).fill(0)),H.current.set(le.id,st));let je=new ln(Se&&!we?0:ve,0,fe,"ZYX");if(le.trackerType!==Ll.NO_TRACKER){const Qe=ue?Te.clone().applyAxisAngle(ko,-ue):Te.clone();switch(le.trackerType){case Ll.ALTAZIMUTH_DUAL_AXIS_TRACKER:{const lt=new Ts().setFromUnitVectors(ko,Qe);je=new ln().setFromQuaternion(lt),je.z+=fe;break}case Ll.HORIZONTAL_SINGLE_AXIS_TRACKER:{const lt=new Ts().setFromUnitVectors(ko,new ae(Qe.x,0,Qe.z).normalize());je=new ln().setFromQuaternion(lt),je.z+=fe;break}case Ll.VERTICAL_SINGLE_AXIS_TRACKER:{if(Math.abs(le.tiltAngle)>.001){const lt=new ae(Qe.x,-Qe.y,0).normalize(),Ze=Math.acos(Yc.dot(lt))*Math.sign(lt.x);je=new ln(le.tiltAngle,0,Ze+ue,"ZYX")}break}case Ll.TILTED_SINGLE_AXIS_TRACKER:break}}if(Re&&Pe.applyEuler(new ln(0,0,ge.relativeAngle)),Pe.applyEuler(je),Se&&!we&&(je.x=le.rotation[0],je.z=le.rotation[2]+ue),Re){const Qe=i(le);Qe&&(je.x=Qt+le.tiltAngle,je.z=ge.relativeAngle+Qe.rotation[2])}const xt=vi(Te,De,S,li.SPHERE_MODEL),gt=qr(o.ground,y.getMonth(),Pe,xt),Ye=Pe.dot(Te),it=new Kt,ut=new ae;for(let Qe=0;Qe0&&(it.set(nt+Qe*Je,We+lt*Ue),ut.set(it.x-ke.x,it.y-ke.y,0),ut.applyEuler(je),Oe.set(Ae.x+ut.x,Ae.y+ut.y,Ee+ut.z),L(le.id,Oe,Te)||(st[Qe][lt]+=Ye*xt))},te=le=>{const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=i(le);if(!ge)throw new Error("parent of solar water heater does not exist");const Se=a(ge);if(!Se)throw new Error("foundation of solar water heater does not exist");const Re=ye.absoluteCoordinates(le.cx,le.cy,le.cz,Se,void 0,void 0,!0),De=new ln,Ae=(le.lz-le.waterTankRadius)/2,ue=Math.atan2(le.lz-le.waterTankRadius,le.ly);ye.isZero(le.rotation[0])?(De.set(ue,0,le.relativeAzimuth+Se.rotation[2],"ZXY"),Re.z+=Ae):(De.set(le.rotation[0]+ue,0,le.rotation[2]+Se.rotation[2],"ZXY"),Re.add(new ae(0,0,Ae).applyEuler(De)));const ve=le.lx,we=Math.hypot(le.ly,le.lz-le.waterTankRadius),Pe=Math.max(2,Math.round(ve/v)),Ie=Math.max(2,Math.round(we/v)),Me=ve/Pe,ze=we/Ie,Ne=-(ve-v)/2,Je=-(we-v)/2;let Ue=H.current.get(le.id);(!Ue||Ue.length!==Pe||Ue[0].length!==Ie)&&(Ue=Array(Pe).fill(0).map(()=>Array(Ie).fill(0)),H.current.set(le.id,Ue));const nt=new ae(0,0,1).applyEuler(De),We=vi(Te,ye.dayOfYear(y),S,li.SPHERE_MODEL),Ee=qr(o.ground,y.getMonth(),nt,We),ke=nt.dot(Te),Oe=new Kt,st=new ae;for(let je=0;je0&&(Oe.set(Ne+je*Me,Je+xt*ze),st.set(Oe.x,Oe.y,0).applyEuler(De).add(Re),L(le.id,st,Te)||(Ue[je][xt]+=ke*We))},oe=le=>{const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=i(le);if(!ge)throw new Error("parent of parabolic trough does not exist");const Se=ye.dayOfYear(y),Re=ye.absoluteCoordinates(le.cx,le.cy,le.cz,ge),De=new ae().fromArray(le.normal),Ae=De.clone(),ue=le.lx,fe=le.ly,ve=ue*ue/(4*le.latusRectum),we=le.poleHeight+ue/2,Pe=Math.max(2,Math.round(le.lx/v)),Ie=Math.max(2,Math.round(le.ly/v)),Me=ue/Pe,ze=fe/Ie,Ne=Re.x-(ue-v)/2,Je=Re.y-(fe-v)/2,Ue=ge.lz+we+le.lz+ve,nt=new Kt(Re.x,Re.y),We=new ae;let Ee=H.current.get(le.id);(!Ee||Ee.length!==Pe||Ee[0].length!==Ie)&&(Ee=Array(Pe).fill(0).map(()=>Array(Ie).fill(0)),H.current.set(le.id,Ee));const ke=ge.rotation[2],Oe=ke+le.relativeAzimuth,st=ye.isZero(Oe),je=st?1:Math.cos(Oe),xt=st?0:Math.sin(Oe),gt=ke?Te.clone().applyAxisAngle(ko,-ke):Te.clone(),Ye=new Ts().setFromUnitVectors(ko,new ae(gt.x*je,gt.x*xt,gt.z).normalize()),it=new ln().setFromQuaternion(Ye);De.copy(Ae.clone().applyEuler(it));const ut=vi(Te,Se,S,li.SPHERE_MODEL),Qe=qr(o.ground,y.getMonth(),De,ut),lt=De.dot(Te),Ze=new Kt,Be=new ae;let $e=0,wt=0,vt=1;const Rt=4/(le.latusRectum*le.latusRectum);for(let Gt=0;Gt0&&(Ze.set($e,Je+At*ze),st||Ze.rotateAround(nt,Oe),Be.set(Ze.x-nt.x,Ze.y-nt.y,0),Be.applyEuler(it),We.set(Re.x+Be.x,Re.y+Be.y,Ue+Be.z),L(le.id,We,Te)||(Ee[Gt][At]+=lt*ut*vt))}},de=le=>{const Te=ki(y,o.latitude);if(Te.z<=0)return;const ge=i(le);if(!ge)throw new Error("parent of parabolic dish does not exist");const Se=ye.dayOfYear(y),Re=ye.absoluteCoordinates(le.cx,le.cy,le.cz,ge),De=new ae().fromArray(le.normal),Ae=De.clone(),ue=le.lx,fe=le.ly,ve=ue*ue/(4*le.latusRectum),we=le.poleHeight+ue/2,Pe=Math.max(2,Math.round(le.lx/v)),Ie=Math.max(2,Math.round(le.ly/v)),Me=ue/Pe,ze=fe/Ie,Ne=Re.x-(ue-v)/2,Je=Re.y-(fe-v)/2,Ue=ge.lz+we+le.lz+ve,nt=new Kt(Re.x,Re.y),We=new ae;let Ee=H.current.get(le.id);(!Ee||Ee.length!==Pe||Ee[0].length!==Ie)&&(Ee=Array(Pe).fill(0).map(()=>Array(Ie).fill(0)),H.current.set(le.id,Ee));const ke=ge.rotation[2],Oe=ke+le.relativeAzimuth,st=ye.isZero(Oe),je=ke?Te.clone().applyAxisAngle(ko,-ke):Te.clone(),xt=new Ts().setFromUnitVectors(ko,je),gt=new ln().setFromQuaternion(xt);De.copy(Ae.clone().applyEuler(gt));const Ye=vi(Te,Se,S,li.SPHERE_MODEL),it=qr(o.ground,y.getMonth(),De,Ye),ut=De.dot(Te),Qe=new Kt,lt=new ae;let Ze=0,Be=0,$e=0,wt=0,vt=1;const Rt=4/(le.latusRectum*le.latusRectum);for(let Gt=0;Gtue/2))for(let At=0;Atfe/2)&&(Ee[Gt][At]+=it,ut>0&&(Qe.set(Ze,Be),st||Qe.rotateAround(nt,Oe),lt.set(Qe.x-nt.x,Qe.y-nt.y,0),lt.applyEuler(gt),We.set(Re.x+lt.x,Re.y+lt.y,Ue+lt.z),L(le.id,We,Te)||(vt=1/Math.sqrt(1+($e*$e+wt*wt)*Rt),Ee[Gt][At]+=ut*Ye*vt)))},he=le=>{const Te=ki(y,o.latitude);if(Te.zArray(Me).fill(0)),H.current.set(le.id,ke));const st=ge.rotation[2]+le.relativeAzimuth,je=ye.isZero(st),xt=je?1:Math.cos(st),gt=je?0:Math.sin(st),Ye=Se.solarStructure===Dn.FocusPipe?new ae((Se.cx-Ae.x)*xt,(Se.cy-Ae.y)*gt,Se.cz-Ae.z+Se.lz/2+(Re.absorberHeight??10)):void 0,it=new ae(gt,xt,0),ut=new ae;let Qe,lt;if(Ye){ut.set(Ye.x,Ye.y,Ye.z);const Gt=-Ye.z*(Te.y*it.y+Te.x*it.x)/Te.z;ut.x+=Gt*it.x,ut.y-=Gt*it.y,lt=ut.clone().normalize();let At=lt.add(Te).normalize();ye.isSame(At,ko)&&(At=new ae(-.001,0,1).normalize()),je||At.applyAxisAngle(ko,-st),Qe=new ln(0,Math.atan2(At.x,At.z),st,"ZXY"),ue.copy(fe.clone().applyEuler(Qe))}else lt=new ae(0,0,1),Qe=new ln;const Ze=vi(Te,De,S,li.SPHERE_MODEL),Be=qr(o.ground,y.getMonth(),ue,Ze),$e=ue.dot(Te),wt=new Kt,vt=new ae;let Rt=0;if(d)for(let Gt=0;Gt0&&(wt.set(Rt,Ue+At*Ne),vt.set(wt.x-We.x,wt.y-We.y,0),vt.applyEuler(Qe),Ee.set(Ae.x+vt.x,Ae.y+vt.y,nt+vt.z),!L(le.id,Ee,Te)&&!L(le.id,Ee,lt)&&(ke[Gt][At]+=$e*Ze))}else for(let Gt=0;Gt0&&(wt.set(Rt,Ue+At*Ne),vt.set(wt.x-We.x,wt.y-We.y,0),vt.applyEuler(Qe),Ee.set(Ae.x+vt.x,Ae.y+vt.y,nt+vt.z),L(le.id,Ee,Te)||(ke[Gt][At]+=$e*Ze))}},pe=le=>{const Te=ki(y,o.latitude);if(Te.zArray(Me).fill(0)),H.current.set(le.id,ke));const Oe=ge.rotation[2],st=Se.solarStructure===Dn.FocusTower?new ae(Se.cx-Ae.x,Se.cy-Ae.y,Se.cz-Ae.z+(Re.towerHeight??20)):void 0;let je,xt;if(st){je=st.clone().normalize();let Ze=je.clone().add(Te).normalize();ye.isSame(Ze,ko)&&(Ze=new ae(-.001,0,1).normalize()),Oe&&Ze.applyAxisAngle(ko,-Oe);const Be=Math.hypot(Ze.x,Ze.y);xt=new ln(Math.atan2(Be,Ze.z),0,Math.atan2(Ze.y,Ze.x)+Qt,"ZXY"),ue.copy(fe.clone().applyEuler(xt))}else je=new ae(0,0,1),xt=new ln;const gt=vi(Te,De,S,li.SPHERE_MODEL),Ye=qr(o.ground,y.getMonth(),ue,gt),it=ue.dot(Te),ut=new Kt,Qe=new ae;let lt=0;if(d)for(let Ze=0;Ze0&&(ut.set(lt,Ue+Be*Ne),Qe.set(ut.x-We.x,ut.y-We.y,0),Qe.applyEuler(xt),Ee.set(Ae.x+Qe.x,Ae.y+Qe.y,nt+Qe.z),!L(le.id,Ee,Te)&&!L(le.id,Ee,je)&&(ke[Ze][Be]+=it*gt))}else for(let Ze=0;Ze0&&(ut.set(lt,Ue+Be*Ne),Qe.set(ut.x-We.x,ut.y-We.y,0),Qe.applyEuler(xt),Ee.set(Ae.x+Qe.x,Ae.y+Qe.y,nt+Qe.z),L(le.id,Ee,Te)||(ke[Ze][Be]+=it*gt))}},me=le=>{const Te=le.solarUpdraftTower;if(!Te)return;const ge=ki(y,o.latitude);if(ge.z<=0)return;const Se=ye.dayOfYear(y),Re=new ae().fromArray(le.normal),De=Te.collectorRadius,Ae=Math.max(2,Math.round(De*2/v)),ue=le.cx-De+v/2,fe=le.cy-De+v/2,ve=le.lz+Te.collectorHeight,we=le.id+"-sut";let Pe=H.current.get(we);(!Pe||Pe.length!==Ae||Pe[0].length!==Ae)&&(Pe=Array(Ae).fill(0).map(()=>Array(Ae).fill(0)),H.current.set(we,Pe));const Ie=vi(ge,Se,S,li.SPHERE_MODEL),Me=qr(o.ground,y.getMonth(),Re,Ie),ze=new ae(0,0,ve),Ne=Re.dot(ge),Je=De*De;let Ue,nt;for(let We=0;WeJe)&&(Pe[We][Ee]+=Me,Ne>0&&(L(we,ze,ge)||(Pe[We][Ee]+=Ne*Ie)))}};return h.jsx(h.Fragment,{})}),CBo=be.memo(({city:t})=>{const e=M(pn),n=dt(bh),o=M(oa),r=M.getState().world,i=M.getState().elements,a=M(Gr),l=Cn(pvt),s=M(bW),c=Cn(mvt),u=M(SW),d=M(iOe),f=M(aOe),p=Cn(yvt),g=dt(cvt),A=dt(uvt),y=dt(dvt),S=dt(fvt),C=M(UBe),{scene:P}=ri(),v=$t(),T=u1(t),w=new Date(r.date),x=t?T==null?void 0:T.elevation:0,b=r.cspTimesPerHour??4,R=60/b,H=r.cspDaysPerYear??6,F=12/H,E=m.useMemo(()=>new l0,[]),N=r.monthlyIrradianceLosses??new Array(12).fill(.05),U=r.cspGridCellSize??.5,W=m.useRef([]),k=m.useRef([]),D=m.useRef(0),L=m.useRef(!1),j=m.useRef(new Date(r.date)),B=m.useRef(new Map),O=m.useRef(new Map),V=m.useRef(0),G=m.useRef(!1),Q=m.useRef(new Date(r.date)),$=m.useMemo(()=>dl(w,r.latitude),[r.date,r.latitude]),ie=m.useRef($),q=ye.daysInYear(w)/12;m.useEffect(()=>{if(g)return se(),D.current=requestAnimationFrame(Z),()=>{cancelAnimationFrame(D.current),L.current||(gn(Y.t("message.SimulationAborted",v)),e(ue=>{ue.world.date=j.current.toLocaleString("en-US")}),dt.getState().set(ue=>{ue.simulationInProgress=!1,ue.simulationPaused=!1})),G.current=!1}},[g]),m.useEffect(()=>{G.current=y,y?(Q.current=new Date(w.getTime()),cancelAnimationFrame(D.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),Z())},[y]);const se=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(j.current=new Date(r.date),w.setHours(Math.floor($.sunrise/60),R/2-30)),L.current=!1,Re(),De()},Z=()=>{if(g&&!G.current){if(w.getMinutes()+w.getHours()*60>=$.sunset){cancelAnimationFrame(D.current),e(fe=>{fe.world.date=j.current.toLocaleString("en-US"),fe.viewState.showDailyParabolicTroughYieldPanel=!0,fe.selectedFloatingWindow="dailyParabolicTroughYieldPanel"}),dt.getState().set(fe=>{fe.runDailySimulationForParabolicTroughs=!1,fe.simulationInProgress=!1,fe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),L.current=!0,ee(),o&&e(fe=>{const ve=Cn.getState().sumDailyParabolicTroughYield();fe.actionInfo={name:"Daily Simulation for Parabolic Troughs Completed",result:{totalYield:ve},details:Cn.getState().dailyParabolicTroughYield,timestamp:new Date().getTime()}});return}w.setHours(w.getHours(),w.getMinutes()+R),e(fe=>{fe.world.date=w.toLocaleString("en-US")});for(const fe of i)fe.type===z.ParabolicTrough&&me(fe);D.current=requestAnimationFrame(Z)}},ee=()=>{const ue=le();for(const fe of i)if(fe.type===z.ParabolicTrough){const ve=fe,we=B.current.get(ve.id);if(we){const Pe=ge(ve)*ue;for(let Ie=0;Ie{var ue;if(d){const fe=new Array(24).fill(0),ve=new Map;let we=0;const Pe=[];for(const Me of i)if(Me.type===z.ParabolicTrough){const ze=B.current.get(Me.id);if(ze){s(Me.id,ze.reduce((Ne,Je)=>Ne+Je,0)),we++,ve.set("Trough"+we,ze),Pe.push(Me.label??"Trough"+we);for(let Ne=0;Ne<24;Ne++)fe[Ne]+=ze[Ne]}}const Ie=[];for(let Me=0;Me<24;Me++){const ze={};ze.Hour=Me;for(let Ne=1;Ne<=we;Ne++){const Je="Trough"+Ne;ze[Pe[Ne-1]]=(ue=ve.get(Je))==null?void 0:ue[Me]}Ie.push(ze)}l(Ie),p(Pe)}else{const fe=new Array(24).fill(0);for(const we of i)if(we.type===z.ParabolicTrough){const Pe=B.current.get(we.id);if(Pe){s(we.id,Pe.reduce((Ie,Me)=>Ie+Me,0));for(let Ie=0;Ie<24;Ie++)fe[Ie]+=Pe[Ie]}}const ve=[];for(let we=0;we<24;we++)ve.push({Hour:we,Total:fe[we]});l(ve)}};m.useEffect(()=>{if(A)return oe(),D.current=requestAnimationFrame(de),()=>{cancelAnimationFrame(D.current),L.current||(gn(Y.t("message.SimulationAborted",v)),e(ue=>{ue.world.date=j.current.toLocaleString("en-US")}),dt.getState().set(ue=>{ue.simulationInProgress=!1,ue.simulationPaused=!1})),G.current=!1}},[A]),m.useEffect(()=>{G.current=S,S?(Q.current=new Date(w.getTime()),cancelAnimationFrame(D.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),de())},[S]);const oe=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(j.current=new Date(r.date),V.current=0,w.setMonth(0,22),ie.current=dl(w,r.latitude),w.setHours(Math.floor(ie.current.sunrise/60),R/2-30),e(ue=>{ue.world.date=w.toLocaleString("en-US")})),L.current=!1,Re(),De(),Ae()},de=()=>{if(A&&!G.current)if(w.getMinutes()+w.getHours()*60{fe.world.date=w.toLocaleString("en-US")});for(const fe of i)fe.type===z.ParabolicTrough&&me(fe);D.current=requestAnimationFrame(de)}else{if(he(),V.current++,V.current===H){cancelAnimationFrame(D.current),e(fe=>{fe.world.date=j.current.toLocaleString("en-US"),fe.viewState.showYearlyParabolicTroughYieldPanel=!0,fe.selectedFloatingWindow="yearlyParabolicTroughYieldPanel"}),dt.getState().set(fe=>{fe.runYearlySimulationForParabolicTroughs=!1,fe.simulationInProgress=!1,fe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),L.current=!0,pe(),o&&e(fe=>{const ve=Cn.getState().sumYearlyParabolicTroughYield();fe.actionInfo={name:"Yearly Simulation for Parabolic Troughs Completed",result:{totalYield:ve},details:Cn.getState().yearlyParabolicTroughYield,timestamp:new Date().getTime()}});return}w.setMonth(V.current*F,22),ie.current=dl(w,r.latitude),w.setHours(Math.floor(ie.current.sunrise/60),R/2-30),De(),D.current=requestAnimationFrame(de)}},he=()=>{const ue=Te();for(const fe of i)if(fe.type===z.ParabolicTrough){const ve=fe,we=B.current.get(ve.id);if(we){const Pe=O.current.get(ve.id);if(Pe){const Ie=we.reduce((Me,ze)=>Me+ze,0);Pe[V.current]+=Ie*ue*ge(ve)}}}C&&ee()},pe=()=>{if(f){const ue=[],fe=[];let ve=0;for(const Pe of i)if(Pe.type===z.ParabolicTrough){const Ie=O.current.get(Pe.id);Ie&&(u(Pe.id,Ie.reduce((Me,ze)=>Me+ze,0)*F*q),ue.push(Ie),ve++,fe.push(Pe.label??"Trough"+ve))}const we=[];for(let Pe=0;Pe<12;Pe+=F){const Ie={};Ie.Month=zs[Pe];for(const[Me,ze]of ue.entries())Ie[fe[Me]]=ze[Pe/F]*q;we.push(Ie)}c(we),p(fe)}else{const ue=[];for(const ve of i)if(ve.type===z.ParabolicTrough){const we=O.current.get(ve.id);we&&(u(ve.id,we.reduce((Pe,Ie)=>Pe+Ie,0)*F*q),ue.push(we))}const fe=[];for(let ve=0;ve<12;ve+=F){let we=0;for(const Pe of ue)we+=Pe[ve/F];fe.push({Month:zs[ve],Total:we*q})}c(fe)}},me=ue=>{const fe=ki(w,r.latitude);if(fe.z0&&(Rt.set(je+Wt*Ee,xt+ht*ke),Ne||Rt.rotateAround(Ye,ze),Gt.set(Rt.x-Ye.x,Rt.y-Ye.y,0),Gt.applyEuler($e),it.set(Pe.x+Gt.x,Pe.y+Gt.y,gt+Gt.z),Se(ue.id,it,fe)||(At+=vt*wt));const pt=B.current.get(ue.id);if(pt){const Wt=w.getMinutes()>=30?w.getHours()+1===24?0:w.getHours()+1:w.getHours();pt[Wt]+=At/(nt*We)}},le=()=>{const ue=$.daylight()/60;return ue>Et?T.sunshineHours[w.getMonth()]/(30*ue*b):0},Te=()=>{const ue=ie.current.daylight()/60;return ue>Et?T.sunshineHours[w.getMonth()]/(30*ue*b):0},ge=ue=>ue.lx*ue.ly*ue.opticalEfficiency*ue.thermalEfficiency*ue.absorptance*ue.reflectance*(1-N[w.getMonth()]),Se=(ue,fe,ve)=>{if(W.current.length>1){k.current.length=0,E.set(fe,ve);const we=W.current.filter(Pe=>Pe.uuid!==ue);return E.intersectObjects(we,!1,k.current),k.current.length>0}return!1},Re=()=>{const ue=P.children.filter(fe=>fe.name==="Content");if(ue.length>0){const fe=ue[0].children;W.current.length=0;for(const ve of fe)ye.fetchSimulationElements(ve,W.current)}},De=()=>{for(const ue of i)if(ue.type===z.ParabolicTrough){const fe=B.current.get(ue.id);fe?fe.fill(0):B.current.set(ue.id,new Array(24).fill(0))}},Ae=()=>{for(const ue of i)if(ue.type===z.ParabolicTrough){const fe=O.current.get(ue.id);fe&&fe.length===H?fe.fill(0):O.current.set(ue.id,new Array(H).fill(0))}};return h.jsx(h.Fragment,{})}),RBo=be.memo(({city:t})=>{const e=M(pn),n=dt(bh),o=M(oa),r=M.getState().world,i=M.getState().elements,a=M(Gr),l=Cn(Qvt),s=M(bW),c=Cn(ext),u=M(SW),d=M(yOe),f=M(AOe),p=Cn(txt),g=dt(Xvt),A=dt(Jvt),y=dt(Kvt),S=dt(qvt),C=M(jBe),{scene:P}=ri(),v=$t(),T=u1(t),w=new Date(r.date),x=t?T==null?void 0:T.elevation:0,b=r.cspTimesPerHour??4,R=60/b,H=r.cspDaysPerYear??6,F=12/H,E=m.useMemo(()=>new l0,[]),N=r.monthlyIrradianceLosses??new Array(12).fill(.05),U=r.cspGridCellSize??.5,W=m.useRef([]),k=m.useRef([]),D=m.useRef(0),L=m.useRef(!1),j=m.useRef(new Date(r.date)),B=m.useRef(new Map),O=m.useRef(new Map),V=m.useRef(0),G=m.useRef(!1),Q=m.useRef(new Date(r.date)),$=m.useMemo(()=>dl(w,r.latitude),[r.date,r.latitude]),ie=m.useRef($),q=ye.daysInYear(w)/12;m.useEffect(()=>{if(g)return se(),D.current=requestAnimationFrame(Z),()=>{cancelAnimationFrame(D.current),L.current||(gn(Y.t("message.SimulationAborted",v)),e(ue=>{ue.world.date=j.current.toLocaleString("en-US")}),dt.getState().set(ue=>{ue.simulationInProgress=!1,ue.simulationPaused=!1})),G.current=!1}},[g]),m.useEffect(()=>{G.current=y,y?(Q.current=new Date(w.getTime()),cancelAnimationFrame(D.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),Z())},[y]);const se=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(j.current=new Date(r.date),w.setHours(Math.floor($.sunrise/60),R/2-30)),L.current=!1,Re(),De()},Z=()=>{if(g&&!G.current){if(w.getMinutes()+w.getHours()*60>=$.sunset){cancelAnimationFrame(D.current),e(fe=>{fe.world.date=j.current.toLocaleString("en-US"),fe.viewState.showDailyParabolicDishYieldPanel=!0,fe.selectedFloatingWindow="dailyParabolicDishYieldPanel"}),dt.getState().set(fe=>{fe.runDailySimulationForParabolicDishes=!1,fe.simulationInProgress=!1,fe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),L.current=!0,ee(),o&&e(fe=>{const ve=Cn.getState().sumDailyParabolicDishYield();fe.actionInfo={name:"Daily Simulation for Parabolic Dishes Completed",result:{totalYield:ve},details:Cn.getState().dailyParabolicDishYield,timestamp:new Date().getTime()}});return}w.setHours(w.getHours(),w.getMinutes()+R),e(fe=>{fe.world.date=w.toLocaleString("en-US")});for(const fe of i)fe.type===z.ParabolicDish&&me(fe);D.current=requestAnimationFrame(Z)}},ee=()=>{const ue=le();for(const fe of i)if(fe.type===z.ParabolicDish){const ve=fe,we=B.current.get(ve.id);if(we){const Pe=ge(ve)*ue;for(let Ie=0;Ie{var ue;if(d){const fe=new Array(24).fill(0),ve=new Map;let we=0;const Pe=[];for(const Me of i)if(Me.type===z.ParabolicDish){const ze=B.current.get(Me.id);if(ze){s(Me.id,ze.reduce((Ne,Je)=>Ne+Je,0)),we++,ve.set("Dish"+we,ze),Pe.push(Me.label??"Dish"+we);for(let Ne=0;Ne<24;Ne++)fe[Ne]+=ze[Ne]}}const Ie=[];for(let Me=0;Me<24;Me++){const ze={};ze.Hour=Me;for(let Ne=1;Ne<=we;Ne++){const Je="Dish"+Ne;ze[Pe[Ne-1]]=(ue=ve.get(Je))==null?void 0:ue[Me]}Ie.push(ze)}l(Ie),p(Pe)}else{const fe=new Array(24).fill(0);for(const we of i)if(we.type===z.ParabolicDish){const Pe=B.current.get(we.id);if(Pe){s(we.id,Pe.reduce((Ie,Me)=>Ie+Me,0));for(let Ie=0;Ie<24;Ie++)fe[Ie]+=Pe[Ie]}}const ve=[];for(let we=0;we<24;we++)ve.push({Hour:we,Total:fe[we]});l(ve)}};m.useEffect(()=>{if(A)return oe(),D.current=requestAnimationFrame(de),()=>{cancelAnimationFrame(D.current),L.current||(gn(Y.t("message.SimulationAborted",v)),e(ue=>{ue.world.date=j.current.toLocaleString("en-US")}),dt.getState().set(ue=>{ue.simulationInProgress=!1,ue.simulationPaused=!1})),G.current=!1}},[A]),m.useEffect(()=>{G.current=S,S?(Q.current=new Date(w.getTime()),cancelAnimationFrame(D.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),de())},[S]);const oe=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(j.current=new Date(r.date),V.current=0,w.setMonth(0,22),ie.current=dl(w,r.latitude),w.setHours(Math.floor(ie.current.sunrise/60),R/2-30),e(ue=>{ue.world.date=w.toLocaleString("en-US")})),L.current=!1,Re(),De(),Ae()},de=()=>{if(A&&!G.current)if(w.getMinutes()+w.getHours()*60{fe.world.date=w.toLocaleString("en-US")});for(const fe of i)fe.type===z.ParabolicDish&&me(fe);D.current=requestAnimationFrame(de)}else{if(he(),V.current++,V.current===H){cancelAnimationFrame(D.current),e(fe=>{fe.world.date=j.current.toLocaleString("en-US"),fe.viewState.showYearlyParabolicDishYieldPanel=!0,fe.selectedFloatingWindow="yearlyParabolicDishYieldPanel"}),dt.getState().set(fe=>{fe.runYearlySimulationForParabolicDishes=!1,fe.simulationInProgress=!1,fe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),L.current=!0,pe(),o&&e(fe=>{const ve=Cn.getState().sumYearlyParabolicDishYield();fe.actionInfo={name:"Yearly Simulation for Parabolic Dishes Completed",result:{totalYield:ve},details:Cn.getState().yearlyParabolicDishYield,timestamp:new Date().getTime()}});return}w.setMonth(V.current*F,22),ie.current=dl(w,r.latitude),w.setHours(Math.floor(ie.current.sunrise/60),R/2-30),De(),D.current=requestAnimationFrame(de)}},he=()=>{const ue=Te();for(const fe of i)if(fe.type===z.ParabolicDish){const ve=fe,we=B.current.get(ve.id);if(we){const Pe=O.current.get(ve.id);if(Pe){const Ie=we.reduce((Me,ze)=>Me+ze,0);Pe[V.current]+=Ie*ue*ge(ve)}}}C&&ee()},pe=()=>{if(f){const ue=[],fe=[];let ve=0;for(const Pe of i)if(Pe.type===z.ParabolicDish){const Ie=O.current.get(Pe.id);Ie&&(u(Pe.id,Ie.reduce((Me,ze)=>Me+ze,0)*F*q),ue.push(Ie),ve++,fe.push(Pe.label??"Dish"+ve))}const we=[];for(let Pe=0;Pe<12;Pe+=F){const Ie={};Ie.Month=zs[Pe];for(const[Me,ze]of ue.entries())Ie[fe[Me]]=ze[Pe/F]*q;we.push(Ie)}c(we),p(fe)}else{const ue=[];for(const ve of i)if(ve.type===z.ParabolicDish){const we=O.current.get(ve.id);we&&(u(ve.id,we.reduce((Pe,Ie)=>Pe+Ie,0)*F*q),ue.push(we))}const fe=[];for(let ve=0;ve<12;ve+=F){let we=0;for(const Pe of ue)we+=Pe[ve/F];fe.push({Month:zs[ve],Total:we*q})}c(fe)}},me=ue=>{const fe=ki(w,r.latitude);if(fe.z0&&(wt.set(Oe+At*nt,st+pt*We),ut||wt.rotateAround(xt,it),vt.set(wt.x-xt.x,wt.y-xt.y,0),vt.applyEuler(Ze),gt.set(Pe.x+vt.x,Pe.y+vt.y,je+vt.z),Se(ue.id,gt,fe)||(Rt+=$e*Be));const Gt=B.current.get(ue.id);if(Gt){const At=w.getMinutes()>=30?w.getHours()+1===24?0:w.getHours()+1:w.getHours();Gt[At]+=Rt/(Je*Ue)}},le=()=>{const ue=$.daylight()/60;return ue>Et?T.sunshineHours[w.getMonth()]/(30*ue*b):0},Te=()=>{const ue=ie.current.daylight()/60;return ue>Et?T.sunshineHours[w.getMonth()]/(30*ue*b):0},ge=ue=>ue.lx*ue.ly*ue.opticalEfficiency*ue.thermalEfficiency*ue.absorptance*ue.reflectance*(1-N[w.getMonth()]),Se=(ue,fe,ve)=>{if(W.current.length>1){k.current.length=0,E.set(fe,ve);const we=W.current.filter(Pe=>Pe.uuid!==ue);return E.intersectObjects(we,!1,k.current),k.current.length>0}return!1},Re=()=>{const ue=P.children.filter(fe=>fe.name==="Content");if(ue.length>0){const fe=ue[0].children;W.current.length=0;for(const ve of fe)ye.fetchSimulationElements(ve,W.current)}},De=()=>{for(const ue of i)if(ue.type===z.ParabolicDish){const fe=B.current.get(ue.id);fe?fe.fill(0):B.current.set(ue.id,new Array(24).fill(0))}},Ae=()=>{for(const ue of i)if(ue.type===z.ParabolicDish){const fe=O.current.get(ue.id);fe&&fe.length===H?fe.fill(0):O.current.set(ue.id,new Array(H).fill(0))}};return h.jsx(h.Fragment,{})}),HBo=be.memo(({city:t})=>{const e=M(pn),n=dt(bh),o=M(oa),r=M.getState().world,i=M.getState().elements,a=M(Gr),l=Cn(Svt),s=M(bW),c=M(sOe),u=Cn(Pvt),d=M(SW),f=M(cOe),p=Cn(Cvt),g=dt(Avt),A=dt(wvt),y=dt(vvt),S=dt(xvt),C=M(BBe),{scene:P}=ri(),v=$t(),T=u1(t),w=new Date(r.date),x=t?T==null?void 0:T.elevation:0,b=r.cspTimesPerHour??4,R=60/b,H=r.cspDaysPerYear??6,F=12/H,E=m.useMemo(()=>new l0,[]),N=r.monthlyIrradianceLosses??new Array(12).fill(.05),U=r.cspGridCellSize??.5,W=m.useRef([]),k=m.useRef([]),D=m.useRef(0),L=m.useRef(!1),j=m.useRef(new Date(r.date)),B=m.useRef(new Map),O=m.useRef(new Map),V=m.useRef(0),G=m.useRef(!1),Q=m.useRef(new Date(r.date)),$=m.useMemo(()=>dl(w,r.latitude),[r.date,r.latitude]),ie=m.useRef($),q=ye.daysInYear(w)/12;m.useEffect(()=>{if(g)return se(),D.current=requestAnimationFrame(Z),()=>{cancelAnimationFrame(D.current),L.current||(gn(Y.t("message.SimulationAborted",v)),e(ue=>{ue.world.date=j.current.toLocaleString("en-US")}),dt.getState().set(ue=>{ue.simulationInProgress=!1,ue.simulationPaused=!1})),G.current=!1}},[g]),m.useEffect(()=>{G.current=y,y?(Q.current=new Date(w.getTime()),cancelAnimationFrame(D.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),Z())},[y]);const se=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(j.current=new Date(r.date),w.setHours(Math.floor($.sunrise/60),R/2-30)),L.current=!1,Re(),De()},Z=()=>{if(g&&!G.current){if(w.getMinutes()+w.getHours()*60>=$.sunset){cancelAnimationFrame(D.current),e(fe=>{fe.world.date=j.current.toLocaleString("en-US"),fe.viewState.showDailyFresnelReflectorYieldPanel=!0,fe.selectedFloatingWindow="dailyFresnelReflectorYieldPanel"}),dt.getState().set(fe=>{fe.runDailySimulationForFresnelReflectors=!1,fe.simulationInProgress=!1,fe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),L.current=!0,ee(),o&&e(fe=>{const ve=Cn.getState().sumDailyFresnelReflectorYield();fe.actionInfo={name:"Daily Simulation for Fresnel Reflectors Completed",result:{totalYield:ve},details:Cn.getState().dailyFresnelReflectorYield,timestamp:new Date().getTime()}});return}w.setHours(w.getHours(),w.getMinutes()+R),e(fe=>{fe.world.date=w.toLocaleString("en-US")});for(const fe of i)fe.type===z.FresnelReflector&&me(fe);D.current=requestAnimationFrame(Z)}},ee=()=>{const ue=le();for(const fe of i)if(fe.type===z.FresnelReflector){const ve=fe,we=B.current.get(ve.id);if(we){const Pe=ge(ve)*ue;for(let Ie=0;Ie{var ue;if(c){const fe=new Array(24).fill(0),ve=new Map;let we=0;const Pe=[];for(const Me of i)if(Me.type===z.FresnelReflector){const ze=B.current.get(Me.id);if(ze){s(Me.id,ze.reduce((Ne,Je)=>Ne+Je,0)),we++,ve.set("Reflector"+we,ze),Pe.push(Me.label??"Reflector"+we);for(let Ne=0;Ne<24;Ne++)fe[Ne]+=ze[Ne]}}const Ie=[];for(let Me=0;Me<24;Me++){const ze={};ze.Hour=Me;for(let Ne=1;Ne<=we;Ne++){const Je="Reflector"+Ne;ze[Pe[Ne-1]]=(ue=ve.get(Je))==null?void 0:ue[Me]}Ie.push(ze)}l(Ie),p(Pe)}else{const fe=new Array(24).fill(0);for(const we of i)if(we.type===z.FresnelReflector){const Pe=B.current.get(we.id);if(Pe){s(we.id,Pe.reduce((Ie,Me)=>Ie+Me,0));for(let Ie=0;Ie<24;Ie++)fe[Ie]+=Pe[Ie]}}const ve=[];for(let we=0;we<24;we++)ve.push({Hour:we,Total:fe[we]});l(ve)}};m.useEffect(()=>{if(A)return oe(),D.current=requestAnimationFrame(de),()=>{cancelAnimationFrame(D.current),L.current||(gn(Y.t("message.SimulationAborted",v)),e(ue=>{ue.world.date=j.current.toLocaleString("en-US")}),dt.getState().set(ue=>{ue.simulationInProgress=!1,ue.simulationPaused=!1})),G.current=!1}},[A]),m.useEffect(()=>{G.current=S,S?(Q.current=new Date(w.getTime()),cancelAnimationFrame(D.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),de())},[S]);const oe=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(j.current=new Date(r.date),V.current=0,w.setMonth(0,22),ie.current=dl(w,r.latitude),w.setHours(Math.floor(ie.current.sunrise/60),R/2-30),e(ue=>{ue.world.date=w.toLocaleString("en-US")})),L.current=!1,Re(),De(),Ae()},de=()=>{if(A&&!G.current)if(w.getMinutes()+w.getHours()*60{fe.world.date=w.toLocaleString("en-US")});for(const fe of i)fe.type===z.FresnelReflector&&me(fe);D.current=requestAnimationFrame(de)}else{if(he(),V.current++,V.current===H){cancelAnimationFrame(D.current),e(fe=>{fe.world.date=j.current.toLocaleString("en-US"),fe.viewState.showYearlyFresnelReflectorYieldPanel=!0,fe.selectedFloatingWindow="yearlyFresnelReflectorYieldPanel"}),dt.getState().set(fe=>{fe.runYearlySimulationForFresnelReflectors=!1,fe.simulationInProgress=!1,fe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),L.current=!0,pe(),o&&e(fe=>{const ve=Cn.getState().sumYearlyFresnelReflectorYield();fe.actionInfo={name:"Yearly Simulation for Fresnel Reflectors Completed",result:{totalYield:ve},details:Cn.getState().yearlyFresnelReflectorYield,timestamp:new Date().getTime()}});return}w.setMonth(V.current*F,22),ie.current=dl(w,r.latitude),w.setHours(Math.floor(ie.current.sunrise/60),R/2-30),De(),D.current=requestAnimationFrame(de)}},he=()=>{const ue=Te();for(const fe of i)if(fe.type===z.FresnelReflector){const ve=fe,we=B.current.get(ve.id);if(we){const Pe=O.current.get(ve.id);if(Pe){const Ie=we.reduce((Me,ze)=>Me+ze,0);Pe[V.current]+=Ie*ue*ge(ve)}}}C&&ee()},pe=()=>{if(f){const ue=[],fe=[];let ve=0;for(const Pe of i)if(Pe.type===z.FresnelReflector){const Ie=O.current.get(Pe.id);Ie&&(d(Pe.id,Ie.reduce((Me,ze)=>Me+ze,0)*F*q),ue.push(Ie),ve++,fe.push(Pe.label??"Reflector"+ve))}const we=[];for(let Pe=0;Pe<12;Pe+=F){const Ie={};Ie.Month=zs[Pe];for(const[Me,ze]of ue.entries())Ie[fe[Me]]=ze[Pe/F]*q;we.push(Ie)}u(we),p(fe)}else{const ue=[];for(const ve of i)if(ve.type===z.FresnelReflector){const we=O.current.get(ve.id);we&&(d(ve.id,we.reduce((Pe,Ie)=>Pe+Ie,0)*F*q),ue.push(we))}const fe=[];for(let ve=0;ve<12;ve+=F){let we=0;for(const Pe of ue)we+=Pe[ve/F];fe.push({Month:zs[ve],Total:we*q})}u(fe)}},me=ue=>{const fe=ki(w,r.latitude);if(fe.z0&&(pt.set(ct,je+Ve*Oe),Wt.set(pt.x-gt.x,pt.y-gt.y,0),Wt.applyEuler(vt),Ye.set(Me.x+Wt.x,Me.y+Wt.y,xt+Wt.z),!Se(ue.id,Ye,fe)&&!Se(ue.id,Ye,Rt)&&(ht+=At*Gt))}const It=B.current.get(ue.id);if(It){const Ft=w.getMinutes()>=30?w.getHours()+1===24?0:w.getHours()+1:w.getHours();It[Ft]+=ht/(We*Ee)}},le=()=>{const ue=$.daylight()/60;return ue>Et?T.sunshineHours[w.getMonth()]/(30*ue*b):0},Te=()=>{const ue=ie.current.daylight()/60;return ue>Et?T.sunshineHours[w.getMonth()]/(30*ue*b):0},ge=ue=>{const fe=a(ue);if(!fe)throw new Error("parent of Fresnel reflector does not exist");let ve=1;if(fe.type===z.Foundation){const Pe=fe.solarAbsorberPipe;ve*=((Pe==null?void 0:Pe.absorberOpticalEfficiency)??.7)*((Pe==null?void 0:Pe.absorberThermalEfficiency)??.3)*((Pe==null?void 0:Pe.absorberAbsorptance)??.95)}return ue.lx*ue.ly*ue.reflectance*ve*(1-N[w.getMonth()])},Se=(ue,fe,ve)=>{if(W.current.length>1){k.current.length=0,E.set(fe,ve);const we=W.current.filter(Pe=>Pe.uuid!==ue);return E.intersectObjects(we,!1,k.current),k.current.length>0}return!1},Re=()=>{const ue=P.children.filter(fe=>fe.name==="Content");if(ue.length>0){const fe=ue[0].children;W.current.length=0;for(const ve of fe)ye.fetchSimulationElements(ve,W.current)}},De=()=>{for(const ue of i)if(ue.type===z.FresnelReflector){const fe=B.current.get(ue.id);fe?fe.fill(0):B.current.set(ue.id,new Array(24).fill(0))}},Ae=()=>{for(const ue of i)if(ue.type===z.FresnelReflector){const fe=O.current.get(ue.id);fe&&fe.length===H?fe.fill(0):O.current.set(ue.id,new Array(H).fill(0))}};return h.jsx(h.Fragment,{})}),MBo=be.memo(({city:t})=>{const e=M(pn),n=dt(bh),o=M(oa),r=M.getState().world,i=M.getState().elements,a=M(Gr),l=Cn(Dvt),s=M(bW),c=M(dOe),u=Cn(Fvt),d=M(SW),f=M(fOe),p=Cn(kvt),g=dt(Rvt),A=dt(Hvt),y=dt(Mvt),S=dt(Ivt),C=M(YBe),{scene:P}=ri(),v=$t(),T=u1(t),w=new Date(r.date),x=t?T==null?void 0:T.elevation:0,b=r.cspTimesPerHour??4,R=60/b,H=r.cspDaysPerYear??6,F=12/H,E=m.useMemo(()=>new l0,[]),N=r.monthlyIrradianceLosses??new Array(12).fill(.05),U=r.cspGridCellSize??.5,W=m.useRef([]),k=m.useRef([]),D=m.useRef(0),L=m.useRef(!1),j=m.useRef(new Date(r.date)),B=m.useRef(new Map),O=m.useRef(new Map),V=m.useRef(0),G=m.useRef(!1),Q=m.useRef(new Date(r.date)),$=m.useMemo(()=>dl(w,r.latitude),[r.date,r.latitude]),ie=m.useRef($),q=ye.daysInYear(w)/12;m.useEffect(()=>{if(g)return se(),D.current=requestAnimationFrame(Z),()=>{cancelAnimationFrame(D.current),L.current||(gn(Y.t("message.SimulationAborted",v)),e(ue=>{ue.world.date=j.current.toLocaleString("en-US")}),dt.getState().set(ue=>{ue.simulationInProgress=!1,ue.simulationPaused=!1})),G.current=!1}},[g]),m.useEffect(()=>{G.current=y,y?(Q.current=new Date(w.getTime()),cancelAnimationFrame(D.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),Z())},[y]);const se=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(j.current=new Date(r.date),w.setHours(Math.floor($.sunrise/60),R/2-30)),L.current=!1,Re(),De()},Z=()=>{if(g&&!G.current){if(w.getMinutes()+w.getHours()*60>=$.sunset){cancelAnimationFrame(D.current),e(fe=>{fe.world.date=j.current.toLocaleString("en-US"),fe.viewState.showDailyHeliostatYieldPanel=!0,fe.selectedFloatingWindow="dailyHeliostatYieldPanel"}),dt.getState().set(fe=>{fe.runDailySimulationForHeliostats=!1,fe.simulationInProgress=!1,fe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),L.current=!0,ee(),o&&e(fe=>{const ve=Cn.getState().sumDailyHeliostatYield();fe.actionInfo={name:"Daily Simulation for Heliostats Completed",result:{totalYield:ve},details:Cn.getState().dailyHeliostatYield,timestamp:new Date().getTime()}});return}w.setHours(w.getHours(),w.getMinutes()+R),e(fe=>{fe.world.date=w.toLocaleString("en-US")});for(const fe of i)fe.type===z.Heliostat&&me(fe);D.current=requestAnimationFrame(Z)}},ee=()=>{const ue=le();for(const fe of i)if(fe.type===z.Heliostat){const ve=fe,we=B.current.get(ve.id);if(we){const Pe=ge(ve)*ue;for(let Ie=0;Ie{var ue;if(c){const fe=new Array(24).fill(0),ve=new Map;let we=0;const Pe=[];for(const Me of i)if(Me.type===z.Heliostat){const ze=B.current.get(Me.id);if(ze){s(Me.id,ze.reduce((Ne,Je)=>Ne+Je,0)),we++,ve.set("Heliostat"+we,ze),Pe.push(Me.label??"Heliostat"+we);for(let Ne=0;Ne<24;Ne++)fe[Ne]+=ze[Ne]}}const Ie=[];for(let Me=0;Me<24;Me++){const ze={};ze.Hour=Me;for(let Ne=1;Ne<=we;Ne++){const Je="Heliostat"+Ne;ze[Pe[Ne-1]]=(ue=ve.get(Je))==null?void 0:ue[Me]}Ie.push(ze)}l(Ie),p(Pe)}else{const fe=new Array(24).fill(0);for(const we of i)if(we.type===z.Heliostat){const Pe=B.current.get(we.id);if(Pe){s(we.id,Pe.reduce((Ie,Me)=>Ie+Me,0));for(let Ie=0;Ie<24;Ie++)fe[Ie]+=Pe[Ie]}}const ve=[];for(let we=0;we<24;we++)ve.push({Hour:we,Total:fe[we]});l(ve)}};m.useEffect(()=>{if(A)return oe(),D.current=requestAnimationFrame(de),()=>{cancelAnimationFrame(D.current),L.current||(gn(Y.t("message.SimulationAborted",v)),e(ue=>{ue.world.date=j.current.toLocaleString("en-US")}),dt.getState().set(ue=>{ue.simulationInProgress=!1,ue.simulationPaused=!1})),G.current=!1}},[A]),m.useEffect(()=>{G.current=S,S?(Q.current=new Date(w.getTime()),cancelAnimationFrame(D.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),de())},[S]);const oe=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(j.current=new Date(r.date),V.current=0,w.setMonth(0,22),ie.current=dl(w,r.latitude),w.setHours(Math.floor(ie.current.sunrise/60),R/2-30),e(ue=>{ue.world.date=w.toLocaleString("en-US")})),L.current=!1,Re(),De(),Ae()},de=()=>{if(A&&!G.current)if(w.getMinutes()+w.getHours()*60{fe.world.date=w.toLocaleString("en-US")});for(const fe of i)fe.type===z.Heliostat&&me(fe);D.current=requestAnimationFrame(de)}else{if(he(),V.current++,V.current===H){cancelAnimationFrame(D.current),e(fe=>{fe.world.date=j.current.toLocaleString("en-US"),fe.viewState.showYearlyHeliostatYieldPanel=!0,fe.selectedFloatingWindow="yearlyHeliostatYieldPanel"}),dt.getState().set(fe=>{fe.runYearlySimulationForHeliostats=!1,fe.simulationInProgress=!1,fe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),L.current=!0,pe(),o&&e(fe=>{const ve=Cn.getState().sumYearlyHeliostatYield();fe.actionInfo={name:"Yearly Simulation for Heliostats Completed",result:{totalYield:ve},details:Cn.getState().yearlyHeliostatYield,timestamp:new Date().getTime()}});return}w.setMonth(V.current*F,22),ie.current=dl(w,r.latitude),w.setHours(Math.floor(ie.current.sunrise/60),R/2-30),De(),D.current=requestAnimationFrame(de)}},he=()=>{const ue=Te();for(const fe of i)if(fe.type===z.Heliostat){const ve=fe,we=B.current.get(ve.id);if(we){const Pe=O.current.get(ve.id);if(Pe){const Ie=we.reduce((Me,ze)=>Me+ze,0);Pe[V.current]+=Ie*ue*ge(ve)}}}C&&ee()},pe=()=>{if(f){const ue=[],fe=[];let ve=0;for(const Pe of i)if(Pe.type===z.Heliostat){const Ie=O.current.get(Pe.id);Ie&&(d(Pe.id,Ie.reduce((Me,ze)=>Me+ze,0)*F*q),ue.push(Ie),ve++,fe.push(Pe.label??"Heliostat"+ve))}const we=[];for(let Pe=0;Pe<12;Pe+=F){const Ie={};Ie.Month=zs[Pe];for(const[Me,ze]of ue.entries())Ie[fe[Me]]=ze[Pe/F]*q;we.push(Ie)}u(we),p(fe)}else{const ue=[];for(const ve of i)if(ve.type===z.Heliostat){const we=O.current.get(ve.id);we&&(d(ve.id,we.reduce((Pe,Ie)=>Pe+Ie,0)*F*q),ue.push(we))}const fe=[];for(let ve=0;ve<12;ve+=F){let we=0;for(const Pe of ue)we+=Pe[ve/F];fe.push({Month:zs[ve],Total:we*q})}u(fe)}},me=ue=>{const fe=ki(w,r.latitude);if(fe.z0&&($e.set(Rt,je+pt*Oe),wt.set($e.x-gt.x,$e.y-gt.y,0),wt.applyEuler(lt),Ye.set(Me.x+wt.x,Me.y+wt.y,xt+wt.z),!Se(ue.id,Ye,fe)&&!Se(ue.id,Ye,Qe)&&(vt+=Be*Ze))}const Gt=B.current.get(ue.id);if(Gt){const At=w.getMinutes()>=30?w.getHours()+1===24?0:w.getHours()+1:w.getHours();Gt[At]+=vt/(We*Ee)}},le=()=>{const ue=$.daylight()/60;return ue>Et?T.sunshineHours[w.getMonth()]/(30*ue*b):0},Te=()=>{const ue=ie.current.daylight()/60;return ue>Et?T.sunshineHours[w.getMonth()]/(30*ue*b):0},ge=ue=>{const fe=a(ue);if(!fe)throw new Error("parent of heliostat does not exist");let ve=1;if(fe.type===z.Foundation){const Pe=fe.solarPowerTower;ve*=((Pe==null?void 0:Pe.receiverOpticalEfficiency)??.7)*((Pe==null?void 0:Pe.receiverThermalEfficiency)??.3)*((Pe==null?void 0:Pe.receiverAbsorptance)??.95)}return ue.lx*ue.ly*ue.reflectance*ve*(1-N[w.getMonth()])},Se=(ue,fe,ve)=>{if(W.current.length>1){k.current.length=0,E.set(fe,ve);const we=W.current.filter(Pe=>Pe.uuid!==ue);return E.intersectObjects(we,!1,k.current),k.current.length>0}return!1},Re=()=>{const ue=P.children.filter(fe=>fe.name==="Content");if(ue.length>0){const fe=ue[0].children;W.current.length=0;for(const ve of fe)ye.fetchSimulationElements(ve,W.current)}},De=()=>{for(const ue of i)if(ue.type===z.Heliostat){const fe=B.current.get(ue.id);fe?fe.fill(0):B.current.set(ue.id,new Array(24).fill(0))}},Ae=()=>{for(const ue of i)if(ue.type===z.Heliostat){const fe=O.current.get(ue.id);fe&&fe.length===H?fe.fill(0):O.current.set(ue.id,new Array(H).fill(0))}};return h.jsx(h.Fragment,{})}),IBo=be.memo(({city:t})=>{const e=M(pn),n=dt(bh),o=M(oa),r=M.getState().world,i=M.getState().elements,a=Cn(Gvt),l=Cn(Bvt),s=Cn(Yvt),c=Cn(_vt),u=dt(pOe),d=dt(Lvt),f=dt(gOe),p=dt(Wvt),g=M(OBe),A=M(XBe),y=M(pW)??900,S=r.sutGridCellSize??1,{scene:C}=ri(),P=$t(),v=u1(t),T=new Date(r.date),w=v?v.elevation:0,x=r.sutTimesPerHour??4,b=60/x,R=r.sutDaysPerYear??6,H=12/R,F=m.useMemo(()=>new l0,[]),E=m.useRef([]),N=m.useRef([]),U=m.useRef(0),W=m.useRef(!1),k=m.useRef(new Date(r.date)),D=m.useRef(new Array(24).fill(0)),L=m.useRef(new Map),j=m.useRef(new Map),B=m.useRef(new Map),O=m.useRef(new Map),V=m.useRef(0),G=m.useRef(!1),Q=m.useRef(new Date(r.date)),$=m.useRef(0),ie=m.useMemo(()=>dl(T,r.latitude),[r.date,r.latitude]),q=m.useRef(ie),se=ye.daysInYear(T)/12;m.useEffect(()=>{if(u)if(A&&!ye.hasMovingParts(i))Z();else return ee(),U.current=requestAnimationFrame(te),()=>{cancelAnimationFrame(U.current),W.current||(gn(Y.t("message.SimulationAborted",P)),e(we=>{we.world.date=k.current.toLocaleString("en-US")}),dt.getState().set(we=>{we.simulationInProgress=!1,we.simulationPaused=!1})),G.current=!1}},[u]),m.useEffect(()=>{G.current=d,d?(Q.current=new Date(T.getTime()),cancelAnimationFrame(U.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",P))):(n("simulationPaused",!1),te())},[d]);const Z=()=>{fe(),ge();for(const we of i)if(we.type===z.Foundation){const Pe=we;Pe.solarStructure===Dn.UpdraftTower&&Pe.solarUpdraftTower&&De(Pe)}e(we=>{we.viewState.showDailyUpdraftTowerYieldPanel=!0,we.selectedFloatingWindow="dailySolarUpdraftTowerYieldPanel"}),dt.getState().set(we=>{we.runDailySimulationForUpdraftTower=!1,we.simulationInProgress=!1,we.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",P)),W.current=!0,oe(),o&&e(we=>{const Pe=Cn.getState().sumDailyUpdraftTowerYield();we.actionInfo={name:"Static Daily Simulation for Updraft Tower Completed",result:{totalYield:Pe},details:Cn.getState().dailyUpdraftTowerYield,timestamp:new Date().getTime()}})},ee=()=>{G.current?(T.setTime(Q.current.getTime()),G.current=!1):(k.current=new Date(r.date),$.current=T.getDay(),T.setHours(Math.floor(ie.sunrise/60),-b/2)),W.current=!1,fe(),ge()},te=()=>{if(u&&!G.current){if(T.getMinutes()+T.getHours()*60+(T.getDay()-$.current)*T2+b>=ie.sunset){cancelAnimationFrame(U.current),e(Pe=>{Pe.world.date=k.current.toLocaleString("en-US"),Pe.viewState.showDailyUpdraftTowerYieldPanel=!0,Pe.selectedFloatingWindow="dailySolarUpdraftTowerYieldPanel"}),dt.getState().set(Pe=>{Pe.runDailySimulationForUpdraftTower=!1,Pe.simulationInProgress=!1,Pe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",P)),W.current=!0,oe(),o&&e(Pe=>{const Ie=Cn.getState().sumDailyUpdraftTowerYield();Pe.actionInfo={name:"Dynamic Daily Simulation for Updraft Tower Completed",result:{totalYield:Ie},details:Cn.getState().dailyUpdraftTowerYield,timestamp:new Date().getTime()}});return}T.setHours(T.getHours(),T.getMinutes()+b),e(Pe=>{Pe.world.date=T.toLocaleString("en-US")});for(const Pe of i)if(Pe.type===z.Foundation){const Ie=Pe;Ie.solarStructure===Dn.UpdraftTower&&Ie.solarUpdraftTower&&Re(Ie)}U.current=requestAnimationFrame(te)}},oe=()=>{const we=Ae();for(const Pe of i)if(Pe.type===z.Foundation){const Ie=Pe;if(Ie.solarStructure===Dn.UpdraftTower&&Ie.solarUpdraftTower){const Me=Ie.solarUpdraftTower.collectorTransmissivity??.9,ze=Ie.solarUpdraftTower.turbineEfficiency??.3,Ne=Ie.solarUpdraftTower.dischargeCoefficient??.65,Je=Math.PI*Ie.solarUpdraftTower.chimneyRadius*Ie.solarUpdraftTower.chimneyRadius,Ue=Math.PI*Ie.solarUpdraftTower.collectorRadius*Ie.solarUpdraftTower.collectorRadius,nt=mO*zSe*Je,We=2*ISe*Ie.solarUpdraftTower.chimneyHeight,Ee=L.current.get(Pe.id+"-sut"),ke=j.current.get(Pe.id+"-sut"),Oe=B.current.get(Pe.id+"-sut");if(Oe&&Ee&&ke){const st=.5*Ne*ze*mO*Je,je=new Date(r.date);let xt;v&&(xt=rb(je,v.lowestTemperatures,v.highestTemperatures));for(let gt=0;gt0&>>0&&Ee[gt-1]>Ye){const Ze=(Ee[gt-1]+Ye)/2,Be=(r.airConvectiveCoefficient??5)*Ue*(Ze-Ye),$e=Ze+H4,wt=$e*$e*$e*$e,vt=it*it*it*it,Rt=(Ie.solarUpdraftTower.collectorEmissivity??.95)*DSe*Ue*(wt-vt);Oe[gt]-=Be+Rt,Oe[gt]<0&&(Oe[gt]=0)}const ut=Oe[gt]/(nt*it),Qe=it*(1+Math.cbrt(ut*ut/We))-H4,lt=Qe>Ye?Math.sqrt(We*((Qe+H4)/it-1)):0;Oe[gt]=st*lt*lt*lt*.001,Ee[gt]=Qe,ke[gt]=lt}}}}de()},de=()=>{var Ne,Je,Ue;const we=new Map;let Pe=0;const Ie=[];for(const nt of i)if(nt.type===z.Foundation){const We=nt;if(We.solarStructure===Dn.UpdraftTower&&We.solarUpdraftTower){Pe++;const Ee=L.current.get(nt.id+"-sut");Ee&&we.set("Temperature Tower"+Pe,Ee);const ke=j.current.get(nt.id+"-sut");ke&&we.set("Wind Speed Tower"+Pe,ke);const Oe=B.current.get(nt.id+"-sut");Oe&&(we.set("Tower"+Pe,Oe),Ie.push(nt.label?nt.label:"Tower"+Pe))}}const Me=[];for(let nt=0;nt<24;nt++){const We={};We.Hour=nt;for(let Ee=1;Ee<=Pe;Ee++){const ke="Tower"+Ee;We[Ie[Ee-1]]=(Ne=we.get(ke))==null?void 0:Ne[nt]}Me.push(We)}s(Me);const ze=[];for(let nt=0;nt<24;nt++){const We={};We.Hour=nt,We.T_Ambient=D.current[nt];for(let Ee=1;Ee<=Pe;Ee++){let ke="Temperature Tower"+Ee;We["T_"+Ie[Ee-1]]=(Je=we.get(ke))==null?void 0:Je[nt],ke="Wind Speed Tower"+Ee,We["V_"+Ie[Ee-1]]=(Ue=we.get(ke))==null?void 0:Ue[nt]}ze.push(We)}l(ze),a(Ie)};m.useEffect(()=>{if(f)if(A&&!ye.hasMovingParts(i))pe();else return he(),U.current=requestAnimationFrame(me),()=>{cancelAnimationFrame(U.current),W.current||(gn(Y.t("message.SimulationAborted",P)),e(we=>{we.world.date=k.current.toLocaleString("en-US")}),dt.getState().set(we=>{we.simulationInProgress=!1,we.simulationPaused=!1})),G.current=!1}},[f]),m.useEffect(()=>{G.current=p,p?(Q.current=new Date(T.getTime()),cancelAnimationFrame(U.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",P))):(n("simulationPaused",!1),me())},[p]);const he=()=>{G.current?(T.setTime(Q.current.getTime()),G.current=!1):(k.current=new Date(r.date),V.current=0,T.setMonth(0,22),$.current=T.getDay(),q.current=dl(T,r.latitude),T.setHours(Math.floor(q.current.sunrise/60),-b/2),e(we=>{we.world.date=T.toLocaleString("en-US")})),W.current=!1,fe(),ge(),Se()},pe=()=>{fe(),ge(),Se(),k.current=new Date(r.date),V.current=0;for(let we=0;we<12;we+=H){T.setMonth(we,22),q.current=dl(T,r.latitude),ge();for(const Pe of i)if(Pe.type===z.Foundation){const Ie=Pe;Ie.solarStructure===Dn.UpdraftTower&&Ie.solarUpdraftTower&&De(Ie)}le(),V.current++}e(we=>{we.world.date=k.current.toLocaleString("en-US"),we.viewState.showYearlyUpdraftTowerYieldPanel=!0,we.selectedFloatingWindow="yearlySolarUpdraftTowerYieldPanel"}),dt.getState().set(we=>{we.runYearlySimulationForUpdraftTower=!1,we.simulationInProgress=!1,we.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",P)),W.current=!0,Te(),o&&e(we=>{const Pe=Cn.getState().sumYearlyUpdraftTowerYield();we.actionInfo={name:"Static Yearly Simulation for Updraft Tower Completed",result:{totalYield:Pe},details:Cn.getState().yearlyUpdraftTowerYield,timestamp:new Date().getTime()}})},me=()=>{if(f&&!G.current)if(T.getMinutes()+T.getHours()*60+(T.getDay()-$.current)*T2+b{Pe.world.date=T.toLocaleString("en-US")});for(const Pe of i)if(Pe.type===z.Foundation){const Ie=Pe;Ie.solarStructure===Dn.UpdraftTower&&Ie.solarUpdraftTower&&Re(Ie)}U.current=requestAnimationFrame(me)}else{if(le(),V.current++,V.current===R){cancelAnimationFrame(U.current),e(Pe=>{Pe.world.date=k.current.toLocaleString("en-US"),Pe.viewState.showYearlyUpdraftTowerYieldPanel=!0,Pe.selectedFloatingWindow="yearlySolarUpdraftTowerYieldPanel"}),dt.getState().set(Pe=>{Pe.runYearlySimulationForUpdraftTower=!1,Pe.simulationInProgress=!1,Pe.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",P)),W.current=!0,Te(),o&&e(Pe=>{const Ie=Cn.getState().sumYearlyUpdraftTowerYield();Pe.actionInfo={name:"Dynamic Yearly Simulation for Updraft Tower Completed",result:{totalYield:Ie},details:Cn.getState().yearlyUpdraftTowerYield,timestamp:new Date().getTime()}});return}T.setMonth(V.current*H,22),$.current=T.getDay(),q.current=dl(T,r.latitude),T.setHours(Math.floor(q.current.sunrise/60),-b/2),ge(),U.current=requestAnimationFrame(me)}},le=()=>{const we=ue();for(const Pe of i)if(Pe.type===z.Foundation){const Ie=Pe;if(Ie.solarStructure===Dn.UpdraftTower&&Ie.solarUpdraftTower){const Me=B.current.get(Ie.id+"-sut"),ze=L.current.get(Pe.id+"-sut"),Ne=j.current.get(Pe.id+"-sut");if(Me&&ze&&Ne){const Je=Ie.solarUpdraftTower.collectorTransmissivity??.9,Ue=Ie.solarUpdraftTower.turbineEfficiency??.3,nt=Ie.solarUpdraftTower.dischargeCoefficient??.65,We=Math.PI*Ie.solarUpdraftTower.chimneyRadius*Ie.solarUpdraftTower.chimneyRadius,Ee=Math.PI*Ie.solarUpdraftTower.collectorRadius*Ie.solarUpdraftTower.collectorRadius,ke=mO*zSe*We,Oe=2*ISe*Ie.solarUpdraftTower.chimneyHeight,st=.5*nt*Ue*mO*We;let je;v&&(je=rb(T,v.lowestTemperatures,v.highestTemperatures));for(let gt=0;gt0&>>0&&ze[gt-1]>Ye){const Ze=(ze[gt-1]+Ye)/2,Be=(r.airConvectiveCoefficient??5)*Ee*(Ze-Ye),$e=Ze+H4,wt=$e*$e*$e*$e,vt=it*it*it*it,Rt=(Ie.solarUpdraftTower.collectorEmissivity??.95)*DSe*Ee*(wt-vt);Me[gt]-=Be+Rt,Me[gt]<0&&(Me[gt]=0)}const ut=Me[gt]/(ke*it),Qe=it*(1+Math.cbrt(ut*ut/Oe))-H4,lt=Qe>Ye?Math.sqrt(Oe*((Qe+H4)/it-1)):0;Me[gt]=st*lt*lt*lt*.001,ze[gt]=Qe,Ne[gt]=lt}const xt=O.current.get(Ie.id+"-sut");if(xt){const gt=Me.reduce((Ye,it)=>Ye+it,0);xt[V.current]+=gt}}}}g&&de()},Te=()=>{const we=[],Pe=[];let Ie=0;for(const ze of i)if(ze.type===z.Foundation){const Ne=ze;if(Ne.solarStructure===Dn.UpdraftTower&&Ne.solarUpdraftTower){const Je=O.current.get(ze.id+"-sut");Je&&(we.push(Je),Pe.push(ze.label?ze.label:"Tower"+ ++Ie))}}const Me=[];for(let ze=0;ze<12;ze+=H){const Ne={};Ne.Month=zs[ze];for(const[Je,Ue]of we.entries())Ne[Pe[Je]]=Ue[ze/H]*se;Me.push(Ne)}c(Me),a(Pe)},ge=()=>{for(const we of i)if(we.type===z.Foundation){const Pe=we;if(Pe.solarStructure===Dn.UpdraftTower&&Pe.solarUpdraftTower){const Ie=L.current.get(we.id+"-sut");Ie?Ie.fill(0):L.current.set(we.id+"-sut",new Array(24).fill(0));const Me=j.current.get(we.id+"-sut");Me?Me.fill(0):j.current.set(we.id+"-sut",new Array(24).fill(0));const ze=B.current.get(we.id+"-sut");ze?ze.fill(0):B.current.set(we.id+"-sut",new Array(24).fill(0))}}},Se=()=>{for(const we of i)if(we.type===z.Foundation){const Pe=we;if(Pe.solarStructure===Dn.UpdraftTower&&Pe.solarUpdraftTower){const Ie=O.current.get(we.id+"-sut");Ie&&Ie.length===R?Ie.fill(0):O.current.set(we.id+"-sut",new Array(R).fill(0))}}},Re=we=>{const Pe=we.solarUpdraftTower;if(!Pe)return;const Ie=ki(T,r.latitude);if(Ie.zxt)&&(Ye++,gt+=Oe,je>0&&(ve(we.id+"-sut",st,Ie)||(gt+=je*ke)))}Ye&&(gt/=Ye);const Qe=T.getMinutes()>=30?T.getHours()+1===24?0:T.getHours()+1:T.getHours(),lt=Math.PI*Pe.collectorRadius*Pe.collectorRadius;Me[Qe]+=gt*lt}},De=we=>{const Pe=we.solarUpdraftTower;if(!Pe)return;const Ie=B.current.get(we.id+"-sut");if(!Ie)return;const Me=new ae().fromArray(we.normal),ze=T.getFullYear(),Ne=T.getMonth(),Je=T.getDate(),Ue=ye.dayOfYear(T),nt=Pe.collectorRadius,We=Math.max(2,Math.round(nt*2/S)),Ee=we.cx-nt+S/2,ke=we.cy-nt+S/2,Oe=we.lz+Pe.collectorHeight,st=new ae(0,0,Oe),je=nt*nt;let xt=0,gt,Ye;const it=Math.PI*Pe.collectorRadius*Pe.collectorRadius;for(let ut=0;ut<24;ut++){for(let Qe=0;Qe0){const Be=vi(Ze,Ue,w,li.SPHERE_MODEL),$e=qr(r.ground,Ne,ko,Be),wt=Me.dot(Ze);xt=0;for(let vt=0;vtje)&&(xt++,Ie[ut]+=$e,wt>0&&(ve(we.id+"-sut",st,Ze)||(Ie[ut]+=wt*Be)))}}}xt&&(Ie[ut]/=xt),Ie[ut]*=it}},Ae=()=>{const we=ie.daylight()/60;return we>Et?v.sunshineHours[T.getMonth()]/(30*we*x):0},ue=()=>{const we=T.getMonth(),Pe=q.current.daylight()/60;return Pe>Et?v.sunshineHours[we]/(30*Pe*x):0},fe=()=>{const we=C.children.filter(Pe=>Pe.name==="Content");if(we.length>0){const Pe=we[0].children;E.current.length=0;for(const Ie of Pe)ye.fetchSimulationElements(Ie,E.current)}},ve=(we,Pe,Ie)=>{if(E.current.length>1){N.current.length=0,F.set(Pe,Ie);const Me=E.current.filter(ze=>ze.uuid!==we);return F.intersectObjects(Me,!1,N.current),N.current.length>0}return!1};return h.jsx(h.Fragment,{})});class zBo{constructor(e,n){this.position=e,this.observer=n}}const DBo=be.memo(()=>{const t=M.getState().world,e=M.getState().elements,n=M(pn),o=dt(bh),r=M(Gr),i=M(yA),a=dt(Q7t),{scene:l}=ri(),s=$t(),c=m.useMemo(()=>new l0,[]),u=t.solarPanelVisibilityGridCellSize??.2,d=m.useRef([]),f=m.useRef([]),p=m.useRef([]);m.useEffect(()=>{a&&e&&e.length>0&&(y(),o("runSolarPanelVisibilityAnalysis",!1),n(P=>{P.viewState.showSolarPanelVisibilityResultsPanel=!0,P.selectedFloatingWindow="visibilityResultsPanel"}),gn(Y.t("message.SimulationCompleted",s))),o("simulationInProgress",!1)},[a]);const g=()=>{const P=l.children.filter(v=>v.name==="Content");if(P.length>0){const v=P[0].children;f.current.length=0;for(const T of v)ye.fetchSimulationElements(T,f.current)}},A=()=>{d.current=[];for(const P of e)if(P.type===z.Human){const v=P;if(v.observer){const T=r(v),w=T?ye.absoluteHumanOrTreeCoordinates(v.cx,v.cy,v.cz,T):new ae(v.cx,v.cy,v.cz);w.z+=v.lz,d.current.push(new zBo(w,v))}}},y=()=>{if(Cn.getState().clearSolarPanelVisibilityResults(),A(),d.current.length!==0){g();for(const P of d.current){const v=new Map;for(const T of e)if(T.type===z.SolarPanel){const w=T;v.set(w.parentId,0)}for(const T of e)if(T.type===z.SolarPanel){const w=T;let x=v.get(w.parentId)??0;x+=S(w,P.position)*100,v.set(w.parentId,x)}Cn.getState().setSolarPanelVisibilityResult(P,v)}}},S=(P,v)=>{let T=r(P);if(!T)throw new Error("parent of solar panel does not exist");let w=!1;const x=P.parentType===z.Wall;if(T.type===z.Roof){if(T=i(T),!T)throw new Error("foundation of solar panel does not exist");w=!0}const b=x?ye.absoluteCoordinates(P.cx,P.cy,P.cz,T,i(P),P.lz):ye.absoluteCoordinates(P.cx,P.cy,P.cz,T,void 0,void 0,!0);w&&(b.z=P.cz+T.cz);const R=new ae().fromArray(P.normal);x&&R.applyEuler(new ln(0,0,T.relativeAngle));const H=T.rotation[2]+P.relativeAzimuth;Math.abs(P.tiltAngle)>.001&&R.applyEuler(new ln(P.tiltAngle,0,H,"ZYX"));const F=P.lx,E=P.ly*Math.cos(P.tiltAngle),N=P.ly*Math.abs(Math.sin(P.tiltAngle)),U=Math.max(2,Math.round(P.lx/u)),W=Math.max(2,Math.round(P.ly/u)),k=F/U,D=E/W,L=N/W,j=b.x-F/2,B=b.y-E/2,O=(w?b.z:P.poleHeight+b.z)-N/2,V=new Kt(b.x,b.y);let G=0;const Q=new ae,$=new ae;let ie;const q=new Kt,se=ye.isZero(H);for(let Z=0;Z0&&($.normalize(),C(P.id,Q,$)&&(G+=Math.abs($.dot(R))/(ie*ie)));return G*u*u/(4*Math.PI)},C=(P,v,T)=>{if(f.current.length>1){p.current.length=0,c.set(v,T);const w=f.current.filter(x=>x.uuid!==P);if(c.intersectObjects(w,!1,p.current),p.current.length===0)return!0;for(const[x,b]of p.current.entries())if(b.object.name.endsWith("eyeball")&&x===0)return!0;return!1}return!0};return h.jsx(h.Fragment,{})}),EBo=be.memo(({city:t})=>{const e=M(pn),n=dt(bh),o=M(oa),r=M.getState().world,i=M.getState().elements,a=M(Gr),l=M(yA),s=M(X7t),c=M(K7t),u=Cn(sxt),d=Cn(ixt),f=Cn(lxt),p=dt(vOe),g=dt(nxt),A=dt(xOe),y=dt(oxt),S=M(WBe),C=M(Hge),{scene:P}=ri(),v=$t(),T=u1(t),w=new Date(r.date),x=m.useMemo(()=>s(t??"Boston MA, USA"),[t]),b=m.useMemo(()=>c(t??"Boston MA, USA"),[t]),R=t?T==null?void 0:T.elevation:0,H=r.timesPerHour??4,F=60/H,E=m.useMemo(()=>new l0,[]),N=m.useRef([]),U=m.useRef([]),W=m.useRef(0),k=m.useRef(!1),D=m.useRef(new Date(r.date)),L=m.useRef(new Map),j=m.useRef(new Map),B=m.useRef(new Array(12).fill(0)),O=m.useRef(new Array(12).fill(0)),V=m.useRef(0),G=m.useRef(!1),Q=m.useRef(new Date(r.date)),$=m.useRef(0),ie=m.useMemo(()=>dl(w,r.latitude),[r.date,r.latitude]),q=m.useRef(ie);m.useEffect(()=>{if(p)if(C&&!ye.hasMovingParts(i))se();else return Z(),W.current=requestAnimationFrame(ee),()=>{cancelAnimationFrame(W.current),k.current||(gn(Y.t("message.SimulationAborted",v)),e(ve=>{ve.world.date=D.current.toLocaleString("en-US")}),dt.getState().set(ve=>{ve.simulationInProgress=!1,ve.simulationPaused=!1})),G.current=!1}},[p]),m.useEffect(()=>{G.current=g,g?(Q.current=new Date(w.getTime()),cancelAnimationFrame(W.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),ee())},[g]);const se=()=>{ue(),Te();for(const ve of i)ve.type===z.Sensor&&Re(ve);e(ve=>{ve.viewState.showDailyLightSensorPanel=!0,ve.selectedFloatingWindow="dailyLightSensorPanel"}),dt.getState().set(ve=>{ve.runDailyLightSensor=!1,ve.simulationInProgress=!1,ve.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),k.current=!0,te(),o&&e(ve=>{ve.actionInfo={name:"Static Daily Simulation for Sensors Completed",details:Cn.getState().dailyLightSensorData,timestamp:new Date().getTime()}})},Z=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(D.current=new Date(r.date),$.current=w.getDay(),w.setHours(Math.floor(ie.sunrise/60),-F/2)),k.current=!1,ue(),Te()},ee=()=>{if(p&&!G.current){if(w.getMinutes()+w.getHours()*60+(w.getDay()-$.current)*T2+F>=ie.sunset){cancelAnimationFrame(W.current),e(we=>{we.world.date=D.current.toLocaleString("en-US"),we.viewState.showDailyLightSensorPanel=!0,we.selectedFloatingWindow="dailyLightSensorPanel"}),dt.getState().set(we=>{we.runDailyLightSensor=!1,we.simulationInProgress=!1,we.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),k.current=!0,te(),o&&e(we=>{we.actionInfo={name:"Dynamic Daily Simulation for Sensors Completed",details:Cn.getState().dailyLightSensorData,timestamp:new Date().getTime()}});return}w.setHours(w.getHours(),w.getMinutes()+F),e(we=>{we.world.date=w.toLocaleString("en-US")});for(const we of i)we.type===z.Sensor&&Se(we);W.current=requestAnimationFrame(ee)}},te=()=>{const ve=De();for(const we of i)if(we.type===z.Sensor){const Pe=L.current.get(we.id);if(Pe)for(let Ie=0;Ie{var Me;const ve=new Map;let we=0;const Pe=[];for(const ze of i)if(ze.type===z.Sensor){const Ne=L.current.get(ze.id);Ne&&(ve.set("Radiation"+ ++we,Ne),Pe.push(ze.label?ze.label:"Radiation"+we))}const Ie=[];for(let ze=0;ze<24;ze++){const Ne={};Ne.Hour=ze;for(let Je=1;Je<=we;Je++){const Ue="Radiation"+Je;Ne[Pe[Je-1]]=(Me=ve.get(Ue))==null?void 0:Me[ze]}Ie.push(Ne)}d(Ie),u(Pe)};m.useEffect(()=>{if(A)if(C&&!ye.hasMovingParts(i))he();else return de(),W.current=requestAnimationFrame(pe),()=>{cancelAnimationFrame(W.current),k.current||(gn(Y.t("message.SimulationAborted",v)),e(ve=>{ve.world.date=D.current.toLocaleString("en-US")}),dt.getState().set(ve=>{ve.simulationInProgress=!1,ve.simulationPaused=!1})),G.current=!1}},[A]),m.useEffect(()=>{G.current=y,y?(Q.current=new Date(w.getTime()),cancelAnimationFrame(W.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",v))):(n("simulationPaused",!1),pe())},[y]);const de=()=>{G.current?(w.setTime(Q.current.getTime()),G.current=!1):(D.current=new Date(r.date),V.current=0,w.setMonth(0,22),$.current=w.getDay(),q.current=dl(w,r.latitude),w.setHours(Math.floor(q.current.sunrise/60),-F/2),e(ve=>{ve.world.date=w.toLocaleString("en-US")})),k.current=!1,ue(),Te(),ge()},he=()=>{ue(),Te(),ge(),D.current=new Date(r.date),V.current=0;for(let ve=0;ve<12;ve++){w.setMonth(ve,22),q.current=dl(w,r.latitude),Te();for(const we of i)we.type===z.Sensor&&Re(we);me(),V.current++}e(ve=>{ve.world.date=D.current.toLocaleString("en-US"),ve.viewState.showYearlyLightSensorPanel=!0,ve.selectedFloatingWindow="yearlyLightSensorPanel"}),dt.getState().set(ve=>{ve.runYearlyLightSensor=!1,ve.simulationInProgress=!1,ve.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),k.current=!0,le(),o&&e(ve=>{ve.actionInfo={name:"Static Yearly Simulation for Sensors Completed",details:Cn.getState().yearlyLightSensorData,timestamp:new Date().getTime()}})},pe=()=>{if(A&&!G.current)if(w.getMinutes()+w.getHours()*60+(w.getDay()-$.current)*T2+F{we.world.date=w.toLocaleString("en-US")});for(const we of i)we.type===z.Sensor&&Se(we);W.current=requestAnimationFrame(pe)}else{if(me(),V.current++,V.current===12){cancelAnimationFrame(W.current),e(we=>{we.world.date=D.current.toLocaleString("en-US"),we.viewState.showYearlyLightSensorPanel=!0,we.selectedFloatingWindow="yearlyLightSensorPanel"}),dt.getState().set(we=>{we.runYearlyLightSensor=!1,we.simulationInProgress=!1,we.simulationPaused=!1}),gn(Y.t("message.SimulationCompleted",v)),k.current=!0,le(),o&&e(we=>{we.actionInfo={name:"Dynamic Yearly Simulation for Sensors Completed",details:Cn.getState().yearlyLightSensorData,timestamp:new Date().getTime()}});return}w.setMonth(V.current,22),$.current=w.getDay(),q.current=dl(w,r.latitude),w.setHours(Math.floor(q.current.sunrise/60),-F/2),Te(),W.current=requestAnimationFrame(pe)}},me=()=>{const ve=Ae();for(const we of i)if(we.type===z.Sensor){const Pe=L.current.get(we.id);if(Pe){const Ie=j.current.get(we.id);if(Ie){const Me=Pe.reduce((ze,Ne)=>ze+Ne,0);Ie[V.current]+=Me*ve}}}S&&te()},le=()=>{const ve=[],we=[];let Pe=0,Ie=!1,Me=!1;for(const Ue of i)if(Ue.type===z.Sensor){const nt=j.current.get(Ue.id);nt&&(ve.push(nt),we.push(Ue.label?Ue.label:"Radiation"+ ++Pe),!Ie&&ye.isIdentical(Ue.normal,as)&&(Ie=!0),!Me&&ye.isIdentical(Ue.normal,cAt)&&(Me=!0))}const ze=Ie&&x;ze&&we.push("Measured (Hor.)");const Ne=Me&&b;Ne&&we.push("Measured (Ver.)");const Je=[];for(let Ue=0;Ue<12;Ue++){const nt={};nt.Month=zs[Ue];for(const[We,Ee]of ve.entries())nt.Daylight=B.current[Ue],nt.Clearness=O.current[Ue]*100,ze&&(nt["Measured (Hor.)"]=x.data[Ue]),Ne&&(nt["Measured (Ver.)"]=b.data[Ue]),nt[we[We]]=Ee[Ue];Je.push(nt)}f(Je),u(we)},Te=()=>{for(const ve of i)if(ve.type===z.Sensor){const we=L.current.get(ve.id);we?we.fill(0):L.current.set(ve.id,new Array(24).fill(0))}},ge=()=>{for(const ve of i)if(ve.type===z.Sensor){const we=j.current.get(ve.id);we?we.fill(0):j.current.set(ve.id,new Array(12).fill(0))}},Se=ve=>{const we=ki(w,r.latitude);if(we.z0&&(fe(ve.id,Me,we)||(nt+=Ue*Je));const We=L.current.get(ve.id);if(We){const Ee=w.getMinutes()>=30?w.getHours()+1===24?0:w.getHours()+1:w.getHours();We[Ee]+=nt}},Re=ve=>{const we=a(ve);if(!we)throw new Error("parent of sensor does not exist");const Pe=L.current.get(ve.id);if(!Pe)return;let Ie=null;we.type===z.Wall&&(Ie=l(ve));const Me=ye.absoluteCoordinates(ve.cx,ve.cy,ve.cz,we,Ie||void 0),ze=new ae().fromArray(ve.normal);ze.applyAxisAngle(ko,we.rotation[2]);const Ne=w.getFullYear(),Je=w.getMonth(),Ue=w.getDate(),nt=ye.dayOfYear(w);for(let We=0;We<24;We++)for(let Ee=0;Ee0){const st=vi(Oe,nt,R,li.SPHERE_MODEL),je=ze.dot(Oe);je>0&&(fe(ve.id,Me,Oe)||(Pe[We]+=je*st)),Pe[We]+=qr(r.ground,Je,ze,st)}}},De=()=>{const ve=ie.daylight()/60;return ve>Et?T.sunshineHours[w.getMonth()]/(30*ve*H):0},Ae=()=>{const ve=w.getMonth(),we=q.current.daylight()/60;return we>Et?(B.current[ve]=we,O.current[ve]=T.sunshineHours[ve]/(30*we),O.current[ve]/H):(B.current[ve]=0,O.current[ve]=0,0)},ue=()=>{const ve=P.children.filter(we=>we.name==="Content");if(ve.length>0){const we=ve[0].children;N.current.length=0;for(const Pe of we)ye.fetchSimulationElements(Pe,N.current)}},fe=(ve,we,Pe)=>{if(N.current.length>1){U.current.length=0,E.set(we,Pe);const Ie=N.current.filter(Me=>Me.uuid!==ve);return E.intersectObjects(Ie,!1,U.current),U.current.length>0}return!1};return h.jsx(h.Fragment,{})}),jFe=(t,e)=>{let n=e.efficiency;return e.cellType==="Monocrystalline"&&(n*=.95),n*(1+e.pmaxTC*(t-25))},FBo=be.memo(({city:t})=>{const e=M(pn),n=dt(bh),o=M(oa),r=M.getState().world,i=M.getState().elements,a=M(t5),l=M(Gr),s=M(yA),c=Cn(ivt),u=M(bW),d=Cn(lvt),f=M(SW),p=M(ZYe),g=M(eOe),A=Cn(svt),y=dt($Ye),S=dt(evt),C=dt(nvt),P=dt(QYe),v=dt(tvt),T=dt(ovt),w=M(NBe),x=M(Mge),b=M(pW)??900,R=dt(n5),{scene:H}=ri(),F=$t(),E=u1(t),N=new Date(r.date),U=t?E==null?void 0:E.elevation:0,W=r.timesPerHour??4,k=60/W,D=r.daysPerYear??6,L=12/D,j=m.useMemo(()=>new l0,[]),B=r.monthlyIrradianceLosses??new Array(12).fill(.05),O=r.pvGridCellSize??.25,V=m.useRef([]),G=m.useRef([]),Q=m.useRef(0),$=m.useRef(!1),ie=m.useRef(new Date(r.date)),q=m.useRef(new Map),se=m.useRef(new Map),Z=m.useRef(0),ee=m.useRef(!1),te=m.useRef(new Date(r.date)),oe=m.useRef(0),de=m.useRef(20),he=m.useMemo(()=>dl(N,r.latitude),[r.date,r.latitude]),pe=m.useRef(he),me=ye.daysInYear(N)/12;m.useEffect(()=>{if(y)if(x&&!ye.hasMovingParts(i))setTimeout(()=>{le(!1)},50);else return Te(),Q.current=requestAnimationFrame(ge),()=>{cancelAnimationFrame(Q.current),$.current||(gn(Y.t("message.SimulationAborted",F)),e(Ee=>{Ee.world.date=ie.current.toLocaleString("en-US")}),dt.getState().set(Ee=>{Ee.simulationInProgress=!1,Ee.simulationPaused=!1})),ee.current=!1}},[y]),m.useEffect(()=>{S&&x&&!ye.hasMovingParts(i)&&setTimeout(()=>{le(!0)},50)},[S]),m.useEffect(()=>{ee.current=C,C?(te.current=new Date(N.getTime()),cancelAnimationFrame(Q.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",F))):(n("simulationPaused",!1),ge())},[C]);const le=Ee=>{We(),Ie();for(const ke of i)ke.type===z.SolarPanel&&we(ke);if(e(ke=>{!R&&!Ee&&(ke.viewState.showDailyPvYieldPanel=!0,ke.selectedFloatingWindow="dailyPvYieldPanel")}),dt.getState().set(ke=>{Ee?ke.runDailySimulationForSolarPanelsLastStep=!1:ke.runDailySimulationForSolarPanels=!1,ke.simulationInProgress=!1,ke.simulationPaused=!1}),$.current=!0,Se(),!R&&!Ee&&(gn(Y.t("message.SimulationCompleted",F)),o)){const ke=Cn.getState().sumDailyPvYield(),Oe=Cn.getState().getDailyPvProfit(),st=Cn.getState().dailyPvYield;e(je=>{je.actionInfo={name:"Static Daily Simulation for Solar Panels Completed",result:{totalYield:ke.toFixed(2),profit:Oe.toFixed(2)},details:st,timestamp:new Date().getTime()}})}},Te=()=>{ee.current?(N.setTime(te.current.getTime()),ee.current=!1):(ie.current=new Date(r.date),oe.current=N.getDay(),N.setHours(Math.floor(he.sunrise/60),-k/2)),$.current=!1,We(),Ie()},ge=()=>{if(y&&!ee.current){if(N.getMinutes()+N.getHours()*60+(N.getDay()-oe.current)*T2+k>=he.sunset){if(cancelAnimationFrame(Q.current),e(ke=>{ke.world.date=ie.current.toLocaleString("en-US"),R||(ke.viewState.showDailyPvYieldPanel=!0,ke.selectedFloatingWindow="dailyPvYieldPanel")}),dt.getState().set(ke=>{ke.runDailySimulationForSolarPanels=!1,ke.simulationInProgress=!1,ke.simulationPaused=!1}),$.current=!0,Se(),!R&&(gn(Y.t("message.SimulationCompleted",F)),o)){const ke=Cn.getState().sumDailyPvYield(),Oe=Cn.getState().getDailyPvProfit(),st=Cn.getState().dailyPvYield;e(je=>{je.actionInfo={name:"Dynamic Daily Simulation for Solar Panels Completed",result:{totalYield:ke.toFixed(2),profit:Oe.toFixed(2)},details:st,timestamp:new Date().getTime()}})}return}N.setHours(N.getHours(),N.getMinutes()+k),e(ke=>{ke.world.date=N.toLocaleString("en-US")});for(const ke of i)ke.type===z.SolarPanel&&Pe(ke);Q.current=requestAnimationFrame(ge)}},Se=()=>{const Ee=ze();for(const ke of i)if(ke.type===z.SolarPanel){const Oe=ke,st=q.current.get(ke.id);if(st){const je=Je(Oe)*Ee;for(let xt=0;xt{var Ee;if(p){const ke=new Array(24).fill(0),Oe=new Map;let st=0;const je=[];for(const gt of i)if(gt.type===z.SolarPanel){const Ye=q.current.get(gt.id);if(Ye){u(gt.id,Ye.reduce((it,ut)=>it+ut,0)),st++,Oe.set("Panel"+st,Ye),je.push(gt.label?gt.label:"Panel"+st);for(let it=0;it<24;it++)ke[it]+=Ye[it]}}const xt=[];for(let gt=0;gt<24;gt++){const Ye={};Ye.Hour=gt;for(let it=1;it<=st;it++){const ut="Panel"+it;Ye[je[it-1]]=(Ee=Oe.get(ut))==null?void 0:Ee[gt]}xt.push(Ye)}c(xt),A(je)}else{const ke=new Array(24).fill(0);for(const st of i)if(st.type===z.SolarPanel){const je=q.current.get(st.id);if(je){u(st.id,je.reduce((xt,gt)=>xt+gt,0));for(let xt=0;xt<24;xt++)ke[xt]+=je[xt]}}const Oe=[];for(let st=0;st<24;st++)Oe.push({Hour:st,Total:ke[st]});c(Oe)}};m.useEffect(()=>{if(P)if(x&&!ye.hasMovingParts(i))setTimeout(()=>{Ae(!1)},50);else return De(),Q.current=requestAnimationFrame(ue),()=>{cancelAnimationFrame(Q.current),$.current||(gn(Y.t("message.SimulationAborted",F)),e(Ee=>{Ee.world.date=ie.current.toLocaleString("en-US")}),dt.getState().set(Ee=>{Ee.simulationInProgress=!1,Ee.simulationPaused=!1})),ee.current=!1}},[P]),m.useEffect(()=>{v&&x&&!ye.hasMovingParts(i)&&setTimeout(()=>{Ae(!0)},50)},[v]),m.useEffect(()=>{ee.current=T,T?(te.current=new Date(N.getTime()),cancelAnimationFrame(Q.current),n("simulationPaused",!0),gn(Y.t("message.SimulationPaused",F))):(n("simulationPaused",!1),ue())},[T]);const De=()=>{ee.current?(N.setTime(te.current.getTime()),ee.current=!1):(ie.current=new Date(r.date),Z.current=0,N.setMonth(0,22),oe.current=N.getDay(),pe.current=dl(N,r.latitude),N.setHours(Math.floor(pe.current.sunrise/60),-k/2),e(Ee=>{Ee.world.date=N.toLocaleString("en-US")})),$.current=!1,We(),Ie(),Me()},Ae=Ee=>{We(),Ie(),Me(),ie.current=new Date(r.date),Z.current=0;for(let ke=0;ke<12;ke+=L){N.setMonth(ke,22),pe.current=dl(N,r.latitude),Ie();for(const Oe of i)Oe.type===z.SolarPanel&&we(Oe);fe(),Z.current++}if(e(ke=>{ke.world.date=ie.current.toLocaleString("en-US"),!R&&!Ee&&(ke.viewState.showYearlyPvYieldPanel=!0,ke.selectedFloatingWindow="yearlyPvYieldPanel")}),dt.getState().set(ke=>{Ee?ke.runYearlySimulationForSolarPanelsLastStep=!1:ke.runYearlySimulationForSolarPanels=!1,ke.simulationInProgress=!1,ke.simulationPaused=!1}),$.current=!0,ve(),!R&&!Ee&&(gn(Y.t("message.SimulationCompleted",F)),o)){const ke=Cn.getState().sumYearlyPvYield(),Oe=Cn.getState().getYearlyPvProfit(),st=Cn.getState().yearlyPvYield;e(je=>{je.actionInfo={name:"Static Yearly Simulation for Solar Panels Completed",result:{totalYield:ke.toFixed(2),profit:Oe.toFixed(2)},details:st,timestamp:new Date().getTime()}})}},ue=()=>{if(P&&!ee.current)if(N.getMinutes()+N.getHours()*60+(N.getDay()-oe.current)*T2+k{ke.world.date=N.toLocaleString("en-US")});for(const ke of i)ke.type===z.SolarPanel&&Pe(ke);Q.current=requestAnimationFrame(ue)}else{if(fe(),Z.current++,Z.current===D){if(cancelAnimationFrame(Q.current),e(ke=>{ke.world.date=ie.current.toLocaleString("en-US"),R||(ke.viewState.showYearlyPvYieldPanel=!0,ke.selectedFloatingWindow="yearlyPvYieldPanel")}),dt.getState().set(ke=>{ke.runYearlySimulationForSolarPanels=!1,ke.simulationInProgress=!1,ke.simulationPaused=!1}),$.current=!0,ve(),!R&&(gn(Y.t("message.SimulationCompleted",F)),o)){const ke=Cn.getState().sumYearlyPvYield(),Oe=Cn.getState().getYearlyPvProfit(),st=Cn.getState().yearlyPvYield;e(je=>{je.actionInfo={name:"Dynamic Yearly Simulation for Solar Panels Completed",result:{totalYield:ke.toFixed(2),profit:Oe.toFixed(2)},details:st,timestamp:new Date().getTime()}})}return}N.setMonth(Z.current*L,22),oe.current=N.getDay(),pe.current=dl(N,r.latitude),N.setHours(Math.floor(pe.current.sunrise/60),-k/2),Ie(),Q.current=requestAnimationFrame(ue)}},fe=()=>{const Ee=Ne();for(const ke of i)if(ke.type===z.SolarPanel){const Oe=ke,st=q.current.get(ke.id);if(st){const je=se.current.get(ke.id);if(je){const xt=st.reduce((gt,Ye)=>gt+Ye,0);je[Z.current]+=xt*Ee*Je(Oe)}}}!R&&w&&Se()},ve=()=>{if(g){const Ee=[],ke=[];let Oe=0;for(const je of i)if(je.type===z.SolarPanel){const xt=se.current.get(je.id);xt&&(f(je.id,xt.reduce((gt,Ye)=>gt+Ye,0)*L*me),Ee.push(xt),Oe++,ke.push(je.label??"Panel"+Oe))}const st=[];for(let je=0;je<12;je+=L){const xt={};xt.Month=zs[je];for(const[gt,Ye]of Ee.entries())xt[ke[gt]]=Ye[je/L]*me;st.push(xt)}d(st),A(ke)}else{const Ee=[];for(const Oe of i)if(Oe.type===z.SolarPanel){const st=se.current.get(Oe.id);st&&(f(Oe.id,st.reduce((je,xt)=>je+xt,0)*L*me),Ee.push(st))}const ke=[];for(let Oe=0;Oe<12;Oe+=L){let st=0;for(const je of Ee)st+=je[Oe/L];ke.push({Month:zs[Oe],Total:st*me})}d(ke)}},we=Ee=>{if(Ee.trackerType!==Ll.NO_TRACKER)throw new Error("static simulation is not for solar panel with tracker");let ke=l(Ee);if(!ke)throw new Error("parent of solar panel does not exist");const Oe=Ee.parentType===z.Roof,st=Ee.parentType===z.Wall;if(Oe&&(ke=s(ke),!ke))throw new Error("foundation of solar panel does not exist");const je=a(Ee.pvModelName);if(!je)throw new Error("PV model not found");const xt=q.current.get(Ee.id);if(!xt)return;const gt=st?ye.absoluteCoordinates(Ee.cx,Ee.cy,Ee.cz,ke,s(Ee),Ee.lz):ye.absoluteCoordinates(Ee.cx,Ee.cy,Ee.cz,ke,void 0,void 0,!0),Ye=ke.rotation[2];let it=Ye+Ee.relativeAzimuth,ut=Ee.tiltAngle,Qe=!0;if(Oe&&(gt.z=Ee.cz+Ee.lz+.02+ke.cz,ye.isZero(Ee.rotation[0])?gt.z+=Ee.poleHeight:(ut=Ee.rotation[0],it=Ye,Qe=!1)),st&&!ye.isZero(Ee.tiltAngle)){const at=ke,Ge=s(ke),Pt=(Ge?Ge.rotation[2]+at.relativeAngle:at.relativeAngle)-Qt,ot=Ee.ly*Math.abs(Math.sin(Ee.tiltAngle))/2;gt.x+=ot*Math.cos(Pt),gt.y+=ot*Math.sin(Pt)}const lt=new ae().fromArray(Ee.normal),Ze=new ln(Oe&&!Qe?0:ut,0,it,"ZYX");lt.applyEuler(Ze);const Be=N.getFullYear(),$e=N.getMonth(),wt=N.getDate(),vt=ye.dayOfYear(N);let Rt,Gt,At,pt,Wt;r.discretization===Em.EXACT?(Rt=Ee.lx,Gt=Ee.ly,Ee.orientation===vr.portrait?(At=Math.max(1,Math.round(Ee.lx/je.width)),pt=Math.max(1,Math.round(Ee.ly/je.length)),At*=je.n,pt*=je.m):(At=Math.max(1,Math.round(Ee.lx/je.length)),pt=Math.max(1,Math.round(Ee.ly/je.width)),At*=je.m,pt*=je.n),Wt=Ee.lx/At):(Rt=Ee.lx,Gt=Ee.ly,At=Math.max(2,Math.round(Ee.lx/O)),pt=Math.max(2,Math.round(Ee.ly/O)),At%2!==0&&(At+=1),pt%2!==0&&(pt+=1),Wt=O);const ht=Rt/At,ct=Gt/pt,It=gt.x-(Rt-Wt)/2,Ft=gt.y-(Gt-Wt)/2,Ve=Oe||st?gt.z:ke.lz+Ee.poleHeight+Ee.lz,ft=new Kt(gt.x,gt.y),kt=new ae,rt=Array.from(Array(At),()=>new Array(pt));Oe&&!Qe&&(Ze.x=Ee.rotation[0],Ze.z=Ee.rotation[2]+Ye),st&&(Ze.x=Qt+Ee.tiltAngle,Ze.z=ke.relativeAngle+Ye);for(let at=0;at<24;at++)for(let Ge=0;Ge0){const ot=vi(Pt,vt,U,li.SPHERE_MODEL),bt=qr(r.ground,$e,lt,ot),zt=lt.dot(Pt),Bt=new Kt,tt=new ae;if(je.bifacialityFactor>0){const qt=lt.clone().negate(),un=qr(r.ground,$e,qt,ot),Rn=bt+un*je.bifacialityFactor;for(let yo=0;yo0?zt:-zt*je.bifacialityFactor)*ot)}else for(let qt=0;qt0&&(Bt.set(It+qt*ht,Ft+un*ct),tt.set(Bt.x-ft.x,Bt.y-ft.y,0),tt.applyEuler(Ze),kt.set(gt.x+tt.x,gt.y+tt.y,Ve+tt.z),nt(Ee.id,kt,Pt)||(rt[qt][un]+=zt*ot));let Ht=0;Ue(yt);const _t=jFe(de.current,je);switch(je.shadeTolerance){case m8.NONE:{let qt=Number.MAX_VALUE;for(let un=0;un{let ke=l(Ee);if(!ke)throw new Error("parent of solar panel does not exist");const Oe=Ee.parentType===z.Roof,st=Ee.parentType===z.Wall;if(Oe&&(ke=s(ke),!ke))throw new Error("foundation of solar panel does not exist");const je=a(Ee.pvModelName);if(!je)throw new Error("PV model not found");const xt=ki(N,r.latitude);if(xt.z<=0)return;const gt=st?ye.absoluteCoordinates(Ee.cx,Ee.cy,Ee.cz,ke,s(Ee),Ee.lz):ye.absoluteCoordinates(Ee.cx,Ee.cy,Ee.cz,ke,void 0,void 0,!0),Ye=ke.rotation[2];let it=Ee.tiltAngle,ut=Ye+(st?0:Ee.relativeAzimuth),Qe=!0;if(Oe&&(gt.z=Ee.cz+Ee.lz+.02+ke.cz,ye.isZero(Ee.rotation[0])?gt.z+=Ee.poleHeight:(it=Ee.rotation[0],ut=Ye,Qe=!1)),st&&!ye.isZero(Ee.tiltAngle)){const bt=ke,zt=s(ke),tt=(zt?zt.rotation[2]+bt.relativeAngle:bt.relativeAngle)-Qt,Ht=Ee.ly*Math.abs(Math.sin(Ee.tiltAngle))/2;gt.x+=Ht*Math.cos(tt),gt.y+=Ht*Math.sin(tt)}const lt=new ae().fromArray(Ee.normal),Ze=N.getMonth(),Be=ye.dayOfYear(N);let $e,wt,vt,Rt,Gt;r.discretization===Em.EXACT?($e=Ee.lx,wt=Ee.ly,Ee.orientation===vr.portrait?(vt=Math.max(1,Math.round(Ee.lx/je.width)),Rt=Math.max(1,Math.round(Ee.ly/je.length)),vt*=je.n,Rt*=je.m):(vt=Math.max(1,Math.round(Ee.lx/je.length)),Rt=Math.max(1,Math.round(Ee.ly/je.width)),vt*=je.m,Rt*=je.n),Gt=Ee.lx/vt):($e=Ee.lx,wt=Ee.ly,vt=Math.max(2,Math.round(Ee.lx/O)),Rt=Math.max(2,Math.round(Ee.ly/O)),vt%2!==0&&(vt+=1),Rt%2!==0&&(Rt+=1),Gt=O);const At=$e/vt,pt=wt/Rt,Wt=gt.x-($e-Gt)/2,ht=gt.y-(wt-Gt)/2,ct=Oe||st?gt.z:ke.lz+Ee.poleHeight+Ee.lz,It=new Kt(gt.x,gt.y),Ft=new ae,Ve=Array.from(Array(vt),()=>new Array(Rt));let ft=new ln(Oe&&!Qe?0:it,0,ut,"ZYX");if(Ee.trackerType!==Ll.NO_TRACKER){const bt=Ye?xt.clone().applyAxisAngle(ko,-Ye):xt.clone();switch(Ee.trackerType){case Ll.ALTAZIMUTH_DUAL_AXIS_TRACKER:{const zt=new Ts().setFromUnitVectors(ko,bt);ft=new ln().setFromQuaternion(zt),ft.z+=ut;break}case Ll.HORIZONTAL_SINGLE_AXIS_TRACKER:{const zt=new Ts().setFromUnitVectors(ko,new ae(bt.x,0,bt.z).normalize());ft=new ln().setFromQuaternion(zt),ft.z+=ut;break}case Ll.VERTICAL_SINGLE_AXIS_TRACKER:{const zt=new ae(bt.x,-bt.y,0).normalize(),Bt=Math.acos(Yc.dot(zt))*Math.sign(zt.x);ft=new ln(Ee.tiltAngle,0,Bt+Ye,"ZYX");break}case Ll.TILTED_SINGLE_AXIS_TRACKER:break}}if(st&<.applyEuler(new ln(0,0,ke.relativeAngle)),lt.applyEuler(ft),Oe&&!Qe&&(ft.x=Ee.rotation[0],ft.z=Ee.rotation[2]+Ye),st){const bt=l(Ee);bt&&(ft.x=Qt+Ee.tiltAngle,ft.z=ke.relativeAngle+bt.rotation[2])}const kt=vi(xt,Be,U,li.SPHERE_MODEL),rt=qr(r.ground,Ze,lt,kt),at=lt.dot(xt),Ge=new Kt,yt=new ae;if(je.bifacialityFactor>0){const bt=lt.clone().negate(),zt=qr(r.ground,Ze,bt,kt),Bt=rt+zt*je.bifacialityFactor;for(let tt=0;tt0?at:-at*je.bifacialityFactor)*kt)}else for(let bt=0;bt0&&(Ge.set(Wt+bt*At,ht+zt*pt),yt.set(Ge.x-It.x,Ge.y-It.y,0),yt.applyEuler(ft),Ft.set(gt.x+yt.x,gt.y+yt.y,ct+yt.z),nt(Ee.id,Ft,xt)||(Ve[bt][zt]+=at*kt));let Pt=0;switch(je.shadeTolerance){case m8.NONE:{let bt=Number.MAX_VALUE;for(let zt=0;zt=30?N.getHours()+1===24?0:N.getHours()+1:N.getHours();ot[zt]+=bt*Pt/(vt*Rt)}},Ie=()=>{for(const Ee of i)if(Ee.type===z.SolarPanel){const ke=q.current.get(Ee.id);ke?ke.fill(0):q.current.set(Ee.id,new Array(24).fill(0))}},Me=()=>{for(const Ee of i)if(Ee.type===z.SolarPanel){const ke=se.current.get(Ee.id);ke&&ke.length===D?ke.fill(0):se.current.set(Ee.id,new Array(D).fill(0))}},ze=()=>{const Ee=he.daylight()/60;return Ee>Et?E.sunshineHours[N.getMonth()]/(30*Ee*W):0},Ne=()=>{const Ee=pe.current.daylight()/60;return Ee>Et?E.sunshineHours[N.getMonth()]/(30*Ee*W):0},Je=Ee=>{if(!a(Ee.pvModelName))throw new Error("PV model not found");return Ee.lx*Ee.ly*(Ee.inverterEfficiency??.95)*(1-B[N.getMonth()])},Ue=Ee=>{if(E){const ke=rb(Ee,E.lowestTemperatures,E.highestTemperatures);de.current=ob(ke.high,ke.low,r.diurnalTemperatureModel,b,dl(Ee,r.latitude),ye.minutesIntoDay(Ee))}},nt=(Ee,ke,Oe)=>{if(V.current.length>1){G.current.length=0,j.set(ke,Oe);const st=V.current.filter(je=>je.uuid!==Ee);return j.intersectObjects(st,!1,G.current),G.current.length>0}return!1},We=()=>{const Ee=H.children.filter(ke=>ke.name==="Content");if(Ee.length>0){const ke=Ee[0].children;V.current.length=0;for(const Oe of ke)ye.fetchSimulationElements(Oe,V.current)}};return h.jsx(h.Fragment,{})}),kBo=be.memo(()=>{const t=M(s0),e=M(Mb),n=M(qYe),o=M(KYe),r=M(Jge),[i,a]=m.useState("Boston MA, USA");return m.useEffect(()=>{if(Object.keys(r).length===0)return;const l=n(t,e)??"Boston MA, USA";a(l),o(l)},[t,e,r]),h.jsxs(h.Fragment,{children:[h.jsx(SBo,{city:i}),h.jsx(TBo,{city:i}),h.jsx(PBo,{city:i}),h.jsx(EBo,{city:i}),h.jsx(FBo,{city:i}),h.jsx(DBo,{}),h.jsx(CBo,{city:i}),h.jsx(RBo,{city:i}),h.jsx(HBo,{city:i}),h.jsx(MBo,{city:i}),h.jsx(IBo,{city:i})]})}),pV="/aladdin/assets/image_fail_try_again-CaxVXMjm.png";var GL=(t=>(t[t.None=0]="None",t[t.Equal=1]="Equal",t[t.LessThan=2]="LessThan",t[t.GreaterThan=3]="GreaterThan",t[t.Between=4]="Between",t))(GL||{});const LBo=5,WBo=be.memo(({yScale:t,tickLength:e,tickIntegers:n,variable:o,name:r,unit:i,type:a,digits:l,min:s,max:c,step:u,value:d,filter:f,hover:p})=>{const g=M(pn),A=M(yp),y=M(En),S=M(m0),C=M(XYe),P=M(Xge),v=M(JYe),T=M(oa),[w,x]=m.useState(!1),b=m.useRef(s),R=m.useRef(c);m.useEffect(()=>{b.current=s},[s]),m.useEffect(()=>{R.current=c},[c]);const H={lng:S},F=A.uid===C,E=t.range(),N=t(s)-t(c),U=40,W=m.useMemo(()=>{const Z=E[0]-E[1],ee=a==="number"?Math.floor(Z/e):1;return(n?t.ticks(ee).filter(oe=>Number.isInteger(oe)):t.ticks(ee)).map(oe=>({value:oe,yOffset:t(oe)}))},[t,e,a,n,E]),k=()=>{g(Z=>{Z.projectState.selectedProperty=Z.projectState.selectedProperty!==o?o:null,T&&(Z.actionInfo={name:"Select Property",timestamp:new Date().getTime(),details:Z.projectState.selectedProperty})}),dt.getState().set(Z=>{Z.updateProjectsFlag=!0})},D=()=>{F&&C&&P?KGn(C,P,v!==o?o:null).then(()=>{k()}):k()},L=(Z,ee)=>h.jsx("span",{style:{display:"block",width:ee+"px"},children:Z}),j=()=>h.jsx("text",{onClick:D,x:0,y:-20,style:{fontSize:"10px",textAnchor:"middle",fill:"dimgray",cursor:"pointer",fontWeight:v===o?"bold":"normal"},children:r}),B=m.useMemo(()=>o==="yearlyProfit"||o==="unitCost"||o==="sellingPrice"||o==="totalYearlyCost",[o]),O=()=>o==="totalYearlyCost"||o==="totalYearlyYield"||o==="meanYearlyYield"||o==="unitCost"||o==="poleHeight"||o==="interRowSpacing"?0:o==="tiltAngle"||o==="latitude"?-90:o==="rowWidth"?1:Number.MIN_SAFE_INTEGER,V=()=>o==="tiltAngle"||o==="latitude"?90:Number.MAX_SAFE_INTEGER,G=Z=>{if(Z===null)return;const ee=b.current,te={name:"Set Minimum: "+r,timestamp:Date.now(),oldValue:ee,newValue:Z,undo:()=>{Q(ee)},redo:()=>{Q(Z)}};y(te),Q(Z)},Q=Z=>{g(ee=>{if(ee.projectState.ranges){let te=-1,oe=null;for(const[de,he]of ee.projectState.ranges.entries())if(he.variable===o){te=de,oe=he;break}if(te>=0&&oe)ee.projectState.ranges[te]={variable:oe.variable,minimum:Z,maximum:oe.maximum},A.uid&&ee.projectState.title&&YCe(A.uid,ee.projectState.title,ee.projectState.ranges).then(()=>{});else{const de={variable:o,minimum:Z,maximum:c};ee.projectState.ranges.push(de),A.uid&&ee.projectState.title&&NO(A.uid,ee.projectState.title,de).then(()=>{})}}else{const te={variable:o,minimum:Z,maximum:c};ee.projectState.ranges=[te],A.uid&&ee.projectState.title&&NO(A.uid,ee.projectState.title,te).then(()=>{})}}),b.current=Number(Z),x(!w)},$=Z=>{if(Z===null)return;const ee=R.current,te={name:"Set Maximum: "+r,timestamp:Date.now(),oldValue:ee,newValue:Z,undo:()=>{ie(ee)},redo:()=>{ie(Z)}};y(te),ie(Z)},ie=Z=>{g(ee=>{if(ee.projectState.ranges){let te=-1,oe=null;for(const[de,he]of ee.projectState.ranges.entries())if(he.variable===o){te=de,oe=he;break}if(te>=0&&oe)ee.projectState.ranges[te]={variable:oe.variable,minimum:oe.minimum,maximum:Z},A.uid&&ee.projectState.title&&YCe(A.uid,ee.projectState.title,ee.projectState.ranges).then(()=>{});else{const de={variable:o,minimum:s,maximum:Z};ee.projectState.ranges.push(de),A.uid&&ee.projectState.title&&NO(A.uid,ee.projectState.title,de).then(()=>{})}}else{const te={variable:o,minimum:s,maximum:Z};ee.projectState.ranges=[te],A.uid&&ee.projectState.title&&NO(A.uid,ee.projectState.title,te).then(()=>{})}}),R.current=Number(Z),x(!w)},q=Z=>{if(!f)return;const ee=[f.lowerBound,f.upperBound],te={name:"Set Filter: "+r,timestamp:Date.now(),oldValue:ee,newValue:Z,undo:()=>{se(ee)},redo:()=>{se(Z)}};y(te),se(Z)},se=Z=>{f&&(f.lowerBound=Z[0],f.upperBound=Z[1],p&&p(-1),g(ee=>{if(ee.projectState.filters){let te=-1;for(const[oe,de]of ee.projectState.filters.entries())if(de.variable===o){te=oe;break}if(te>=0)ee.projectState.filters[te]={variable:f.variable,type:f.type,lowerBound:f.lowerBound,upperBound:f.upperBound};else{const oe={variable:o,type:f.type,lowerBound:f.lowerBound,upperBound:f.upperBound};ee.projectState.filters.push(oe)}}}),x(!w))};return h.jsxs(h.Fragment,{children:[o!=="orientation"?h.jsx(Ml,{content:h.jsxs("div",{children:[h.jsx(Sn,{style:{width:"240px"},addonBefore:L(Y.t("word.Minimum",H)+(B?" $":""),80),addonAfter:i,min:O(),max:R.current-u,step:u,value:b.current,onPressEnter:Z=>G(Number.parseFloat(Z.target.value)),onStep:Z=>G(Z)}),h.jsx("br",{}),h.jsx(Sn,{style:{width:"240px"},addonBefore:L(Y.t("word.Maximum",H)+(B?" $":""),80),addonAfter:i,min:b.current+u,max:V(),step:u,value:R.current,onPressEnter:Z=>$(Number.parseFloat(Z.target.value)),onStep:Z=>$(Z)})]}),children:j()}):h.jsx(h.Fragment,{children:j()}),d!==void 0&&h.jsx("text",{x:0,y:-8,style:{fontSize:"9px",textAnchor:"middle",fill:"dimgray"},children:B?d.toLocaleString("en-US",{style:"currency",currency:"USD",maximumFractionDigits:l})+(o==="yearlyProfit"||o==="totalYearlyCost"?"K":""):(o==="orientation"?Y.t(d===0?"solarPanelMenu.Landscape":"solarPanelMenu.Portrait",H)+(d===0?" (▭)":" (▯)"):d.toFixed(l))+(i!==""?i:"")}),f&&f.type===GL.Between&&h.jsx("rect",{x:-5,y:t(f.upperBound??c),width:10,height:t((f==null?void 0:f.lowerBound)??s)-t((f==null?void 0:f.upperBound)??c),fill:"lightgray"}),h.jsx("rect",{x:-U/2,y:0,width:U,height:N,fill:"gold",fillOpacity:v===o?.25:0}),W.map(({value:Z,yOffset:ee})=>h.jsxs("g",{transform:`translate(0, ${ee})`,shapeRendering:"crispEdges",children:[h.jsx("line",{x1:-LBo,x2:0,stroke:"black",strokeWidth:1}),h.jsx("text",{style:{fontSize:"10px",textAnchor:"start",alignmentBaseline:"central",transform:"translateX(-25px)"},children:o==="orientation"?Z===0?"▭":"▯":Z},Z)]},Z)),h.jsx("line",{x1:0,x2:0,y1:t(s),y2:t(c),stroke:"black",strokeWidth:2}),f&&f.type===GL.Between&&h.jsx("foreignObject",{x:-U/2,y:4,width:U,height:N-3,children:h.jsx(fy,{theme:{components:{Slider:{railBg:"black",railSize:0,handleSize:8}}},children:h.jsx(Iu,{style:{marginLeft:U/2+"px"},min:s,max:c,step:(c-s)/100,value:[f.lowerBound??s,f.upperBound??c],onChange:Z=>se(Z),onChangeComplete:Z=>q(Z),range:!0,vertical:!0})})})]})}),lP={top:30,right:55,bottom:36,left:55},NBo=["#e0ac2b","#e85252","#6689c6","#9a6fb0","#a53253","#69b3a2","#556b2f","#8b008b","#ff1493","#d2691e","#2f4f4f","#dc143c"],UBo=be.memo(({id:t,width:e,height:n,data:o,types:r,minima:i,maxima:a,filters:l,steps:s,variables:c,titles:u,units:d,digits:f,tickIntegers:p,hover:g,hoveredIndex:A,selectedIndex:y})=>{const S=e-lP.right-lP.left,C=n-lP.top-lP.bottom,P=m.useMemo(()=>[...new Set(o.map(H=>H.group))],[o]),v=m.useMemo(()=>YC().range([0,S]).domain(c).padding(0),[c,S]),T=m.useMemo(()=>{const H={};return c.forEach((F,E)=>{H[F]=mL().range([C,0]).domain([i[E]??0,a[E]??1])}),H},[c,i,a,C]),w=m.useMemo(()=>nte().domain(P).range(NBo),[P]),x=I3e(),b=m.useMemo(()=>o.map((H,F)=>{if(H.invisible)return null;const E=c.map(U=>{const W=T[U],k=v(U)??0,D=W(H[U]);return[k,D]}),N=x(E);if(N)return h.jsx("path",{onMouseOver:()=>{g(F)},d:N,stroke:H.hovered?"red":w(H.group),fill:"none",strokeWidth:H.excluded?.25:H.selected?3:1,strokeDasharray:H.hovered?"3,3":"none"},F)}),[o,c,v,T,w]),R=m.useMemo(()=>c.map((H,F)=>{const E=T[H];return h.jsx("g",{transform:"translate("+v(H)+",0)",children:h.jsx(WBo,{yScale:E,tickLength:40,tickIntegers:p[F],type:r[F]??"number",variable:c[F],name:u[F],unit:d[F],digits:f[F],min:i[F],max:a[F],step:s[F],value:A>=0&&!o[A].invisible?o[A][H]:y>=0&&!o[y].invisible?o[y][H]:void 0,filter:l[F],hover:g})},F)}),[c,o,v,T,p,r,u,d,f,i,a,s,l,y,A]);return h.jsx("svg",{id:t,width:e,height:n,onMouseLeave:()=>{g&&g(-1)},onContextMenu:H=>{H.stopPropagation()},children:h.jsxs("g",{width:S,height:C,transform:`translate(${[lP.left,lP.top].join(",")})`,children:[b,R]})})});var vpe={};(function(t){(function(){var e=t||!1||this||window;e.default=e;var n="http://www.w3.org/2000/xmlns/",o="http://www.w3.org/1999/xhtml",r="http://www.w3.org/2000/svg",i=']>',a=/url\(["']?(.+?)["']?\)/,l={woff2:"font/woff2",woff:"font/woff",otf:"application/x-font-opentype",ttf:"application/x-font-ttf",eot:"application/vnd.ms-fontobject",sfnt:"application/font-sfnt",svg:"image/svg+xml"},s=function(E){return E instanceof HTMLElement||E instanceof SVGElement},c=function(E){if(!s(E))throw new Error("an HTMLElement or SVGElement is required; got "+E)},u=function(E){return new Promise(function(N,U){s(E)?N(E):U(new Error("an HTMLElement or SVGElement is required; got "+E))})},d=function(E){return E&&E.lastIndexOf("http",0)===0&&E.lastIndexOf(window.location.host)===-1},f=function(E){var N=Object.keys(l).filter(function(U){return E.indexOf("."+U)>0}).map(function(U){return l[U]});return N?N[0]:(console.error("Unknown font format for "+E+". Fonts may not be working correctly."),"application/octet-stream")},p=function(E){for(var N="",U=new Uint8Array(E),W=0;W"u"||W===null||isNaN(parseFloat(W))?0:W},A=function(E,N,U,W){if(E.tagName==="svg")return{width:U||g(E,N,"width"),height:W||g(E,N,"height")};if(E.getBBox){var k=E.getBBox(),D=k.x,L=k.y,j=k.width,B=k.height;return{width:D+j,height:L+B}}},y=function(E){return decodeURIComponent(encodeURIComponent(E).replace(/%([0-9A-F]{2})/g,function(N,U){var W=String.fromCharCode("0x"+U);return W==="%"?"%25":W}))},S=function(E){for(var N=window.atob(E.split(",")[1]),U=E.split(",")[0].split(":")[1].split(";")[0],W=new ArrayBuffer(N.length),k=new Uint8Array(W),D=0;D"u",G=L||[];return b().forEach(function(Q){var $=Q.rules,ie=Q.href;$&&Array.from($).forEach(function(q){if(typeof q.style<"u")if(C(E,q.selectorText))O.push(B(q.selectorText,q.style.cssText));else if(V&&q.cssText.match(/^@font-face/)){var se=P(q,ie);se&&G.push(se)}else j||O.push(q.cssText)})}),w(G).then(function(Q){return O.join(` `)+Q})},H=function(){if(!navigator.msSaveOrOpenBlob&&!("download"in document.createElement("a")))return{popup:window.open()}};e.prepareSvg=function(F,E,N){c(F);var U=E||{},W=U.left,k=W===void 0?0:W,D=U.top,L=D===void 0?0:D,j=U.width,B=U.height,O=U.scale,V=O===void 0?1:O,G=U.responsive,Q=G===void 0?!1:G,$=U.excludeCss,ie=$===void 0?!1:$;return v(F).then(function(){var q=F.cloneNode(!0);q.style.backgroundColor=(E||{}).backgroundColor||F.style.backgroundColor;var se=A(F,q,j,B),Z=se.width,ee=se.height;if(F.tagName!=="svg")if(F.getBBox){q.getAttribute("transform")!=null&&q.setAttribute("transform",q.getAttribute("transform").replace(/translate\(.*?\)/,""));var te=document.createElementNS("http://www.w3.org/2000/svg","svg");te.appendChild(q),q=te}else{console.error("Attempted to render non-SVG element",F);return}if(q.setAttribute("version","1.1"),q.setAttribute("viewBox",[k,L,Z,ee].join(" ")),q.getAttribute("xmlns")||q.setAttributeNS(n,"xmlns",r),q.getAttribute("xmlns:xlink")||q.setAttributeNS(n,"xmlns:xlink","http://www.w3.org/1999/xlink"),Q?(q.removeAttribute("width"),q.removeAttribute("height"),q.setAttribute("preserveAspectRatio","xMinYMin meet")):(q.setAttribute("width",Z*V),q.setAttribute("height",ee*V)),Array.from(q.querySelectorAll("foreignObject > *")).forEach(function(he){he.setAttributeNS(n,"xmlns",he.tagName==="svg"?r:o)}),ie){var oe=document.createElement("div");oe.appendChild(q);var de=oe.innerHTML;if(typeof N=="function")N(de,Z,ee);else return{src:de,width:Z,height:ee}}else return R(F,E).then(function(he){var pe=document.createElement("style");pe.setAttribute("type","text/css"),pe.innerHTML=` Aladdin - +