@esri/solutions-components 1.2.0-next.148 → 1.2.0-next.149

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -213,4 +213,4 @@ Please create an issue at https://github.com/MikeKovarik/exifr with this file`),
213
213
  min-height: 0 !important;
214
214
  }
215
215
  }
216
- }`,Ze=class extends st{constructor(){super(...arguments),this.customizeSubmit=!1,this.enableSearch=!1,this.enableSnapping=!1,this.floorLevel="",this.isMobile=!1,this.selectedLayerId="",this.showGuidingMsg=!0,this.submitNewReportsMessage="",this.updateMapPosition=!1,this.reportingArea=!1,this.reportingAreaLayer="",this.reportingAreaMessage="",this.showSketchWidgets=!1,this.allowMultipleCreation=!1,this.popupEnabled=!1,this.showLayerVisibilityMsg=!1,this.enablePhotoLocation=!1,this.aiImageExtraction=[],this._currentPage="templatePicker",this._editorLoading=!1,this._inValidGeomtryDrawn=!1,this._selectedImageBase64="",this._imageAnalysisFailed=!1,this._translations=nt({name:"create-feature",blocking:!0}),this._addingAttachment=!1,this._uploadedImage=null,this._calciteNotice=j(),this._isSubmitBtnClicked=!1,this._mapViewContainer=j(),this._searchDiv=j(),this._inputImageForAI=j(),this._guidingMessageRefNode=j(),this._abortController=new AbortController,this.success=L(),this.fail=L(),this.drawComplete=L(),this.editingLocation=L(),this.editingAttachment=L(),this.progressStatus=L(),this.modeChanged=L()}static{this.properties={customizeSubmit:[5,{},{type:Boolean}],enableSearch:[5,{},{type:Boolean}],enableSnapping:[5,{},{type:Boolean}],floorLevel:1,formElements:1,isMobile:[5,{},{type:Boolean}],mapView:[0,{},{attribute:!1}],searchConfiguration:[0,{},{attribute:!1}],selectedLayerId:1,showGuidingMsg:[5,{},{type:Boolean}],submitNewReportsMessage:1,updateMapPosition:[5,{},{type:Boolean}],reportingArea:[5,{},{type:Boolean}],reportingAreaLayer:1,reportingAreaMessage:1,showSketchWidgets:[5,{},{type:Boolean}],allowMultipleCreation:[5,{},{type:Boolean}],popupEnabled:[5,{},{type:Boolean}],showLayerVisibilityMsg:[5,{},{type:Boolean}],enablePhotoLocation:[5,{},{type:Boolean}],aiImageExtraction:[0,{},{attribute:!1}],_currentPage:[16,{},{state:!0}],_editorLoading:[16,{},{state:!0}],_inValidGeomtryDrawn:[16,{},{state:!0}],_selectedImageBase64:[16,{},{state:!0}],_imageAnalysisFailed:[16,{},{state:!0}],_translations:[16,{},{state:!0}]}}static{this.styles=hi}static{this.shadowRootOptions=it}willUpdate(e){e.has("mapView")&&this.hasUpdated&&this.mapViewWatchHandler(),e.has("isMobile")&&this.hasUpdated&&this.isMobileHandler(),e.has("_editorLoading")&&(this.hasUpdated||this._editorLoading!==!1)&&this._editorLoadingWatchHandler(this._editorLoading)}async mapViewWatchHandler(){this.mapView&&await this.mapView.when(async()=>{this._imageAnalysisInfo&&!this._imageAnalysisInfo.canUseAI&&await this.init()})}async isMobileHandler(){this.modeChanged.emit()}async _editorLoadingWatchHandler(e){if(e){if(this._container?.classList.add("display-none"),this._selectedLayer?.isTable){if(this._selectedLayer.templates&&this._editor){let t=this._selectedLayer.templates[0],i={layer:this._selectedLayer,template:t};await this._editor.startCreateFeaturesWorkflowAtFeatureCreation(i),await this.hideEditorsElements()}}else await this.startCreate();this._container?.classList.remove("display-none"),this._editorLoading=!1}}async submit(){this._editor?.viewModel?.featureFormViewModel&&(this._isSubmitBtnClicked=!0,this._editor.viewModel.featureFormViewModel.submit())}async refresh(e){this._editor&&(e?await this._setFloorLevel(e):this.reportingArea&&this.reportingAreaLayer&&this._currentPage!=="drawing"?await this.queryIntersectingFeatures():this._currentPage!=="drawing"&&(this._inValidGeomtryDrawn=!1,this.drawComplete.emit(this._inValidGeomtryDrawn)))}async showForm(){this.progressStatus.emit(100),this._container?.classList.remove("display-none"),this._mapViewContainer.value?.classList?.replace("show-map","hide-map"),this._currentPage="featureForm"}async load(){this._imageAnalysisInfo=await this._getImageAnalysisInfo(),this._currentPage=this._imageAnalysisInfo.canUseAI?"chooseReportType":"templatePicker"}async loaded(){this._imageAnalysisInfo&&!this._imageAnalysisInfo.canUseAI&&await this.init()}async updated(){if(this.isMobile&&this.updateMapPosition){let e=this._currentPage==="drawing"?80:30,t=this.enableSearch?this._searchDiv.value?.offsetHeight:0;await this._calciteNotice.value?.componentOnReady();let s=(this._calciteNotice.value?.offsetHeight||0)+t+e;this._mapViewContainer.value&&(this._mapViewContainer.value.style.top=`${s}px`)}this.reportingAreaMessage&&this._guidingMessageRefNode.value?.children[0]&&(this._guidingMessageRefNode.value.children[0].style.margin="0px")}disconnectedCallback(){super.disconnectedCallback(),this._editor&&(this._editor.viewModel.sketchViewModel&&this._editor.viewModel.sketchViewModel?.destroy(),this._editor.destroy(),this.enableSnapping&&this.mapView?.ui.view&&((this.mapView?.ui.view).grid=null))}render(){console.log("step through here for the AI issue");let e=this._currentPage==="drawing"||this._currentPage==="editing"?"":"display-none",t=this._editorLoading?"":"display-none",i=this._editorLoading?"display-none":"",s=this.isMobile&&this.updateMapPosition?"show-map":"display-none",n=this._inValidGeomtryDrawn?"danger":"success",r=this._inValidGeomtryDrawn?"exclamation-mark-triangle":"lightbulb",o=this.showLayerVisibilityMsg&&this._currentPage==="templatePicker",l=this.showGuidingMsg||o,h=this._translations.chooseCategoryMsg,d=this._imageAnalysisInfo?.canUseAI&&["chooseReportType","analyzingImage","imageUpload"].includes(this._currentPage);return this._inValidGeomtryDrawn?h=this.reportingAreaMessage||this._translations.reportOutsideAreaMessage:this._currentPage==="drawing"||this._currentPage==="editing"?h=this._translations.provideLocationMsg:this._currentPage==="featureForm"?h=this._imageAnalysisInfo?.results?.filter(u=>u.success).length?this._translations.formReviewMsg:this._translations.provideDetailsMsg:o&&(h=this._translations.enableFeatureTemplatesMessage),b`${this._imageAnalysisFailed&&b`<calcite-alert auto-close icon=x-octagon kind=danger label @calciteAlertClose=${()=>{this._imageAnalysisFailed=!1}} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._translations.imageExtractionError}</div></calcite-alert>`||""}${d&&b`<calcite-panel>${this._currentPage==="chooseReportType"&&this._getReportTypePage()||""}${this._currentPage==="imageUpload"&&this._aiImageExtractionPage()||""}${this._currentPage==="analyzingImage"&&this._getAnalyzingImagePage()||""}</calcite-panel>`||""}${!d&&b`${l&&b`<calcite-notice class="notice-msg" .icon=${r} .kind=${n} open ${$(this._calciteNotice)}><div slot=message .innerHTML=${h??""} ${$(this._guidingMessageRefNode)}></div></calcite-notice>`||""}${this._selectedImageBase64&&this._currentPage==="featureForm"&&b`<div class="image-preview-container"><calcite-label>${this._translations.photo}</calcite-label><img class="width-full" src=${this._selectedImageBase64??_e}></div>`||""}<calcite-loader class=${oe(t)} label scale=s></calcite-loader>${this._currentPage==="featureForm"&&this.isMobile&&b`<calcite-button appearance=transparent class="edit-location-btn" icon-start=pin @click=${this.editLocation}>${this._translations.editLocationLabel}</calcite-button>`||""}<div class=${oe(i)} id=feature-form></div>${this.enableSearch&&b`<div class=${`search-widget ${e} ${i}`} id=search-widget-ref ${$(this._searchDiv)}></div>`||""}`||""}<div class=${oe(s)} ${$(this._mapViewContainer)}></div>`}async init(){this.mapView&&this.selectedLayerId&&(this._updatedMapView=this.mapView,await(this.isMobile&&this.updateMapPosition?this.createMobileMapView():this._loadWidgets()))}async createMobileMapView(){this._mapViewContainer.value&&this.mapView&&(this._mapViewContainer.value.classList.add("hide-map"),await new ii({map:this.mapView.map,container:this._mapViewContainer.value,zoom:this.mapView.zoom,center:this.mapView.center,popupEnabled:this.popupEnabled}).when(e=>{this._updatedMapView=e;let t=new si({view:this._updatedMapView});t&&this._updatedMapView.ui.add(t,"top-left"),this._loadWidgets()},e=>{console.log(e)}))}async _loadWidgets(){await this.createEditorWidget(),this.enableSearch&&await this.createSearchWidget()}_getReportTypePage(){return b`<div class="report-selection-container"><calcite-label>${this._translations.createReportHeading}</calcite-label><calcite-card class="cursor-pointer" @click=${()=>{this.progressStatus.emit(35),this._currentPage="imageUpload"}}><div slot=description class="card-body-content"><calcite-icon icon=effects scale=m style="color: var(--calcite-ui-text-2)"></calcite-icon><div class="text-stack"><span class="option-title">${this._translations.aiImgExtractionLabel}</span><span class="option-description">${this._translations.aiAssistantDescription}</span></div></div></calcite-card><calcite-card class="cursor-pointer" @click=${()=>{this._currentPage="templatePicker",this.init()}}><div slot=description class="card-body-content"><calcite-icon icon=pencil scale=m></calcite-icon><div class="text-stack"><span class="option-title">${this._translations.fillOutManually}</span><span class="option-description">${this._translations.startBlank}</span></div></div></calcite-card></div>`}_aiImageExtractionPage(){let e=this._selectedImageBase64!=="",t=e?this._translations.replaceImage:this._translations.imageUploadLimitHint;return b`<calcite-notice class="notice-msg" icon=effects kind=brand open><div slot=message>${this._translations.aiAssistantProcessingHint}</div></calcite-notice><div class="padding-10"><calcite-label><div>${this._translations.photo}<span style="color: var(--calcite-color-status-danger)">*</span></div><calcite-input type=file accept=image/* @calciteInputInput=${this._onImageUpload} ${$(this._inputImageForAI)}></calcite-input></calcite-label><div class="info-container"><calcite-icon icon=information scale=s></calcite-icon><span>${t}</span></div>${e&&b`<img class="width-full" src=${this._selectedImageBase64??_e}>`||""}</div><div slot=footer class="upload-img-footer-container"><calcite-button width=full .disabled=${!e} id=next-btn @click=${this._analyzeImage}>${this._translations.next}</calcite-button><calcite-button width=full appearance=outline kind=brand @click=${()=>this.modeChanged.emit()}>${this._translations.cancel}</calcite-button></div>`}_getAnalyzingImagePage(){return b`<div class="analysis-wrapper"><calcite-label layout=inline><calcite-icon class="analyzing-icon" icon=effects scale=s></calcite-icon><span>${this._translations.analyzingImage}</span></calcite-label><calcite-button class="skip-btn" appearance=transparent @click=${()=>{this._abortController.abort(),this._currentPage="templatePicker"}}>${this._translations.skip}</calcite-button></div>`}_onImageUpload(e){let t=e.target;if(t){let i=t.files[0];this._uploadedImage=i;let s=new FileReader;s.onload=n=>{this._selectedImageBase64=n.target?.result},s.readAsDataURL(i)}}async _analyzeImage(){this._abortController=new AbortController;let e=this._abortController.signal,t=await this._getImageAnalysisInfo();if(!t.canUseAI||!t.url||!this._inputImageForAI.value?.files?.length){this._imageAnalysisFailed=!0,console.error(this._translations.error),this._resetImageAnalysisInfo(),await this.init();return}try{this._currentPage="analyzingImage",this.progressStatus.emit(45);let i=this._inputImageForAI.value.files[0],s=await new Promise((r,o)=>{let l=new FileReader;l.onloadend=()=>r(l.result),l.onerror=o,this._inputImageForAI.value&&l.readAsDataURL(i)});if(this.enablePhotoLocation){let r=await Me(i);if(r?.longitude&&r.latitude&&this.mapView?.spatialReference){let o=new oi({longitude:r.longitude,latitude:r.latitude,spatialReference:new li({wkid:4326})}),l=await rt(o,this.mapView.spatialReference);this._imageAnalysisInfo&&(this._imageAnalysisInfo.imageLocation=l)}}let n=[];if(this.aiImageExtraction.forEach(r=>{r?.field&&r.prompt&&r.id===this.selectedLayerId&&n.push({key:r.field,context:r.prompt})}),n.length){let r={input:s,data:n},o=await ri(t.url,{method:"post",headers:{"Content-Type":"application/json","x-esri-authorization":`Bearer ${t.token}`},body:JSON.stringify(r),responseType:"json",signal:e});this._imageAnalysisInfo&&(this._imageAnalysisInfo.results=o.data.results)}await this.init()}catch(i){i.name==="AbortError"?console.error("Aborted",i):(this._imageAnalysisFailed=!0,console.error("Analyzing failed",i)),this._resetImageAnalysisInfo(),this.init()}}_resetImageAnalysisInfo(){let e={url:"",token:"",canUseAI:!1,imageLocation:void 0,results:[]};this._imageAnalysisInfo=e}async _getImageAnalysisInfo(){let e={url:"",token:"",canUseAI:!1};if(this.aiImageExtraction.some(i=>i?.field&&i.prompt&&i.id===this.selectedLayerId)){let i=(this.mapView?.map).portalItem.portal;if(i){let s=await i.fetchSettings(),n=i?.helperServices.aiUtilityServices;n?.url&&n?.api?.image_analyze&&(e.url=n.url+n.api.image_analyze),i.credential&&(e.token=i.credential.token),s?.aiAssistantsEnabled&&!s.blockBetaApps&&i?.user?.privileges?.includes("portal:user:useAIAssistants")&&(e.canUseAI=!0)}}return e}async createEditorWidget(){this._editor&&this._editor.destroy();let e=[];this._container=document.createElement("div"),this._container?.classList.add("display-none"),this.enableSnapping||this._container.classList.add("hide-editor-toolbar");let t=this._updatedMapView&&await ot(this._updatedMapView),i=this.mapView&&await Le(this.mapView,this.selectedLayerId);if(i&&(this._selectedLayer=i,!this._selectedLayer?.isTable&&t&&t.forEach(s=>{e.push({layer:s,enabled:s?.type==="feature"&&s?.id===this.selectedLayerId,addEnabled:!0,updateEnabled:!1,deleteEnabled:!1})})),this._editor=new Jt({view:this._updatedMapView,layerInfos:e,visibleElements:{settingsMenu:this.enableSnapping,snappingControls:this.enableSnapping,createFeaturesSection:!0,editFeaturesSection:!1,flow:!0,sketch:this.showSketchWidgets&&this._selectedLayer?.geometryType!=="point"},container:this._container}),this._mapViewContainer.value?this.el.insertBefore(this._container,this._mapViewContainer.value):this.el.appendChild(this._container),this._selectedLayer?.isTable&&(this._editorLoading=!0),this._editor){let s=Z.watch(()=>this._editor?.viewModel.state,h=>{h==="adding-attachment"||h==="editing-attachment"?(this._addingAttachment=!0,this.editingAttachment.emit(!0)):this._addingAttachment&&(this.editingAttachment.emit(!1),this._addingAttachment=!1)});s&&this._editor.viewModel.addHandles(s);let n=Z?.watch(()=>this._editor?.viewModel.featureTemplatesViewModel.state,h=>{h==="ready"&&this._editor?.viewModel?.activeWorkflow?.type!=="create-features"&&(this.progressStatus.emit(50),this._editorLoading=!0)});n&&this._editor.viewModel.addHandles(n);let r=Z?.watch(()=>this._editor?.viewModel.featureFormViewModel?.state,h=>{h==="ready"&&this._editor?.viewModel.featureFormViewModel&&this._currentPage!=="editing"&&(this._mapViewContainer.value?.classList?.replace("show-map","hide-map"),this._editor.viewModel.featureFormViewModel.addHandles(this._editor.viewModel.featureFormViewModel.on("submit",this.submitted.bind(this))),setTimeout(()=>{this._setFloorLevel(this.floorLevel),this._imageAnalysisInfo?.results&&this._setAttributeValuesFromImageAnalysis()},200),!this.allowMultipleCreation&&this._editor.activeWorkflow&&(this._editor.activeWorkflow.data.creationInfo.maxFeatures=1),this._currentPage="featureForm",this.progressStatus.emit(100),this.drawComplete.emit(!1))});r&&this._editor.viewModel.addHandles(r);let o=Z.watch(()=>this._editor?.viewModel.state,h=>{h==="creating-features"&&this._editor?.viewModel.featureFormViewModel&&this._editor.viewModel.featureFormViewModel.state==="disabled"&&(this._mapViewContainer.value?.classList.replace("hide-map","show-map"),this._selectedLayer&&!this._selectedLayer.isTable&&(this._currentPage="drawing",this._editor.viewModel.sketchViewModel?.createGraphic&&this._imageAnalysisInfo?.imageLocation&&(this._updatedMapView?.goTo({center:this._imageAnalysisInfo.imageLocation}),this._selectedLayer.geometryType==="point"&&this._initializeSketchPoint(this._imageAnalysisInfo.imageLocation.clone()))))});o&&this._editor.viewModel.addHandles(o),this._editor.on("sketch-create",async h=>{h.detail.state==="complete"&&(this._drawnGeometry=h.detail.graphic?.geometry,this.reportingArea&&this.reportingAreaLayer&&await this.queryIntersectingFeatures())});let l;this._editor.on("sketch-update",h=>{clearTimeout(l),l=window.setTimeout(async()=>{this._drawnGeometry=h.detail.graphics[0].geometry,this.reportingArea&&this.reportingAreaLayer&&await this.queryIntersectingFeatures()},50)})}}async queryIntersectingFeatures(){let e=this.mapView&&await Le(this.mapView,this.reportingAreaLayer);if(e){let t=e.createQuery();t.geometry=this._drawnGeometry,t.spatialRelationship="intersects";let s=await e.queryFeatureCount(t)===0;this._inValidGeomtryDrawn=s,this.drawComplete.emit(this._inValidGeomtryDrawn)}}editLocation(){this.progressStatus.emit(75),this.editingLocation.emit(),this._container?.classList.add("display-none"),this._mapViewContainer.value?.classList.replace("hide-map","show-map"),this._currentPage="editing"}async startCreate(){return await this.hideEditorsElements(),new Promise((e,t)=>{if(this._editor?.viewModel.featureTemplatesViewModel.items?.length){let i=this._editor.viewModel.featureTemplatesViewModel.items[0].items;this._editor.viewModel.featureTemplatesViewModel.addHandles(this._editor.viewModel.featureTemplatesViewModel.on("select",()=>{this.progressStatus.emit(75),setTimeout(()=>{this.hideEditorsElements().then(()=>{e({})},n=>t(n))},700)})),i.length===1&&this._editor.viewModel.featureTemplatesViewModel.select(i[0]);let s=i.length>1;this.hideEditorsElements().then(()=>{s&&(this._currentPage="templatePicker",e({}))},n=>s&&t(n))}})}async createSearchWidget(){if(this._updatedMapView){let e={view:this._updatedMapView};if(this.searchConfiguration&&(e={...this._getSearchConfig(this.searchConfiguration,this._updatedMapView)}),this._search=new ai(e),!this._search)return;this._search.container="search-widget-ref",this._search.popupEnabled=!1,this._search.resultGraphicEnabled=!1;let t;this._search.viewModel.addHandles(this._search.on("search-complete",s=>{s.results[0].results&&s.results[0].results[0]&&(s.results[0].results[0].extent&&this._updatedMapView?.goTo(s.results[0].results[0].extent),this._selectedLayer?.geometryType==="point"&&(t=s.results[0].results[0]?.feature.geometry))}));let i=Z.watch(()=>this._search?.viewModel.state,s=>{s==="ready"&&setTimeout(()=>{if(this._editor?.viewModel.sketchViewModel?.createGraphic&&t)this._initializeSketchPoint(t);else if(this._editor?.viewModel.sketchViewModel&&this._editor.viewModel.sketchViewModel.updateGraphics.length>0&&t){let n=this._editor?.viewModel.sketchViewModel?.updateGraphics.getItemAt(0);n&&(n.set("geometry",t),this._editor?.viewModel.sketchViewModel?.update(n),this.hideEditorsElements())}},100)});i&&this._search.viewModel.addHandles(i)}}async _initializeSketchPoint(e){if(this._editor?.viewModel.sketchViewModel?.createGraphic){let i=this._editor.viewModel.sketchViewModel.createGraphic.set("geometry",e).clone();this._editor.viewModel.sketchViewModel.addGraphic(i),this._editor.viewModel.sketchViewModel.emit("create",{graphic:i,state:"complete",toolEventInfo:null,type:"create"}),await this._editor.viewModel.sketchViewModel.update(i),this.hideEditorsElements()}}_getSearchConfig(e,t){let i="includeDefaultSources",s=e.sources;return s&&s?.length>0?(e[i]=!1,s.forEach(n=>{if(n.hasOwnProperty("layer")){let o=n,l=o.layer?.id,h=l?t.map?.findLayerById(l):"",d=o?.layer?.url;h?o.layer=h:d&&(o.layer=new Zt(d))}}),s?.forEach(n=>{if(n.hasOwnProperty("locator")){let o=n;if(o?.name==="ArcGIS World Geocoding Service"){let l=o.outFields||["Addr_type","Match_addr","StAddr","City"];o.outFields=l,o.singleLineFieldName="SingleLine"}o.url=o.url,delete o.url}})):e={...e,includeDefaultSources:!0},e}async _setFloorLevel(e){if(!e)return;let t=this._selectedLayer,i=t?.floorInfo?.floorField;if(i){let s=t.fields.find(n=>n.name===i);if(s&&!t?.formTemplate)this._editor?.viewModel.featureFormViewModel&&(this._editor.viewModel.featureFormViewModel.setValue(s.name,e),s.editable=!1);else if(t.formTemplate&&this.formElements){let n=new Qt({expression:`'${e}'`,name:"floor-info-test",title:"Floor Info",returnType:"string"}),r=new ei({label:i,editableExpression:"false",fieldName:i,input:{type:"text-box",maxLength:50,minLength:0},valueExpression:n.name});this._updatedMapView?.map.editableLayers.forEach(o=>{let l=this.formElements.orgElements,h=this.formElements.orgExpressionInfos,d=[...l];if(d.push(r),o.type==="feature"){let u=o,y=new ti({title:u?.formTemplate?.title,description:u?.formTemplate?.description,elements:d,expressionInfos:[n].concat(h)});o.formTemplate=y}})}}}_setAttributeValuesFromImageAnalysis(){this._imageAnalysisInfo?.results&&this._imageAnalysisInfo.results.forEach(e=>{this._editor?.viewModel.featureFormViewModel&&e.key&&e.success&&this._editor.viewModel.featureFormViewModel.setValue(e.key,e.value)})}async hideEditorsElements(){this.customizeSubmit&&(await this.timeout(700),this.el.querySelector(".esri-editor")?.querySelectorAll("calcite-flow-item")?.forEach(e=>{let t=e.shadowRoot?.querySelector("calcite-panel")?.shadowRoot?.querySelector("article");t?.querySelector("header")?.setAttribute("style","display: none"),t?.querySelector("footer")?.setAttribute("style","display: none")}))}async submitted(e){let t=!1;if(e.invalid.length){this._isSubmitBtnClicked=!1;return}if(this._isSubmitBtnClicked){this._isSubmitBtnClicked=!1;try{if(this._editor?.activeWorkflow){if(this._selectedLayer&&this._selectedLayer.capabilities.data.supportsAttachment&&this._selectedImageBase64&&(t=!0),t){let i=this._selectedLayer?.on("edits",async s=>{if(s.addedFeatures.length>0){let n=s.addedFeatures[0].objectId;try{if(this._uploadedImage&&this._selectedLayer){let r=this._uploadedImage,o=new FormData;o.set("keywords","ai-image"),o.set("attachment",r),o.append("f","json");let l=new ni({attributes:{[this._selectedLayer.objectIdField]:n}});await this._selectedLayer.addAttachment(l,o)}}catch(r){console.error("Attachment upload failed",r)}i?.remove(),this.success.emit()}})}await this._editor.activeWorkflow.commit(),this._editor.viewModel.failures?.length&&this._editor.viewModel.failures.some(i=>{if(i.error)throw i.error})}}catch(i){this.fail.emit(i);return}t||this.success.emit()}}async timeout(e){return new Promise(t=>setTimeout(t,e))}};at("create-feature",Ze);return Ze},"widgets/Editor","form/ExpressionInfo","layers/FeatureLayer","form/elements/FieldElement","form/FormTemplate","views/MapView","widgets/Home","widgets/Search","Graphic","core/reactiveUtils","request","geometry/Point","geometry/SpatialReference",a,c)
216
+ }`,Ze=class extends st{constructor(){super(...arguments),this.customizeSubmit=!1,this.enableSearch=!1,this.enableSnapping=!1,this.floorLevel="",this.isMobile=!1,this.selectedLayerId="",this.showGuidingMsg=!0,this.submitNewReportsMessage="",this.updateMapPosition=!1,this.reportingArea=!1,this.reportingAreaLayer="",this.reportingAreaMessage="",this.showSketchWidgets=!1,this.allowMultipleCreation=!1,this.popupEnabled=!1,this.showLayerVisibilityMsg=!1,this.enablePhotoLocation=!1,this.aiImageExtraction=[],this._currentPage="templatePicker",this._editorLoading=!1,this._inValidGeomtryDrawn=!1,this._selectedImageBase64="",this._imageAnalysisFailed=!1,this._translations=nt({name:"create-feature",blocking:!0}),this._addingAttachment=!1,this._uploadedImage=null,this._calciteNotice=j(),this._isSubmitBtnClicked=!1,this._mapViewContainer=j(),this._searchDiv=j(),this._inputImageForAI=j(),this._guidingMessageRefNode=j(),this._abortController=new AbortController,this.success=L(),this.fail=L(),this.drawComplete=L(),this.editingLocation=L(),this.editingAttachment=L(),this.progressStatus=L(),this.modeChanged=L()}static{this.properties={customizeSubmit:[5,{},{type:Boolean}],enableSearch:[5,{},{type:Boolean}],enableSnapping:[5,{},{type:Boolean}],floorLevel:1,formElements:1,isMobile:[5,{},{type:Boolean}],mapView:[0,{},{attribute:!1}],searchConfiguration:[0,{},{attribute:!1}],selectedLayerId:1,showGuidingMsg:[5,{},{type:Boolean}],submitNewReportsMessage:1,updateMapPosition:[5,{},{type:Boolean}],reportingArea:[5,{},{type:Boolean}],reportingAreaLayer:1,reportingAreaMessage:1,showSketchWidgets:[5,{},{type:Boolean}],allowMultipleCreation:[5,{},{type:Boolean}],popupEnabled:[5,{},{type:Boolean}],showLayerVisibilityMsg:[5,{},{type:Boolean}],enablePhotoLocation:[5,{},{type:Boolean}],aiImageExtraction:[0,{},{attribute:!1}],_currentPage:[16,{},{state:!0}],_editorLoading:[16,{},{state:!0}],_inValidGeomtryDrawn:[16,{},{state:!0}],_selectedImageBase64:[16,{},{state:!0}],_imageAnalysisFailed:[16,{},{state:!0}],_translations:[16,{},{state:!0}]}}static{this.styles=hi}static{this.shadowRootOptions=it}willUpdate(e){e.has("mapView")&&this.hasUpdated&&this.mapViewWatchHandler(),e.has("isMobile")&&this.hasUpdated&&this.isMobileHandler(),e.has("_editorLoading")&&(this.hasUpdated||this._editorLoading!==!1)&&this._editorLoadingWatchHandler(this._editorLoading)}async mapViewWatchHandler(){this.mapView&&await this.mapView.when(async()=>{this._imageAnalysisInfo&&!this._imageAnalysisInfo.canUseAI&&await this.init()})}async isMobileHandler(){this.modeChanged.emit()}async _editorLoadingWatchHandler(e){if(e){if(this._container?.classList.add("display-none"),this._selectedLayer?.isTable){if(this._selectedLayer.templates&&this._editor){let t=this._selectedLayer.templates[0],i={layer:this._selectedLayer,template:t};await this._editor.startCreateFeaturesWorkflowAtFeatureCreation(i),await this.hideEditorsElements()}}else await this.startCreate();this._container?.classList.remove("display-none"),this._editorLoading=!1}}async submit(){this._editor?.viewModel?.featureFormViewModel&&(this._isSubmitBtnClicked=!0,this._editor.viewModel.featureFormViewModel.submit())}async refresh(e){this._editor&&(e?await this._setFloorLevel(e):this.reportingArea&&this.reportingAreaLayer&&this._currentPage!=="drawing"?await this.queryIntersectingFeatures():this._currentPage!=="drawing"&&(this._inValidGeomtryDrawn=!1,this.drawComplete.emit(this._inValidGeomtryDrawn)))}async showForm(){this.progressStatus.emit(100),this._container?.classList.remove("display-none"),this._mapViewContainer.value?.classList?.replace("show-map","hide-map"),this._currentPage="featureForm"}async load(){this._imageAnalysisInfo=await this._getImageAnalysisInfo(),this._currentPage=this._imageAnalysisInfo.canUseAI?"chooseReportType":"templatePicker"}async loaded(){this._imageAnalysisInfo&&!this._imageAnalysisInfo.canUseAI&&await this.init()}async updated(){if(this.isMobile&&this.updateMapPosition){let e=this._currentPage==="drawing"?80:30,t=this.enableSearch?this._searchDiv.value?.offsetHeight:0;await this._calciteNotice.value?.componentOnReady();let s=(this._calciteNotice.value?.offsetHeight||0)+t+e;this._mapViewContainer.value&&(this._mapViewContainer.value.style.top=`${s}px`)}this.reportingAreaMessage&&this._guidingMessageRefNode.value?.children[0]&&(this._guidingMessageRefNode.value.children[0].style.margin="0px")}disconnectedCallback(){super.disconnectedCallback(),this._editor&&(this._editor.viewModel.sketchViewModel&&this._editor.viewModel.sketchViewModel?.destroy(),this._editor.destroy(),this.enableSnapping&&this.mapView?.ui.view&&((this.mapView?.ui.view).grid=null))}render(){console.log("step through here for the AI issue");let e=this._currentPage==="drawing"||this._currentPage==="editing"?"":"display-none",t=this._editorLoading?"":"display-none",i=this._editorLoading?"display-none":"",s=this.isMobile&&this.updateMapPosition?"show-map":"display-none",n=this._inValidGeomtryDrawn?"danger":"success",r=this._inValidGeomtryDrawn?"exclamation-mark-triangle":"lightbulb",o=this.showLayerVisibilityMsg&&this._currentPage==="templatePicker",l=this.showGuidingMsg||o,h=this._translations.chooseCategoryMsg,d=this._imageAnalysisInfo?.canUseAI&&["chooseReportType","analyzingImage","imageUpload"].includes(this._currentPage);return this._inValidGeomtryDrawn?h=this.reportingAreaMessage||this._translations.reportOutsideAreaMessage:this._currentPage==="drawing"||this._currentPage==="editing"?h=this._translations.provideLocationMsg:this._currentPage==="featureForm"?h=this._imageAnalysisInfo?.results?.filter(u=>u.success).length?this._translations.formReviewMsg:this._translations.provideDetailsMsg:o&&(h=this._translations.enableFeatureTemplatesMessage),b`${this._imageAnalysisFailed&&b`<calcite-alert auto-close icon=x-octagon kind=danger label @calciteAlertClose=${()=>{this._imageAnalysisFailed=!1}} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._translations.imageExtractionError}</div></calcite-alert>`||""}${d&&b`<calcite-panel>${this._currentPage==="chooseReportType"&&this._getReportTypePage()||""}${this._currentPage==="imageUpload"&&this._aiImageExtractionPage()||""}${this._currentPage==="analyzingImage"&&this._getAnalyzingImagePage()||""}</calcite-panel>`||""}${!d&&b`${l&&b`<calcite-notice class="notice-msg" .icon=${r} .kind=${n} open ${$(this._calciteNotice)}><div slot=message .innerHTML=${h??""} ${$(this._guidingMessageRefNode)}></div></calcite-notice>`||""}${this._selectedImageBase64&&this._currentPage==="featureForm"&&b`<div class="image-preview-container"><calcite-label>${this._translations.photo}</calcite-label><img class="width-full" src=${this._selectedImageBase64??_e}></div>`||""}<calcite-loader class=${oe(t)} label scale=s></calcite-loader>${this._currentPage==="featureForm"&&this.isMobile&&b`<calcite-button appearance=transparent class="edit-location-btn" icon-start=pin @click=${this.editLocation}>${this._translations.editLocationLabel}</calcite-button>`||""}<div class=${oe(i)} id=feature-form></div>${this.enableSearch&&b`<div class=${`search-widget ${e} ${i}`} id=search-widget-ref ${$(this._searchDiv)}></div>`||""}`||""}<div class=${oe(s)} ${$(this._mapViewContainer)}></div>`}async init(){this.mapView&&this.selectedLayerId&&(this._updatedMapView=this.mapView,await(this.isMobile&&this.updateMapPosition?this.createMobileMapView():this._loadWidgets()))}async createMobileMapView(){this._mapViewContainer.value&&this.mapView&&(this._mapViewContainer.value.classList.add("hide-map"),await new ii({map:this.mapView.map,container:this._mapViewContainer.value,zoom:this.mapView.zoom,center:this.mapView.center,popupEnabled:this.popupEnabled}).when(e=>{this._updatedMapView=e;let t=new si({view:this._updatedMapView});t&&this._updatedMapView.ui.add(t,"top-left"),this._loadWidgets()},e=>{console.log(e)}))}async _loadWidgets(){await this.createEditorWidget(),this.enableSearch&&await this.createSearchWidget()}_getReportTypePage(){return b`<div class="report-selection-container"><calcite-label>${this._translations.createReportHeading}</calcite-label><calcite-card class="cursor-pointer" @click=${()=>{this.progressStatus.emit(35),this._currentPage="imageUpload"}}><div slot=description class="card-body-content"><calcite-icon icon=effects scale=m style="color: var(--calcite-ui-text-2)"></calcite-icon><div class="text-stack"><span class="option-title">${this._translations.aiImgExtractionLabel}</span><span class="option-description">${this._translations.aiAssistantDescription}</span></div></div></calcite-card><calcite-card class="cursor-pointer" @click=${()=>{this._currentPage="templatePicker",this.init()}}><div slot=description class="card-body-content"><calcite-icon icon=pencil scale=m></calcite-icon><div class="text-stack"><span class="option-title">${this._translations.fillOutManually}</span><span class="option-description">${this._translations.startBlank}</span></div></div></calcite-card></div>`}_aiImageExtractionPage(){let e=this._selectedImageBase64!=="",t=e?this._translations.replaceImage:this._translations.imageUploadLimitHint;return b`<calcite-notice class="notice-msg" icon=effects kind=brand open><div slot=message>${this._translations.aiAssistantProcessingHint}</div></calcite-notice><div class="padding-10"><calcite-label><div>${this._translations.photo}<span style="color: var(--calcite-color-status-danger)">*</span></div><calcite-input type=file accept=image/* @calciteInputInput=${this._onImageUpload} ${$(this._inputImageForAI)}></calcite-input></calcite-label><div class="info-container"><calcite-icon icon=information scale=s></calcite-icon><span>${t}</span></div>${e&&b`<img class="width-full" src=${this._selectedImageBase64??_e}>`||""}</div><div slot=footer class="upload-img-footer-container"><calcite-button width=full .disabled=${!e} id=next-btn @click=${this._analyzeImage}>${this._translations.next}</calcite-button><calcite-button width=full appearance=outline kind=brand @click=${()=>this.modeChanged.emit()}>${this._translations.cancel}</calcite-button></div>`}_getAnalyzingImagePage(){return b`<div class="analysis-wrapper"><calcite-label layout=inline><calcite-icon class="analyzing-icon" icon=effects scale=s></calcite-icon><span>${this._translations.analyzingImage}</span></calcite-label><calcite-button class="skip-btn" appearance=transparent @click=${()=>{this._abortController.abort(),this._currentPage="templatePicker"}}>${this._translations.skip}</calcite-button></div>`}_onImageUpload(e){let t=e.target;if(t){let i=t.files[0];this._uploadedImage=i;let s=new FileReader;s.onload=n=>{this._selectedImageBase64=n.target?.result},s.readAsDataURL(i)}}async _analyzeImage(){this._abortController=new AbortController;let e=this._abortController.signal,t=await this._getImageAnalysisInfo();if(!t.canUseAI||!t.url||!this._inputImageForAI.value?.files?.length){this._imageAnalysisFailed=!0,console.error(this._translations.error),this._resetImageAnalysisInfo(),await this.init();return}try{this._currentPage="analyzingImage",this.progressStatus.emit(45);let i=this._inputImageForAI.value.files[0],s=await new Promise((r,o)=>{let l=new FileReader;l.onloadend=()=>r(l.result),l.onerror=o,this._inputImageForAI.value&&l.readAsDataURL(i)});if(this.enablePhotoLocation){let r=await Me(i);if(r?.longitude&&r.latitude&&this.mapView?.spatialReference){let o=new oi({longitude:r.longitude,latitude:r.latitude,spatialReference:new li({wkid:4326})}),l=await rt(o,this.mapView.spatialReference);this._imageAnalysisInfo&&(this._imageAnalysisInfo.imageLocation=l)}}let n=[];if(this.aiImageExtraction.forEach(r=>{r?.field&&r.prompt&&r.id===this.selectedLayerId&&n.push({key:r.field,context:r.prompt})}),n.length){let r={input:s,data:n},o=await ri(t.url,{method:"post",headers:{"Content-Type":"application/json","x-esri-authorization":`Bearer ${t.token}`},body:JSON.stringify(r),responseType:"json",signal:e});this._imageAnalysisInfo&&(this._imageAnalysisInfo.results=o.data.results)}await this.init()}catch(i){i.name==="AbortError"?console.error("Aborted",i):(this._imageAnalysisFailed=!0,console.error("Analyzing failed",i)),this._resetImageAnalysisInfo(),this.init()}}_resetImageAnalysisInfo(){let e={url:"",token:"",canUseAI:!1,imageLocation:void 0,results:[]};this._imageAnalysisInfo=e}async _getImageAnalysisInfo(){let e={url:"",token:"",canUseAI:!1};if(this.aiImageExtraction.some(i=>i?.field&&i.prompt&&i.id===this.selectedLayerId)){let i=(this.mapView?.map).portalItem.portal;if(i){let s=await i.fetchSettings(),n=i?.helperServices.aiUtilityServices;n?.url&&n?.api?.image_analyze&&(e.url=n.url+n.api.image_analyze),i.credential&&(e.token=i.credential.token),s?.aiAssistantsEnabled&&!s.blockBetaApps&&i?.user?.privileges?.includes("portal:user:useAIAssistants")&&(e.canUseAI=!0)}}return e}async createEditorWidget(){this._editor&&this._editor.destroy();let e=[];this._container=document.createElement("div"),this._container?.classList.add("display-none"),this.enableSnapping||this._container.classList.add("hide-editor-toolbar");let t=this._updatedMapView&&await ot(this._updatedMapView),i=this.mapView&&await Le(this.mapView,this.selectedLayerId);if(i&&(this._selectedLayer=i,!this._selectedLayer?.isTable&&t&&t.forEach(s=>{e.push({layer:s,enabled:s?.type==="feature"&&s?.id===this.selectedLayerId,addEnabled:!0,updateEnabled:!1,deleteEnabled:!1})})),this._editor=new Jt({view:this._updatedMapView,layerInfos:e,visibleElements:{settingsMenu:this.enableSnapping,snappingControls:this.enableSnapping,createFeaturesSection:!0,editFeaturesSection:!1,flow:!0,sketch:this.showSketchWidgets&&this._selectedLayer?.geometryType!=="point"},container:this._container}),this._mapViewContainer.value?this.el.insertBefore(this._container,this._mapViewContainer.value):this.el.appendChild(this._container),this._selectedLayer?.isTable&&(this._editorLoading=!0),this._editor){let s=Z.watch(()=>this._editor?.viewModel.state,h=>{h==="adding-attachment"||h==="editing-attachment"?(this._addingAttachment=!0,this.editingAttachment.emit(!0)):this._addingAttachment&&(this.editingAttachment.emit(!1),this._addingAttachment=!1)});s&&this._editor.viewModel.addHandles(s);let n=Z?.watch(()=>this._editor?.viewModel.featureTemplatesViewModel.state,h=>{h==="ready"&&this._editor?.viewModel?.activeWorkflow?.type!=="create-features"&&(this.progressStatus.emit(50),this._editorLoading=!0)});n&&this._editor.viewModel.addHandles(n);let r=Z?.watch(()=>this._editor?.viewModel.featureFormViewModel?.state,h=>{h==="ready"&&this._editor?.viewModel.featureFormViewModel&&this._currentPage!=="editing"&&(this._mapViewContainer.value?.classList?.replace("show-map","hide-map"),this._editor.viewModel.featureFormViewModel.addHandles(this._editor.viewModel.featureFormViewModel.on("submit",this.submitted.bind(this))),setTimeout(()=>{this._setFloorLevel(this.floorLevel),this._imageAnalysisInfo?.results&&this._setAttributeValuesFromImageAnalysis()},200),!this.allowMultipleCreation&&this._editor.activeWorkflow&&(this._editor.activeWorkflow.data.creationInfo.maxFeatures=1),this._currentPage="featureForm",this.progressStatus.emit(100),this.drawComplete.emit(!1))});r&&this._editor.viewModel.addHandles(r);let o=Z.watch(()=>this._editor?.viewModel.state,h=>{h==="creating-features"&&this._editor?.viewModel.featureFormViewModel&&this._editor.viewModel.featureFormViewModel.state==="disabled"&&(this._mapViewContainer.value?.classList.replace("hide-map","show-map"),this._selectedLayer&&!this._selectedLayer.isTable&&(this._currentPage="drawing",this._editor.viewModel.sketchViewModel?.createGraphic&&this._imageAnalysisInfo?.imageLocation&&(this._updatedMapView?.goTo({center:this._imageAnalysisInfo.imageLocation}),this._selectedLayer.geometryType==="point"&&this._initializeSketchPoint(this._imageAnalysisInfo.imageLocation.clone()))))});o&&this._editor.viewModel.addHandles(o),this._editor.on("sketch-create",async h=>{h.detail.state==="complete"&&(this._drawnGeometry=h.detail.graphic?.geometry,this.reportingArea&&this.reportingAreaLayer&&await this.queryIntersectingFeatures())});let l;this._editor.on("sketch-update",h=>{clearTimeout(l),l=window.setTimeout(async()=>{this._drawnGeometry=h.detail.graphics[0].geometry,this.reportingArea&&this.reportingAreaLayer&&await this.queryIntersectingFeatures()},500)})}}async queryIntersectingFeatures(){let e=this.mapView&&await Le(this.mapView,this.reportingAreaLayer);if(e){let t=e.createQuery();t.geometry=this._drawnGeometry,t.spatialRelationship="intersects";let s=await e.queryFeatureCount(t)===0;this._inValidGeomtryDrawn=s,this.drawComplete.emit(this._inValidGeomtryDrawn)}}editLocation(){this.progressStatus.emit(75),this.editingLocation.emit(),this._container?.classList.add("display-none"),this._mapViewContainer.value?.classList.replace("hide-map","show-map"),this._currentPage="editing"}async startCreate(){return await this.hideEditorsElements(),new Promise((e,t)=>{if(this._editor?.viewModel.featureTemplatesViewModel.items?.length){let i=this._editor.viewModel.featureTemplatesViewModel.items[0].items;this._editor.viewModel.featureTemplatesViewModel.addHandles(this._editor.viewModel.featureTemplatesViewModel.on("select",()=>{this.progressStatus.emit(75),setTimeout(()=>{this.hideEditorsElements().then(()=>{e({})},n=>t(n))},700)})),i.length===1&&this._editor.viewModel.featureTemplatesViewModel.select(i[0]);let s=i.length>1;this.hideEditorsElements().then(()=>{s&&(this._currentPage="templatePicker",e({}))},n=>s&&t(n))}})}async createSearchWidget(){if(this._updatedMapView){let e={view:this._updatedMapView};if(this.searchConfiguration&&(e={...this._getSearchConfig(this.searchConfiguration,this._updatedMapView)}),this._search=new ai(e),!this._search)return;this._search.container="search-widget-ref",this._search.popupEnabled=!1,this._search.resultGraphicEnabled=!1;let t;this._search.viewModel.addHandles(this._search.on("search-complete",s=>{s.results[0].results&&s.results[0].results[0]&&(s.results[0].results[0].extent&&this._updatedMapView?.goTo(s.results[0].results[0].extent),this._selectedLayer?.geometryType==="point"&&(t=s.results[0].results[0]?.feature.geometry))}));let i=Z.watch(()=>this._search?.viewModel.state,s=>{s==="ready"&&setTimeout(()=>{if(this._editor?.viewModel.sketchViewModel?.createGraphic&&t)this._initializeSketchPoint(t);else if(this._editor?.viewModel.sketchViewModel&&this._editor.viewModel.sketchViewModel.updateGraphics.length>0&&t){let n=this._editor?.viewModel.sketchViewModel?.updateGraphics.getItemAt(0);n&&(n.set("geometry",t),this._editor?.viewModel.sketchViewModel?.update(n),this.hideEditorsElements())}},100)});i&&this._search.viewModel.addHandles(i)}}async _initializeSketchPoint(e){if(this._editor?.viewModel.sketchViewModel?.createGraphic){let i=this._editor.viewModel.sketchViewModel.createGraphic.set("geometry",e).clone();this._editor.viewModel.sketchViewModel.addGraphic(i),this._editor.viewModel.sketchViewModel.emit("create",{graphic:i,state:"complete",toolEventInfo:null,type:"create"}),await this._editor.viewModel.sketchViewModel.update(i),this.hideEditorsElements()}}_getSearchConfig(e,t){let i="includeDefaultSources",s=e.sources;return s&&s?.length>0?(e[i]=!1,s.forEach(n=>{if(n.hasOwnProperty("layer")){let o=n,l=o.layer?.id,h=l?t.map?.findLayerById(l):"",d=o?.layer?.url;h?o.layer=h:d&&(o.layer=new Zt(d))}}),s?.forEach(n=>{if(n.hasOwnProperty("locator")){let o=n;if(o?.name==="ArcGIS World Geocoding Service"){let l=o.outFields||["Addr_type","Match_addr","StAddr","City"];o.outFields=l,o.singleLineFieldName="SingleLine"}o.url=o.url,delete o.url}})):e={...e,includeDefaultSources:!0},e}async _setFloorLevel(e){if(!e)return;let t=this._selectedLayer,i=t?.floorInfo?.floorField;if(i){let s=t.fields.find(n=>n.name===i);if(s&&!t?.formTemplate)this._editor?.viewModel.featureFormViewModel&&(this._editor.viewModel.featureFormViewModel.setValue(s.name,e),s.editable=!1);else if(t.formTemplate&&this.formElements){let n=new Qt({expression:`'${e}'`,name:"floor-info-test",title:"Floor Info",returnType:"string"}),r=new ei({label:i,editableExpression:"false",fieldName:i,input:{type:"text-box",maxLength:50,minLength:0},valueExpression:n.name});this._updatedMapView?.map.editableLayers.forEach(o=>{let l=this.formElements.orgElements,h=this.formElements.orgExpressionInfos,d=[...l];if(d.push(r),o.type==="feature"){let u=o,y=new ti({title:u?.formTemplate?.title,description:u?.formTemplate?.description,elements:d,expressionInfos:[n].concat(h)});o.formTemplate=y}})}}}_setAttributeValuesFromImageAnalysis(){this._imageAnalysisInfo?.results&&this._imageAnalysisInfo.results.forEach(e=>{this._editor?.viewModel.featureFormViewModel&&e.key&&e.success&&this._editor.viewModel.featureFormViewModel.setValue(e.key,e.value)})}async hideEditorsElements(){this.customizeSubmit&&(await this.timeout(700),this.el.querySelector(".esri-editor")?.querySelectorAll("calcite-flow-item")?.forEach(e=>{let t=e.shadowRoot?.querySelector("calcite-panel")?.shadowRoot?.querySelector("article");t?.querySelector("header")?.setAttribute("style","display: none"),t?.querySelector("footer")?.setAttribute("style","display: none")}))}async submitted(e){let t=!1;if(e.invalid.length){this._isSubmitBtnClicked=!1;return}if(this._isSubmitBtnClicked){this._isSubmitBtnClicked=!1;try{if(this._editor?.activeWorkflow){if(this._selectedLayer&&this._selectedLayer.capabilities.data.supportsAttachment&&this._selectedImageBase64&&(t=!0),t){let i=this._selectedLayer?.on("edits",async s=>{if(s.addedFeatures.length>0){let n=s.addedFeatures[0].objectId;try{if(this._uploadedImage&&this._selectedLayer){let r=this._uploadedImage,o=new FormData;o.set("keywords","ai-image"),o.set("attachment",r),o.append("f","json");let l=new ni({attributes:{[this._selectedLayer.objectIdField]:n}});await this._selectedLayer.addAttachment(l,o)}}catch(r){console.error("Attachment upload failed",r)}i?.remove(),this.success.emit()}})}await this._editor.activeWorkflow.commit(),this._editor.viewModel.failures?.length&&this._editor.viewModel.failures.some(i=>{if(i.error)throw i.error})}}catch(i){this.fail.emit(i);return}t||this.success.emit()}}async timeout(e){return new Promise(t=>setTimeout(t,e))}};at("create-feature",Ze);return Ze},"widgets/Editor","form/ExpressionInfo","layers/FeatureLayer","form/elements/FieldElement","form/FormTemplate","views/MapView","widgets/Home","widgets/Search","Graphic","core/reactiveUtils","request","geometry/Point","geometry/SpatialReference",a,c)
package/dist/cdn/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/1.2/LICENSE.txt */
2
- import{a}from"./ABSRNM72.js";import{v as e}from"./5CQPQ7AE.js";import"./3QPJ2JCA.js";var o=e(a,{"arcgis-solutions-assistant":[()=>import("./7IRDIGFC.js"),"_translations:,open,serverRoot,userFirstName;handleSendMessage,loopRequest,requestAIServer;resetChat"],"buffer-tools":[()=>import("./SXKFLQ6J.js"),"_translations:,appearance,disabled,distance,geometries:,max,min,sliderTicks,unionResults,unit;getTranslatedUnit"],"card-manager":[()=>import("./CNCHPFKY.js"),"_translations:,createBtnLabel,customInfoText,enableCreateFeatures,enableEditGeometry,enableSnapping,isMobile,layerOrTable:,mapView:,selectedFeaturesIds:,selectingFeatureFromMap,showSketchWidgets,zoomAndScrollToSelected"],"consent-manager":[()=>import("./2JWJRETB.js"),"_translations:,amazonAppId,amazonAppName,amazonUserPoolID,amazonVersion,firstUseVar,measurementIds:,portal:;getInstance"],"create-feature":[()=>import("./YQBW4W5Y.js"),"_translations:,aiImageExtraction:,allowMultipleCreation,customizeSubmit,enablePhotoLocation,enableSearch,enableSnapping,floorLevel,formElements,isMobile,mapView:,popupEnabled,reportingArea,reportingAreaLayer,reportingAreaMessage,searchConfiguration:,selectedLayerId,showGuidingMsg,showLayerVisibilityMsg,showSketchWidgets,submitNewReportsMessage,updateMapPosition;refresh,showForm,submit"],"create-related-feature":[()=>import("./V7SJ57VS.js"),"_translations:,customizeSubmit,enableSnapping,mapView:,selectedFeature:,showGuidingMsg,table:;submit"],"crowdsource-manager":[()=>import("./KY6ISAHM.js"),"_translations:,appLayout,appProxies,basemapConfig:,coverPageEnabled,customInfoText,defaultAppLayout,defaultCenter,defaultGlobalId,defaultLayer,defaultLevel,defaultOid,defaultWebmap,enableAutoRefresh,enableBasemap,enableColumnReorder,enableCSV,enableFloorFilter,enableFullscreen,enableHome,enableLayerList,enableLegend,enableMapList,enableSearch,enableSelectionTool,enableShare,enableSnapping,enableZoom,featureSelectionMode,honorMapFieldSettings,introductionWindowEnabled,mapInfos:,onlyShowUpdatableLayers,popupHeaderColor,popupHeaderHoverColor,popupHeaderHoverTextColor,popupHeaderTextColor,searchConfiguration:,shareIncludeEmbed,shareIncludeSocial,showNewestFirst,theme,visibilityIcon,zoomAndScrollToSelected,zoomToScale"],"crowdsource-reporter":[()=>import("./DLGI7AQW.js"),"_translations:,aiImageExtraction:,center,commentButtonText,commentSubmittedMessage,defaultWebmap,description,enableAnonymousAccess,enableAnonymousComments,enableComments,enableHome,enableLogin,enableNewReports,enablePhotoLocation,enableSearch,enableSnapping,enableZoom,filterByMapExtent,floorLevel,isMobile,layerExpressions:,layerId,level,loginTitle,mapInfos:,mapView:,objectId,reportButtonText,reportingArea,reportingAreaLayer,reportingAreaMessage,reportingOptions:,reportsHeader,reportSubmittedMessage,searchConfiguration:,showComments,showFeatureSymbol,showFullCommentTitle,showMyReportsOnly,showUserImageInCommentsList,sortOption,submitNewReportsMessage,theme,zoomToScale;updateLayerExpressionsT9n"],"deduct-calculator":[()=>import("./WSUCAHSV.js")],"delete-button":[()=>import("./2UY5AG4I.js"),"_translations:,buttonType,deleteDialog,disabled,icon,ids:,layer:,showDeleteCount"],"delete-dialog":[()=>import("./NDEILGBJ.js"),"_translations:,ids:,layer:,open"],"edit-card":[()=>import("./IVESIH47.js"),"_translations:,allowMultipleEditing,enableEditGeometry,enableSnapping,graphicIndex,graphics:,mapView:,open"],"feature-details":[()=>import("./DEVMQRIV.js"),"enableSnapping,graphics:,layerItemsHash:,mapView:,reportingOptions:,showFullCommentTitle,showUserImageInCommentsList;back,next,refresh,toggleListView"],"feature-list":[()=>import("./YA54VGWG.js"),"_translations:,applyLayerViewFilter,filterByMapExtent,highlightOnHover,highlightOnMap,mapView:,noFeaturesFoundMsg,pageSize,reportingOptions:,selectedLayerId,showErrorWhenNoFeatures,showFeatureSymbol,showFullTitle,showInitialLoading,showUserImageInList,sortingInfo:,textSize,whereClause;refresh"],"field-selection":[()=>import("./B6JMUT76.js"),"_translations:,configExtraFields,layer:,mapView:,table:,tableRef:"],"info-card":[()=>import("./WSGGMK4M.js"),"_translations:,allowEditing,enableEditGeometry,enableSnapping,graphics:,highlightEnabled,isLoading,isMobile,mapView:,paginationEnabled,position,showCloseBtn;back,getSelectedFeature,next,refresh,toggleListView,updateCurrentGraphic"],"layer-list":[()=>import("./R6TK53NR.js"),"_translations:,applyLayerViewFilter,filterByMapExtent,layers:,mapView:,showFeatureCount,showNextIcon;refresh"],"layer-list-widget":[()=>import("./J6BRXQUD.js"),"layerListWidget:,mapView:,visibilityIcon"],"layer-table":[()=>import("./NNK5RDNU.js"),"_translations:,appLayout,defaultGlobalId:,defaultLayerId,defaultOid:,enableAutoRefresh,enableColumnReorder,enableCSV,enableInlineEdit,enableShare,enableTableAutosave,featureSelectionMode,honorMapFieldSettings,isMobile,mapHidden,mapInfo:,mapView:,selectedIds:,selectedRelatedIds:,shareIncludeEmbed,shareIncludeSocial,showNewestFirst,showOnlyUpdatableLayers,zoomAndScrollToSelected,zoomToScale;closeFilter,filterReset,filterUpdate,refresh,setColumnOrder,validateActiveEdits,validateTableUpdate"],"map-basemap-gallery":[()=>import("./YP3NCJZY.js"),"basemapConfig:,basemapWidget:,mapView:"],"map-card":[()=>import("./GDGLUOZG.js"),"_translations:,appLayout,appProxies,basemapConfig:,defaultLayerId,defaultWebmapId,enableBasemap,enableFloorFilter,enableFullscreen,enableHome,enableLayerList,enableLegend,enableMapLayerPicker,enableMapPicker,enableSearch,enableSelectionTool,enableShare,enableSingleExpand,featureSelectionMode,hide,isMapLayout,isMobile,mapInfo:,mapInfos:,mapToolsOrder:,mapView:,mapWidgetsIndex,mapWidgetsPosition,mapWidgetsSize,mobileMapWidgetsPosition,mobileToolsOrder:,selectedFeaturesIds:,selectedLayer:,shareIncludeEmbed,shareIncludeSocial,showOnlyUpdatableLayers,stackTools,theme,visibilityIcon,zoomToolsSize,zoomToScale;resetFilter,updateFilterState,updateLayer"],"map-draw-tools":[()=>import("./WOIJDANZ.js"),"_translations:,active,drawMode,editGraphicsEnabled,graphics:,mapView:,pointSymbol:,polygonSymbol:,polylineSymbol:,redoEnabled,undoEnabled;clear,updateGraphics"],"map-floor-filter":[()=>import("./FCS5ID7D.js"),"enabled,floorFilterWidget:,mapView:"],"map-fullscreen":[()=>import("./JLQGZPWA.js"),"fullscreenWidget:,mapView:"],"map-layer-picker":[()=>import("./JDFTGGSH.js"),"_translations:,appearance,configLayerOrderDefined,defaultLayerId,disabled,display,enabledLayerIds:,height,isMobile,mapView:,placeholderIcon,referenceElement,scale,selectedIds:,showLayersListInPopover,showOnlyUpdatableLayers,showSingleLayerAsLabel,showTables,showTablesDisabled,type;setLayerById,setLayerByIds,updateLayer"],"map-legend":[()=>import("./TVHVKDXC.js"),"legendWidget:,mapView:"],"map-picker":[()=>import("./VXSAHUEP.js"),"_translations:,height,isMapLayout,mapInfos:,referenceElement,selectedWebMapId,showMapListInPopover;close,setMapByID,toggle"],"map-search":[()=>import("./XMMILGG2.js"),"mapView:,popupEnabled,resultGraphicEnabled,searchConfiguration:,searchTerm,searchWidget:"],"map-select-tools":[()=>import("./DI25OTTX.js"),"_translations:,bufferColor,bufferOutlineColor,customLabelEnabled,defaultBufferDistance,defaultBufferUnit,enabledLayerIds:,enableLayerFeatures,enableLayerFeaturesOnLoad,enableSearchDistance,enableSearchDistanceOnLoad,enableSketchTools,geometries:,headerLabelClass,isUpdate,layerViews:,mapView:,noResultText,searchConfiguration:,searchDistanceEnabled,selectionLayerIds:,selectionSet:,selectLayerView:,sketchLineSymbol:,sketchPointSymbol:,sketchPolygonSymbol:,useLayerFeaturesEnabled;clearSelection,getSelection"],"map-tools":[()=>import("./65LO5FJ5.js"),"_translations:,basemapConfig:,defaultLayerId,enableBasemap,enabledLayerIds:,enableFloorFilter,enableFullscreen,enableHome,enableLayerList,enableLegend,enableMapLayerPicker,enableMapPicker,enableSearch,enableSelectionTool,enableSingleExpand,isMobile,layout,mapInfo:,mapInfos:,mapView:,mapWidgetsSize,parentComponentHeight,parentComponentWidth,position,searchConfiguration:,selectedFeaturesIds:,selectedLayer:,selectedWebMapId,selectionTools:,showOnlyUpdatableLayers,stackTools,toolOrder:,visibilityIcon,zoomToolsSize"],"pci-calculator":[()=>import("./VSJ75MUT.js")],"pdf-download":[()=>import("./JBCXSWUE.js"),"_translations:,defaultNumLabelsPerPage,disabled;downloadCSV,downloadPDF"],"public-notification":[()=>import("./EWYHZVLG.js"),"_translations:,addresseeLayerIds:,bufferColor,bufferOutlineColor,customExport,customExportURL,customLabelEnabled,defaultBufferDistance,defaultBufferUnit,defaultExportTitle,defaultNumLabelsPerPage,enableLayerFeatures,enableLayerFeaturesOnLoad,enableSearchDistance,enableSearchDistanceOnLoad,enableSketchTools,featureEffect:,featureHighlightEnabled,initialNotice,mapView:,noResultText,searchConfiguration:,selectionLayerIds:,showRefineSelection,showSearchSettings,sketchLineSymbol:,sketchPointSymbol:,sketchPolygonSymbol:"],"refine-selection":[()=>import("./UBZXPTKV.js"),"_translations:,addresseeLayer:,bufferColor,bufferOutlineColor,defaultBufferDistance,defaultBufferUnit,drawnGraphicsArr:,enabledLayerIds:,enableSearchDistance,enableSearchDistanceOnLoad,geometries:,mapView:,searchDistanceEnabled,selectionSets:,sketchLineSymbol:,sketchPointSymbol:,sketchPolygonSymbol:"],"selection-tool":[()=>import("./VL2MYWM4.js"),"mapView:,selectedLayerId,tool;toggleSelectionTool"],"solution-configure-titles":[()=>import("./GRHJOEPK.js"),"_translations:,card:,open,solutionData,source,templateInfos:"],"solution-delete-dialog":[()=>import("./BHVGCO32.js"),"_translations:,card:,open,source;;close,delete"],"solution-deploy-dialog":[()=>import("./RRCINHTU.js"),"_translations:,card:,debugFailDeployment,open,userOptions:;;close,deploy"],"solution-deployed-card":[()=>import("./OTQC3GBA.js"),"_translations:,allowDelete,card:,deployedDate,description,diagramKey,heading,itemId,owner,templateInfos:,thumbnail,updateAvailable;getTemplates,renderDeleteDialog,renderDiagramDialog"],"solution-deployed-card-panel":[()=>import("./YDFVDQAV.js"),"_translations:,card:,cardRef,diagramKey,open,templateInfos:"],"solution-deploying-dialog":[()=>import("./NRCA2TEL.js"),"_translations:,abortController:,card:,deploymentProgress,isWaitingForCard,open;;cancelDeployment,close,confirmCancel"],"solution-details-card":[()=>import("./2OFTJJ6V.js"),"_translations:,card:,referrerSolutionId,referrerSolutionTitle,referrerSolutionVersion,source"],"solution-details-panel":[()=>import("./WGBSR3P6.js"),"_translations:,card:"],"solution-item-accordion":[()=>import("./MU7RTD3Q.js"),"_translations:,itemRelationshipDependencies:,linkType,listSelectionMode,reuseWarning,templateInfos:,typeKeywords:;collapseAll,deselectAll,expandFirstItem,expandItemById,expandItems,selectFirstItem,selectItem,selectItems"],"solution-item-diagram":[()=>import("./3B2V57C5.js"),"_translations:,diagramKey,templateInfoGraph:,typeKeywords:"],"solution-item-icon":[()=>import("./PXSQUQNJ.js"),"isPortal,type,typeKeywords:"],"solution-resource-card":[()=>import("./MI3DGRKT.js"),"_translations:,description,heading,icon,meridianIcon,sectionHeading,url"],"solution-snapshot-gallery":[()=>import("./RZH3TFPN.js"),"_translations:,card:,itemProperties:,open,screenshot:"],"solution-social-share":[()=>import("./GMMSJ5Q4.js"),"_translations:,actionApperance,autoUpdateShareUrl,buttonAppearance,inlineSuccessPopoverPlacement,mode,popoverButtonIconScale,popoverPositioning,removePopoverOffset,scale,shareButtonKind,shareButtonScale,shareButtonText,shareButtonType,shareIconsLayout,shareText,shareUrl,shortenShareUrl,socialMedia,solutionId,solutionTitle,solutionVersion,successMessage"],"solution-user-avatar":[()=>import("./W6PUON32.js"),"fullname,lookupProfile,thumbnailUrl,username"],"solutions-all-panel":[()=>import("./EPN67VKX.js"),"_translations:,sortType;searchSolutions,setSearchOptions"],"solutions-all-shell":[()=>import("./46GUX7LY.js"),"_translations:,solutionsCount;searchSolutions"],"solutions-deploy-app":[()=>import("./3VTPDWZB.js"),"_translations:,appConfig,initTab,initTitleOrId,sortType,useLocalAppConfig;selectTab"],"solutions-deploy-app-nav":[()=>import("./UGB4V5GD.js"),"_translations:,appConfig,initTab;;activateMenuItem,clearMenuItems"],"solutions-deployed-filter-panel":[()=>import("./TO6V3TFI.js"),"_translations:,isAllSolutions,isMobile,isOrgAdmin;;changeOwnerFilter,changeSearchFilter,clearFilters"],"solutions-deployed-panel":[()=>import("./ARRXFQPY.js"),"_translations:,sortType;reload,searchSolutions,setSearchOptions"],"solutions-deployed-shell":[()=>import("./MTOT253Z.js"),"_translations:,solutionsCount;searchSolutions"],"solutions-filter-panel":[()=>import("./XCWRZEQ4.js"),"_translations:,hideIndustryFilter,isAIDialogOpen,showReset;;changeIndustryFilter,clearFilters"],"solutions-resources-section":[()=>import("./RL6WXD7H.js"),"cards,heading,subheading"],"solutions-resources-shell":[()=>import("./YN7QHN2M.js"),"_translations:"],"solutions-searchsort-toolbar":[()=>import("./6F5PD3AM.js"),"_translations:,defaultSortType,isOrgSolutions,scope;;changeOwnerFilter,changeSearchFilter,sortChanged"]});o({resourcesUrl:import.meta.url});var t=new CSSStyleSheet;t.replaceSync(`@layer{:not([hydrated]):is(arcgis-solutions-assistant,buffer-tools,card-manager,consent-manager,create-feature,create-related-feature,crowdsource-manager,crowdsource-reporter,deduct-calculator,delete-button,delete-dialog,edit-card,feature-details,feature-list,field-selection,info-card,layer-list,layer-list-widget,layer-table,map-basemap-gallery,map-card,map-draw-tools,map-floor-filter,map-fullscreen,map-layer-picker,map-legend,map-picker,map-search,map-select-tools,map-tools,pci-calculator,pdf-download,public-notification,refine-selection,selection-tool,solution-configure-titles,solution-delete-dialog,solution-deploy-dialog,solution-deployed-card,solution-deployed-card-panel,solution-deploying-dialog,solution-details-card,solution-details-panel,solution-item-accordion,solution-item-diagram,solution-item-icon,solution-resource-card,solution-snapshot-gallery,solution-social-share,solution-user-avatar,solutions-all-panel,solutions-all-shell,solutions-deploy-app,solutions-deploy-app-nav,solutions-deployed-filter-panel,solutions-deployed-panel,solutions-deployed-shell,solutions-filter-panel,solutions-resources-section,solutions-resources-shell,solutions-searchsort-toolbar){visibility:hidden}
2
+ import{a}from"./ABSRNM72.js";import{v as e}from"./5CQPQ7AE.js";import"./3QPJ2JCA.js";var o=e(a,{"arcgis-solutions-assistant":[()=>import("./7IRDIGFC.js"),"_translations:,open,serverRoot,userFirstName;handleSendMessage,loopRequest,requestAIServer;resetChat"],"buffer-tools":[()=>import("./SXKFLQ6J.js"),"_translations:,appearance,disabled,distance,geometries:,max,min,sliderTicks,unionResults,unit;getTranslatedUnit"],"card-manager":[()=>import("./CNCHPFKY.js"),"_translations:,createBtnLabel,customInfoText,enableCreateFeatures,enableEditGeometry,enableSnapping,isMobile,layerOrTable:,mapView:,selectedFeaturesIds:,selectingFeatureFromMap,showSketchWidgets,zoomAndScrollToSelected"],"consent-manager":[()=>import("./2JWJRETB.js"),"_translations:,amazonAppId,amazonAppName,amazonUserPoolID,amazonVersion,firstUseVar,measurementIds:,portal:;getInstance"],"create-feature":[()=>import("./HQ4CUQFF.js"),"_translations:,aiImageExtraction:,allowMultipleCreation,customizeSubmit,enablePhotoLocation,enableSearch,enableSnapping,floorLevel,formElements,isMobile,mapView:,popupEnabled,reportingArea,reportingAreaLayer,reportingAreaMessage,searchConfiguration:,selectedLayerId,showGuidingMsg,showLayerVisibilityMsg,showSketchWidgets,submitNewReportsMessage,updateMapPosition;refresh,showForm,submit"],"create-related-feature":[()=>import("./V7SJ57VS.js"),"_translations:,customizeSubmit,enableSnapping,mapView:,selectedFeature:,showGuidingMsg,table:;submit"],"crowdsource-manager":[()=>import("./KY6ISAHM.js"),"_translations:,appLayout,appProxies,basemapConfig:,coverPageEnabled,customInfoText,defaultAppLayout,defaultCenter,defaultGlobalId,defaultLayer,defaultLevel,defaultOid,defaultWebmap,enableAutoRefresh,enableBasemap,enableColumnReorder,enableCSV,enableFloorFilter,enableFullscreen,enableHome,enableLayerList,enableLegend,enableMapList,enableSearch,enableSelectionTool,enableShare,enableSnapping,enableZoom,featureSelectionMode,honorMapFieldSettings,introductionWindowEnabled,mapInfos:,onlyShowUpdatableLayers,popupHeaderColor,popupHeaderHoverColor,popupHeaderHoverTextColor,popupHeaderTextColor,searchConfiguration:,shareIncludeEmbed,shareIncludeSocial,showNewestFirst,theme,visibilityIcon,zoomAndScrollToSelected,zoomToScale"],"crowdsource-reporter":[()=>import("./DLGI7AQW.js"),"_translations:,aiImageExtraction:,center,commentButtonText,commentSubmittedMessage,defaultWebmap,description,enableAnonymousAccess,enableAnonymousComments,enableComments,enableHome,enableLogin,enableNewReports,enablePhotoLocation,enableSearch,enableSnapping,enableZoom,filterByMapExtent,floorLevel,isMobile,layerExpressions:,layerId,level,loginTitle,mapInfos:,mapView:,objectId,reportButtonText,reportingArea,reportingAreaLayer,reportingAreaMessage,reportingOptions:,reportsHeader,reportSubmittedMessage,searchConfiguration:,showComments,showFeatureSymbol,showFullCommentTitle,showMyReportsOnly,showUserImageInCommentsList,sortOption,submitNewReportsMessage,theme,zoomToScale;updateLayerExpressionsT9n"],"deduct-calculator":[()=>import("./WSUCAHSV.js")],"delete-button":[()=>import("./2UY5AG4I.js"),"_translations:,buttonType,deleteDialog,disabled,icon,ids:,layer:,showDeleteCount"],"delete-dialog":[()=>import("./NDEILGBJ.js"),"_translations:,ids:,layer:,open"],"edit-card":[()=>import("./IVESIH47.js"),"_translations:,allowMultipleEditing,enableEditGeometry,enableSnapping,graphicIndex,graphics:,mapView:,open"],"feature-details":[()=>import("./DEVMQRIV.js"),"enableSnapping,graphics:,layerItemsHash:,mapView:,reportingOptions:,showFullCommentTitle,showUserImageInCommentsList;back,next,refresh,toggleListView"],"feature-list":[()=>import("./YA54VGWG.js"),"_translations:,applyLayerViewFilter,filterByMapExtent,highlightOnHover,highlightOnMap,mapView:,noFeaturesFoundMsg,pageSize,reportingOptions:,selectedLayerId,showErrorWhenNoFeatures,showFeatureSymbol,showFullTitle,showInitialLoading,showUserImageInList,sortingInfo:,textSize,whereClause;refresh"],"field-selection":[()=>import("./B6JMUT76.js"),"_translations:,configExtraFields,layer:,mapView:,table:,tableRef:"],"info-card":[()=>import("./WSGGMK4M.js"),"_translations:,allowEditing,enableEditGeometry,enableSnapping,graphics:,highlightEnabled,isLoading,isMobile,mapView:,paginationEnabled,position,showCloseBtn;back,getSelectedFeature,next,refresh,toggleListView,updateCurrentGraphic"],"layer-list":[()=>import("./R6TK53NR.js"),"_translations:,applyLayerViewFilter,filterByMapExtent,layers:,mapView:,showFeatureCount,showNextIcon;refresh"],"layer-list-widget":[()=>import("./J6BRXQUD.js"),"layerListWidget:,mapView:,visibilityIcon"],"layer-table":[()=>import("./NNK5RDNU.js"),"_translations:,appLayout,defaultGlobalId:,defaultLayerId,defaultOid:,enableAutoRefresh,enableColumnReorder,enableCSV,enableInlineEdit,enableShare,enableTableAutosave,featureSelectionMode,honorMapFieldSettings,isMobile,mapHidden,mapInfo:,mapView:,selectedIds:,selectedRelatedIds:,shareIncludeEmbed,shareIncludeSocial,showNewestFirst,showOnlyUpdatableLayers,zoomAndScrollToSelected,zoomToScale;closeFilter,filterReset,filterUpdate,refresh,setColumnOrder,validateActiveEdits,validateTableUpdate"],"map-basemap-gallery":[()=>import("./YP3NCJZY.js"),"basemapConfig:,basemapWidget:,mapView:"],"map-card":[()=>import("./GDGLUOZG.js"),"_translations:,appLayout,appProxies,basemapConfig:,defaultLayerId,defaultWebmapId,enableBasemap,enableFloorFilter,enableFullscreen,enableHome,enableLayerList,enableLegend,enableMapLayerPicker,enableMapPicker,enableSearch,enableSelectionTool,enableShare,enableSingleExpand,featureSelectionMode,hide,isMapLayout,isMobile,mapInfo:,mapInfos:,mapToolsOrder:,mapView:,mapWidgetsIndex,mapWidgetsPosition,mapWidgetsSize,mobileMapWidgetsPosition,mobileToolsOrder:,selectedFeaturesIds:,selectedLayer:,shareIncludeEmbed,shareIncludeSocial,showOnlyUpdatableLayers,stackTools,theme,visibilityIcon,zoomToolsSize,zoomToScale;resetFilter,updateFilterState,updateLayer"],"map-draw-tools":[()=>import("./WOIJDANZ.js"),"_translations:,active,drawMode,editGraphicsEnabled,graphics:,mapView:,pointSymbol:,polygonSymbol:,polylineSymbol:,redoEnabled,undoEnabled;clear,updateGraphics"],"map-floor-filter":[()=>import("./FCS5ID7D.js"),"enabled,floorFilterWidget:,mapView:"],"map-fullscreen":[()=>import("./JLQGZPWA.js"),"fullscreenWidget:,mapView:"],"map-layer-picker":[()=>import("./JDFTGGSH.js"),"_translations:,appearance,configLayerOrderDefined,defaultLayerId,disabled,display,enabledLayerIds:,height,isMobile,mapView:,placeholderIcon,referenceElement,scale,selectedIds:,showLayersListInPopover,showOnlyUpdatableLayers,showSingleLayerAsLabel,showTables,showTablesDisabled,type;setLayerById,setLayerByIds,updateLayer"],"map-legend":[()=>import("./TVHVKDXC.js"),"legendWidget:,mapView:"],"map-picker":[()=>import("./VXSAHUEP.js"),"_translations:,height,isMapLayout,mapInfos:,referenceElement,selectedWebMapId,showMapListInPopover;close,setMapByID,toggle"],"map-search":[()=>import("./XMMILGG2.js"),"mapView:,popupEnabled,resultGraphicEnabled,searchConfiguration:,searchTerm,searchWidget:"],"map-select-tools":[()=>import("./DI25OTTX.js"),"_translations:,bufferColor,bufferOutlineColor,customLabelEnabled,defaultBufferDistance,defaultBufferUnit,enabledLayerIds:,enableLayerFeatures,enableLayerFeaturesOnLoad,enableSearchDistance,enableSearchDistanceOnLoad,enableSketchTools,geometries:,headerLabelClass,isUpdate,layerViews:,mapView:,noResultText,searchConfiguration:,searchDistanceEnabled,selectionLayerIds:,selectionSet:,selectLayerView:,sketchLineSymbol:,sketchPointSymbol:,sketchPolygonSymbol:,useLayerFeaturesEnabled;clearSelection,getSelection"],"map-tools":[()=>import("./65LO5FJ5.js"),"_translations:,basemapConfig:,defaultLayerId,enableBasemap,enabledLayerIds:,enableFloorFilter,enableFullscreen,enableHome,enableLayerList,enableLegend,enableMapLayerPicker,enableMapPicker,enableSearch,enableSelectionTool,enableSingleExpand,isMobile,layout,mapInfo:,mapInfos:,mapView:,mapWidgetsSize,parentComponentHeight,parentComponentWidth,position,searchConfiguration:,selectedFeaturesIds:,selectedLayer:,selectedWebMapId,selectionTools:,showOnlyUpdatableLayers,stackTools,toolOrder:,visibilityIcon,zoomToolsSize"],"pci-calculator":[()=>import("./VSJ75MUT.js")],"pdf-download":[()=>import("./JBCXSWUE.js"),"_translations:,defaultNumLabelsPerPage,disabled;downloadCSV,downloadPDF"],"public-notification":[()=>import("./EWYHZVLG.js"),"_translations:,addresseeLayerIds:,bufferColor,bufferOutlineColor,customExport,customExportURL,customLabelEnabled,defaultBufferDistance,defaultBufferUnit,defaultExportTitle,defaultNumLabelsPerPage,enableLayerFeatures,enableLayerFeaturesOnLoad,enableSearchDistance,enableSearchDistanceOnLoad,enableSketchTools,featureEffect:,featureHighlightEnabled,initialNotice,mapView:,noResultText,searchConfiguration:,selectionLayerIds:,showRefineSelection,showSearchSettings,sketchLineSymbol:,sketchPointSymbol:,sketchPolygonSymbol:"],"refine-selection":[()=>import("./UBZXPTKV.js"),"_translations:,addresseeLayer:,bufferColor,bufferOutlineColor,defaultBufferDistance,defaultBufferUnit,drawnGraphicsArr:,enabledLayerIds:,enableSearchDistance,enableSearchDistanceOnLoad,geometries:,mapView:,searchDistanceEnabled,selectionSets:,sketchLineSymbol:,sketchPointSymbol:,sketchPolygonSymbol:"],"selection-tool":[()=>import("./VL2MYWM4.js"),"mapView:,selectedLayerId,tool;toggleSelectionTool"],"solution-configure-titles":[()=>import("./GRHJOEPK.js"),"_translations:,card:,open,solutionData,source,templateInfos:"],"solution-delete-dialog":[()=>import("./BHVGCO32.js"),"_translations:,card:,open,source;;close,delete"],"solution-deploy-dialog":[()=>import("./RRCINHTU.js"),"_translations:,card:,debugFailDeployment,open,userOptions:;;close,deploy"],"solution-deployed-card":[()=>import("./OTQC3GBA.js"),"_translations:,allowDelete,card:,deployedDate,description,diagramKey,heading,itemId,owner,templateInfos:,thumbnail,updateAvailable;getTemplates,renderDeleteDialog,renderDiagramDialog"],"solution-deployed-card-panel":[()=>import("./YDFVDQAV.js"),"_translations:,card:,cardRef,diagramKey,open,templateInfos:"],"solution-deploying-dialog":[()=>import("./NRCA2TEL.js"),"_translations:,abortController:,card:,deploymentProgress,isWaitingForCard,open;;cancelDeployment,close,confirmCancel"],"solution-details-card":[()=>import("./2OFTJJ6V.js"),"_translations:,card:,referrerSolutionId,referrerSolutionTitle,referrerSolutionVersion,source"],"solution-details-panel":[()=>import("./WGBSR3P6.js"),"_translations:,card:"],"solution-item-accordion":[()=>import("./MU7RTD3Q.js"),"_translations:,itemRelationshipDependencies:,linkType,listSelectionMode,reuseWarning,templateInfos:,typeKeywords:;collapseAll,deselectAll,expandFirstItem,expandItemById,expandItems,selectFirstItem,selectItem,selectItems"],"solution-item-diagram":[()=>import("./3B2V57C5.js"),"_translations:,diagramKey,templateInfoGraph:,typeKeywords:"],"solution-item-icon":[()=>import("./PXSQUQNJ.js"),"isPortal,type,typeKeywords:"],"solution-resource-card":[()=>import("./MI3DGRKT.js"),"_translations:,description,heading,icon,meridianIcon,sectionHeading,url"],"solution-snapshot-gallery":[()=>import("./RZH3TFPN.js"),"_translations:,card:,itemProperties:,open,screenshot:"],"solution-social-share":[()=>import("./GMMSJ5Q4.js"),"_translations:,actionApperance,autoUpdateShareUrl,buttonAppearance,inlineSuccessPopoverPlacement,mode,popoverButtonIconScale,popoverPositioning,removePopoverOffset,scale,shareButtonKind,shareButtonScale,shareButtonText,shareButtonType,shareIconsLayout,shareText,shareUrl,shortenShareUrl,socialMedia,solutionId,solutionTitle,solutionVersion,successMessage"],"solution-user-avatar":[()=>import("./W6PUON32.js"),"fullname,lookupProfile,thumbnailUrl,username"],"solutions-all-panel":[()=>import("./EPN67VKX.js"),"_translations:,sortType;searchSolutions,setSearchOptions"],"solutions-all-shell":[()=>import("./46GUX7LY.js"),"_translations:,solutionsCount;searchSolutions"],"solutions-deploy-app":[()=>import("./3VTPDWZB.js"),"_translations:,appConfig,initTab,initTitleOrId,sortType,useLocalAppConfig;selectTab"],"solutions-deploy-app-nav":[()=>import("./UGB4V5GD.js"),"_translations:,appConfig,initTab;;activateMenuItem,clearMenuItems"],"solutions-deployed-filter-panel":[()=>import("./TO6V3TFI.js"),"_translations:,isAllSolutions,isMobile,isOrgAdmin;;changeOwnerFilter,changeSearchFilter,clearFilters"],"solutions-deployed-panel":[()=>import("./ARRXFQPY.js"),"_translations:,sortType;reload,searchSolutions,setSearchOptions"],"solutions-deployed-shell":[()=>import("./MTOT253Z.js"),"_translations:,solutionsCount;searchSolutions"],"solutions-filter-panel":[()=>import("./XCWRZEQ4.js"),"_translations:,hideIndustryFilter,isAIDialogOpen,showReset;;changeIndustryFilter,clearFilters"],"solutions-resources-section":[()=>import("./RL6WXD7H.js"),"cards,heading,subheading"],"solutions-resources-shell":[()=>import("./YN7QHN2M.js"),"_translations:"],"solutions-searchsort-toolbar":[()=>import("./6F5PD3AM.js"),"_translations:,defaultSortType,isOrgSolutions,scope;;changeOwnerFilter,changeSearchFilter,sortChanged"]});o({resourcesUrl:import.meta.url});var t=new CSSStyleSheet;t.replaceSync(`@layer{:not([hydrated]):is(arcgis-solutions-assistant,buffer-tools,card-manager,consent-manager,create-feature,create-related-feature,crowdsource-manager,crowdsource-reporter,deduct-calculator,delete-button,delete-dialog,edit-card,feature-details,feature-list,field-selection,info-card,layer-list,layer-list-widget,layer-table,map-basemap-gallery,map-card,map-draw-tools,map-floor-filter,map-fullscreen,map-layer-picker,map-legend,map-picker,map-search,map-select-tools,map-tools,pci-calculator,pdf-download,public-notification,refine-selection,selection-tool,solution-configure-titles,solution-delete-dialog,solution-deploy-dialog,solution-deployed-card,solution-deployed-card-panel,solution-deploying-dialog,solution-details-card,solution-details-panel,solution-item-accordion,solution-item-diagram,solution-item-icon,solution-resource-card,solution-snapshot-gallery,solution-social-share,solution-user-avatar,solutions-all-panel,solutions-all-shell,solutions-deploy-app,solutions-deploy-app-nav,solutions-deployed-filter-panel,solutions-deployed-panel,solutions-deployed-shell,solutions-filter-panel,solutions-resources-section,solutions-resources-shell,solutions-searchsort-toolbar){visibility:hidden}
3
3
 
4
4
  }`);document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,a)
@@ -712,7 +712,7 @@ class CreateFeature extends LitElement {
712
712
  if (this.reportingArea && this.reportingAreaLayer) {
713
713
  await this.queryIntersectingFeatures();
714
714
  }
715
- }, 50);
715
+ }, 500);
716
716
  });
717
717
  }
718
718
  }