cm-reporting 0.3.0 → 0.3.1

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.
package/dist/index.cjs CHANGED
@@ -1,40 +1,40 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),re=require("react"),fo=require("react-i18next"),y=require("antd"),we=require("@ant-design/icons"),je=require("i18next"),Ma=re.createContext(null);function Kc({value:e,children:t}){return p.jsx(Ma.Provider,{value:e,children:t})}const Qc=[{prefix:"companyInfo",page:"declaration"},{prefix:"questions",page:"declaration"},{prefix:"questionComments",page:"declaration"},{prefix:"companyQuestions",page:"declaration"},{prefix:"smelterList",page:"smelter-list"},{prefix:"mineList",page:"mine-list"},{prefix:"productList",page:"product-list"}];function Uc(e){const t=e.split(".")[0];return Qc.find(o=>o.prefix===t)?.page??"declaration"}function Eo(){return re.useContext(Ma)}function Po(e,t,n){if(!e.includes(t))throw new Error(`Unknown ${n} version: ${t}`)}function Do(e){const t=new Map;return e.forEach(n=>{t.set(n.id,n)}),t}const Gc=[{key:"aluminum",labelKey:"minerals.aluminum"},{key:"copper",labelKey:"minerals.copper"},{key:"lithium",labelKey:"minerals.lithium"},{key:"nickel",labelKey:"minerals.nickel"},{key:"silver",labelKey:"minerals.silver"},{key:"chromium",labelKey:"minerals.chromium"},{key:"zinc",labelKey:"minerals.zinc"}],Yc=["铝","铬","铜","锂","镍","银","锌"],Zc=["Aluminium","Copper","Lithium","Nickel","Silver","Chromium","Zinc"],Hc=[{key:"aluminum",labelKey:"minerals.aluminum"},{key:"chromium",labelKey:"minerals.chromium"},{key:"copper",labelKey:"minerals.copper"},{key:"lithium",labelKey:"minerals.lithium"},{key:"nickel",labelKey:"minerals.nickel"},{key:"silver",labelKey:"minerals.silver"},{key:"zinc",labelKey:"minerals.zinc"}],Vc=[{key:"aluminum",labelKey:"minerals.aluminum"},{key:"iridium",labelKey:"minerals.iridium"},{key:"lime",labelKey:"minerals.lime"},{key:"manganese",labelKey:"minerals.manganese"},{key:"palladium",labelKey:"minerals.palladium"},{key:"platinum",labelKey:"minerals.platinum"},{key:"rareEarthElements",labelKey:"minerals.rareEarthElements"},{key:"rhodium",labelKey:"minerals.rhodium"},{key:"ruthenium",labelKey:"minerals.ruthenium"},{key:"silver",labelKey:"minerals.silver"},{key:"sodaAsh",labelKey:"minerals.sodaAsh"},{key:"zinc",labelKey:"minerals.zinc"},{key:"other",labelKey:"minerals.other"}],Wc=[{value:"Yes",labelKey:"options.yes"},{value:"No",labelKey:"options.no"}],Jc=[...Wc,{value:"Unknown",labelKey:"options.unknown"},{value:"Not declaring",labelKey:"options.notDeclaring"}],Xc=[{value:"1",labelKey:"options.percentageOne"},{value:"Greater than 90%",labelKey:"options.percentageAbove90"},{value:"Greater than 75%",labelKey:"options.percentageAbove75"},{value:"Greater than 50%",labelKey:"options.percentageAbove50"},{value:"50% or less",labelKey:"options.percentage50OrLess"},{value:"None",labelKey:"options.none"},{value:"Unknown",labelKey:"options.unknown"},{value:"Did not survey",labelKey:"options.didNotSurvey"}],eu=[{key:"Q1",labelKey:"questions.amrt.q1",options:Jc,perMineral:!0},{key:"Q2",labelKey:"questions.amrt.q2",options:Xc,perMineral:!0}],tu=[{key:"companyName",labelKey:"fields.companyName",type:"text",required:!0},{key:"declarationScope",labelKey:"fields.reportingScope",type:"select",required:!0},{key:"scopeDescription",labelKey:"fields.scopeDescription",type:"textarea",required:"conditional"},{key:"companyId",labelKey:"fields.companyId",type:"text",required:!1},{key:"companyAuthId",labelKey:"fields.companyAuthId",type:"text",required:!1},{key:"address",labelKey:"fields.address",type:"text",required:!0},{key:"contactName",labelKey:"fields.contactName",type:"text",required:!0},{key:"contactEmail",labelKey:"fields.contactEmail",type:"email",required:!0},{key:"contactPhone",labelKey:"fields.contactPhone",type:"text",required:!0},{key:"authorizerName",labelKey:"fields.authorizerName",type:"text",required:!0},{key:"authorizerTitle",labelKey:"fields.authorizerTitle",type:"text",required:!1},{key:"authorizerEmail",labelKey:"fields.authorizerEmail",type:"email",required:!0},{key:"authorizerPhone",labelKey:"fields.authorizerPhone",type:"text",required:!1},{key:"authorizationDate",labelKey:"fields.authorizationDate",type:"date",required:!0}];function nu(e){return[...e.instructionsFirst?[{key:"instructions",labelKey:"tabs.instructions",available:!0},{key:"revision",labelKey:"tabs.revision",available:!0}]:[{key:"revision",labelKey:"tabs.revision",available:!0},{key:"instructions",labelKey:"tabs.instructions",available:!0}],{key:"definitions",labelKey:"tabs.definitions",available:!0},{key:"declaration",labelKey:"tabs.declaration",available:!0},{key:"minerals-scope",labelKey:"tabs.mineralsScope",available:!0},{key:"smelter-list",labelKey:"tabs.smelterList",available:!0},{key:"mine-list",labelKey:"tabs.mineList",available:!0},{key:"product-list",labelKey:"tabs.productList",available:!0},{key:"smelter-lookup",labelKey:"tabs.smelterLookup",available:e.hasLookup},{key:"checker",labelKey:"tabs.checker",available:!0}]}function ou(e){return{templateType:"amrt",version:{id:e.id,label:e.id},pages:nu(e.pages),mineralScope:{mode:e.mineralScope.mode,minerals:e.mineralScope.minerals,maxCount:10,defaultCustomMinerals:e.mineralScope.defaultCustomMinerals,otherSlotCount:e.mineralScope.otherSlotCount},companyInfoFields:tu,questions:eu,companyQuestions:[],gating:{q2Gating:{type:"q1-not-negatives",negatives:["No","Unknown","Not declaring"]},laterQuestionsGating:{type:"always"},companyQuestionsGating:{type:"always"},smelterListGating:{type:"q1-yes"}},smelterList:{metalDropdownSource:{type:"dynamic-active"},hasIdColumn:e.smelterList.hasIdColumn,hasLookup:e.smelterList.hasLookup,hasCombinedColumn:e.smelterList.hasCombinedColumn,notListedRequireNameCountry:!0,notYetIdentifiedCountryDefault:e.smelterList.notYetIdentifiedCountryDefault,recycledScrapOptions:e.smelterList.recycledScrapOptions},mineList:{available:!0,metalDropdownSource:{type:"dynamic-active"},smelterNameMode:e.mineList.smelterNameMode},productList:{hasRequesterColumns:e.productList.hasRequesterColumns,productNumberLabelKey:"productList.amrt.manufacturerNumber",productNameLabelKey:"productList.amrt.manufacturerName",commentLabelKey:"productList.amrt.comment"},dateConfig:{minDate:"2006-12-31",maxDate:"2026-03-31"}}}const qa=["1.1","1.2","1.3"],ru="1.3",iu=qa.map(e=>({id:e,label:e})),su={id:"1.1",mineralScope:{mode:"free-text",minerals:Gc,defaultCustomMinerals:Zc},pages:{instructionsFirst:!0,hasLookup:!1},smelterList:{hasIdColumn:!1,hasLookup:!1,hasCombinedColumn:!1,notYetIdentifiedCountryDefault:"Unknown",recycledScrapOptions:"yes-no-unknown"},mineList:{smelterNameMode:"manual"},productList:{hasRequesterColumns:!1}},au={id:"1.2",mineralScope:{mode:"free-text",minerals:Hc,defaultCustomMinerals:Yc},pages:{instructionsFirst:!0,hasLookup:!1},smelterList:{hasIdColumn:!1,hasLookup:!1,hasCombinedColumn:!1,notYetIdentifiedCountryDefault:"Unknown",recycledScrapOptions:"yes-no-unknown"},mineList:{smelterNameMode:"manual"},productList:{hasRequesterColumns:!1}},lu={id:"1.3",mineralScope:{mode:"dynamic-dropdown",minerals:Vc,otherSlotCount:12},pages:{instructionsFirst:!1,hasLookup:!0},smelterList:{hasIdColumn:!0,hasLookup:!0,hasCombinedColumn:!0,notYetIdentifiedCountryDefault:"",recycledScrapOptions:"yes-no"},mineList:{smelterNameMode:"dropdown"},productList:{hasRequesterColumns:!0}},cu={"1.1":su,"1.2":au,"1.3":lu},uu=Do(Object.values(cu)),mu={type:"amrt",name:"AMRT",fullNameKey:"templates.amrt_full",versions:iu,defaultVersion:ru};function du(e){Po(qa,e,"AMRT");const t=uu.get(e);if(!t)throw new Error(`Missing AMRT version config: ${e}`);return ou(t)}const Ni=[{key:"tantalum",labelKey:"minerals.tantalum"},{key:"tin",labelKey:"minerals.tin"},{key:"gold",labelKey:"minerals.gold"},{key:"tungsten",labelKey:"minerals.tungsten"}],Ze=[{value:"Yes",labelKey:"options.yes"},{value:"No",labelKey:"options.no"}],ar=[...Ze,{value:"Unknown",labelKey:"options.unknown"}],pu=[{value:"Yes, in conformance with IPC1755 (e.g., CMRT)",labelKey:"options.yesIpc1755"},{value:"Yes, using other format (describe)",labelKey:"options.yesOtherFormat"},{value:"No",labelKey:"options.no"}],fu=[{value:"Yes, with the SEC",labelKey:"options.yesWithSec"},{value:"Yes, with the EU",labelKey:"options.yesWithEu"},{value:"Yes, with the SEC and the EU",labelKey:"options.yesWithSecAndEu"},{value:"No",labelKey:"options.no"}],Ur=[{value:"1",labelKey:"options.percentageOne"},{value:"Greater than 90%",labelKey:"options.percentageAbove90"},{value:"Greater than 75%",labelKey:"options.percentageAbove75"},{value:"Greater than 50%",labelKey:"options.percentageAbove50"},{value:"50% or less",labelKey:"options.percentage50OrLess"},{value:"None",labelKey:"options.none"}],Gr=[{value:"100%",labelKey:"options.percentage100"},{value:"Greater than 90%",labelKey:"options.percentageAbove90"},{value:"Greater than 75%",labelKey:"options.percentageAbove75"},{value:"Greater than 50%",labelKey:"options.percentageAbove50"},{value:"50% or less",labelKey:"options.percentage50OrLess"},{value:"None",labelKey:"options.none"}];function hu(e){return[{key:"Q1",labelKey:"questions.cmrt.q1",options:Ze,perMineral:!0},{key:"Q2",labelKey:"questions.cmrt.q2",options:Ze,perMineral:!0},{key:"Q3",labelKey:"questions.cmrt.q3",options:ar,perMineral:!0},{key:"Q4",labelKey:"questions.cmrt.q4",options:ar,perMineral:!0},{key:"Q5",labelKey:"questions.cmrt.q5",options:ar,perMineral:!0},{key:"Q6",labelKey:"questions.cmrt.q6",options:e,perMineral:!0},{key:"Q7",labelKey:"questions.cmrt.q7",options:Ze,perMineral:!0},{key:"Q8",labelKey:"questions.cmrt.q8",options:Ze,perMineral:!0}]}const yu=[{key:"A",labelKey:"companyQuestions.cmrt.a",options:Ze,hasCommentField:!0},{key:"B",labelKey:"companyQuestions.cmrt.b",options:Ze,hasCommentField:!0,commentLabelKey:"companyQuestions.cmrt.b_comment",commentRequiredWhen:["Yes"]},{key:"C",labelKey:"companyQuestions.cmrt.c",options:Ze,hasCommentField:!0},{key:"D",labelKey:"companyQuestions.cmrt.d",options:Ze,hasCommentField:!0},{key:"E",labelKey:"companyQuestions.cmrt.e",options:pu,hasCommentField:!0,commentLabelKey:"companyQuestions.cmrt.e_comment",commentRequiredWhen:["Yes, using other format (describe)"]},{key:"F",labelKey:"companyQuestions.cmrt.f",options:Ze,hasCommentField:!0},{key:"G",labelKey:"companyQuestions.cmrt.g",options:Ze,hasCommentField:!0},{key:"H",labelKey:"companyQuestions.cmrt.h",options:fu,hasCommentField:!0}],gu=[{key:"companyName",labelKey:"fields.companyName",type:"text",required:!0},{key:"declarationScope",labelKey:"fields.reportingScope",type:"select",required:!0},{key:"scopeDescription",labelKey:"fields.scopeDescription",type:"textarea",required:"conditional"},{key:"companyId",labelKey:"fields.companyId",type:"text",required:!1},{key:"companyAuthId",labelKey:"fields.companyAuthId",type:"text",required:!1},{key:"address",labelKey:"fields.address",type:"text",required:!1},{key:"contactName",labelKey:"fields.contactName",type:"text",required:!0},{key:"contactEmail",labelKey:"fields.contactEmail",type:"email",required:!0},{key:"contactPhone",labelKey:"fields.contactPhone",type:"text",required:!0},{key:"authorizerName",labelKey:"fields.authorizerName",type:"text",required:!0},{key:"authorizerTitle",labelKey:"fields.authorizerTitle",type:"text",required:!1},{key:"authorizerEmail",labelKey:"fields.authorizerEmail",type:"email",required:!0},{key:"authorizerPhone",labelKey:"fields.authorizerPhone",type:"text",required:!1},{key:"authorizationDate",labelKey:"fields.authorizationDate",type:"date",required:!0}],bu=[{key:"revision",labelKey:"tabs.revision",available:!0},{key:"instructions",labelKey:"tabs.instructions",available:!0},{key:"definitions",labelKey:"tabs.definitions",available:!0},{key:"declaration",labelKey:"tabs.declaration",available:!0},{key:"smelter-list",labelKey:"tabs.smelterList",available:!0},{key:"product-list",labelKey:"tabs.productList",available:!0},{key:"smelter-lookup",labelKey:"tabs.smelterLookup",available:!0},{key:"checker",labelKey:"tabs.checker",available:!0}];function wu(e){return{templateType:"cmrt",version:{id:e.id,label:e.id},pages:bu,mineralScope:{mode:"fixed",minerals:Ni},companyInfoFields:gu,questions:hu(e.q6Options),companyQuestions:yu,gating:{q2Gating:{type:"q1-not-no"},laterQuestionsGating:{type:"q1q2-not-no"},companyQuestionsGating:{type:"q1q2-not-no"},smelterListGating:{type:"q1q2-not-no"}},smelterList:{metalDropdownSource:{type:"fixed",metals:Ni},hasIdColumn:!0,hasLookup:!0,hasCombinedColumn:!1,notListedRequireNameCountry:e.smelterList.notListedRequireNameCountry,notYetIdentifiedCountryDefault:"Unknown",notYetIdentifiedCountryByMetal:e.smelterList.notYetIdentifiedCountryByMetal},mineList:{available:!1},productList:{hasRequesterColumns:!1,productNumberLabelKey:e.productList.productNumberLabelKey,productNameLabelKey:e.productList.productNameLabelKey,commentLabelKey:"productList.cmrt.comment"},dateConfig:{minDate:"2006-12-31",maxDate:e.dateConfig.maxDate}}}const Aa=["6.01","6.1","6.22","6.31","6.4","6.5"],vu="6.5",Su=Aa.map(e=>({id:e,label:e})),Cu={id:"6.01",q6Options:Ur,productList:{productNumberLabelKey:"productList.cmrt.manufacturerNumber",productNameLabelKey:"productList.cmrt.manufacturerName"},smelterList:{notListedRequireNameCountry:!0},dateConfig:{maxDate:"2026-03-31"}},ku={id:"6.1",q6Options:Ur,productList:{productNumberLabelKey:"productList.cmrt.manufacturerNumber",productNameLabelKey:"productList.cmrt.manufacturerName"},smelterList:{notListedRequireNameCountry:!0},dateConfig:{maxDate:"2026-03-31"}},Tu={id:"6.22",q6Options:Ur,productList:{productNumberLabelKey:"productList.cmrt.manufacturerNumber",productNameLabelKey:"productList.cmrt.manufacturerName"},smelterList:{notListedRequireNameCountry:!1},dateConfig:{maxDate:"2026-03-31"}},xu={id:"6.31",q6Options:Gr,productList:{productNumberLabelKey:"productList.cmrt.manufacturerNumber",productNameLabelKey:"productList.cmrt.manufacturerName"},smelterList:{notListedRequireNameCountry:!1},dateConfig:{}},_u={id:"6.4",q6Options:Gr,productList:{productNumberLabelKey:"productList.cmrt.manufacturerNumber",productNameLabelKey:"productList.cmrt.manufacturerName"},smelterList:{notListedRequireNameCountry:!1},dateConfig:{}},Iu={id:"6.5",q6Options:Gr,productList:{productNumberLabelKey:"productList.cmrt.respondentNumber",productNameLabelKey:"productList.cmrt.respondentName"},smelterList:{notListedRequireNameCountry:!1,notYetIdentifiedCountryByMetal:{tungsten:""}},dateConfig:{}},Ru={"6.01":Cu,"6.1":ku,"6.22":Tu,"6.31":xu,"6.4":_u,"6.5":Iu},Nu=Do(Object.values(Ru)),Mu={type:"cmrt",name:"CMRT",fullNameKey:"templates.cmrt_full",versions:Su,defaultVersion:vu};function qu(e){Po(Aa,e,"CMRT");const t=Nu.get(e);if(!t)throw new Error(`Missing CMRT version config: ${e}`);return wu(t)}const Mi=[{key:"cobalt",labelKey:"minerals.cobalt"}],it=[{value:"Yes",labelKey:"options.yes"},{value:"No",labelKey:"options.no"}],xn=[...it,{value:"Unknown",labelKey:"options.unknown"}],Au=xn,Lu=[{value:"Yes",labelKey:"options.yes"},{value:"No",labelKey:"options.no"},{value:"Unknown",labelKey:"options.unknown"},{value:"DRC or adjoining countries only",labelKey:"options.drcOrAdjoiningOnly"}];function Eu(e){return[{key:"Q1",labelKey:"questions.crt.q1",options:xn,perMineral:!1},{key:"Q2",labelKey:"questions.crt.q2",options:e,perMineral:!1},{key:"Q3",labelKey:"questions.crt.q3",options:xn,perMineral:!1},{key:"Q4",labelKey:"questions.crt.q4",options:[{value:"1",labelKey:"options.percentage100"},{value:"Greater than 90%",labelKey:"options.percentageAbove90"},{value:"Greater than 75%",labelKey:"options.percentageAbove75"},{value:"Greater than 50%",labelKey:"options.percentageAbove50"},{value:"50% or less",labelKey:"options.percentage50OrLess"},{value:"None",labelKey:"options.none"}],perMineral:!1},{key:"Q5",labelKey:"questions.crt.q5",options:xn,perMineral:!1},{key:"Q6",labelKey:"questions.crt.q6",options:xn,perMineral:!1}]}function Pu(e){return[{key:"A",labelKey:"companyQuestions.crt.a",options:it,hasCommentField:!0,commentLabelKey:"companyQuestions.crt.a_comment",commentRequiredWhen:["Yes"]},{key:"B",labelKey:"companyQuestions.crt.b",options:it,hasCommentField:!0},{key:"C",labelKey:"companyQuestions.crt.c",options:it,hasCommentField:!0},{key:"D",labelKey:"companyQuestions.crt.d",options:it,hasCommentField:!0},{key:"E",labelKey:"companyQuestions.crt.e",options:it,hasCommentField:!0},{key:"F",labelKey:"companyQuestions.crt.f",options:it,hasCommentField:!0},{key:"G",labelKey:"companyQuestions.crt.g",options:e.companyQuestionsGOptions,hasCommentField:!0,commentLabelKey:"companyQuestions.crt.g_comment",commentRequiredWhen:e.companyQuestionsGCommentRequiredWhen},{key:"H",labelKey:"companyQuestions.crt.h",options:it,hasCommentField:!0},{key:"I",labelKey:"companyQuestions.crt.i",options:it,hasCommentField:!0}]}const Du=[{key:"companyName",labelKey:"fields.companyName",type:"text",required:!0},{key:"declarationScope",labelKey:"fields.reportingScope",type:"select",required:!0},{key:"scopeDescription",labelKey:"fields.scopeDescription",type:"textarea",required:"conditional"},{key:"companyId",labelKey:"fields.companyId",type:"text",required:!1},{key:"companyAuthId",labelKey:"fields.companyAuthId",type:"text",required:!1},{key:"address",labelKey:"fields.address",type:"text",required:!1},{key:"contactName",labelKey:"fields.contactName",type:"text",required:!0},{key:"contactEmail",labelKey:"fields.contactEmail",type:"email",required:!0},{key:"contactPhone",labelKey:"fields.contactPhone",type:"text",required:!0},{key:"authorizerName",labelKey:"fields.authorizerName",type:"text",required:!0},{key:"authorizerTitle",labelKey:"fields.authorizerTitle",type:"text",required:!1},{key:"authorizerEmail",labelKey:"fields.authorizerEmail",type:"email",required:!0},{key:"authorizerPhone",labelKey:"fields.authorizerPhone",type:"text",required:!1},{key:"authorizationDate",labelKey:"fields.authorizationDate",type:"date",required:!0}],$u=[{key:"instructions",labelKey:"tabs.instructions",available:!0},{key:"revision",labelKey:"tabs.revision",available:!0},{key:"definitions",labelKey:"tabs.definitions",available:!0},{key:"declaration",labelKey:"tabs.declaration",available:!0},{key:"smelter-list",labelKey:"tabs.smelterList",available:!0},{key:"product-list",labelKey:"tabs.productList",available:!0},{key:"smelter-lookup",labelKey:"tabs.smelterLookup",available:!0},{key:"checker",labelKey:"tabs.checker",available:!0}];function Ou(e){return{templateType:"crt",version:{id:e.id,label:e.id},pages:$u,mineralScope:{mode:"fixed",minerals:Mi},companyInfoFields:Du,questions:Eu(e.q2Options),companyQuestions:Pu(e),gating:{q2Gating:{type:"q1-not-negatives",negatives:["No","Unknown"]},laterQuestionsGating:{type:"q1-not-negatives",negatives:["No","Unknown"]},companyQuestionsGating:{type:"q1-not-negatives",negatives:["No","Unknown"]},smelterListGating:{type:"q1-not-negatives",negatives:["No","Unknown"]}},smelterList:{metalDropdownSource:{type:"fixed",metals:Mi},hasIdColumn:!0,hasLookup:!0,hasCombinedColumn:!1,notListedRequireNameCountry:!0,notYetIdentifiedCountryDefault:"Unknown"},mineList:{available:!1},productList:{hasRequesterColumns:!1,productNumberLabelKey:"productList.crt.manufacturerNumber",productNameLabelKey:"productList.crt.manufacturerName",commentLabelKey:"productList.crt.comment"},dateConfig:{minDate:"2006-12-31",maxDate:"2026-03-31"}}}const La=["2.2","2.21"],Fu="2.21",zu=La.map(e=>({id:e,label:e})),ju={id:"2.2",q2Options:Au,companyQuestionsGOptions:[{value:"Yes, CRT",labelKey:"options.yesCrtTemplate"},{value:"Yes, Using Other Format (Describe)",labelKey:"options.yesOtherFormatTitle"},{value:"No",labelKey:"options.no"}],companyQuestionsGCommentRequiredWhen:["Yes, Using Other Format (Describe)"]},Bu={id:"2.21",q2Options:Lu,companyQuestionsGOptions:[{value:"Yes, CRT",labelKey:"options.yesCrtTemplate"},{value:"Yes, Using Other Format (Describe)",labelKey:"options.yesOtherFormatTitle"},{value:"No",labelKey:"options.no"}],companyQuestionsGCommentRequiredWhen:["Yes, Using Other Format (Describe)"]},Ku={"2.2":ju,"2.21":Bu},Qu=Do(Object.values(Ku)),Uu={type:"crt",name:"CRT",fullNameKey:"templates.crt_full",versions:zu,defaultVersion:Fu};function Gu(e){Po(La,e,"CRT");const t=Qu.get(e);if(!t)throw new Error(`Missing CRT version config: ${e}`);return Ou(t)}const ft=[{key:"cobalt",labelKey:"minerals.cobalt"},{key:"mica",labelKey:"minerals.mica"}],Ea=[{key:"cobalt",labelKey:"minerals.cobalt"},{key:"copper",labelKey:"minerals.copper"},{key:"graphite",labelKey:"minerals.graphite"},{key:"lithium",labelKey:"minerals.lithium"},{key:"mica",labelKey:"minerals.mica"},{key:"nickel",labelKey:"minerals.nickel"}],Pa=[{value:"Yes",labelKey:"options.yes"},{value:"No",labelKey:"options.no"}],ue=Pa,On=[...Pa,{value:"Unknown",labelKey:"options.unknown"}],$o=[...On,{value:"Not applicable for this declaration",labelKey:"options.notApplicableForDeclaration"}],Da=[...On,{value:"Not declaring",labelKey:"options.notDeclaring"}],pe=On,Oo=[...On,{value:"DRC only",labelKey:"options.drcOnly"}],Fo=[...On,{value:"India and/or Madagascar only",labelKey:"options.indiaMadagascarOnly"}],zo=[{value:"1",labelKey:"options.percentageOne"},{value:"Greater than 90%",labelKey:"options.percentageAbove90"},{value:"Greater than 75%",labelKey:"options.percentageAbove75"},{value:"Greater than 50%",labelKey:"options.percentageAbove50"},{value:"50% or less",labelKey:"options.percentage50OrLess"},{value:"None",labelKey:"options.none"}],$a=[{value:"100%",labelKey:"options.percentage100"},{value:"Greater than 90%",labelKey:"options.percentageAbove90"},{value:"Greater than 75%",labelKey:"options.percentageAbove75"},{value:"Greater than 50%",labelKey:"options.percentageAbove50"},{value:"50% or less",labelKey:"options.percentage50OrLess"},{value:"None",labelKey:"options.none"},{value:"Did not survey",labelKey:"options.didNotSurvey"}],Oa=[{value:"Yes",labelKey:"options.yes"},{value:"Yes, when more processors are validated",labelKey:"options.yesWhenMoreValidated"},{value:"No",labelKey:"options.no"}],Jt=[{value:"Yes, in conformance with IPC1755 (e.g. EMRT)",labelKey:"options.yesIpc1755Emrt"},{value:"Yes, Using Other Format (Describe)",labelKey:"options.yesOtherFormatTitle"},{value:"No",labelKey:"options.no"}],jo={Q1:"questions.emrt.v1.q1",Q2:"questions.emrt.v1.q2",Q3:"questions.emrt.v1.q3",Q4:"questions.emrt.v1.q4",Q5:"questions.emrt.v1.q5",Q6:"questions.emrt.v1.q6",Q7:"questions.emrt.v1.q7"},Fa={Q1:"questions.emrt.q1",Q2:"questions.emrt.q2",Q3:"questions.emrt.q3",Q4:"questions.emrt.q4",Q5:"questions.emrt.q5",Q6:"questions.emrt.q6",Q7:"questions.emrt.q7"},Yu={A:"companyQuestions.emrt.v11.a",B:"companyQuestions.emrt.v11.b",C:"companyQuestions.emrt.v11.c",D:"companyQuestions.emrt.v11.d",E:"companyQuestions.emrt.v11.e",F:"companyQuestions.emrt.v11.f",G:"companyQuestions.emrt.v11.g"},Yr={A:"companyQuestions.emrt.a",B:"companyQuestions.emrt.b",C:"companyQuestions.emrt.v1.c",D:"companyQuestions.emrt.d",E:"companyQuestions.emrt.v1.e",F:"companyQuestions.emrt.f",G:"companyQuestions.emrt.g"},za={A:"companyQuestions.emrt.a",B:"companyQuestions.emrt.b",C:"companyQuestions.emrt.c",D:"companyQuestions.emrt.d",E:"companyQuestions.emrt.e",F:"companyQuestions.emrt.f",G:"companyQuestions.emrt.g"},Zu=[{key:"companyName",labelKey:"fields.companyName",type:"text",required:!0},{key:"declarationScope",labelKey:"fields.reportingScope",type:"select",required:!0},{key:"scopeDescription",labelKey:"fields.scopeDescription",type:"textarea",required:"conditional"},{key:"companyId",labelKey:"fields.companyId",type:"text",required:!1},{key:"companyAuthId",labelKey:"fields.companyAuthId",type:"text",required:!1},{key:"address",labelKey:"fields.address",type:"text",required:!1},{key:"contactName",labelKey:"fields.contactName",type:"text",required:!0},{key:"contactEmail",labelKey:"fields.contactEmail",type:"email",required:!0},{key:"contactPhone",labelKey:"fields.contactPhone",type:"text",required:!0},{key:"authorizerName",labelKey:"fields.authorizerName",type:"text",required:!0},{key:"authorizerTitle",labelKey:"fields.authorizerTitle",type:"text",required:!1},{key:"authorizerEmail",labelKey:"fields.authorizerEmail",type:"email",required:!0},{key:"authorizerPhone",labelKey:"fields.authorizerPhone",type:"text",required:!1},{key:"authorizationDate",labelKey:"fields.authorizationDate",type:"date",required:!0}];function Hu(e){const t=e.questionOptions;return[{key:"Q1",labelKey:e.questionLabelKeys.Q1,options:t.q1,perMineral:!0},{key:"Q2",labelKey:e.questionLabelKeys.Q2,options:t.q2,perMineral:!0},{key:"Q3",labelKey:e.questionLabelKeys.Q3,options:t.q3,optionsByMineral:t.q3ByMineral,perMineral:!0},{key:"Q4",labelKey:e.questionLabelKeys.Q4,options:t.q4,perMineral:!0},{key:"Q5",labelKey:e.questionLabelKeys.Q5,options:t.q5,perMineral:!0},{key:"Q6",labelKey:e.questionLabelKeys.Q6,options:t.q6,perMineral:!0},{key:"Q7",labelKey:e.questionLabelKeys.Q7,options:t.q7,perMineral:!0}]}function Vu(e){const t=o=>e.companyLabelKeys[o],n=e.companyOptions;return[{key:"A",labelKey:t("A"),options:n.A,hasCommentField:!0},{key:"B",labelKey:t("B"),options:n.B,hasCommentField:!0,commentLabelKey:n.BCommentLabelKey,commentRequiredWhen:n.BCommentRequiredWhen??[]},{key:"C",labelKey:t("C"),options:n.C,perMineral:!0,hasCommentField:!0},{key:"D",labelKey:t("D"),options:n.D,hasCommentField:!0},{key:"E",labelKey:t("E"),options:n.E,hasCommentField:!0,commentLabelKey:"companyQuestions.emrt.e_comment",commentRequiredWhen:["Yes, Using Other Format (Describe)"]},{key:"F",labelKey:t("F"),options:n.F,hasCommentField:!0},{key:"G",labelKey:t("G"),options:n.G,hasCommentField:!0}]}function Wu(e){return[...e.instructionsFirst?[{key:"instructions",labelKey:"tabs.instructions",available:!0},{key:"revision",labelKey:"tabs.revision",available:!0}]:[{key:"revision",labelKey:"tabs.revision",available:!0},{key:"instructions",labelKey:"tabs.instructions",available:!0}],{key:"definitions",labelKey:"tabs.definitions",available:!0},{key:"declaration",labelKey:"tabs.declaration",available:!0},{key:"smelter-list",labelKey:"tabs.smelterList",available:!0},{key:"mine-list",labelKey:"tabs.mineList",available:e.hasMineList},{key:"product-list",labelKey:"tabs.productList",available:!0},{key:"smelter-lookup",labelKey:"tabs.smelterLookup",available:!0},{key:"checker",labelKey:"tabs.checker",available:!0}]}function Ju(e){const t=e.gating.q1Negatives;return{templateType:"emrt",version:{id:e.id,label:e.id},pages:Wu(e.pages),mineralScope:{mode:e.mineralScopeMode,minerals:e.minerals},companyInfoFields:Zu,questions:Hu(e),companyQuestions:Vu(e),gating:{q2Gating:{type:"q1-not-negatives",negatives:t},laterQuestionsGating:{type:"q1-not-negatives-and-q2-not-negatives",q1Negatives:t,q2Negatives:["No","Unknown"]},companyQuestionsGating:{type:"q1-not-negatives-and-q2-not-negatives",q1Negatives:t,q2Negatives:["No","Unknown"]},smelterListGating:{type:"q1-not-negatives-and-q2-not-negatives",q1Negatives:t,q2Negatives:["No","Unknown"]}},smelterList:{metalDropdownSource:e.smelterList.metalDropdownSource,hasIdColumn:!0,hasLookup:!0,hasCombinedColumn:e.smelterList.hasCombinedColumn,notListedRequireNameCountry:!0,notYetIdentifiedCountryDefault:""},mineList:{available:e.mineList.available,metalDropdownSource:e.mineList.metalDropdownSource,smelterNameMode:e.mineList.smelterNameMode},productList:{hasRequesterColumns:e.productList.hasRequesterColumns,productNumberLabelKey:"productList.emrt.respondentNumber",productNameLabelKey:"productList.emrt.respondentName",commentLabelKey:"productList.emrt.comment"},dateConfig:{minDate:"2006-12-31",maxDate:"2026-03-31"}}}const ja=["1.1","1.11","1.2","1.3","2.0","2.1"],Xu="2.1",em=ja.map(e=>({id:e,label:e})),tm={id:"1.1",minerals:ft,mineralScopeMode:"fixed",questionLabelKeys:jo,questionOptions:{q1:$o,q2:pe,q3:pe,q3ByMineral:{cobalt:Oo,mica:Fo},q4:pe,q5:zo,q6:pe,q7:pe},companyLabelKeys:Yu,companyOptions:{A:ue,B:ue,BCommentLabelKey:void 0,BCommentRequiredWhen:[],C:ue,D:ue,E:Jt,F:ue,G:ue},gating:{q1Negatives:["No","Unknown","Not applicable for this declaration"]},pages:{instructionsFirst:!0,hasMineList:!1},smelterList:{metalDropdownSource:{type:"fixed",metals:ft},hasCombinedColumn:!1},mineList:{available:!1,smelterNameMode:"manual"},productList:{hasRequesterColumns:!1}},nm={id:"1.11",minerals:ft,mineralScopeMode:"fixed",questionLabelKeys:jo,questionOptions:{q1:$o,q2:pe,q3:pe,q3ByMineral:{cobalt:Oo,mica:Fo},q4:pe,q5:zo,q6:pe,q7:pe},companyLabelKeys:Yr,companyOptions:{A:ue,B:ue,BCommentLabelKey:"companyQuestions.emrt.b_comment",BCommentRequiredWhen:["Yes"],C:ue,D:ue,E:Jt,F:ue,G:ue},gating:{q1Negatives:["No","Unknown","Not applicable for this declaration"]},pages:{instructionsFirst:!0,hasMineList:!1},smelterList:{metalDropdownSource:{type:"fixed",metals:ft},hasCombinedColumn:!1},mineList:{available:!1,smelterNameMode:"manual"},productList:{hasRequesterColumns:!1}},om={id:"1.2",minerals:ft,mineralScopeMode:"fixed",questionLabelKeys:jo,questionOptions:{q1:$o,q2:pe,q3:pe,q3ByMineral:{cobalt:Oo,mica:Fo},q4:pe,q5:zo,q6:pe,q7:pe},companyLabelKeys:Yr,companyOptions:{A:ue,B:ue,BCommentLabelKey:"companyQuestions.emrt.b_comment",BCommentRequiredWhen:["Yes"],C:ue,D:ue,E:Jt,F:ue,G:ue},gating:{q1Negatives:["No","Unknown","Not applicable for this declaration"]},pages:{instructionsFirst:!0,hasMineList:!1},smelterList:{metalDropdownSource:{type:"fixed",metals:ft},hasCombinedColumn:!1},mineList:{available:!1,smelterNameMode:"manual"},productList:{hasRequesterColumns:!1}},rm={id:"1.3",minerals:ft,mineralScopeMode:"fixed",questionLabelKeys:jo,questionOptions:{q1:$o,q2:pe,q3:pe,q3ByMineral:{cobalt:Oo,mica:Fo},q4:pe,q5:zo,q6:pe,q7:pe},companyLabelKeys:Yr,companyOptions:{A:ue,B:ue,BCommentLabelKey:"companyQuestions.emrt.b_comment",BCommentRequiredWhen:["Yes"],C:ue,D:ue,E:Jt,F:ue,G:ue},gating:{q1Negatives:["No","Unknown","Not applicable for this declaration"]},pages:{instructionsFirst:!0,hasMineList:!1},smelterList:{metalDropdownSource:{type:"fixed",metals:ft},hasCombinedColumn:!1},mineList:{available:!1,smelterNameMode:"manual"},productList:{hasRequesterColumns:!1}},im={id:"2.0",minerals:Ea,mineralScopeMode:"dynamic-dropdown",questionLabelKeys:Fa,questionOptions:{q1:Da,q2:pe,q3:pe,q4:pe,q5:$a,q6:pe,q7:pe},companyLabelKeys:za,companyOptions:{A:ue,B:ue,BCommentLabelKey:"companyQuestions.emrt.b_comment",BCommentRequiredWhen:["Yes"],C:Oa,D:ue,E:Jt,F:ue,G:ue},gating:{q1Negatives:["No","Unknown","Not declaring"]},pages:{instructionsFirst:!0,hasMineList:!0},smelterList:{metalDropdownSource:{type:"dynamic-q2-yes"},hasCombinedColumn:!1},mineList:{available:!0,metalDropdownSource:{type:"dynamic-q2-yes"},smelterNameMode:"manual"},productList:{hasRequesterColumns:!1}},sm={id:"2.1",minerals:Ea,mineralScopeMode:"dynamic-dropdown",questionLabelKeys:Fa,questionOptions:{q1:Da,q2:pe,q3:pe,q4:pe,q5:$a,q6:pe,q7:pe},companyLabelKeys:za,companyOptions:{A:ue,B:ue,BCommentLabelKey:"companyQuestions.emrt.b_comment",BCommentRequiredWhen:["Yes"],C:Oa,D:ue,E:Jt,F:ue,G:ue},gating:{q1Negatives:["No","Unknown","Not declaring"]},pages:{instructionsFirst:!1,hasMineList:!0},smelterList:{metalDropdownSource:{type:"dynamic-q2-yes"},hasCombinedColumn:!0},mineList:{available:!0,metalDropdownSource:{type:"dynamic-q2-yes"},smelterNameMode:"dropdown"},productList:{hasRequesterColumns:!0}},am={"1.1":tm,"1.11":nm,"1.2":om,"1.3":rm,"2.0":im,"2.1":sm},lm=Do(Object.values(am)),cm={type:"emrt",name:"EMRT",fullNameKey:"templates.emrt_full",versions:em,defaultVersion:Xu};function um(e){Po(ja,e,"EMRT");const t=lm.get(e);if(!t)throw new Error(`Missing EMRT version config: ${e}`);return Ju(t)}const mm={cmrt:Mu,emrt:cm,crt:Uu,amrt:mu},dm={cmrt:qu,emrt:um,crt:Gu,amrt:du};function Ba(e){const t=mm[e];if(!t)throw new Error(`Unknown template type: ${e}`);return t}function Bo(e,t){const n=dm[e];if(!n)throw new Error(`Unknown template type: ${e}`);return n(t)}function pm(e){return Ba(e).defaultVersion}function fm(e){if(!e)return"";const t=e.startsWith("/")?e:`/${e}`;return t.endsWith("/")?t.slice(0,-1):t}function ho({template:e,version:t,page:n,basePath:o}){return`${fm(o)}/${e}/${t}/${n}`}function rt(e,t,n){const o=e[t];return typeof o=="object"&&n?o[n]??"":typeof o=="string"?o:""}function Gn(e,t,n){switch(e.type){case"always":return!0;case"q1-not-no":return rt(t,"Q1",n)!=="No";case"q1-yes":return rt(t,"Q1",n)==="Yes";case"q1q2-not-no":return rt(t,"Q1",n)!=="No"&&rt(t,"Q2",n)!=="No";case"q1q2-yes":return rt(t,"Q1",n)==="Yes"&&rt(t,"Q2",n)==="Yes";case"q1-not-negatives":return!e.negatives.includes(rt(t,"Q1",n));case"q1-not-negatives-and-q2-not-negatives":return!e.q1Negatives.includes(rt(t,"Q1",n))&&!e.q2Negatives.includes(rt(t,"Q2",n));default:return!0}}function Ka(e,t,n){const{gating:o}=e;return{q2Enabled:o.q2Gating?Gn(o.q2Gating,t,n):!0,laterQuestionsEnabled:o.laterQuestionsGating?Gn(o.laterQuestionsGating,t,n):!0,companyQuestionsEnabled:o.companyQuestionsGating?Gn(o.companyQuestionsGating,t,n):!0,smelterListRequired:o.smelterListGating?Gn(o.smelterListGating,t,n):!0}}function Xt(e,t,n){const o=new Map;return(n??e.mineralScope.minerals.map(i=>i.key)).forEach(i=>{o.set(i,Ka(e,t,i))}),o}function A(e,t,n){function o(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,l);const c=s.prototype,u=Object.keys(c);for(let f=0;f<u.length;f++){const m=u[f];m in a||(a[m]=c[m].bind(a))}}const r=n?.Parent??Object;class i extends r{}Object.defineProperty(i,"name",{value:e});function s(a){var l;const c=n?.Parent?new i:this;o(c,a),(l=c._zod).deferred??(l.deferred=[]);for(const u of c._zod.deferred)u();return c}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class Bt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Qa extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Ua={};function ht(e){return Ua}function Ga(e){const t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}function Cr(e,t){return typeof t=="bigint"?t.toString():t}function Zr(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Hr(e){return e==null}function Vr(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function hm(e,t){const n=(e.toString().split(".")[1]||"").length,o=t.toString();let r=(o.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(o)){const l=o.match(/\d?e-(\d?)/);l?.[1]&&(r=Number.parseInt(l[1]))}const i=n>r?n:r,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}const qi=Symbol("evaluating");function ye(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==qi)return o===void 0&&(o=qi,o=n()),o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function Lt(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function vt(...e){const t={};for(const n of e){const o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function Ai(e){return JSON.stringify(e)}function ym(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ya="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function yo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const gm=Zr(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ut(e){if(yo(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(yo(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Za(e){return Ut(e)?{...e}:Array.isArray(e)?[...e]:e}const bm=new Set(["string","number","symbol"]);function Gt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function St(e,t,n){const o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function X(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function wm(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const vm={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Sm(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=vt(e._zod.def,{get shape(){const s={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=n.shape[a])}return Lt(this,"shape",s),s},checks:[]});return St(e,i)}function Cm(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=vt(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return Lt(this,"shape",s),s},checks:[]});return St(e,i)}function km(e,t){if(!Ut(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const r=vt(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Lt(this,"shape",i),i}});return St(e,r)}function Tm(e,t){if(!Ut(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=vt(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Lt(this,"shape",o),o}});return St(e,n)}function xm(e,t){const n=vt(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return Lt(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return St(e,n)}function _m(e,t,n){const r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const s=vt(t._zod.def,{get shape(){const a=t._zod.def.shape,l={...a};if(n)for(const c in n){if(!(c in a))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(l[c]=e?new e({type:"optional",innerType:a[c]}):a[c])}else for(const c in a)l[c]=e?new e({type:"optional",innerType:a[c]}):a[c];return Lt(this,"shape",l),l},checks:[]});return St(t,s)}function Im(e,t,n){const o=vt(t._zod.def,{get shape(){const r=t._zod.def.shape,i={...r};if(n)for(const s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:r[s]}))}else for(const s in r)i[s]=new e({type:"nonoptional",innerType:r[s]});return Lt(this,"shape",i),i}});return St(t,o)}function zt(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function jt(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function Yn(e){return typeof e=="string"?e:e?.message}function yt(e,t,n){const o={...e,path:e.path??[]};if(!e.message){const r=Yn(e.inst?._zod.def?.error?.(e))??Yn(t?.error?.(e))??Yn(n.customError?.(e))??Yn(n.localeError?.(e))??"Invalid input";o.message=r}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function Wr(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Nn(...e){const[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}const Ha=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Cr,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Va=A("$ZodError",Ha),Wa=A("$ZodError",Ha,{Parent:Error});function Rm(e,t=n=>n.message){const n={},o=[];for(const r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):o.push(t(r));return{formErrors:o,fieldErrors:n}}function Nm(e,t=n=>n.message){const n={_errors:[]},o=r=>{for(const i of r.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>o({issues:s}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let s=n,a=0;for(;a<i.path.length;){const l=i.path[a];a===i.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(t(i))):s[l]=s[l]||{_errors:[]},s=s[l],a++}}};return o(e),n}const Jr=e=>(t,n,o,r)=>{const i=o?Object.assign(o,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new Bt;if(s.issues.length){const a=new(r?.Err??e)(s.issues.map(l=>yt(l,i,ht())));throw Ya(a,r?.callee),a}return s.value},Xr=e=>async(t,n,o,r)=>{const i=o?Object.assign(o,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const a=new(r?.Err??e)(s.issues.map(l=>yt(l,i,ht())));throw Ya(a,r?.callee),a}return s.value},Ko=e=>(t,n,o)=>{const r=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new Bt;return i.issues.length?{success:!1,error:new(e??Va)(i.issues.map(s=>yt(s,r,ht())))}:{success:!0,data:i.value}},Mm=Ko(Wa),Qo=e=>async(t,n,o)=>{const r=o?Object.assign(o,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>yt(s,r,ht())))}:{success:!0,data:i.value}},qm=Qo(Wa),Am=e=>(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Jr(e)(t,n,r)},Lm=e=>(t,n,o)=>Jr(e)(t,n,o),Em=e=>async(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Xr(e)(t,n,r)},Pm=e=>async(t,n,o)=>Xr(e)(t,n,o),Dm=e=>(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Ko(e)(t,n,r)},$m=e=>(t,n,o)=>Ko(e)(t,n,o),Om=e=>async(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Qo(e)(t,n,r)},Fm=e=>async(t,n,o)=>Qo(e)(t,n,o),zm=/^[cC][^\s-]{8,}$/,jm=/^[0-9a-z]+$/,Bm=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Km=/^[0-9a-vA-V]{20}$/,Qm=/^[A-Za-z0-9]{27}$/,Um=/^[a-zA-Z0-9_-]{21}$/,Gm=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ym=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Li=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Zm=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Hm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Vm(){return new RegExp(Hm,"u")}const Wm=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Jm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Xm=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ed=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,td=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ja=/^[A-Za-z0-9_-]*$/,nd=/^\+[1-9]\d{6,14}$/,Xa="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",od=new RegExp(`^${Xa}$`);function el(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function rd(e){return new RegExp(`^${el(e)}$`)}function id(e){const t=el({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${Xa}T(?:${o})$`)}const sd=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},ad=/^-?\d+$/,tl=/^-?\d+(?:\.\d+)?$/,ld=/^[^A-Z]*$/,cd=/^[^a-z]*$/,Oe=A("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),nl={number:"number",bigint:"bigint",object:"date"},ol=A("$ZodCheckLessThan",(e,t)=>{Oe.init(e,t);const n=nl[typeof t.value];e._zod.onattach.push(o=>{const r=o._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),rl=A("$ZodCheckGreaterThan",(e,t)=>{Oe.init(e,t);const n=nl[typeof t.value];e._zod.onattach.push(o=>{const r=o._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ud=A("$ZodCheckMultipleOf",(e,t)=>{Oe.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):hm(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),md=A("$ZodCheckNumberFormat",(e,t)=>{Oe.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),o=n?"int":"number",[r,i]=vm[t.format];e._zod.onattach.push(s=>{const a=s._zod.bag;a.format=t.format,a.minimum=r,a.maximum=i,n&&(a.pattern=ad)}),e._zod.check=s=>{const a=s.value;if(n){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}a<r&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),dd=A("$ZodCheckMaxLength",(e,t)=>{var n;Oe.init(e,t),(n=e._zod.def).when??(n.when=o=>{const r=o.value;return!Hr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{const r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{const r=o.value;if(r.length<=t.maximum)return;const s=Wr(r);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),pd=A("$ZodCheckMinLength",(e,t)=>{var n;Oe.init(e,t),(n=e._zod.def).when??(n.when=o=>{const r=o.value;return!Hr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{const r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const r=o.value;if(r.length>=t.minimum)return;const s=Wr(r);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),fd=A("$ZodCheckLengthEquals",(e,t)=>{var n;Oe.init(e,t),(n=e._zod.def).when??(n.when=o=>{const r=o.value;return!Hr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{const r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=o=>{const r=o.value,i=r.length;if(i===t.length)return;const s=Wr(r),a=i>t.length;o.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Uo=A("$ZodCheckStringFormat",(e,t)=>{var n,o;Oe.init(e,t),e._zod.onattach.push(r=>{const i=r._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),hd=A("$ZodCheckRegex",(e,t)=>{Uo.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),yd=A("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ld),Uo.init(e,t)}),gd=A("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=cd),Uo.init(e,t)}),bd=A("$ZodCheckIncludes",(e,t)=>{Oe.init(e,t);const n=Gt(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),wd=A("$ZodCheckStartsWith",(e,t)=>{Oe.init(e,t);const n=new RegExp(`^${Gt(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),vd=A("$ZodCheckEndsWith",(e,t)=>{Oe.init(e,t);const n=new RegExp(`.*${Gt(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}}),Sd=A("$ZodCheckOverwrite",(e,t)=>{Oe.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Cd{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const o=t.split(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),ie=require("react"),fo=require("react-i18next"),y=require("antd"),ve=require("@ant-design/icons"),Be=require("i18next"),Na=ie.createContext(null);function Kc({value:e,children:t}){return f.jsx(Na.Provider,{value:e,children:t})}const Qc=[{prefix:"companyInfo",page:"declaration"},{prefix:"questions",page:"declaration"},{prefix:"questionComments",page:"declaration"},{prefix:"companyQuestions",page:"declaration"},{prefix:"smelterList",page:"smelter-list"},{prefix:"mineList",page:"mine-list"},{prefix:"productList",page:"product-list"}];function Uc(e){const t=e.split(".")[0];return Qc.find(o=>o.prefix===t)?.page??"declaration"}function Eo(){return ie.useContext(Na)}function Po(e,t,n){if(!e.includes(t))throw new Error(`Unknown ${n} version: ${t}`)}function Do(e){const t=new Map;return e.forEach(n=>{t.set(n.id,n)}),t}const Gc=[{key:"aluminum",labelKey:"minerals.aluminum"},{key:"copper",labelKey:"minerals.copper"},{key:"lithium",labelKey:"minerals.lithium"},{key:"nickel",labelKey:"minerals.nickel"},{key:"silver",labelKey:"minerals.silver"},{key:"chromium",labelKey:"minerals.chromium"},{key:"zinc",labelKey:"minerals.zinc"}],Yc=["铝","铬","铜","锂","镍","银","锌"],Zc=["Aluminium","Copper","Lithium","Nickel","Silver","Chromium","Zinc"],Hc=[{key:"aluminum",labelKey:"minerals.aluminum"},{key:"chromium",labelKey:"minerals.chromium"},{key:"copper",labelKey:"minerals.copper"},{key:"lithium",labelKey:"minerals.lithium"},{key:"nickel",labelKey:"minerals.nickel"},{key:"silver",labelKey:"minerals.silver"},{key:"zinc",labelKey:"minerals.zinc"}],Vc=[{key:"aluminum",labelKey:"minerals.aluminum"},{key:"iridium",labelKey:"minerals.iridium"},{key:"lime",labelKey:"minerals.lime"},{key:"manganese",labelKey:"minerals.manganese"},{key:"palladium",labelKey:"minerals.palladium"},{key:"platinum",labelKey:"minerals.platinum"},{key:"rareEarthElements",labelKey:"minerals.rareEarthElements"},{key:"rhodium",labelKey:"minerals.rhodium"},{key:"ruthenium",labelKey:"minerals.ruthenium"},{key:"silver",labelKey:"minerals.silver"},{key:"sodaAsh",labelKey:"minerals.sodaAsh"},{key:"zinc",labelKey:"minerals.zinc"},{key:"other",labelKey:"minerals.other"}],Wc=[{value:"Yes",labelKey:"options.yes"},{value:"No",labelKey:"options.no"}],Jc=[...Wc,{value:"Unknown",labelKey:"options.unknown"},{value:"Not declaring",labelKey:"options.notDeclaring"}],Xc=[{value:"1",labelKey:"options.percentageOne"},{value:"Greater than 90%",labelKey:"options.percentageAbove90"},{value:"Greater than 75%",labelKey:"options.percentageAbove75"},{value:"Greater than 50%",labelKey:"options.percentageAbove50"},{value:"50% or less",labelKey:"options.percentage50OrLess"},{value:"None",labelKey:"options.none"},{value:"Unknown",labelKey:"options.unknown"},{value:"Did not survey",labelKey:"options.didNotSurvey"}],eu=[{key:"Q1",labelKey:"questions.amrt.q1",options:Jc,perMineral:!0},{key:"Q2",labelKey:"questions.amrt.q2",options:Xc,perMineral:!0}],tu=[{key:"companyName",labelKey:"fields.companyName",type:"text",required:!0},{key:"declarationScope",labelKey:"fields.reportingScope",type:"select",required:!0},{key:"scopeDescription",labelKey:"fields.scopeDescription",type:"textarea",required:"conditional"},{key:"companyId",labelKey:"fields.companyId",type:"text",required:!1},{key:"companyAuthId",labelKey:"fields.companyAuthId",type:"text",required:!1},{key:"address",labelKey:"fields.address",type:"text",required:!0},{key:"contactName",labelKey:"fields.contactName",type:"text",required:!0},{key:"contactEmail",labelKey:"fields.contactEmail",type:"email",required:!0},{key:"contactPhone",labelKey:"fields.contactPhone",type:"text",required:!0},{key:"authorizerName",labelKey:"fields.authorizerName",type:"text",required:!0},{key:"authorizerTitle",labelKey:"fields.authorizerTitle",type:"text",required:!1},{key:"authorizerEmail",labelKey:"fields.authorizerEmail",type:"email",required:!0},{key:"authorizerPhone",labelKey:"fields.authorizerPhone",type:"text",required:!1},{key:"authorizationDate",labelKey:"fields.authorizationDate",type:"date",required:!0}];function nu(e){return[...e.instructionsFirst?[{key:"instructions",labelKey:"tabs.instructions",available:!0},{key:"revision",labelKey:"tabs.revision",available:!0}]:[{key:"revision",labelKey:"tabs.revision",available:!0},{key:"instructions",labelKey:"tabs.instructions",available:!0}],{key:"definitions",labelKey:"tabs.definitions",available:!0},{key:"declaration",labelKey:"tabs.declaration",available:!0},{key:"minerals-scope",labelKey:"tabs.mineralsScope",available:!0},{key:"smelter-list",labelKey:"tabs.smelterList",available:!0},{key:"mine-list",labelKey:"tabs.mineList",available:!0},{key:"product-list",labelKey:"tabs.productList",available:!0},{key:"smelter-lookup",labelKey:"tabs.smelterLookup",available:e.hasLookup},{key:"checker",labelKey:"tabs.checker",available:!0}]}function ou(e){return{templateType:"amrt",version:{id:e.id,label:e.id},pages:nu(e.pages),mineralScope:{mode:e.mineralScope.mode,minerals:e.mineralScope.minerals,maxCount:10,defaultCustomMinerals:e.mineralScope.defaultCustomMinerals,otherSlotCount:e.mineralScope.otherSlotCount},companyInfoFields:tu,questions:eu,companyQuestions:[],gating:{q2Gating:{type:"q1-not-negatives",negatives:["No","Unknown","Not declaring"]},laterQuestionsGating:{type:"always"},companyQuestionsGating:{type:"always"},smelterListGating:{type:"q1-yes"}},smelterList:{metalDropdownSource:{type:"dynamic-active"},hasIdColumn:e.smelterList.hasIdColumn,hasLookup:e.smelterList.hasLookup,hasCombinedColumn:e.smelterList.hasCombinedColumn,notListedRequireNameCountry:!0,notYetIdentifiedCountryDefault:e.smelterList.notYetIdentifiedCountryDefault,recycledScrapOptions:e.smelterList.recycledScrapOptions},mineList:{available:!0,metalDropdownSource:{type:"dynamic-active"},smelterNameMode:e.mineList.smelterNameMode},productList:{hasRequesterColumns:e.productList.hasRequesterColumns,productNumberLabelKey:"productList.amrt.manufacturerNumber",productNameLabelKey:"productList.amrt.manufacturerName",commentLabelKey:"productList.amrt.comment"},dateConfig:{minDate:"2006-12-31",maxDate:"2026-03-31"}}}const La=["1.1","1.2","1.3"],ru="1.3",iu=La.map(e=>({id:e,label:e})),su={id:"1.1",mineralScope:{mode:"free-text",minerals:Gc,defaultCustomMinerals:Zc},pages:{instructionsFirst:!0,hasLookup:!1},smelterList:{hasIdColumn:!1,hasLookup:!1,hasCombinedColumn:!1,notYetIdentifiedCountryDefault:"Unknown",recycledScrapOptions:"yes-no-unknown"},mineList:{smelterNameMode:"manual"},productList:{hasRequesterColumns:!1}},au={id:"1.2",mineralScope:{mode:"free-text",minerals:Hc,defaultCustomMinerals:Yc},pages:{instructionsFirst:!0,hasLookup:!1},smelterList:{hasIdColumn:!1,hasLookup:!1,hasCombinedColumn:!1,notYetIdentifiedCountryDefault:"Unknown",recycledScrapOptions:"yes-no-unknown"},mineList:{smelterNameMode:"manual"},productList:{hasRequesterColumns:!1}},lu={id:"1.3",mineralScope:{mode:"dynamic-dropdown",minerals:Vc,otherSlotCount:12},pages:{instructionsFirst:!1,hasLookup:!0},smelterList:{hasIdColumn:!0,hasLookup:!0,hasCombinedColumn:!0,notYetIdentifiedCountryDefault:"",recycledScrapOptions:"yes-no"},mineList:{smelterNameMode:"dropdown"},productList:{hasRequesterColumns:!0}},cu={"1.1":su,"1.2":au,"1.3":lu},uu=Do(Object.values(cu)),mu={type:"amrt",name:"AMRT",fullNameKey:"templates.amrt_full",versions:iu,defaultVersion:ru};function du(e){Po(La,e,"AMRT");const t=uu.get(e);if(!t)throw new Error(`Missing AMRT version config: ${e}`);return ou(t)}const Mi=[{key:"tantalum",labelKey:"minerals.tantalum"},{key:"tin",labelKey:"minerals.tin"},{key:"gold",labelKey:"minerals.gold"},{key:"tungsten",labelKey:"minerals.tungsten"}],Ze=[{value:"Yes",labelKey:"options.yes"},{value:"No",labelKey:"options.no"}],ar=[...Ze,{value:"Unknown",labelKey:"options.unknown"}],pu=[{value:"Yes, in conformance with IPC1755 (e.g., CMRT)",labelKey:"options.yesIpc1755"},{value:"Yes, using other format (describe)",labelKey:"options.yesOtherFormat"},{value:"No",labelKey:"options.no"}],fu=[{value:"Yes, with the SEC",labelKey:"options.yesWithSec"},{value:"Yes, with the EU",labelKey:"options.yesWithEu"},{value:"Yes, with the SEC and the EU",labelKey:"options.yesWithSecAndEu"},{value:"No",labelKey:"options.no"}],Ur=[{value:"1",labelKey:"options.percentageOne"},{value:"Greater than 90%",labelKey:"options.percentageAbove90"},{value:"Greater than 75%",labelKey:"options.percentageAbove75"},{value:"Greater than 50%",labelKey:"options.percentageAbove50"},{value:"50% or less",labelKey:"options.percentage50OrLess"},{value:"None",labelKey:"options.none"}],Gr=[{value:"100%",labelKey:"options.percentage100"},{value:"Greater than 90%",labelKey:"options.percentageAbove90"},{value:"Greater than 75%",labelKey:"options.percentageAbove75"},{value:"Greater than 50%",labelKey:"options.percentageAbove50"},{value:"50% or less",labelKey:"options.percentage50OrLess"},{value:"None",labelKey:"options.none"}];function hu(e){return[{key:"Q1",labelKey:"questions.cmrt.q1",options:Ze,perMineral:!0},{key:"Q2",labelKey:"questions.cmrt.q2",options:Ze,perMineral:!0},{key:"Q3",labelKey:"questions.cmrt.q3",options:ar,perMineral:!0},{key:"Q4",labelKey:"questions.cmrt.q4",options:ar,perMineral:!0},{key:"Q5",labelKey:"questions.cmrt.q5",options:ar,perMineral:!0},{key:"Q6",labelKey:"questions.cmrt.q6",options:e,perMineral:!0},{key:"Q7",labelKey:"questions.cmrt.q7",options:Ze,perMineral:!0},{key:"Q8",labelKey:"questions.cmrt.q8",options:Ze,perMineral:!0}]}const yu=[{key:"A",labelKey:"companyQuestions.cmrt.a",options:Ze,hasCommentField:!0},{key:"B",labelKey:"companyQuestions.cmrt.b",options:Ze,hasCommentField:!0,commentLabelKey:"companyQuestions.cmrt.b_comment",commentRequiredWhen:["Yes"]},{key:"C",labelKey:"companyQuestions.cmrt.c",options:Ze,hasCommentField:!0},{key:"D",labelKey:"companyQuestions.cmrt.d",options:Ze,hasCommentField:!0},{key:"E",labelKey:"companyQuestions.cmrt.e",options:pu,hasCommentField:!0,commentLabelKey:"companyQuestions.cmrt.e_comment",commentRequiredWhen:["Yes, using other format (describe)"]},{key:"F",labelKey:"companyQuestions.cmrt.f",options:Ze,hasCommentField:!0},{key:"G",labelKey:"companyQuestions.cmrt.g",options:Ze,hasCommentField:!0},{key:"H",labelKey:"companyQuestions.cmrt.h",options:fu,hasCommentField:!0}],gu=[{key:"companyName",labelKey:"fields.companyName",type:"text",required:!0},{key:"declarationScope",labelKey:"fields.reportingScope",type:"select",required:!0},{key:"scopeDescription",labelKey:"fields.scopeDescription",type:"textarea",required:"conditional"},{key:"companyId",labelKey:"fields.companyId",type:"text",required:!1},{key:"companyAuthId",labelKey:"fields.companyAuthId",type:"text",required:!1},{key:"address",labelKey:"fields.address",type:"text",required:!1},{key:"contactName",labelKey:"fields.contactName",type:"text",required:!0},{key:"contactEmail",labelKey:"fields.contactEmail",type:"email",required:!0},{key:"contactPhone",labelKey:"fields.contactPhone",type:"text",required:!0},{key:"authorizerName",labelKey:"fields.authorizerName",type:"text",required:!0},{key:"authorizerTitle",labelKey:"fields.authorizerTitle",type:"text",required:!1},{key:"authorizerEmail",labelKey:"fields.authorizerEmail",type:"email",required:!0},{key:"authorizerPhone",labelKey:"fields.authorizerPhone",type:"text",required:!1},{key:"authorizationDate",labelKey:"fields.authorizationDate",type:"date",required:!0}],bu=[{key:"revision",labelKey:"tabs.revision",available:!0},{key:"instructions",labelKey:"tabs.instructions",available:!0},{key:"definitions",labelKey:"tabs.definitions",available:!0},{key:"declaration",labelKey:"tabs.declaration",available:!0},{key:"smelter-list",labelKey:"tabs.smelterList",available:!0},{key:"product-list",labelKey:"tabs.productList",available:!0},{key:"smelter-lookup",labelKey:"tabs.smelterLookup",available:!0},{key:"checker",labelKey:"tabs.checker",available:!0}];function wu(e){return{templateType:"cmrt",version:{id:e.id,label:e.id},pages:bu,mineralScope:{mode:"fixed",minerals:Mi},companyInfoFields:gu,questions:hu(e.q6Options),companyQuestions:yu,gating:{q2Gating:{type:"q1-not-no"},laterQuestionsGating:{type:"q1q2-not-no"},companyQuestionsGating:{type:"q1q2-not-no"},smelterListGating:{type:"q1q2-not-no"}},smelterList:{metalDropdownSource:{type:"fixed",metals:Mi},hasIdColumn:!0,hasLookup:!0,hasCombinedColumn:!1,notListedRequireNameCountry:e.smelterList.notListedRequireNameCountry,notYetIdentifiedCountryDefault:"Unknown",notYetIdentifiedCountryByMetal:e.smelterList.notYetIdentifiedCountryByMetal},mineList:{available:!1},productList:{hasRequesterColumns:!1,productNumberLabelKey:e.productList.productNumberLabelKey,productNameLabelKey:e.productList.productNameLabelKey,commentLabelKey:"productList.cmrt.comment"},dateConfig:{minDate:"2006-12-31",maxDate:e.dateConfig.maxDate}}}const qa=["6.01","6.1","6.22","6.31","6.4","6.5"],vu="6.5",Su=qa.map(e=>({id:e,label:e})),Cu={id:"6.01",q6Options:Ur,productList:{productNumberLabelKey:"productList.cmrt.manufacturerNumber",productNameLabelKey:"productList.cmrt.manufacturerName"},smelterList:{notListedRequireNameCountry:!0},dateConfig:{maxDate:"2026-03-31"}},ku={id:"6.1",q6Options:Ur,productList:{productNumberLabelKey:"productList.cmrt.manufacturerNumber",productNameLabelKey:"productList.cmrt.manufacturerName"},smelterList:{notListedRequireNameCountry:!0},dateConfig:{maxDate:"2026-03-31"}},Tu={id:"6.22",q6Options:Ur,productList:{productNumberLabelKey:"productList.cmrt.manufacturerNumber",productNameLabelKey:"productList.cmrt.manufacturerName"},smelterList:{notListedRequireNameCountry:!1},dateConfig:{maxDate:"2026-03-31"}},xu={id:"6.31",q6Options:Gr,productList:{productNumberLabelKey:"productList.cmrt.manufacturerNumber",productNameLabelKey:"productList.cmrt.manufacturerName"},smelterList:{notListedRequireNameCountry:!1},dateConfig:{}},_u={id:"6.4",q6Options:Gr,productList:{productNumberLabelKey:"productList.cmrt.manufacturerNumber",productNameLabelKey:"productList.cmrt.manufacturerName"},smelterList:{notListedRequireNameCountry:!1},dateConfig:{}},Iu={id:"6.5",q6Options:Gr,productList:{productNumberLabelKey:"productList.cmrt.respondentNumber",productNameLabelKey:"productList.cmrt.respondentName"},smelterList:{notListedRequireNameCountry:!1,notYetIdentifiedCountryByMetal:{tungsten:""}},dateConfig:{}},Ru={"6.01":Cu,"6.1":ku,"6.22":Tu,"6.31":xu,"6.4":_u,"6.5":Iu},Mu=Do(Object.values(Ru)),Nu={type:"cmrt",name:"CMRT",fullNameKey:"templates.cmrt_full",versions:Su,defaultVersion:vu};function Lu(e){Po(qa,e,"CMRT");const t=Mu.get(e);if(!t)throw new Error(`Missing CMRT version config: ${e}`);return wu(t)}const Ni=[{key:"cobalt",labelKey:"minerals.cobalt"}],it=[{value:"Yes",labelKey:"options.yes"},{value:"No",labelKey:"options.no"}],xn=[...it,{value:"Unknown",labelKey:"options.unknown"}],qu=xn,Au=[{value:"Yes",labelKey:"options.yes"},{value:"No",labelKey:"options.no"},{value:"Unknown",labelKey:"options.unknown"},{value:"DRC or adjoining countries only",labelKey:"options.drcOrAdjoiningOnly"}];function Eu(e){return[{key:"Q1",labelKey:"questions.crt.q1",options:xn,perMineral:!1},{key:"Q2",labelKey:"questions.crt.q2",options:e,perMineral:!1},{key:"Q3",labelKey:"questions.crt.q3",options:xn,perMineral:!1},{key:"Q4",labelKey:"questions.crt.q4",options:[{value:"1",labelKey:"options.percentage100"},{value:"Greater than 90%",labelKey:"options.percentageAbove90"},{value:"Greater than 75%",labelKey:"options.percentageAbove75"},{value:"Greater than 50%",labelKey:"options.percentageAbove50"},{value:"50% or less",labelKey:"options.percentage50OrLess"},{value:"None",labelKey:"options.none"}],perMineral:!1},{key:"Q5",labelKey:"questions.crt.q5",options:xn,perMineral:!1},{key:"Q6",labelKey:"questions.crt.q6",options:xn,perMineral:!1}]}function Pu(e){return[{key:"A",labelKey:"companyQuestions.crt.a",options:it,hasCommentField:!0,commentLabelKey:"companyQuestions.crt.a_comment",commentRequiredWhen:["Yes"]},{key:"B",labelKey:"companyQuestions.crt.b",options:it,hasCommentField:!0},{key:"C",labelKey:"companyQuestions.crt.c",options:it,hasCommentField:!0},{key:"D",labelKey:"companyQuestions.crt.d",options:it,hasCommentField:!0},{key:"E",labelKey:"companyQuestions.crt.e",options:it,hasCommentField:!0},{key:"F",labelKey:"companyQuestions.crt.f",options:it,hasCommentField:!0},{key:"G",labelKey:"companyQuestions.crt.g",options:e.companyQuestionsGOptions,hasCommentField:!0,commentLabelKey:"companyQuestions.crt.g_comment",commentRequiredWhen:e.companyQuestionsGCommentRequiredWhen},{key:"H",labelKey:"companyQuestions.crt.h",options:it,hasCommentField:!0},{key:"I",labelKey:"companyQuestions.crt.i",options:it,hasCommentField:!0}]}const Du=[{key:"companyName",labelKey:"fields.companyName",type:"text",required:!0},{key:"declarationScope",labelKey:"fields.reportingScope",type:"select",required:!0},{key:"scopeDescription",labelKey:"fields.scopeDescription",type:"textarea",required:"conditional"},{key:"companyId",labelKey:"fields.companyId",type:"text",required:!1},{key:"companyAuthId",labelKey:"fields.companyAuthId",type:"text",required:!1},{key:"address",labelKey:"fields.address",type:"text",required:!1},{key:"contactName",labelKey:"fields.contactName",type:"text",required:!0},{key:"contactEmail",labelKey:"fields.contactEmail",type:"email",required:!0},{key:"contactPhone",labelKey:"fields.contactPhone",type:"text",required:!0},{key:"authorizerName",labelKey:"fields.authorizerName",type:"text",required:!0},{key:"authorizerTitle",labelKey:"fields.authorizerTitle",type:"text",required:!1},{key:"authorizerEmail",labelKey:"fields.authorizerEmail",type:"email",required:!0},{key:"authorizerPhone",labelKey:"fields.authorizerPhone",type:"text",required:!1},{key:"authorizationDate",labelKey:"fields.authorizationDate",type:"date",required:!0}],$u=[{key:"instructions",labelKey:"tabs.instructions",available:!0},{key:"revision",labelKey:"tabs.revision",available:!0},{key:"definitions",labelKey:"tabs.definitions",available:!0},{key:"declaration",labelKey:"tabs.declaration",available:!0},{key:"smelter-list",labelKey:"tabs.smelterList",available:!0},{key:"product-list",labelKey:"tabs.productList",available:!0},{key:"smelter-lookup",labelKey:"tabs.smelterLookup",available:!0},{key:"checker",labelKey:"tabs.checker",available:!0}];function Ou(e){return{templateType:"crt",version:{id:e.id,label:e.id},pages:$u,mineralScope:{mode:"fixed",minerals:Ni},companyInfoFields:Du,questions:Eu(e.q2Options),companyQuestions:Pu(e),gating:{q2Gating:{type:"q1-not-negatives",negatives:["No","Unknown"]},laterQuestionsGating:{type:"q1-not-negatives",negatives:["No","Unknown"]},companyQuestionsGating:{type:"q1-not-negatives",negatives:["No","Unknown"]},smelterListGating:{type:"q1-not-negatives",negatives:["No","Unknown"]}},smelterList:{metalDropdownSource:{type:"fixed",metals:Ni},hasIdColumn:!0,hasLookup:!0,hasCombinedColumn:!1,notListedRequireNameCountry:!0,notYetIdentifiedCountryDefault:"Unknown"},mineList:{available:!1},productList:{hasRequesterColumns:!1,productNumberLabelKey:"productList.crt.manufacturerNumber",productNameLabelKey:"productList.crt.manufacturerName",commentLabelKey:"productList.crt.comment"},dateConfig:{minDate:"2006-12-31",maxDate:"2026-03-31"}}}const Aa=["2.2","2.21"],Fu="2.21",zu=Aa.map(e=>({id:e,label:e})),ju={id:"2.2",q2Options:qu,companyQuestionsGOptions:[{value:"Yes, CRT",labelKey:"options.yesCrtTemplate"},{value:"Yes, Using Other Format (Describe)",labelKey:"options.yesOtherFormatTitle"},{value:"No",labelKey:"options.no"}],companyQuestionsGCommentRequiredWhen:["Yes, Using Other Format (Describe)"]},Bu={id:"2.21",q2Options:Au,companyQuestionsGOptions:[{value:"Yes, CRT",labelKey:"options.yesCrtTemplate"},{value:"Yes, Using Other Format (Describe)",labelKey:"options.yesOtherFormatTitle"},{value:"No",labelKey:"options.no"}],companyQuestionsGCommentRequiredWhen:["Yes, Using Other Format (Describe)"]},Ku={"2.2":ju,"2.21":Bu},Qu=Do(Object.values(Ku)),Uu={type:"crt",name:"CRT",fullNameKey:"templates.crt_full",versions:zu,defaultVersion:Fu};function Gu(e){Po(Aa,e,"CRT");const t=Qu.get(e);if(!t)throw new Error(`Missing CRT version config: ${e}`);return Ou(t)}const ft=[{key:"cobalt",labelKey:"minerals.cobalt"},{key:"mica",labelKey:"minerals.mica"}],Ea=[{key:"cobalt",labelKey:"minerals.cobalt"},{key:"copper",labelKey:"minerals.copper"},{key:"graphite",labelKey:"minerals.graphite"},{key:"lithium",labelKey:"minerals.lithium"},{key:"mica",labelKey:"minerals.mica"},{key:"nickel",labelKey:"minerals.nickel"}],Pa=[{value:"Yes",labelKey:"options.yes"},{value:"No",labelKey:"options.no"}],me=Pa,On=[...Pa,{value:"Unknown",labelKey:"options.unknown"}],$o=[...On,{value:"Not applicable for this declaration",labelKey:"options.notApplicableForDeclaration"}],Da=[...On,{value:"Not declaring",labelKey:"options.notDeclaring"}],he=On,Oo=[...On,{value:"DRC only",labelKey:"options.drcOnly"}],Fo=[...On,{value:"India and/or Madagascar only",labelKey:"options.indiaMadagascarOnly"}],zo=[{value:"1",labelKey:"options.percentageOne"},{value:"Greater than 90%",labelKey:"options.percentageAbove90"},{value:"Greater than 75%",labelKey:"options.percentageAbove75"},{value:"Greater than 50%",labelKey:"options.percentageAbove50"},{value:"50% or less",labelKey:"options.percentage50OrLess"},{value:"None",labelKey:"options.none"}],$a=[{value:"100%",labelKey:"options.percentage100"},{value:"Greater than 90%",labelKey:"options.percentageAbove90"},{value:"Greater than 75%",labelKey:"options.percentageAbove75"},{value:"Greater than 50%",labelKey:"options.percentageAbove50"},{value:"50% or less",labelKey:"options.percentage50OrLess"},{value:"None",labelKey:"options.none"},{value:"Did not survey",labelKey:"options.didNotSurvey"}],Oa=[{value:"Yes",labelKey:"options.yes"},{value:"Yes, when more processors are validated",labelKey:"options.yesWhenMoreValidated"},{value:"No",labelKey:"options.no"}],Jt=[{value:"Yes, in conformance with IPC1755 (e.g. EMRT)",labelKey:"options.yesIpc1755Emrt"},{value:"Yes, Using Other Format (Describe)",labelKey:"options.yesOtherFormatTitle"},{value:"No",labelKey:"options.no"}],jo={Q1:"questions.emrt.v1.q1",Q2:"questions.emrt.v1.q2",Q3:"questions.emrt.v1.q3",Q4:"questions.emrt.v1.q4",Q5:"questions.emrt.v1.q5",Q6:"questions.emrt.v1.q6",Q7:"questions.emrt.v1.q7"},Fa={Q1:"questions.emrt.q1",Q2:"questions.emrt.q2",Q3:"questions.emrt.q3",Q4:"questions.emrt.q4",Q5:"questions.emrt.q5",Q6:"questions.emrt.q6",Q7:"questions.emrt.q7"},Yu={A:"companyQuestions.emrt.v11.a",B:"companyQuestions.emrt.v11.b",C:"companyQuestions.emrt.v11.c",D:"companyQuestions.emrt.v11.d",E:"companyQuestions.emrt.v11.e",F:"companyQuestions.emrt.v11.f",G:"companyQuestions.emrt.v11.g"},Yr={A:"companyQuestions.emrt.a",B:"companyQuestions.emrt.b",C:"companyQuestions.emrt.v1.c",D:"companyQuestions.emrt.d",E:"companyQuestions.emrt.v1.e",F:"companyQuestions.emrt.f",G:"companyQuestions.emrt.g"},za={A:"companyQuestions.emrt.a",B:"companyQuestions.emrt.b",C:"companyQuestions.emrt.c",D:"companyQuestions.emrt.d",E:"companyQuestions.emrt.e",F:"companyQuestions.emrt.f",G:"companyQuestions.emrt.g"},Zu=[{key:"companyName",labelKey:"fields.companyName",type:"text",required:!0},{key:"declarationScope",labelKey:"fields.reportingScope",type:"select",required:!0},{key:"scopeDescription",labelKey:"fields.scopeDescription",type:"textarea",required:"conditional"},{key:"companyId",labelKey:"fields.companyId",type:"text",required:!1},{key:"companyAuthId",labelKey:"fields.companyAuthId",type:"text",required:!1},{key:"address",labelKey:"fields.address",type:"text",required:!1},{key:"contactName",labelKey:"fields.contactName",type:"text",required:!0},{key:"contactEmail",labelKey:"fields.contactEmail",type:"email",required:!0},{key:"contactPhone",labelKey:"fields.contactPhone",type:"text",required:!0},{key:"authorizerName",labelKey:"fields.authorizerName",type:"text",required:!0},{key:"authorizerTitle",labelKey:"fields.authorizerTitle",type:"text",required:!1},{key:"authorizerEmail",labelKey:"fields.authorizerEmail",type:"email",required:!0},{key:"authorizerPhone",labelKey:"fields.authorizerPhone",type:"text",required:!1},{key:"authorizationDate",labelKey:"fields.authorizationDate",type:"date",required:!0}];function Hu(e){const t=e.questionOptions;return[{key:"Q1",labelKey:e.questionLabelKeys.Q1,options:t.q1,perMineral:!0},{key:"Q2",labelKey:e.questionLabelKeys.Q2,options:t.q2,perMineral:!0},{key:"Q3",labelKey:e.questionLabelKeys.Q3,options:t.q3,optionsByMineral:t.q3ByMineral,perMineral:!0},{key:"Q4",labelKey:e.questionLabelKeys.Q4,options:t.q4,perMineral:!0},{key:"Q5",labelKey:e.questionLabelKeys.Q5,options:t.q5,perMineral:!0},{key:"Q6",labelKey:e.questionLabelKeys.Q6,options:t.q6,perMineral:!0},{key:"Q7",labelKey:e.questionLabelKeys.Q7,options:t.q7,perMineral:!0}]}function Vu(e){const t=o=>e.companyLabelKeys[o],n=e.companyOptions;return[{key:"A",labelKey:t("A"),options:n.A,hasCommentField:!0},{key:"B",labelKey:t("B"),options:n.B,hasCommentField:!0,commentLabelKey:n.BCommentLabelKey,commentRequiredWhen:n.BCommentRequiredWhen??[]},{key:"C",labelKey:t("C"),options:n.C,perMineral:!0,hasCommentField:!0},{key:"D",labelKey:t("D"),options:n.D,hasCommentField:!0},{key:"E",labelKey:t("E"),options:n.E,hasCommentField:!0,commentLabelKey:"companyQuestions.emrt.e_comment",commentRequiredWhen:["Yes, Using Other Format (Describe)"]},{key:"F",labelKey:t("F"),options:n.F,hasCommentField:!0},{key:"G",labelKey:t("G"),options:n.G,hasCommentField:!0}]}function Wu(e){return[...e.instructionsFirst?[{key:"instructions",labelKey:"tabs.instructions",available:!0},{key:"revision",labelKey:"tabs.revision",available:!0}]:[{key:"revision",labelKey:"tabs.revision",available:!0},{key:"instructions",labelKey:"tabs.instructions",available:!0}],{key:"definitions",labelKey:"tabs.definitions",available:!0},{key:"declaration",labelKey:"tabs.declaration",available:!0},{key:"smelter-list",labelKey:"tabs.smelterList",available:!0},{key:"mine-list",labelKey:"tabs.mineList",available:e.hasMineList},{key:"product-list",labelKey:"tabs.productList",available:!0},{key:"smelter-lookup",labelKey:"tabs.smelterLookup",available:!0},{key:"checker",labelKey:"tabs.checker",available:!0}]}function Ju(e){const t=e.gating.q1Negatives;return{templateType:"emrt",version:{id:e.id,label:e.id},pages:Wu(e.pages),mineralScope:{mode:e.mineralScopeMode,minerals:e.minerals},companyInfoFields:Zu,questions:Hu(e),companyQuestions:Vu(e),gating:{q2Gating:{type:"q1-not-negatives",negatives:t},laterQuestionsGating:{type:"q1-not-negatives-and-q2-not-negatives",q1Negatives:t,q2Negatives:["No","Unknown"]},companyQuestionsGating:{type:"q1-not-negatives-and-q2-not-negatives",q1Negatives:t,q2Negatives:["No","Unknown"]},smelterListGating:{type:"q1-not-negatives-and-q2-not-negatives",q1Negatives:t,q2Negatives:["No","Unknown"]}},smelterList:{metalDropdownSource:e.smelterList.metalDropdownSource,hasIdColumn:!0,hasLookup:!0,hasCombinedColumn:e.smelterList.hasCombinedColumn,notListedRequireNameCountry:!0,notYetIdentifiedCountryDefault:""},mineList:{available:e.mineList.available,metalDropdownSource:e.mineList.metalDropdownSource,smelterNameMode:e.mineList.smelterNameMode},productList:{hasRequesterColumns:e.productList.hasRequesterColumns,productNumberLabelKey:"productList.emrt.respondentNumber",productNameLabelKey:"productList.emrt.respondentName",commentLabelKey:"productList.emrt.comment"},dateConfig:{minDate:"2006-12-31",maxDate:"2026-03-31"}}}const ja=["1.1","1.11","1.2","1.3","2.0","2.1"],Xu="2.1",em=ja.map(e=>({id:e,label:e})),tm={id:"1.1",minerals:ft,mineralScopeMode:"fixed",questionLabelKeys:jo,questionOptions:{q1:$o,q2:he,q3:he,q3ByMineral:{cobalt:Oo,mica:Fo},q4:he,q5:zo,q6:he,q7:he},companyLabelKeys:Yu,companyOptions:{A:me,B:me,BCommentLabelKey:void 0,BCommentRequiredWhen:[],C:me,D:me,E:Jt,F:me,G:me},gating:{q1Negatives:["No","Unknown","Not applicable for this declaration"]},pages:{instructionsFirst:!0,hasMineList:!1},smelterList:{metalDropdownSource:{type:"fixed",metals:ft},hasCombinedColumn:!1},mineList:{available:!1,smelterNameMode:"manual"},productList:{hasRequesterColumns:!1}},nm={id:"1.11",minerals:ft,mineralScopeMode:"fixed",questionLabelKeys:jo,questionOptions:{q1:$o,q2:he,q3:he,q3ByMineral:{cobalt:Oo,mica:Fo},q4:he,q5:zo,q6:he,q7:he},companyLabelKeys:Yr,companyOptions:{A:me,B:me,BCommentLabelKey:"companyQuestions.emrt.b_comment",BCommentRequiredWhen:["Yes"],C:me,D:me,E:Jt,F:me,G:me},gating:{q1Negatives:["No","Unknown","Not applicable for this declaration"]},pages:{instructionsFirst:!0,hasMineList:!1},smelterList:{metalDropdownSource:{type:"fixed",metals:ft},hasCombinedColumn:!1},mineList:{available:!1,smelterNameMode:"manual"},productList:{hasRequesterColumns:!1}},om={id:"1.2",minerals:ft,mineralScopeMode:"fixed",questionLabelKeys:jo,questionOptions:{q1:$o,q2:he,q3:he,q3ByMineral:{cobalt:Oo,mica:Fo},q4:he,q5:zo,q6:he,q7:he},companyLabelKeys:Yr,companyOptions:{A:me,B:me,BCommentLabelKey:"companyQuestions.emrt.b_comment",BCommentRequiredWhen:["Yes"],C:me,D:me,E:Jt,F:me,G:me},gating:{q1Negatives:["No","Unknown","Not applicable for this declaration"]},pages:{instructionsFirst:!0,hasMineList:!1},smelterList:{metalDropdownSource:{type:"fixed",metals:ft},hasCombinedColumn:!1},mineList:{available:!1,smelterNameMode:"manual"},productList:{hasRequesterColumns:!1}},rm={id:"1.3",minerals:ft,mineralScopeMode:"fixed",questionLabelKeys:jo,questionOptions:{q1:$o,q2:he,q3:he,q3ByMineral:{cobalt:Oo,mica:Fo},q4:he,q5:zo,q6:he,q7:he},companyLabelKeys:Yr,companyOptions:{A:me,B:me,BCommentLabelKey:"companyQuestions.emrt.b_comment",BCommentRequiredWhen:["Yes"],C:me,D:me,E:Jt,F:me,G:me},gating:{q1Negatives:["No","Unknown","Not applicable for this declaration"]},pages:{instructionsFirst:!0,hasMineList:!1},smelterList:{metalDropdownSource:{type:"fixed",metals:ft},hasCombinedColumn:!1},mineList:{available:!1,smelterNameMode:"manual"},productList:{hasRequesterColumns:!1}},im={id:"2.0",minerals:Ea,mineralScopeMode:"dynamic-dropdown",questionLabelKeys:Fa,questionOptions:{q1:Da,q2:he,q3:he,q4:he,q5:$a,q6:he,q7:he},companyLabelKeys:za,companyOptions:{A:me,B:me,BCommentLabelKey:"companyQuestions.emrt.b_comment",BCommentRequiredWhen:["Yes"],C:Oa,D:me,E:Jt,F:me,G:me},gating:{q1Negatives:["No","Unknown","Not declaring"]},pages:{instructionsFirst:!0,hasMineList:!0},smelterList:{metalDropdownSource:{type:"dynamic-q2-yes"},hasCombinedColumn:!1},mineList:{available:!0,metalDropdownSource:{type:"dynamic-q2-yes"},smelterNameMode:"manual"},productList:{hasRequesterColumns:!1}},sm={id:"2.1",minerals:Ea,mineralScopeMode:"dynamic-dropdown",questionLabelKeys:Fa,questionOptions:{q1:Da,q2:he,q3:he,q4:he,q5:$a,q6:he,q7:he},companyLabelKeys:za,companyOptions:{A:me,B:me,BCommentLabelKey:"companyQuestions.emrt.b_comment",BCommentRequiredWhen:["Yes"],C:Oa,D:me,E:Jt,F:me,G:me},gating:{q1Negatives:["No","Unknown","Not declaring"]},pages:{instructionsFirst:!1,hasMineList:!0},smelterList:{metalDropdownSource:{type:"dynamic-q2-yes"},hasCombinedColumn:!0},mineList:{available:!0,metalDropdownSource:{type:"dynamic-q2-yes"},smelterNameMode:"dropdown"},productList:{hasRequesterColumns:!0}},am={"1.1":tm,"1.11":nm,"1.2":om,"1.3":rm,"2.0":im,"2.1":sm},lm=Do(Object.values(am)),cm={type:"emrt",name:"EMRT",fullNameKey:"templates.emrt_full",versions:em,defaultVersion:Xu};function um(e){Po(ja,e,"EMRT");const t=lm.get(e);if(!t)throw new Error(`Missing EMRT version config: ${e}`);return Ju(t)}const mm={cmrt:Nu,emrt:cm,crt:Uu,amrt:mu},dm={cmrt:Lu,emrt:um,crt:Gu,amrt:du};function Ba(e){const t=mm[e];if(!t)throw new Error(`Unknown template type: ${e}`);return t}function Bo(e,t){const n=dm[e];if(!n)throw new Error(`Unknown template type: ${e}`);return n(t)}function pm(e){return Ba(e).defaultVersion}function fm(e){if(!e)return"";const t=e.startsWith("/")?e:`/${e}`;return t.endsWith("/")?t.slice(0,-1):t}function ho({template:e,version:t,page:n,basePath:o}){return`${fm(o)}/${e}/${t}/${n}`}function rt(e,t,n){const o=e[t];return typeof o=="object"&&n?o[n]??"":typeof o=="string"?o:""}function Gn(e,t,n){switch(e.type){case"always":return!0;case"q1-not-no":return rt(t,"Q1",n)!=="No";case"q1-yes":return rt(t,"Q1",n)==="Yes";case"q1q2-not-no":return rt(t,"Q1",n)!=="No"&&rt(t,"Q2",n)!=="No";case"q1q2-yes":return rt(t,"Q1",n)==="Yes"&&rt(t,"Q2",n)==="Yes";case"q1-not-negatives":return!e.negatives.includes(rt(t,"Q1",n));case"q1-not-negatives-and-q2-not-negatives":return!e.q1Negatives.includes(rt(t,"Q1",n))&&!e.q2Negatives.includes(rt(t,"Q2",n));default:return!0}}function Ka(e,t,n){const{gating:o}=e;return{q2Enabled:o.q2Gating?Gn(o.q2Gating,t,n):!0,laterQuestionsEnabled:o.laterQuestionsGating?Gn(o.laterQuestionsGating,t,n):!0,companyQuestionsEnabled:o.companyQuestionsGating?Gn(o.companyQuestionsGating,t,n):!0,smelterListRequired:o.smelterListGating?Gn(o.smelterListGating,t,n):!0}}function Xt(e,t,n){const o=new Map;return(n??e.mineralScope.minerals.map(i=>i.key)).forEach(i=>{o.set(i,Ka(e,t,i))}),o}function q(e,t,n){function o(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,l);const c=s.prototype,u=Object.keys(c);for(let p=0;p<u.length;p++){const m=u[p];m in a||(a[m]=c[m].bind(a))}}const r=n?.Parent??Object;class i extends r{}Object.defineProperty(i,"name",{value:e});function s(a){var l;const c=n?.Parent?new i:this;o(c,a),(l=c._zod).deferred??(l.deferred=[]);for(const u of c._zod.deferred)u();return c}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class Bt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Qa extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Ua={};function ht(e){return Ua}function Ga(e){const t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}function Cr(e,t){return typeof t=="bigint"?t.toString():t}function Zr(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Hr(e){return e==null}function Vr(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function hm(e,t){const n=(e.toString().split(".")[1]||"").length,o=t.toString();let r=(o.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(o)){const l=o.match(/\d?e-(\d?)/);l?.[1]&&(r=Number.parseInt(l[1]))}const i=n>r?n:r,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}const Li=Symbol("evaluating");function be(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==Li)return o===void 0&&(o=Li,o=n()),o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function At(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function vt(...e){const t={};for(const n of e){const o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function qi(e){return JSON.stringify(e)}function ym(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ya="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function yo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const gm=Zr(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ut(e){if(yo(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(yo(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Za(e){return Ut(e)?{...e}:Array.isArray(e)?[...e]:e}const bm=new Set(["string","number","symbol"]);function Gt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function St(e,t,n){const o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function J(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function wm(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const vm={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Sm(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=vt(e._zod.def,{get shape(){const s={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=n.shape[a])}return At(this,"shape",s),s},checks:[]});return St(e,i)}function Cm(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=vt(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return At(this,"shape",s),s},checks:[]});return St(e,i)}function km(e,t){if(!Ut(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const r=vt(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return At(this,"shape",i),i}});return St(e,r)}function Tm(e,t){if(!Ut(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=vt(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return At(this,"shape",o),o}});return St(e,n)}function xm(e,t){const n=vt(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return At(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return St(e,n)}function _m(e,t,n){const r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const s=vt(t._zod.def,{get shape(){const a=t._zod.def.shape,l={...a};if(n)for(const c in n){if(!(c in a))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(l[c]=e?new e({type:"optional",innerType:a[c]}):a[c])}else for(const c in a)l[c]=e?new e({type:"optional",innerType:a[c]}):a[c];return At(this,"shape",l),l},checks:[]});return St(t,s)}function Im(e,t,n){const o=vt(t._zod.def,{get shape(){const r=t._zod.def.shape,i={...r};if(n)for(const s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:r[s]}))}else for(const s in r)i[s]=new e({type:"nonoptional",innerType:r[s]});return At(this,"shape",i),i}});return St(t,o)}function zt(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function jt(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function Yn(e){return typeof e=="string"?e:e?.message}function yt(e,t,n){const o={...e,path:e.path??[]};if(!e.message){const r=Yn(e.inst?._zod.def?.error?.(e))??Yn(t?.error?.(e))??Yn(n.customError?.(e))??Yn(n.localeError?.(e))??"Invalid input";o.message=r}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function Wr(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Mn(...e){const[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}const Ha=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Cr,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Va=q("$ZodError",Ha),Wa=q("$ZodError",Ha,{Parent:Error});function Rm(e,t=n=>n.message){const n={},o=[];for(const r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):o.push(t(r));return{formErrors:o,fieldErrors:n}}function Mm(e,t=n=>n.message){const n={_errors:[]},o=r=>{for(const i of r.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>o({issues:s}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let s=n,a=0;for(;a<i.path.length;){const l=i.path[a];a===i.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(t(i))):s[l]=s[l]||{_errors:[]},s=s[l],a++}}};return o(e),n}const Jr=e=>(t,n,o,r)=>{const i=o?Object.assign(o,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new Bt;if(s.issues.length){const a=new(r?.Err??e)(s.issues.map(l=>yt(l,i,ht())));throw Ya(a,r?.callee),a}return s.value},Xr=e=>async(t,n,o,r)=>{const i=o?Object.assign(o,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const a=new(r?.Err??e)(s.issues.map(l=>yt(l,i,ht())));throw Ya(a,r?.callee),a}return s.value},Ko=e=>(t,n,o)=>{const r=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new Bt;return i.issues.length?{success:!1,error:new(e??Va)(i.issues.map(s=>yt(s,r,ht())))}:{success:!0,data:i.value}},Nm=Ko(Wa),Qo=e=>async(t,n,o)=>{const r=o?Object.assign(o,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>yt(s,r,ht())))}:{success:!0,data:i.value}},Lm=Qo(Wa),qm=e=>(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Jr(e)(t,n,r)},Am=e=>(t,n,o)=>Jr(e)(t,n,o),Em=e=>async(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Xr(e)(t,n,r)},Pm=e=>async(t,n,o)=>Xr(e)(t,n,o),Dm=e=>(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Ko(e)(t,n,r)},$m=e=>(t,n,o)=>Ko(e)(t,n,o),Om=e=>async(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Qo(e)(t,n,r)},Fm=e=>async(t,n,o)=>Qo(e)(t,n,o),zm=/^[cC][^\s-]{8,}$/,jm=/^[0-9a-z]+$/,Bm=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Km=/^[0-9a-vA-V]{20}$/,Qm=/^[A-Za-z0-9]{27}$/,Um=/^[a-zA-Z0-9_-]{21}$/,Gm=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ym=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ai=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Zm=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Hm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Vm(){return new RegExp(Hm,"u")}const Wm=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Jm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Xm=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ed=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,td=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ja=/^[A-Za-z0-9_-]*$/,nd=/^\+[1-9]\d{6,14}$/,Xa="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",od=new RegExp(`^${Xa}$`);function el(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function rd(e){return new RegExp(`^${el(e)}$`)}function id(e){const t=el({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${Xa}T(?:${o})$`)}const sd=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},ad=/^-?\d+$/,tl=/^-?\d+(?:\.\d+)?$/,ld=/^[^A-Z]*$/,cd=/^[^a-z]*$/,Fe=q("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),nl={number:"number",bigint:"bigint",object:"date"},ol=q("$ZodCheckLessThan",(e,t)=>{Fe.init(e,t);const n=nl[typeof t.value];e._zod.onattach.push(o=>{const r=o._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),rl=q("$ZodCheckGreaterThan",(e,t)=>{Fe.init(e,t);const n=nl[typeof t.value];e._zod.onattach.push(o=>{const r=o._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ud=q("$ZodCheckMultipleOf",(e,t)=>{Fe.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):hm(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),md=q("$ZodCheckNumberFormat",(e,t)=>{Fe.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),o=n?"int":"number",[r,i]=vm[t.format];e._zod.onattach.push(s=>{const a=s._zod.bag;a.format=t.format,a.minimum=r,a.maximum=i,n&&(a.pattern=ad)}),e._zod.check=s=>{const a=s.value;if(n){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}a<r&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),dd=q("$ZodCheckMaxLength",(e,t)=>{var n;Fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{const r=o.value;return!Hr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{const r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{const r=o.value;if(r.length<=t.maximum)return;const s=Wr(r);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),pd=q("$ZodCheckMinLength",(e,t)=>{var n;Fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{const r=o.value;return!Hr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{const r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const r=o.value;if(r.length>=t.minimum)return;const s=Wr(r);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),fd=q("$ZodCheckLengthEquals",(e,t)=>{var n;Fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{const r=o.value;return!Hr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{const r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=o=>{const r=o.value,i=r.length;if(i===t.length)return;const s=Wr(r),a=i>t.length;o.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Uo=q("$ZodCheckStringFormat",(e,t)=>{var n,o;Fe.init(e,t),e._zod.onattach.push(r=>{const i=r._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),hd=q("$ZodCheckRegex",(e,t)=>{Uo.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),yd=q("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ld),Uo.init(e,t)}),gd=q("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=cd),Uo.init(e,t)}),bd=q("$ZodCheckIncludes",(e,t)=>{Fe.init(e,t);const n=Gt(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),wd=q("$ZodCheckStartsWith",(e,t)=>{Fe.init(e,t);const n=new RegExp(`^${Gt(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),vd=q("$ZodCheckEndsWith",(e,t)=>{Fe.init(e,t);const n=new RegExp(`.*${Gt(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}}),Sd=q("$ZodCheckOverwrite",(e,t)=>{Fe.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Cd{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const o=t.split(`
2
2
  `).filter(s=>s),r=Math.min(...o.map(s=>s.length-s.trimStart().length)),i=o.map(s=>s.slice(r)).map(s=>" ".repeat(this.indent*2)+s);for(const s of i)this.content.push(s)}compile(){const t=Function,n=this?.args,r=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,r.join(`
3
- `))}}const kd={major:4,minor:3,patch:6},_e=A("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=kd;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const r of o)for(const i of r._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const r=(s,a,l)=>{let c=zt(s),u;for(const f of a){if(f._zod.def.when){if(!f._zod.def.when(s))continue}else if(c)continue;const m=s.issues.length,d=f._zod.check(s);if(d instanceof Promise&&l?.async===!1)throw new Bt;if(u||d instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await d,s.issues.length!==m&&(c||(c=zt(s,m)))});else{if(s.issues.length===m)continue;c||(c=zt(s,m))}}return u?u.then(()=>s):s},i=(s,a,l)=>{if(zt(s))return s.aborted=!0,s;const c=r(a,o,l);if(c instanceof Promise){if(l.async===!1)throw new Bt;return c.then(u=>e._zod.parse(u,l))}return e._zod.parse(c,l)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){const c=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return c instanceof Promise?c.then(u=>i(u,s,a)):i(c,s,a)}const l=e._zod.parse(s,a);if(l instanceof Promise){if(a.async===!1)throw new Bt;return l.then(c=>r(c,o,a))}return r(l,o,a)}}ye(e,"~standard",()=>({validate:r=>{try{const i=Mm(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return qm(e,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),ei=A("$ZodString",(e,t)=>{_e.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??sd(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),ke=A("$ZodStringFormat",(e,t)=>{Uo.init(e,t),ei.init(e,t)}),Td=A("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Ym),ke.init(e,t)}),xd=A("$ZodUUID",(e,t)=>{if(t.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Li(o))}else t.pattern??(t.pattern=Li());ke.init(e,t)}),_d=A("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Zm),ke.init(e,t)}),Id=A("$ZodURL",(e,t)=>{ke.init(e,t),e._zod.check=n=>{try{const o=n.value.trim(),r=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Rd=A("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Vm()),ke.init(e,t)}),Nd=A("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Um),ke.init(e,t)}),Md=A("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=zm),ke.init(e,t)}),qd=A("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=jm),ke.init(e,t)}),Ad=A("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Bm),ke.init(e,t)}),Ld=A("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Km),ke.init(e,t)}),Ed=A("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Qm),ke.init(e,t)}),Pd=A("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=id(t)),ke.init(e,t)}),Dd=A("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=od),ke.init(e,t)}),$d=A("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=rd(t)),ke.init(e,t)}),Od=A("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Gm),ke.init(e,t)}),Fd=A("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Wm),ke.init(e,t),e._zod.bag.format="ipv4"}),zd=A("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Jm),ke.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),jd=A("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Xm),ke.init(e,t)}),Bd=A("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ed),ke.init(e,t),e._zod.check=n=>{const o=n.value.split("/");try{if(o.length!==2)throw new Error;const[r,i]=o;if(!i)throw new Error;const s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function il(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Kd=A("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=td),ke.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{il(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Qd(e){if(!Ja.test(e))return!1;const t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return il(n)}const Ud=A("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ja),ke.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Qd(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Gd=A("$ZodE164",(e,t)=>{t.pattern??(t.pattern=nd),ke.init(e,t)});function Yd(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[o]=n;if(!o)return!1;const r=JSON.parse(atob(o));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}const Zd=A("$ZodJWT",(e,t)=>{ke.init(e,t),e._zod.check=n=>{Yd(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),sl=A("$ZodNumber",(e,t)=>{_e.init(e,t),e._zod.pattern=e._zod.bag.pattern??tl,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;const i=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n}}),Hd=A("$ZodNumberFormat",(e,t)=>{md.init(e,t),sl.init(e,t)}),Vd=A("$ZodUnknown",(e,t)=>{_e.init(e,t),e._zod.parse=n=>n}),Wd=A("$ZodNever",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Ei(e,t,n){e.issues.length&&t.issues.push(...jt(n,e.issues)),t.value[n]=e.value}const Jd=A("$ZodArray",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{const r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);const i=[];for(let s=0;s<r.length;s++){const a=r[s],l=t.element._zod.run({value:a,issues:[]},o);l instanceof Promise?i.push(l.then(c=>Ei(c,n,s))):Ei(l,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function go(e,t,n,o,r){if(e.issues.length){if(r&&!(n in o))return;t.issues.push(...jt(n,e.issues))}e.value===void 0?n in o&&(t.value[n]=void 0):t.value[n]=e.value}function al(e){const t=Object.keys(e.shape);for(const o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const n=wm(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function ll(e,t,n,o,r,i){const s=[],a=r.keySet,l=r.catchall._zod,c=l.def.type,u=l.optout==="optional";for(const f in t){if(a.has(f))continue;if(c==="never"){s.push(f);continue}const m=l.run({value:t[f],issues:[]},o);m instanceof Promise?e.push(m.then(d=>go(d,n,f,t,u))):go(m,n,f,t,u)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const Xd=A("$ZodObject",(e,t)=>{if(_e.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const l={...a};return Object.defineProperty(t,"shape",{value:l}),l}})}const o=Zr(()=>al(t));ye(e._zod,"propValues",()=>{const a=t.shape,l={};for(const c in a){const u=a[c]._zod;if(u.values){l[c]??(l[c]=new Set);for(const f of u.values)l[c].add(f)}}return l});const r=yo,i=t.catchall;let s;e._zod.parse=(a,l)=>{s??(s=o.value);const c=a.value;if(!r(c))return a.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),a;a.value={};const u=[],f=s.shape;for(const m of s.keys){const d=f[m],h=d._zod.optout==="optional",g=d._zod.run({value:c[m],issues:[]},l);g instanceof Promise?u.push(g.then(b=>go(b,a,m,c,h))):go(g,a,m,c,h)}return i?ll(u,c,a,l,o.value,e):u.length?Promise.all(u).then(()=>a):a}}),ep=A("$ZodObjectJIT",(e,t)=>{Xd.init(e,t);const n=e._zod.parse,o=Zr(()=>al(t)),r=m=>{const d=new Cd(["shape","payload","ctx"]),h=o.value,g=v=>{const C=Ai(v);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};d.write("const input = payload.value;");const b=Object.create(null);let w=0;for(const v of h.keys)b[v]=`key_${w++}`;d.write("const newResult = {};");for(const v of h.keys){const C=b[v],N=Ai(v),k=m[v]?._zod?.optout==="optional";d.write(`const ${C} = ${g(v)};`),k?d.write(`
3
+ `))}}const kd={major:4,minor:3,patch:6},_e=q("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=kd;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const r of o)for(const i of r._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const r=(s,a,l)=>{let c=zt(s),u;for(const p of a){if(p._zod.def.when){if(!p._zod.def.when(s))continue}else if(c)continue;const m=s.issues.length,d=p._zod.check(s);if(d instanceof Promise&&l?.async===!1)throw new Bt;if(u||d instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await d,s.issues.length!==m&&(c||(c=zt(s,m)))});else{if(s.issues.length===m)continue;c||(c=zt(s,m))}}return u?u.then(()=>s):s},i=(s,a,l)=>{if(zt(s))return s.aborted=!0,s;const c=r(a,o,l);if(c instanceof Promise){if(l.async===!1)throw new Bt;return c.then(u=>e._zod.parse(u,l))}return e._zod.parse(c,l)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){const c=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return c instanceof Promise?c.then(u=>i(u,s,a)):i(c,s,a)}const l=e._zod.parse(s,a);if(l instanceof Promise){if(a.async===!1)throw new Bt;return l.then(c=>r(c,o,a))}return r(l,o,a)}}be(e,"~standard",()=>({validate:r=>{try{const i=Nm(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Lm(e,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),ei=q("$ZodString",(e,t)=>{_e.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??sd(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),ke=q("$ZodStringFormat",(e,t)=>{Uo.init(e,t),ei.init(e,t)}),Td=q("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Ym),ke.init(e,t)}),xd=q("$ZodUUID",(e,t)=>{if(t.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ai(o))}else t.pattern??(t.pattern=Ai());ke.init(e,t)}),_d=q("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Zm),ke.init(e,t)}),Id=q("$ZodURL",(e,t)=>{ke.init(e,t),e._zod.check=n=>{try{const o=n.value.trim(),r=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Rd=q("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Vm()),ke.init(e,t)}),Md=q("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Um),ke.init(e,t)}),Nd=q("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=zm),ke.init(e,t)}),Ld=q("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=jm),ke.init(e,t)}),qd=q("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Bm),ke.init(e,t)}),Ad=q("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Km),ke.init(e,t)}),Ed=q("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Qm),ke.init(e,t)}),Pd=q("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=id(t)),ke.init(e,t)}),Dd=q("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=od),ke.init(e,t)}),$d=q("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=rd(t)),ke.init(e,t)}),Od=q("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Gm),ke.init(e,t)}),Fd=q("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Wm),ke.init(e,t),e._zod.bag.format="ipv4"}),zd=q("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Jm),ke.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),jd=q("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Xm),ke.init(e,t)}),Bd=q("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ed),ke.init(e,t),e._zod.check=n=>{const o=n.value.split("/");try{if(o.length!==2)throw new Error;const[r,i]=o;if(!i)throw new Error;const s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function il(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Kd=q("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=td),ke.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{il(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Qd(e){if(!Ja.test(e))return!1;const t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return il(n)}const Ud=q("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ja),ke.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Qd(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Gd=q("$ZodE164",(e,t)=>{t.pattern??(t.pattern=nd),ke.init(e,t)});function Yd(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[o]=n;if(!o)return!1;const r=JSON.parse(atob(o));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}const Zd=q("$ZodJWT",(e,t)=>{ke.init(e,t),e._zod.check=n=>{Yd(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),sl=q("$ZodNumber",(e,t)=>{_e.init(e,t),e._zod.pattern=e._zod.bag.pattern??tl,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;const i=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n}}),Hd=q("$ZodNumberFormat",(e,t)=>{md.init(e,t),sl.init(e,t)}),Vd=q("$ZodUnknown",(e,t)=>{_e.init(e,t),e._zod.parse=n=>n}),Wd=q("$ZodNever",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Ei(e,t,n){e.issues.length&&t.issues.push(...jt(n,e.issues)),t.value[n]=e.value}const Jd=q("$ZodArray",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{const r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);const i=[];for(let s=0;s<r.length;s++){const a=r[s],l=t.element._zod.run({value:a,issues:[]},o);l instanceof Promise?i.push(l.then(c=>Ei(c,n,s))):Ei(l,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function go(e,t,n,o,r){if(e.issues.length){if(r&&!(n in o))return;t.issues.push(...jt(n,e.issues))}e.value===void 0?n in o&&(t.value[n]=void 0):t.value[n]=e.value}function al(e){const t=Object.keys(e.shape);for(const o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const n=wm(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function ll(e,t,n,o,r,i){const s=[],a=r.keySet,l=r.catchall._zod,c=l.def.type,u=l.optout==="optional";for(const p in t){if(a.has(p))continue;if(c==="never"){s.push(p);continue}const m=l.run({value:t[p],issues:[]},o);m instanceof Promise?e.push(m.then(d=>go(d,n,p,t,u))):go(m,n,p,t,u)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const Xd=q("$ZodObject",(e,t)=>{if(_e.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const l={...a};return Object.defineProperty(t,"shape",{value:l}),l}})}const o=Zr(()=>al(t));be(e._zod,"propValues",()=>{const a=t.shape,l={};for(const c in a){const u=a[c]._zod;if(u.values){l[c]??(l[c]=new Set);for(const p of u.values)l[c].add(p)}}return l});const r=yo,i=t.catchall;let s;e._zod.parse=(a,l)=>{s??(s=o.value);const c=a.value;if(!r(c))return a.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),a;a.value={};const u=[],p=s.shape;for(const m of s.keys){const d=p[m],h=d._zod.optout==="optional",g=d._zod.run({value:c[m],issues:[]},l);g instanceof Promise?u.push(g.then(b=>go(b,a,m,c,h))):go(g,a,m,c,h)}return i?ll(u,c,a,l,o.value,e):u.length?Promise.all(u).then(()=>a):a}}),ep=q("$ZodObjectJIT",(e,t)=>{Xd.init(e,t);const n=e._zod.parse,o=Zr(()=>al(t)),r=m=>{const d=new Cd(["shape","payload","ctx"]),h=o.value,g=v=>{const C=qi(v);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};d.write("const input = payload.value;");const b=Object.create(null);let w=0;for(const v of h.keys)b[v]=`key_${w++}`;d.write("const newResult = {};");for(const v of h.keys){const C=b[v],M=qi(v),k=m[v]?._zod?.optout==="optional";d.write(`const ${C} = ${g(v)};`),k?d.write(`
4
4
  if (${C}.issues.length) {
5
- if (${N} in input) {
5
+ if (${M} in input) {
6
6
  payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
7
7
  ...iss,
8
- path: iss.path ? [${N}, ...iss.path] : [${N}]
8
+ path: iss.path ? [${M}, ...iss.path] : [${M}]
9
9
  })));
10
10
  }
11
11
  }
12
12
 
13
13
  if (${C}.value === undefined) {
14
- if (${N} in input) {
15
- newResult[${N}] = undefined;
14
+ if (${M} in input) {
15
+ newResult[${M}] = undefined;
16
16
  }
17
17
  } else {
18
- newResult[${N}] = ${C}.value;
18
+ newResult[${M}] = ${C}.value;
19
19
  }
20
20
 
21
21
  `):d.write(`
22
22
  if (${C}.issues.length) {
23
23
  payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
24
24
  ...iss,
25
- path: iss.path ? [${N}, ...iss.path] : [${N}]
25
+ path: iss.path ? [${M}, ...iss.path] : [${M}]
26
26
  })));
27
27
  }
28
28
 
29
29
  if (${C}.value === undefined) {
30
- if (${N} in input) {
31
- newResult[${N}] = undefined;
30
+ if (${M} in input) {
31
+ newResult[${M}] = undefined;
32
32
  }
33
33
  } else {
34
- newResult[${N}] = ${C}.value;
34
+ newResult[${M}] = ${C}.value;
35
35
  }
36
36
 
37
- `)}d.write("payload.value = newResult;"),d.write("return payload;");const S=d.compile();return(v,C)=>S(m,v,C)};let i;const s=yo,a=!Ua.jitless,c=a&&gm.value,u=t.catchall;let f;e._zod.parse=(m,d)=>{f??(f=o.value);const h=m.value;return s(h)?a&&c&&d?.async===!1&&d.jitless!==!0?(i||(i=r(t.shape)),m=i(m,d),u?ll([],h,m,d,f,e):m):n(m,d):(m.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),m)}});function Pi(e,t,n,o){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const r=e.filter(i=>!zt(i));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>yt(s,o,ht())))}),t)}const tp=A("$ZodUnion",(e,t)=>{_e.init(e,t),ye(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),ye(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),ye(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),ye(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>Vr(i.source)).join("|")})$`)}});const n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let s=!1;const a=[];for(const l of t.options){const c=l._zod.run({value:r.value,issues:[]},i);if(c instanceof Promise)a.push(c),s=!0;else{if(c.issues.length===0)return c;a.push(c)}}return s?Promise.all(a).then(l=>Pi(l,r,e,i)):Pi(a,r,e,i)}}),np=A("$ZodIntersection",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{const r=n.value,i=t.left._zod.run({value:r,issues:[]},o),s=t.right._zod.run({value:r,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([l,c])=>Di(n,l,c)):Di(n,i,s)}});function kr(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ut(e)&&Ut(t)){const n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),r={...e,...t};for(const i of o){const s=kr(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r[i]=s.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;o<e.length;o++){const r=e[o],i=t[o],s=kr(r,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Di(e,t,n){const o=new Map;let r;for(const a of t.issues)if(a.code==="unrecognized_keys"){r??(r=a);for(const l of a.keys)o.has(l)||o.set(l,{}),o.get(l).l=!0}else e.issues.push(a);for(const a of n.issues)if(a.code==="unrecognized_keys")for(const l of a.keys)o.has(l)||o.set(l,{}),o.get(l).r=!0;else e.issues.push(a);const i=[...o].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&r&&e.issues.push({...r,keys:i}),zt(e))return e;const s=kr(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const op=A("$ZodRecord",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{const r=n.value;if(!Ut(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;const i=[],s=t.keyType._zod.values;if(s){n.value={};const a=new Set;for(const c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){a.add(typeof c=="number"?c.toString():c);const u=t.valueType._zod.run({value:r[c],issues:[]},o);u instanceof Promise?i.push(u.then(f=>{f.issues.length&&n.issues.push(...jt(c,f.issues)),n.value[c]=f.value})):(u.issues.length&&n.issues.push(...jt(c,u.issues)),n.value[c]=u.value)}let l;for(const c in r)a.has(c)||(l=l??[],l.push(c));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:l})}else{n.value={};for(const a of Reflect.ownKeys(r)){if(a==="__proto__")continue;let l=t.keyType._zod.run({value:a,issues:[]},o);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&tl.test(a)&&l.issues.length){const f=t.keyType._zod.run({value:Number(a),issues:[]},o);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");f.issues.length===0&&(l=f)}if(l.issues.length){t.mode==="loose"?n.value[a]=r[a]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(f=>yt(f,o,ht())),input:a,path:[a],inst:e});continue}const u=t.valueType._zod.run({value:r[a],issues:[]},o);u instanceof Promise?i.push(u.then(f=>{f.issues.length&&n.issues.push(...jt(a,f.issues)),n.value[l.value]=f.value})):(u.issues.length&&n.issues.push(...jt(a,u.issues)),n.value[l.value]=u.value)}}return i.length?Promise.all(i).then(()=>n):n}}),rp=A("$ZodEnum",(e,t)=>{_e.init(e,t);const n=Ga(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(r=>bm.has(typeof r)).map(r=>typeof r=="string"?Gt(r):r.toString()).join("|")})$`),e._zod.parse=(r,i)=>{const s=r.value;return o.has(s)||r.issues.push({code:"invalid_value",values:n,input:s,inst:e}),r}}),ip=A("$ZodLiteral",(e,t)=>{if(_e.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?Gt(o):o?Gt(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,r)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),sp=A("$ZodTransform",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Qa(e.constructor.name);const r=t.transform(n.value,n);if(o.async)return(r instanceof Promise?r:Promise.resolve(r)).then(s=>(n.value=s,n));if(r instanceof Promise)throw new Bt;return n.value=r,n}});function $i(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const cl=A("$ZodOptional",(e,t)=>{_e.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ye(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ye(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Vr(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){const r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>$i(i,n.value)):$i(r,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),ap=A("$ZodExactOptional",(e,t)=>{cl.init(e,t),ye(e._zod,"values",()=>t.innerType._zod.values),ye(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),lp=A("$ZodNullable",(e,t)=>{_e.init(e,t),ye(e._zod,"optin",()=>t.innerType._zod.optin),ye(e._zod,"optout",()=>t.innerType._zod.optout),ye(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Vr(n.source)}|null)$`):void 0}),ye(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),cp=A("$ZodDefault",(e,t)=>{_e.init(e,t),e._zod.optin="optional",ye(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;const r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>Oi(i,t)):Oi(r,t)}});function Oi(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const up=A("$ZodPrefault",(e,t)=>{_e.init(e,t),e._zod.optin="optional",ye(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),mp=A("$ZodNonOptional",(e,t)=>{_e.init(e,t),ye(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{const r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>Fi(i,e)):Fi(r,e)}});function Fi(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const dp=A("$ZodCatch",(e,t)=>{_e.init(e,t),ye(e._zod,"optin",()=>t.innerType._zod.optin),ye(e._zod,"optout",()=>t.innerType._zod.optout),ye(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>yt(s,o,ht()))},input:n.value}),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(i=>yt(i,o,ht()))},input:n.value}),n.issues=[]),n)}}),pp=A("$ZodPipe",(e,t)=>{_e.init(e,t),ye(e._zod,"values",()=>t.in._zod.values),ye(e._zod,"optin",()=>t.in._zod.optin),ye(e._zod,"optout",()=>t.out._zod.optout),ye(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){const i=t.out._zod.run(n,o);return i instanceof Promise?i.then(s=>Zn(s,t.in,o)):Zn(i,t.in,o)}const r=t.in._zod.run(n,o);return r instanceof Promise?r.then(i=>Zn(i,t.out,o)):Zn(r,t.out,o)}});function Zn(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const fp=A("$ZodReadonly",(e,t)=>{_e.init(e,t),ye(e._zod,"propValues",()=>t.innerType._zod.propValues),ye(e._zod,"values",()=>t.innerType._zod.values),ye(e._zod,"optin",()=>t.innerType?._zod?.optin),ye(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(zi):zi(r)}});function zi(e){return e.value=Object.freeze(e.value),e}const hp=A("$ZodCustom",(e,t)=>{Oe.init(e,t),_e.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{const o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then(i=>ji(i,n,o,e));ji(r,n,o,e)}});function ji(e,t,n,o){if(!e){const r={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(r.params=o._zod.def.params),t.issues.push(Nn(r))}}var Bi;class yp{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const o={...this.get(n)??{}};delete o.id;const r={...o,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function gp(){return new yp}(Bi=globalThis).__zod_globalRegistry??(Bi.__zod_globalRegistry=gp());const _n=globalThis.__zod_globalRegistry;function bp(e,t){return new e({type:"string",...X(t)})}function wp(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...X(t)})}function Ki(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...X(t)})}function vp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...X(t)})}function Sp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...X(t)})}function Cp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...X(t)})}function kp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...X(t)})}function Tp(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...X(t)})}function xp(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...X(t)})}function _p(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...X(t)})}function Ip(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...X(t)})}function Rp(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...X(t)})}function Np(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...X(t)})}function Mp(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...X(t)})}function qp(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...X(t)})}function Ap(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...X(t)})}function Lp(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...X(t)})}function Ep(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...X(t)})}function Pp(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...X(t)})}function Dp(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...X(t)})}function $p(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...X(t)})}function Op(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...X(t)})}function Fp(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...X(t)})}function zp(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...X(t)})}function jp(e,t){return new e({type:"string",format:"date",check:"string_format",...X(t)})}function Bp(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...X(t)})}function Kp(e,t){return new e({type:"string",format:"duration",check:"string_format",...X(t)})}function Qp(e,t){return new e({type:"number",checks:[],...X(t)})}function Up(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...X(t)})}function Gp(e){return new e({type:"unknown"})}function Yp(e,t){return new e({type:"never",...X(t)})}function Qi(e,t){return new ol({check:"less_than",...X(t),value:e,inclusive:!1})}function lr(e,t){return new ol({check:"less_than",...X(t),value:e,inclusive:!0})}function Ui(e,t){return new rl({check:"greater_than",...X(t),value:e,inclusive:!1})}function cr(e,t){return new rl({check:"greater_than",...X(t),value:e,inclusive:!0})}function Gi(e,t){return new ud({check:"multiple_of",...X(t),value:e})}function ul(e,t){return new dd({check:"max_length",...X(t),maximum:e})}function bo(e,t){return new pd({check:"min_length",...X(t),minimum:e})}function ml(e,t){return new fd({check:"length_equals",...X(t),length:e})}function Zp(e,t){return new hd({check:"string_format",format:"regex",...X(t),pattern:e})}function Hp(e){return new yd({check:"string_format",format:"lowercase",...X(e)})}function Vp(e){return new gd({check:"string_format",format:"uppercase",...X(e)})}function Wp(e,t){return new bd({check:"string_format",format:"includes",...X(t),includes:e})}function Jp(e,t){return new wd({check:"string_format",format:"starts_with",...X(t),prefix:e})}function Xp(e,t){return new vd({check:"string_format",format:"ends_with",...X(t),suffix:e})}function en(e){return new Sd({check:"overwrite",tx:e})}function ef(e){return en(t=>t.normalize(e))}function tf(){return en(e=>e.trim())}function nf(){return en(e=>e.toLowerCase())}function of(){return en(e=>e.toUpperCase())}function rf(){return en(e=>ym(e))}function sf(e,t,n){return new e({type:"array",element:t,...X(n)})}function af(e,t,n){return new e({type:"custom",check:"custom",fn:t,...X(n)})}function lf(e){const t=cf(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(Nn(o,n.value,t._zod.def));else{const r=o;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(Nn(r))}},e(n.value,n)));return t}function cf(e,t){const n=new Oe({check:"custom",...X(t)});return n._zod.check=e,n}function dl(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??_n,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function qe(e,t,n={path:[],schemaPath:[]}){var o;const r=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const u={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,u);else{const m=s.schema,d=t.processors[r.type];if(!d)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);d(e,t,m,u)}const f=e._zod.parent;f&&(s.ref||(s.ref=f),qe(f,t,u),t.seen.get(f).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(s.schema,l),t.io==="input"&&Pe(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function pl(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const s of e.seen.entries()){const a=e.metadataRegistry.get(s[0])?.id;if(a){const l=o.get(a);if(l&&l!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(a,s[0])}}const r=s=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(s[0])?.id,m=e.external.uri??(h=>h);if(f)return{ref:m(f)};const d=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=d,{defId:d,ref:`${m("__shared")}#/${a}/${d}`}}if(s[1]===n)return{ref:"#"};const c=`#/${a}/`,u=s[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:c+u}},i=s=>{if(s[1].schema.$ref)return;const a=s[1],{ref:l,defId:c}=r(s);a.def={...a.schema},c&&(a.defId=c);const u=a.schema;for(const f in u)delete u[f];u.$ref=l};if(e.cycles==="throw")for(const s of e.seen.entries()){const a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
37
+ `)}d.write("payload.value = newResult;"),d.write("return payload;");const S=d.compile();return(v,C)=>S(m,v,C)};let i;const s=yo,a=!Ua.jitless,c=a&&gm.value,u=t.catchall;let p;e._zod.parse=(m,d)=>{p??(p=o.value);const h=m.value;return s(h)?a&&c&&d?.async===!1&&d.jitless!==!0?(i||(i=r(t.shape)),m=i(m,d),u?ll([],h,m,d,p,e):m):n(m,d):(m.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),m)}});function Pi(e,t,n,o){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const r=e.filter(i=>!zt(i));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>yt(s,o,ht())))}),t)}const tp=q("$ZodUnion",(e,t)=>{_e.init(e,t),be(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),be(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),be(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),be(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>Vr(i.source)).join("|")})$`)}});const n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let s=!1;const a=[];for(const l of t.options){const c=l._zod.run({value:r.value,issues:[]},i);if(c instanceof Promise)a.push(c),s=!0;else{if(c.issues.length===0)return c;a.push(c)}}return s?Promise.all(a).then(l=>Pi(l,r,e,i)):Pi(a,r,e,i)}}),np=q("$ZodIntersection",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{const r=n.value,i=t.left._zod.run({value:r,issues:[]},o),s=t.right._zod.run({value:r,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([l,c])=>Di(n,l,c)):Di(n,i,s)}});function kr(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ut(e)&&Ut(t)){const n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),r={...e,...t};for(const i of o){const s=kr(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r[i]=s.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;o<e.length;o++){const r=e[o],i=t[o],s=kr(r,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Di(e,t,n){const o=new Map;let r;for(const a of t.issues)if(a.code==="unrecognized_keys"){r??(r=a);for(const l of a.keys)o.has(l)||o.set(l,{}),o.get(l).l=!0}else e.issues.push(a);for(const a of n.issues)if(a.code==="unrecognized_keys")for(const l of a.keys)o.has(l)||o.set(l,{}),o.get(l).r=!0;else e.issues.push(a);const i=[...o].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&r&&e.issues.push({...r,keys:i}),zt(e))return e;const s=kr(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const op=q("$ZodRecord",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{const r=n.value;if(!Ut(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;const i=[],s=t.keyType._zod.values;if(s){n.value={};const a=new Set;for(const c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){a.add(typeof c=="number"?c.toString():c);const u=t.valueType._zod.run({value:r[c],issues:[]},o);u instanceof Promise?i.push(u.then(p=>{p.issues.length&&n.issues.push(...jt(c,p.issues)),n.value[c]=p.value})):(u.issues.length&&n.issues.push(...jt(c,u.issues)),n.value[c]=u.value)}let l;for(const c in r)a.has(c)||(l=l??[],l.push(c));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:l})}else{n.value={};for(const a of Reflect.ownKeys(r)){if(a==="__proto__")continue;let l=t.keyType._zod.run({value:a,issues:[]},o);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&tl.test(a)&&l.issues.length){const p=t.keyType._zod.run({value:Number(a),issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(l=p)}if(l.issues.length){t.mode==="loose"?n.value[a]=r[a]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(p=>yt(p,o,ht())),input:a,path:[a],inst:e});continue}const u=t.valueType._zod.run({value:r[a],issues:[]},o);u instanceof Promise?i.push(u.then(p=>{p.issues.length&&n.issues.push(...jt(a,p.issues)),n.value[l.value]=p.value})):(u.issues.length&&n.issues.push(...jt(a,u.issues)),n.value[l.value]=u.value)}}return i.length?Promise.all(i).then(()=>n):n}}),rp=q("$ZodEnum",(e,t)=>{_e.init(e,t);const n=Ga(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(r=>bm.has(typeof r)).map(r=>typeof r=="string"?Gt(r):r.toString()).join("|")})$`),e._zod.parse=(r,i)=>{const s=r.value;return o.has(s)||r.issues.push({code:"invalid_value",values:n,input:s,inst:e}),r}}),ip=q("$ZodLiteral",(e,t)=>{if(_e.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?Gt(o):o?Gt(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,r)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),sp=q("$ZodTransform",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Qa(e.constructor.name);const r=t.transform(n.value,n);if(o.async)return(r instanceof Promise?r:Promise.resolve(r)).then(s=>(n.value=s,n));if(r instanceof Promise)throw new Bt;return n.value=r,n}});function $i(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const cl=q("$ZodOptional",(e,t)=>{_e.init(e,t),e._zod.optin="optional",e._zod.optout="optional",be(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),be(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Vr(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){const r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>$i(i,n.value)):$i(r,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),ap=q("$ZodExactOptional",(e,t)=>{cl.init(e,t),be(e._zod,"values",()=>t.innerType._zod.values),be(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),lp=q("$ZodNullable",(e,t)=>{_e.init(e,t),be(e._zod,"optin",()=>t.innerType._zod.optin),be(e._zod,"optout",()=>t.innerType._zod.optout),be(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Vr(n.source)}|null)$`):void 0}),be(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),cp=q("$ZodDefault",(e,t)=>{_e.init(e,t),e._zod.optin="optional",be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;const r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>Oi(i,t)):Oi(r,t)}});function Oi(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const up=q("$ZodPrefault",(e,t)=>{_e.init(e,t),e._zod.optin="optional",be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),mp=q("$ZodNonOptional",(e,t)=>{_e.init(e,t),be(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{const r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>Fi(i,e)):Fi(r,e)}});function Fi(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const dp=q("$ZodCatch",(e,t)=>{_e.init(e,t),be(e._zod,"optin",()=>t.innerType._zod.optin),be(e._zod,"optout",()=>t.innerType._zod.optout),be(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>yt(s,o,ht()))},input:n.value}),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(i=>yt(i,o,ht()))},input:n.value}),n.issues=[]),n)}}),pp=q("$ZodPipe",(e,t)=>{_e.init(e,t),be(e._zod,"values",()=>t.in._zod.values),be(e._zod,"optin",()=>t.in._zod.optin),be(e._zod,"optout",()=>t.out._zod.optout),be(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){const i=t.out._zod.run(n,o);return i instanceof Promise?i.then(s=>Zn(s,t.in,o)):Zn(i,t.in,o)}const r=t.in._zod.run(n,o);return r instanceof Promise?r.then(i=>Zn(i,t.out,o)):Zn(r,t.out,o)}});function Zn(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const fp=q("$ZodReadonly",(e,t)=>{_e.init(e,t),be(e._zod,"propValues",()=>t.innerType._zod.propValues),be(e._zod,"values",()=>t.innerType._zod.values),be(e._zod,"optin",()=>t.innerType?._zod?.optin),be(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(zi):zi(r)}});function zi(e){return e.value=Object.freeze(e.value),e}const hp=q("$ZodCustom",(e,t)=>{Fe.init(e,t),_e.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{const o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then(i=>ji(i,n,o,e));ji(r,n,o,e)}});function ji(e,t,n,o){if(!e){const r={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(r.params=o._zod.def.params),t.issues.push(Mn(r))}}var Bi;class yp{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const o={...this.get(n)??{}};delete o.id;const r={...o,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function gp(){return new yp}(Bi=globalThis).__zod_globalRegistry??(Bi.__zod_globalRegistry=gp());const _n=globalThis.__zod_globalRegistry;function bp(e,t){return new e({type:"string",...J(t)})}function wp(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...J(t)})}function Ki(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...J(t)})}function vp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...J(t)})}function Sp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...J(t)})}function Cp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...J(t)})}function kp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...J(t)})}function Tp(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...J(t)})}function xp(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...J(t)})}function _p(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...J(t)})}function Ip(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...J(t)})}function Rp(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...J(t)})}function Mp(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...J(t)})}function Np(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...J(t)})}function Lp(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...J(t)})}function qp(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...J(t)})}function Ap(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...J(t)})}function Ep(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...J(t)})}function Pp(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...J(t)})}function Dp(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...J(t)})}function $p(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...J(t)})}function Op(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...J(t)})}function Fp(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...J(t)})}function zp(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...J(t)})}function jp(e,t){return new e({type:"string",format:"date",check:"string_format",...J(t)})}function Bp(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...J(t)})}function Kp(e,t){return new e({type:"string",format:"duration",check:"string_format",...J(t)})}function Qp(e,t){return new e({type:"number",checks:[],...J(t)})}function Up(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...J(t)})}function Gp(e){return new e({type:"unknown"})}function Yp(e,t){return new e({type:"never",...J(t)})}function Qi(e,t){return new ol({check:"less_than",...J(t),value:e,inclusive:!1})}function lr(e,t){return new ol({check:"less_than",...J(t),value:e,inclusive:!0})}function Ui(e,t){return new rl({check:"greater_than",...J(t),value:e,inclusive:!1})}function cr(e,t){return new rl({check:"greater_than",...J(t),value:e,inclusive:!0})}function Gi(e,t){return new ud({check:"multiple_of",...J(t),value:e})}function ul(e,t){return new dd({check:"max_length",...J(t),maximum:e})}function bo(e,t){return new pd({check:"min_length",...J(t),minimum:e})}function ml(e,t){return new fd({check:"length_equals",...J(t),length:e})}function Zp(e,t){return new hd({check:"string_format",format:"regex",...J(t),pattern:e})}function Hp(e){return new yd({check:"string_format",format:"lowercase",...J(e)})}function Vp(e){return new gd({check:"string_format",format:"uppercase",...J(e)})}function Wp(e,t){return new bd({check:"string_format",format:"includes",...J(t),includes:e})}function Jp(e,t){return new wd({check:"string_format",format:"starts_with",...J(t),prefix:e})}function Xp(e,t){return new vd({check:"string_format",format:"ends_with",...J(t),suffix:e})}function en(e){return new Sd({check:"overwrite",tx:e})}function ef(e){return en(t=>t.normalize(e))}function tf(){return en(e=>e.trim())}function nf(){return en(e=>e.toLowerCase())}function of(){return en(e=>e.toUpperCase())}function rf(){return en(e=>ym(e))}function sf(e,t,n){return new e({type:"array",element:t,...J(n)})}function af(e,t,n){return new e({type:"custom",check:"custom",fn:t,...J(n)})}function lf(e){const t=cf(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(Mn(o,n.value,t._zod.def));else{const r=o;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(Mn(r))}},e(n.value,n)));return t}function cf(e,t){const n=new Fe({check:"custom",...J(t)});return n._zod.check=e,n}function dl(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??_n,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Le(e,t,n={path:[],schemaPath:[]}){var o;const r=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const u={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,u);else{const m=s.schema,d=t.processors[r.type];if(!d)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);d(e,t,m,u)}const p=e._zod.parent;p&&(s.ref||(s.ref=p),Le(p,t,u),t.seen.get(p).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(s.schema,l),t.io==="input"&&Pe(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function pl(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const s of e.seen.entries()){const a=e.metadataRegistry.get(s[0])?.id;if(a){const l=o.get(a);if(l&&l!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(a,s[0])}}const r=s=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(s[0])?.id,m=e.external.uri??(h=>h);if(p)return{ref:m(p)};const d=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=d,{defId:d,ref:`${m("__shared")}#/${a}/${d}`}}if(s[1]===n)return{ref:"#"};const c=`#/${a}/`,u=s[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:c+u}},i=s=>{if(s[1].schema.$ref)return;const a=s[1],{ref:l,defId:c}=r(s);a.def={...a.schema},c&&(a.defId=c);const u=a.schema;for(const p in u)delete u[p];u.$ref=l};if(e.cycles==="throw")for(const s of e.seen.entries()){const a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
38
38
 
39
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const a=s[1];if(t===s[0]){i(s);continue}if(e.external){const c=e.external.registry.get(s[0])?.id;if(t!==s[0]&&c){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1&&e.reused==="ref"){i(s);continue}}}function fl(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=s=>{const a=e.seen.get(s);if(a.ref===null)return;const l=a.def??a.schema,c={...l},u=a.ref;if(a.ref=null,u){o(u);const m=e.seen.get(u),d=m.schema;if(d.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(d)):Object.assign(l,d),Object.assign(l,c),s._zod.parent===u)for(const g in l)g==="$ref"||g==="allOf"||g in c||delete l[g];if(d.$ref&&m.def)for(const g in l)g==="$ref"||g==="allOf"||g in m.def&&JSON.stringify(l[g])===JSON.stringify(m.def[g])&&delete l[g]}const f=s._zod.parent;if(f&&f!==u){o(f);const m=e.seen.get(f);if(m?.schema.$ref&&(l.$ref=m.schema.$ref,m.def))for(const d in l)d==="$ref"||d==="allOf"||d in m.def&&JSON.stringify(l[d])===JSON.stringify(m.def[d])&&delete l[d]}e.override({zodSchema:s,jsonSchema:l,path:a.path??[]})};for(const s of[...e.seen.entries()].reverse())o(s[0]);const r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Object.assign(r,n.def??n.schema);const i=e.external?.defs??{};for(const s of e.seen.entries()){const a=s[1];a.def&&a.defId&&(i[a.defId]=a.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?r.$defs=i:r.definitions=i);try{const s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:wo(t,"input",e.processors),output:wo(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function Pe(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Pe(o.element,n);if(o.type==="set")return Pe(o.valueType,n);if(o.type==="lazy")return Pe(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return Pe(o.innerType,n);if(o.type==="intersection")return Pe(o.left,n)||Pe(o.right,n);if(o.type==="record"||o.type==="map")return Pe(o.keyType,n)||Pe(o.valueType,n);if(o.type==="pipe")return Pe(o.in,n)||Pe(o.out,n);if(o.type==="object"){for(const r in o.shape)if(Pe(o.shape[r],n))return!0;return!1}if(o.type==="union"){for(const r of o.options)if(Pe(r,n))return!0;return!1}if(o.type==="tuple"){for(const r of o.items)if(Pe(r,n))return!0;return!!(o.rest&&Pe(o.rest,n))}return!1}const uf=(e,t={})=>n=>{const o=dl({...n,processors:t});return qe(e,o),pl(o,e),fl(o,e)},wo=(e,t,n={})=>o=>{const{libraryOptions:r,target:i}=o??{},s=dl({...r??{},target:i,io:t,processors:n});return qe(e,s),pl(s,e),fl(s,e)},mf={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},df=(e,t,n,o)=>{const r=n;r.type="string";const{minimum:i,maximum:s,format:a,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(r.minLength=i),typeof s=="number"&&(r.maxLength=s),a&&(r.format=mf[a]??a,r.format===""&&delete r.format,a==="time"&&delete r.format),c&&(r.contentEncoding=c),l&&l.size>0){const u=[...l];u.length===1?r.pattern=u[0].source:u.length>1&&(r.allOf=[...u.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},pf=(e,t,n,o)=>{const r=n,{minimum:i,maximum:s,format:a,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof a=="string"&&a.includes("int")?r.type="integer":r.type="number",typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u),typeof i=="number"&&(r.minimum=i,typeof u=="number"&&t.target!=="draft-04"&&(u>=i?delete r.minimum:delete r.exclusiveMinimum)),typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.maximum=c,r.exclusiveMaximum=!0):r.exclusiveMaximum=c),typeof s=="number"&&(r.maximum=s,typeof c=="number"&&t.target!=="draft-04"&&(c<=s?delete r.maximum:delete r.exclusiveMaximum)),typeof l=="number"&&(r.multipleOf=l)},ff=(e,t,n,o)=>{n.not={}},hf=(e,t,n,o)=>{},yf=(e,t,n,o)=>{const r=e._zod.def,i=Ga(r.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},gf=(e,t,n,o)=>{const r=e._zod.def,i=[];for(const s of r.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){const s=i[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),i.every(s=>typeof s=="boolean")&&(n.type="boolean"),i.every(s=>s===null)&&(n.type="null"),n.enum=i},bf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},wf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},vf=(e,t,n,o)=>{const r=n,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(r.minItems=s),typeof a=="number"&&(r.maxItems=a),r.type="array",r.items=qe(i.element,t,{...o,path:[...o.path,"items"]})},Sf=(e,t,n,o)=>{const r=n,i=e._zod.def;r.type="object",r.properties={};const s=i.shape;for(const c in s)r.properties[c]=qe(s[c],t,{...o,path:[...o.path,"properties",c]});const a=new Set(Object.keys(s)),l=new Set([...a].filter(c=>{const u=i.shape[c]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));l.size>0&&(r.required=Array.from(l)),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=qe(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},Cf=(e,t,n,o)=>{const r=e._zod.def,i=r.inclusive===!1,s=r.options.map((a,l)=>qe(a,t,{...o,path:[...o.path,i?"oneOf":"anyOf",l]}));i?n.oneOf=s:n.anyOf=s},kf=(e,t,n,o)=>{const r=e._zod.def,i=qe(r.left,t,{...o,path:[...o.path,"allOf",0]}),s=qe(r.right,t,{...o,path:[...o.path,"allOf",1]}),a=c=>"allOf"in c&&Object.keys(c).length===1,l=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];n.allOf=l},Tf=(e,t,n,o)=>{const r=n,i=e._zod.def;r.type="object";const s=i.keyType,l=s._zod.bag?.patterns;if(i.mode==="loose"&&l&&l.size>0){const u=qe(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(const f of l)r.patternProperties[f.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=qe(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=qe(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});const c=s._zod.values;if(c){const u=[...c].filter(f=>typeof f=="string"||typeof f=="number");u.length>0&&(r.required=u)}},xf=(e,t,n,o)=>{const r=e._zod.def,i=qe(r.innerType,t,o),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=r.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},_f=(e,t,n,o)=>{const r=e._zod.def;qe(r.innerType,t,o);const i=t.seen.get(e);i.ref=r.innerType},If=(e,t,n,o)=>{const r=e._zod.def;qe(r.innerType,t,o);const i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},Rf=(e,t,n,o)=>{const r=e._zod.def;qe(r.innerType,t,o);const i=t.seen.get(e);i.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},Nf=(e,t,n,o)=>{const r=e._zod.def;qe(r.innerType,t,o);const i=t.seen.get(e);i.ref=r.innerType;let s;try{s=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},Mf=(e,t,n,o)=>{const r=e._zod.def,i=t.io==="input"?r.in._zod.def.type==="transform"?r.out:r.in:r.out;qe(i,t,o);const s=t.seen.get(e);s.ref=i},qf=(e,t,n,o)=>{const r=e._zod.def;qe(r.innerType,t,o);const i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0},hl=(e,t,n,o)=>{const r=e._zod.def;qe(r.innerType,t,o);const i=t.seen.get(e);i.ref=r.innerType},Af=A("ZodISODateTime",(e,t)=>{Pd.init(e,t),xe.init(e,t)});function Lf(e){return zp(Af,e)}const Ef=A("ZodISODate",(e,t)=>{Dd.init(e,t),xe.init(e,t)});function Pf(e){return jp(Ef,e)}const Df=A("ZodISOTime",(e,t)=>{$d.init(e,t),xe.init(e,t)});function $f(e){return Bp(Df,e)}const Of=A("ZodISODuration",(e,t)=>{Od.init(e,t),xe.init(e,t)});function Ff(e){return Kp(Of,e)}const zf=(e,t)=>{Va.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Nm(e,n)},flatten:{value:n=>Rm(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Cr,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Cr,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ye=A("ZodError",zf,{Parent:Error}),jf=Jr(Ye),Bf=Xr(Ye),Kf=Ko(Ye),Qf=Qo(Ye),Uf=Am(Ye),Gf=Lm(Ye),Yf=Em(Ye),Zf=Pm(Ye),Hf=Dm(Ye),Vf=$m(Ye),Wf=Om(Ye),Jf=Fm(Ye),Ie=A("ZodType",(e,t)=>(_e.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:wo(e,"input"),output:wo(e,"output")}}),e.toJSONSchema=uf(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(vt(t,{checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(n,o)=>St(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.parse=(n,o)=>jf(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Kf(e,n,o),e.parseAsync=async(n,o)=>Bf(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Qf(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>Uf(e,n,o),e.decode=(n,o)=>Gf(e,n,o),e.encodeAsync=async(n,o)=>Yf(e,n,o),e.decodeAsync=async(n,o)=>Zf(e,n,o),e.safeEncode=(n,o)=>Hf(e,n,o),e.safeDecode=(n,o)=>Vf(e,n,o),e.safeEncodeAsync=async(n,o)=>Wf(e,n,o),e.safeDecodeAsync=async(n,o)=>Jf(e,n,o),e.refine=(n,o)=>e.check(Uh(n,o)),e.superRefine=n=>e.check(Gh(n)),e.overwrite=n=>e.check(en(n)),e.optional=()=>Vi(e),e.exactOptional=()=>Ah(e),e.nullable=()=>Wi(e),e.nullish=()=>Vi(Wi(e)),e.nonoptional=n=>Oh(e,n),e.array=()=>Le(e),e.or=n=>nt([e,n]),e.and=n=>xh(e,n),e.transform=n=>Ji(e,Mh(n)),e.default=n=>Ph(e,n),e.prefault=n=>$h(e,n),e.catch=n=>zh(e,n),e.pipe=n=>Ji(e,n),e.readonly=()=>Kh(e),e.describe=n=>{const o=e.clone();return _n.add(o,{description:n}),o},Object.defineProperty(e,"description",{get(){return _n.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return _n.get(e);const o=e.clone();return _n.add(o,n[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),yl=A("_ZodString",(e,t)=>{ei.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(o,r,i)=>df(e,o,r);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...o)=>e.check(Zp(...o)),e.includes=(...o)=>e.check(Wp(...o)),e.startsWith=(...o)=>e.check(Jp(...o)),e.endsWith=(...o)=>e.check(Xp(...o)),e.min=(...o)=>e.check(bo(...o)),e.max=(...o)=>e.check(ul(...o)),e.length=(...o)=>e.check(ml(...o)),e.nonempty=(...o)=>e.check(bo(1,...o)),e.lowercase=o=>e.check(Hp(o)),e.uppercase=o=>e.check(Vp(o)),e.trim=()=>e.check(tf()),e.normalize=(...o)=>e.check(ef(...o)),e.toLowerCase=()=>e.check(nf()),e.toUpperCase=()=>e.check(of()),e.slugify=()=>e.check(rf())}),Xf=A("ZodString",(e,t)=>{ei.init(e,t),yl.init(e,t),e.email=n=>e.check(wp(eh,n)),e.url=n=>e.check(Tp(th,n)),e.jwt=n=>e.check(Fp(yh,n)),e.emoji=n=>e.check(xp(nh,n)),e.guid=n=>e.check(Ki(Yi,n)),e.uuid=n=>e.check(vp(Hn,n)),e.uuidv4=n=>e.check(Sp(Hn,n)),e.uuidv6=n=>e.check(Cp(Hn,n)),e.uuidv7=n=>e.check(kp(Hn,n)),e.nanoid=n=>e.check(_p(oh,n)),e.guid=n=>e.check(Ki(Yi,n)),e.cuid=n=>e.check(Ip(rh,n)),e.cuid2=n=>e.check(Rp(ih,n)),e.ulid=n=>e.check(Np(sh,n)),e.base64=n=>e.check(Dp(ph,n)),e.base64url=n=>e.check($p(fh,n)),e.xid=n=>e.check(Mp(ah,n)),e.ksuid=n=>e.check(qp(lh,n)),e.ipv4=n=>e.check(Ap(ch,n)),e.ipv6=n=>e.check(Lp(uh,n)),e.cidrv4=n=>e.check(Ep(mh,n)),e.cidrv6=n=>e.check(Pp(dh,n)),e.e164=n=>e.check(Op(hh,n)),e.datetime=n=>e.check(Lf(n)),e.date=n=>e.check(Pf(n)),e.time=n=>e.check($f(n)),e.duration=n=>e.check(Ff(n))});function T(e){return bp(Xf,e)}const xe=A("ZodStringFormat",(e,t)=>{ke.init(e,t),yl.init(e,t)}),eh=A("ZodEmail",(e,t)=>{_d.init(e,t),xe.init(e,t)}),Yi=A("ZodGUID",(e,t)=>{Td.init(e,t),xe.init(e,t)}),Hn=A("ZodUUID",(e,t)=>{xd.init(e,t),xe.init(e,t)}),th=A("ZodURL",(e,t)=>{Id.init(e,t),xe.init(e,t)}),nh=A("ZodEmoji",(e,t)=>{Rd.init(e,t),xe.init(e,t)}),oh=A("ZodNanoID",(e,t)=>{Nd.init(e,t),xe.init(e,t)}),rh=A("ZodCUID",(e,t)=>{Md.init(e,t),xe.init(e,t)}),ih=A("ZodCUID2",(e,t)=>{qd.init(e,t),xe.init(e,t)}),sh=A("ZodULID",(e,t)=>{Ad.init(e,t),xe.init(e,t)}),ah=A("ZodXID",(e,t)=>{Ld.init(e,t),xe.init(e,t)}),lh=A("ZodKSUID",(e,t)=>{Ed.init(e,t),xe.init(e,t)}),ch=A("ZodIPv4",(e,t)=>{Fd.init(e,t),xe.init(e,t)}),uh=A("ZodIPv6",(e,t)=>{zd.init(e,t),xe.init(e,t)}),mh=A("ZodCIDRv4",(e,t)=>{jd.init(e,t),xe.init(e,t)}),dh=A("ZodCIDRv6",(e,t)=>{Bd.init(e,t),xe.init(e,t)}),ph=A("ZodBase64",(e,t)=>{Kd.init(e,t),xe.init(e,t)}),fh=A("ZodBase64URL",(e,t)=>{Ud.init(e,t),xe.init(e,t)}),hh=A("ZodE164",(e,t)=>{Gd.init(e,t),xe.init(e,t)}),yh=A("ZodJWT",(e,t)=>{Zd.init(e,t),xe.init(e,t)}),gl=A("ZodNumber",(e,t)=>{sl.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(o,r,i)=>pf(e,o,r),e.gt=(o,r)=>e.check(Ui(o,r)),e.gte=(o,r)=>e.check(cr(o,r)),e.min=(o,r)=>e.check(cr(o,r)),e.lt=(o,r)=>e.check(Qi(o,r)),e.lte=(o,r)=>e.check(lr(o,r)),e.max=(o,r)=>e.check(lr(o,r)),e.int=o=>e.check(Zi(o)),e.safe=o=>e.check(Zi(o)),e.positive=o=>e.check(Ui(0,o)),e.nonnegative=o=>e.check(cr(0,o)),e.negative=o=>e.check(Qi(0,o)),e.nonpositive=o=>e.check(lr(0,o)),e.multipleOf=(o,r)=>e.check(Gi(o,r)),e.step=(o,r)=>e.check(Gi(o,r)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function gt(e){return Qp(gl,e)}const gh=A("ZodNumberFormat",(e,t)=>{Hd.init(e,t),gl.init(e,t)});function Zi(e){return Up(gh,e)}const bh=A("ZodUnknown",(e,t)=>{Vd.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hf()});function Hi(){return Gp(bh)}const wh=A("ZodNever",(e,t)=>{Wd.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ff(e,n,o)});function vh(e){return Yp(wh,e)}const Sh=A("ZodArray",(e,t)=>{Jd.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>vf(e,n,o,r),e.element=t.element,e.min=(n,o)=>e.check(bo(n,o)),e.nonempty=n=>e.check(bo(1,n)),e.max=(n,o)=>e.check(ul(n,o)),e.length=(n,o)=>e.check(ml(n,o)),e.unwrap=()=>e.element});function Le(e,t){return sf(Sh,e,t)}const Ch=A("ZodObject",(e,t)=>{ep.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sf(e,n,o,r),ye(e,"shape",()=>t.shape),e.keyof=()=>Go(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Hi()}),e.loose=()=>e.clone({...e._zod.def,catchall:Hi()}),e.strict=()=>e.clone({...e._zod.def,catchall:vh()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>km(e,n),e.safeExtend=n=>Tm(e,n),e.merge=n=>xm(e,n),e.pick=n=>Sm(e,n),e.omit=n=>Cm(e,n),e.partial=(...n)=>_m(bl,e,n[0]),e.required=(...n)=>Im(wl,e,n[0])});function be(e,t){const n={type:"object",shape:e??{},...X(t)};return new Ch(n)}const kh=A("ZodUnion",(e,t)=>{tp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Cf(e,n,o,r),e.options=t.options});function nt(e,t){return new kh({type:"union",options:e,...X(t)})}const Th=A("ZodIntersection",(e,t)=>{np.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>kf(e,n,o,r)});function xh(e,t){return new Th({type:"intersection",left:e,right:t})}const _h=A("ZodRecord",(e,t)=>{op.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Tf(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});function _t(e,t,n){return new _h({type:"record",keyType:e,valueType:t,...X(n)})}const Tr=A("ZodEnum",(e,t)=>{rp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(o,r,i)=>yf(e,o,r),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{const i={};for(const s of o)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Tr({...t,checks:[],...X(r),entries:i})},e.exclude=(o,r)=>{const i={...t.entries};for(const s of o)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Tr({...t,checks:[],...X(r),entries:i})}});function Go(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Tr({type:"enum",entries:n,...X(t)})}const Ih=A("ZodLiteral",(e,t)=>{ip.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>gf(e,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Rh(e,t){return new Ih({type:"literal",values:Array.isArray(e)?e:[e],...X(t)})}const Nh=A("ZodTransform",(e,t)=>{sp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>wf(e,n),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Qa(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Nn(i,n.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(Nn(s))}};const r=t.transform(n.value,n);return r instanceof Promise?r.then(i=>(n.value=i,n)):(n.value=r,n)}});function Mh(e){return new Nh({type:"transform",transform:e})}const bl=A("ZodOptional",(e,t)=>{cl.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hl(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Vi(e){return new bl({type:"optional",innerType:e})}const qh=A("ZodExactOptional",(e,t)=>{ap.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hl(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Ah(e){return new qh({type:"optional",innerType:e})}const Lh=A("ZodNullable",(e,t)=>{lp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Wi(e){return new Lh({type:"nullable",innerType:e})}const Eh=A("ZodDefault",(e,t)=>{cp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>If(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ph(e,t){return new Eh({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Za(t)}})}const Dh=A("ZodPrefault",(e,t)=>{up.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Rf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function $h(e,t){return new Dh({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Za(t)}})}const wl=A("ZodNonOptional",(e,t)=>{mp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_f(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Oh(e,t){return new wl({type:"nonoptional",innerType:e,...X(t)})}const Fh=A("ZodCatch",(e,t)=>{dp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Nf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function zh(e,t){return new Fh({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const jh=A("ZodPipe",(e,t)=>{pp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Mf(e,n,o,r),e.in=t.in,e.out=t.out});function Ji(e,t){return new jh({type:"pipe",in:e,out:t})}const Bh=A("ZodReadonly",(e,t)=>{fp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>qf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Kh(e){return new Bh({type:"readonly",innerType:e})}const Qh=A("ZodCustom",(e,t)=>{hp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>bf(e,n)});function Uh(e,t={}){return af(Qh,e,t)}function Gh(e){return lf(e)}const Ue={custom:"custom"},fe={required:"errors.required",emailInvalid:"errors.email.invalid",dateInvalid:"errors.date.invalid",companyQuestions:{commentRequired:"errors.companyQuestions.commentRequired"},checker:{requiredField:"checker.requiredField",requiredCompanyQuestionComment:"checker.requiredCompanyQuestionComment",requiredProductList:"checker.requiredProductList",requiredSmelterList:"checker.requiredSmelterList",invalidEmail:"checker.invalidEmail"},minerals:{tooManySelected:"errors.minerals.tooManySelected",selectAtLeastOne:"errors.minerals.selectAtLeastOne",enterAtLeastOne:"errors.minerals.enterAtLeastOne",otherRequired:"errors.minerals.otherRequired",otherNotAllowed:"errors.minerals.otherNotAllowed",tooMany:"errors.minerals.tooMany"}},Yh="not available",Zh=T().refine(e=>e.includes("@"),fe.emailInvalid);function Hh(e){return e.trim().toLowerCase()===Yh}const xr=T().refine(e=>Hh(e)||Zh.safeParse(e).success,fe.emailInvalid);function _r(e){return xr.safeParse(e).success}const Xi=T().regex(/^\d{4}-\d{2}-\d{2}$/,fe.dateInvalid);function Vh(e){let t;switch(e.type){case"email":t=xr;break;case"date":t=Xi;break;default:t=T();break}return e.required===!0?e.type==="email"?xr.min(1,fe.required):e.type==="date"?Xi.min(1,fe.required):T().min(1,fe.required):t.optional()}function Wh(e){const t={};for(const n of e.companyInfoFields)t[n.key]=Vh(n);return be(t)}function Jh(e){const t={};for(const n of e.questions)if(n.perMineral){const o={};for(const r of e.mineralScope.minerals)o[r.key]=T().optional();t[n.key]=be(o)}else t[n.key]=T().optional();return be(t)}function Xh(e){const t={};for(const n of e.questions)if(n.perMineral){const o={};for(const r of e.mineralScope.minerals)o[r.key]=T().optional();t[n.key]=be(o)}else t[n.key]=T().optional();return be(t)}function ey(e){const t={};for(const n of e.companyQuestions){if(n.perMineral){const o={};for(const r of e.mineralScope.minerals)o[r.key]=T().optional();t[n.key]=be(o)}else t[n.key]=T().optional();if(n.hasCommentField)if(n.perMineral){const o={};for(const r of e.mineralScope.minerals)o[r.key]=T().optional();t[`${n.key}_comment`]=be(o)}else t[`${n.key}_comment`]=T().optional()}return be(t).superRefine((n,o)=>{const r=n;for(const i of e.companyQuestions){if(!i.hasCommentField)continue;const s=i.commentRequiredWhen??[],a=`${i.key}_comment`;if(i.perMineral){const u=r[i.key]&&typeof r[i.key]=="object"?r[i.key]:{},f=r[a]&&typeof r[a]=="object"?r[a]:{};if(s.length===0)continue;for(const m of e.mineralScope.minerals){const d=typeof u[m.key]=="string"?u[m.key]:"";!d||!s.includes(d)||(typeof f[m.key]=="string"?f[m.key]:"").trim()||o.addIssue({code:Ue.custom,path:[a,m.key],message:fe.companyQuestions.commentRequired})}continue}const l=typeof r[i.key]=="string"?r[i.key]:"";if(!l||!s.includes(l))continue;const c=r[a];typeof c=="string"&&c.trim()||o.addIssue({code:Ue.custom,path:[a],message:fe.companyQuestions.commentRequired})}})}function ty(e){const t={metal:T().min(1),smelterLookup:T().optional(),smelterName:T().optional(),smelterCountry:T().optional(),smelterIdentification:T().optional(),sourceId:T().optional(),smelterStreet:T().optional(),smelterCity:T().optional(),smelterState:T().optional(),smelterContactName:T().optional(),smelterContactEmail:T().optional(),proposedNextSteps:T().optional(),mineName:T().optional(),mineCountry:T().optional(),recycledScrap:T().optional(),comments:T().optional()};return e.smelterList.hasCombinedColumn&&(t.combinedMetal=T().optional(),t.combinedSmelter=T().optional()),e.smelterList.hasIdColumn&&(t.smelterId=T().optional()),be(t)}function ny(e){return e.mineList.available?be({metal:T().min(1),mineName:T().optional(),mineCountry:T().optional(),mineId:T().optional(),mineIdSource:T().optional(),mineStreet:T().optional(),mineCity:T().optional(),mineProvince:T().optional(),mineDistrict:T().optional(),mineContactName:T().optional(),mineContactEmail:T().optional(),proposedNextSteps:T().optional(),smelterName:T().optional(),comments:T().optional()}):null}function oy(e){const t={productNumber:T().optional(),productName:T().optional(),comments:T().optional()};return t.requesterNumber=T().optional(),t.requesterName=T().optional(),be(t)}function ry(e,t,n){if(n.mineralScope.mode!=="dynamic-dropdown")return;const o=n.mineralScope.maxCount;if(o&&e.selectedMinerals.length>o&&t.addIssue({code:Ue.custom,path:["selectedMinerals"],message:fe.minerals.tooManySelected}),e.selectedMinerals.length===0&&t.addIssue({code:Ue.custom,path:["selectedMinerals"],message:fe.minerals.selectAtLeastOne}),n.templateType!=="amrt")return;const r=e.selectedMinerals.includes("other"),i=e.customMinerals.map(a=>a.trim()).filter(Boolean),s=e.selectedMinerals.filter(a=>a!=="other").length;o&&s+i.length>o&&t.addIssue({code:Ue.custom,path:["selectedMinerals"],message:fe.minerals.tooManySelected}),r&&i.length===0&&t.addIssue({code:Ue.custom,path:["customMinerals",0],message:fe.minerals.otherRequired}),!r&&i.length>0&&i.forEach((a,l)=>{t.addIssue({code:Ue.custom,path:["customMinerals",l],message:fe.minerals.otherNotAllowed})})}function iy(e,t,n){if(n.mineralScope.mode!=="free-text")return;const o=n.mineralScope.maxCount??e.customMinerals.length;e.customMinerals.some(i=>i.trim())||t.addIssue({code:Ue.custom,path:["customMinerals"],message:fe.minerals.enterAtLeastOne}),o!==void 0&&e.customMinerals.length>o&&t.addIssue({code:Ue.custom,path:["customMinerals"],message:fe.minerals.tooMany})}function sy(e,t,n){n.templateType==="amrt"&&e.mineralsScope.forEach((o,r)=>{const i=o.mineral?.trim(),s=o.reason?.trim();i&&!s&&t.addIssue({code:Ue.custom,path:["mineralsScope",r,"reason"],message:fe.required}),!i&&s&&t.addIssue({code:Ue.custom,path:["mineralsScope",r,"mineral"],message:fe.required})})}function ay(e){const t=ny(e)??be({}),n=be({id:T(),mineral:T(),reason:T()});return be({companyInfo:Wh(e),selectedMinerals:Le(T()),customMinerals:Le(T()),questions:Jh(e),questionComments:Xh(e),companyQuestions:ey(e),mineralsScope:Le(n),smelterList:Le(ty(e)),mineList:Le(t),productList:Le(oy())}).superRefine((r,i)=>{ry(r,i,e),iy(r,i,e),sy(r,i,e)})}function es(e){return e.split(/[-_]/).map(t=>t&&t[0].toUpperCase()+t.slice(1)).join(" ")}function tn(e){return typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e))}function vl(e){const t={};for(const l of e.companyInfoFields)t[l.key]="";const n={},o={};for(const l of e.questions)if(l.perMineral){const c={};for(const u of e.mineralScope.minerals)c[u.key]="";n[l.key]=c,o[l.key]={...c}}else n[l.key]="",o[l.key]="";const r={};for(const l of e.companyQuestions){if(l.perMineral){const c={};for(const u of e.mineralScope.minerals)c[u.key]="";r[l.key]=c}else r[l.key]="";if(l.hasCommentField)if(l.perMineral){const c={};for(const u of e.mineralScope.minerals)c[u.key]="";r[`${l.key}_comment`]=c}else r[`${l.key}_comment`]=""}const i=e.mineralScope.minerals.map(l=>l.key),s=e.mineralScope.mode==="fixed"?i:[],a=e.mineralScope.mode==="free-text"?i.map((l,c)=>{const u=e.mineralScope.defaultCustomMinerals;return u&&u.length>0?u[c]??es(l):es(l)}):[];return{companyInfo:t,selectedMinerals:s,customMinerals:a,questions:n,questionComments:o,companyQuestions:r,mineralsScope:[],smelterList:[],mineList:[],productList:[]}}const ly=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],cy=/^\d{4}-\d{2}-\d{2}$/,uy=/^-?\d+$/,my=9,dy=10,py=11,fy=13;function hy(e){if(!e)return"";const[t,n,o]=e.split("-");if(!t||!n||!o)return e;const r=parseInt(n,10)-1;return r<0||r>11?e:`${o}-${ly[r]}-${t}`}function ts(e){if(!Number.isFinite(e))return null;const t=new Date(e);if(Number.isNaN(t.getTime()))return null;const n=t.getUTCFullYear(),o=String(t.getUTCMonth()+1).padStart(2,"0"),r=String(t.getUTCDate()).padStart(2,"0");return`${n}-${o}-${r}`}function yy(e,t){if(t){const r=t.replace(/^[+-]/,"").replace(/^0+(?=\d)/,"");return r.length>0?r.length:1}const n=Math.trunc(Math.abs(e));return n===0?1:String(n).length}function ns(e,t){if(!Number.isInteger(e))return null;const n=yy(e,t);return n>=py&&n<=fy?ts(e):n>=my&&n<=dy?ts(e*1e3):null}function Sl(e){if(e==null)return"";if(typeof e=="number")return Number.isFinite(e)?ns(e)??String(e):String(e);if(typeof e=="string"){const t=e.trim();if(!t)return"";if(cy.test(t)||!uy.test(t))return t;const n=Number(t);return Number.isFinite(n)?ns(n,t)??t:t}return String(e)}const Cl=["smelter not listed","Smelter not listed","Smelter Not Listed"],kl=["smelter not yet identified","Smelter not yet identified","Smelter Not Yet Identified"];function Ir(e){const t=e.toLowerCase().trim();return Cl.some(n=>n.toLowerCase()===t)?"Smelter not listed":kl.some(n=>n.toLowerCase()===t)?"Smelter not yet identified":e}function Yt(e){return Cl.some(t=>t.toLowerCase()===e.toLowerCase().trim())}function vo(e){return kl.some(t=>t.toLowerCase()===e.toLowerCase().trim())}var Tl=Symbol.for("immer-nothing"),os=Symbol.for("immer-draftable"),ce=Symbol.for("immer-state"),gy=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function De(e,...t){if(process.env.NODE_ENV!=="production"){const n=gy[e],o=It(n)?n.apply(null,t):n;throw new Error(`[Immer] ${o}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Be=Object,Zt=Be.getPrototypeOf,So="constructor",Yo="prototype",Rr="configurable",Co="enumerable",oo="writable",Mn="value",bt=e=>!!e&&!!e[ce];function We(e){return e?xl(e)||Zo(e)||!!e[os]||!!e[So]?.[os]||Ho(e)||Vo(e):!1}var by=Be[Yo][So].toString(),rs=new WeakMap;function xl(e){if(!e||!Wo(e))return!1;const t=Zt(e);if(t===null||t===Be[Yo])return!0;const n=Be.hasOwnProperty.call(t,So)&&t[So];if(n===Object)return!0;if(!It(n))return!1;let o=rs.get(n);return o===void 0&&(o=Function.toString.call(n),rs.set(n,o)),o===by}function Fn(e,t,n=!0){zn(e)===0?(n?Reflect.ownKeys(e):Be.keys(e)).forEach(r=>{t(r,e[r],e)}):e.forEach((o,r)=>t(r,o,e))}function zn(e){const t=e[ce];return t?t.type_:Zo(e)?1:Ho(e)?2:Vo(e)?3:0}var is=(e,t,n=zn(e))=>n===2?e.has(t):Be[Yo].hasOwnProperty.call(e,t),Nr=(e,t,n=zn(e))=>n===2?e.get(t):e[t],ko=(e,t,n,o=zn(e))=>{o===2?e.set(t,n):o===3?e.add(n):e[t]=n};function wy(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Zo=Array.isArray,Ho=e=>e instanceof Map,Vo=e=>e instanceof Set,Wo=e=>typeof e=="object",It=e=>typeof e=="function",ur=e=>typeof e=="boolean";function vy(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Sy=e=>Wo(e)?e?.[ce]:null,Ne=e=>e.copy_||e.base_,Cy=e=>{const t=Sy(e);return t?t.copy_??t.base_:e},ti=e=>e.modified_?e.copy_:e.base_;function Mr(e,t){if(Ho(e))return new Map(e);if(Vo(e))return new Set(e);if(Zo(e))return Array[Yo].slice.call(e);const n=xl(e);if(t===!0||t==="class_only"&&!n){const o=Be.getOwnPropertyDescriptors(e);delete o[ce];let r=Reflect.ownKeys(o);for(let i=0;i<r.length;i++){const s=r[i],a=o[s];a[oo]===!1&&(a[oo]=!0,a[Rr]=!0),(a.get||a.set)&&(o[s]={[Rr]:!0,[oo]:!0,[Co]:a[Co],[Mn]:e[s]})}return Be.create(Zt(e),o)}else{const o=Zt(e);if(o!==null&&n)return{...e};const r=Be.create(o);return Be.assign(r,e)}}function ni(e,t=!1){return Jo(e)||bt(e)||!We(e)||(zn(e)>1&&Be.defineProperties(e,{set:Vn,add:Vn,clear:Vn,delete:Vn}),Be.freeze(e),t&&Fn(e,(n,o)=>{ni(o,!0)},!1)),e}function ky(){De(2)}var Vn={[Mn]:ky};function Jo(e){return e===null||!Wo(e)?!0:Be.isFrozen(e)}var qn="MapSet",qr="Patches",ss="ArrayMethods",To={};function Nt(e){const t=To[e];return t||De(0,e),t}var as=e=>!!To[e];function Ty(e,t){To[e]||(To[e]=t)}var An,xo=()=>An,xy=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:as(qn)?Nt(qn):void 0,arrayMethodsPlugin_:as(ss)?Nt(ss):void 0});function ls(e,t){t&&(e.patchPlugin_=Nt(qr),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ar(e){Lr(e),e.drafts_.forEach(_y),e.drafts_=null}function Lr(e){e===An&&(An=e.parent_)}var cs=e=>An=xy(An,e);function _y(e){const t=e[ce];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function us(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[ce].modified_&&(Ar(t),De(4)),We(e)&&(e=ms(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[ce].base_,e,t)}else e=ms(t,n);return Iy(t,e,!0),Ar(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Tl?e:void 0}function ms(e,t){if(Jo(t))return t;const n=t[ce];if(!n)return _o(t,e.handledSet_,e);if(!Xo(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:o}=n;if(o)for(;o.length>0;)o.pop()(e);Rl(n,e)}return n.copy_}function Iy(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ni(t,n)}function _l(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Xo=(e,t)=>e.scope_===t,Ry=[];function Il(e,t,n,o){const r=Ne(e),i=e.type_;if(o!==void 0&&Nr(r,o,i)===t){ko(r,o,n,i);return}if(!e.draftLocations_){const a=e.draftLocations_=new Map;Fn(r,(l,c)=>{if(bt(c)){const u=a.get(c)||[];u.push(l),a.set(c,u)}})}const s=e.draftLocations_.get(t)??Ry;for(const a of s)ko(r,a,n,i)}function Ny(e,t,n){e.callbacks_.push(function(r){const i=t;if(!i||!Xo(i,r))return;r.mapSetPlugin_?.fixSetContents(i);const s=ti(i);Il(e,i.draft_??i,s,n),Rl(i,r)})}function Rl(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:o}=t;if(o){const r=o.getPath(e);r&&o.generatePatches_(e,r,t)}_l(e)}}function Er(e,t,n){const{scope_:o}=e;if(bt(n)){const r=n[ce];Xo(r,o)&&r.callbacks_.push(function(){ro(e);const s=ti(r);Il(e,n,s,t)})}else We(n)&&e.callbacks_.push(function(){const i=Ne(e);e.type_===3?i.has(n)&&_o(n,o.handledSet_,o):Nr(i,t,e.type_)===n&&o.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&_o(Nr(e.copy_,t,e.type_),o.handledSet_,o)})}function _o(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||bt(e)||t.has(e)||!We(e)||Jo(e)||(t.add(e),Fn(e,(o,r)=>{if(bt(r)){const i=r[ce];if(Xo(i,n)){const s=ti(i);ko(e,o,s,e.type_),_l(i)}}else We(r)&&_o(r,t,n)})),e}function My(e,t){const n=Zo(e),o={type_:n?1:0,scope_:t?t.scope_:xo(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let r=o,i=Io;n&&(r=[o],i=Ln);const{revoke:s,proxy:a}=Proxy.revocable(r,i);return o.draft_=a,o.revoke_=s,[a,o]}var Io={get(e,t){if(t===ce)return e;let n=e.scope_.arrayMethodsPlugin_;const o=e.type_===1&&typeof t=="string";if(o&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const r=Ne(e);if(!is(r,t,e.type_))return qy(e,r,t);const i=r[t];if(e.finalized_||!We(i)||o&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&vy(t))return i;if(i===mr(e.base_,t)){ro(e);const s=e.type_===1?+t:t,a=En(e.scope_,i,e,s);return e.copy_[s]=a}return i},has(e,t){return t in Ne(e)},ownKeys(e){return Reflect.ownKeys(Ne(e))},set(e,t,n){const o=Nl(Ne(e),t);if(o?.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){const r=mr(Ne(e),t),i=r?.[ce];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(wy(n,r)&&(n!==void 0||is(e.base_,t,e.type_)))return!0;ro(e),st(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),Er(e,t,n)),!0},deleteProperty(e,t){return ro(e),mr(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),st(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Ne(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o&&{[oo]:!0,[Rr]:e.type_!==1||t!=="length",[Co]:o[Co],[Mn]:n[t]}},defineProperty(){De(11)},getPrototypeOf(e){return Zt(e.base_)},setPrototypeOf(){De(12)}},Ln={};for(let e in Io){let t=Io[e];Ln[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}Ln.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&De(13),Ln.set.call(this,e,t,void 0)};Ln.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&De(14),Io.set.call(this,e[0],t,n,e[0])};function mr(e,t){const n=e[ce];return(n?Ne(n):e)[t]}function qy(e,t,n){const o=Nl(t,n);return o?Mn in o?o[Mn]:o.get?.call(e.draft_):void 0}function Nl(e,t){if(!(t in e))return;let n=Zt(e);for(;n;){const o=Object.getOwnPropertyDescriptor(n,t);if(o)return o;n=Zt(n)}}function st(e){e.modified_||(e.modified_=!0,e.parent_&&st(e.parent_))}function ro(e){e.copy_||(e.assigned_=new Map,e.copy_=Mr(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ay=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,n,o)=>{if(It(t)&&!It(n)){const i=n;n=t;const s=this;return function(l=i,...c){return s.produce(l,u=>n.call(this,u,...c))}}It(n)||De(6),o!==void 0&&!It(o)&&De(7);let r;if(We(t)){const i=cs(this),s=En(i,t,void 0);let a=!0;try{r=n(s),a=!1}finally{a?Ar(i):Lr(i)}return ls(i,o),us(r,i)}else if(!t||!Wo(t)){if(r=n(t),r===void 0&&(r=t),r===Tl&&(r=void 0),this.autoFreeze_&&ni(r,!0),o){const i=[],s=[];Nt(qr).generateReplacementPatches_(t,r,{patches_:i,inversePatches_:s}),o(i,s)}return r}else De(1,t)},this.produceWithPatches=(t,n)=>{if(It(t))return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let o,r;return[this.produce(t,n,(s,a)=>{o=s,r=a}),o,r]},ur(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),ur(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),ur(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){We(e)||De(8),bt(e)&&(e=Ly(e));const t=cs(this),n=En(t,e,void 0);return n[ce].isManual_=!0,Lr(t),n}finishDraft(e,t){const n=e&&e[ce];(!n||!n.isManual_)&&De(9);const{scope_:o}=n;return ls(o,t),us(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(r.path.length===0&&r.op==="replace"){e=r.value;break}}n>-1&&(t=t.slice(n+1));const o=Nt(qr).applyPatches_;return bt(e)?o(e,t):this.produce(e,r=>o(r,t))}};function En(e,t,n,o){const[r,i]=Ho(t)?Nt(qn).proxyMap_(t,n):Vo(t)?Nt(qn).proxySet_(t,n):My(t,n);return(n?.scope_??xo()).drafts_.push(r),i.callbacks_=n?.callbacks_??[],i.key_=o,n&&o!==void 0?Ny(n,i,o):i.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(i);const{patchPlugin_:c}=l;i.modified_&&c&&c.generatePatches_(i,[],l)}),r}function Ly(e){return bt(e)||De(10,e),Ml(e)}function Ml(e){if(!We(e)||Jo(e))return e;const t=e[ce];let n,o=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Mr(e,t.scope_.immer_.useStrictShallowCopy_),o=t.scope_.immer_.shouldUseStrictIteration()}else n=Mr(e,!0);return Fn(n,(r,i)=>{ko(n,r,Ml(i))},o),t&&(t.finalized_=!1),n}function Ey(){class e extends Map{constructor(c,u){super(),this[ce]={type_:2,parent_:u,scope_:u?u.scope_:xo(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:c,draft_:this,isManual_:!1,revoked_:!1,callbacks_:[]}}get size(){return Ne(this[ce]).size}has(c){return Ne(this[ce]).has(c)}set(c,u){const f=this[ce];return s(f),(!Ne(f).has(c)||Ne(f).get(c)!==u)&&(n(f),st(f),f.assigned_.set(c,!0),f.copy_.set(c,u),f.assigned_.set(c,!0),Er(f,c,u)),this}delete(c){if(!this.has(c))return!1;const u=this[ce];return s(u),n(u),st(u),u.base_.has(c)?u.assigned_.set(c,!1):u.assigned_.delete(c),u.copy_.delete(c),!0}clear(){const c=this[ce];s(c),Ne(c).size&&(n(c),st(c),c.assigned_=new Map,Fn(c.base_,u=>{c.assigned_.set(u,!1)}),c.copy_.clear())}forEach(c,u){const f=this[ce];Ne(f).forEach((m,d,h)=>{c.call(u,this.get(d),d,this)})}get(c){const u=this[ce];s(u);const f=Ne(u).get(c);if(u.finalized_||!We(f)||f!==u.base_.get(c))return f;const m=En(u.scope_,f,u,c);return n(u),u.copy_.set(c,m),m}keys(){return Ne(this[ce]).keys()}values(){const c=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const u=c.next();return u.done?u:{done:!1,value:this.get(u.value)}}}}entries(){const c=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const u=c.next();if(u.done)return u;const f=this.get(u.value);return{done:!1,value:[u.value,f]}}}}[Symbol.iterator](){return this.entries()}}function t(l,c){const u=new e(l,c);return[u,u[ce]]}function n(l){l.copy_||(l.assigned_=new Map,l.copy_=new Map(l.base_))}class o extends Set{constructor(c,u){super(),this[ce]={type_:3,parent_:u,scope_:u?u.scope_:xo(),modified_:!1,finalized_:!1,copy_:void 0,base_:c,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1,assigned_:void 0,callbacks_:[]}}get size(){return Ne(this[ce]).size}has(c){const u=this[ce];return s(u),u.copy_?!!(u.copy_.has(c)||u.drafts_.has(c)&&u.copy_.has(u.drafts_.get(c))):u.base_.has(c)}add(c){const u=this[ce];return s(u),this.has(c)||(i(u),st(u),u.copy_.add(c),Er(u,c,c)),this}delete(c){if(!this.has(c))return!1;const u=this[ce];return s(u),i(u),st(u),u.copy_.delete(c)||(u.drafts_.has(c)?u.copy_.delete(u.drafts_.get(c)):!1)}clear(){const c=this[ce];s(c),Ne(c).size&&(i(c),st(c),c.copy_.clear())}values(){const c=this[ce];return s(c),i(c),c.copy_.values()}entries(){const c=this[ce];return s(c),i(c),c.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(c,u){const f=this.values();let m=f.next();for(;!m.done;)c.call(u,m.value,m.value,this),m=f.next()}}function r(l,c){const u=new o(l,c);return[u,u[ce]]}function i(l){l.copy_||(l.copy_=new Set,l.base_.forEach(c=>{if(We(c)){const u=En(l.scope_,c,l,c);l.drafts_.set(c,u),l.copy_.add(u)}else l.copy_.add(c)}))}function s(l){l.revoked_&&De(3,JSON.stringify(Ne(l)))}function a(l){if(l.type_===3&&l.copy_){const c=new Set(l.copy_);l.copy_.clear(),c.forEach(u=>{l.copy_.add(Cy(u))})}}Ty(qn,{proxyMap_:t,proxySet_:r,fixSetContents:a})}var Py=new Ay,Dy=Py.produce;const ds=e=>{let t;const n=new Set,o=(c,u)=>{const f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){const m=t;t=u??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(d=>d(t,m))}},r=()=>t,a={setState:o,getState:r,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(o,r,a);return a},$y=(e=>e?ds(e):ds),Oy=e=>e;function Fy(e,t=Oy){const n=re.useSyncExternalStore(e.subscribe,re.useCallback(()=>t(e.getState()),[e,t]),re.useCallback(()=>t(e.getInitialState()),[e,t]));return re.useDebugValue(n),n}const zy=e=>(t,n,o)=>(o.setState=(r,i,...s)=>{const a=typeof r=="function"?Dy(r):r;return t(a,i,...s)},e(o.setState,n,o)),jy=zy,ql=re.createContext(null);function Kt(e){const t=re.useContext(ql);if(!t)throw new Error("useTemplateStore must be used within TemplateProvider");return Fy(t,e)}Ey();const Wn={companyInfo:{},customMinerals:{},mineralsScopeRows:{},questions:{},companyQuestions:{}};function Al(e,t,n,o){if(o){const r=e[t];typeof r=="object"?r[o]=n:e[t]={[o]:n}}else e[t]=n}function ps(e,t,n,o,r){if(t.perMineral){if(!o)return;Al(e,n,r,o)}else e[n]=r}function By(e){return{...e,companyInfo:{...e.companyInfo,authorizationDate:Sl(e.companyInfo.authorizationDate)}}}function fs(e){const t={companyInfo:{},customMinerals:{},mineralsScopeRows:{},questions:{},companyQuestions:{}};for(const n of e){const[o,...r]=n.path,i=n.message;switch(o){case"companyInfo":{const s=r[0];typeof s=="string"&&(t.companyInfo[s]=i);break}case"selectedMinerals":t.mineralsScope=i;break;case"customMinerals":{const s=r[0];typeof s=="number"&&(t.customMinerals[s]=i);break}case"mineralsScope":{const s=r[0],a=r[1];if(typeof s=="number"&&(a==="mineral"||a==="reason")){const l=t.mineralsScopeRows[s]??{};l[a]=i,t.mineralsScopeRows[s]=l}break}case"questions":{const s=r[0],a=r[1];if(typeof s=="string")if(typeof a=="string"){const l=t.questions[s];l&&typeof l=="object"?l[a]=i:t.questions[s]={[a]:i}}else t.questions[s]=i;break}case"companyQuestions":{const s=r[0],a=r[1];if(typeof s=="string")if(typeof a=="string"){const l=t.companyQuestions[s];l&&typeof l=="object"?l[a]=i:t.companyQuestions[s]={[a]:i}}else t.companyQuestions[s]=i;break}}}return t}function dr(e){return{companyInfo:e.companyInfo,selectedMinerals:e.selectedMinerals,customMinerals:e.customMinerals,questions:e.questions,questionComments:e.questionComments,companyQuestions:e.companyQuestions,mineralsScope:e.mineralsScope,smelterList:e.smelterList,mineList:e.mineList,productList:e.productList}}function hs(e,t,n,o){const r=Bo(e,t),i=vl(r),s=ay(r),a=new Map(r.questions.map(d=>[d.key,d])),l=r.questions.map(d=>d.key);function c(d){const h=s.safeParse(dr(d));return h.success?Wn:fs(h.error.issues)}let u=!1;function f(d,h){u||(u=!0,queueMicrotask(()=>{u=!1;const g=h(),b=c(g);b!==g.errors&&d({errors:b})}))}function m(d,h,g,b,w){if(h!=="Q1"&&h!=="Q2")return;const S={...dr(d).questions};if(w.perMineral&&g){const k=typeof S[h]=="object"?S[h]:{};S[h]={...k,[g]:b}}else w.perMineral||(S[h]=b);const v=Ka(r,S,w.perMineral?g??void 0:void 0),C=l.indexOf("Q2");if(C<0)return;const N=l.slice(C+1),_=(k,L)=>{const j=a.get(k);if(j)if(j.perMineral&&L){const x=d.questions[k];typeof x=="object"&&(x[L]="");const q=d.questionComments[k];typeof q=="object"&&(q[L]="")}else j.perMineral||(d.questions[k]="",d.questionComments[k]="")};v.q2Enabled?v.laterQuestionsEnabled||N.forEach(k=>_(k,g)):(_("Q2",g),N.forEach(k=>_(k,g)))}return $y()(jy((d,h)=>({templateType:e,versionId:t,versionDef:r,readOnly:n,integrations:o,...i,errors:Wn,isDirty:!1,setCompanyInfoField:(g,b)=>{h().readOnly||(d(w=>{w.companyInfo[g]=b,w.isDirty=!0}),f(d,h))},setSelectedMinerals:g=>{h().readOnly||(d(b=>{b.selectedMinerals=g,b.isDirty=!0}),f(d,h))},setCustomMinerals:g=>{h().readOnly||(d({customMinerals:g,isDirty:!0}),f(d,h))},setQuestionValue:(g,b,w)=>{h().readOnly||(d(S=>{const v=a.get(g);v&&(ps(S.questions,v,g,b,w),S.isDirty=!0,m(S,g,b,w,v))}),f(d,h))},setQuestionComment:(g,b,w)=>{h().readOnly||(d(S=>{const v=a.get(g);v&&(ps(S.questionComments,v,g,b,w),S.isDirty=!0)}),f(d,h))},setCompanyQuestionValue:(g,b,w)=>{h().readOnly||(d(S=>{Al(S.companyQuestions,g,b,w),S.isDirty=!0}),f(d,h))},setMineralsScope:g=>{h().readOnly||(d({mineralsScope:g,isDirty:!0}),f(d,h))},setSmelterList:g=>{h().readOnly||(d({smelterList:g,isDirty:!0}),f(d,h))},setMineList:g=>{h().readOnly||(d({mineList:g,isDirty:!0}),f(d,h))},setProductList:g=>{h().readOnly||(d({productList:g,isDirty:!0}),f(d,h))},setFormData:g=>{d({...By(g),isDirty:!1}),f(d,h)},validateForm:async()=>{const g=h(),b=s.safeParse(dr(g));return b.success?(d({errors:Wn}),!0):(d({errors:fs(b.error.issues)}),!1)},resetForm:()=>{d({...i,errors:Wn,isDirty:!1})}})))}function Ky({templateType:e,versionId:t,readOnly:n=!1,integrations:o,children:r}){const i=`${e}:${t}`,[s,a]=re.useState(i),[l,c]=re.useState(()=>hs(e,t,n,o));return i!==s&&(a(i),c(hs(e,t,n,o))),re.useEffect(()=>{l.setState({integrations:o,readOnly:n})},[l,o,n]),re.useEffect(()=>{if(typeof window>"u")return;const u=m=>{m.preventDefault(),m.returnValue=""},f=l.subscribe(m=>{m.isDirty?window.addEventListener("beforeunload",u):window.removeEventListener("beforeunload",u)});return()=>{f(),window.removeEventListener("beforeunload",u)}},[l]),p.jsx(ql.Provider,{value:l,children:r})}const ys=e=>Symbol.iterator in e,gs=e=>"entries"in e,bs=(e,t)=>{const n=e instanceof Map?e:new Map(e.entries()),o=t instanceof Map?t:new Map(t.entries());if(n.size!==o.size)return!1;for(const[r,i]of n)if(!o.has(r)||!Object.is(i,o.get(r)))return!1;return!0},Qy=(e,t)=>{const n=e[Symbol.iterator](),o=t[Symbol.iterator]();let r=n.next(),i=o.next();for(;!r.done&&!i.done;){if(!Object.is(r.value,i.value))return!1;r=n.next(),i=o.next()}return!!r.done&&!!i.done};function Uy(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:ys(e)&&ys(t)?gs(e)&&gs(t)?bs(e,t):Qy(e,t):bs({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function io(e){const t=re.useRef(void 0);return n=>{const o=e(n);return Uy(t.current,o)?t.current:t.current=o}}const Gy=e=>({templateType:e.templateType,versionId:e.versionId,versionDef:e.versionDef,readOnly:e.readOnly}),Yy=e=>({companyInfo:e.companyInfo,selectedMinerals:e.selectedMinerals,customMinerals:e.customMinerals,questions:e.questions,questionComments:e.questionComments,companyQuestions:e.companyQuestions}),Zy=e=>({mineralsScope:e.mineralsScope,smelterList:e.smelterList,mineList:e.mineList,productList:e.productList}),Hy=e=>e.errors,Vy=e=>e.integrations,Wy=e=>({setCompanyInfoField:e.setCompanyInfoField,setSelectedMinerals:e.setSelectedMinerals,setCustomMinerals:e.setCustomMinerals,setQuestionValue:e.setQuestionValue,setQuestionComment:e.setQuestionComment,setCompanyQuestionValue:e.setCompanyQuestionValue,setMineralsScope:e.setMineralsScope,setSmelterList:e.setSmelterList,setMineList:e.setMineList,setProductList:e.setProductList,setFormData:e.setFormData,validateForm:e.validateForm,resetForm:e.resetForm});function Fe(){const e=Kt(io(Gy)),t=Kt(io(Yy)),n=Kt(io(Zy));return re.useMemo(()=>({meta:e,form:t,lists:n}),[e,t,n])}function Ll(){return Kt(Hy)}function Et(){return Kt(io(Wy))}function El(){return Kt(Vy)}var Pl=typeof global=="object"&&global&&global.Object===Object&&global,Jy=typeof self=="object"&&self&&self.Object===Object&&self,ct=Pl||Jy||Function("return this")(),wt=ct.Symbol,Dl=Object.prototype,Xy=Dl.hasOwnProperty,eg=Dl.toString,an=wt?wt.toStringTag:void 0;function tg(e){var t=Xy.call(e,an),n=e[an];try{e[an]=void 0;var o=!0}catch{}var r=eg.call(e);return o&&(t?e[an]=n:delete e[an]),r}var ng=Object.prototype,og=ng.toString;function rg(e){return og.call(e)}var ig="[object Null]",sg="[object Undefined]",ws=wt?wt.toStringTag:void 0;function nn(e){return e==null?e===void 0?sg:ig:ws&&ws in Object(e)?tg(e):rg(e)}function Mt(e){return e!=null&&typeof e=="object"}var ag="[object Symbol]";function oi(e){return typeof e=="symbol"||Mt(e)&&nn(e)==ag}function ri(e,t){for(var n=-1,o=e==null?0:e.length,r=Array(o);++n<o;)r[n]=t(e[n],n,e);return r}var Je=Array.isArray,vs=wt?wt.prototype:void 0,Ss=vs?vs.toString:void 0;function $l(e){if(typeof e=="string")return e;if(Je(e))return ri(e,$l)+"";if(oi(e))return Ss?Ss.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function ii(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function si(e){return e}var lg="[object AsyncFunction]",cg="[object Function]",ug="[object GeneratorFunction]",mg="[object Proxy]";function Ol(e){if(!ii(e))return!1;var t=nn(e);return t==cg||t==ug||t==lg||t==mg}var pr=ct["__core-js_shared__"],Cs=(function(){var e=/[^.]+$/.exec(pr&&pr.keys&&pr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function dg(e){return!!Cs&&Cs in e}var pg=Function.prototype,fg=pg.toString;function Pt(e){if(e!=null){try{return fg.call(e)}catch{}try{return e+""}catch{}}return""}var hg=/[\\^$.*+?()[\]{}|]/g,yg=/^\[object .+?Constructor\]$/,gg=Function.prototype,bg=Object.prototype,wg=gg.toString,vg=bg.hasOwnProperty,Sg=RegExp("^"+wg.call(vg).replace(hg,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Cg(e){if(!ii(e)||dg(e))return!1;var t=Ol(e)?Sg:yg;return t.test(Pt(e))}function kg(e,t){return e?.[t]}function Dt(e,t){var n=kg(e,t);return Cg(n)?n:void 0}var Pr=Dt(ct,"WeakMap");function Tg(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function xg(){}var _g=800,Ig=16,Rg=Date.now;function Ng(e){var t=0,n=0;return function(){var o=Rg(),r=Ig-(o-n);if(n=o,r>0){if(++t>=_g)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Mg(e){return function(){return e}}var Ro=(function(){try{var e=Dt(Object,"defineProperty");return e({},"",{}),e}catch{}})(),qg=Ro?function(e,t){return Ro(e,"toString",{configurable:!0,enumerable:!1,value:Mg(t),writable:!0})}:si,Ag=Ng(qg);function Lg(e,t,n,o){for(var r=e.length,i=n+-1;++i<r;)if(t(e[i],i,e))return i;return-1}function Eg(e){return e!==e}function Pg(e,t,n){for(var o=n-1,r=e.length;++o<r;)if(e[o]===t)return o;return-1}function Dg(e,t,n){return t===t?Pg(e,t,n):Lg(e,Eg,n)}function Fl(e,t){var n=e==null?0:e.length;return!!n&&Dg(e,t,0)>-1}var $g=9007199254740991,Og=/^(?:0|[1-9]\d*)$/;function zl(e,t){var n=typeof e;return t=t??$g,!!t&&(n=="number"||n!="symbol"&&Og.test(e))&&e>-1&&e%1==0&&e<t}function Fg(e,t,n){t=="__proto__"&&Ro?Ro(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function jl(e,t){return e===t||e!==e&&t!==t}var ks=Math.max;function zg(e,t,n){return t=ks(t===void 0?e.length-1:t,0),function(){for(var o=arguments,r=-1,i=ks(o.length-t,0),s=Array(i);++r<i;)s[r]=o[t+r];r=-1;for(var a=Array(t+1);++r<t;)a[r]=o[r];return a[t]=n(s),Tg(e,this,a)}}function jg(e,t){return Ag(zg(e,t,si),e+"")}var Bg=9007199254740991;function ai(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Bg}function li(e){return e!=null&&ai(e.length)&&!Ol(e)}var Kg=Object.prototype;function Qg(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Kg;return e===n}function Ug(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var Gg="[object Arguments]";function Ts(e){return Mt(e)&&nn(e)==Gg}var Bl=Object.prototype,Yg=Bl.hasOwnProperty,Zg=Bl.propertyIsEnumerable,Kl=Ts((function(){return arguments})())?Ts:function(e){return Mt(e)&&Yg.call(e,"callee")&&!Zg.call(e,"callee")};function Hg(){return!1}var Ql=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xs=Ql&&typeof module=="object"&&module&&!module.nodeType&&module,Vg=xs&&xs.exports===Ql,_s=Vg?ct.Buffer:void 0,Wg=_s?_s.isBuffer:void 0,Dr=Wg||Hg,Jg="[object Arguments]",Xg="[object Array]",eb="[object Boolean]",tb="[object Date]",nb="[object Error]",ob="[object Function]",rb="[object Map]",ib="[object Number]",sb="[object Object]",ab="[object RegExp]",lb="[object Set]",cb="[object String]",ub="[object WeakMap]",mb="[object ArrayBuffer]",db="[object DataView]",pb="[object Float32Array]",fb="[object Float64Array]",hb="[object Int8Array]",yb="[object Int16Array]",gb="[object Int32Array]",bb="[object Uint8Array]",wb="[object Uint8ClampedArray]",vb="[object Uint16Array]",Sb="[object Uint32Array]",Se={};Se[pb]=Se[fb]=Se[hb]=Se[yb]=Se[gb]=Se[bb]=Se[wb]=Se[vb]=Se[Sb]=!0;Se[Jg]=Se[Xg]=Se[mb]=Se[eb]=Se[db]=Se[tb]=Se[nb]=Se[ob]=Se[rb]=Se[ib]=Se[sb]=Se[ab]=Se[lb]=Se[cb]=Se[ub]=!1;function Cb(e){return Mt(e)&&ai(e.length)&&!!Se[nn(e)]}function Ul(e){return function(t){return e(t)}}var Gl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,In=Gl&&typeof module=="object"&&module&&!module.nodeType&&module,kb=In&&In.exports===Gl,fr=kb&&Pl.process,Is=(function(){try{var e=In&&In.require&&In.require("util").types;return e||fr&&fr.binding&&fr.binding("util")}catch{}})(),Rs=Is&&Is.isTypedArray,Yl=Rs?Ul(Rs):Cb,Tb=Object.prototype,xb=Tb.hasOwnProperty;function _b(e,t){var n=Je(e),o=!n&&Kl(e),r=!n&&!o&&Dr(e),i=!n&&!o&&!r&&Yl(e),s=n||o||r||i,a=s?Ug(e.length,String):[],l=a.length;for(var c in e)xb.call(e,c)&&!(s&&(c=="length"||r&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||zl(c,l)))&&a.push(c);return a}function Ib(e,t){return function(n){return e(t(n))}}var Rb=Ib(Object.keys,Object),Nb=Object.prototype,Mb=Nb.hasOwnProperty;function qb(e){if(!Qg(e))return Rb(e);var t=[];for(var n in Object(e))Mb.call(e,n)&&n!="constructor"&&t.push(n);return t}function ci(e){return li(e)?_b(e):qb(e)}var Ab=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Lb=/^\w*$/;function ui(e,t){if(Je(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||oi(e)?!0:Lb.test(e)||!Ab.test(e)||t!=null&&e in Object(t)}var Pn=Dt(Object,"create");function Eb(){this.__data__=Pn?Pn(null):{},this.size=0}function Pb(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Db="__lodash_hash_undefined__",$b=Object.prototype,Ob=$b.hasOwnProperty;function Fb(e){var t=this.__data__;if(Pn){var n=t[e];return n===Db?void 0:n}return Ob.call(t,e)?t[e]:void 0}var zb=Object.prototype,jb=zb.hasOwnProperty;function Bb(e){var t=this.__data__;return Pn?t[e]!==void 0:jb.call(t,e)}var Kb="__lodash_hash_undefined__";function Qb(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Pn&&t===void 0?Kb:t,this}function qt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}qt.prototype.clear=Eb;qt.prototype.delete=Pb;qt.prototype.get=Fb;qt.prototype.has=Bb;qt.prototype.set=Qb;function Ub(){this.__data__=[],this.size=0}function er(e,t){for(var n=e.length;n--;)if(jl(e[n][0],t))return n;return-1}var Gb=Array.prototype,Yb=Gb.splice;function Zb(e){var t=this.__data__,n=er(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():Yb.call(t,n,1),--this.size,!0}function Hb(e){var t=this.__data__,n=er(t,e);return n<0?void 0:t[n][1]}function Vb(e){return er(this.__data__,e)>-1}function Wb(e,t){var n=this.__data__,o=er(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}function ut(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}ut.prototype.clear=Ub;ut.prototype.delete=Zb;ut.prototype.get=Hb;ut.prototype.has=Vb;ut.prototype.set=Wb;var Dn=Dt(ct,"Map");function Jb(){this.size=0,this.__data__={hash:new qt,map:new(Dn||ut),string:new qt}}function Xb(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function tr(e,t){var n=e.__data__;return Xb(t)?n[typeof t=="string"?"string":"hash"]:n.map}function ew(e){var t=tr(this,e).delete(e);return this.size-=t?1:0,t}function tw(e){return tr(this,e).get(e)}function nw(e){return tr(this,e).has(e)}function ow(e,t){var n=tr(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}function mt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}mt.prototype.clear=Jb;mt.prototype.delete=ew;mt.prototype.get=tw;mt.prototype.has=nw;mt.prototype.set=ow;var rw="Expected a function";function mi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(rw);var n=function(){var o=arguments,r=t?t.apply(this,o):o[0],i=n.cache;if(i.has(r))return i.get(r);var s=e.apply(this,o);return n.cache=i.set(r,s)||i,s};return n.cache=new(mi.Cache||mt),n}mi.Cache=mt;var iw=500;function sw(e){var t=mi(e,function(o){return n.size===iw&&n.clear(),o}),n=t.cache;return t}var aw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lw=/\\(\\)?/g,cw=sw(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(aw,function(n,o,r,i){t.push(r?i.replace(lw,"$1"):o||n)}),t});function uw(e){return e==null?"":$l(e)}function Zl(e,t){return Je(e)?e:ui(e,t)?[e]:cw(uw(e))}function nr(e){if(typeof e=="string"||oi(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Hl(e,t){t=Zl(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[nr(t[n++])];return n&&n==o?e:void 0}function mw(e,t,n){var o=e==null?void 0:Hl(e,t);return o===void 0?n:o}function dw(e,t){for(var n=-1,o=t.length,r=e.length;++n<o;)e[r+n]=t[n];return e}function pw(){this.__data__=new ut,this.size=0}function fw(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function hw(e){return this.__data__.get(e)}function yw(e){return this.__data__.has(e)}var gw=200;function bw(e,t){var n=this.__data__;if(n instanceof ut){var o=n.__data__;if(!Dn||o.length<gw-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new mt(o)}return n.set(e,t),this.size=n.size,this}function lt(e){var t=this.__data__=new ut(e);this.size=t.size}lt.prototype.clear=pw;lt.prototype.delete=fw;lt.prototype.get=hw;lt.prototype.has=yw;lt.prototype.set=bw;function ww(e,t){for(var n=-1,o=e==null?0:e.length,r=0,i=[];++n<o;){var s=e[n];t(s,n,e)&&(i[r++]=s)}return i}function vw(){return[]}var Sw=Object.prototype,Cw=Sw.propertyIsEnumerable,Ns=Object.getOwnPropertySymbols,kw=Ns?function(e){return e==null?[]:(e=Object(e),ww(Ns(e),function(t){return Cw.call(e,t)}))}:vw;function Tw(e,t,n){var o=t(e);return Je(e)?o:dw(o,n(e))}function Ms(e){return Tw(e,ci,kw)}var $r=Dt(ct,"DataView"),Or=Dt(ct,"Promise"),Qt=Dt(ct,"Set"),qs="[object Map]",xw="[object Object]",As="[object Promise]",Ls="[object Set]",Es="[object WeakMap]",Ps="[object DataView]",_w=Pt($r),Iw=Pt(Dn),Rw=Pt(Or),Nw=Pt(Qt),Mw=Pt(Pr),pt=nn;($r&&pt(new $r(new ArrayBuffer(1)))!=Ps||Dn&&pt(new Dn)!=qs||Or&&pt(Or.resolve())!=As||Qt&&pt(new Qt)!=Ls||Pr&&pt(new Pr)!=Es)&&(pt=function(e){var t=nn(e),n=t==xw?e.constructor:void 0,o=n?Pt(n):"";if(o)switch(o){case _w:return Ps;case Iw:return qs;case Rw:return As;case Nw:return Ls;case Mw:return Es}return t});var Ds=ct.Uint8Array;function $e(e){for(var t=-1,n=e==null?0:e.length,o=0,r=[];++t<n;){var i=e[t];i&&(r[o++]=i)}return r}var qw="__lodash_hash_undefined__";function Aw(e){return this.__data__.set(e,qw),this}function Lw(e){return this.__data__.has(e)}function Ht(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new mt;++t<n;)this.add(e[t])}Ht.prototype.add=Ht.prototype.push=Aw;Ht.prototype.has=Lw;function Vl(e,t){for(var n=-1,o=e==null?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}function No(e,t){return e.has(t)}var Ew=1,Pw=2;function Wl(e,t,n,o,r,i){var s=n&Ew,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var f=-1,m=!0,d=n&Pw?new Ht:void 0;for(i.set(e,t),i.set(t,e);++f<a;){var h=e[f],g=t[f];if(o)var b=s?o(g,h,f,t,e,i):o(h,g,f,e,t,i);if(b!==void 0){if(b)continue;m=!1;break}if(d){if(!Vl(t,function(w,S){if(!No(d,S)&&(h===w||r(h,w,n,o,i)))return d.push(S)})){m=!1;break}}else if(!(h===g||r(h,g,n,o,i))){m=!1;break}}return i.delete(e),i.delete(t),m}function Dw(e){var t=-1,n=Array(e.size);return e.forEach(function(o,r){n[++t]=[r,o]}),n}function di(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var $w=1,Ow=2,Fw="[object Boolean]",zw="[object Date]",jw="[object Error]",Bw="[object Map]",Kw="[object Number]",Qw="[object RegExp]",Uw="[object Set]",Gw="[object String]",Yw="[object Symbol]",Zw="[object ArrayBuffer]",Hw="[object DataView]",$s=wt?wt.prototype:void 0,hr=$s?$s.valueOf:void 0;function Vw(e,t,n,o,r,i,s){switch(n){case Hw:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Zw:return!(e.byteLength!=t.byteLength||!i(new Ds(e),new Ds(t)));case Fw:case zw:case Kw:return jl(+e,+t);case jw:return e.name==t.name&&e.message==t.message;case Qw:case Gw:return e==t+"";case Bw:var a=Dw;case Uw:var l=o&$w;if(a||(a=di),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;o|=Ow,s.set(e,t);var u=Wl(a(e),a(t),o,r,i,s);return s.delete(e),u;case Yw:if(hr)return hr.call(e)==hr.call(t)}return!1}var Ww=1,Jw=Object.prototype,Xw=Jw.hasOwnProperty;function ev(e,t,n,o,r,i){var s=n&Ww,a=Ms(e),l=a.length,c=Ms(t),u=c.length;if(l!=u&&!s)return!1;for(var f=l;f--;){var m=a[f];if(!(s?m in t:Xw.call(t,m)))return!1}var d=i.get(e),h=i.get(t);if(d&&h)return d==t&&h==e;var g=!0;i.set(e,t),i.set(t,e);for(var b=s;++f<l;){m=a[f];var w=e[m],S=t[m];if(o)var v=s?o(S,w,m,t,e,i):o(w,S,m,e,t,i);if(!(v===void 0?w===S||r(w,S,n,o,i):v)){g=!1;break}b||(b=m=="constructor")}if(g&&!b){var C=e.constructor,N=t.constructor;C!=N&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof N=="function"&&N instanceof N)&&(g=!1)}return i.delete(e),i.delete(t),g}var tv=1,Os="[object Arguments]",Fs="[object Array]",Jn="[object Object]",nv=Object.prototype,zs=nv.hasOwnProperty;function ov(e,t,n,o,r,i){var s=Je(e),a=Je(t),l=s?Fs:pt(e),c=a?Fs:pt(t);l=l==Os?Jn:l,c=c==Os?Jn:c;var u=l==Jn,f=c==Jn,m=l==c;if(m&&Dr(e)){if(!Dr(t))return!1;s=!0,u=!1}if(m&&!u)return i||(i=new lt),s||Yl(e)?Wl(e,t,n,o,r,i):Vw(e,t,l,n,o,r,i);if(!(n&tv)){var d=u&&zs.call(e,"__wrapped__"),h=f&&zs.call(t,"__wrapped__");if(d||h){var g=d?e.value():e,b=h?t.value():t;return i||(i=new lt),r(g,b,n,o,i)}}return m?(i||(i=new lt),ev(e,t,n,o,r,i)):!1}function pi(e,t,n,o,r){return e===t?!0:e==null||t==null||!Mt(e)&&!Mt(t)?e!==e&&t!==t:ov(e,t,n,o,pi,r)}var rv=1,iv=2;function sv(e,t,n,o){var r=n.length,i=r;if(e==null)return!i;for(e=Object(e);r--;){var s=n[r];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++r<i;){s=n[r];var a=s[0],l=e[a],c=s[1];if(s[2]){if(l===void 0&&!(a in e))return!1}else{var u=new lt,f;if(!(f===void 0?pi(c,l,rv|iv,o,u):f))return!1}}return!0}function Jl(e){return e===e&&!ii(e)}function av(e){for(var t=ci(e),n=t.length;n--;){var o=t[n],r=e[o];t[n]=[o,r,Jl(r)]}return t}function Xl(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function lv(e){var t=av(e);return t.length==1&&t[0][2]?Xl(t[0][0],t[0][1]):function(n){return n===e||sv(n,e,t)}}function cv(e,t){return e!=null&&t in Object(e)}function uv(e,t,n){t=Zl(t,e);for(var o=-1,r=t.length,i=!1;++o<r;){var s=nr(t[o]);if(!(i=e!=null&&n(e,s)))break;e=e[s]}return i||++o!=r?i:(r=e==null?0:e.length,!!r&&ai(r)&&zl(s,r)&&(Je(e)||Kl(e)))}function mv(e,t){return e!=null&&uv(e,t,cv)}var dv=1,pv=2;function fv(e,t){return ui(e)&&Jl(t)?Xl(nr(e),t):function(n){var o=mw(n,e);return o===void 0&&o===t?mv(n,e):pi(t,o,dv|pv)}}function hv(e){return function(t){return t?.[e]}}function yv(e){return function(t){return Hl(t,e)}}function gv(e){return ui(e)?hv(nr(e)):yv(e)}function or(e){return typeof e=="function"?e:e==null?si:typeof e=="object"?Je(e)?fv(e[0],e[1]):lv(e):gv(e)}function bv(e,t,n,o){for(var r=-1,i=e==null?0:e.length;++r<i;){var s=e[r];t(o,s,n(s),e)}return o}function wv(e){return function(t,n,o){for(var r=-1,i=Object(t),s=o(t),a=s.length;a--;){var l=s[++r];if(n(i[l],l,i)===!1)break}return t}}var vv=wv();function Sv(e,t){return e&&vv(e,t,ci)}function Cv(e,t){return function(n,o){if(n==null)return n;if(!li(n))return e(n,o);for(var r=n.length,i=-1,s=Object(n);++i<r&&o(s[i],i,s)!==!1;);return n}}var ec=Cv(Sv);function kv(e,t,n,o){return ec(e,function(r,i,s){t(o,r,n(r),s)}),o}function Tv(e,t){return function(n,o){var r=Je(n)?bv:kv,i={};return r(n,e,or(o),i)}}function xv(e){return Mt(e)&&li(e)}function js(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var _v=Object.prototype,Iv=_v.hasOwnProperty,tc=Tv(function(e,t,n){Iv.call(e,n)?e[n].push(t):Fg(e,n,[t])}),Rv=Math.min;function Nv(e,t,n){for(var o=Fl,r=e[0].length,i=e.length,s=i,a=Array(i),l=1/0,c=[];s--;){var u=e[s];s&&t&&(u=ri(u,Ul(t))),l=Rv(u.length,l),a[s]=t||r>=120&&u.length>=120?new Ht(s&&u):void 0}u=e[0];var f=-1,m=a[0];e:for(;++f<r&&c.length<l;){var d=u[f],h=t?t(d):d;if(d=d!==0?d:0,!(m?No(m,h):o(c,h))){for(s=i;--s;){var g=a[s];if(!(g?No(g,h):o(e[s],h)))continue e}m&&m.push(h),c.push(d)}}return c}function Mv(e){return xv(e)?e:[]}var Fr=jg(function(e){var t=js(e),n=ri(e,Mv);return t===js(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?Nv(n,or(t)):[]});function qv(e,t){for(var n,o=-1,r=e.length;++o<r;){var i=t(e[o]);i!==void 0&&(n=n===void 0?i:n+i)}return n}function Av(e,t){var n;return ec(e,function(o,r,i){return n=t(o,r,i),!n}),!!n}function fi(e,t,n){var o=Je(e)?Vl:Av;return o(e,or(t))}function Bs(e,t){return e&&e.length?qv(e,or(t)):0}var Lv=1/0,Ev=Qt&&1/di(new Qt([,-0]))[1]==Lv?function(e){return new Qt(e)}:xg,Pv=200;function Dv(e,t,n){var o=-1,r=Fl,i=e.length,s=!0,a=[],l=a;if(i>=Pv){var c=Ev(e);if(c)return di(c);s=!1,r=No,l=new Ht}else l=a;e:for(;++o<i;){var u=e[o],f=u;if(u=u!==0?u:0,s&&f===f){for(var m=l.length;m--;)if(l[m]===f)continue e;a.push(u)}else r(l,f,n)||(l!==a&&l.push(f),a.push(u))}return a}function hi(e){return e&&e.length?Dv(e):[]}const zr="other-";function yi(e){return`${zr}${e}`}function $v(e){return $e(e.map((t,n)=>t.trim()?yi(n):null))}function Ov(e){return $e(e.map((t,n)=>t.trim()?{key:yi(n),labelKey:"minerals.other"}:null))}function gi(e){if(!e.startsWith(zr))return null;const t=Number(e.slice(zr.length));return Number.isFinite(t)?t:null}function Ks(e,t,n){const o=e[t];return typeof o=="object"?o[n]||"":typeof o=="string"?o:""}function nc(e,t,n,o){return e?e.type==="fixed"?e.metals:e.type==="dynamic-active"?oc(t,o?.selectedMinerals??[],o?.customMinerals??[]):e.type==="dynamic-q1-yes"?Fr(t.mineralScope.minerals,$e(t.mineralScope.minerals.map(r=>Ks(n,"Q1",r.key)==="Yes"?r:null)),r=>r.key):e.type==="dynamic-q2-yes"?Fr(t.mineralScope.minerals,$e(t.mineralScope.minerals.map(r=>Ks(n,"Q2",r.key)==="Yes"?r:null)),r=>r.key):[]:[]}function jn(e,t,n=[]){const o=new Map;return e.mineralScope.mode==="free-text"?(e.mineralScope.minerals.forEach((r,i)=>{const s=t[i]?.trim();s&&o.set(r.key,s)}),o):(e.mineralScope.mode==="dynamic-dropdown"&&n.includes("other")&&t.forEach((r,i)=>{const s=r.trim();s&&o.set(yi(i),s)}),o)}function Bn(e,t,n){const o=e.mineralScope.minerals;if(e.mineralScope.mode==="dynamic-dropdown"){const r=o.filter(s=>s.key!=="other"&&t.includes(s.key)).map(s=>s.key),i=t.includes("other")?$v(n):[];return[...r,...i]}return e.mineralScope.mode==="free-text"?o.filter((r,i)=>!!n[i]?.trim()).map(r=>r.key):o.map(r=>r.key)}function oc(e,t,n){const o=e.mineralScope.minerals;if(e.mineralScope.mode==="dynamic-dropdown"){const r=Fr(o,$e(o.map(s=>t.includes(s.key)&&s.key!=="other"?s:null)),s=>s.key),i=t.includes("other")?Ov(n):[];return[...r,...i]}return e.mineralScope.mode==="free-text"?$e(o.map((r,i)=>n[i]?.trim()?r:null)):o}function bi(e,t,n){const o=oc(e,t,n),r=jn(e,n,t);return o.map(i=>({...i,label:r.get(i.key)}))}function rc(e){return new Map(e.mineralScope.minerals.map(t=>[t.key,t.labelKey]))}function jr(e,t,n,o){const r=e[t];return o&&typeof r=="object"?r[n]||"":!o&&typeof r=="string"?r:""}function ic(e){const{activeMinerals:t,gatingByMineral:n}=e;return $e(t.map(o=>n.get(o)?.smelterListRequired?o:null))}function sc(e,t){const n=Bn(e,t.selectedMinerals??[],t.customMinerals??[]);return{gatingByMineral:Xt(e,t.questionAnswers,n),activeMinerals:n}}function ac(e,t){return lc(e,t,sc(e,t))}function lc(e,t,n){const{gatingByMineral:o}=n,r=new Set(n.activeMinerals),i=n.activeMinerals,s=new Map;for(const m of e.companyInfoFields)s.set(m.key,Fv(m,t));const a=new Map;for(const m of e.questions){const d=new Map;for(const h of i){if(!r.has(h)){d.set(h,!1);continue}const g=o.get(h);if(!g){d.set(h,!1);continue}if(m.key==="Q1"){d.set(h,!0);continue}if(m.key==="Q2"){e.templateType==="amrt"?d.set(h,!1):d.set(h,g.q2Enabled);continue}d.set(h,g.laterQuestionsEnabled)}a.set(m.key,d)}const l=new Map;let c=!1;for(const m of r)if(o.get(m)?.companyQuestionsEnabled){c=!0;break}for(const m of e.companyQuestions)l.set(m.key,c);let u=!1;for(const m of r)if(o.get(m)?.smelterListRequired){u=!0;break}const f=t.scopeType==="B";return{companyInfo:s,questions:a,companyQuestions:l,smelterListRequired:u,productListRequired:f}}function rr(e,t){return Bn(e,t.selectedMinerals??[],t.customMinerals??[])}function Fv(e,t){return e.required===!0?!0:e.required===!1?!1:e.required==="conditional"&&e.key==="scopeDescription"?t.scopeType==="C":!1}function zv(e,t,n){const o=[];return jv(e,t,n,o),Bv(e,t,n,o),Kv(e,t,n,o),Gv(e,t,n,o),Qv(e,t,n,o),Uv(e,n,o),Yv(e),Zv(n,o),o}function jv(e,t,n,o){for(const r of e.companyInfoFields){const i=n.companyInfo[r.key]||"";r.required===!0&&!i.trim()&&Ke(o,"R",fe.checker.requiredField,`companyInfo.${r.key}`,r.labelKey),r.required==="conditional"&&r.key==="scopeDescription"&&t.scopeType==="C"&&!i.trim()&&Ke(o,"R",fe.checker.requiredField,"companyInfo.scopeDescription","fields.scopeDescription")}}function Bv(e,t,n,o){const r=rr(e,t),i=Xt(e,t.questionAnswers,r);for(const s of e.questions)if(s.perMineral)for(const a of r){const l=i.get(a),c=jr(n.questions,s.key,a,s.perMineral);Gs(e,s.key,l)&&!c.trim()&&Ke(o,"E",fe.checker.requiredField,`questions.${s.key}.${a}`,s.labelKey)}else{const a=r[0]??e.mineralScope.minerals[0]?.key,l=a?i.get(a):void 0,c=jr(n.questions,s.key,a??"",s.perMineral);Gs(e,s.key,l)&&!c.trim()&&Ke(o,"E",fe.checker.requiredField,`questions.${s.key}`,s.labelKey)}}function Kv(e,t,n,o){if(e.companyQuestions.length===0)return;const r=rr(e,t),i=Xt(e,t.questionAnswers,r);if(fi(r,a=>i.get(a)?.companyQuestionsEnabled===!0))for(const a of e.companyQuestions)if(a.perMineral)for(const l of r)i.get(l)?.companyQuestionsEnabled&&Qs(n,a,o,l);else Qs(n,a,o)}function Qs(e,t,n,o){const r=u=>typeof u=="string"?u:"",i=o?`.${o}`:"",s=r(o?Us(e.companyQuestions[t.key],o):e.companyQuestions[t.key]);if(!s.trim()){Ke(n,"E",fe.checker.requiredField,`companyQuestions.${t.key}${i}`,t.labelKey);return}if(!t.hasCommentField)return;const a=t.commentRequiredWhen??[];if(a.length===0||!a.includes(s))return;const l=`${t.key}_comment`;r(o?Us(e.companyQuestions[l],o):e.companyQuestions[l]).trim()||Ke(n,"E",fe.checker.requiredCompanyQuestionComment,`companyQuestions.${l}${i}`,t.commentLabelKey??t.labelKey)}function Us(e,t){return e&&typeof e=="object"?e[t]??"":""}function Qv(e,t,n,o){if(t.scopeType!=="B")return;const r=n.productList??[];if(r.length===0){Ke(o,"R",fe.checker.requiredProductList,"productList");return}r.forEach((i,s)=>{(i.productNumber||"").trim()||Ke(o,"R",fe.checker.requiredField,`productList.${s}.productNumber`,e.productList.productNumberLabelKey)})}function Uv(e,t,n){if(e.templateType!=="amrt")return;(t.mineralsScope??[]).forEach((r,i)=>{if(!(r.mineral??"").trim())return;(r.reason??"").trim()||Ke(n,"A",fe.checker.requiredField,`mineralsScope.${i}.reason`,"tables.mineralsScopeReason")})}function Gv(e,t,n,o){const r=n.smelterList??[],i=rr(e,t),s=Xt(e,t.questionAnswers,i),a=rc(e),l=jn(e,t.customMinerals??[],t.selectedMinerals??[]),c=ic({activeMinerals:i,gatingByMineral:s});if(c.length!==0){for(const u of c)if(!fi(r,m=>m.metal===u)){const m=l.get(u);Ke(o,"R",fe.checker.requiredSmelterList,`smelterList.${u}`,m?void 0:a.get(u),m?{field:m}:void 0)}e.smelterList.hasLookup&&e.smelterList.notListedRequireNameCountry&&r.forEach((u,f)=>{if(!Yt(u.smelterLookup||""))return;(u.smelterName||"").trim()||Ke(o,"R",fe.checker.requiredField,`smelterList.${f}.smelterName`,"tables.smelterName"),(u.smelterCountry||"").trim()||Ke(o,"R",fe.checker.requiredField,`smelterList.${f}.smelterCountry`,"tables.country")})}}function Yv(e){e.mineList.available}function Zv(e,t){const n=["contactEmail","authorizerEmail"];for(const o of n){const r=e.companyInfo[o]||"";if(r.trim()&&!_r(r)){const i=o==="contactEmail"?"fields.contactEmail":"fields.authorizerEmail";Ke(t,"E",fe.checker.invalidEmail,`companyInfo.${o}`,i)}}}function Ke(e,t,n,o,r,i){e.push({code:`${t}${String(e.length+1).padStart(3,"0")}`,messageKey:n,fieldPath:o,fieldLabelKey:r,messageValues:i,severity:"error"})}function Gs(e,t,n){return t==="Q1"?!0:t==="Q2"?e.templateType==="amrt"?!1:n?.q2Enabled??!0:n?.laterQuestionsEnabled??!0}function Hv(e,t){const n=sc(e,t),o=lc(e,t,n),{activeMinerals:r,gatingByMineral:i}=n,s=o.productListRequired?{type:"productListRequired"}:t.scopeType?{type:"productListNotRequired"}:{type:"productListUnknown"},a=Wv(e.gating.smelterListGating,r,t.questionAnswers);let l;if(r.length===0)l={type:"smelterListUnknown"};else if(a.length>0)l={type:"smelterListPending",metals:a,questions:Vv(e.gating.smelterListGating)};else if(o.smelterListRequired){const u=$e(r.map(f=>i.get(f)?.smelterListRequired?f:null));l={type:"smelterListRequired",metals:hi(u)}}else l={type:"smelterListNotRequired"};const c=e.mineList.available?{type:"mineListAvailable"}:{type:"mineListNotAvailable"};return{productList:s,smelterList:l,mineList:c}}function Vv(e){if(!e)return"Q1/Q2";switch(e.type){case"q1-yes":case"q1-not-no":case"q1-not-negatives":return"Q1";case"q1q2-yes":case"q1q2-not-no":case"q1-not-negatives-and-q2-not-negatives":return"Q1/Q2";default:return"Q1/Q2"}}function Wv(e,t,n){if(!e)return[];const o=e.type==="q1-yes"||e.type==="q1-not-no"||e.type==="q1q2-not-no"||e.type==="q1-not-negatives"||e.type==="q1-not-negatives-and-q2-not-negatives",r=e.type==="q1q2-yes"||e.type==="q1q2-not-no"||e.type==="q1-not-negatives-and-q2-not-negatives",i=new Set;if(o){const s=n.Q1;typeof s=="string"?s.trim()||t.forEach(a=>i.add(a)):t.forEach(a=>{s?.[a]?.trim()||i.add(a)})}if(r){const s=n.Q2;typeof s=="string"?s.trim()||t.forEach(a=>i.add(a)):t.forEach(a=>{s?.[a]?.trim()||i.add(a)})}return hi(Array.from(i))}function Jv(e,t,n,o){const r=E=>typeof E=="string"?E:"",i=ac(e,t),{companyInfo:s,questions:a,companyQuestions:l,smelterList:c,productList:u}=n;let f=0,m=0;const d=[],h=(E,H,G)=>{d.push({key:E,label:H,location:G})},g=o("checker.groups.declaration"),b=o("checker.groups.smelter"),w=o("checker.groups.product"),S=rc(e),v=jn(e,t.customMinerals??[],t.selectedMinerals??[]);let C=0,N=0;for(const E of e.companyInfoFields){if(!(i.companyInfo.get(E.key)===!0))continue;f+=1,C+=1,(s[E.key]||"").trim()&&(m+=1,N+=1,h(`companyInfo.${E.key}`,o(E.labelKey),g))}C>0&&N===C&&h("summary.companyInfo",o("checker.sectionComplete",{section:o("sections.companyInfo")}),g);let _=0,k=0;for(const E of e.questions){const H=i.questions.get(E.key);if(H)for(const[G,ee]of H.entries()){if(!ee)continue;if(f+=1,_+=1,jr(a,E.key,G,E.perMineral).trim()){m+=1,k+=1;const Y=S.get(G),se=Y?o(Y):G;h(`questions.${E.key}.${G}`,`${E.key} ${se}`,g)}}}_>0&&k===_&&h("summary.questionMatrix",o("checker.sectionComplete",{section:o("sections.questionMatrix")}),g);const L=rr(e,t),j=Xt(e,t.questionAnswers,L);let x=0,q=0;for(const E of e.companyQuestions){if(E.perMineral){L.forEach(ee=>{if(!j.get(ee)?.companyQuestionsEnabled)return;f+=1,x+=1;const Y=l[E.key],se=Y&&typeof Y=="object"?Y[ee]??"":"",ae=r(se);if(ae.trim()){m+=1,q+=1;const D=v.get(ee),P=S.get(ee),U=D??(P?o(P):ee);h(`companyQuestions.${E.key}.${ee}`,`${E.key}. ${o(E.labelKey)} (${U})`,g)}if(E.hasCommentField){const D=E.commentRequiredWhen??[];if(D.length===0||!D.includes(ae))return;f+=1,x+=1;const P=l[`${E.key}_comment`],U=P&&typeof P=="object"?P[ee]??"":"";if(r(U).trim()){m+=1,q+=1;const ie=v.get(ee),te=S.get(ee),le=ie??(te?o(te):ee);h(`companyQuestions.${E.key}_comment.${ee}`,`${o(E.commentLabelKey??E.labelKey)} (${le})`,g)}}});continue}if(!(i.companyQuestions.get(E.key)===!0))continue;f+=1,x+=1;const G=r(l[E.key]);if(G.trim()&&(m+=1,q+=1,h(`companyQuestions.${E.key}`,`${E.key}. ${o(E.labelKey)}`,g)),E.hasCommentField){const ee=E.commentRequiredWhen??[];ee.length>0&&ee.includes(G)&&(f+=1,x+=1,r(l[`${E.key}_comment`]).trim()&&(m+=1,q+=1,h(`companyQuestions.${E.key}_comment`,o(E.commentLabelKey??E.labelKey),g)))}}x>0&&q===x&&h("summary.companyQuestions",o("checker.sectionComplete",{section:o("sections.companyQuestions")}),g);const B=ic({activeMinerals:L,gatingByMineral:j});let $=0,I=0;B.forEach(E=>{if(f+=1,$+=1,fi(c,G=>G.metal===E)){m+=1,I+=1;const G=v.get(E),ee=S.get(E),de=G??(ee?o(ee):E);h(`smelterList.${E}`,o("checker.passedSmelterForMineral",{mineral:de}),b)}}),e.smelterList.hasLookup&&e.smelterList.notListedRequireNameCountry&&c.forEach((E,H)=>{if(!Yt(E.smelterLookup||""))return;f+=1,$+=1,(E.smelterName||"").trim()&&(m+=1,I+=1,h(`smelterList.${H}.smelterName`,o("tables.smelterName"),b)),f+=1,$+=1,(E.smelterCountry||"").trim()&&(m+=1,I+=1,h(`smelterList.${H}.smelterCountry`,o("tables.country"),b))}),$>0&&I===$&&h("summary.smelterList",o("checker.sectionComplete",{section:o("tabs.smelterList")}),b);let R=0,M=0;t.scopeType==="B"&&(f+=1,R+=1,u.length>0&&(m+=1,M+=1,h("productList",o("checker.passedProductList"),w)),u.forEach((E,H)=>{f+=1,R+=1,(E.productNumber||"").trim()&&(m+=1,M+=1,h(`productList.${E.id}.productNumber`,o("checker.passedProductRow",{index:H+1}),w))}),R>0&&M===R&&h("summary.productList",o("checker.sectionComplete",{section:o("tabs.productList")}),w));const K=s.contactEmail||"";K.trim()&&_r(K)&&h("companyInfo.contactEmail.valid",o("checker.validEmail",{field:o("fields.contactEmail")}),g);const O=s.authorizerEmail||"";return O.trim()&&_r(O)&&h("companyInfo.authorizerEmail.valid",o("checker.validEmail",{field:o("fields.authorizerEmail")}),g),{summary:{completion:f>0?Math.round(m/f*100):100,totalRequired:f,completedRequired:m,sections:{companyInfo:{total:C,completed:N},questionMatrix:{total:_,completed:k},companyQuestions:{total:x,completed:q},smelterList:{total:$,completed:I},productList:{total:R,completed:M}}},passedItems:d}}const Rn=["China","Malaysia","Indonesia","Japan","USA","Germany","Switzerland","Vietnam","Thailand","Philippines"],Xv=[...Rn,"Unknown"],eS={cmrt:Rn,emrt:Rn,crt:Xv,amrt:Rn};function cc(e){return(eS[e]??Rn).map(n=>({value:n,label:n}))}function tS({versionDef:e,selectedMinerals:t,customMinerals:n}){return{displayMinerals:bi(e,t,n)}}function nS({templateType:e,versionDef:t,questionAnswers:n,selectedMinerals:o,customMinerals:r}){const i=jn(t,r??[],o??[]),s=nc(t.smelterList.metalDropdownSource,t,n,{selectedMinerals:o,customMinerals:r}).map(c=>({...c,label:i.get(c.key)})),a=cc(e),l=e==="emrt"&&t.version.id==="2.1"||e==="amrt"&&t.version.id==="1.3";return{availableMetals:s,countryOptions:a,showNotYetIdentifiedCountryHint:l}}function oS({templateType:e,versionDef:t,questionAnswers:n,selectedMinerals:o,customMinerals:r,smelterList:i}){const s=jn(t,r??[],o??[]),a=t.mineList.available?nc(t.mineList.metalDropdownSource,t,n,{selectedMinerals:o,customMinerals:r}).map(m=>({...m,label:s.get(m.key)})):[],l=cc(e),c=$e(i.map(m=>m.smelterName?m.smelterName:m.smelterLookup&&!Yt(m.smelterLookup)&&!vo(m.smelterLookup)?m.smelterLookup:null)),u=hi(c).map(m=>({value:m,label:m})),f=(()=>{const m=new Map;return i.forEach(d=>{const h=d.metal?.trim();if(!h)return;const g=d.smelterName?d.smelterName:d.smelterLookup&&!Yt(d.smelterLookup)&&!vo(d.smelterLookup)?d.smelterLookup:"";if(!g)return;const b=m.get(h)??new Set;b.add(g),m.set(h,b)}),Object.fromEntries(Array.from(m.entries()).map(([d,h])=>[d,Array.from(h).map(g=>({value:g,label:g}))]))})();return{availableMetals:a,countryOptions:l,smelterOptions:u,smelterOptionsByMetal:f}}function uc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var o=n.call(e),r,i=[],s;try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}return i}var rS=function(e){return typeof e=="function"},iS=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test",W=function(e){iS&&(rS(e)||console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof e)));var t=re.useRef(e);t.current=re.useMemo(function(){return e},[e]);var n=re.useRef(void 0);return n.current||(n.current=function(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];return t.current.apply(this,o)}),n.current};function sS(e,t){if(e===t)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}var ne=function(e,t){var n=re.useRef({deps:t,obj:void 0,initialized:!1}).current;return(n.initialized===!1||!sS(n.deps,t))&&(n.deps=t,n.obj=e(),n.initialized=!0),n.obj};function mc(e){var t=re.useRef(e);return t.current=e,t}function Ct(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function aS(e,t){var n=uc(re.useState(e),2),o=n[0],r=n[1],i=re.useMemo(function(){var s=!e,a=function(){return r(function(f){return f===e?s:e})},l=function(f){return r(f)},c=function(){return r(e)},u=function(){return r(s)};return{toggle:a,set:l,setLeft:c,setRight:u}},[]);return[o,i]}function wi(e){var t=uc(aS(!1),2),n=t[0],o=t[1],r=o.toggle,i=o.set,s=re.useMemo(function(){var a=function(){return i(!0)},l=function(){return i(!1)};return{toggle:r,set:function(c){return i(!!c)},setTrue:a,setFalse:l}},[]);return[n,s]}var so={exports:{}},lS=so.exports,Ys;function dc(){return Ys||(Ys=1,(function(e,t){(function(n,o){e.exports=o()})(lS,(function(){var n=1e3,o=6e4,r=36e5,i="millisecond",s="second",a="minute",l="hour",c="day",u="week",f="month",m="quarter",d="year",h="date",g="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(I){var R=["th","st","nd","rd"],M=I%100;return"["+I+(R[(M-20)%10]||R[M]||R[0])+"]"}},v=function(I,R,M){var K=String(I);return!K||K.length>=R?I:""+Array(R+1-K.length).join(M)+I},C={s:v,z:function(I){var R=-I.utcOffset(),M=Math.abs(R),K=Math.floor(M/60),O=M%60;return(R<=0?"+":"-")+v(K,2,"0")+":"+v(O,2,"0")},m:function I(R,M){if(R.date()<M.date())return-I(M,R);var K=12*(M.year()-R.year())+(M.month()-R.month()),O=R.clone().add(K,f),Z=M-O<0,E=R.clone().add(K+(Z?-1:1),f);return+(-(K+(M-O)/(Z?O-E:E-O))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:f,y:d,w:u,d:c,D:h,h:l,m:a,s,ms:i,Q:m}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},N="en",_={};_[N]=S;var k="$isDayjsObject",L=function(I){return I instanceof B||!(!I||!I[k])},j=function I(R,M,K){var O;if(!R)return N;if(typeof R=="string"){var Z=R.toLowerCase();_[Z]&&(O=Z),M&&(_[Z]=M,O=Z);var E=R.split("-");if(!O&&E.length>1)return I(E[0])}else{var H=R.name;_[H]=R,O=H}return!K&&O&&(N=O),O||!K&&N},x=function(I,R){if(L(I))return I.clone();var M=typeof R=="object"?R:{};return M.date=I,M.args=arguments,new B(M)},q=C;q.l=j,q.i=L,q.w=function(I,R){return x(I,{locale:R.$L,utc:R.$u,x:R.$x,$offset:R.$offset})};var B=(function(){function I(M){this.$L=j(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[k]=!0}var R=I.prototype;return R.parse=function(M){this.$d=(function(K){var O=K.date,Z=K.utc;if(O===null)return new Date(NaN);if(q.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var E=O.match(b);if(E){var H=E[2]-1||0,G=(E[7]||"0").substring(0,3);return Z?new Date(Date.UTC(E[1],H,E[3]||1,E[4]||0,E[5]||0,E[6]||0,G)):new Date(E[1],H,E[3]||1,E[4]||0,E[5]||0,E[6]||0,G)}}return new Date(O)})(M),this.init()},R.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},R.$utils=function(){return q},R.isValid=function(){return this.$d.toString()!==g},R.isSame=function(M,K){var O=x(M);return this.startOf(K)<=O&&O<=this.endOf(K)},R.isAfter=function(M,K){return x(M)<this.startOf(K)},R.isBefore=function(M,K){return this.endOf(K)<x(M)},R.$g=function(M,K,O){return q.u(M)?this[K]:this.set(O,M)},R.unix=function(){return Math.floor(this.valueOf()/1e3)},R.valueOf=function(){return this.$d.getTime()},R.startOf=function(M,K){var O=this,Z=!!q.u(K)||K,E=q.p(M),H=function(P,U){var J=q.w(O.$u?Date.UTC(O.$y,U,P):new Date(O.$y,U,P),O);return Z?J:J.endOf(c)},G=function(P,U){return q.w(O.toDate()[P].apply(O.toDate("s"),(Z?[0,0,0,0]:[23,59,59,999]).slice(U)),O)},ee=this.$W,de=this.$M,Y=this.$D,se="set"+(this.$u?"UTC":"");switch(E){case d:return Z?H(1,0):H(31,11);case f:return Z?H(1,de):H(0,de+1);case u:var ae=this.$locale().weekStart||0,D=(ee<ae?ee+7:ee)-ae;return H(Z?Y-D:Y+(6-D),de);case c:case h:return G(se+"Hours",0);case l:return G(se+"Minutes",1);case a:return G(se+"Seconds",2);case s:return G(se+"Milliseconds",3);default:return this.clone()}},R.endOf=function(M){return this.startOf(M,!1)},R.$set=function(M,K){var O,Z=q.p(M),E="set"+(this.$u?"UTC":""),H=(O={},O[c]=E+"Date",O[h]=E+"Date",O[f]=E+"Month",O[d]=E+"FullYear",O[l]=E+"Hours",O[a]=E+"Minutes",O[s]=E+"Seconds",O[i]=E+"Milliseconds",O)[Z],G=Z===c?this.$D+(K-this.$W):K;if(Z===f||Z===d){var ee=this.clone().set(h,1);ee.$d[H](G),ee.init(),this.$d=ee.set(h,Math.min(this.$D,ee.daysInMonth())).$d}else H&&this.$d[H](G);return this.init(),this},R.set=function(M,K){return this.clone().$set(M,K)},R.get=function(M){return this[q.p(M)]()},R.add=function(M,K){var O,Z=this;M=Number(M);var E=q.p(K),H=function(de){var Y=x(Z);return q.w(Y.date(Y.date()+Math.round(de*M)),Z)};if(E===f)return this.set(f,this.$M+M);if(E===d)return this.set(d,this.$y+M);if(E===c)return H(1);if(E===u)return H(7);var G=(O={},O[a]=o,O[l]=r,O[s]=n,O)[E]||1,ee=this.$d.getTime()+M*G;return q.w(ee,this)},R.subtract=function(M,K){return this.add(-1*M,K)},R.format=function(M){var K=this,O=this.$locale();if(!this.isValid())return O.invalidDate||g;var Z=M||"YYYY-MM-DDTHH:mm:ssZ",E=q.z(this),H=this.$H,G=this.$m,ee=this.$M,de=O.weekdays,Y=O.months,se=O.meridiem,ae=function(U,J,ie,te){return U&&(U[J]||U(K,Z))||ie[J].slice(0,te)},D=function(U){return q.s(H%12||12,U,"0")},P=se||function(U,J,ie){var te=U<12?"AM":"PM";return ie?te.toLowerCase():te};return Z.replace(w,(function(U,J){return J||(function(ie){switch(ie){case"YY":return String(K.$y).slice(-2);case"YYYY":return q.s(K.$y,4,"0");case"M":return ee+1;case"MM":return q.s(ee+1,2,"0");case"MMM":return ae(O.monthsShort,ee,Y,3);case"MMMM":return ae(Y,ee);case"D":return K.$D;case"DD":return q.s(K.$D,2,"0");case"d":return String(K.$W);case"dd":return ae(O.weekdaysMin,K.$W,de,2);case"ddd":return ae(O.weekdaysShort,K.$W,de,3);case"dddd":return de[K.$W];case"H":return String(H);case"HH":return q.s(H,2,"0");case"h":return D(1);case"hh":return D(2);case"a":return P(H,G,!0);case"A":return P(H,G,!1);case"m":return String(G);case"mm":return q.s(G,2,"0");case"s":return String(K.$s);case"ss":return q.s(K.$s,2,"0");case"SSS":return q.s(K.$ms,3,"0");case"Z":return E}return null})(U)||E.replace(":","")}))},R.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},R.diff=function(M,K,O){var Z,E=this,H=q.p(K),G=x(M),ee=(G.utcOffset()-this.utcOffset())*o,de=this-G,Y=function(){return q.m(E,G)};switch(H){case d:Z=Y()/12;break;case f:Z=Y();break;case m:Z=Y()/3;break;case u:Z=(de-ee)/6048e5;break;case c:Z=(de-ee)/864e5;break;case l:Z=de/r;break;case a:Z=de/o;break;case s:Z=de/n;break;default:Z=de}return O?Z:q.a(Z)},R.daysInMonth=function(){return this.endOf(f).$D},R.$locale=function(){return _[this.$L]},R.locale=function(M,K){if(!M)return this.$L;var O=this.clone(),Z=j(M,K,!0);return Z&&(O.$L=Z),O},R.clone=function(){return q.w(this.$d,this)},R.toDate=function(){return new Date(this.valueOf())},R.toJSON=function(){return this.isValid()?this.toISOString():null},R.toISOString=function(){return this.$d.toISOString()},R.toString=function(){return this.$d.toUTCString()},I})(),$=B.prototype;return x.prototype=$,[["$ms",i],["$s",s],["$m",a],["$H",l],["$W",c],["$M",f],["$y",d],["$D",h]].forEach((function(I){$[I[1]]=function(R){return this.$g(R,I[0],I[1])}})),x.extend=function(I,R){return I.$i||(I(R,B,x),I.$i=!0),x},x.locale=j,x.isDayjs=L,x.unix=function(I){return x(1e3*I)},x.en=_[N],x.Ls=_,x.p={},x}))})(so)),so.exports}var cS=dc();const Xe=Ct(cS);function Ce(){const{t:e,i18n:t}=fo.useTranslation();return{t:W((o,r)=>e(o,r)),locale:t.language,i18n:t,changeLocale:o=>t.changeLanguage(o)}}function uS(e){return{scopeType:e.companyInfo.declarationScope,questionAnswers:e.questions,selectedMinerals:e.selectedMinerals,customMinerals:e.customMinerals}}function mS(e){return{companyInfo:e.companyInfo,questions:e.questions,companyQuestions:e.companyQuestions,mineralsScope:e.mineralsScope,smelterList:e.smelterList,mineList:e.mineList,productList:e.productList}}function $t(){const{meta:e,form:t,lists:n}=Fe(),{t:o}=Ce(),r=ne(()=>({companyInfo:t.companyInfo,selectedMinerals:t.selectedMinerals,customMinerals:t.customMinerals,questions:t.questions,questionComments:t.questionComments,companyQuestions:t.companyQuestions,mineralsScope:n.mineralsScope,smelterList:n.smelterList,mineList:n.mineList,productList:n.productList}),[t.companyInfo,t.selectedMinerals,t.customMinerals,t.questions,t.questionComments,t.companyQuestions,n.mineralsScope,n.smelterList,n.mineList,n.productList]),i=ne(()=>uS(r),[r]),s=ne(()=>mS(r),[r]),a=ne(()=>Bn(e.versionDef,t.selectedMinerals,t.customMinerals),[e.versionDef,t.selectedMinerals,t.customMinerals]),l=ne(()=>Xt(e.versionDef,i.questionAnswers,a),[e.versionDef,i.questionAnswers,a]),c=ne(()=>ac(e.versionDef,i),[e.versionDef,i]),u=ne(()=>zv(e.versionDef,i,s),[e.versionDef,i,s]),f=ne(()=>Jv(e.versionDef,i,s,o),[e.versionDef,i,s,o]),m=ne(()=>Hv(e.versionDef,i),[e.versionDef,i]),d=ne(()=>tS({versionDef:e.versionDef,selectedMinerals:t.selectedMinerals,customMinerals:t.customMinerals}),[e.versionDef,t.selectedMinerals,t.customMinerals]),h=ne(()=>nS({templateType:e.templateType,versionDef:e.versionDef,questionAnswers:t.questions,selectedMinerals:t.selectedMinerals,customMinerals:t.customMinerals}),[e.templateType,e.versionDef,t.questions,t.selectedMinerals,t.customMinerals,o]),g=ne(()=>oS({templateType:e.templateType,versionDef:e.versionDef,questionAnswers:t.questions,selectedMinerals:t.selectedMinerals,customMinerals:t.customMinerals,smelterList:n.smelterList}),[e.templateType,e.versionDef,t.questions,t.selectedMinerals,t.customMinerals,n.smelterList]);return{ruleInput:i,dataInput:s,gatingByMineral:l,requiredFields:c,checkerErrors:u,checkerSummary:f.summary,checkerPassedItems:f.passedItems,docStatusBySection:m,viewModels:{declaration:d,smelterList:h,mineList:g}}}const dS=[{key:"companyInfo",labelKey:"checker.groups.companyInfo"},{key:"mineralsScope",labelKey:"checker.groups.mineralsScope"},{key:"questionMatrix",labelKey:"checker.groups.questionMatrix"},{key:"companyQuestions",labelKey:"checker.groups.companyQuestions"},{key:"smelter",labelKey:"checker.groups.smelter"},{key:"mine",labelKey:"checker.groups.mine"},{key:"product",labelKey:"checker.groups.product"},{key:"other",labelKey:"checker.groups.other"}],pS=[{key:"companyInfo",labelKey:"checker.groups.companyInfo"},{key:"mineralsScope",labelKey:"checker.groups.mineralsScope"},{key:"questionMatrix",labelKey:"checker.groups.questionMatrix"},{key:"companyQuestions",labelKey:"checker.groups.companyQuestions"},{key:"product",labelKey:"checker.groups.product"},{key:"smelter",labelKey:"checker.groups.smelter"},{key:"mine",labelKey:"checker.groups.mine"},{key:"other",labelKey:"checker.groups.other"}],fS=e=>e==="cmrt"?dS:pS,hS=e=>{switch(e.split(".")[0]){case"companyInfo":return"companyInfo";case"mineralsScope":return"mineralsScope";case"questions":return"questionMatrix";case"companyQuestions":return"companyQuestions";case"smelterList":return"smelter";case"mineList":return"mine";case"productList":return"product";default:return"other"}},Xn=e=>{const t=Number(e);return Number.isFinite(t)?t:null},eo=e=>new Map(e.map((t,n)=>[t,n])),yS=e=>{if(!e)return(i,s)=>s.fieldPath;const t=eo(e.companyInfoFields.map(i=>i.key)),n=eo(e.questions.map(i=>i.key)),o=eo(e.mineralScope.minerals.map(i=>i.key)),r=eo(e.companyQuestions.map(i=>i.key));return(i,s)=>{const a=s.fieldPath.split(".");switch(i){case"companyInfo":{const l=a[1]??"";return`${t.get(l)??999}-${s.fieldPath}`}case"mineralsScope":return`${Xn(a[1]??"")??999}-mineralsScope-${s.fieldPath}`;case"questionMatrix":{const l=a[1]??"",c=a[2]??"",u=n.get(l)??999,f=c?o.get(c)??999:-1;return`${u}-${f}-${s.fieldPath}`}case"companyQuestions":{const l=a[1]??"",c=l.endsWith("_comment"),u=c?l.replace("_comment",""):l,f=r.get(u)??999,m=c?"":a[2],d=m?o.get(m)??999:-1;return`${f}-${c?2:m?0:1}-${d}-${s.fieldPath}`}case"smelter":{const l=Xn(a[1]??"");return l!==null?`${l}-smelter-${s.fieldPath}`:`${o.get(a[1]??"")??999}-mineral-${s.fieldPath}`}case"mine":return`${Xn(a[1]??"")??-1}-mine-${s.fieldPath}`;case"product":return`${Xn(a[1]??"")??-1}-product-${s.fieldPath}`;default:return s.fieldPath}}};function gS(e,t){const n=tc(e,i=>hS(i.fieldPath)),o=yS(t);return fS(t?.templateType).flatMap(i=>{const s=n[i.key];if(!s||s.length===0)return[];const a=[...s].sort((l,c)=>o(i.key,l).localeCompare(o(i.key,c)));return[{key:i.key,labelKey:i.labelKey,items:a}]})}function Re(e,t){const n=ne(e,t);return W(o=>n.get(o))}const{Text:Tt,Title:bS}=y.Typography;function wS(e){const t=e.split(".");return t[0]==="questions"&&t.length===3||t[0]==="companyQuestions"&&t.length===3?t[2]:null}function vS(e){return{tantalum:"minerals.tantalum",tin:"minerals.tin",gold:"minerals.gold",tungsten:"minerals.tungsten",cobalt:"minerals.cobalt",mica:"minerals.mica",copper:"minerals.copper",graphite:"minerals.graphite",lithium:"minerals.lithium",nickel:"minerals.nickel"}[e]??null}function SS({versionDef:e,errors:t,summary:n,passedItems:o=[],onGoToField:r}){const{t:i}=Ce(),s=W((w,S)=>i(w,S)),a=t.length>0,[l,{toggle:c}]=wi(),u=n?.totalRequired??0,f=n?.completedRequired??0,m=n?i("checker.passedSummary",{count:f,total:u}):i("checker.noErrors"),d=ne(()=>gS(t,e),[t,e]),h=W(w=>{r?.(w)}),g=Re(()=>{const w=new Map;return r&&t.forEach(S=>{w.set(`${S.code}-${S.fieldPath}`,()=>h(S))}),w},[t,h,r]),b=l?void 0:{display:"none"};return p.jsxs(y.Flex,{vertical:!0,gap:16,children:[p.jsxs("div",{children:[p.jsx(bS,{level:5,style:{margin:0},children:i("tabs.checker")}),p.jsx(Tt,{type:"secondary",children:i("checker.subtitle")})]}),p.jsx(y.Card,{title:p.jsxs(y.Flex,{align:"center",justify:"space-between",style:{width:"100%"},children:[p.jsxs(y.Flex,{align:"center",gap:8,children:[p.jsx("span",{"aria-hidden":!0,children:"❌"}),p.jsx(Tt,{type:"danger",strong:!0,children:i("checker.errorsTitle")})]}),p.jsx(y.Tag,{color:"error",children:i("checker.errorBadge",{count:t.length})})]}),children:a?p.jsx(y.Collapse,{bordered:!1,defaultActiveKey:d.map(w=>w.key),items:d.map(w=>({key:w.key,label:p.jsxs(y.Flex,{align:"center",justify:"space-between",style:{width:"100%"},children:[p.jsx(Tt,{type:"secondary",children:i(w.labelKey)}),p.jsx(y.Tag,{children:i("checker.groupCount",{count:w.items.length})})]}),children:p.jsx(y.Flex,{vertical:!0,gap:8,children:w.items.map(S=>{const v=`${S.code}-${S.fieldPath}`,C=wS(S.fieldPath),N=C?vS(C):null,_=N?i(N):null;return p.jsxs(y.Flex,{align:"flex-start",justify:"space-between",gap:12,children:[p.jsxs(y.Flex,{align:"baseline",gap:8,wrap:!0,children:[_&&p.jsx(y.Tag,{color:"blue",className:"shrink-0",children:_}),p.jsx(Tt,{children:s(S.messageKey,{field:S.fieldLabelKey?i(S.fieldLabelKey):void 0,...S.messageValues??{}})})]}),r&&p.jsx(y.Button,{type:"link",onClick:g(`${S.code}-${S.fieldPath}`),className:"shrink-0",children:i("checker.goToField")})]},v)})})}))}):p.jsx(y.Typography.Text,{type:"secondary",children:i("checker.noErrors")})}),p.jsx(y.Card,{styles:{body:b},title:p.jsxs(y.Flex,{align:"center",justify:"space-between",style:{width:"100%",cursor:"pointer"},onClick:c,children:[p.jsxs(Tt,{type:"success",strong:!0,children:["✅ ",m]}),p.jsx(Tt,{type:"secondary",style:{fontSize:12},children:i(l?"checker.passedToggleHide":"checker.passedToggleShow")})]}),children:l&&(o.length===0?p.jsx(Tt,{type:"secondary",children:i("checker.passedEmpty")}):p.jsx(y.List,{dataSource:o,renderItem:w=>p.jsx(y.List.Item,{children:p.jsx(y.List.Item.Meta,{title:w.label,description:w.location})},w.key)}))})]})}function CS({onNavigateToField:e}){const{meta:t}=Fe(),{templateType:n,versionId:o,versionDef:r}=t,{checkerErrors:i,checkerSummary:s,checkerPassedItems:a}=$t(),l=Eo(),c=i,u=W(f=>{const m=Uc(f.fieldPath);if(e){e(m,f.fieldPath);return}if(l){const d=ho({template:n,version:o,page:m});l.actions.navigate(`${d}?focus=${encodeURIComponent(f.fieldPath)}`);return}if(typeof window<"u"){const d=ho({template:n,version:o,page:m});window.location.assign(`${d}?focus=${encodeURIComponent(f.fieldPath)}`)}});return p.jsx(SS,{versionDef:r,errors:c,summary:s,passedItems:a,onGoToField:u})}function Kn(e,t){if(t)return e(t)}function vi({value:e,onChange:t,label:n,placeholder:o,hint:r,required:i,disabled:s,error:a,multiline:l,rows:c=3,fieldPath:u,className:f,style:m,autoComplete:d,spellCheck:h}){const{t:g}=Ce(),{componentDisabled:b}=y.ConfigProvider.useConfig(),w=s||b,S=o??g("placeholders.input"),v=W(k=>{t?.(k.target.value)}),C=Kn(g,a),N=C?"error":void 0,_=i&&!w&&!e?.trim()?"field-required-empty":void 0;return p.jsx(y.Form.Item,{label:n,required:i,validateStatus:N,help:C,extra:r,layout:"vertical","data-field-path":u,className:f,style:m,children:l?p.jsx(y.Input.TextArea,{value:e||void 0,onChange:v,placeholder:S,disabled:w,rows:c,className:_,autoComplete:d,spellCheck:h}):p.jsx(y.Input,{value:e||void 0,onChange:v,placeholder:S,disabled:w,className:_,autoComplete:d,spellCheck:h})})}function Si({value:e,onChange:t,label:n,placeholder:o,hint:r,required:i,disabled:s,error:a,options:l,allowClear:c=!0,fieldPath:u,className:f,style:m}){const{t:d}=Ce(),{componentDisabled:h}=y.ConfigProvider.useConfig(),g=s||h,b=Kn(d,a),w=b?"error":void 0,S=o??d("placeholders.select"),v=W(k=>{t?.(k??"")}),C=W(k=>{if(g)return;const L=k.key.toLowerCase();if(L!=="y"&&L!=="n"&&L!=="u")return;const j=l.find(x=>x.value.toLowerCase().startsWith(L));j&&(k.preventDefault(),t?.(j.value))}),N=e===""?void 0:e,_=i&&!g&&!e?"field-required-empty":void 0;return p.jsx(y.Form.Item,{label:n,required:i,validateStatus:w,help:b,extra:r,layout:"vertical","data-field-path":u,className:f,style:m,children:p.jsx(y.Select,{value:N,onChange:v,onKeyDown:C,placeholder:S,disabled:g,options:l,allowClear:c,className:_})})}var ao={exports:{}},kS=ao.exports,Zs;function TS(){return Zs||(Zs=1,(function(e,t){(function(n,o){e.exports=o()})(kS,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,i=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},c=function(b){return(b=+b)+(b>68?1900:2e3)},u=function(b){return function(w){this[b]=+w}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(b){(this.zone||(this.zone={})).offset=(function(w){if(!w||w==="Z")return 0;var S=w.match(/([+-]|\d\d)/g),v=60*S[1]+(+S[2]||0);return v===0?0:S[0]==="+"?-v:v})(b)}],m=function(b){var w=l[b];return w&&(w.indexOf?w:w.s.concat(w.f))},d=function(b,w){var S,v=l.meridiem;if(v){for(var C=1;C<=24;C+=1)if(b.indexOf(v(C,0,w))>-1){S=C>12;break}}else S=b===(w?"pm":"PM");return S},h={A:[a,function(b){this.afternoon=d(b,!1)}],a:[a,function(b){this.afternoon=d(b,!0)}],Q:[r,function(b){this.month=3*(b-1)+1}],S:[r,function(b){this.milliseconds=100*+b}],SS:[i,function(b){this.milliseconds=10*+b}],SSS:[/\d{3}/,function(b){this.milliseconds=+b}],s:[s,u("seconds")],ss:[s,u("seconds")],m:[s,u("minutes")],mm:[s,u("minutes")],H:[s,u("hours")],h:[s,u("hours")],HH:[s,u("hours")],hh:[s,u("hours")],D:[s,u("day")],DD:[i,u("day")],Do:[a,function(b){var w=l.ordinal,S=b.match(/\d+/);if(this.day=S[0],w)for(var v=1;v<=31;v+=1)w(v).replace(/\[|\]/g,"")===b&&(this.day=v)}],w:[s,u("week")],ww:[i,u("week")],M:[s,u("month")],MM:[i,u("month")],MMM:[a,function(b){var w=m("months"),S=(m("monthsShort")||w.map((function(v){return v.slice(0,3)}))).indexOf(b)+1;if(S<1)throw new Error;this.month=S%12||S}],MMMM:[a,function(b){var w=m("months").indexOf(b)+1;if(w<1)throw new Error;this.month=w%12||w}],Y:[/[+-]?\d+/,u("year")],YY:[i,function(b){this.year=c(b)}],YYYY:[/\d{4}/,u("year")],Z:f,ZZ:f};function g(b){var w,S;w=b,S=l&&l.formats;for(var v=(b=w.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,q,B){var $=B&&B.toUpperCase();return q||S[B]||n[B]||S[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(I,R,M){return R||M.slice(1)}))}))).match(o),C=v.length,N=0;N<C;N+=1){var _=v[N],k=h[_],L=k&&k[0],j=k&&k[1];v[N]=j?{regex:L,parser:j}:_.replace(/^\[|\]$/g,"")}return function(x){for(var q={},B=0,$=0;B<C;B+=1){var I=v[B];if(typeof I=="string")$+=I.length;else{var R=I.regex,M=I.parser,K=x.slice($),O=R.exec(K)[0];M.call(q,O),x=x.replace(O,"")}}return(function(Z){var E=Z.afternoon;if(E!==void 0){var H=Z.hours;E?H<12&&(Z.hours+=12):H===12&&(Z.hours=0),delete Z.afternoon}})(q),q}}return function(b,w,S){S.p.customParseFormat=!0,b&&b.parseTwoDigitYear&&(c=b.parseTwoDigitYear);var v=w.prototype,C=v.parse;v.parse=function(N){var _=N.date,k=N.utc,L=N.args;this.$u=k;var j=L[1];if(typeof j=="string"){var x=L[2]===!0,q=L[3]===!0,B=x||q,$=L[2];q&&($=L[2]),l=this.$locale(),!x&&$&&(l=S.Ls[$]),this.$d=(function(K,O,Z,E){try{if(["x","X"].indexOf(O)>-1)return new Date((O==="X"?1e3:1)*K);var H=g(O)(K),G=H.year,ee=H.month,de=H.day,Y=H.hours,se=H.minutes,ae=H.seconds,D=H.milliseconds,P=H.zone,U=H.week,J=new Date,ie=de||(G||ee?1:J.getDate()),te=G||J.getFullYear(),le=0;G&&!ee||(le=ee>0?ee-1:J.getMonth());var ve,ge=Y||0,ze=se||0,Qe=ae||0,Te=D||0;return P?new Date(Date.UTC(te,le,ie,ge,ze,Qe,Te+60*P.offset*1e3)):Z?new Date(Date.UTC(te,le,ie,ge,ze,Qe,Te)):(ve=new Date(te,le,ie,ge,ze,Qe,Te),U&&(ve=E(ve).week(U).toDate()),ve)}catch{return new Date("")}})(_,j,k,S),this.init(),$&&$!==!0&&(this.$L=this.locale($).$L),B&&_!=this.format(j)&&(this.$d=new Date("")),l={}}else if(j instanceof Array)for(var I=j.length,R=1;R<=I;R+=1){L[1]=j[R-1];var M=S.apply(this,L);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}R===I&&(this.$d=new Date(""))}else C.call(this,N)}}}))})(ao)),ao.exports}var xS=TS();const _S=Ct(xS);var lo={exports:{}},IS=lo.exports,Hs;function RS(){return Hs||(Hs=1,(function(e,t){(function(n,o){e.exports=o()})(IS,(function(){return function(n,o,r){var i=o.prototype,s=function(f){return f&&(f.indexOf?f:f.s)},a=function(f,m,d,h,g){var b=f.name?f:f.$locale(),w=s(b[m]),S=s(b[d]),v=w||S.map((function(N){return N.slice(0,h)}));if(!g)return v;var C=b.weekStart;return v.map((function(N,_){return v[(_+(C||0))%7]}))},l=function(){return r.Ls[r.locale()]},c=function(f,m){return f.formats[m]||(function(d){return d.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(h,g,b){return g||b.slice(1)}))})(f.formats[m.toUpperCase()])},u=function(){var f=this;return{months:function(m){return m?m.format("MMMM"):a(f,"months")},monthsShort:function(m){return m?m.format("MMM"):a(f,"monthsShort","months",3)},firstDayOfWeek:function(){return f.$locale().weekStart||0},weekdays:function(m){return m?m.format("dddd"):a(f,"weekdays")},weekdaysMin:function(m){return m?m.format("dd"):a(f,"weekdaysMin","weekdays",2)},weekdaysShort:function(m){return m?m.format("ddd"):a(f,"weekdaysShort","weekdays",3)},longDateFormat:function(m){return c(f.$locale(),m)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};i.localeData=function(){return u.bind(this)()},r.localeData=function(){var f=l();return{firstDayOfWeek:function(){return f.weekStart||0},weekdays:function(){return r.weekdays()},weekdaysShort:function(){return r.weekdaysShort()},weekdaysMin:function(){return r.weekdaysMin()},months:function(){return r.months()},monthsShort:function(){return r.monthsShort()},longDateFormat:function(m){return c(f,m)},meridiem:f.meridiem,ordinal:f.ordinal}},r.months=function(){return a(l(),"months")},r.monthsShort=function(){return a(l(),"monthsShort","months",3)},r.weekdays=function(f){return a(l(),"weekdays",null,null,f)},r.weekdaysShort=function(f){return a(l(),"weekdaysShort","weekdays",3,f)},r.weekdaysMin=function(f){return a(l(),"weekdaysMin","weekdays",2,f)}}}))})(lo)),lo.exports}var NS=RS();const MS=Ct(NS);var co={exports:{}},qS=co.exports,Vs;function AS(){return Vs||(Vs=1,(function(e,t){(function(n,o){e.exports=o()})(qS,(function(){return function(n,o){o.prototype.weekday=function(r){var i=this.$locale().weekStart||0,s=this.$W,a=(s<i?s+7:s)-i;return this.$utils().u(r)?a:this.subtract(a,"day").add(r,"day")}}}))})(co)),co.exports}var LS=AS();const ES=Ct(LS);var uo={exports:{}},PS=uo.exports,Ws;function DS(){return Ws||(Ws=1,(function(e,t){(function(n,o){e.exports=o()})(PS,(function(){var n="week",o="year";return function(r,i,s){var a=i.prototype;a.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=s(this).startOf(o).add(1,o).date(c),f=s(this).endOf(n);if(u.isBefore(f))return 1}var m=s(this).startOf(o).date(c).startOf(n).subtract(1,"millisecond"),d=this.diff(m,n,!0);return d<0?s(this).startOf("week").week():Math.ceil(d)},a.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}}))})(uo)),uo.exports}var $S=DS();const OS=Ct($S);var mo={exports:{}},FS=mo.exports,Js;function zS(){return Js||(Js=1,(function(e,t){(function(n,o){e.exports=o()})(FS,(function(){return function(n,o){o.prototype.weekYear=function(){var r=this.month(),i=this.week(),s=this.year();return i===1&&r===11?s+1:r===0&&i>=52?s-1:s}}}))})(mo)),mo.exports}var jS=zS();const BS=Ct(jS),pc="DD-MMM-YYYY",fc="YYYY-MM-DD",KS=/^\d{4}-\d{2}-\d{2}$/,QS=/^\d{2}-[A-Za-z]{3}-\d{4}$/;Xe.extend(_S);Xe.extend(MS);Xe.extend(OS);Xe.extend(BS);Xe.extend(ES);function US(e){if(!e)return;const t=e.trim();if(!t)return;if(KS.test(t)){const o=Xe(t,fc,!0);if(o.isValid())return o}if(!QS.test(t))return;const n=Xe(t,pc,!0);return n.isValid()?n:void 0}function GS({value:e,onChange:t,label:n,placeholder:o,hint:r,formatHint:i,required:s,disabled:a,error:l,minDate:c,maxDate:u,fieldPath:f,className:m,style:d}){const{t:h}=Ce(),{componentDisabled:g}=y.ConfigProvider.useConfig(),b=a||g,w=Kn(h,l),S=w?"error":void 0,v=US(e),C=r??i,N=o??i??h("placeholders.date"),_=W(j=>{t?.(j?j.format(fc):"")}),k=W(j=>j?!!(c&&j.isBefore(Xe(c),"day")||u&&j.isAfter(Xe(u),"day")):!1),L=s&&!b&&!e?"field-required-empty":void 0;return p.jsx(y.Form.Item,{label:n,required:s,validateStatus:S,help:w,extra:C,layout:"vertical","data-field-path":f,className:m,style:d,children:p.jsx(y.DatePicker,{value:v,onChange:_,placeholder:N,disabled:b,disabledDate:k,format:pc,className:L,style:{width:"100%"}})})}const{Title:YS}=y.Typography,ZS=[{value:"A",label:"A. Company-wide"},{value:"B",label:"B. Product (or List of Products)"},{value:"C",label:"C. User defined"}],HS=new Set(["companyName","declarationScope","scopeDescription","companyId","companyAuthId","address"]),VS=new Set(["contactName","contactEmail","contactPhone"]),WS=new Set(["authorizerName","authorizerTitle","authorizerEmail","authorizerPhone","authorizationDate"]),JS={companyName:"placeholders.companyName",declarationScope:"placeholders.declarationScope",scopeDescription:"placeholders.scopeDescription",companyId:"placeholders.companyId",companyAuthId:"placeholders.companyAuthId",address:"placeholders.address",contactName:"placeholders.contactName",contactEmail:"placeholders.contactEmail",contactPhone:"placeholders.contactPhone",authorizerName:"placeholders.authorizerName",authorizerTitle:"placeholders.authorizerTitle",authorizerEmail:"placeholders.authorizerEmail",authorizerPhone:"placeholders.authorizerPhone",authorizationDate:"placeholders.authorizationDate"},XS={companyName:"organization",address:"street-address",contactName:"name",contactEmail:"email",contactPhone:"tel",authorizerName:"name",authorizerTitle:"organization-title",authorizerEmail:"email",authorizerPhone:"tel"},eC=new Set(["contactEmail","authorizerEmail","contactPhone","authorizerPhone","companyId","companyAuthId"]);function tC({versionDef:e,values:t,onChange:n,errors:o={},requiredFields:r,dateFormatHint:i}){const{t:s}=Ce(),{componentDisabled:a}=y.ConfigProvider.useConfig(),l=e.templateType!=="cmrt"||["6.31","6.4","6.5"].includes(e.version.id),c=t.declarationScope,u=W((k,L)=>{n(k,L)}),f=Re(()=>{const k=new Map;return e.companyInfoFields.forEach(L=>{k.set(L.key,j=>u(L.key,j))}),k},[e.companyInfoFields,u]),m=k=>{const L=JS[k];if(L)return l?s(L):""},d=(k,L=12)=>{const j=t[k.key]||"",x=o[k.key],q=r?.get(k.key)??k.required===!0,B=s(k.labelKey),$=m(k.key),I=f(k.key),R=(()=>{if(k.type==="select"&&k.key==="declarationScope")return p.jsx(Si,{value:j,onChange:I,label:B,required:q,error:x,options:ZS,placeholder:$,fieldPath:`companyInfo.${k.key}`});if(k.type==="date"){const M=l?i:void 0;return p.jsx(GS,{value:j,onChange:I,label:B,required:q,error:x,minDate:e.dateConfig.minDate,maxDate:e.dateConfig.maxDate,placeholder:$,formatHint:M,fieldPath:`companyInfo.${k.key}`})}return p.jsx(vi,{value:j,onChange:I,label:B,required:q,error:x,multiline:k.type==="textarea",rows:k.key==="scopeDescription"?3:void 0,placeholder:$,fieldPath:`companyInfo.${k.key}`,autoComplete:XS[k.key],spellCheck:eC.has(k.key)?!1:void 0})})();return p.jsx(y.Col,{xs:24,md:L,children:R},k.key)},{companyFields:h,contactFields:g,authorizerFields:b}=ne(()=>{const k=tc(e.companyInfoFields,x=>VS.has(x.key)?"contact":WS.has(x.key)?"authorizer":HS.has(x.key)?"company":"other"),L=k.company??[];return{companyFields:c==="C"?L:L.filter(x=>x.key!=="scopeDescription"),contactFields:k.contact??[],authorizerFields:k.authorizer??[]}},[e.companyInfoFields,c]),w=k=>r?r.get(k.key)===!0:k.required===!0,S=ne(()=>Bs(e.companyInfoFields,k=>w(k)?1:0),[e.companyInfoFields,r]),v=ne(()=>Bs(e.companyInfoFields,k=>{if(!w(k))return 0;const L=t[k.key];return typeof L=="string"&&L.trim().length>0?1:0}),[e.companyInfoFields,r,t]),C={marginBottom:0},N=W(()=>{t.contactName&&n("authorizerName",t.contactName),t.contactEmail&&n("authorizerEmail",t.contactEmail),t.contactPhone&&n("authorizerPhone",t.contactPhone)}),_=!!(t.contactName||t.contactEmail||t.contactPhone);return p.jsx(y.Card,{title:p.jsxs(y.Flex,{align:"center",justify:"space-between",style:{width:"100%"},children:[p.jsx(YS,{level:5,style:C,children:s("sections.companyInfo")}),S>0&&p.jsx(y.Tag,{color:"orange",children:s("badges.requiredCompleted",{done:v,total:S})})]}),children:p.jsxs(y.Flex,{vertical:!0,gap:24,children:[p.jsx(y.Row,{gutter:[24,0],children:h.map(k=>d(k,12))}),g.length>0&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"border-t border-gray-200 pt-4",children:p.jsx(y.Typography.Text,{strong:!0,className:"text-gray-600 text-sm",children:s("sections.contact")})}),p.jsx(y.Row,{gutter:[24,0],children:g.map(k=>d(k,12))})]}),b.length>0&&p.jsxs(p.Fragment,{children:[p.jsxs(y.Flex,{align:"center",justify:"space-between",className:"border-t border-gray-200 pt-4",children:[p.jsx(y.Typography.Text,{strong:!0,className:"text-gray-600 text-sm",children:s("sections.authorizer")}),g.length>0&&!a&&p.jsx(y.Button,{type:"link",size:"small",icon:p.jsx(we.CopyOutlined,{}),onClick:N,disabled:!_,children:s("actions.sameAsContact")})]}),p.jsx(y.Row,{gutter:[24,0],children:b.map(k=>d(k,12))})]})]})})}function nC({questions:e,questionDefs:t,values:n,onChange:o,minerals:r=[],gatingByMineral:i,gatingCondition:s,requiredByQuestion:a,errors:l={}}){const{t:c}=Ce(),u=ne(()=>(t??[]).map(_=>`${_.key}:${_.options.map(k=>`${k.value}:${k.labelKey}`).join(",")}`).join("|"),[t]),f=ne(()=>{const _=new Map;return(t??[]).forEach(k=>{const L=new Map;k.options.forEach(j=>{L.set(j.value,c(j.labelKey))}),_.set(k.key,L)}),_},[t,u,c]),d=!(a?Array.from(a.values()).some(_=>_):i?Array.from(i.values()).some(_=>_.companyQuestionsEnabled):!1),h=ne(()=>iC(c,s,f),[c,s,f]),g=e.map(_=>`${_.key}:${_.perMineral?1:0}:${_.hasCommentField?1:0}:${_.options.map(k=>`${k.value}:${k.labelKey}`).join(",")}`).join("|"),b=ne(()=>{const _=new Map;return e.forEach(k=>{_.set(k.key,$e(k.options.map(L=>{const j=c(L.labelKey);return j?{value:L.value,label:j}:null})))}),_},[e,g,c]),w=W((_,k)=>{o(_,k)}),S=Re(()=>{const _=new Map;return e.forEach(k=>{k.perMineral||_.set(k.key,L=>w(k.key,L))}),_},[e,g,w]),v=Re(()=>{const _=new Map;return e.forEach(k=>{k.perMineral&&r.forEach(L=>{_.set(`${k.key}:${L.key}`,j=>o(k.key,j,L.key))})}),_},[e,r,o,g]),C=Re(()=>{const _=new Map;return e.forEach(k=>{if(!k.hasCommentField||k.perMineral)return;const L=`${k.key}_comment`;_.set(L,j=>w(L,j))}),_},[e,g,w]),N=Re(()=>{const _=new Map;return e.forEach(k=>{if(!k.hasCommentField||!k.perMineral)return;const L=`${k.key}_comment`;r.forEach(j=>{_.set(`${L}:${j.key}`,x=>o(L,x,j.key))})}),_},[e,r,o,g]);return e.length===0?null:p.jsx(y.Card,{title:p.jsxs(y.Flex,{wrap:!0,align:"center",justify:"space-between",gap:8,children:[p.jsx(y.Typography.Title,{level:5,style:{margin:0},children:c("sections.companyQuestions")}),p.jsx(y.Tag,{color:"blue",children:h})]}),children:p.jsx(y.Flex,{vertical:!0,gap:0,"data-optional":d?"true":"false",children:e.map(_=>_.perMineral?rC({question:_,minerals:r,values:n,errors:l,gatingByMineral:i,options:b.get(_.key)??[],getPerMineralHandler:v,getPerMineralCommentHandler:N,t:c}):oC({question:_,values:n,errors:l,isOptional:d,requiredByQuestion:a,options:b.get(_.key)??[],getSelectHandler:S,getCommentHandler:C,t:c}))})})}function oC({question:e,values:t,errors:n,isOptional:o,requiredByQuestion:r,options:i,getSelectHandler:s,getCommentHandler:a,t:l}){const c=hc(n,e.key,"",!1),u=`${e.key}_comment`,f=s(e.key),m=a(u),d=e.commentRequiredWhen??[],h=Br(t,e.key,"",!1),g=gc(n,u,"",!1),b=r?.get(e.key)??!o,w=e.hasCommentField&&d.includes(h||""),S=b&&w,v=yc(t,u,"",!1);return p.jsx("div",{className:"company-question-row",children:p.jsxs("div",{className:"company-question-grid",children:[p.jsx(y.Typography.Text,{className:"company-question-label",children:l(e.labelKey)}),p.jsx("div",{className:"company-question-answer",children:p.jsx(Si,{value:Br(t,e.key,"",!1),onChange:f,options:i,placeholder:l("placeholders.select"),required:b,error:c,allowClear:!0,fieldPath:`companyQuestions.${e.key}`})}),p.jsx("div",{className:"company-question-comment",children:e.hasCommentField&&p.jsx(vi,{value:v,onChange:m,placeholder:e.commentLabelKey?l(e.commentLabelKey):l("placeholders.comments"),required:S,multiline:!0,rows:2,error:g,fieldPath:`companyQuestions.${u}`})})]})},e.key)}function rC({question:e,minerals:t,values:n,errors:o,gatingByMineral:r,options:i,getPerMineralHandler:s,getPerMineralCommentHandler:a,t:l}){if(t.length===0)return null;const c=`${e.key}_comment`;return p.jsx("div",{className:"company-question-row",children:p.jsxs("div",{className:"company-question-grid company-question-grid-per-mineral",children:[p.jsx(y.Typography.Text,{className:"company-question-label company-question-label-full",strong:!0,children:l(e.labelKey)}),t.map(u=>{const f=r?.get(u.key)?.companyQuestionsEnabled===!0,m=Br(n,e.key,u.key,!0),d=hc(o,e.key,u.key,!0),h=s(`${e.key}:${u.key}`),g=yc(n,c,u.key,!0),b=gc(o,c,u.key,!0),w=e.commentRequiredWhen??[],S=e.hasCommentField&&w.includes(m||""),v=f&&S,C=a(`${c}:${u.key}`);return p.jsxs("div",{className:"company-question-mineral-row",children:[p.jsx(y.Typography.Text,{className:"company-question-mineral-label",children:u.label??l(u.labelKey)}),p.jsx("div",{className:"company-question-answer",children:p.jsx(Si,{value:m,onChange:h,options:i,placeholder:l("placeholders.select"),required:f,error:d,allowClear:!0,fieldPath:`companyQuestions.${e.key}.${u.key}`})}),p.jsx("div",{className:"company-question-comment",children:e.hasCommentField&&p.jsx(vi,{value:g,onChange:C,placeholder:e.commentLabelKey?l(e.commentLabelKey):l("placeholders.comments"),required:v,multiline:!0,rows:2,error:b,fieldPath:`companyQuestions.${c}.${u.key}`})})]},u.key)})]})},e.key)}function Br(e,t,n,o){const r=e[t];return o&&typeof r=="object"?r[n]||"":!o&&typeof r=="string"?r:""}function hc(e,t,n,o){const r=e[t];if(o&&r&&typeof r=="object")return r[n];if(!o&&typeof r=="string")return r}function yc(e,t,n,o){const r=e[t];return o&&r&&typeof r=="object"?r[n]||"":!o&&typeof r=="string"?r:""}function gc(e,t,n,o){const r=e[t];if(o&&r&&typeof r=="object")return r[n];if(!o&&typeof r=="string")return r}function iC(e,t,n){const o=t?sC(e,t,n):e("conditions.always");return e("badges.companyQuestionsRequired",{condition:o})}function sC(e,t,n){const o=(i,s)=>n?.get(i)?.get(s)??s,r=i=>i.filter(Boolean).join(" / ");switch(t.type){case"always":return e("conditions.always");case"q1-not-no":return e("conditions.q1NotNo",{no:o("Q1","No")});case"q1-yes":return e("conditions.q1Yes",{yes:o("Q1","Yes")});case"q1q2-not-no":return e("conditions.q1q2NotNo",{no:o("Q1","No"),noQ2:o("Q2","No")});case"q1q2-yes":return e("conditions.q1q2Yes",{yes:o("Q1","Yes"),yesQ2:o("Q2","Yes")});case"q1-not-negatives":return e("conditions.q1NotNegatives",{negatives:r(t.negatives.map(i=>o("Q1",i)))});case"q1-not-negatives-and-q2-not-negatives":return e("conditions.q1NotNegativesAndQ2NotNegatives",{q1Negatives:r(t.q1Negatives.map(i=>o("Q1",i))),q2Negatives:r(t.q2Negatives.map(i=>o("Q2",i)))});default:return e("conditions.always")}}const{Title:aC}=y.Typography;function lC({versionDef:e,selectedMinerals:t,onMineralsChange:n,errors:o,customMinerals:r=[],onCustomMineralsChange:i}){const{t:s,locale:a,i18n:l}=Ce(),{componentDisabled:c}=y.ConfigProvider.useConfig(),{mineralScope:u}=e,f=a.startsWith("zh"),m=u.mode!=="fixed",d=u.mode==="free-text"?u.maxCount||10:0,h=u.otherSlotCount??0,g=ne(()=>d>0?Array.from({length:d},($,I)=>I):[],[d]),b=ne(()=>h>0?Array.from({length:h},($,I)=>I):[],[h]),{maxCountHint:w,maxCountReachedHint:S}=ne(()=>cC(s,u.maxCount),[s,u.maxCount]),v=Kn(s,o?.selection),C=uC(s,o?.custom),N=W(($,I)=>{if(I){if(u.maxCount&&t.length>=u.maxCount)return;n([...t,$.key]);return}n(t.filter(R=>R!==$.key))}),_=W(($,I)=>{const R=[...r];R[$]=I,i?.(R)}),k=u.mode==="free-text"?g:b,L=Re(()=>{const $=new Map;return u.minerals.forEach(I=>{$.set(I.key,R=>N(I,R.target.checked))}),$},[u.minerals,N]),j=Re(()=>{const $=new Map;return u.minerals.forEach(I=>{$.set(I.key,()=>{const R=t.includes(I.key);!R&&u.maxCount!==void 0&&t.length>=u.maxCount||N(I,!R)})}),$},[u.minerals,N,t,u.maxCount]),x=Re(()=>{const $=new Map;return k.forEach(I=>{$.set(I,R=>_(I,R.target.value))}),$},[k,_]),q=W($=>{const I=s($.labelKey);if(!f)return I;const R=l.t($.labelKey,{lng:"en-US"});return R===I?I:`${I} ${R}`}),B=p.jsxs(y.Flex,{align:"center",justify:"space-between",className:"w-full",children:[p.jsxs(y.Flex,{align:"center",gap:8,children:[p.jsx(aC,{level:5,style:{margin:0},children:s("sections.mineralsScope")}),m&&p.jsx(y.Typography.Text,{type:"danger",children:"*"})]}),u.mode==="dynamic-dropdown"&&u.maxCount&&p.jsxs(y.Tag,{color:"orange",children:[t.length,"/",u.maxCount]})]});if(u.mode==="fixed")return p.jsx(y.Card,{title:B,children:p.jsx(y.Row,{gutter:[10,10],children:u.minerals.map($=>p.jsx(y.Col,{xs:8,sm:6,md:4,children:p.jsx("div",{className:"rounded-md border border-blue-200 bg-blue-50 px-3 py-1.5 text-center",children:p.jsx(y.Typography.Text,{strong:!0,className:"text-blue-600 text-sm",children:q($)})})},$.key))})});if(u.mode==="dynamic-dropdown"){const $=t.includes("other");return p.jsx(y.Card,{title:B,children:p.jsxs(y.Flex,{vertical:!0,gap:16,children:[p.jsx(y.Row,{gutter:[10,10],children:u.minerals.map(I=>{const R=t.includes(I.key);if(c)return p.jsx(y.Col,{xs:12,sm:8,md:6,children:p.jsx("div",{className:["rounded-md border px-3 py-1.5 select-none",R?"border-blue-400 bg-blue-50":"border-gray-200 bg-white"].join(" "),children:p.jsx(y.Typography.Text,{strong:R,type:R?void 0:"secondary",className:"text-sm",children:q(I)})})},I.key);const M=!R&&u.maxCount!==void 0&&t.length>=u.maxCount,K=M?void 0:j(I.key),O=p.jsx("div",{className:["rounded-md border px-3 py-1.5 transition-all cursor-pointer select-none",R?"border-blue-400 bg-blue-50":"border-gray-200 bg-white hover:border-blue-300 hover:bg-blue-50/50",M?"opacity-50 cursor-not-allowed":""].join(" "),onClick:K,children:p.jsx(y.Checkbox,{checked:R,disabled:M,onChange:L(I.key),onClick:Z=>Z.stopPropagation(),children:p.jsx(y.Typography.Text,{strong:R,className:"text-sm",children:q(I)})})});return p.jsx(y.Col,{xs:12,sm:8,md:6,children:M&&S?p.jsx(y.Tooltip,{title:S,children:O}):O},I.key)})}),w&&p.jsx(y.Typography.Text,{type:"secondary",className:"text-xs",children:w}),$&&b.length>0&&p.jsxs(y.Flex,{vertical:!0,gap:8,children:[p.jsxs(y.Flex,{align:"center",gap:4,children:[p.jsx(y.Typography.Text,{type:"secondary",className:"text-xs",children:s("sections.mineralsOther")}),p.jsx(y.Typography.Text,{type:"danger",children:"*"})]}),p.jsx(y.Row,{gutter:[8,8],children:b.map(I=>p.jsx(y.Col,{xs:12,md:6,children:p.jsx(y.Input,{value:r[I]||void 0,onChange:x(I),placeholder:s("placeholders.customMineral",{index:I+1}),disabled:c,status:C[I]?"error":void 0})},I))}),C[0]&&p.jsx(y.Typography.Text,{type:"danger",className:"text-xs",children:C[0]})]}),v&&p.jsx(y.Typography.Text,{type:"danger",className:"text-xs",children:v})]})})}return u.mode==="free-text"?p.jsx(y.Card,{title:B,children:p.jsxs(y.Flex,{vertical:!0,gap:12,children:[p.jsx(y.Typography.Text,{type:"secondary",className:"text-xs",children:s("hints.mineralsMaxCount",{max:d})}),p.jsx(y.Row,{gutter:[8,8],children:g.map($=>p.jsx(y.Col,{xs:12,md:6,children:p.jsx(y.Input,{value:r[$]||void 0,onChange:x($),placeholder:s("placeholders.customMineral",{index:$+1}),disabled:c,status:C[$]?"error":void 0})},$))}),C[0]&&p.jsx(y.Typography.Text,{type:"danger",className:"text-xs",children:C[0]})]})}):null}function cC(e,t){return t?{maxCountHint:e("hints.mineralsMaxCount",{max:t}),maxCountReachedHint:e("hints.mineralsMaxCountReached")}:{maxCountHint:void 0,maxCountReachedHint:void 0}}function uC(e,t){const n={};return t&&Object.entries(t).forEach(([o,r])=>{if(!r)return;const i=Number(o);Number.isNaN(i)||(n[i]=Kn(e,r)??r)}),n}function bc(e){return e.map(t=>`${t.value}:${t.labelKey}`).join(",")}function mC(e){return e?Object.keys(e).sort().map(t=>`${t}[${bc(e[t]??[])}]`).join("|"):""}function dC({versionDef:e,minerals:t,values:n,commentValues:o,onChange:r,onCommentChange:i,gatingByMineral:s,requiredByQuestion:a,errors:l={}}){const{t:c}=Ce(),{componentDisabled:u}=y.ConfigProvider.useConfig(),{questions:f,mineralScope:m}=e,d=t??m.minerals,h=d.map(x=>`${x.key}:${x.labelKey??""}`).join("|"),g=f.map(x=>`${x.key}:${x.perMineral?1:0}:${x.labelKey}:${bc(x.options)}:${mC(x.optionsByMineral)}`).join("|"),b=ne(()=>d.map(x=>({...x})),[d,h]),w=ne(()=>{const x=new Map,q=B=>B.map($=>({value:$.value,label:c($.labelKey)}));return f.forEach(B=>{if(B.perMineral){b.forEach($=>{const R=B.optionsByMineral?.[$.key]??B.options;x.set(`${B.key}:${$.key}`,q(R))});return}x.set(`${B.key}:__all`,q(B.options))}),x},[f,b,h,g,c]),S=W((x,q,B)=>{r(x,q,B)}),v=W((x,q,B)=>{i(x,q,B)}),C=Re(()=>{const x=new Map;return f.forEach(q=>{if(q.perMineral){b.forEach(B=>{x.set(`${q.key}:${B.key}`,$=>S(q.key,B.key,$))});return}x.set(`${q.key}:__all`,B=>S(q.key,null,B))}),x},[S,b,f,h,g]),N=Re(()=>{const x=new Map;return f.forEach(q=>{if(q.perMineral){b.forEach(B=>{x.set(`${q.key}:${B.key}`,$=>v(q.key,B.key,$))});return}x.set(`${q.key}:__all`,B=>v(q.key,null,B))}),x},[v,b,f,h,g]),_=W((x,q,B)=>{const $=B?`${x}:${q??""}`:`${x}:__all`;return C($)}),k=W((x,q,B)=>{const $=B?`${x}:${q??""}`:`${x}:__all`;return N($)}),L=W((x,q,B)=>{const $=B?`${x}:${q??""}`:`${x}:__all`;return w.get($)??[]}),j=W((x,q)=>{b.forEach(B=>{L(x,B.key,!0).some(I=>I.value===q)&&r(x,B.key,q)})});return p.jsx(y.Card,{title:p.jsxs(y.Flex,{wrap:!0,align:"center",justify:"space-between",gap:8,children:[p.jsxs("div",{children:[p.jsx(y.Typography.Title,{level:5,style:{margin:0},children:c("sections.questionMatrix")}),p.jsx(y.Typography.Text,{type:"secondary",children:c("sections.questionMatrixHint")})]}),p.jsx(y.Tag,{color:"blue",children:c("badges.questionRange",{from:1,to:f.length})})]}),children:p.jsx(y.Flex,{vertical:!0,gap:0,children:f.map(x=>p.jsx(pC,{question:x,minerals:b,values:n,commentValues:o,errors:l,gatingByMineral:s,requiredByQuestion:a,getOptions:L,getCellHandler:_,getCommentHandler:k,onBatchSet:j,t:c,readOnly:u},x.key))})})}function pC({question:e,minerals:t,values:n,commentValues:o,errors:r,gatingByMineral:i,requiredByQuestion:s,getOptions:a,getCellHandler:l,getCommentHandler:c,onBatchSet:u,t:f,readOnly:m}){let d=e.key!=="Q1";for(const b of t){const w=i?.get(b.key);if(!Xs(e.key,w)){d=!1;break}}const h=e.perMineral&&t.length>1,g=ne(()=>{if(!h)return[];const b=t.map(v=>new Set(a(e.key,v.key,!0).map(C=>C.value))),w=b.reduce((v,C)=>new Set([...v].filter(N=>C.has(N))),b[0]??new Set);return a(e.key,t[0]?.key??null,!0).filter(v=>w.has(v.value))},[h,e.key,t,a]);return p.jsx("div",{className:`question-matrix-row ${d?"question-row-disabled":""}`,children:p.jsxs(y.Flex,{vertical:!0,gap:12,children:[p.jsxs(y.Flex,{align:"center",justify:"space-between",gap:12,children:[p.jsx(y.Typography.Text,{strong:!0,style:{fontSize:14,flex:1},children:f(e.labelKey)}),h&&g.length>0&&!d&&!m&&p.jsx(y.Select,{placeholder:f("actions.setAllTo"),options:g,onChange:b=>u(e.key,b),style:{width:140},size:"small",allowClear:!0,value:void 0})]}),p.jsx(y.Flex,{vertical:!0,gap:8,children:t.map(b=>{const w=i?.get(b.key),S=m||Xs(e.key,w),v=ea(n,e.key,b.key,e.perMineral),C=ea(o,e.key,b.key,e.perMineral);hC(r,e.key,b.key,e.perMineral);const N=s?.get(e.key)?.get(b.key)===!0,_=!S&&N&&!v?"field-required-empty":void 0,k=l(e.key,b.key,e.perMineral),L=c(e.key,b.key,e.perMineral),j=a(e.key,b.key,e.perMineral);return p.jsxs("div",{className:"question-matrix-grid",children:[p.jsx(y.Typography.Text,{className:"question-matrix-label",type:S?"secondary":void 0,children:b.label??f(b.labelKey)}),p.jsx("div",{className:"question-matrix-answer",children:p.jsx(y.Select,{value:v||void 0,onChange:k,onKeyDown:fC(j,k,S),options:j,placeholder:f("placeholders.select"),disabled:S,allowClear:!0,className:_,"data-field-path":e.perMineral?`questions.${e.key}.${b.key}`:`questions.${e.key}`})}),p.jsx("div",{className:"question-matrix-comment",children:p.jsx(y.Input.TextArea,{value:C||void 0,onChange:x=>L?.(x.target.value),placeholder:f("placeholders.comments"),disabled:S,autoSize:{minRows:1,maxRows:2},rows:1,style:{resize:"none"},"data-field-path":e.perMineral?`questionComments.${e.key}.${b.key}`:`questionComments.${e.key}`})})]},b.key)})})]})})}function fC(e,t,n){return o=>{if(n||!t)return;const r=o.key.toLowerCase();if(r!=="y"&&r!=="n"&&r!=="u")return;const i=e.find(s=>s.value.toLowerCase().startsWith(r));i&&(o.preventDefault(),t(i.value))}}function Xs(e,t){return!t||e==="Q1"?!1:e==="Q2"?!t.q2Enabled:!t.laterQuestionsEnabled}function ea(e,t,n,o){const r=e[t];return o&&typeof r=="object"?r[n]||"":typeof r=="string"?r:""}function hC(e,t,n,o){const r=e[t];if(o&&typeof r=="object")return r[n];if(typeof r=="string")return r}const to=4,At={xs:to,sm:to*2,md:to*3,lg:to*4},Ve={pagePadding:At.lg,sectionGap:At.lg};function ir(){const e=Eo(),t=ne(()=>e?e.state.searchParams:typeof window<"u"?new URLSearchParams(window.location.search):new URLSearchParams,[e]);re.useEffect(()=>{const n=t.get("focus");if(!n)return;const o=document.querySelector(`[data-field-path="${n}"]`);if(!o)return;o.scrollIntoView({behavior:"smooth",block:"center"}),o.querySelector("input, textarea, .ant-select-selector")?.focus(),o.classList.add("app-field-focus");const i=window.setTimeout(()=>{o.classList.remove("app-field-focus")},1500);return()=>window.clearTimeout(i)},[t])}function ta(){const{meta:e,form:t}=Fe(),{versionDef:n}=e,{companyInfo:o,selectedMinerals:r,customMinerals:i,questions:s,questionComments:a,companyQuestions:l}=t,c=Ll(),{setCompanyInfoField:u,setSelectedMinerals:f,setCustomMinerals:m,setQuestionValue:d,setQuestionComment:h,setCompanyQuestionValue:g}=Et(),{t:b}=Ce(),{gatingByMineral:w,requiredFields:S,viewModels:v}=$t(),{displayMinerals:C}=v.declaration;return ir(),p.jsxs(y.Flex,{vertical:!0,gap:Ve.sectionGap,children:[p.jsx(tC,{versionDef:n,values:o,onChange:u,requiredFields:S.companyInfo,errors:c.companyInfo,dateFormatHint:b("hints.authorizationDate")}),p.jsx(lC,{versionDef:n,selectedMinerals:r,onMineralsChange:f,customMinerals:i,onCustomMineralsChange:m,errors:{selection:c.mineralsScope,custom:c.customMinerals}}),p.jsx(dC,{versionDef:n,minerals:C,values:s,commentValues:a,onChange:d,onCommentChange:h,gatingByMineral:w,requiredByQuestion:S.questions,errors:c.questions}),p.jsx(nC,{questions:n.companyQuestions,questionDefs:n.questions,minerals:C,values:l,onChange:g,gatingByMineral:w,gatingCondition:n.gating.companyQuestionsGating,requiredByQuestion:S.companyQuestions,errors:c.companyQuestions})]})}const{Title:PT,Text:yC}=y.Typography;function na({title:e}){const{t}=Ce();return p.jsx(y.Flex,{justify:"center",align:"center",style:{height:256},children:p.jsx(yC,{type:"secondary",style:{fontSize:18},children:t("common.comingSoon",{title:e})})})}const gC={productListRequired:{tone:"success",key:"docStatus.productListRequired"},productListNotRequired:{tone:"info",key:"docStatus.productListNotRequired"},productListUnknown:{tone:"warning",key:"docStatus.productListUnknown"},smelterListUnknown:{tone:"warning",key:"docStatus.smelterListUnknown"},smelterListNotRequired:{tone:"info",key:"docStatus.smelterListNotRequired"},smelterListPending:{tone:"warning",key:"docStatus.smelterListPending"},smelterListRequired:{tone:"success",key:"docStatus.smelterListRequired",withMetalsKey:"docStatus.smelterListRequiredWithMetals"},mineListAvailable:{tone:"info",key:"docStatus.mineListAvailable"},mineListNotAvailable:{tone:"info",key:"docStatus.mineListNotAvailable"}};function wc(e){const{meta:t,form:n}=Fe(),{versionDef:o}=t,{selectedMinerals:r,customMinerals:i}=n,{docStatusBySection:s}=$t(),{t:a}=Ce(),l=s;return e==="productList"?yr(l.productList,a):e==="smelterList"?yr(l.smelterList,a,o,r,i):e==="mineList"?yr(l.mineList,a):null}function yr(e,t,n,o=[],r=[]){const i=gC[e.type];if(!i)return{tone:"info",text:t("docStatus.productListNotRequired")};let s=i.key;const a={};if(e.type==="smelterListPending"){const l=n?oa(n,o,r,e.metals??[],t):[];a.metals=l.join(", "),a.questions=e.questions??"Q1/Q2"}if(e.type==="smelterListRequired"){const l=n?oa(n,o,r,e.metals??[],t):[];l.length>0&&i.withMetalsKey&&(s=i.withMetalsKey,a.metals=l.join(", "))}return{tone:i.tone,text:t(s,a)}}function oa(e,t,n,o,r){const i=bi(e,t,n),s=new Map(i.map(a=>[a.key,a.label??r(a.labelKey)]));return $e(o.map(a=>s.get(a)))}const{Title:ra,Paragraph:Kr,Text:bC}=y.Typography;function wC(e,t,n,o){const r=`docs.${e}.${t}.${n}`;return o(r)?r:`docs.${e}.${pm(e)}.${n}`}function vc(e){const{meta:t}=Fe(),{templateType:n,versionId:o}=t,{locale:r,i18n:i}=Ce(),s=W(a=>i.exists(a));return ne(()=>wC(n,o,e,s),[n,o,e,s,r])}function Sc(e){const{t}=Ce(),n=vc(e);return ne(()=>{const o=t(n,{returnObjects:!0,defaultValue:[]});return Array.isArray(o)?$e(o.map(r=>typeof r=="string"&&r.trim().length>0?r:null)):[]},[n,t])}function vC(){const{t:e}=Ce(),t=vc("definitions");return ne(()=>{const n=e(t,{returnObjects:!0,defaultValue:[]});return Array.isArray(n)?$e(n.map(o=>{if(!o||typeof o!="object"||!("term"in o)||!("definition"in o))return null;const r=o;return typeof r.term!="string"||typeof r.definition!="string"?null:r})):[]},[t,e])}function Cc(e){const t=e.tone==="success"?"success":e.tone==="warning"?"warning":"info";return p.jsx(y.Alert,{type:t,message:e.text,showIcon:!0,style:{marginBottom:At.sm}})}function Mo({section:e}){const t=Sc(e),n=wc(e);return t.length===0?null:p.jsxs(y.Card,{children:[n?Cc(n):null,p.jsx(y.Typography,{children:t.map((o,r)=>p.jsx(Kr,{style:{marginBottom:r<t.length-1?At.sm:0,whiteSpace:"pre-line"},type:"secondary",children:o},`${e}-${r}`))})]})}function gr({titleKey:e,section:t}){const{t:n}=Ce(),o=Sc(t),r=vC(),i=wc(t);return t==="definitions"?r.length===0?p.jsx(na,{title:n(e)}):p.jsxs(y.Flex,{vertical:!0,gap:Ve.sectionGap,children:[p.jsx(ra,{level:4,style:{margin:0},children:n(e)}),r.map((s,a)=>p.jsxs(y.Card,{children:[p.jsx(bC,{strong:!0,children:s.term}),p.jsx(Kr,{type:"secondary",style:{marginTop:At.xs,marginBottom:0,whiteSpace:"pre-line"},children:s.definition})]},`definition-${a}`))]}):o.length===0?p.jsx(na,{title:n(e)}):p.jsxs(y.Flex,{vertical:!0,gap:Ve.sectionGap,children:[p.jsx(ra,{level:4,style:{margin:0},children:n(e)}),i?Cc(i):null,p.jsx(y.Typography,{children:o.map((s,a)=>p.jsx(Kr,{type:"secondary",style:{marginBottom:a<o.length-1?At.md:0,whiteSpace:"pre-line"},children:s},`${t}-${a}`))})]})}function Ge(e,t,n=!1){return!e||n?t:p.jsx("div",{className:"field-required",children:t})}const SC=["smelterName","mineName","mineId","mineIdSource","mineStreet","mineCity","mineProvince","mineContactName","mineContactEmail","proposedNextSteps","comments"],CC=["metal","smelterName","mineCountry"];function kC({config:e,availableMetals:t,rows:n,onChange:o,countryOptions:r=[],smelterOptions:i=[],smelterOptionsByMetal:s={}}){const{t:a}=Ce(),{componentDisabled:l}=y.ConfigProvider.useConfig(),c=ne(()=>new Map(n.map((v,C)=>[v.id,C])),[n]),u=W(()=>{if(l)return;const v={id:`mine-${Date.now()}`,metal:"",smelterName:"",mineName:"",mineCountry:"",mineId:"",mineIdSource:"",mineStreet:"",mineCity:"",mineProvince:"",mineDistrict:"",mineContactName:"",mineContactEmail:"",proposedNextSteps:"",comments:""};o([...n,v])}),f=W(v=>{if(l)return;const C=c.get(v);if(C===void 0)return;const N=n.slice();N.splice(C,1),o(N)}),m=W((v,C,N)=>{if(l)return;const _=c.get(v);if(_===void 0)return;const k=n[_];if(!k||k[C]===N)return;const L=n.slice();L[_]={...k,[C]:N},o(L)}),d=Re(()=>{const v=new Map;return n.forEach(C=>{SC.forEach(N=>{v.set(`${C.id}:${N}`,_=>m(C.id,N,_.target.value))})}),v},[n,m]),h=Re(()=>{const v=new Map;return n.forEach(C=>{CC.forEach(N=>{v.set(`${C.id}:${N}`,_=>m(C.id,N,_))})}),v},[n,m]),g=Re(()=>{const v=new Map;return n.forEach(C=>{v.set(C.id,()=>f(C.id))}),v},[n,f]),b=ne(()=>t.map(v=>({value:v.key,label:v.label??a(v.labelKey)})),[t,a]),w=W((v,C)=>(C?.label??"").toLowerCase().includes(v.toLowerCase())),S=ne(()=>[{title:a("tables.metal"),dataIndex:"metal",key:"metal",width:150,render:(v,C)=>Ge(!0,p.jsx(y.Select,{value:v||void 0,onChange:h(`${C.id}:metal`),options:b,placeholder:a("placeholders.select"),className:"w-full"}),l)},{title:a("tables.mineSmelterName"),dataIndex:"smelterName",key:"smelterName",width:220,render:(v,C)=>{const N=C.metal?s[C.metal]??[]:i,_=!!C.metal;return e.smelterNameMode==="dropdown"?Ge(_,p.jsx(y.Select,{value:v||void 0,onChange:h(`${C.id}:smelterName`),options:N,placeholder:a("placeholders.mineSmelterSelect"),showSearch:!0,filterOption:w,className:"w-full"}),l):Ge(_,p.jsx(y.AutoComplete,{value:v||void 0,onChange:h(`${C.id}:smelterName`),placeholder:a("placeholders.mineSmelterInput"),options:N,allowClear:!0,filterOption:w,className:"w-full"}),l)}},{title:a("tables.mineName"),dataIndex:"mineName",key:"mineName",width:180,render:(v,C)=>Ge(!!C.metal,p.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:mineName`),placeholder:a("placeholders.mineName")}),l)},{title:a("tables.mineId"),dataIndex:"mineId",key:"mineId",width:160,render:(v,C)=>p.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:mineId`),placeholder:a("placeholders.mineId")})},{title:a("tables.mineSourceId"),dataIndex:"mineIdSource",key:"mineIdSource",width:180,render:(v,C)=>p.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:mineIdSource`),placeholder:a("placeholders.mineSourceId")})},{title:a("tables.country"),dataIndex:"mineCountry",key:"mineCountry",width:160,render:(v,C)=>Ge(!!C.metal,p.jsx(y.Select,{value:v||void 0,onChange:h(`${C.id}:mineCountry`),options:r,placeholder:a("placeholders.mineCountry"),showSearch:!0,filterOption:w,className:"w-full"}),l)},{title:a("tables.street"),dataIndex:"mineStreet",key:"mineStreet",width:200,render:(v,C)=>p.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:mineStreet`),placeholder:a("placeholders.mineStreet")})},{title:a("tables.city"),dataIndex:"mineCity",key:"mineCity",width:160,render:(v,C)=>p.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:mineCity`),placeholder:a("placeholders.mineCity")})},{title:a("tables.stateProvince"),dataIndex:"mineProvince",key:"mineProvince",width:170,render:(v,C)=>p.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:mineProvince`),placeholder:a("placeholders.mineState")})},{title:a("tables.contactName"),dataIndex:"mineContactName",key:"mineContactName",width:180,render:(v,C)=>p.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:mineContactName`),placeholder:a("placeholders.mineContactName")})},{title:a("tables.contactEmail"),dataIndex:"mineContactEmail",key:"mineContactEmail",width:200,render:(v,C)=>p.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:mineContactEmail`),placeholder:a("placeholders.mineContactEmail")})},{title:a("tables.proposedNextSteps"),dataIndex:"proposedNextSteps",key:"proposedNextSteps",width:200,render:(v,C)=>p.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:proposedNextSteps`),placeholder:a("placeholders.mineNextSteps")})},{title:a("tables.comments"),dataIndex:"comments",key:"comments",width:180,render:(v,C)=>p.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:comments`),placeholder:a("placeholders.mineComments")})},...l?[]:[{title:"",key:"actions",width:60,render:(v,C)=>p.jsx(y.Button,{type:"text",danger:!0,icon:p.jsx(we.DeleteOutlined,{}),onClick:g(C.id)})}]],[l,e.smelterNameMode,r,w,d,g,h,b,i,a]);return e.available?p.jsx(y.Card,{title:p.jsxs(y.Flex,{align:"center",justify:"space-between",style:{width:"100%"},children:[p.jsxs(y.Flex,{align:"center",gap:8,children:[p.jsx(y.Typography.Title,{level:5,style:{margin:0},children:a("tabs.mineList")}),p.jsx(y.Tag,{color:"blue",children:a("badges.recordCount",{count:n.length})})]}),!l&&p.jsx(y.Button,{type:"primary",icon:p.jsx(we.PlusOutlined,{}),onClick:u,children:a("actions.addRow")})]}),children:p.jsx(y.Table,{columns:S,dataSource:n,rowKey:"id",pagination:!1,scroll:{x:"max-content"},bordered:!0})}):null}function TC(){const{meta:e,lists:t}=Fe(),{versionDef:n}=e,{mineList:o}=t,{setMineList:r}=Et(),{viewModels:i}=$t(),{availableMetals:s,countryOptions:a,smelterOptions:l,smelterOptionsByMetal:c}=i.mineList;return ir(),n.mineList.available?p.jsxs(y.Flex,{vertical:!0,gap:Ve.sectionGap,children:[p.jsx(Mo,{section:"mineList"}),p.jsx(kC,{config:n.mineList,availableMetals:s,rows:o,onChange:r,countryOptions:a,smelterOptions:l,smelterOptionsByMetal:c})]}):p.jsx(y.Typography.Text,{type:"secondary",children:p.jsx(Mo,{section:"mineList"})})}function xC({versionDef:e,rows:t,selectedMinerals:n,customMinerals:o,onChange:r,errors:i={}}){const{t:s}=Ce(),{componentDisabled:a}=y.ConfigProvider.useConfig(),l=ne(()=>{const b=bi(e,n,o);return(e.templateType==="amrt"?[...b].sort((S,v)=>{const C=(S.label??s(S.labelKey)).trim(),N=(v.label??s(v.labelKey)).trim(),_=C.localeCompare(N);return _!==0?_:S.key.localeCompare(v.key)}):b).map(S=>({value:S.key,label:S.label??s(S.labelKey)}))},[e,n,o,s]),c=ne(()=>new Map(t.map((b,w)=>[b.id,w])),[t]),u=W(()=>{const b={id:`minerals-scope-${Date.now()}`,mineral:"",reason:""};r([...t,b])}),f=W(b=>{const w=c.get(b);if(w===void 0)return;const S=t.slice();S.splice(w,1),r(S)}),m=W((b,w,S)=>{const v=c.get(b);if(v===void 0)return;const C=t[v];if(!C||C[w]===S)return;const N=t.slice();N[v]={...C,[w]:S},r(N)}),d=Re(()=>{const b=new Map;return t.forEach(w=>{b.set(w.id,S=>m(w.id,"reason",S.target.value))}),b},[t,m]),h=Re(()=>{const b=new Map;return t.forEach(w=>{b.set(w.id,S=>m(w.id,"mineral",S))}),b},[t,m]),g=ne(()=>[{title:s("tables.metal"),dataIndex:"mineral",key:"mineral",width:220,render:(b,w)=>{const S=i[c.get(w.id)??-1]?.mineral;return Ge(!0,p.jsx(y.Select,{value:b||void 0,onChange:h(w.id),options:l,placeholder:s("placeholders.select"),disabled:a,className:"w-full",status:S?"error":void 0}),a)}},{title:e.templateType==="amrt"?s(e.version.id==="1.1"?"tables.mineralsScopeReasonPrt":"tables.mineralsScopeReasonAmrt"):s("tables.mineralsScopeReason"),dataIndex:"reason",key:"reason",render:(b,w)=>{const S=i[c.get(w.id)??-1]?.reason;return Ge(!0,p.jsx(y.Input,{value:b||void 0,onChange:d(w.id),placeholder:s("placeholders.mineralsScopeReason"),disabled:a,status:S?"error":void 0}),a)}},{title:"",key:"actions",width:60,render:(b,w)=>a?null:p.jsx(y.Button,{type:"text",danger:!0,icon:p.jsx(we.DeleteOutlined,{}),onClick:()=>f(w.id)})}],[s,l,i,c,h,d,f,a]);return p.jsxs(y.Flex,{vertical:!0,gap:Ve.sectionGap,children:[p.jsxs(y.Flex,{align:"center",justify:"space-between",children:[p.jsxs(y.Flex,{wrap:!0,align:"center",gap:8,children:[p.jsx(y.Typography.Title,{level:5,style:{margin:0},children:s("tabs.mineralsScope")}),p.jsx(y.Tag,{color:"blue",children:s("badges.recordCount",{count:t.length})})]}),!a&&p.jsx(y.Button,{type:"primary",onClick:u,children:s("actions.addRow")})]}),p.jsx(y.Table,{columns:g,dataSource:t,rowKey:"id",pagination:!1,scroll:{x:"max-content"},bordered:!0}),t.length===0&&p.jsx(y.Typography.Text,{type:"secondary",style:{display:"block",textAlign:"center",padding:"32px 0"},children:s("tables.noData")})]})}function _C(){const{meta:e,form:t,lists:n}=Fe(),{versionDef:o}=e,{selectedMinerals:r,customMinerals:i}=t,{mineralsScope:s}=n,{setMineralsScope:a}=Et(),l=Ll();return p.jsx(xC,{versionDef:o,rows:s,selectedMinerals:r,customMinerals:i,onChange:a,errors:l.mineralsScopeRows})}const IC=["productNumber","productName","requesterNumber","requesterName","comments"],RC=re.memo(function({templateType:t,versionId:n,versionDef:o,config:r,rows:i,onChange:s,required:a=!1,showRequesterColumns:l,integration:c}){const{t:u,locale:f}=Ce(),{componentDisabled:m}=y.ConfigProvider.useConfig(),[d,h]=re.useState([]),[g,{setTrue:b,setFalse:w}]=wi(),S=mc(i),v=ne(()=>{const Y=new Set(i.map(se=>se.id));return d.filter(se=>Y.has(se))},[i,d]),C=ne(()=>new Map(i.map((Y,se)=>[Y.id,se])),[i]),N=W(()=>{if(m)return;const Y={id:`product-${Date.now()}`,productNumber:"",productName:"",comments:""};s([...i,Y])}),_=c?.addMode??"append-empty-row",k=!!c&&_!=="append-empty-row",L=_!=="external-only",j=c?.label??u("actions.pickExternal"),x=c?.showLoadingIndicator??!1,q=W((Y,se)=>{const ae=`product-${Date.now()}-${se}`;return{...Y,id:typeof Y.id=="string"&&Y.id.trim()?Y.id:ae,productNumber:Y.productNumber??"",productName:Y.productName??"",requesterNumber:Y.requesterNumber??"",requesterName:Y.requesterName??"",comments:Y.comments??""}}),B=W(()=>S.current.map(Y=>({...Y}))),$=W(async()=>{if(m||!c||g)return;const Y=B(),se={templateType:t,versionId:n,locale:f,versionDef:o,config:r,currentRows:Y};b();try{const D=(await c.onPickProducts(se))?.items??[];if(D.length===0)return;const P=D.map((U,J)=>q(U,J));s([...S.current,...P])}catch{y.Modal.error({title:u("errors.externalPickFailedTitle"),content:u("errors.externalPickFailedContent")})}finally{w()}}),I=W(Y=>{if(m)return;const se=C.get(Y);if(se===void 0)return;const ae=i.slice();ae.splice(se,1),s(ae)}),R=W((Y,se,ae)=>{if(m)return;const D=C.get(Y);if(D===void 0)return;const P=i[D];if(!P||P[se]===ae)return;const U=i.slice();U[D]={...P,[se]:ae},s(U)}),M=Re(()=>{const Y=new Map;return i.forEach(se=>{IC.forEach(ae=>{Y.set(`${se.id}:${ae}`,D=>R(se.id,ae,D.target.value))})}),Y},[i,R]),K=W(Y=>{h(se=>se.filter(ae=>ae!==Y)),I(Y)}),O=Re(()=>{const Y=new Map;return i.forEach(se=>{Y.set(se.id,()=>K(se.id))}),Y},[i,K]),Z=W(()=>{m||v.length!==0&&y.Modal.confirm({title:u("confirm.batchDelete"),content:u("confirm.batchDeleteContent",{count:v.length}),okText:u("actions.batchDelete"),okType:"danger",cancelText:u("actions.cancelSelection"),onOk:()=>{const Y=new Set(v);s(i.filter(se=>!Y.has(se.id))),h([])}})}),E=W(()=>{m||h([])}),H={selectedRowKeys:v,onChange:Y=>h(Y)},G=!m,ee=ne(()=>{const Y=[{title:u(r.productNumberLabelKey),dataIndex:"productNumber",key:"productNumber",width:180,fixed:"left",render:(ae,D)=>Ge(a,p.jsx(y.Input,{value:ae||void 0,onChange:M(`${D.id}:productNumber`),placeholder:u("productPlaceholders.productNumber")}),m)},{title:u(r.productNameLabelKey),dataIndex:"productName",key:"productName",width:200,render:(ae,D)=>p.jsx(y.Input,{value:ae||void 0,onChange:M(`${D.id}:productName`),placeholder:u("productPlaceholders.productName")})}];return(l??r.hasRequesterColumns)&&Y.push({title:u("tables.requesterNumber"),dataIndex:"requesterNumber",key:"requesterNumber",width:180,render:(ae,D)=>p.jsx(y.Input,{value:ae||void 0,onChange:M(`${D.id}:requesterNumber`),placeholder:u("productPlaceholders.requesterNumber")})},{title:u("tables.requesterName"),dataIndex:"requesterName",key:"requesterName",width:200,render:(ae,D)=>p.jsx(y.Input,{value:ae||void 0,onChange:M(`${D.id}:requesterName`),placeholder:u("productPlaceholders.requesterName")})}),Y.push({title:u(r.commentLabelKey),dataIndex:"comments",key:"comments",width:200,render:(ae,D)=>p.jsx(y.Input,{value:ae||void 0,onChange:M(`${D.id}:comments`),placeholder:u("productPlaceholders.comments")})}),G&&Y.push({title:"",key:"actions",width:60,fixed:"right",render:(ae,D)=>p.jsx(y.Button,{type:"text",danger:!0,icon:p.jsx(we.DeleteOutlined,{}),onClick:O(D.id)})}),Y},[r,m,M,O,a,l,G,u]),de={emptyText:p.jsxs(y.Flex,{vertical:!0,align:"center",gap:16,className:"py-8",children:[p.jsx(y.Typography.Text,{type:"secondary",className:"text-sm",children:u("tables.noData")}),p.jsxs(y.Flex,{align:"center",gap:8,children:[G&&L&&p.jsx(y.Button,{type:"primary",icon:p.jsx(we.PlusOutlined,{}),onClick:N,children:u("actions.addRow")}),G&&k&&p.jsx(y.Button,{type:L?"default":"primary",icon:p.jsx(we.PlusOutlined,{}),onClick:$,loading:x&&g,children:j})]})]})};return p.jsx(y.Card,{title:p.jsxs(y.Flex,{vertical:!0,gap:8,style:{width:"100%"},children:[p.jsxs(y.Flex,{align:"center",justify:"space-between",children:[p.jsxs(y.Flex,{align:"center",gap:8,children:[p.jsx(y.Typography.Title,{level:5,style:{margin:0},children:u("tabs.productList")}),p.jsx(y.Tag,{color:"blue",children:u("badges.recordCount",{count:i.length})})]}),p.jsxs(y.Flex,{align:"center",gap:8,children:[G&&L&&p.jsx(y.Button,{type:"primary",icon:p.jsx(we.PlusOutlined,{}),onClick:N,children:u("actions.addRow")}),G&&k&&p.jsx(y.Button,{type:L?"default":"primary",icon:p.jsx(we.PlusOutlined,{}),onClick:$,loading:x&&g,children:j})]})]}),G&&v.length>0&&p.jsxs(y.Flex,{align:"center",gap:12,style:{padding:"8px 12px",background:"var(--ant-color-primary-bg)",borderRadius:6},children:[p.jsx(y.Typography.Text,{strong:!0,children:u("selection.selected",{count:v.length})}),p.jsx(y.Button,{type:"primary",danger:!0,size:"small",icon:p.jsx(we.DeleteOutlined,{}),onClick:Z,children:u("actions.batchDelete")}),p.jsx(y.Button,{type:"text",size:"small",icon:p.jsx(we.CloseOutlined,{}),onClick:E,children:u("actions.cancelSelection")})]})]}),children:p.jsx(y.Table,{columns:ee,dataSource:i,rowKey:"id",rowSelection:G?H:void 0,pagination:!1,scroll:{x:"max-content",y:i.length>20?600:void 0},virtual:i.length>50,bordered:!0,locale:de})})});function NC(){const{meta:e,lists:t}=Fe(),{versionDef:n}=e,{productList:o}=t,{setProductList:r}=Et(),{requiredFields:i}=$t(),s=El();return ir(),p.jsxs(y.Flex,{vertical:!0,gap:Ve.sectionGap,children:[p.jsx(Mo,{section:"productList"}),p.jsx(RC,{templateType:e.templateType,versionId:e.versionId,versionDef:n,config:n.productList,rows:o,onChange:r,required:i.productListRequired,showRequesterColumns:n.productList.hasRequesterColumns,integration:s?.productList})]})}const{Title:MC,Text:xt}=y.Typography;function qC(){const{meta:e}=Fe(),{templateType:t,versionId:n}=e,{t:o}=Ce(),r=Ba(t),i=r.versions,s=i.some(l=>!!l.releaseDate),a=W(l=>p.jsx(y.List.Item,{children:p.jsxs(y.Flex,{align:"center",justify:"space-between",style:{width:"100%"},children:[p.jsxs(y.Flex,{align:"center",gap:At.sm,children:[p.jsx(xt,{strong:!0,children:l.label}),l.id===n&&p.jsx(y.Tag,{color:"blue",children:o("revision.currentTag")}),l.id===r.defaultVersion&&p.jsx(y.Tag,{color:"gold",children:o("revision.defaultTag")})]}),s&&l.releaseDate?p.jsx(xt,{type:"secondary",style:{fontSize:12},children:l.releaseDate}):null]})}));return p.jsxs(y.Flex,{vertical:!0,gap:Ve.sectionGap,children:[p.jsxs("div",{children:[p.jsx(MC,{level:4,style:{margin:0},children:o("tabs.revision")}),p.jsx(xt,{type:"secondary",children:o("revision.subtitle")})]}),p.jsx(y.Card,{children:p.jsxs(y.Descriptions,{column:{xs:1,md:2},children:[p.jsx(y.Descriptions.Item,{label:o("revision.templateName"),children:p.jsx(xt,{strong:!0,children:o(r.fullNameKey)})}),p.jsx(y.Descriptions.Item,{label:o("revision.currentVersion"),children:p.jsx(xt,{strong:!0,children:n})}),p.jsx(y.Descriptions.Item,{label:o("revision.defaultVersion"),children:p.jsx(xt,{strong:!0,children:r.defaultVersion})}),p.jsx(y.Descriptions.Item,{label:o("revision.totalVersions"),children:p.jsx(xt,{strong:!0,children:i.length})})]})}),p.jsx(y.Card,{title:o("revision.availableVersions"),children:p.jsx(y.List,{dataSource:i,renderItem:a})})]})}const at={placeholder:"Select from list…",notListed:"Smelter not listed",notYetIdentified:"Smelter not yet identified",separator:"---"};at.placeholder,at.notListed,at.notYetIdentified,at.separator;at.placeholder,at.notListed,at.notYetIdentified,at.separator;const AC={"Ningxia Orient Tantalum Industry Co., Ltd.":{smelterId:"CID001277",sourceId:"RMI-Ta-001",country:"China",street:"123 Industrial Road",city:"Shizuishan",state:"Ningxia"},"Malaysia Smelting Corporation":{smelterId:"CID001105",sourceId:"RMI-Sn-002",country:"Malaysia",street:"88 Smelter Ave",city:"Butterworth",state:"Penang"},"Xiamen Tungsten Co., Ltd.":{smelterId:"CID002082",sourceId:"RMI-W-003",country:"China",street:"56 Tungsten Blvd",city:"Xiamen",state:"Fujian"},"Metalor Technologies SA":{smelterId:"CID001149",sourceId:"RMI-Au-004",country:"Switzerland",street:"2 Metalor Strasse",city:"Marin-Epagnier",state:"Neuchatel"}},LC=["smelterId","smelterName","smelterIdentification","sourceId","smelterStreet","smelterCity","smelterState","smelterContactName","smelterContactEmail","proposedNextSteps","mineName","comments","combinedSmelter"],EC=["metal","smelterLookup","smelterCountry","mineCountry","recycledScrap","combinedMetal"],PC=re.memo(function({templateType:t,versionId:n,versionDef:o,config:r,availableMetals:i,rows:s,onChange:a,countryOptions:l=[],smelterLookupRecords:c,smelterLookupMeta:u,showNotYetIdentifiedCountryHint:f=!1,integration:m}){const{t:d,locale:h}=Ce(),{componentDisabled:g}=y.ConfigProvider.useConfig(),[b,w]=re.useState([]),[S,{setTrue:v,setFalse:C}]=wi(),N=mc(s),[_,k]=re.useState(null),L=ne(()=>{const z=new Set(s.map(oe=>oe.id));return b.filter(oe=>z.has(oe))},[s,b]),j=ne(()=>new Map(s.map((z,oe)=>[z.id,oe])),[s]),x=z=>!!(u&&Yt(z)),q=z=>!!(u&&vo(z)),B=z=>{if(!z||x(z)||q(z))return!1;const oe=Ir(z);return!!c?.[oe]},$=r.notListedRequireNameCountry??!0,I=z=>{const oe=r.notYetIdentifiedCountryByMetal?.[z];return typeof oe=="string"?oe:r.notYetIdentifiedCountryDefault??"Unknown"},R=W(()=>{if(g)return;const z={id:`smelter-${Date.now()}`,metal:"",smelterLookup:"",smelterName:"",smelterCountry:"",combinedMetal:"",combinedSmelter:"",smelterId:"",smelterIdentification:"",sourceId:"",smelterStreet:"",smelterCity:"",smelterState:"",smelterContactName:"",smelterContactEmail:"",proposedNextSteps:"",mineName:"",mineCountry:"",recycledScrap:"",comments:""};a([...s,z])}),M=m?.addMode??"append-empty-row",K=!!m?.onPickSmelters&&M!=="append-empty-row",O=M!=="external-only",Z=m?.label??d("actions.pickExternal"),E=m?.showLoadingIndicator??!1,H=m?.lookupMode??"internal",G=H==="external"||H==="hybrid",ee=W(()=>N.current.map(z=>({...z}))),de=W((z,oe)=>{const Q=`smelter-${Date.now()}-${oe}`;return{...z,id:typeof z.id=="string"&&z.id.trim()?z.id:Q,metal:z.metal??"",smelterLookup:z.smelterLookup??"",smelterName:z.smelterName??"",smelterCountry:z.smelterCountry??"",combinedMetal:z.combinedMetal??"",combinedSmelter:z.combinedSmelter??"",smelterId:z.smelterId??"",smelterIdentification:z.smelterIdentification??"",sourceId:z.sourceId??"",smelterStreet:z.smelterStreet??"",smelterCity:z.smelterCity??"",smelterState:z.smelterState??"",smelterContactName:z.smelterContactName??"",smelterContactEmail:z.smelterContactEmail??"",proposedNextSteps:z.proposedNextSteps??"",mineName:z.mineName??"",mineCountry:z.mineCountry??"",recycledScrap:z.recycledScrap??"",comments:z.comments??""}}),Y=W(async()=>{if(g||!m||!m.onPickSmelters||S)return;const z=ee(),oe={templateType:t,versionId:n,locale:h,versionDef:o,config:r,currentRows:z};v();try{const F=(await m.onPickSmelters(oe))?.items??[];if(F.length===0)return;const me=F.map((Ee,dt)=>de(Ee,dt));a([...N.current,...me])}catch{y.Modal.error({title:d("errors.externalPickFailedTitle"),content:d("errors.externalPickFailedContent")})}finally{C()}}),se=W((z,oe)=>{const Q={...z,...oe,id:z.id,metal:z.metal};if(!Q.smelterLookup||!u)return Q;const F=!Q.smelterName&&!x(Q.smelterLookup)&&!q(Q.smelterLookup)?{...Q,smelterName:Q.smelterLookup}:Q;return B(F.smelterLookup)?J(F,F.smelterLookup):F}),ae=W((z,oe)=>{const Q=N.current,F=Q.findIndex(Ee=>Ee.id===z);if(F<0)return;const me=Q.slice();me[F]=oe,a(me)}),D=W(async z=>{if(g||!m?.onPickSmelterForRow||_)return;const Q=N.current.find(me=>me.id===z);if(!Q||!Q.metal)return;const F={templateType:t,versionId:n,locale:h,versionDef:o,config:r,currentRows:ee(),rowId:z,row:{...Q},metal:Q.metal};k(z);try{const Ee=(await m.onPickSmelterForRow(F))?.items?.[0];if(!Ee)return;ae(z,se(Q,Ee))}catch{y.Modal.error({title:d("errors.externalPickFailedTitle"),content:d("errors.externalPickFailedContent")})}finally{k(null)}}),P=W(z=>{if(g)return;const oe=j.get(z);if(oe===void 0)return;const Q=s.slice();Q.splice(oe,1),a(Q)}),U=W(z=>{w(oe=>oe.filter(Q=>Q!==z)),P(z)}),J=(z,oe)=>{const Q=Ir(oe),F={...z,smelterLookup:Q};if(!u||!oe)return F;if(Yt(Q))return{...F,smelterId:"",smelterName:"",smelterCountry:"",smelterIdentification:"",sourceId:"",smelterStreet:"",smelterCity:"",smelterState:""};if(vo(Q)){const Ee=I(z.metal);return{...F,smelterName:"Unknown",smelterCountry:Ee,smelterId:"Unknown",smelterIdentification:"Unknown",sourceId:"",smelterStreet:"",smelterCity:"",smelterState:""}}if(!G)return{...F,smelterName:Q};const me=c?.[Q];return me?{...F,smelterName:Q,smelterId:me.smelterId,smelterIdentification:me.smelterId,sourceId:me.sourceId,smelterCountry:me.country,smelterStreet:me.street,smelterCity:me.city,smelterState:me.state}:F},ie=W((z,oe,Q)=>{if(g)return;const F=j.get(z);if(F===void 0)return;const me=s[F];if(!me)return;const Ee=(()=>{if(oe==="smelterLookup")return J(me,Q);if(oe==="metal"&&q(me.smelterLookup)){const sn=I(Q);return{...me,metal:Q,smelterName:me.smelterName||"Unknown",smelterCountry:sn,smelterIdentification:me.smelterIdentification||"Unknown"}}return me[oe]===Q?me:{...me,[oe]:Q}})();if(Ee===me)return;const dt=s.slice();dt[F]=Ee,a(dt)}),te=Re(()=>{const z=new Map;return s.forEach(oe=>{LC.forEach(Q=>{z.set(`${oe.id}:${Q}`,F=>ie(oe.id,Q,F.target.value))})}),z},[s,ie]),le=Re(()=>{const z=new Map;return s.forEach(oe=>{EC.forEach(Q=>{z.set(`${oe.id}:${Q}`,F=>ie(oe.id,Q,F))})}),z},[s,ie]),ve=Re(()=>{const z=new Map;return s.forEach(oe=>{z.set(oe.id,()=>U(oe.id))}),z},[s,U]),ge=W(()=>{g||L.length!==0&&y.Modal.confirm({title:d("confirm.batchDelete"),content:d("confirm.batchDeleteContent",{count:L.length}),okText:d("actions.batchDelete"),okType:"danger",cancelText:d("actions.cancelSelection"),onOk:()=>{const z=new Set(L);a(s.filter(oe=>!z.has(oe.id))),w([])}})}),ze=W(()=>{g||w([])}),Qe={selectedRowKeys:L,onChange:z=>w(z)},Te=!g,ot=ne(()=>i.map(z=>({value:z.key,label:z.label??d(z.labelKey)})),[i,d]),kt=ne(()=>[{value:"Yes",label:d("options.yes")},{value:"No",label:d("options.no")},{value:"Unknown",label:d("options.unknown")}],[d]),rn=ne(()=>[{value:"Yes",label:d("options.yes")},{value:"No",label:d("options.no")}],[d]),Ii=r.recycledScrapOptions==="yes-no"?rn:kt,Fc=W((z,oe)=>(oe?.label??"").toLowerCase().includes(z.toLowerCase())),zc=ne(()=>{const z=[];return z.push({title:d("tables.metal"),dataIndex:"metal",key:"metal",width:140,fixed:"left",render:(Q,F)=>Ge(!0,p.jsx(y.Select,{value:Q||void 0,onChange:le(`${F.id}:metal`),options:ot,placeholder:d("placeholders.select"),className:"w-full"}),g)}),r.hasLookup&&z.push({title:d("tables.smelterName"),dataIndex:"smelterLookup",key:"smelterLookup",width:220,fixed:"left",render:(Q,F)=>Ge(!!F.metal,G&&m?.onPickSmelterForRow?p.jsxs(y.Flex,{align:"center",gap:8,children:[x(F.smelterLookup)&&$?p.jsx(y.Input,{value:F.smelterName||void 0,onChange:te(`${F.id}:smelterName`),placeholder:d("placeholders.smelterNameRequired")}):F.smelterLookup?p.jsxs(p.Fragment,{children:[p.jsx(y.Typography.Text,{ellipsis:!0,style:{maxWidth:150},children:F.smelterLookup}),Te&&p.jsx(y.Button,{type:"link",size:"small",onClick:()=>D(F.id),disabled:!F.metal||_===F.id,loading:E&&_===F.id,children:d("actions.edit")})]}):Te?p.jsx(y.Button,{type:"link",size:"small",onClick:()=>D(F.id),disabled:!F.metal||_===F.id,loading:E&&_===F.id,children:d("actions.chooseSmelter")}):p.jsx(y.Typography.Text,{type:"secondary",children:"-"}),Te&&H==="hybrid"&&p.jsx(y.Typography.Text,{type:"secondary",style:{fontSize:12},children:d("actions.pickExternal")})]}):p.jsxs(y.Flex,{vertical:!0,gap:4,children:[p.jsx(y.AutoComplete,{value:Q||void 0,onChange:le(`${F.id}:smelterLookup`),options:u?[{value:u.notListed,label:u.notListed},{value:u.notYetIdentified,label:u.notYetIdentified}]:[],placeholder:d("placeholders.smelterName"),allowClear:!0,className:"w-full"}),x(F.smelterLookup)&&$&&p.jsx(y.Input,{value:F.smelterName||void 0,onChange:te(`${F.id}:smelterName`),placeholder:d("placeholders.smelterNameRequired")})]}),g)}),r.hasIdColumn&&z.push({title:d("tables.smelterId"),dataIndex:"smelterId",key:"smelterId",width:180,fixed:"left",render:(Q,F)=>p.jsx(y.Input,{value:Q||void 0,onChange:te(`${F.id}:smelterId`),placeholder:d("placeholders.smelterIdInput"),className:"font-mono text-xs",disabled:G&&B(F.smelterLookup)})}),r.hasLookup||z.push({title:d("tables.smelterName"),dataIndex:"smelterName",key:"smelterName",width:200,render:(Q,F)=>{const me=x(F.smelterLookup)&&$,Ee=q(F.smelterLookup),dt=B(F.smelterLookup),sn=d(me?"placeholders.smelterNameRequired":Ee?"placeholders.smelterNameOptional":"placeholders.smelterName");return Ge(me,p.jsx(y.Input,{value:Q||void 0,onChange:te(`${F.id}:smelterName`),placeholder:sn,disabled:G&&dt}),g)}}),z.push({title:d("tables.country"),dataIndex:"smelterCountry",key:"smelterCountry",width:180,render:(Q,F)=>{const me=x(F.smelterLookup)&&$,Ee=q(F.smelterLookup),dt=B(F.smelterLookup),sn=d(me?"placeholders.smelterCountryRequired":"placeholders.smelterCountry"),Bc=Ee&&f;return Ge(me,p.jsxs(y.Flex,{vertical:!0,gap:4,children:[p.jsx(y.Select,{value:Q||void 0,onChange:le(`${F.id}:smelterCountry`),options:l,placeholder:sn,showSearch:!0,filterOption:Fc,className:"w-full",disabled:G&&dt}),Bc&&p.jsx(y.Typography.Text,{type:"secondary",style:{fontSize:12},children:d("hints.smelterNotYetIdentifiedCountry")})]}),g)}},{title:d("tables.smelterIdentification"),dataIndex:"smelterIdentification",key:"smelterIdentification",width:180,render:(Q,F)=>p.jsx(y.Input,{value:Q||void 0,onChange:te(`${F.id}:smelterIdentification`),placeholder:d("placeholders.smelterIdentification"),disabled:G&&B(F.smelterLookup)})},{title:d("tables.sourceId"),dataIndex:"sourceId",key:"sourceId",width:180,render:(Q,F)=>p.jsx(y.Input,{value:Q||void 0,onChange:te(`${F.id}:sourceId`),placeholder:d("placeholders.smelterSourceId"),disabled:G&&B(F.smelterLookup)})},{title:d("tables.street"),dataIndex:"smelterStreet",key:"smelterStreet",width:200,render:(Q,F)=>p.jsx(y.Input,{value:Q||void 0,onChange:te(`${F.id}:smelterStreet`),placeholder:d("placeholders.smelterStreet"),disabled:G&&B(F.smelterLookup)})},{title:d("tables.city"),dataIndex:"smelterCity",key:"smelterCity",width:160,render:(Q,F)=>p.jsx(y.Input,{value:Q||void 0,onChange:te(`${F.id}:smelterCity`),placeholder:d("placeholders.smelterCity"),disabled:G&&B(F.smelterLookup)})},{title:d("tables.stateProvince"),dataIndex:"smelterState",key:"smelterState",width:170,render:(Q,F)=>p.jsx(y.Input,{value:Q||void 0,onChange:te(`${F.id}:smelterState`),placeholder:d("placeholders.smelterState"),disabled:G&&B(F.smelterLookup)})},{title:d("tables.contactName"),dataIndex:"smelterContactName",key:"smelterContactName",width:180,render:(Q,F)=>p.jsx(y.Input,{value:Q||void 0,onChange:te(`${F.id}:smelterContactName`),placeholder:d("placeholders.smelterContactName")})},{title:d("tables.contactEmail"),dataIndex:"smelterContactEmail",key:"smelterContactEmail",width:200,render:(Q,F)=>p.jsx(y.Input,{value:Q||void 0,onChange:te(`${F.id}:smelterContactEmail`),placeholder:d("placeholders.smelterContactEmail")})},{title:d("tables.proposedNextSteps"),dataIndex:"proposedNextSteps",key:"proposedNextSteps",width:200,render:(Q,F)=>p.jsx(y.Input,{value:Q||void 0,onChange:te(`${F.id}:proposedNextSteps`),placeholder:d("placeholders.smelterNextSteps")})},{title:d("tables.mineName"),dataIndex:"mineName",key:"mineName",width:180,render:(Q,F)=>p.jsx(y.Input,{value:Q||void 0,onChange:te(`${F.id}:mineName`),placeholder:d("placeholders.smelterMineName")})},{title:d("tables.mineCountry"),dataIndex:"mineCountry",key:"mineCountry",width:240,render:(Q,F)=>p.jsx(y.AutoComplete,{value:Q||void 0,onChange:le(`${F.id}:mineCountry`),placeholder:d("placeholders.smelterMineCountry"),options:l,allowClear:!0,className:"w-full"})},{title:d("tables.recycledScrap"),dataIndex:"recycledScrap",key:"recycledScrap",width:260,render:(Q,F)=>p.jsx(y.Select,{value:Q||void 0,onChange:le(`${F.id}:recycledScrap`),options:Ii,placeholder:d("placeholders.select"),className:"w-full"})},{title:d("tables.comments"),dataIndex:"comments",key:"comments",width:200,render:(Q,F)=>p.jsx(y.Input,{value:Q||void 0,onChange:te(`${F.id}:comments`),placeholder:d("placeholders.smelterComments")})}),r.hasCombinedColumn&&z.push({title:d("tables.combinedMetal"),dataIndex:"combinedMetal",key:"combinedMetal",width:180,render:(Q,F)=>p.jsx(y.Select,{value:Q||void 0,onChange:le(`${F.id}:combinedMetal`),options:ot,placeholder:d("placeholders.smelterCombinedMetal"),className:"w-full"})},{title:d("tables.combinedSmelter"),dataIndex:"combinedSmelter",key:"combinedSmelter",width:220,render:(Q,F)=>p.jsx(y.Input,{value:Q||void 0,onChange:te(`${F.id}:combinedSmelter`),placeholder:d("placeholders.smelterCombinedSmelter")})}),Te&&z.push({title:"",key:"actions",width:60,fixed:"right",render:(Q,F)=>p.jsx(y.Button,{type:"text",danger:!0,icon:p.jsx(we.DeleteOutlined,{}),onClick:ve(F.id)})}),z},[r,g,l,ie,D,P,m,ot,$,_,E,Te,u,H,d,G,kt,rn,Ii]),jc={emptyText:p.jsxs(y.Flex,{vertical:!0,align:"center",gap:16,className:"py-8",children:[p.jsx(y.Typography.Text,{type:"secondary",className:"text-sm",children:d("tables.noData")}),p.jsxs(y.Flex,{align:"center",gap:8,children:[Te&&O&&p.jsx(y.Button,{type:"primary",icon:p.jsx(we.PlusOutlined,{}),onClick:R,children:d("actions.addRow")}),Te&&K&&p.jsx(y.Button,{type:O?"default":"primary",icon:p.jsx(we.PlusOutlined,{}),onClick:Y,loading:E&&S,children:Z})]})]})},Ri=m?.rowClassName;return p.jsx(y.Card,{title:p.jsxs(y.Flex,{vertical:!0,gap:8,style:{width:"100%"},children:[p.jsxs(y.Flex,{align:"center",justify:"space-between",children:[p.jsxs(y.Flex,{align:"center",gap:8,children:[p.jsx(y.Typography.Title,{level:5,style:{margin:0},children:d("tabs.smelterList")}),p.jsx(y.Tag,{color:"blue",children:d("badges.recordCount",{count:s.length})})]}),p.jsxs(y.Flex,{align:"center",gap:8,children:[Te&&O&&p.jsx(y.Button,{type:"primary",icon:p.jsx(we.PlusOutlined,{}),onClick:R,children:d("actions.addRow")}),Te&&K&&p.jsx(y.Button,{type:O?"default":"primary",icon:p.jsx(we.PlusOutlined,{}),onClick:Y,loading:E&&S,children:Z})]})]}),Te&&L.length>0&&p.jsxs(y.Flex,{align:"center",gap:12,style:{padding:"8px 12px",background:"var(--ant-color-primary-bg)",borderRadius:6},children:[p.jsx(y.Typography.Text,{strong:!0,children:d("selection.selected",{count:L.length})}),p.jsx(y.Button,{type:"primary",danger:!0,size:"small",icon:p.jsx(we.DeleteOutlined,{}),onClick:ge,children:d("actions.batchDelete")}),p.jsx(y.Button,{type:"text",size:"small",icon:p.jsx(we.CloseOutlined,{}),onClick:ze,children:d("actions.cancelSelection")})]})]}),children:p.jsx(y.Table,{className:"smelter-list-table",columns:zc,dataSource:s,rowKey:"id",rowClassName:Ri?(z,oe)=>Ri(z,oe):void 0,rowSelection:Te?Qe:void 0,pagination:!1,scroll:{x:"max-content",y:s.length>20?600:void 0},virtual:s.length>50,bordered:!0,locale:jc})})});function DC(){const{meta:e,lists:t}=Fe(),{versionDef:n}=e,{smelterList:o}=t,{setSmelterList:r}=Et(),{viewModels:i}=$t(),s=El(),{availableMetals:a,countryOptions:l,showNotYetIdentifiedCountryHint:c}=i.smelterList;return ir(),p.jsxs(y.Flex,{vertical:!0,gap:Ve.sectionGap,children:[p.jsx(Mo,{section:"smelterList"}),p.jsx(PC,{templateType:e.templateType,versionId:e.versionId,versionDef:n,config:n.smelterList,availableMetals:a,rows:o,onChange:r,countryOptions:l,smelterLookupRecords:AC,smelterLookupMeta:at,showNotYetIdentifiedCountryHint:c,integration:s?.smelterList})]})}const $C={cmrt:["declaration","smelter-list","product-list","checker"],crt:["declaration","smelter-list","product-list","checker"],emrt:["declaration","smelter-list","mine-list","product-list","checker"],amrt:["declaration","minerals-scope","smelter-list","mine-list","product-list","checker"]};function OC(e){const t=new Map(e.pages.map(o=>[o.key,o]));return($C[e.templateType]??[]).map(o=>t.get(o)).filter(o=>!!(o&&o.available))}const{Sider:FC}=y.Layout,zC=[{key:"declaration",label:"Declaration",icon:p.jsx(we.FileTextOutlined,{})},{key:"smelter-list",label:"Smelter List",icon:p.jsx(we.UnorderedListOutlined,{})},{key:"checker",label:"Checker",icon:p.jsx(we.CheckCircleOutlined,{})},{key:"product-list",label:"Product List",icon:p.jsx(we.ShoppingOutlined,{})},{key:"smelter-lookup",label:"Smelter Look-up",icon:p.jsx(we.SearchOutlined,{})},{key:"definitions",label:"Definitions",icon:p.jsx(we.BookOutlined,{})},{key:"instructions",label:"Instructions",icon:p.jsx(we.InfoCircleOutlined,{})}];function jC({tabs:e=zC,collapsed:t=!1,onCollapse:n,selectedKey:o,onSelect:r}){const i=ne(()=>e.map(c=>({key:c.key,icon:c.icon,label:c.label})),[e]),s=W(c=>{r?.(c.key)}),a=W(c=>{n?.(c)}),l=o??e[0]?.key;return p.jsx(FC,{collapsible:!0,collapsed:t,onCollapse:a,theme:"light",className:"border-r border-gray-200 bg-white",width:200,children:p.jsx(y.Menu,{mode:"inline",selectedKeys:l?[l]:[],items:i,onClick:s,className:"h-full border-r-0 px-2 py-2"})})}function BC({steps:e,currentKey:t,onChange:n}){const o=e.findIndex(s=>s.key===t),r=W(s=>{const a=e[s];a&&n?.(a.key)});if(e.length===0)return null;const i=e.map((s,a)=>{const l=s.progress&&s.progress.completed===s.progress.total&&s.progress.total>0,c=s.progress&&s.progress.total>0;return{key:s.key,title:p.jsxs("span",{className:"flex items-center gap-1.5",children:[p.jsx("span",{children:s.label}),c&&p.jsxs(y.Tag,{color:l?"success":"default",className:"text-xs ml-1",style:{margin:0},children:[s.progress.completed,"/",s.progress.total]})]}),icon:l?p.jsx(we.CheckCircleOutlined,{style:{color:"var(--ant-color-success)"}}):void 0,status:l||a<o?"finish":a===o?"process":"wait"}});return p.jsx("div",{className:"step-nav-container",children:p.jsx("div",{className:"step-nav-inner",children:p.jsx(y.Steps,{current:o>=0?o:0,items:i,onChange:r,type:"default",className:"step-nav-steps"})})})}const{Content:KC}=y.Layout;function QC({tabs:e,steps:t,topBanner:n,bottomSlot:o,currentTabKey:r,onTabChange:i,currentStepKey:s,onStepChange:a,children:l,maxContentWidth:c,className:u,style:f}){const[m,d]=re.useState(!1),h=W(S=>{d(S)}),g=!!(t&&t.length>0),b=!!(e&&e.length>0&&!g),w=c?{...f??{},"--cm-content-max-width":`${c}px`}:f;return p.jsxs(y.Layout,{className:`h-full min-h-full bg-gray-100 ${u??""}`,style:w,children:[g&&p.jsx(BC,{steps:t,currentKey:s,onChange:a}),n,p.jsxs(y.Layout,{children:[b&&p.jsx(jC,{tabs:e,collapsed:m,onCollapse:h,selectedKey:r,onSelect:i}),p.jsxs(y.Layout,{style:{padding:Ve.pagePadding,display:"flex",flexDirection:"column"},children:[p.jsx(KC,{style:{flex:1,overflow:"auto"},children:p.jsx(y.Flex,{vertical:!0,gap:Ve.sectionGap,className:"animate-fade-in w-full",style:c?{maxWidth:c,margin:"0 auto"}:void 0,children:l})}),o&&p.jsx("div",{className:"sticky-bottom-nav",style:{position:"sticky",bottom:0,zIndex:10,marginTop:Ve.sectionGap,maxWidth:c,marginLeft:c?"auto":void 0,marginRight:c?"auto":void 0,width:"100%"},children:p.jsx(y.Card,{children:o})})]})]})]})}function UC({className:e,errorCount:t=0,onGoToChecker:n}){const{t:o}=Ce();return t===0?p.jsx(y.Alert,{type:"success",showIcon:!0,className:e,message:o("checker.globalSuccessBar")}):p.jsx(y.Alert,{type:"warning",showIcon:!0,className:e,message:o("checker.globalErrorBar",{count:t}),action:n?p.jsxs(y.Button,{type:"link",size:"small",onClick:n,children:[o("checker.globalErrorAction")," ",p.jsx(we.RightOutlined,{className:"text-xs"})]}):void 0})}function GC({currentPageKey:e,onNavigatePage:t,pageOrder:n}){const{meta:o}=Fe(),{versionDef:r}=o,{t:i}=Ce(),{prev:s,next:a}=ne(()=>{const u=n&&n.length>0?n:r.pages.filter(m=>m.available),f=u.findIndex(m=>m.key===e);return f<0?{prev:null,next:null}:{prev:u[f-1]??null,next:u[f+1]??null}},[e,n,r.pages]),l=W(()=>{s&&t(s.key)}),c=W(()=>{a&&t(a.key)});return!s&&!a?null:p.jsxs(y.Flex,{align:"center",justify:"space-between",children:[p.jsx(y.Button,{onClick:l,disabled:!s,style:{minWidth:96},children:i("actions.prev")}),p.jsx(y.Button,{type:"primary",onClick:c,disabled:!a,style:{minWidth:96},children:i("actions.next")})]})}function YC(e,t){return t.includes(e)}function ZC({templateType:e,versionId:t,readOnly:n=!1,showPageActions:o=!0,pageKey:r,onNavigatePage:i,renderPage:s,integrations:a,maxContentWidth:l,children:c}){return p.jsxs(Ky,{templateType:e,versionId:t,integrations:a,readOnly:n,children:[c,p.jsx(HC,{readOnly:n,showPageActions:o,pageKey:r,onNavigatePage:i,renderPage:s,maxContentWidth:l})]})}function HC({readOnly:e=!1,showPageActions:t=!0,pageKey:n,onNavigatePage:o,renderPage:r,maxContentWidth:i}){const{componentDisabled:s}=y.ConfigProvider.useConfig(),{meta:a}=Fe(),{versionDef:l}=a,{t:c,locale:u,i18n:f}=Ce(),{checkerErrors:m,checkerSummary:d}=$t(),h=!!(s||e),g=W(L=>{o(L)}),b=ne(()=>{const L=OC(l);return e?L.filter(j=>j.key!=="checker"):L},[l,e]),w=ne(()=>{if(!(!e||n!=="checker"))return b[0]?.key},[e,n,b]),S=w??n;re.useEffect(()=>{w&&w!==n&&g(w)},[w,n,g]);const v=L=>{const{sections:j}=d;switch(L){case"declaration":return{total:j.companyInfo.total+j.questionMatrix.total+j.companyQuestions.total,completed:j.companyInfo.completed+j.questionMatrix.completed+j.companyQuestions.completed};case"smelterList":return j.smelterList;case"productList":return j.productList;default:return}},C=ne(()=>b.map(L=>({key:L.key,label:c(L.labelKey),progress:v(L.key)})),[b,c,u,f.isInitialized,d]),N=ne(()=>b.map(L=>L.key),[b]),_=W(L=>{YC(L,N)&&g(L)}),k=W(()=>{e||g("checker")});return p.jsxs(QC,{steps:C,currentStepKey:S,onStepChange:_,maxContentWidth:i,bottomSlot:e||!t?void 0:p.jsx(GC,{currentPageKey:S,onNavigatePage:g,pageOrder:b}),children:[!e&&S!=="checker"&&p.jsx(UC,{errorCount:m.length,onGoToChecker:k}),p.jsx(y.ConfigProvider,{componentDisabled:h,children:r(S)})]})}const VC="declaration";function WC({templateType:e,versionId:t,readOnly:n=!1,showPageActions:o=!0,pageKey:r,onNavigatePage:i,maxContentWidth:s,integrations:a,children:l}){const[c,u]=re.useState(VC),[f,m]=re.useState(new URLSearchParams),d=r??c,h=re.useCallback(w=>{i?i(w):u(w),m(new URLSearchParams)},[i]),g=re.useMemo(()=>({state:{pathname:ho({template:e,version:t,page:d}),params:{template:e,version:t,page:d},searchParams:f},actions:{navigate:w=>{const S=new URL(w,"http://app.local"),C=$e(S.pathname.split("/"))[2]||d;h(C),m(new URLSearchParams(S.search))}}}),[d,f,e,t,h]),b=re.useCallback(w=>{switch(w){case"revision":return p.jsx(qC,{});case"instructions":return p.jsx(gr,{titleKey:"tabs.instructions",section:"instructions"});case"definitions":return p.jsx(gr,{titleKey:"tabs.definitions",section:"definitions"});case"declaration":return p.jsx(ta,{});case"minerals-scope":return p.jsx(_C,{});case"smelter-list":return p.jsx(DC,{});case"checker":return p.jsx(CS,{onNavigateToField:(S,v)=>{h(S),m(new URLSearchParams({focus:v}))}});case"mine-list":return p.jsx(TC,{});case"product-list":return p.jsx(NC,{});case"smelter-lookup":return p.jsx(gr,{titleKey:"tabs.smelterLookup",section:"smelterLookup"});default:return p.jsx(ta,{})}},[h]);return p.jsx(Kc,{value:g,children:p.jsx(ZC,{templateType:e,versionId:t,readOnly:n,showPageActions:o,pageKey:d,onNavigatePage:h,renderPage:b,maxContentWidth:s,integrations:a,children:l})})}const JC={appTitle:"Conflict Minerals Reporting",selectTemplate:"Select Template",selectVersion:"Version",export:"Export",lookupSeparator:"----------",comingSoon:"{{title}} - Coming Soon",homeTitle:"Conflict Minerals Reporting Templates",homeSubtitle:"Select a template from the header to get started",language:"Language"},XC={cmrt:"CMRT",emrt:"EMRT",crt:"CRT",amrt:"AMRT",cmrt_full:"Conflict Minerals Reporting Template",emrt_full:"Extended Minerals Reporting Template",crt_full:"Cobalt Reporting Template",amrt_full:"Additional Minerals Reporting Template"},e1={revision:"Revision",declaration:"Declaration",smelterList:"Smelter List",checker:"Checker",productList:"Product List",smelterLookup:"Smelter Look-up",definitions:"Definitions",instructions:"Instructions",mineList:"Mine List",mineralsScope:"Minerals Scope"},t1={companyInfo:"Company Information",contact:"Contact",authorizer:"Authorizer",questionMatrix:"Question Matrix",questionMatrixHint:"Based on the reporting scope above, answer questions 1 to 8.",companyQuestions:"Company-level Questions",mineralsScope:"Minerals in Scope",mineralsOther:"Other minerals"},n1={requiredHintTitle:"Filling tip:",requiredHintBody:"Fields highlighted in yellow are required. Please complete them before submitting."},o1={requiredCompleted:"{{done}}/{{total}} required completed",questionRange:"Q{{from}}-Q{{to}}",companyQuestionsRequired:"Required when any metal {{condition}}",recordCount:"{{count}} records"},r1={always:"always",q1NotNo:"Q1 ≠ {{no}}",q1Yes:"Q1 = {{yes}}",q1q2NotNo:"Q1 ≠ {{no}} and Q2 ≠ {{noQ2}}",q1q2Yes:"Q1 = {{yes}} and Q2 = {{yesQ2}}",q1NotNegatives:"Q1 not in {{negatives}}",q1NotNegativesAndQ2NotNegatives:"Q1 not in {{q1Negatives}} and Q2 not in {{q2Negatives}}"},i1={select:"Select",input:"Enter value",number:"Enter number",date:"Select date",companyName:"Enter the company’s legal registered name",declarationScope:"Select…",scopeDescription:"Describe the custom reporting scope",customMineral:"Mineral {{index}}",companyId:"DUNS, VAT, organization ID, etc.",companyAuthId:"Authorization identifier",address:"Company address",contactName:"Enter contact name",contactEmail:"example@company.com",contactPhone:"+86 xxx xxxx xxxx",authorizerName:"Enter authorizer name",authorizerTitle:"Title",authorizerEmail:"example@company.com",authorizerPhone:"+86 xxx xxxx xxxx",authorizationDate:"DD-MMM-YYYY",smelterIdInput:"e.g. CID001105",smelterLookup:"Search smelter…",smelterName:"Smelter name",smelterNameRequired:"Required: Smelter name",smelterNameOptional:"Smelter name (optional)",smelterCountry:"Select country",smelterCountryRequired:"Required: Country",smelterIdentification:"CID…",smelterSourceId:"Source ID",smelterStreet:"Street",smelterCity:"City",smelterState:"State / Province",smelterContactName:"Contact name",smelterContactEmail:"email@…",smelterNextSteps:"Next steps",smelterMineName:"Mine name",smelterMineCountry:"Mine country",mineralsScopeReason:"Reason for inclusion",smelterComments:"Comments",comments:"Comments",smelterCombinedMetal:"Select",smelterCombinedSmelter:"Combined smelter",mineSmelterSelect:"Select smelter",mineSmelterInput:"Smelter name",mineName:"Mine name",mineId:"CID…",mineSourceId:"Source ID",mineCountry:"Select country",mineStreet:"Street",mineCity:"City",mineState:"State / Province",mineContactName:"Contact name",mineContactEmail:"email@…",mineNextSteps:"Next steps",mineComments:"Comments"},s1={productNumber:"PRD-xxxx-xxx",productName:"Product name",requesterNumber:"Requester number",requesterName:"Requester name",comments:"Comments"},a1={companyName:"Use the formal registered name; no abbreviations.",declarationScope:"A=Company-wide | B=Product (requires Product List) | C=User defined",contactEmail:'If no email, enter "not available".',authorizerName:'Do not enter placeholders like "same".',authorizationDate:"Format: DD-MMM-YYYY (e.g., 01-Jan-2026)",smelterNotYetIdentifiedCountry:"Not yet identified: leave country blank.",mineralsMaxCount:"Select up to {{max}} minerals",mineralsMaxCountReached:"Maximum minerals selected"},l1={metal:"Metal",smelterLookup:"Smelter Look-up",smelterName:"Smelter Name",smelterId:"Smelter Identification Number Input Column",smelterIdentification:"Smelter Identification",sourceId:"Source ID",country:"Country",street:"Street",city:"City",stateProvince:"State / Province",contactName:"Contact Name",contactEmail:"Contact Email",proposedNextSteps:"Proposed Next Steps",mineCountry:"Mine Country",mineSmelterName:"Smelter name sourced from this mine",mineSourceId:"Smelter Source ID",mineId:"Mine Identification",mineIdSource:"Mine ID Source",recycledScrap:"100% Recycled or Scrap?",combinedMetal:"Combined Metal",combinedSmelter:"Combined Smelter",mineName:"Mine Name",province:"Province",mineralsScopeReason:"Reasons for inclusion",mineralsScopeReasonPrt:"Reasons for inclusion on the PRT",mineralsScopeReasonAmrt:"Reasons for inclusion on the AMRT",comments:"Comments",requesterNumber:"Requester Number",requesterName:"Requester Name",noData:"No data"},c1={addRow:"Add Row",pickExternal:"Pick from External",chooseSmelter:"Choose Smelter",edit:"Edit",prev:"Previous",next:"Next",submit:"Submit",close:"Close",setAllTo:"Set all to",sameAsContact:"Same as Contact",batchDelete:"Delete Selected",cancelSelection:"Cancel"},u1={batchDelete:"Confirm Batch Delete",batchDeleteContent:"Are you sure you want to delete the selected {{count}} records? This action cannot be undone."},m1={selected:"{{count}} selected"},d1={yes:"Yes",no:"No",unknown:"Unknown",notApplicable:"Not applicable",notApplicableForDeclaration:"Not applicable for this declaration",notDeclaring:"Not declaring",none:"None",didNotSurvey:"Did not survey",drcOnly:"DRC only",drcOrAdjoiningOnly:"DRC or adjoining countries only",indiaMadagascarOnly:"India and/or Madagascar only",percentage100:"100%",percentageOne:"1",percentageAbove90:"Greater than 90%",percentageAbove75:"Greater than 75%",percentageAbove50:"Greater than 50%",percentage50OrLess:"50% or less",percentageLess25:"Less than 25%",yesCrtTemplate:"Yes, CRT",yesOtherFormat:"Yes, using other format (describe)",yesOtherFormatTitle:"Yes, Using Other Format (Describe)",yesIpc1755:"Yes, in conformance with IPC1755 (e.g., CMRT)",yesIpc1755Emrt:"Yes, in conformance with IPC1755 (e.g. EMRT)",yesWhenMoreValidated:"Yes, when more processors are validated",yesWithSec:"Yes, with the SEC",yesWithEu:"Yes, with the EU",yesWithSecAndEu:"Yes, with the SEC and the EU"},p1={tantalum:"Tantalum",tin:"Tin",gold:"Gold",tungsten:"Tungsten",cobalt:"Cobalt",mica:"Mica",copper:"Copper",graphite:"Graphite",lithium:"Lithium",nickel:"Nickel",silver:"Silver",aluminum:"Aluminum",antimony:"Antimony",chromium:"Chromium",germanium:"Germanium",iridium:"Iridium",lime:"Lime",magnesium:"Magnesium",manganese:"Manganese",palladium:"Palladium",phosphorus:"Phosphorus",platinum:"Platinum",rareEarthElements:"Rare Earth Elements",rhodium:"Rhodium",ruthenium:"Ruthenium",silicon:"Silicon",sodaAsh:"Soda Ash",titanium:"Titanium",vanadium:"Vanadium",zinc:"Zinc",zirconium:"Zirconium",other:"Other"},f1={cmrt:{q1:"1) Is any 3TG intentionally added or used in the product(s) or in the production process?",q2:"2) Does any 3TG remain in the product(s)?",q3:"3) Do any of the smelters in your supply chain source the 3TG from the covered countries? (SEC term, see definitions tab)",q4:"4) Do any of the smelters in your supply chain source the 3TG from conflict-affected and high-risk areas?",q5:"5) Does 100 percent of the 3TG (necessary to the functionality or production of your products) originate from recycled or scrap sources?",q6:"6) What percentage of relevant suppliers have provided a response to your supply chain survey?",q7:"7) Have you identified all of the smelters supplying the 3TG to your supply chain?",q8:"8) Has all applicable smelter information received by your company been reported in this declaration?"},emrt:{q1:"1) Is any of the specified mineral/metal intentionally added or used in the product(s) or in the production process?",q2:"2) Does any of the specified mineral/metal remain in the product(s)?",q3:"3) Do any of the smelters or processors in your supply chain source the specified mineral/metal from conflict-affected and high-risk areas? (OECD Due Diligence Guidance, see definitions tab)",q4:"4) Does 100 percent of the specified mineral/metal originate from recycled or scrap sources?",q5:"5) What percentage of relevant suppliers have provided a response to your supply chain survey?",q6:"6) Have you identified all of the smelters or processors supplying the specified minerals/metal to your supply chain?",q7:"7) Has all applicable smelter or processor information received by your company been reported in this declaration?",v1:{q1:"1) Is any cobalt or mica intentionally added or used in the product(s) or in the production process?",q2:"2) Does any cobalt or mica remain in the product(s)?",q3:"3) Do any of the smelters or processors in your supply chain source cobalt or mica from conflict-affected and high-risk areas? (OECD Due Diligence Guidance, see definitions tab)",q4:"4) Does 100 percent of the cobalt originate from recycled or scrap sources?",q5:"5) What percentage of relevant suppliers have provided a response to your supply chain survey?",q6:"6) Have you identified all of the smelters or processors supplying cobalt or mica to your supply chain?",q7:"7) Has all applicable smelter or processor information received by your company been reported in this declaration?"}},crt:{q1:"1) Is any of the cobalt intentionally added or used in the product(s) or in the production process?",q2:"2) Do any of the smelters in your supply chain source the cobalt from a Conflict-Affected and High-Risk area? (OECD Due Diligence Guidance, see definitions tab)",q3:"3) Does 100 percent of the cobalt originate from recycled or scrap sources?",q4:"4) What percentage of relevant suppliers have provided a response to your supply chain survey?",q5:"5) Have you identified all of the smelters supplying the cobalt to your supply chain?",q6:"6) Has all applicable smelter information received by your company been reported in this declaration?"},amrt:{q1:"1) Is any of the following minerals or metals intentionally added or used in the product(s) or in the production process?",q2:"2) What percentage of relevant suppliers have provided a response to your supply chain survey?"}},h1={cmrt:{a:"A. Have you established a responsible minerals sourcing policy?",b:"B. Is your responsible minerals sourcing policy publicly available on your website? (Note – If yes, the user shall specify the URL in the comment field.)",b_comment:"Please specify the URL",c:"C. Do you require your direct suppliers to source the 3TG from smelters whose due diligence practices have been validated by an independent third party audit program?",d:"D. Have you implemented due diligence measures for responsible sourcing?",e:"E. Does your company conduct Conflict Minerals survey(s) of your relevant supplier(s)?",e_comment:"Describe other format",f:"F. Do you review due diligence information received from your suppliers against your company’s expectations?",g:"G. Does your review process include corrective action management?",h:"H. Is your company required to file an annual conflict minerals disclosure?"},emrt:{a:"A. Have you established a responsible minerals sourcing policy?",b:"B. Is your responsible minerals sourcing policy publicly available on your website? (Note – If yes, the user shall specify the URL in the comment field.)",b_comment:"Please specify the URL",c:"C. Do you require your direct suppliers to source the specified minerals/metals from smelters whose due diligence practices have been validated by an independent third-party audit program?",d:"D. Have you implemented due diligence measures for responsible sourcing?",e:"E. Does your company conduct supply chain survey(s) of your relevant supplier(s) on the specified minerals/metals?",e_comment:"Describe other format",f:"F. Do you review due diligence information received from your suppliers against your company’s expectations?",g:"G. Does your review process include corrective action management?",v1:{c:"C. Do you require your direct suppliers to source cobalt from smelters whose due diligence practices have been validated by an independent third-party audit program, or mica from processors with equivalent qualifications?",e:"E. Does your company conduct cobalt and/or mica supply chain survey(s) of your relevant supplier(s)?"},v11:{a:"A. Have you established a publicly available cobalt sourcing policy?",b:"B. Does your policy cover, at a minimum, all risks in the OECD Due Diligence Guidance Annex II Model Policy, as well as the worst forms of child labor?",c:"C. Do you require your direct suppliers to source cobalt from smelters whose due diligence practices have been validated by an independent third-party audit program, or mica from processors with equivalent qualifications?",d:"D. Do you require suppliers' due diligence practices to cover, at a minimum, all risks in the OECD Due Diligence Guidance Annex II Model Policy, as well as the worst forms of child labor?",e:"E. Does your company conduct cobalt and/or mica supply chain survey(s) of your relevant supplier(s)?",f:"F. Do you review due diligence information received from your suppliers against your company’s expectations?",g:"G. Does your review process include corrective action management?"}},crt:{a:"A. Have you established a publicly available cobalt sourcing policy?",a_comment:"Please specify the URL",b:"B. Does your policy cover, at a minimum, all risks in the OECD Due Diligence Guidance Annex II Model Policy, as well as the worst forms of child labor?",c:"C. Have you implemented due diligence measures for cobalt in the declaration scope indicated above?",d:"D. Do you require suppliers to exercise due diligence over the cobalt supply chain in accordance with the OECD Due Diligence Guidance?",e:"E. Do you require your direct suppliers to source cobalt from smelters whose due diligence practices have been validated by an independent third party audit program?",f:"F. Do you require suppliers' due diligence practices to cover, at a minimum, all risks in the OECD Due Diligence Guidance Annex II Model Policy, as well as the worst forms of child labor?",g:"G. Does your company conduct cobalt supply chain survey(s) of your relevant supplier(s)?",g_comment:"Describe other format",h:"H. Do you review due diligence information received from your suppliers against your company’s expectations?",i:"I. Does your review process include corrective action management?"}},y1={cmrt:{respondentNumber:"Responder’s Product Number",respondentName:"Responder’s Product Name",manufacturerNumber:"Manufacturer’s Product Number",manufacturerName:"Manufacturer’s Product Name",comment:"Comments"},emrt:{respondentNumber:"Responder Product Number",respondentName:"Responder Product Name",comment:"Comments"},crt:{manufacturerNumber:"Manufacturer’s Product Number",manufacturerName:"Manufacturer’s Product Name",comment:"Comments"},amrt:{manufacturerNumber:"Manufacturer’s Product Number",manufacturerName:"Manufacturer’s Product Name",comment:"Comments"}},g1={companyName:"Company Name",reportingScope:"Scope of Reporting",scopeDescription:"Description of Scope",companyId:"Company Unique Identification",companyAuthId:"Company Unique Authority ID",address:"Address",contactName:"Contact Name",contactEmail:"Contact Email",contactPhone:"Contact Phone",authorizerName:"Authorizer Name",authorizerTitle:"Authorizer Title",authorizerEmail:"Authorizer Email",authorizerPhone:"Authorizer Phone",authorizationDate:"Date of Completion"},b1={productListRequired:"Current scope: Product List is required.",productListNotRequired:"Current scope: Product List is not required.",productListUnknown:"Select Declaration Scope to determine if Product List is required.",smelterListRequired:"Current answers require the Smelter List.",smelterListRequiredWithMetals:"Smelter List required for: {{metals}}.",smelterListPending:"Complete {{questions}} for: {{metals}} to determine Smelter List requirement.",smelterListNotRequired:"Current answers do not require the Smelter List.",smelterListUnknown:"Complete the mineral scope and Q1/Q2 to determine Smelter List requirement.",mineListAvailable:"Mine List is available for this version.",mineListNotAvailable:"Mine List is not available for this version."},w1={subtitle:"System automatically checks completeness and compliance.",progressTitle:"Overall completion",progressDetail:"{{done}}/{{total}} required completed",errorsTitle:"Errors (must fix)",errorBadge:"{{count}} items",groupCount:"{{count}} items",groupToggleShow:"Expand",groupToggleHide:"Collapse",passedTitle:"Passed",passedBadge:"{{count}} items",passedSummary:"Passed {{count}} required checks",passedToggleShow:"Show details",passedToggleHide:"Hide details",passedEmpty:"No passed items yet",passedProductList:"Product List provided",passedProductRow:"Product List row {{index}} has product number",passedSmelterForMineral:"{{mineral}} smelter record provided",sectionComplete:"{{section}} required items completed",validEmail:"Valid email: {{field}}",submit:"Submit",submitTitle:"Pre-submission check",submitCompletion:"Completion",submitErrors:"Errors",submitAllPass:"All passed",submitFixTop:"To fix (top 5)",submitContinue:"Continue",submitFix:"Fix now",andMoreErrors:"and {{count}} more errors…",globalErrorBar:"⚠️ {{count}} required items remain incomplete. Click to review.",globalSuccessBar:"✅ All required items are completed.",globalErrorAction:"Go to Checker",sessionSaved:"Saved in session",sessionSavedHint:"Your data is temporarily saved in the browser session. Please export the file before closing the page to save permanently.",groups:{declaration:"Declaration",companyInfo:"Company Information",mineralsScope:"Minerals Scope",questionMatrix:"Based on the reporting scope above, answer questions 1 to 8.",companyQuestions:"From a company-level, answer the following questions.",smelter:"Smelter List",mine:"Mine List",product:"Product List",other:"Other"},error:"Error",pass:"Pass",noErrors:"No errors found",totalErrors:"{{count}} error(s) found",goToField:"Go to field",requiredField:"{{field}} is required.",requiredCompanyQuestionComment:"Comment is required: {{field}}.",requiredProductList:"Product List is required for scope B.",requiredSmelterList:"Smelter List entry required for {{field}}.",invalidEmail:"Invalid email format: {{field}}."},v1={subtitle:"Template version overview based on registry metadata.",templateName:"Template name",currentVersion:"Current version",defaultVersion:"Default version",totalVersions:"Total versions",availableVersions:"Available versions",currentTag:"Current",defaultTag:"Default"},S1=JSON.parse(`{"cmrt":{"6.5":{"instructions":["RMI website: (www.responsiblemineralsinitiative.org)\\nTraining and guidance, template, Responsible Minerals Assurance Process conformant smelter list.","Introduction","This Conflict Minerals Reporting Template (Template) is a free, standardized reporting template created by the Responsible Minerals Initiative (RMI). The Template facilitates the transfer of information through the supply chain regarding mineral country of origin and smelters and refiners being utilized and supports compliance to legislation*. The template also facilitates the identification of new smelters and refiners to potentially undergo an audit via the Responsible Minerals Assurance Process**.\\n\\nThe CMRT was designed for downstream companies to disclose information about their supply chains up to but not including the smelter. If you are a 3TG smelter or refiner, in accordance with the RMAP protocols, we recommend you enter your own name in the smelter list tab.\\n\\nWhen filling out the form, none of the cell entries should start will \\"=\\" or \\"#.\\"","* In 2010, the U.S. Dodd-Frank Wall Street Reform and Consumer Protection Act was passed concerning “conflict minerals” originating from the Democratic Republic of the Congo (DRC) or adjoining countries. The SEC published final rules associated with the disclosure of the source of conflict minerals by U.S. publicly traded companies (see the rules at http://www.sec.gov/rules/final/2012/34-67716.pdf). The rules reference the OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-Affected and High-Risk Areas, (http://www.oecd.org/daf/inv/mne/GuidanceEdition2.pdf), which guides suppliers to establish policies, due diligence frameworks and management systems.\\nIn 2017, Regulation (EU) 2017/821 of the European Parliament and of the European Council of 17 May 2017 was passed concerning supply chain due diligence obligations for Union importers of tin, tantalum and tungsten, their ores, and gold originating from conflict-affected and high-risk areas (see regulation at https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=OJ:L:2017:130:FULL&from=EN)\\n** See information on the Responsible Minerals Initiative (www.responsiblemineralsinitiative.org).","Instructions for completing Company Information questions (rows 8 - 22).\\nProvide comments in ENGLISH only","Note: Entries with (*) are mandatory fields.","1. Insert your company's Legal Name. Please do not use abbreviations. In this field you have the option to add other commercial names, DBAs, etc.","2. Select your company's Declaration Scope. The options for scope are:\\n\\nA. Company-wide\\nB. Product (or List of Products)\\nC. User-Defined \\n\\nFor \\"Company-wide\\", the declaration encompasses the entirety of a company's products or product substances produced by the parent company. Therefore if the user is reporting 3TG data at the company level, they will be reporting conflict minerals data on all products they manufacture. \\n\\nFor Scope selection of Product (or List of Products), a link to the worksheet tab for Product List will be displayed. If this scope is chosen, it is mandatory to list the Responder's Product Number of the products covered under the Scope of this Declaration in Column B of the Product List worksheet. It is optional to list the Responder's Product Name in Column C of the Product List worksheet.\\n\\nFor Scope selection of \\"User Defined\\", it is mandatory that the user describes the scope to which the 3TG disclosure is applicable. The scope of this class shall be defined in a text field by the supplier and should be easily understood by customers or the receivers of the document. As an example, companies may provide a link to clarifying information.\\n\\nThis field is mandatory.","3. Insert your company’s unique identifier number or code (DUNS number, VAT number, customer-specific identifier, etc.)","4. Insert the source for the unique identifier number or code (\\"DUNS\\", \\"VAT\\", \\"Customer\\", etc).","5. Insert your full company address (street, city, state, country, postal code). This field is optional.","6. Insert the name of the person to contact regarding the contents of the declaration information. This field is mandatory.","7. Insert the email address of the contact person. If an email address is not available, state ‘‘not available’’ or ‘‘n/a.’’ A blank field may cause an error in form implementation. This field is mandatory.","8. Insert the telephone number for the contact. This field is mandatory.","9. Insert the name of the person who is responsible for the contents of the declaration information. The authorizer may be a different individual than the contact person. It is not correct to use the words ‘‘same’’ or similar identification to provide the name of the authorizer. This field is mandatory.","10. Insert the title for the Authorizing person. This field is optional.","11. Insert the email address of the Authorizing person. If an email address is not available, state ‘‘not available’’ or ‘‘n/a.’’ A blank field may cause an error in form implementation. This field is mandatory.","12. Insert the telephone number for the Authorizing person. This field is optional.","13. Please enter the Date of Completion for this form using the format DD-MMM-YYYY. This field is mandatory.","14. As an example, the user may save the file name as: companyname-date.xls (date as YYYY-MM-DD).","Instructions for completing the eight Due Diligence Questions (rows 24 - 71).\\nProvide answers in ENGLISH only","These eight questions define the usage, origination and sourcing identification for each of the metals. The questions are designed to collect information about the use of 3TG in the company’s product(s) to allow for the determination of regulatory applicability. Responses to these questions shall represent the ‘Declaration Scope’ selected in the company information section.The responses to the questions in this section can be used to determine applicability and completeness of 3TG reporting.","For each of the eight required questions, provide an answer for each metal using the pull down menu selections.The questions in this section must be completed for all 3TG. If the response for a given metal to questions 1 and 2 is positive, then the subsequent questions shall be completed for that metal and the following due diligence questions (A to H) shall be completed about the company’s overall due diligence program.","1. This is the first of two questions for which the response is used to determine whether the 3TG is within the scope of conflict minerals reporting requirements. This question relies upon the guidance provided by the SEC in the final rules regarding the determination if a 3TG is “necessary to the functionality or production” of a product. The SEC guidance is based upon the presumption that a company in the supply chain for a product would not intentionally add a 3TG to that product or any of a product’s sub-components if that 3TG was not necessary to the product’s generally expected function, use, or purpose. Similarly, the guidance presumes that a 3TG would not be necessary to the production of a product unless it was intentionally included in the production process of that product. The response to this question serves to exclude any trace-level contaminants or naturally-occurring by-products such as tin in steel. This question shall be answered for each 3TG.\\n\\nThis question asks if any conflict minerals are used as raw material, component or additive in a product that you manufacture or contract to manufacture (including raw material and components). Impurities from raw materials, components, additives, abrasives, and cutting tools are outside the scope of the survey.\\n\\nThis question shall be answered for each 3TG. Valid responses to this question are either \\"yes\\" or \\"no\\". This question is mandatory.","Some companies may require substantiation for a \\"No\\" answer that should be entered into the Comment Field.","2. This question shall be answered for each 3TG for each the answer to question 1 is \\"yes.\\" This is the second of two questions for which the response is used to determine whether the 3TG is within the scope of conflict minerals reporting requirements as described in the SECs final rules regarding the determination if a 3TG is necessary to the functionality or production of a product. This question is dependent upon the question and response to Question 1. This question is intended to identify 3TGs which are intentionally added or included in the manufacturing process of a product where some amount of the 3TG remains in the finished product. This includes 3TGs which may not have been intended to become part of the final product and may not be necessary to the functionality of the product but are only present as residuals of the manufacturing process. In many cases, the manufacturer may have attempted to remove or facilitate consumption of the 3TG during the manufacturing process, however, some amount of the 3TG remains. Should the 3TG, which is added or included during the manufacturing process, be completely removed such that none of the 3TG remains upon the completion of that process, the response to this question would be no.\\n\\nThis question shall be answered for each 3TG. Valid answers to this question are either \\"yes\\" or \\"no\\". This question is mandatory.","3. This is a declaration that any portion of the 3TGs contained in a product or multiple products originates from the DRC or an adjoining country (covered countries). The answer to this question should be \\"yes\\" if any smelter in the supply chain sources from the covered countries, even if those smelters are on the RMI conformant smelter and refiner list. For more information, see RMI's due diligence guidance on conflict minerals here: http://www.responsiblemineralsinitiative.org/training-and-resources/publications-and-guidance/.\\n\\nThe answer to this question shall be \\"yes\\", \\"no\\", or \\"unknown\\". It is recommended to substantiate a \\"Yes\\" answer in the comments section.\\n\\nThis question is mandatory for a specific metal if the response to Question 1 and 2 is “Yes” for that metal.","4. This is a declaration that any portion of the 3TGs contained in a product or multiple products originates from conflict-affected and high-risk areas (CAHRAs).\\n\\nThe answer to this question should be “yes” if any smelter in the supply chain sources from covered countries or CAHRAs, even if those smelters are on the RMI conformant smelter and refiner list. For more information, see RMI's due diligence guidance on conflict minerals here: http://www.responsiblemineralsinitiative.org/training-and-resources/publications-and-guidance/. \\n\\nThe answer to this question shall be yes, no or unknown. It is recommended to substantiate a “yes” answer in the comments section. This question is mandatory for a specific metal if the response to Question 1 and 2 is “yes” for that metal.","5. This is a declaration that identifies whether 3TGs contained in the product(s) necessary to the functionality of that product(s) originate from recycled or scrap sources. \\n\\nThe answer to this question shall be \\"yes\\", \\"no\\", or \\"unknown\\". This question is mandatory for a specific metal if the response to Question 1 and 2 is “Yes” for that metal. \\n\\nA \\"Yes\\" answer means that 100% of the 3TG comes from recycled or scrap sources. A \\"No\\" answer means that some of the 3TG does not come from recycled or scrap sources. An \\"Unknown\\" answer means that the user does not know whether or not 100% of the 3TG comes from recycled or scrap sources.","6. This is a question to determine whether a company has received conflict minerals disclosures from all direct suppliers reasonably believed to be providing 3TGs contained in the products covered by the scope of this declaration. Permissible responses to this question are:\\n\\n­ 100%\\n­ Greater than 90%\\n­ Greater than 75%\\n- Greater than 50%\\n- 50% or less\\n- None\\n\\nThis question is mandatory for a specific metal if the response to Question 1 and 2 is “Yes” for that metal.","7. This question verifies if the supplier has reason to believe they have identified all of the smelters providing 3TGs in the products covered by this declaration. The answer to this question shall be \\"Yes\\" or \\"No\\", along with a comment in certain cases, e.g. list of smelters. \\n\\nThis question is mandatory for a specific metal if the response to Question 1 and 2 is “Yes” for that metal.","8. This question verifies that all of the smelters identified to be providing any of the 3TGs contained in the products covered by the scope of this declaration have been reported in this declaration. The answer to this question shall be \\"yes\\" or \\"no\\" along with a comment in certain cases, e.g. list of smelters. This question is mandatory for a specific metal if the response to Question 1 and 2 is “Yes” for that metal.","Provide comments in the Comment sections as required to clarify your responses.","Instructions for completing Questions A. – H. (rows 75 - 89). Questions A. through H. are mandatory if the both of responses to Question 1 and 2 are “Yes” for any metal.\\nProvide answers in ENGLISH only","The OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-affected and High-risk Areas (OECD Guidance) defines “Due Diligence” as “an on-going, proactive and reactive process through which companies can ensure that they respect human rights and do not contribute to conflict”. Due diligence should be an integral part of your company’s overall conflict free sourcing strategy. Questions A. thru H. are designed to assess your company’s conflict-free minerals sourcing due diligence activities. Responses to these questions shall represent the full scope of your company’s activities and shall not be limited to the ‘Declaration Scope’ selected in the company information section.","A. This is a declaration to disclose whether a company has a responsible minerals sourcing policy. The answer to this question shall be \\"yes\\" or \\"no.\\" Comments shall be captured in a question comment field. \\n\\nThis question is mandatory.","B. This is a declaration to disclose whether a company’s responsible minerals sourcing policy is available on the company website. The answer to this question shall be \\"yes\\" or \\"no.\\" If \\"Yes\\" the user shall specify the URL in a question comment field. \\n\\nThis question is mandatory.","C. This is a declaration to determine whether a company requires their direct suppliers to source 3TG from validated smelters. The answer to this question shall be \\"yes\\" or \\"no.\\" Comments should be captured in a question comment field.\\n\\nThis question is mandatory.","D. Please answer \\"yes\\" or \\"no\\" to disclose whether your company has implemented responsible sourcing due diligence measures. This declaration is not intended to provide the details of a company’s due diligence measures - just that a company has implemented due diligence measures. The aspects of acceptable due diligence measures shall be determined by the requestor and supplier.\\n\\nExamples of due diligence measures may include: communicating and incorporating into contracts (where possible) your expectations to suppliers on responsible mineral supply chain; identifying and assessing risks in the supply chain; designing and implementing a strategy to respond to identified risks; verifying your direct supplier’s compliance to its responsible minerals sourcing policy, etc. These due diligence measure examples are consistent with the guidelines included in the internationally recognized OECD Guidance.\\n\\nThis question is mandatory.","E. This is a question to disclose whether a company requests their supplier to fill out a conflict minerals declaration. Acceptable answers are listed below, in certain cases further explanation may be required, i.e., to provide the format used for collecting information. If the answer is \\"Yes,\\" using other format the user shall provide a comment in a question comment field. Permissible responses to this question are:\\n\\n- Yes, in conformance with IPC-1755 [e.g., CMRT]\\n- Yes, using other format (describe)\\n- No\\n\\nThis question is mandatory.","F. Please answer “Yes” or “No”. In the comments section, you can provide additional information on your approach. Examples could be:\\n\\n “3rd party audit” - on-site audits of your suppliers conducted by independent third parties. \\n “Documentation review only” - a reviewof supplier submitted records and documentation conducted by independent third parties and, or your company personnel. \\n “Internal audit” - on-site audits of your suppliers conducted by your company personnel.\\n\\nThis question is mandatory.","G. This is a question to disclose whether a company’s review process includes corrective action management. The answer to this question shall be \\"yes\\" or \\"no.\\" Comments shall be captured in a question comment field. \\n\\nThis question is mandatory.","H. This is a question to disclose whether a company is subject to the SEC rule, the EU regulation, or both. The answer to this question shall be \\"yes, with the SEC\\", \\"yes, with the EU\\", \\"yes with the SEC and the EU\\" or \\"no.\\" Comments shall be captured in a question comment field. This question is mandatory. For more information on the SEC rule, please refer to www.sec.gov. For more information on the EU regulation, please refer to https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX:32017R0821&from=EN.","Instructions for completing the Smelter List Tab.\\nProvide answers in ENGLISH only","Note: Columns with (*) are mandatory fields","This template allows for smelter identification using the Smelter Look-up. Columns B, and C must be completed in order from left to right to utilize the Smelter Look-up feature.\\nUse a separate line for each metal/smelter/country combination.","1. Smelter Identification Input Column - If you know the Smelter Identification Number, input the number in Column A (columns B, C, E, F, G, I, and J will auto-populate). Column A does not autopopulate.","2. Metal (*) - Use the pull down menu to select the metal for which you are entering smelter information. This field is mandatory.","3. Smelter Look-up (*) - Select from dropdown. This is the list of known smelters as of template release date. If smelter is not listed select 'Smelter Not Listed'. This will allow you to enter the name of the smelter in Column D. If you do not know the name or location of the smelter, select 'Smelter Not Yet Identified.' For this option, columns D and E will autopopulate to say, 'unknown.' This field is mandatory.","4. Smelter Name (1)- Fill in smelter name if you selected \\"Smelter Not Listed\\" in column C. This field will auto-populate when a smelter name in selected in Column C. This field is mandatory.","5. Smelter Country (*) – This field will auto-populate when a smelter name is selected in column C. If you selected \\"Smelter Not Listed\\" in column C, use the pull down menu to select the country location of the smelter. This field is mandatory.","6. Smelter Identification - This is a unique identifier assigned to a smelter or refiner according to an established smelter and refinery identification system. It is expected that multiple names or aliases could be used to describe a single smelter or refiner and therefore multiple names or aliases could be associated to a single ‘Smelter ID’.","7. Source of Smelter Identification Number - This is the source of the Smelter Identification Number entered in Column F. If a smelter name was selected in Column C using the dropdown box, this field will auto-populate.","8. Smelter Street - Provide the street name on which the smelter is located. This field is optional.","9. Smelter City – Provide the city name of where the smelter is located. This field is optional.","10. Smelter Location: State/Province, if applicable – Provide the state or province where the smelter is located. This field is optional.","11. Smelter Contact Name – The Conflict Minerals Reporting Template (CMRT) is circulated among companies in the requesting company's supply chain to ensure compliance with the OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-Affected and High-Risk Areas and the U.S. Securities and Exchange Commission Final Rule on conflict minerals.\\n\\nIf the template is circulated in a country where laws protecting personal information exist, sharing personal contact information in the CMRT may violate related regulations. Therefore, it is recommended that the requesting company take precautions such as obtaining the contact person's permission to share the information with other companies in the supply chain when completing \\"Smelter Contact Name\\" and the \\"Smelter Contact Email\\" columns.\\n\\nIf you have permission to share this information, please fill in the name of the Smelter Facility Contact person who you worked with.","12. Smelter Contact Email – Fill in the email address of the Smelter Facility contact person who was identified as the Smelter Contact Name. Example: John.Smith@SmelterXXX.com. Please review the instructions for Smelter Contact Name before completing this field.","13. Name of Mine(s) - This field allows a company to define the actual mines being used by the smelter. Please enter the actual mine names if known. If 100% of the smelter’s feedstock originates from recycled or scrap sources, enter \\"Recycled\\" or \\"Scrap\\" in place of the name of the mine and answer \\"Yes\\" in Column P.\\n\\n\\"RCOI confirmed as per RMI\\" may be an acceptable answer to this question.","14. Location (Country) of Mine(s) - This is a free form text field that allows a company to define the location of the mines being used by the smelter. Please enter the country of the mine(s). If the country of origin is not known, enter \\"Unknown\\". If 100% of the smelter’s feedstock originates from recycled or scrap sources, enter \\"Recycled\\" or \\"Scrap\\" in place of the country of origin. This field is optional.\\n\\n\\"RCOI confirmed as per RMI\\" may be an acceptable answer to this question.","15. Indicates whether the smelter solely obtains inputs for its smelting process(es) from recycled or scrap sources. This question is optional. Permissible responses to this question are:\\n\\n- Yes\\n- No\\n- Unknown","16. Comments – free form text field to enter any comments concerning the smelter. Example: smelter is being acquired by Company YYY","The Checker worksheet is used to verify if all the required information in the Template has been completed. It is updated real-time and can be reviewed at any time while using the Template. It is used to verify completion.\\n\\nTo use this sheet, verify if all required fields have been completed (completed fields will be highlighted in green). If not, look for the red field(s) and review the \\"Notes\\" in Column C for required actions. You may use the URL in Column D to directly access the field for completion.","TERMS AND CONDITIONS","The Responsible Minerals Assurance Process (“Process”) Conformant Smelter List (the \\"List\\") and Process templates and tools, including, without limitation, the Conflict Minerals Reporting Template (collectively “Tools”), including, without limitation, all information provided therein, are provided for informational purposes only and are current as of the date set forth therein. Any inaccuracy or omission in the List or any Tool is not the responsibility of the Responsible Business Alliance, a Delaware non-stock corporation (\\"RBA\\"). Determination of whether and/or how to use all or any portion of the List or any Tool is to be made in the User’s sole and absolute discretion. Prior to using the List or any Tool, you should review it with your own legal counsel. No part of the List or any Tool constitutes legal advice. Use of the List or any Tool is voluntary.","RBA makes no representations or warranties with respect to the List or any Tool. The List and Tools are provided on an \\"AS IS\\" and on an \\"AS AVAILABLE\\" basis. RBA hereby disclaims all warranties of any nature, express, implied or otherwise, or arising from trade or custom, including, without limitation, any implied warranties of merchantability, non-infringement, quality, title, fitness for a particular purpose, completeness or accuracy.","To the fullest extent permitted by applicable laws, RBA renounces any liability for any losses, expenses or damages of any nature, including, without limitation, special, incidental, punitive, direct, indirect or consequential damages or lost income or profits, resulting from or arising out of the User’s use of the List or any Tool, whether arising in tort, contract, statute, or otherwise, even if shown that they were advised of the possibility of such damages.","In consideration for access and use of the List and/or any Tool, THE USER hereby agrees to and does (a) release and forever discharge RBA, as well as their respective officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, from any and all claims, actions, losses, suits, damages, judgments, levies, and executions, which the User has ever had, has, or ever can, shall, or may have or claim to have against RBA, as well as their respective officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, resulting from or arising out of the List or any Tool or use thereof, and agrees to (b) indemnify, defend and hold harmless RBA, as well as their respective officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, from any and all claims, actions, losses, suits, damages, judgments, levies, and executions resulting from or arising out of the USER'S use of the List or any Tool.","If any part of any provision of these Terms and Conditions shall be invalid or unenforceable under applicable law, said part shall be deemed ineffective to the extent of such invalidity or unenforceability only, without in any way affecting the remaining parts of said provision or the remaining provisions of these Terms and Conditions.","By accessing and using the List or any Tool, and in consideration thereof, the User agrees to the foregoing."],"smelterList":[],"productList":[],"definitions":[{"term":"3TG","definition":"Tantalum, tin, tungsten, gold"},{"term":"Authorizer","definition":"This field identifies the person responsible for the content of the declaration. The authorizer may be a different individual from the contact person. It is not correct to use the words ‘‘same’’ or similar identification to provide the name of the authorizer."},{"term":"Conflict-Affected and High-Risk Area (CAHRA)","definition":"Conflict-affected and high-risk areas are areas in a state of armed conflict, fragile post-conflict areas, as well as areas witnessing weak or non-existing governance and security, such as failed states, and widespread and systematic violations of international law, including human rights abuses."},{"term":"Conflict Mineral","definition":"As defined in 2010 United States legislation, Dodd-Frank Wall Street Reform and Consumer Protection Act, Section 1502(e)(4):\\nCONFLICT MINERAL.—The term ‘‘conflict mineral’’ means—\\n(A) columbite-tantalite (coltan), cassiterite, gold, wolframite, or their derivatives; or\\n(B) any other mineral or its derivatives determined by the Secretary of State to be financing conflict in the Democratic Republic of the Congo or an adjoining country. (available at http://www.sec.gov/about/laws/wallstreetreform-cpa.pdf)"},{"term":"Covered Country(ies)","definition":"Covered Country(ies) as defined by the United States Dodd-Frank Wall Street Reform and Consumer Protection Act of 2010. These countries include the Democratic Republic of the Congo and the nine countries with which it shares an internationally recognized border: Angola, Burundi, Central African Republic, Republic of the Congo, Rwanda, South Sudan, Tanzania, Uganda, Zambia."},{"term":"Declaration Scope or Class","definition":"For the purposes of this template, “scope” describes the applicability of the information provided by the reporting company. The scope may encompass the entirety of a company’s services and/or products, or at a company’s discretion, the template may be used to report on a specific product (or products), or, be ‘User defined’. The ‘User defined’ scope selection or class may be used to describe any subset of a company’s operation or product portfolio."},{"term":"Dodd-Frank","definition":"2010 United States legislation, Dodd-Frank Wall Street Reform and Consumer Protection Act, Section 1502 (“Dodd-Frank”) (http://www.sec.gov/about/laws/wallstreetreform-cpa.pdf)"},{"term":"DRC","definition":"Democratic Republic of Congo"},{"term":"DRC conflict-free","definition":"Products that do not contain minerals that directly or indirectly finance or benefit armed groups in the Democratic Republic of the Congo or an adjoining country. Source: 2010 United States legislation, Dodd-Frank Wall Street Reform and Consumer Protection Act, Section 1502 (http://www.sec.gov/about/laws/wallstreetreform-cpa.pdf)"},{"term":"Gold (Au) refiner (smelter)","definition":"A gold refiner is a metallurgical operation that produces fine gold with a concentration of 99.5% or higher from gold and gold-bearing materials with lower concentrations. Refer to the RMAP assessment standard for this metal for a complete description at: https://www.responsiblemineralsinitiative.org/minerals-due-diligence/standards/."},{"term":"Independent Third-Party Assessment Firm","definition":"With respect to smelter assessments, an “Independent Third-Party Assessment Firm” is a private sector organization competent in evaluating the smelter or refiner’s materials traceability against the standards of the RMAP or equivalent assessment standards. To maintain neutrality and impartiality, such organization and its team members must have no conflicts of interest with the assessment participant."},{"term":"Intentionally added","definition":"Intentionally added refers to a substance used in one or more product life cycle stage(s) intended to give a particular property, reaction or quality.\\n\\nWhile the SEC does not define the phrase “intentionally added” in the final rule*, the rule’s preamble states:\\n“[W]e agree that being intentionally added, rather than being a naturally-occurring by-product, is a significant factor in determining whether a conflict mineral is ‘‘necessary to the functionality or production’’ of a product. This is true regardless of who intentionally added the conflict mineral to the product so long as it is contained in the product. [D]etermining whether a conflict mineral is considered ‘‘necessary’’ to a product should not depend on whether the conflict mineral is added directly to the product by the issuer or whether it is added to a component of the product that the issuer receives from a third party. Instead, the issuer should ‘report on the totality of the product and work with suppliers to comply with the requirements.’ Therefore, in determining whether a conflict mineral is ‘‘necessary’’ to a product, an issuer must consider any conflict mineral contained in its product, even if that conflict mineral is only in the product because it was included as part of a component of the product that was manufactured originally by a third party.”\\n*(56296 Federal Register / Vol. 77, No. 177 / Wednesday, September 12, 2012 / Rules and Regulations)"},{"term":"IPC","definition":"IPC (www.IPC.org) is a global industry association based in Bannockburn, Ill., dedicated to the competitive excellence and financial success of its 3,400 member companies which represent all facets of the electronics industry, including design, printed board manufacturing, electronics assembly and test. As a member-driven organization and leading source for industry standards, training, market research and public policy advocacy, IPC supports programs to meet the needs of an estimated $2.0 trillion global electronics industry. IPC maintains additional offices in Taos, N.M.; Washington, D.C.; Stockholm, Sweden; Moscow, Russia; Bangalore, India; Bangkok, Thailand; and Shanghai, Shenzhen, Chengdu, Suzhou and Beijing, China."},{"term":"IPC-1755 Responsible Sourcing of Minerals Data Exchange Standard","definition":"This IPC standard establishes the requirements for exchanging conflict minerals data between suppliers and their customers. To meet the needs of a broad range of users, this standard provides flexibility in the scope of the products covered within a single declaration. This standard is not a compliance guide."},{"term":"Necessary for the Functionality of a Product","definition":"The SEC does not provide a formal definition of this phrase in the final rule*, however it provides some guidance: A conflict mineral will be considered to be necessary to its functionality of a product if it meets the following: 1) is intentionally added to the product or any component of the product and is not a naturally-occurring byproduct; 2) is necessary to the product’s generally expected function, use or purpose; and 3) is incorporated for the purpose of ornamentation, decoration, or embellishment, whether the primary purpose of the product is ornamentation or decoration.\\n\\nNOTE: The conflict mineral must be contained in the product to be applicable.\\n\\n*(56296 Federal Register / Vol. 77, No. 177 / Wednesday, September 12, 2012 / Rules and Regulations)"},{"term":"Necessary for the Production of a Product","definition":"The SEC does not provide a formal definition of this phrase in the final rule*; however, it provides some guidance: A conflict mineral will be considered to be necessary to the production of a product when: 1) it is intentionally included in the product’s production process, other than if it is included in a tool, machine, or equipment used to produce the product (such as computers or power lines); 2) it is included in the product (MUST be contained in the product to be applicable); and 3) it is necessary to the product.\\n\\n*(56296 Federal Register / Vol. 77, No. 177 / Wednesday, September 12, 2012 / Rules and Regulations)"},{"term":"OECD","definition":"Organisation for Economic Co-operation and Development"},{"term":"Product","definition":"A company’s Product or Finished good is a material or item which has completed the final stage of manufacturing and/or processing and is available for distribution or sale to customers."},{"term":"RBA","definition":"Responsible Business Alliance (www.responsiblebusiness.org)"},{"term":"Recycled or Scrap Sources","definition":"Recycled or scrap sources are recycled metals, that are reclaimed end-user or post-consumer products, or scrap processed metals created during product manufacturing. Recycled metal includes excess, obsolete, defective, and scrap metal materials that contain refined or processed metals that are appropriate to recycle in the production of tin, tantalum, tungsten and/or gold. Minerals partially processed, unprocessed or byproducts from other ores are not included in the definition of recycled metal."},{"term":"Responsible Minerals Assurance Process (RMAP)","definition":"The Responsible Minerals Assurance Process (RMAP) is a process developed by the RBA to enhance company capability to verify the responsible sourcing of metals. Further details of the RMAP can be found here: http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/."},{"term":"Responsible Minerals Initiative","definition":"Founded in 2008 by members of the Responsible Business Alliance, the Responsible Minerals Initiative has grown into one of the most utilized and respected resources for companies addressing conflict minerals issues in their supply chains. Over 360 companies from ten different industries participate in the RMI today, contributing to a range of tools and resources including the Responsible Minerals Assurance Process, the Conflict Minerals Reporting Template, Reasonable Country of Origin Inquiry data and a range of guidance documents on conflict minerals sourcing. The RMI also runs regular workshops on conflict minerals issues and contributes to policy development and debates with leading civil society organizations and governments. Additional information is available at http://www.responsiblemineralsinitiative.org."},{"term":"RMAP Conformant Smelter List","definition":"The Responsible Minerals Assurance Process (RMAP) Conformant Smelter List is a published list of smelters and refiners that have undergone assessment through the RMAP, a program of the Responsible Minerals Initiative (RMI) or industry equivalent program (such as Responsible Jewellery Council or London Bullion Market Association) and have been validated to be in conformance with the standards. If a smelter or refiner is not on the list, it has either not completed a RMAP assessment or is not in conformance with the RMAP standard. \\n\\nA list of smelters and refiners which have been validated to be conformant to the RMAP can be found at https://www.responsiblemineralsinitiative.org/facilities-lists/active-conformant-facilities-list/."},{"term":"SEC","definition":"U.S. Securities and Exchange Commission (www.sec.gov)"},{"term":"Smelter","definition":"A smelter or refiner is a company that procures and processes mineral ore, slag and/or materials from recycled or scrap sources into refined metal or metal containing intermediate products. The output can be pure (99.5% or greater) metals, powders, ingots, bars, grains, oxides or salts. The terms “smelter” and “refiner” are used interchangeably throughout various publications."},{"term":"Smelter Identification Number","definition":"A unique identification number the RMI assigns to companies that have been reported by members of the supply chain as smelters or refiners, whether or not they have been verified to meet the characteristics of smelters or refiners as defined in the RMAP assessment standards."},{"term":"Tantalum (Ta) smelter","definition":"A tantalum smelter (also known as a processor) is defined as a company that converts Ta-containing ores, concentrates, slags or secondary materials into tantalum intermediate products or other tantalum containing products for direct sales or further processing into Ta-containing products, such as Ta powders, Ta components, Ta oxides, alloys, wires, sintered bars, etc. Refer to the RMAP assessment standard for this metal for a complete description at: https://www.responsiblemineralsinitiative.org/minerals-due-diligence/standards/."},{"term":"Tin (Sn) smelter","definition":"Primary [tin] smelters are companies with one or more facilities treating tin containing ore concentrates in order to produce tin metal. Secondary [tin] smelters are companies with one or more facilities that treat secondary materials by reduction for the production of crude or higher grade tin or tin product such as solder. A smelter as referred to within this audit protocol may operate as either one or both types of business operation. Refer to the RMAP assessment standard for this metal for a complete description at: https://www.responsiblemineralsinitiative.org/minerals-due-diligence/standards/."},{"term":"Tungsten (W) smelter","definition":"A company with one or more facilities that converts W-containing ores (such as wolframite and scheelite), W concentrates, or W-bearing scrap (secondary material) into tungsten containing intermediates such as Ammonium Para-Tungstate (APT), Ammonium Meta-Tungstate (AMT), ferrotungsten, and tungsten oxides for direct sales or further processed into W-containing products (such as W powder or W-carbide powder). Refer to the RMAP assessment standard for this metal for a complete description at: https://www.responsiblemineralsinitiative.org/minerals-due-diligence/standards/."}],"smelterLookup":["The following list represents the RMI's latest smelter name/alias information as of this templates release.  This list is updated frequently, and the most up-to-date version can be found on the RMI website http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/exports/cmrt-export/.  The presence of a smelter here is NOT a guarantee that it is currently Active or Conformant within the Responsible Minerals Assurance Process.\\n\\nPlease refer to the RMI web site www.responsiblemineralsinitiative.org for the most current and accurate list of standard smelter names that are Active or Conformant. \\n\\nNames included in column B represent company names that are commonly recognized and reported by the supply chain for a particular smelter. These names may include former company names, alternate names, abbreviations, or other variations. Although the names may not be the RMI Standard Smelter Name, the reference names are helpful to identify the smelter, which is listed under column C in the Smelter Look-up.\\n\\nColumn C is the list of the official standard smelter names, in the ASCII character set. The majority of smelters will have the same entry for both columns, however if the common name varies from the standard name, the variation is noted in Column B."]}},"emrt":{"2.1":{"instructions":["RMI:www.responsiblemineralsinitiative.org/","Introduction","This Extended Mineral Reporting Template (EMRT) is a free, standardized reporting template created by the Responsible Minerals Initiative® (RMI®). The Template facilitates the transfer of information through the supply chain regarding mineral country of origin and smelters, refiners and processors being utilized and supports the exercise of due diligence in accordance with the OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-Affected and High-Risk Areas. The template also facilitates the identification of new smelters and refiners to potentially undergo an audit via the Responsible Minerals Assurance Process.\\n\\nThe EMRT was designed for downstream companies to disclose information about their supply chains up to but not including the smelter. If you are a smelter or refiner, we recommend you enter your own name in the smelter list tab.\\n\\nWhen filling out the form, none of the cell entries should start with \\"=\\" or \\"#.\\"","Instructions for completing Company Information questions (rows 7 - 26).\\nProvide comments in ENGLISH only","Note: Entries with (*) are mandatory fields.","1. Insert your company's Legal Name. Please do not use abbreviations. In this field you have the option to add other commercial names, DBAs, etc. This field is mandatory.","2. Select your company's Declaration Scope. The options for scope are:\\n\\nA. Company-wide\\nB. Product (or List of Products)\\nC. User-Defined \\n\\nFor \\"Company-wide\\", the declaration encompasses the entirety of a company's products or product substances produced by the parent company. Therefore if the user is reporting specified mineral data at the company level, they will be reporting data on all products they manufacture. \\n\\nFor Scope selection of Product (or List of Products), a link to the worksheet tab for Product List will be displayed. If this scope is chosen, it is mandatory to list the Responder's Product Number of the products covered under the Scope of this Declaration in Column B of the Product List worksheet. It is optional to list the Responder's Product Name in Column C of the Product List worksheet.\\n\\nFor Scope selection of \\"User Defined\\", it is mandatory that the user describes the scope to which the specified minerals disclosure is applicable. The scope of this class shall be defined in a text field by the supplier and should be easily understood by customers or the receivers of the document. As an example, companies may provide a link to clarifying information.\\n\\nThis field is mandatory.","3. The requesting company is required to select all minerals that are in scope of the declaration. These fields are pre-populated with the six EMRT minerals. To remove a mineral from the declaration, the user selects \\"Delete [Mineral]\\". Minerals are automatically populated in alphabetical order for Questions 1-7 and C.\\n\\nThis field is mandatory.","4. Insert your company’s unique identifier number or code (DUNS number, VAT number, customer-specific identifier, etc.)","5. Insert the source for the unique identifier number or code (\\"DUNS\\", \\"VAT\\", \\"Customer\\", etc).","6. Insert your full company address (street, city, state, country, postal code). This field is optional.","7. Insert the name of the person to contact regarding the contents of the declaration information. This field is mandatory.","8. Insert the email address of the contact person. If an email address is not available, state \\"not available\\" or \\"n/a\\". A blank field may cause an error in form implementation. This field is mandatory.","9. Insert the telephone number for the contact. This field is mandatory.","10. Insert the name of the person who is responsible for the contents of the declaration information. The authorizer may be a different individual than the contact person. It is not correct to use the words ‘‘same’’ or similar identification to provide the name of the authorizer. This field is mandatory.","11. Insert the title for the Authorizing person. This field is optional.","12. Insert the email address of the Authorizing person. If an email address is not available, state ‘‘not available’’ or ‘‘n/a.’’ A blank field may cause an error in form implementation. This field is mandatory.","13. Insert the telephone number for the Authorizing person. This field is optional.","14. Please enter the Date of Completion for this form using the format DD-MMM-YYYY. This field is mandatory.","15. As an example, the user may save the file name as: companyname-date.xlsx (date as YYYY-MM-DD).","Instructions for completing the seven Declaration of Scope Questions (rows 28 - 107).\\nProvide answers in ENGLISH only","These seven questions define the usage, origination and sourcing identification for each of the specified minerals. The questions are designed to collect information about the use of the specified mineral in the company’s product(s) and the completeness of reporting. Responses to these questions shall represent the ‘Declaration Scope’ selected in the company information section.","Provide comments in the Comment sections as required to clarify your responses.","Provide an answer using the pull down menu selections. If the response for the specified mineral to question 1 and 2 is positive, then all questions shall be completed for that mineral and the following due diligence questions (A to G) shall be completed about the company’s overall due diligence program.","1. This question is used to determine whether the specified mineral is within the scope of the reporting requirement. The response to this question serves to exclude any trace-level contaminants or naturally-occurring by-products.\\n\\nThis question asks if any of the specified mineral is used as raw material, component or additive in a product that you manufacture, including compounds. Impurities from raw materials, components, additives, abrasives, and cutting tools are outside the scope of the survey.\\n\\nThe answer to this question shall be either \\"yes\\" \\"no\\" \\"unknown\\" or \\"not declaring\\". This question is mandatory.","Some companies may require substantiation for a \\"No\\" answer that should be entered into the Comment Field.","2. This question shall be answered for the specified minerals for which the answer to question 1 is \\"yes.\\" This is the second of two questions for which the response is used to determine whether the specified mineral is within the scope of this reporting template. This question is dependent upon the question and response to Question 1. This question is intended to identify the specified mineral which is intentionally added or included in the manufacturing process of a product where some amount of the specified mineral remains in the finished product. This includes any specified mineral which may not have been intended to become part of the final product and may not be necessary to the functionality of the product but are only present as residuals of the manufacturing process. In many cases, the manufacturer may have attempted to remove or facilitate consumption of the specified mineral during the manufacturing process, however, some amount of the specified mineral remains. Should the specified mineral, which is added or included during the manufacturing process, be completely removed such that none of the specified mineral remains upon the completion of that process, the response to this question would be no.\\n\\nThis question shall be answered for the specified minerals. Valid answers to this question are either \\"yes\\", \\"no\\", or \\"unknown\\". This question is mandatory.","3. This is a declaration that any portion of the specified mineral contained in a product or multiple products originates from a conflict-affected and high-risk area (CAHRA). The answer to this question should be \\"yes\\" if any smelter in the supply chain sources from CAHRAs, regardless of whether such a smelter has been independently audited or not.\\n\\nThe answers to this question for the specified mineral shall be \\"yes,\\" \\"no,\\" or \\"unknown,\\". Substantiate a \\"Yes\\" answer in the comments section. An answer of \\"unknown\\" is an acceptable response. This question is mandatory for the specified mineral if the response to Question 1 and 2 is \\"Yes.\\"","4. This is a declaration that identifies whether the specified mineral contained in the product(s) originate exclusively from recycled or scrap sources. \\n\\nThe answer to this question shall be \\"yes\\", \\"no\\", or \\"unknown\\".\\n\\nA \\"Yes\\" answer means that 100% of the specified mineral comes from recycled or scrap sources. A \\"No\\" answer means that some of the raw material does not come from recycled or scrap sources. An \\"Unknown\\" answer means that the user does not know whether or not 100% of the raw material comes from recycled or scrap sources. This question is mandatory for the specified mineral if the response to Question 1 and 2 is \\"Yes.\\"","5. This is a question to determine whether a company has received disclosures from all direct suppliers reasonably believed to be providing the specified mineral contained in the products covered by the scope of this declaration. Permissible responses to this question are:\\n\\n­ 100%\\n­ Greater than 90%\\n­ Greater than 75%\\n- Greater than 50%\\n- 50% or less\\n- None\\n- Did not survey\\n\\nThis question is mandatory for the specified mineral if the response to Question 1 and 2 is \\"Yes.\\"","6. This question verifies if the supplier has reason to believe they have identified all of the smelters providing the specified mineral in the products covered by this declaration. The answer to this question shall be \\"Yes\\" \\"No\\" or \\"unknown\\", along with a comment in certain cases, e.g. list of smelters. This question is mandatory for the specified mineral if the response to Question 1 and 2 is \\"Yes.\\"","7. This question verifies that all of the smelters or processors identified to be providing any of the raw materials contained in the products covered by the scope of this declaration have been reported in this declaration. The answer to this question shall be \\"yes,\\" \\"no,\\" or \\"unknown\\" along with a comment in certain cases e.g. list of smelters. This question is mandatory for the specified mineral if the response to Question 1 and 2 is \\"Yes.\\"","Instructions for completing Questions A. – G. (rows 113 - 137). Questions A through G are mandatory if the response to Question 1 and Question 2 is \\"Yes\\" for the specified mineral.\\nProvide answers in ENGLISH only.","The OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-affected and High-risk Areas (OECD Guidance) defines “Due Diligence” as “an on-going, proactive and reactive process through which companies can ensure that they respect human rights and do not contribute to conflict”. More information is available at http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/.\\n\\nQuestions A. through G are designed to assess your company’s responsible minerals sourcing due diligence activities. Responses to these questions shall represent the full scope of your company’s activities and shall not be limited to the ‘Declaration Scope’ selected in the company information section.","A. This is a declaration to disclose whether a company has a responsible minerals sourcing policy. The answer to this question shall be \\"yes\\" or \\"no\\". This field is mandatory.","B. This is a declaration to disclose whether a company's responsible minerals sourcing policy is available on the company website. The answer to this question shall be \\"yes\\" or \\"no.\\" If \\"yes,\\" add the URL in the comments field. This field is mandatory.","C. This is a declaration to determine whether a company requires their direct suppliers to source the specified minerals from independently validated smelters and processors. The answer to this question shall be \\"yes,\\" \\"yes, when more processors are validated,\\" or \\"no.\\" Comments should be captured in a question comment field. This field is mandatory.","D. This is a question to disclose whether a company has implemented responsible minerals sourcing due diligence measures. This question is not intended to provide details of a company's due diligence measures. The aspects of acceptable due diligence measures shall be determined by the requestor and supplier.\\n\\nThe answer to this question shall be \\"yes\\" or \\"no.\\" If \\"yes,\\" the user shall describe the due diligence measures implemented in the question comment field (e.g. OECD Due Diligence Framework).","E. This is a question to disclose whether a company requests their supplier to fill out an extended mineral reporting template. Acceptable answers are listed below, in certain cases further explanation may be required, i.e., to provide the format used for collecting information. If the answer is \\"Yes, using other format\\" the user shall provide a comment in a question comment field. Permissible responses to this question are:\\n\\n- Yes, in conformance with IPC-1755 (e.g. EMRT)\\n- Yes, using other format (describe)\\n- No\\n\\nThis field is mandatory.","F. Please answer “Yes” or “No”. In the comments section, you can provide additional information on your approach. Examples could be:\\n\\n “3rd party audit” - on-site audits of your suppliers conducted by independent third parties. \\n “Documentation review only” - a review of supplier submitted records and documentation conducted by independent third parties and, or your company personnel. \\n “Internal audit” - on-site audits of your suppliers conducted by your company personnel.\\n\\nThis field is mandatory.","G. This is a question to disclose whether a company’s review process includes corrective action management. The answer to this question shall be \\"yes\\" or \\"no.\\" Comments shall be captured in a question comment field. This field is mandatory.","Instructions for completing the Smelter List Tab.\\nProvide answers in ENGLISH only\\n\\nNote: Columns with (*) are mandatory fields","This template allows for the identification of smelters, refiners, or processors using the Smelter Look-up. Columns B, and C must be completed in order from left to right to utilize the Smelter Look-up feature.\\nUse a separate line for each metal/smelter/country combination.","1. Smelter Identification Input Column - If you know the Smelter Identification Number, input the number in Column A (columns B, C, D, E, F, G, I, and J will auto-populate). Column A does not autopopulate","2. Metal (*) - Use the pull down menu to select the metal for which you are entering smelter information. Metals appear only if Declaration Questions 1 and 2 are answered \\"Yes\\" for those metals. This field is mandatory.","3. Smelter Look-up (*) - Select from dropdown. This is the list of known smelters as of template release date. If smelter is not listed select 'Smelter Not Listed'. This will allow you to enter the name of the smelter in Column D. If you do not know the name or location of the smelter, select 'Smelter Not Yet Identified.' For this option, columns D and E will autopopulate to say, 'unknown.' This field is mandatory.","4. Smelter Name (1) - Fill in smelter name if you selected \\"Smelter Not Listed\\" in column C. This field will auto-populate when a smelter name in selected in Column C. This field is mandatory.","5. Smelter Country (*) – This field will auto-populate when a smelter name is selected in column C. If you selected \\"Smelter Not Listed\\" in column C, use the pull down menu to select the country location of the smelter. This field is mandatory.","6. Smelter Identification - This is a unique identifier assigned to a smelter or refiner according to an established smelter and refinery identification system. It is expected that multiple names or aliases could be used to describe a single smelter or refiner and therefore multiple names or aliases could be associated to a single ‘Smelter ID’.","7. Source of Smelter Identification Number - This is the source of the Smelter Identification Number entered in Column F. If a smelter name was selected in Column C using the dropdown box, this field will auto-populate.","8. Smelter Street - Provide the street name on which the smelter is located. This field is optional.","9. Smelter City – Provide the city name of where the smelter is located. This field is optional.","10. Smelter Location: State/Province, if applicable – Provide the state or province where the smelter is located. This field is optional.","11. Smelter Contact Name – The Extended Mineral Reporting Template (EMRT) is circulated among companies in the requesting company's supply chain to exercise due diligence in accordance with the OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-Affected and High-Risk.\\n\\nIf the template is circulated in a country where laws protecting personal information exist, sharing personal contact information in the EMRT may violate related regulations. Therefore, it is recommended that the requesting company take precautions such as obtaining the contact person's permission to share the information with other companies in the supply chain when completing \\"Smelter Contact Name\\" and the \\"Smelter Contact Email\\" columns.\\n\\nIf you have permission to share this information, please fill in the name of the Smelter Facility Contact person who you worked with.","12. Smelter Contact Email – Fill in the email address of the Smelter Facility contact person who was identified as the Smelter Contact Name. Example: John.Smith@SmelterXXX.com. Please review the instructions for Smelter Contact Name before completing this field.","13. Name of Mine(s) - This field allows a company to define the actual mines being used by the smelter. Please enter the actual mine names if known. If 100% of the smelter’s feedstock originates from recycled or scrap sources, enter \\"Recycled\\" or \\"Scrap\\" in place of the name of the mine and answer \\"Yes\\" in Column P.","14. Location (Country) of Mine(s) - This is a free form text field that allows a company to define the location of the mines being used by the smelter. Please enter the country of the mine(s). If the country of origin is not known, enter \\"Unknown\\". If 100% of the smelter’s feedstock originates from recycled or scrap sources, enter \\"Recycled\\" or \\"Scrap\\" in place of the country of origin. This field is optional.","15. Indicates whether the smelter solely obtains inputs for its smelting process(es) from recycled or scrap sources. This question is optional. Permissible responses to this question are:\\n\\n- Yes\\n- No\\n- Unknown","16. Comments – free form text field to enter any comments concerning the smelter. Example: smelter is being acquired by Company YYY","Instructions for completing the Mine List Tab.\\nProvide answers in ENGLISH only","1. Metal - Use the pull down menu to select the metal for which you are entering mine facility information. Metals appear only if Declaration Questions 1 and 2 are answered \\"Yes\\" for those metals.","2. Name of Smelter(s) sourcing from this Mine Facility - When possible, fill in the name of the smelter(s) that is sourcing from the listed mine facility.","3. Mine Facility (Site) Name - Fill in the mine facility name as you know it.","4. Mine Identification - This is a unique identifier assigned to a mine facility according to an established mine facility identification system. It is expected that multiple names or aliases could be used to describe a single mine facility and therefore multiple names or aliases could be associated to a single ‘Facility ID’.","5. Source of Mine Identification Number - This is the source of the Mine Identification Number entered in Column D.","6. Mine Facility (Site) Country - Select from dropdown, the country where the mine facility is located.","7. Mine Facility Street - Provide the street name on which the mine is located. This field is optional.","8. Mine Facility City – Provide the city name of where the mine facility is located.","9. Mine Facility Location: State/Province, if applicable – Provide the state or province where the mine facility is located.","10. Mine Facility Contact Name – If the template is circulated in a country where laws protecting personal information exist, sharing personal contact information in the AMRT may violate related regulations. Therefore, it is recommended that the requesting company take precautions such as obtaining the contact person's permission to share the information with other companies in the supply chain when completing \\"Mine Facility Contact Name\\" and the \\"Mine Facility Contact Email\\" columns.\\n\\nIf you have permission to share this information, please fill in the name of the Mine Facility Contact person who you worked with.","11. Mine Facility Contact Email – Fill in the email address of the Mine Facility contact person who was identified as the Mine Facility Contact Name. Example: John.Smith@MineXXX.com. Please review the instructions for Mine Facility Contact Name before completing this field.","12. Proposed next steps - This is a comments area, which allows the company to specify the next steps to manage mine facilities. These are the actions you may take with the mine if the facility is not listed on the Responsible Minerals Initiative (RMI) Conformant Facility List. Example: request mine facility to undergo an RMI assessment, remove from preferred supplier list, etc.","13. Comments – free form text field to enter any comments concerning the mine facility. Example: mine is being acquired by Company YYY","The Checker worksheet is used to verify if all the required information in the Template has been completed. It is updated real-time and can be reviewed at any time while using the Template. It is used to verify completion.\\n\\nTo use this sheet, verify if all required fields have been completed (completed fields will be highlighted in green). If not, look for the red field(s) and review the \\"Notes\\" in Column C for required actions. You may use the URL in Column D to directly access the field for completion.","TERMS AND CONDITIONS","The Responsible Minerals Initiative Smelter List (the \\"List\\") and Program templates and tools, including, without limitation, the Extended Mineral Reporting Template (collectively “Tools”), including, without limitation, all information provided therein, are provided for informational purposes only and are current as of the date set forth therein. Any inaccuracy or omission in the List or any Tool is not the responsibility of the Responsible Business Alliance, Incorporated, a Delaware non-stock corporation (\\"RBA\\"). Determination of whether and/or how to use all or any portion of the List or any Tool is to be made in the User’s sole and absolute discretion. Prior to using the List or any Tool, you should review it with your own legal counsel. No part of the List or any Tool constitutes legal advice. Use of the List or any Tool is voluntary.","RBA does not make any representations or warranties with respect to the List or any Tool. The List and Tools are provided on an \\"AS IS\\" and on an \\"AS AVAILABLE\\" basis. RBA hereby disclaim all warranties of any nature, express, implied or otherwise, or arising from trade or custom, including, without limitation, any implied warranties of merchantability, non-infringement, quality, title, fitness for a particular purpose, completeness or accuracy.","To the fullest extent permitted by applicable laws, RBA renounces any liability for any losses, expenses or damages of any nature, including, without limitation, special, incidental, punitive, direct, indirect or consequential damages or lost income or profits, resulting from or arising out of the User’s use of the List or any Tool, whether arising in tort, contract, statute, or otherwise, even if shown that they were advised of the possibility of such damages.","In consideration for access and use of the List and/or any Tool, THE USER hereby agrees to and does (a) release and forever discharge RBA as well as its officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, from any and all claims, actions, losses, suits, damages, judgments, levies, and executions, which the User has ever had, has, or ever can, shall, or may have or claim to have against RBA , as well as its officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, resulting from or arising out of the List or any Tool or use thereof, and agrees to (b) indemnify, defend and hold harmless RBA, as well as its officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, from any and all claims, actions, losses, suits, damages, judgments, levies, and executions resulting from or arising out of the USER'S use of the List or any Tool.","If any part of any provision of these Terms and Conditions shall be invalid or unenforceable under applicable law, said part shall be deemed ineffective to the extent of such invalidity or unenforceability only, without in any way affecting the remaining parts of said provision or the remaining provisions of these Terms and Conditions.","By accessing and using the List or any Tool, and in consideration thereof, the User agrees to the foregoing."],"smelterList":[],"productList":[],"definitions":[{"term":"Authorizer","definition":"This field identifies the person responsible for the content of the declaration. The authorizer may be a different individual from the contact person. It is not correct to use the words ‘‘same’’ or similar identification to provide the name of the authorizer."},{"term":"Cobalt Refiner","definition":"An entity that processes cobalt concentrates, intermediates or recycled feed and produces a cobalt product for direct use in a downstream manufacturing process."},{"term":"Conflict-Affected and High-Risk Areas (CAHRA)","definition":"Conflict-Affected and High-Risk Areas (CAHRA) are defined by the OECD Due Diligence Guidance as \\"areas identified by the presence of armed conflict, widespread violence or other risks of harm to people. Armed conflict may take a variety of forms, such as a conflict of international or non-international character, which may involve two or more states, or may consist of wars of liberation, or insurgencies, civil wars, etc. High-risk areas may include areas of political instability or repression, institutional weakness, insecurity, collapse of civil infrastructure and widespread violence. Such areas are often characterised by widespread human right abuses and violations of national or international law.\\""},{"term":"Copper Processor*","definition":"A copper processor is a facility engaged in the transformation of copper-bearing materials into intermediate or final copper products through metallurgical, chemical, or electrochemical processes. Copper processors may operate integrated facilities or specialize in one or more stages of the copper value chain, including alloying, casting, or further fabrication."},{"term":"Declaration of Scope or Class","definition":"For the purposes of this template, “scope” describes the applicability of the information provided by the reporting company. The scope may encompass the entirety of a company’s services and/or products, or at a company’s discretion, the template may be used to report on a specific product (or products), or, be ‘User defined’. The ‘User defined’ scope selection or class may be used to describe any subset of a company’s operation or product portfolio"},{"term":"Due Diligence","definition":"The OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-affected and High-risk Areas (OECD Guidance) defines “Due Diligence” as “an on-going, proactive and reactive process through which companies can ensure that they respect human rights and do not contribute to conflict”. More information is available at http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/."},{"term":"Graphite (Natural)*","definition":"Natural Graphite is a naturally occurring form of crystalline carbon, found in graphite-bearing ores: flake graphite; amorphous and vein graphite. A natural graphite project or operations (Upstream actor) refers to an active industrial undertaking focused on the extraction of graphite ore and its subsequent beneficiation into graphite concentrate."},{"term":"Graphite Processor*","definition":"A spherical graphite producer (Pinch Point) is a facility that manufactures high-purity, fine-particle graphite products—either coated or uncoated—by processing natural or synthetic graphite concentrate into spherical graphite (also known as spheroidized graphite), primarily for use in lithium-ion battery anodes."},{"term":"Independent Third-Party Audit Firm","definition":"With respect to smelter audits, an “Independent Third-Party Audit Firm” is a private sector organization competent in evaluating the smelter or refiner’s due diligence system against a defined standard. To maintain neutrality and impartiality, such organization and its audit team members must have no conflicts of interest with the auditee."},{"term":"Intentionally added","definition":"Intentionally added refers to a substance used in one or more product life cycle stage(s) intended to give a particular property, reaction or quality."},{"term":"Lithium Processor*","definition":"A lithium processor is a facility that converts lithium-bearing materials into lithium compounds, lithium metal, or intermediates through chemical, thermal, or electrochemical processes. Processed outputs may include lithium carbonate, lithium hydroxide, lithium chloride, lithium sulfate, lithium oxide, lithium metal, or other lithium-containing intermediates used in downstream applications such as batteries, ceramics, glass, lubricants, and pharmaceuticals."},{"term":"OECD","definition":"Organisation for Economic Co-operation and Development. The OECD has developed the OECD Due Diligence Guidance for Responsible Supply Chains. The OECD Due Diligence Guidance provides detailed recommendations to help companies respect human rights and avoid contributing to conflict through their mineral purchasing decisions and practices and uses a reasonableness approach. This Guidance is for use by any company potentially sourcing minerals or metals from conflict-affected and high-risk areas. The OECD Guidance is global in scope, and applies to all mineral supply chains. (http://mneguidelines.oecd.org/mining.htm)"},{"term":"Mica (Natural)","definition":"Natural mica is a mineral that is mined or naturally occurring, such as muscovite and phlogopite."},{"term":"Mica (Synthetic)","definition":"Synthetic mica (fluorophlogopite) is a man-made material composed of such materials as magnesium, aluminum and silicon."},{"term":"Mica Processor","definition":"A mica processor is an entity that takes raw mined minerals such as pegmatites (schist), feldspar, kaolin, muscovite or phlogopite and subjects them to various physical or mechanical methods to separate non-mica components from mica components, then produce grades of mica products for use in downstream manufacturing processes. Raw mineral processing can include sorting, separation, milling, grinding, cutting, stamping and binding."},{"term":"Nickel Processor*","definition":"A nickel processor is a facility that transforms nickel-bearing materials into nickel metal, nickel alloys, or intermediates through pyrometallurgical, hydrometallurgical, or electrochemical processes. Processed products may include ferronickel, nickel pig iron (NPI), nickel matte, mixed hydroxide precipitate (MHP), mixed sulfide precipitate (MSP), nickel sulfate, or refined nickel metal."},{"term":"Processor","definition":"A facility that performs process or processes to remove all undesirable and separate the desired elements of primary materials by concentration or purification. This includes, but is not limited to: cleaning, separation, concentrating (e.g. separate valuable minerals from unwanted gangue by mechanical, thermal or chemical means), roasting (e.g. smelting, roasting, or other means to drive off impurities), cathode and anode production and other refining processes. The terms \\"smelter\\", \\"refiner\\", and \\"processor\\" are used interchangeably throughout various publications."},{"term":"Product","definition":"A company’s Product or Finished good is a material or item which has completed the final stage of manufacturing and/or processing and is available for distribution or sale to customers."},{"term":"Recycled or Scrap Sources","definition":"Recycled metals are reclaimed end-user or post-consumer products, or scrap processed metals created during product manufacturing. Recycled metal includes excess, obsolete, defective, and scrap metal materials which contain refined or processed metals that are appropriate to recycle in the production of the in scope metals. Minerals partially processed, unprocessed or a bi-product from another ore are not recycled metals.\\n\\nNote: As of the date of this publication, there is no significant post-consumer recycling of mica."},{"term":"Responsible Business Alliance (RBA)","definition":"Founded in 2004 the Responsible Business Alliance is the world’s largest industry coalition dedicated to electronics supply chain responsibility. (http://www.responsiblebusiness.org)"},{"term":"Responsible Minerals Assurance Process (RMAP)","definition":"The Responsible Minerals Assurance Process (RMAP) is a process developed by the RBA to enhance company capability to verify the responsible sourcing of metals. Further details of the RMAP can be found here: http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/."},{"term":"Responsible Minerals Initiative (RMI)","definition":"Founded in 2008 by members of the Responsible Business Alliance and the Global e-Sustainability Initiative, the Responsible Minerals Initiative has grown into one of the most utilized and respected resources for companies addressing conflict minerals issues in their supply chains. Over 150 companies from seven different industries participate in the RMI today, contributing to a range of tools and resources including the Responsible Minerals Assurance Process, the Conflict Minerals Reporting Template, Reasonable Country of Origin Inquiry data and a range of guidance documents on conflict minerals sourcing. The RMI also runs regular workshops on conflict minerals issues and contributes to policy development and debates with leading civil society organizations and governments. Additional information is available at http://www.responsiblemineralsinitiative.org/."},{"term":"RMAP Conformant Smelter List","definition":"The Responsible Minerals Assurance Process (RMAP) Conformant Smelter List is a published list of smelters and refiners that have undergone assessment through the RMAP, a program of the Responsible Minerals Initiative (RMI) or industry equivalent program (such as Responsible Jewellery Council or London Bullion Market Association) and have been validated to be in conformance with the protocols. If a smelter or refiner is not on the list, it has either not completed a RMAP assessment or is not in conformance with the RMAP protocol. \\n\\nA list of smelters and refiners which have been validated to be conformant to the RMAP can be found at www.responsiblemineralsinitiative.org"},{"term":"Smelter","definition":"A smelter or refiner is a company that procures and processes mineral ore, slag and/or materials from recycled or scrap sources into refined metal or metal containing intermediate products. The output can be pure (99.5% or greater) metals, powders, ingots, bars, grains, oxides or salts. The terms \\"smelter\\", \\"refiner\\", and \\"processor\\" are used interchangeably throughout various publications."},{"term":"Smelter Identification Number","definition":"A unique identification number the RMI assigns to companies that have been reported by members of the supply chain as smelters or refiners, whether or not they have been verified to meet the characteristics of smelters or refiners as defined in the RMAP audit protocols or other applicable audit programs."}],"mineList":[],"smelterLookup":["The following list represents the RMI's latest smelter name/alias information as of this templates release.  This list is updated frequently, and the most up-to-date version can be found on the RMI website http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/exports/cmt-export/.  The presence of a smelter here is NOT a guarantee that it is currently Active or Conformant within an independent third party audit program.\\n\\nPlease refer to the RMI web site www.responsiblemineralsinitiative.org for the most current and accurate list of standard smelter names that are Active or Conformant. \\n\\nNames included in column B represent company names that are commonly recognized and reported by the supply chain for a particular smelter. These names may include former company names, alternate names, abbreviations, or other variations. Although the names may not be the Standard Smelter Name, the reference names are helpful to identify the smelter, which is listed under column C in the Smelter Look-up.\\n\\nColumn C is the list of the official standard smelter names, in the ASCII character set. The majority of smelters will have the same entry for both columns, however if the common name varies from the standard name, the variation is noted in Column B."]}},"crt":{"2.21":{"instructions":["RMI:www.responsiblemineralsinitiative.org/","Introduction","This Cobalt Reporting Template (CRT) is a free, standardized reporting template created by the Responsible Minerals Initiative® (RMI®). The Template facilitates the transfer of information through the supply chain regarding mineral country of origin and smelters and refiners being utilized and supports the exercise of due diligence in accordance with the OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-Affected and High-Risk Areas. The template also facilitates the identification of new smelters and refiners to potentially undergo an audit via the Responsible Minerals Assurance Process.\\n\\nThe CRT was designed for downstream companies to disclose information about their supply chains up to but not including the smelter. If you are a smelter or refiner, we recommend you enter your own name in the smelter list tab.\\n\\nWhen filling out the form, none of the cell entries should start with \\"=\\" or \\"#.\\"","Instructions for completing Company Information questions (rows 8 - 22).\\nProvide comments in ENGLISH only","Note: Entries with (*) are mandatory fields.","1. Insert your company's Legal Name. Please do not use abbreviations. In this field you have the option to add other commercial names, DBAs, etc. This field is mandatory.","2. Select your company's Declaration Scope. The options for scope are:\\n\\nA. Company-wide\\nB. Product (or List of Products)\\nC. User-Defined \\n\\nFor \\"Company-wide\\", the declaration encompasses the entirety of a company's products or product substances produced by the parent company. Therefore if the user is reporting cobalt data at the company level, they will be reporting data on all products they manufacture. \\n\\nFor Scope selection of Product (or List of Products), a link to the worksheet tab for Product List will be displayed. If this scope is chosen, it is mandatory to list the Manufacturer's Product Number of the products covered under the Scope of this Declaration in Column B of the Product List worksheet. It is optional to list the Manufacturer's Product Name in Column C of the Product List worksheet.\\n\\nFor Scope selection of \\"User Defined\\", it is mandatory that the user describes the scope to which the cobalt disclosure is applicable. The scope of this class shall be defined in a text field by the supplier and should be easily understood by customers or the receivers of the document. As an example, companies may provide a link to clarifying information.\\n\\nThis field is mandatory.","3. Insert your company’s unique identifier number or code (DUNS number, VAT number, customer-specific identifier, etc.)","4. Insert the source for the unique identifier number or code (\\"DUNS\\", \\"VAT\\", \\"Customer\\", etc).","5. Insert your full company address (street, city, state, country, postal code). This field is optional.","6. Insert the name of the person to contact regarding the contents of the declaration information. This field is mandatory.","7. Insert the email address of the contact person. If an email address is not available, state \\"not available\\" or \\"n/A\\". A blank field may cause an error in form implementation. This field is mandatory.","8. Insert the telephone number for the contact. This field is mandatory.","9. Insert the name of the person who is responsible for the contents of the declaration information. The authorizer may be a different individual than the contact person. It is not correct to use the words ‘‘same’’ or similar identification to provide the name of the authorizer. This field is mandatory.","10. Insert the title for the Authorizing person. This field is optional.","11. Insert the email address of the Authorizing person. If an email address is not available, state ‘‘not available’’ or ‘‘n/a.’’ A blank field may cause an error in form implementation. This field is mandatory.","12. Insert the telephone number for the Authorizing person. This field is optional.","13. Please enter the Date of Completion for this form using the format DD-MMM-YYYY. This field is mandatory.","14. As an example, the user may save the file name as: companyname-date.xlsx (date as YYYY-MM-DD).","Instructions for completing the six Declaration of Scope Questions (rows 24 - 56).\\nProvide answers in ENGLISH only","These six questions define the usage, origination and sourcing identification for cobalt. The questions are designed to collect information about the use of cobalt in the company’s product(s) and the completeness of reporting. Responses to these questions shall represent the ‘Declaration Scope’ selected in the company information section.","Provide comments in the Comment sections as required to clarify your responses.","Provide an answer using the pull down menu selections. If the response for cobalt to question 1 is positive, then all questions shall be completed for cobalt and the following due diligence questions (A to I) shall be completed about the company’s overall due diligence program.","1. This question is used to determine whether cobalt is within the scope of the reporting requirement. The response to this question serves to exclude any trace-level contaminants or naturally-occurring by-products.\\n\\nThis question asks if any cobalt is used as raw material, component or additive in a product that you manufacture, including compounds. Impurities from raw materials, components, additives, abrasives, and cutting tools are outside the scope of the survey.\\n\\nThe answer to this question shall be either \\"yes\\" \\"no\\" or \\"unknown.\\"","Some companies may require substantiation for a \\"No\\" answer that should be entered into the Comment Field.","2. This is a declaration that any portion of the cobalt contained in a product or multiple products originates from a conflict-affected and high-risk area (CAHRA). The answer to this question should be \\"yes\\" if any smelter in the supply chain sources from a CAHRA, regardless of whether such a smelter has been independently audited or not.\\n\\nThe answers to this question shall be \\"yes,\\" \\"no,\\" \\"unknown,\\" or \\"DRC or adjoining countries only.\\" Substantiate a \\"Yes\\" answer in the comments section. An answer of \\"unknown\\" is an acceptable response. This question is mandatory for cobalt if the response to Question 1 is \\"Yes.\\"","3. This is a declaration that identifies whether cobalt contained in the product(s) originate exclusively from recycled or scrap sources. \\n\\nThe answer to this question shall be \\"yes\\", \\"no\\", or \\"unknown\\".\\n\\nA \\"Yes\\" answer means that 100% of the cobalt comes from recycled or scrap sources. A \\"No\\" answer means that some of the raw material does not come from recycled or scrap sources. An \\"Unknown\\" answer means that the user does not know whether or not 100% of the raw material comes from recycled or scrap sources. This field is mandatory.","4. This is a question to determine whether a company has received disclosures from all direct suppliers reasonably believed to be providing cobalt contained in the products covered by the scope of this declaration. Permissible responses to this question are:\\n\\n­ 100%\\n­ Greater than 90%\\n­ Greater than 75%\\n- Greater than 50%\\n- 50% or less\\n- None\\n\\nThis field is mandatory.","5. This question verifies if the supplier has reason to believe they have identified all of the smelters providing cobalt in the products covered by this declaration. The answer to this question shall be \\"Yes\\" \\"No\\" or \\"unknown\\", along with a comment in certain cases, e.g. list of smelters. This field is mandatory.","6. This question verifies that all of the smelters identified to be providing any of the cobalt contained in the products covered by the scope of this declaration have been reported in this declaration. The answer to this question shall be \\"yes\\" \\"no\\" or \\"unknown\\" along with a comment in certain cases, e.g. list of smelters. This question is mandatory for cobalt if the response to Question 1 is “Yes” for cobalt.","Instructions for completing Questions A. – I. (rows 63 - 79). Questions A. through I. are mandatory if the response to Question 1 is “Yes” for cobalt.\\nProvide answers in ENGLISH only.","The OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-affected and High-risk Areas (OECD Guidance) defines “Due Diligence” as “an on-going, proactive and reactive process through which companies can ensure that they respect human rights and do not contribute to conflict”. More information is available at http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/.\\n\\nQuestions A. thru I. are designed to assess your company’s cobalt sourcing due diligence activities. Responses to these questions shall represent the full scope of your company’s activities and shall not be limited to the ‘Declaration Scope’ selected in the company information section.","A. This is a declaration to disclose whether a company has a publicly available cobalt sourcing policy. The answer to this question shall be \\"yes\\" or \\"no.\\" If \\"Yes\\" the user shall specify the URL in a question comment field. This field is mandatory.","B. This is a declaration whether the company's cobalt sourcing policy addresses all risks in the OECD Due Diligence Guidance Annex II Model Policy as well as all the worst forms of child labor. The answer to this question shall be \\"yes\\" or \\"no\\". \\n\\nThis field is mandatory.\\n\\n\\"Annex II Risks\\" can be found at http://www.oecd.org/daf/inv/mne/OECD-Due-Diligence-Guidance-Minerals-Edition3.pdf.","C. Please answer \\"yes\\" or \\"no\\" to disclose whether your company has implemented cobalt sourcing due diligence measures. This declaration is not intended to provide the details of a company’s due diligence measures - just that a company has implemented due diligence measures. The aspects of acceptable due diligence measures shall be determined by the requestor and supplier. \\n\\nExamples of due diligence measures may include: communicating and incorporating into contracts (where possible) your expectations to suppliers on responsible cobalt supply chain; identifying and assessing risks in the supply chain; designing and implementing a strategy to respond to identified risks, etc. These due diligence measure examples are consistent with the guidelines included in the internationally recognized OECD Guidance. \\n\\nThis field is mandatory.","D. This is a declaration to determine whether a company requires their direct suppliers to exercise due diligence over the cobalt supply chain in accordance with the OECD Due Diligence Guidance. The answer to this question shall be \\"yes\\" or \\"no.\\" Comments should be captured in a question comment field. This field is mandatory.","E. This is a declaration to determine whether a company requires their direct suppliers to source cobalt from independently validated smelters. The answer to this question shall be \\"yes\\" or \\"no.\\" Comments should be captured in a question comment field. This field is mandatory.","F. This is a declaration to determine whether a company requires smelters in their supply chain to exercise due diligence over the cobalt supply chain in accordance with the OECD Due Diligence Guidance. The answer to this question shall be \\"yes\\" or \\"no.\\" Comments should be captured in a question comment field. This field is mandatory.\\n\\n\\"Annex II Risks\\" can be found at http://www.oecd.org/daf/inv/mne/OECD-Due-Diligence-Guidance-Minerals-Edition3.pdf.","G. This is a question to disclose whether a company requests their supplier to fill out a cobalt reporting template. Acceptable answers are listed below, in certain cases further explanation may be required, i.e., to provide the format used for collecting information. If the answer is \\"Yes, using other format\\" the user shall provide a comment in a question comment field. Permissible responses to this question are:\\n\\n- Yes, Cobalt Reporting Template\\n- Yes, using other format (describe)\\n- No\\n\\nThis field is mandatory.","H. Please answer “Yes” or “No”. In the comments section, you can provide additional information on your approach. Examples could be:\\n\\n “3rd party audit” - on-site audits of your suppliers conducted by independent third parties. \\n “Documentation review only” - a review of supplier submitted records and documentation conducted by independent third parties and, or your company personnel. \\n “Internal audit” - on-site audits of your suppliers conducted by your company personnel.\\n\\nThis field is mandatory.","I. This is a question to disclose whether a company’s review process includes corrective action management. The answer to this question shall be \\"yes\\" or \\"no.\\" Comments shall be captured in a question comment field. This field is mandatory.","Instructions for completing the Smelter List Tab.\\nProvide answers in ENGLISH only\\n\\nNote: Columns with (*) are mandatory fields","This template allows for smelter identification using the Smelter Look-up. Columns B, and C must be completed in order from left to right to utilize the Smelter Look-up feature.\\nUse a separate line for each metal/smelter/country combination.","1. Smelter Identification Input Column - If you know the Smelter Identification Number, input the number in Column A (columns B, C, D, E, F, G, I, and J will auto-populate). Column A does not autopopulate","2. Metal (*) - Use the pull down menu to select the metal for which you are entering smelter information. This field is mandatory.","3. Smelter Look-up (*) - Select from dropdown. This is the list of known smelters as of template release date. If smelter is not listed select 'Smelter Not Listed'. This will allow you to enter the name of the smelter in Column D. If you do not know the name or location of the smelter, select 'Smelter Not Yet Identified.' For this option, columns D and E will autopopulate to say, 'unknown.' This field is mandatory.","4. Smelter Name (1)- Fill in smelter name if you selected \\"Smelter Not Listed\\" in column C. This field will auto-populate when a smelter name in selected in Column C. This field is mandatory.","5. Smelter Country (*) – This field will auto-populate when a smelter name is selected in column C. If you selected \\"Smelter Not Listed\\" in column C, use the pull down menu to select the country location of the smelter. This field is mandatory.","6. Smelter Identification - This is a unique identifier assigned to a smelter or refiner according to an established smelter and refinery identification system. It is expected that multiple names or aliases could be used to describe a single smelter or refiner and therefore multiple names or aliases could be associated to a single ‘Smelter ID’.","7. Source of Smelter Identification Number - This is the source of the Smelter Identification Number entered in Column F. If a smelter name was selected in Column C using the dropdown box, this field will auto-populate.","8. Smelter Street - Provide the street name on which the smelter is located. This field is optional.","9. Smelter City – Provide the city name of where the smelter is located. This field is optional.","10.. Smelter Location: State/Province, if applicable – Provide the state or province where the smelter is located. This field is optional.","11. Smelter Contact Name – The Cobalt Reporting Template (CRT) is circulated among companies in the requesting company's supply chain to exercise due diligence in accordance with the OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-Affected and High-Risk.\\n\\nIf the template is circulated in a country where laws protecting personal information exist, sharing personal contact information in the CRT may violate related regulations. Therefore, it is recommended that the requesting company take precautions such as obtaining the contact person's permission to share the information with other companies in the supply chain when completing \\"Smelter Contact Name\\" and the \\"Smelter Contact Email\\" columns.\\n\\nIf you have permission to share this information, please fill in the name of the Smelter Facility Contact person who you worked with.","12. Smelter Contact Email – Fill in the email address of the Smelter Facility contact person who was identified as the Smelter Contact Name. Example: John.Smith@SmelterXXX.com. Please review the instructions for Smelter Contact Name before completing this field.","13. Name of Mine(s) - This field allows a company to define the actual mines being used by the smelter. Please enter the actual mine names if known. If 100% of the smelter’s feedstock originates from recycled or scrap sources, enter \\"Recycled\\" or \\"Scrap\\" in place of the name of the mine and answer \\"Yes\\" in Column P.","14. Location (Country) of Mine(s) - This is a free form text field that allows a company to define the location of the mines being used by the smelter. Please enter the country of the mine(s). If the country of origin is not known, enter \\"Unknown\\". If 100% of the smelter’s feedstock originates from recycled or scrap sources, enter \\"Recycled\\" or \\"Scrap\\" in place of the country of origin. This field is optional.","15. Indicates whether the smelter solely obtains inputs for its smelting process(es) from recycled or scrap sources. This question is optional. Permissible responses to this question are:\\n\\n- Yes\\n- No\\n- Unknown","16. Comments – free form text field to enter any comments concerning the smelter. Example: smelter is being acquired by Company YYY","The Checker worksheet is used to verify if all the required information in the Template has been completed. It is updated real-time and can be reviewed at any time while using the Template. It is used to verify completion.\\n\\nTo use this sheet, verify if all required fields have been completed (completed fields will be highlighted in green). If not, look for the red field(s) and review the \\"Notes\\" in Column C for required actions. You may use the URL in Column D to directly access the field for completion.","TERMS AND CONDITIONS","The Responsible Minerals Initiative Smelter List (the \\"List\\") and Program templates and tools, including, without limitation, the Cobalt Reporting Template (collectively “Tools”), including, without limitation, all information provided therein, are provided for informational purposes only and are current as of the date set forth therein. Any inaccuracy or omission in the List or any Tool is not the responsibility of the Responsible Business Alliance, Incorporated, a Delaware non-stock corporation (\\"RBA\\"). Determination of whether and/or how to use all or any portion of the List or any Tool is to be made in the User’s sole and absolute discretion. Prior to using the List or any Tool, you should review it with your own legal counsel. No part of the List or any Tool constitutes legal advice. Use of the List or any Tool is voluntary.","RBA does not make any representations or warranties with respect to the List or any Tool. The List and Tools are provided on an \\"AS IS\\" and on an \\"AS AVAILABLE\\" basis. RBA hereby disclaim all warranties of any nature, express, implied or otherwise, or arising from trade or custom, including, without limitation, any implied warranties of merchantability, non-infringement, quality, title, fitness for a particular purpose, completeness or accuracy.","To the fullest extent permitted by applicable laws, RBA renounces any liability for any losses, expenses or damages of any nature, including, without limitation, special, incidental, punitive, direct, indirect or consequential damages or lost income or profits, resulting from or arising out of the User’s use of the List or any Tool, whether arising in tort, contract, statute, or otherwise, even if shown that they were advised of the possibility of such damages.","In consideration for access and use of the List and/or any Tool, THE USER hereby agrees to and does (a) release and forever discharge RBA as well as its officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, from any and all claims, actions, losses, suits, damages, judgments, levies, and executions, which the User has ever had, has, or ever can, shall, or may have or claim to have against RBA , as well as its officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, resulting from or arising out of the List or any Tool or use thereof, and agrees to (b) indemnify, defend and hold harmless RBA, as well as its officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, from any and all claims, actions, losses, suits, damages, judgments, levies, and executions resulting from or arising out of the USER'S use of the List or any Tool.","If any part of any provision of these Terms and Conditions shall be invalid or unenforceable under applicable law, said part shall be deemed ineffective to the extent of such invalidity or unenforceability only, without in any way affecting the remaining parts of said provision or the remaining provisions of these Terms and Conditions.","By accessing and using the List or any Tool, and in consideration thereof, the User agrees to the foregoing."],"smelterList":[],"productList":[],"definitions":[{"term":"Authorizer","definition":"This field identifies the person responsible for the content of the declaration. The authorizer may be a different individual from the contact person. It is not correct to use the words ‘‘same’’ or similar identification to provide the name of the authorizer."},{"term":"Cobalt Refiner","definition":"An entity that processes cobalt concentrates, intermediates or recycled feed and produces a cobalt product for direct use in a downstream manufacturing process."},{"term":"Conflict-Affected and High-Risk Areas (CAHRA)","definition":"Conflict-Affected and High-Risk Areas (CAHRA) are defined by the OECD Due Diligence Guidance as \\"areas identified by the presence of armed conflict, widespread violence or other risks of harm to people. Armed conflict may take a variety of forms, such as a conflict of international or non-international character, which may involve two or more states, or may consist of wars of liberation, or insurgencies, civil wars, etc. High-risk areas may include areas of political instability or repression, institutional weakness, insecurity, collapse of civil infrastructure and widespread violence. Such areas are often characterised by widespread human right abuses and violations of national or international law.\\""},{"term":"Declaration of Scope or Class","definition":"For the purposes of this template, “scope” describes the applicability of the information provided by the reporting company. The scope may encompass the entirety of a company’s services and/or products, or at a company’s discretion, the template may be used to report on a specific product (or products), or, be ‘User defined’. The ‘User defined’ scope selection or class may be used to describe any subset of a company’s operation or product portfolio"},{"term":"Due Diligence","definition":"The OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-affected and High-risk Areas (OECD Guidance) defines “Due Diligence” as “an on-going, proactive and reactive process through which companies can ensure that they respect human rights and do not contribute to conflict”. More information is available at http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/."},{"term":"DRC or adjoining countries","definition":"Democratic Republic of Congo and the nine countries with which it shares an internationally recognized border: Angola, Burundi, Central African Republic, Republic of the Congo, Rwanda, South Sudan, Tanzania, Uganda, Zambia."},{"term":"Independent Third-Party Audit Firm","definition":"With respect to smelter audits, an “Independent Third-Party Audit Firm” is a private sector organization competent in evaluating the smelter or refiner’s due diligence system against a defined standard. To maintain neutrality and impartiality, such organization and its audit team members must have no conflicts of interest with the auditee."},{"term":"Intentionally added","definition":"Intentionally added is commonly known as the deliberate use of a substance, or in this case metal, in the formulation of a product where continued presence is desired to provide a specific characteristic, appearance or quality."},{"term":"OECD","definition":"Organisation for Economic Co-operation and Development. The OECD has developed the OECD Due Diligence Guidance for Responsible Supply Chains. The OECD Due Diligence Guidance provides detailed recommendations to help companies respect human rights and avoid contributing to conflict through their mineral purchasing decisions and practices and uses a reasonableness approach. This Guidance is for use by any company potentially sourcing minerals or metals from conflict-affected and high-risk areas. The OECD Guidance is global in scope, and applies to all mineral supply chains. (http://mneguidelines.oecd.org/mining.htm)"},{"term":"Product","definition":"A company’s Product or Finished good is a material or item which has completed the final stage of manufacturing and/or processing and is available for distribution or sale to customers."},{"term":"Refiner","definition":"A refiner is a company that procures and processes mineral ore, slag and/or materials from recycled or scrap sources into refined metal or metal containing intermediate products. The output can be pure (99.5% or greater) metals, powders, ingots, bars, grains, oxides or salts. The terms “smelter” and “refiner” are used interchangeably throughout various publications."},{"term":"Recycled or Scrap Sources","definition":"Recycled or scrap sources are recycled cobalt that are reclaimed end-user or post-consumer products, or scrap processed cobalt created during product manufacturing. Recycled cobalt includes excess, obsolete, defective, and scrap cobalt materials that contain refined or processed metals that are appropriate to recycle in the production of such metals. Minerals partially processed, unprocessed or byproducts from other ores are not included in the definition of recycled cobalt"},{"term":"Responsible Business Alliance (RBA)","definition":"Founded in 2004 the Responsible Business Alliance is the world’s largest industry coalition dedicated to electronics supply chain responsibility. (http://www.responsiblebusiness.org)"},{"term":"Responsible Minerals Assurance Process (RMAP)","definition":"The Responsible Minerals Assurance Process (RMAP) is a program developed by the RBA and GeSI to enhance company capability to verify the responsible sourcing of metals. Further details of the RMAP can be found here: http://www.responsiblemineralsinitiative.org/smelter-introduction/"},{"term":"Responsible Minerals Initiative (RMI)","definition":"Founded in 2008 by members of the Responsible Business Alliance and the Global e-Sustainability Initiative, the Responsible Minerals Initiative has grown into one of the most utilized and respected resources for companies addressing conflict minerals issues in their supply chains. Over 150 companies from seven different industries participate in the RMI today, contributing to a range of tools and resources including the Responsible Minerals Assurance Process, the Conflict Minerals Reporting Template, Reasonable Country of Origin Inquiry data and a range of guidance documents on conflict minerals sourcing. The RMI also runs regular workshops on conflict minerals issues and contributes to policy development and debates with leading civil society organizations and governments. Additional information is available at http://www.responsiblemineralsinitiative.org/."},{"term":"RMAP Conformant Smelter List","definition":"The Responsible Minerals Assurance Process (RMAP) Conformant Smelter List is a published list of smelters and refiners that have undergone assessment through the RMAP, a program of the Responsible Minerals Initiative (RMI) or industry equivalent program (such as Responsible Jewellery Council or London Bullion Market Association) and have been validated to be in conformance with the protocols. If a smelter or refiner is not on the list, it has either not completed a RMAP assessment or is not in conformance with the RMAP protocol. \\n\\nA list of smelters and refiners which have been validated to be conformant to the RMAP can be found at www.responsiblemineralsinitiative.org"},{"term":"Smelter","definition":"A smelter is a company that procures and processes mineral ore, slag and/or materials from recycled or scrap sources into refined metal or metal containing intermediate products. The output can be pure (99.5% or greater) metals, powders, ingots, bars, grains, oxides or salts. The terms “smelter” and “refiner” are used interchangeably throughout various publications."},{"term":"Smelter Identification Number","definition":"A unique identification number the RMI assigns to companies that have been reported by members of the supply chain as smelters or refiners, whether or not they have been verified to meet the characteristics of smelters or refiners as defined in the RMAP audit protocols or other applicable audit programs."}],"smelterLookup":["The following list represents the RMI's latest smelter name/alias information as of this templates release.  This list is updated frequently, and the most up-to-date version can be found on the RMI website http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/exports/cmt-export/.  The presence of a smelter here is NOT a guarantee that it is currently Active or Conformant within an independent third party audit program.\\n\\nPlease refer to the RMI web site www.responsiblemineralsinitiative.org for the most current and accurate list of standard smelter names that are Active or Conformant. \\n\\nNames included in column B represent company names that are commonly recognized and reported by the supply chain for a particular smelter. These names may include former company names, alternate names, abbreviations, or other variations. Although the names may not be the Standard Smelter Name, the reference names are helpful to identify the smelter, which is listed under column C in the Smelter Look-up.\\n\\nColumn C is the list of the official standard smelter names, in the ASCII character set. The majority of smelters will have the same entry for both columns, however if the common name varies from the standard name, the variation is noted in Column B."]}},"amrt":{"1.3":{"instructions":["RMI website: (www.responsiblemineralsinitiative.org)","Introduction","This Additional Minerals Reporting Template (Template) is a free, standardized reporting template created by the Responsible Minerals Initiative (RMI). The Template facilitates the transfer of information through the supply chain regarding mineral country of origin and smelters and refiners being utilized and supports compliance to legislation*. The template also facilitates the identification of new smelters and refiners to potentially undergo an audit via the Responsible Minerals Assurance Process**.\\n\\nThe AMRT was designed for downstream companies to disclose information about their supply chains up to but not including the smelter. If you are a smelter, refiner, or processor, in accordance with the RMAP protocols, we recommend you enter your own name in the smelter list tab.\\n\\nWhen filling out the form, none of the cell entries should start will \\"=\\" or \\"#.\\"","* In 2010, the U.S. Dodd-Frank Wall Street Reform and Consumer Protection Act was passed concerning “conflict minerals” originating from the Democratic Republic of the Congo (DRC) or adjoining countries. The SEC published final rules associated with the disclosure of the source of conflict minerals by U.S. publicly traded companies (see the rules at http://www.sec.gov/rules/final/2012/34-67716.pdf). The rules reference the OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-Affected and High-Risk Areas, (http://www.oecd.org/daf/inv/mne/GuidanceEdition2.pdf), which guides suppliers to establish policies, due diligence frameworks and management systems.\\nIn 2017, Regulation (EU) 2017/821 of the European Parliament and of the European Council of 17 May 2017 was passed concerning supply chain due diligence obligations for Union importers of tin, tantalum and tungsten, their ores, and gold originating from conflict-affected and high-risk areas (see regulation at https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=OJ:L:2017:130:FULL&from=EN)\\n** See information on the Responsible Minerals Initiative (www.responsiblemineralsinitiative.org).","Instructions for completing Company Information questions (rows 8 - 24).\\nProvide comments in ENGLISH only","Note: Entries with (*) are mandatory fields.","1. Insert your company's Legal Name. Please do not use abbreviations. In this field you have the option to add other commercial names, DBAs, etc.","2. Select your company's Declaration Scope. The options for scope are:\\n\\nA. Company-wide\\nB. Product (or List of Products)\\nC. User-Defined \\n\\nFor \\"Company-wide\\", the declaration encompasses the entirety of a company's products or product substances produced by the parent company. Therefore if the user is reporting mineral data at the company level, they will be reporting mineral data on all products they manufacture. \\n\\nFor Scope selection of Product (or List of Products), a link to the worksheet tab for Product List will be displayed. If this scope is chosen, it is mandatory to list the Responder Product Number of the products covered under the Scope of this Declaration in Column B of the Product List worksheet. It is optional to list the Responder Product Name in Column C of the Product List worksheet.\\n\\nFor Scope selection of \\"User Defined\\", it is mandatory that the user describes the scope to which the mineral disclosure is applicable. The scope of this class shall be defined in a text field by the supplier and should be easily understood by customers or the receivers of the document. As an example, companies may provide a link to clarifying information.\\n\\nThis field is mandatory.","3. The requesting company is required to input all minerals that are in scope of the declaration (up to a maximum of 10). You may select a mineral from the drop-down menu or enter another metal manually. Minerals are automatically populated in alphabetical order for Questions 1 and 2.\\n\\nMinerals should not include 3TG (tin, tantalum, tungsten, and gold), cobalt, copper, graphite, lithium, mica and/or nickel, as they are included in the CMRT & EMRT.\\n\\nThis field is mandatory.","4. If your declaration scope of minerals includes “Other”, input the additional minerals here. The requesting company is required to specify which minerals are in scope. Selected minerals are automatically populated for Questions 1 and 2.\\n\\nThis field is mandatory if “Other” is selected at least 1 time in the Declaration Scope of Minerals/Metals.","4. Insert your company’s unique identifier number or code (DUNS number, VAT number, customer-specific identifier, etc.)","5. Insert the source for the unique identifier number or code (\\"DUNS\\", \\"VAT\\", \\"Customer\\", etc).","6. Insert your full company address (street, city, state, country, postal code). This field is optional.","7. Insert the name of the person to contact regarding the contents of the declaration information. This field is mandatory.","8. Insert the email address of the contact person. If an email address is not available, state ‘‘not available’’ or ‘‘n/a.’’ A blank field may cause an error in form implementation. This field is mandatory.","9. Insert the telephone number for the contact. This field is mandatory.","10. Insert the name of the person who is responsible for the contents of the declaration information. The authorizer may be a different individual than the contact person. It is not correct to use the words ‘‘same’’ or similar identification to provide the name of the authorizer. This field is mandatory.","11. Insert the title for the Authorizing person. This field is optional.","12. Insert the email address of the Authorizing person. If an email address is not available, state ‘‘not available’’ or ‘‘n/a.’’ A blank field may cause an error in form implementation. This field is mandatory.","13. Insert the telephone number for the Authorizing person. This field is optional.","14. Please enter the Date of Completion for this form using the format DD-MMM-YYYY. This field is mandatory.","15. As an example, the user may save the file name as: companyname-date.xls (date as YYYY-MM-DD).","Instructions for completing the two Due Diligence Questions (rows 26 - 49).\\nProvide answers in ENGLISH only","These two questions define the usage and the level of relevant suppliers’ data collection for the declaration scope of minerals. The questions are designed to collect information about the use of all specified minerals in the company’s product(s) to determine the applicability and completeness of reporting. Responses to these questions shall represent the ‘Declaration Scope’ selected in the company information section.","For each of the two questions, provide an answer for each mineral using the drop-down menu selections. The first question in this section must be completed for all specified minerals in the declaration scope.","1. The response to this question is used to determine whether any of the specified minerals are within the scope of the reporting requirement.\\n\\nThis question asks if any specified minerals are used as a raw material, component or additive in a product that you manufacture, including compounds. Impurities from raw materials, components, additives, abrasives and cutting tools are outside the scope of the survey.\\n\\nThis question shall be answered for each specified mineral. Valid responses to this question are either \\"yes\\", \\"no\\", \\"unknown\\", or \\"not declaring\\". This question is mandatory.","Understand that if any mineral from the declaration scope is intentionally added anywhere within your supply chain, they are considered intentionally added to your product.\\n\\nSome companies may require substantiation for a \\"No\\" answer that should be entered into the Comment Field.","2. This is a question to determine whether a company has received relevant mineral disclosures from all direct suppliers reasonably believed to be providing the declared mineral(s) contained in the products covered by the scope of their declaration. Permissible responses to this question are:\\n\\n- 100%\\n- Greater than 90%\\n- Greater than 75%\\n- Greater than 50%\\n- 50% or less\\n- None\\n- Unknown\\n- Did not survey","If you respond “100%” for any metal in Question 2, you are expected to provide the names of all smelters that were identified to process the metal(s) used in your supply chain in order for this answer to be complete.\\n\\nSome companies may require substantiation for how you have defined “relevant” suppliers, which should be entered into the Comments Field. If you have not achieved a 100% response rate from your relevant suppliers, please submit your AMRT indicating the appropriate percentage and continue to survey your suppliers. An increase in your company’s percentage of suppliers surveyed may be one indication of year-over-year improvement.\\n\\nSome companies may require further substantiation for any mineral with the response “Did not survey”, which should be entered in the Comments Field.","Instructions for completing the Minerals Scope Tab.\\nProvide answers in ENGLISH only","It is strongly recommended that the requestor complete the Minerals Scope tab prior to sharing their AMRT survey.","1. Select Minerals/Metals in Scope – The metal dropdown will auto-populate with the list of in scope minerals from your Declaration page. Use the drop-down menu to select the metal for which you are providing reasons for inclusion on the AMRT.","2. Reasons for inclusion on the AMRT - Provide details on why you are requesting data for the specified mineral(s). Examples include mineral risk profiles, such as those found on the Material Insights platform, and/or regulatory requirements.","Instructions for completing the Smelter List Tab.\\nProvide answers in ENGLISH only","Note: Columns with (*) are mandatory fields","1. Smelter Identification Input Column - If you know the Smelter Identification Number, input the number in Column A (columns B, C, D, E, F, G, I, and J will auto-populate). Column A does not autopopulate","2. Metal (*) - Use the pull down menu to select the metal for which you are entering smelter information. This field is mandatory.","3. Smelter Name (*) – This field is mandatory.","4. Smelter Country (*) – Use the pull down menu to select the country location of the smelter. This field is mandatory.","5. Smelter Identification - This is a unique identifier assigned to a smelter or refiner according to an established smelter and refinery identification system. It is expected that multiple names or aliases could be used to describe a single smelter or refiner and therefore multiple names or aliases could be associated to a single ‘Smelter ID’.","6. Source of Smelter Identification Number - This is the source of the Smelter Identification Number entered in Column D.","7. Smelter Street - Provide the street name on which the smelter is located. This field is optional.","8. Smelter City – Provide the city name of where the smelter is located. This field is optional.","9. Smelter Location: State/Province, if applicable – Provide the state or province where the smelter is located. This field is optional.","10. Smelter Contact Name – If the template is circulated in a country where laws protecting personal information exist, sharing personal contact information in the AMRT may violate related regulations. Therefore, it is recommended that the requesting company take precautions such as obtaining the contact person's permission to share the information with other companies in the supply chain when completing \\"Smelter Contact Name\\" and the \\"Smelter Contact Email\\" columns.\\n\\nIf you have permission to share this information, please fill in the name of the Smelter Facility Contact person who you worked with.","11. Smelter Contact Email – Fill in the email address of the Smelter Facility contact person who was identified as the Smelter Contact Name. Example: John.Smith@SmelterXXX.com. Please review the instructions for Smelter Contact Name before completing this field.","12. Proposed next steps - This is a comments area, which allows the company to specify the next steps to manage smelters. These are the actions you may take with the smelter if the facility is not listed on the Responsible Minerals Initiative (RMI) Conformant Facility List. Example: request smelter facility to undergo an RMI assessment, remove from preferred supplier list, etc.","13. Name of Mine(s) - This field allows a company to define the actual mines being used by the smelter. Please enter the actual mine names if known. If 100% of the smelter’s feedstock originates from recycled or scrap sources, enter \\"Recycled\\" or \\"Scrap\\" in place of the name of the mine and answer \\"Yes\\" in Column P.\\n\\n\\"RCOI confirmed as per RMI\\" may be an acceptable answer to this question.","14. Location (Country) of Mine(s) - This is a free form text field that allows a company to define the location of the mines being used by the smelter. Please enter the country of the mine(s). If the country of origin is not known, enter \\"Unknown\\". If 100% of the smelter’s feedstock originates from recycled or scrap sources, enter \\"Recycled\\" or \\"Scrap\\" in place of the country of origin. This field is optional.\\n\\n\\"RCOI confirmed as per RMI\\" may be an acceptable answer to this question.","15. Indicates whether the smelter solely obtains inputs for its smelting process(es) from recycled or scrap sources. This question is optional. Permissible responses to this question are:\\n\\n- Yes\\n- No\\n- Unknown","16. Comments – free form text field to enter any comments concerning the smelter. Example: smelter is being acquired by Company YYY","Instructions for completing the Mine List Tab.\\nProvide answers in ENGLISH only","1. Metal - Use the pull down menu to select the metal for which you are entering mine facility information.","2. Name of Smelter(s) sourcing from this Mine Facility - When possible, fill in the name of the smelter(s) that is sourcing from the listed mine facility.","3. Mine Facility (Site) Name - Fill in the mine facility name as you know it.","4. Mine Identification - This is a unique identifier assigned to a mine facility according to an established mine facility identification system. It is expected that multiple names or aliases could be used to describe a single mine facility and therefore multiple names or aliases could be associated to a single ‘Facility ID’.","5. Source of Mine Identification Number - This is the source of the Mine Identification Number entered in Column D.","6. Mine Facility (Site) Country - Select from dropdown, the country where the mine facility is located.","7. Mine Facility Street - Provide the street name on which the mine is located. This field is optional.","8. Mine Facility City – Provide the city name of where the mine facility is located.","9. Mine Facility Location: State/Province, if applicable – Provide the state or province where the mine facility is located.","10. Mine Facility Contact Name – If the template is circulated in a country where laws protecting personal information exist, sharing personal contact information in the AMRT may violate related regulations. Therefore, it is recommended that the requesting company take precautions such as obtaining the contact person's permission to share the information with other companies in the supply chain when completing \\"Mine Facility Contact Name\\" and the \\"Mine Facility Contact Email\\" columns.\\n\\nIf you have permission to share this information, please fill in the name of the Mine Facility Contact person who you worked with.","11. Mine Facility Contact Email – Fill in the email address of the Mine Facility contact person who was identified as the Mine Facility Contact Name. Example: John.Smith@MineXXX.com. Please review the instructions for Mine Facility Contact Name before completing this field.","12. Proposed next steps - This is a comments area, which allows the company to specify the next steps to manage mine facilities. These are the actions you may take with the mine if the facility is not listed on the Responsible Minerals Initiative (RMI) Conformant Facility List. Example: request mine facility to undergo an RMI assessment, remove from preferred supplier list, etc.","13. Comments – free form text field to enter any comments concerning the mine facility. Example: mine is being acquired by Company YYY","The Checker worksheet is used to verify if all the required information in the Template has been completed. It is updated real-time and can be reviewed at any time while using the Template. It is used to verify completion.\\n\\nTo use this sheet, verify if all required fields have been completed (completed fields will be highlighted in green). If not, look for the red field(s) and review the \\"Notes\\" in Column C for required actions. You may use the URL in Column D to directly access the field for completion.","TERMS AND CONDITIONS","The Responsible Minerals Assurance Process (“Process”) Conformant Smelter List (the \\"List\\") and Process templates and tools, including, without limitation, the Additional Minerals Reporting Template (collectively “Tools”), including, without limitation, all information provided therein, are provided for informational purposes only and are current as of the date set forth therein. Any inaccuracy or omission in the List or any Tool is not the responsibility of the Responsible Business Alliance, a Delaware non-stock corporation (\\"RBA\\"). Determination of whether and/or how to use all or any portion of the List or any Tool is to be made in the User’s sole and absolute discretion. Prior to using the List or any Tool, you should review it with your own legal counsel. No part of the List or any Tool constitutes legal advice. Use of the List or any Tool is voluntary.","RBA makes no representations or warranties with respect to the List or any Tool. The List and Tools are provided on an \\"AS IS\\" and on an \\"AS AVAILABLE\\" basis. RBA hereby disclaims all warranties of any nature, express, implied or otherwise, or arising from trade or custom, including, without limitation, any implied warranties of merchantability, non-infringement, quality, title, fitness for a particular purpose, completeness or accuracy.","To the fullest extent permitted by applicable laws, RBA renounces any liability for any losses, expenses or damages of any nature, including, without limitation, special, incidental, punitive, direct, indirect or consequential damages or lost income or profits, resulting from or arising out of the User’s use of the List or any Tool, whether arising in tort, contract, statute, or otherwise, even if shown that they were advised of the possibility of such damages.","In consideration for access and use of the List and/or any Tool, THE USER hereby agrees to and does (a) release and forever discharge RBA, as well as their respective officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, from any and all claims, actions, losses, suits, damages, judgments, levies, and executions, which the User has ever had, has, or ever can, shall, or may have or claim to have against RBA, as well as their respective officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, resulting from or arising out of the List or any Tool or use thereof, and agrees to (b) indemnify, defend and hold harmless RBA, as well as their respective officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, from any and all claims, actions, losses, suits, damages, judgments, levies, and executions resulting from or arising out of the USER'S use of the List or any Tool.","If any part of any provision of these Terms and Conditions shall be invalid or unenforceable under applicable law, said part shall be deemed ineffective to the extent of such invalidity or unenforceability only, without in any way affecting the remaining parts of said provision or the remaining provisions of these Terms and Conditions."],"smelterList":[],"productList":[],"definitions":[{"term":"Aluminum Processor","definition":"An aluminum processor is a facility that transforms bauxite into alumina or smelts alumina into aluminum. Aluminum processors also include facilities that transform secondary material (recycled material, end of life products) in aluminum metal or aluminum alloys."},{"term":"Authorizer","definition":"This field identifies the person responsible for the content of the declaration. The authorizer may be a different individual from the contact person. It is not correct to use the words ‘‘same’’ or similar identification to provide the name of the authorizer."},{"term":"Conflict-Affected and High-Risk Area (CAHRA)","definition":"Conflict-affected and high-risk areas are areas in a state of armed conflict, fragile post-conflict areas, as well as areas witnessing weak or non-existing governance and security, such as failed states, and widespread and systematic violations of international law, including human rights abuses."},{"term":"Declaration Scope or Class","definition":"For the purposes of this template, “scope” describes the applicability of the information provided by the reporting company. The scope may encompass the entirety of a company’s services and/or products, or at a company’s discretion, the template may be used to report on a specific product (or products), or, be ‘User defined’. The ‘User defined’ scope selection or class may be used to describe any subset of a company’s operation or product portfolio."},{"term":"Due Diligence","definition":"The OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-affected and High-risk Areas (OECD Guidance) defines “Due Diligence” as “an on-going, proactive and reactive process through which companies can ensure that they respect human rights and do not contribute to conflict”. More information is available at http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/."},{"term":"Independent Third-Party Audit Firm","definition":"With respect to smelter audits, an “Independent Third-Party Audit Firm” is a private sector organization competent in evaluating the smelter or refiner’s materials traceability against the standards of the RMAP or equivalent audit protocols. To maintain neutrality and impartiality, such organization and its audit team members must have no conflicts of interest with the auditee."},{"term":"Intentionally added","definition":"Intentionally added is commonly known as the deliberate use of a substance, or in this case metal, in the formulation of a product where continued presence is desired to provide a specific characteristic, appearance or quality.\\n\\nWhile the SEC does not define the phrase “intentionally added” in the final rule*, the rule’s preamble states:\\n“[W]e agree that being intentionally added, rather than being a naturally-occurring by-product, is a significant factor in determining whether a conflict mineral is ‘‘necessary to the functionality or production’’ of a product. This is true regardless of who intentionally added the conflict mineral to the product so long as it is contained in the product. [D]etermining whether a conflict mineral is considered ‘‘necessary’’ to a product should not depend on whether the conflict mineral is added directly to the product by the issuer or whether it is added to a component of the product that the issuer receives from a third party. Instead, the issuer should ‘report on the totality of the product and work with suppliers to comply with the requirements.’ Therefore, in determining whether a conflict mineral is ‘‘necessary’’ to a product, an issuer must consider any conflict mineral contained in its product, even if that conflict mineral is only in the product because it was included as part of a component of the product that was manufactured originally by a third party.”\\n*(56296 Federal Register / Vol. 77, No. 177 / Wednesday, September 12, 2012 / Rules and Regulations)"},{"term":"Iron Processor","definition":"An iron processor is a facility that transforms iron ore or steel scrap into pig iron, crude steel, refined steel, low-alloy or high-alloy steel."},{"term":"Mine Facility (Site)","definition":"A mine facility or site is the point of extraction of the raw material."},{"term":"OECD","definition":"Organisation for Economic Co-operation and Development"},{"term":"Processor","definition":"A facility that performs process or processes to remove all undesirable and separate the desired elements of primary materials by concentration or purification. This includes, but is not limited to: cleaning, separation, concentrating (e.g. separate valuable minerals from unwanted gangue by mechanical, thermal or chemical means), roasting (e.g. smelting, roasting, or other means to drive off impurities), cathode and anode production and other refining processes. The terms \\"smelter\\", \\"refiner\\", and \\"processor\\" are used interchangeably throughout various publications."},{"term":"Product","definition":"A company’s Product or Finished good is a material or item which has completed the final stage of manufacturing and/or processing and is available for distribution or sale to customers."},{"term":"Rare Earth Element (REE) Processor","definition":"An REE refiner is a facility that produces rare earth oxides, rare earth element metals or any intermediates derived from the transformation of REE concentrates or REEs-bearing precipitates from leaching of ion-adsorption clays."},{"term":"Responsible Business Alliance (RBA)","definition":"Responsible Business Alliance (www.responsiblebusiness.org)"},{"term":"Responsible Minerals Assurance Process (RMAP)","definition":"The Responsible Minerals Assurance Process (RMAP) is a process developed by the RBA to enhance company capability to verify the responsible sourcing of metals. Further details of the RMAP can be found here: http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/."},{"term":"Responsible Minerals Initiative (RMI)","definition":"Founded in 2008 by members of the Responsible Business Alliance, the Responsible Minerals Initiative has grown into one of the most utilized and respected resources for companies addressing conflict minerals issues in their supply chains. Over 460 companies from a range of industries participate in the RMI today, contributing to a range of tools and resources including the Responsible Minerals Assurance Process, the Conflict Minerals Reporting Template, Reasonable Country of Origin Inquiry data and a range of guidance documents on conflict minerals sourcing. The RMI also runs regular workshops on conflict minerals issues and contributes to policy development and debates with leading civil society organizations and governments. Additional information is available at http://www.responsiblemineralsinitiative.org."},{"term":"RMI Conformant Smelter List","definition":"The Responsible Minerals Initiative (RMI) Conformant Facility List is a published list of facilities that have undergone assessment through the RMI or industry equivalent program (such as Responsible Jewellery Council or London Bullion Market Association) and have been validated to be in conformance with the protocols. If a facility is not on the list, it has either not completed an RMI assessment or is not in conformance with the RMI assessment standard. \\n\\nA list of facilities which have been validated to be conformant with an RMI assessment standard can be found at www.responsiblemineralsinitiative.org."},{"term":"Smelter","definition":"A smelter or refiner is a company that procures and processes mineral ore, slag and/or materials from recycled or scrap sources into refined metal or metal containing intermediate products. The output can be pure (99.5% or greater) metals, powders, ingots, bars, grains, oxides or salts. The terms \\"smelter\\", \\"refiner\\", and \\"processor\\" are used interchangeably throughout various publications."},{"term":"Smelter Identification Number","definition":"A unique identification number the RMI assigns to companies that have been reported by members of the supply chain as smelters or refiners, whether or not they have been verified to meet the characteristics of smelters or refiners as defined in the RMAP audit protocols."},{"term":"Zinc Processor","definition":"A zinc processor is a facility that transforms zinc sulfide concentrate, zinc calcine (derived from roasting) or zinc oxide (derived from recycling) into Special High Grade Zinc (SHG) or any intermediate (e.g. zinc calcine)."}],"mineList":[],"smelterLookup":["The following list represents the RMI's latest smelter name/alias information as of this templates release.  This list is updated frequently, and the most up-to-date version can be found on the RMI website http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/exports/cmrt-export/.  The presence of a smelter here is NOT a guarantee that it is currently Active or Conformant within the Responsible Minerals Assurance Process.\\n\\nPlease refer to the RMI web site www.responsiblemineralsinitiative.org for the most current and accurate list of standard smelter names that are Active or Conformant. \\n\\nNames included in column B represent company names that are commonly recognized and reported by the supply chain for a particular smelter. These names may include former company names, alternate names, abbreviations, or other variations. Although the names may not be the RMI Standard Smelter Name, the reference names are helpful to identify the smelter, which is listed under column C in the Smelter Look-up.\\n\\nColumn C is the list of the official standard smelter names, in the ASCII character set. The majority of smelters will have the same entry for both columns, however if the common name varies from the standard name, the variation is noted in Column B."]}}}`),C1={minerals:{tooManySelected:"Too many minerals selected",selectAtLeastOne:"Select at least one mineral",enterAtLeastOne:"Enter at least one mineral",otherRequired:"Enter other minerals when “Other” is selected",otherNotAllowed:"Clear other minerals when “Other” is not selected",tooMany:"Too many minerals"},companyQuestions:{commentRequired:"Comment is required"},required:"Required",date:{invalid:"Invalid date format (DD-MMM-YYYY)"},email:{invalid:"Invalid email address"},externalPickFailedTitle:"External selection failed",externalPickFailedContent:"The external picker did not return data successfully. Please try again."},k1={common:JC,templates:XC,tabs:e1,sections:t1,notices:n1,badges:o1,conditions:r1,placeholders:i1,productPlaceholders:s1,hints:a1,tables:l1,actions:c1,confirm:u1,selection:m1,options:d1,minerals:p1,questions:f1,companyQuestions:h1,productList:y1,fields:g1,docStatus:b1,checker:w1,revision:v1,docs:S1,errors:C1},T1={appTitle:"冲突矿产报告",selectTemplate:"选择模板",selectVersion:"版本",export:"导出",lookupSeparator:"----------",comingSoon:"{{title}} - 即将推出",homeTitle:"冲突矿产报告模板",homeSubtitle:"请从顶部选择一个模板开始",language:"语言"},x1={cmrt:"CMRT",emrt:"EMRT",crt:"CRT",amrt:"AMRT",cmrt_full:"冲突矿产报告模板",emrt_full:"扩展矿产报告模板",crt_full:"钴报告模板",amrt_full:"附加矿产报告模板"},_1={revision:"版本说明",declaration:"申报",smelterList:"冶炼厂列表",checker:"校验",productList:"产品列表",smelterLookup:"冶炼厂查询",definitions:"术语定义",instructions:"说明",mineList:"矿场列表",mineralsScope:"矿产申报范围"},I1={companyInfo:"公司信息",contact:"联系人",authorizer:"授权人",questionMatrix:"问题矩阵",questionMatrixHint:"根据上述申报范围,回答以下 1 至 8 题。",companyQuestions:"公司层面问题",mineralsScope:"矿产申报范围",mineralsOther:"其他矿产"},R1={requiredHintTitle:"填写提示:",requiredHintBody:"黄色底色字段为必填项,请确保全部填写完整后再提交。"},N1={requiredCompleted:"{{done}}/{{total}} 必填已完成",questionRange:"Q{{from}}-Q{{to}}",companyQuestionsRequired:"当任一金属{{condition}}时必填",recordCount:"{{count}} 条记录"},M1={always:"始终",q1NotNo:"Q1 ≠ {{no}}",q1Yes:"Q1 = {{yes}}",q1q2NotNo:"Q1 ≠ {{no}} 且 Q2 ≠ {{noQ2}}",q1q2Yes:"Q1 = {{yes}} 且 Q2 = {{yesQ2}}",q1NotNegatives:"Q1 不在 {{negatives}}",q1NotNegativesAndQ2NotNegatives:"Q1 不在 {{q1Negatives}} 且 Q2 不在 {{q2Negatives}}"},q1={select:"请选择",input:"请输入",number:"请输入数值",date:"请选择日期",companyName:"请输入公司正式注册名称",declarationScope:"请选择",scopeDescription:"请描述自定义申报范围",customMineral:"矿种{{index}}",companyId:"DUNS, VAT, 组织机构代码等",companyAuthId:"授权识别信息",address:"公司地址",contactName:"请输入联系人姓名",contactEmail:"example@company.com",contactPhone:"+86 xxx xxxx xxxx",authorizerName:"请输入授权人姓名",authorizerTitle:"职务名称",authorizerEmail:"example@company.com",authorizerPhone:"+86 xxx xxxx xxxx",authorizationDate:"DD-MMM-YYYY",smelterIdInput:"例如:CID001105",smelterLookup:"搜索冶炼厂…",smelterName:"冶炼厂名称",smelterNameRequired:"必填:冶炼厂名称",smelterNameOptional:"可填写冶炼厂名称",smelterCountry:"选择国家/地区",smelterCountryRequired:"必填:国家/地区",smelterIdentification:"CID…",smelterSourceId:"Source ID",smelterStreet:"街道",smelterCity:"城市",smelterState:"州/省",smelterContactName:"联系人",smelterContactEmail:"email@…",smelterNextSteps:"后续步骤",smelterMineName:"矿井名称",smelterMineCountry:"矿井国家",mineralsScopeReason:"请填写纳入原因",smelterComments:"注释",comments:"注释",smelterCombinedMetal:"请选择",smelterCombinedSmelter:"合并冶炼厂",mineSmelterSelect:"选择冶炼厂",mineSmelterInput:"冶炼厂名称",mineName:"矿厂名称",mineId:"CID…",mineSourceId:"Source ID",mineCountry:"选择国家/地区",mineStreet:"街道",mineCity:"城市",mineState:"州/省",mineContactName:"联系人",mineContactEmail:"email@…",mineNextSteps:"后续步骤",mineComments:"注释"},A1={productNumber:"PRD-xxxx-xxx",productName:"产品名称",requesterNumber:"回复方产品编号",requesterName:"回复方产品名称",comments:"注释"},L1={companyName:"使用正式注册名称,不得使用缩写。",declarationScope:"A=公司级 | B=产品级(需填Product List) | C=自定义",contactEmail:'无邮箱可填 "not available"。',authorizerName:'不可填 "same" 等占位。',authorizationDate:"格式: DD-MMM-YYYY (如 01-Jan-2026)",smelterNotYetIdentifiedCountry:"尚未识别:国家保持为空即可。",mineralsMaxCount:"最多选择 {{max}} 种矿产",mineralsMaxCountReached:"已达到矿产选择上限"},E1={metal:"金属",smelterLookup:"冶炼厂查询",smelterName:"冶炼厂名称",smelterId:"冶炼厂识别号码输入列",smelterIdentification:"冶炼厂识别",sourceId:"识别号来源",country:"国家",street:"街道",city:"城市",stateProvince:"州/省",contactName:"联系人",contactEmail:"联系人邮箱",proposedNextSteps:"建议的后续步骤",mineCountry:"矿场所在国家或地区",mineSmelterName:"从该矿厂采购的冶炼厂名称",mineSourceId:"冶炼厂出处识别号",mineId:"矿场识别号",mineIdSource:"矿场识别来源",recycledScrap:"100% 回收/报废料?",combinedMetal:"合并金属",combinedSmelter:"合并冶炼厂",mineName:"矿场名称",province:"省/州",mineralsScopeReason:"纳入原因",mineralsScopeReasonPrt:"纳入 PRT 的原因",mineralsScopeReasonAmrt:"纳入 AMRT 的原因",comments:"备注",requesterNumber:"请求方编号",requesterName:"请求方名称",noData:"暂无数据"},P1={addRow:"新增一行",pickExternal:"从外部选择",chooseSmelter:"选择冶炼厂",edit:"修改",prev:"上一页",next:"下一页",submit:"提交",close:"关闭",setAllTo:"全部设为",sameAsContact:"同联系人",batchDelete:"批量删除",cancelSelection:"取消选择"},D1={batchDelete:"确认批量删除",batchDeleteContent:"确定要删除选中的 {{count}} 条记录吗?此操作不可撤销。"},$1={selected:"已选 {{count}} 项"},O1={yes:"是",no:"否",unknown:"未知",notApplicable:"不适用",notApplicableForDeclaration:"本申报不适用",notDeclaring:"不申报",none:"完全没有",didNotSurvey:"未调查",drcOnly:"仅刚果(金)",drcOrAdjoiningOnly:"仅刚果(金)或毗邻国家",indiaMadagascarOnly:"仅印度和/或马达加斯加",percentage100:"100%",percentageOne:"1",percentageAbove90:"超过 90%",percentageAbove75:"超过 75%",percentageAbove50:"超过 50%",percentage50OrLess:"50% 或以下",percentageLess25:"少于 25%",yesCrtTemplate:"是,CRT",yesOtherFormat:"是,使用其他格式(请描述)",yesOtherFormatTitle:"是,使用其他格式(请描述)",yesIpc1755:"是,符合 IPC1755(如 CMRT)",yesIpc1755Emrt:"是,符合 IPC1755(如 EMRT)",yesWhenMoreValidated:"是,当更多处理商通过验证时",yesWithSec:"是,向 SEC 报告",yesWithEu:"是,向欧盟报告",yesWithSecAndEu:"是,向 SEC 与欧盟报告"},F1={tantalum:"钽",tin:"锡",gold:"金",tungsten:"钨",cobalt:"钴",mica:"云母",copper:"铜",graphite:"石墨",lithium:"锂",nickel:"镍",silver:"银",aluminum:"铝",antimony:"锑",chromium:"铬",germanium:"锗",iridium:"铱",lime:"石灰",magnesium:"镁",manganese:"锰",palladium:"钯",phosphorus:"磷",platinum:"铂",rareEarthElements:"稀土元素",rhodium:"铑",ruthenium:"钌",silicon:"硅",sodaAsh:"纯碱",titanium:"钛",vanadium:"钒",zinc:"锌",zirconium:"锆",other:"其他"},z1={cmrt:{q1:"1) 是否在产品或生产流程中有意添加或使用任何 3TG?",q2:"2) 是否有任何 3TG 仍存在于产品中?",q3:"3) 贵公司供应链中的冶炼厂是否从所指明的国家采购 3TG?(有关术语“SEC”,请参见定义选项卡)",q4:"4) 贵公司供应链中是否有冶炼厂从受冲突影响和高风险地区采购 3TG?",q5:"5) 是否 100% 的 3TG(因产品功能或生产而必须使用)来自于回收料或报废料?",q6:"6) 已对贵公司供应链调查提供答复的相关供应商百分比是多少?",q7:"7) 您是否识别出为贵公司供应链供应 3TG 的所有冶炼厂?",q8:"8) 贵公司收到的所有适用冶炼厂信息是否已在此申报中报告?"},emrt:{q1:"1) 是否在产品或生产流程中有意添加或使用任何指定矿产?",q2:"2) 产品中是否还存有任何指定矿产?",q3:"3) 贵公司供应链中是否有冶炼厂或加工厂从受冲突影响和高风险地区采购指定矿产?(《经合组织尽职调查指南》,参见定义选项卡)",q4:"4) 是否 100% 的指定矿产来自回收料或报废料资源?",q5:"5) 百分之多少的相关供应商已对贵公司的供应链调查提供答复?",q6:"6) 您是否识别出为贵公司的供应链供应指定矿产的所有冶炼厂或加工厂?",q7:"7) 贵公司收到的所有适用冶炼厂或加工厂信息是否已在此申报中报告?",v1:{q1:"1) 是否在产品或生产流程中有意添加或使用任何钴或天然云母?",q2:"2) 产品中是否还存有任何钴或天然云母?",q3:"3) 贵公司供应链中是否有冶炼厂或加工厂从受冲突影响和高风险地区采购钴或天然云母?(《经合组织尽职调查指南》,参见定义选项卡)",q4:"4) 是否 100% 的钴来自回收料或报废料资源?",q5:"5) 百分之多少的相关供应商已对贵公司的供应链调查提供答复?",q6:"6) 您是否识别出为贵公司的供应链供应钴或天然云母的所有冶炼厂或加工厂?",q7:"7) 贵公司收到的所有适用冶炼厂或加工厂信息是否已在此申报中报告?"}},crt:{q1:"1) 是否在产品或生产流程中有意添加或使用任何钴?",q2:"2) 贵公司供应链中的冶炼厂是否从受冲突影响和高风险地区采购钴?(《经合组织尽职调查指南》,参见定义选项卡)",q3:"3) 是否 100% 的钴来自回收料或报废料资源?",q4:"4) 已对贵公司供应链调查提供答复的相关供应商百分比是多少?",q5:"5) 您是否识别出为贵公司供应链供应钴的所有冶炼厂?",q6:"6) 贵公司收到的所有适用冶炼厂信息是否已在此申报中报告?"},amrt:{q1:"1) 是否在产品或生产流程中有意添加或使用以下矿产或金属?",q2:"2) 已对贵公司供应链调查提供答复的相关供应商百分比是多少?"}},j1={cmrt:{a:"A. 贵公司是否已制定负责任矿产采购政策?",b:"B. 贵公司的负责任矿产采购政策是否公开发布于贵公司网页上?(备注 - 如果是,请在注释字段中注明 URL。)",b_comment:"请填写网址",c:"C. 您是否要求您的直接供应商从其尽职调查实践已被被独立第三方审核机构验证过的冶炼厂采购 3TG?",d:"D. 贵公司是否已实施负责任矿产采购的尽职调查措施?",e:"E. 贵公司是否开展了相关供应商的冲突矿产调查?",e_comment:"请描述其他格式",f:"F. 贵公司是否根据公司期望来审查供应商提交的尽职调查信息?",g:"G. 贵公司的验证程序是否包括纠正措施管理?",h:"H. 贵公司是否需要提交年度冲突矿产披露?"},emrt:{a:"A. 贵公司是否制定了可公开查阅的矿产采购政策?",b:"B. 贵公司的负责任矿产采购政策是否公开发布于贵公司网页上?(备注 - 如果是,请在注释字段中注明 URL。)",b_comment:"请填写网址",c:"C. 贵公司是否要求贵公司的直接供应商从尽职调查实践经独立第三方审计计划验证过的冶炼厂采购指定矿产?",d:"D. 贵公司是否已实施负责任矿产采购的尽职调查措施?",e:"E. 贵公司是否针对相关供应商进行指定矿产供应链调查?",e_comment:"请描述其他格式",f:"F. 贵公司是否会根据预期审核从供应商处收到的尽职调查信息?",g:"G. 贵公司的审核流程是否包括纠错行动管理?",v1:{c:"C. 贵公司是否要求贵公司的直接供应商从尽职调查实践经独立第三方审计计划验证过的冶炼厂采购钴或从拥有相同资质的加工厂采购天然云母?",e:"E. 贵公司是否针对相关供应商进行钴和/或天然云母供应链调查?"},v11:{a:"A. 贵公司是否制定了可公开查阅的钴采购政策?",b:"B. 贵公司的政策是否至少涵盖《经合组织尽职调查指南》附录二《示范政策》中的所有风险以及童工问题的最恶劣形式?",c:"C. 贵公司是否要求贵公司的直接供应商从尽职调查实践经独立第三方审计计划验证过的冶炼厂采购钴或从拥有相同资质的加工厂采购天然云母?",d:"D. 贵公司是否要求供应商的尽职调查实践至少涵盖《经合组织尽职调查指南》附录二《示范政策》中的所有风险以及童工问题的最恶劣形式?",e:"E. 贵公司是否针对相关供应商进行钴和/或天然云母供应链调查?",f:"F. 贵公司是否会根据预期审核从供应商处收到的尽职调查信息?",g:"G. 贵公司的审核流程是否包括纠错行动管理?"}},crt:{a:"A. 贵公司是否制定了可公开查阅的钴采购政策?",a_comment:"请填写网址",b:"B. 贵公司的政策是否至少涵盖《经合组织尽职调查指南》附录二《示范政策》中的所有风险以及童工问题的最恶劣形式?",c:"C. 贵公司是否针对上述指明申报范围中的钴实施了尽职调查措施?",d:"D. 贵公司是否要求供应商按照《经合组织尽职调查指南》针对钴供应链实施尽职调查?",e:"E. 贵公司是否要求贵公司的直接供应商从尽职调查实践经独立第三方审计计划验证过的冶炼厂采购钴?",f:"F. 贵公司是否要求供应商的尽职调查实践至少涵盖《经合组织尽职调查指南》附录二《示范政策》中的所有风险以及童工问题的最恶劣形式?",g:"G. 贵公司是否针对相关供应商进行钴供应链调查?",g_comment:"请描述其他格式",h:"H. 贵公司是否会根据预期审核从供应商处收到的尽职调查信息?",i:"I. 贵公司的审核流程是否包括纠错行动管理?"}},B1={cmrt:{respondentNumber:"回复方的产品编号",respondentName:"回复方的产品名称",manufacturerNumber:"制造商的产品序号",manufacturerName:"制造商的产品名称",comment:"注释"},emrt:{respondentNumber:"回复方的产品编号",respondentName:"回复方的产品名称",comment:"注释"},crt:{manufacturerNumber:"制造商的产品序号",manufacturerName:"制造商的产品名称",comment:"注释"},amrt:{manufacturerNumber:"制造商的产品序号",manufacturerName:"制造商的产品名称",comment:"注释"}},K1={companyName:"公司名称",reportingScope:"报告范围",scopeDescription:"范围描述",companyId:"公司唯一标识",companyAuthId:"公司唯一授权ID",address:"地址",contactName:"联系人姓名",contactEmail:"联系人邮箱",contactPhone:"联系人电话",authorizerName:"授权人姓名",authorizerTitle:"授权人职务",authorizerEmail:"授权人邮箱",authorizerPhone:"授权人电话",authorizationDate:"完成日期"},Q1={productListRequired:"当前范围:需要填写 Product List。",productListNotRequired:"当前范围:不需要填写 Product List。",productListUnknown:"请选择 Declaration Scope 以确定是否需要 Product List。",smelterListRequired:"当前答案要求填写 Smelter List。",smelterListRequiredWithMetals:"需要填写 Smelter List 的矿种:{{metals}}。",smelterListPending:"请先完成 {{questions}}({{metals}})以判断是否需要 Smelter List。",smelterListNotRequired:"当前答案不要求填写 Smelter List。",smelterListUnknown:"请先完成矿产范围与 Q1/Q2 以判断是否需要 Smelter List。",mineListAvailable:"当前版本支持 Mine List。",mineListNotAvailable:"当前版本不支持 Mine List。"},U1={subtitle:"系统自动检测填写完整性和合规性。",progressTitle:"总体完成度",progressDetail:"{{done}}/{{total}} 必填已完成",errorsTitle:"错误(必须修正)",errorBadge:"{{count}} 项",groupCount:"{{count}} 项",groupToggleShow:"展开",groupToggleHide:"收起",passedTitle:"通过",passedBadge:"{{count}} 项",passedSummary:"已通过 {{count}} 项必填检查",passedToggleShow:"展开查看",passedToggleHide:"收起",passedEmpty:"暂无通过项",passedProductList:"已填写产品清单",passedProductRow:"产品清单第 {{index}} 行已填写产品编号",passedSmelterForMineral:"{{mineral}} 冶炼厂记录已填写",sectionComplete:"{{section}} 必填项已完成",validEmail:"邮箱有效:{{field}}",submit:"提交",submitTitle:"提交前检查",submitCompletion:"完成度",submitErrors:"错误",submitAllPass:"全部通过",submitFixTop:"待修复(前 5 条)",submitContinue:"继续填写",submitFix:"去修复",andMoreErrors:"还有 {{count}} 条错误…",globalErrorBar:"⚠️ 还有 {{count}} 个必填项未完成,点击查看。",globalSuccessBar:"✅ 所有必填项已完成。",globalErrorAction:"前往 Checker",sessionSaved:"数据已保存到会话",sessionSavedHint:"您的数据已临时保存在浏览器会话中。关闭页面前请导出文件以永久保存。",groups:{declaration:"申报信息",companyInfo:"公司信息",mineralsScope:"矿产申报范围",questionMatrix:"根据上述申报范围,回答以下 1 至 8 题",companyQuestions:"从公司层面,回答以下问题",smelter:"冶炼厂清单",mine:"矿厂清单",product:"产品清单",other:"其他"},error:"错误",pass:"通过",noErrors:"未发现错误",totalErrors:"发现 {{count}} 个错误",goToField:"定位字段",requiredField:"{{field}} 为必填项。",requiredCompanyQuestionComment:"需要填写备注:{{field}}。",requiredProductList:"申报范围为 B 时必须填写产品列表。",requiredSmelterList:"{{field}} 需要填写冶炼厂记录。",invalidEmail:"邮箱格式不正确:{{field}}。"},G1={subtitle:"基于注册中心元数据的版本概览。",templateName:"模板名称",currentVersion:"当前版本",defaultVersion:"默认版本",totalVersions:"版本总数",availableVersions:"可用版本",currentTag:"当前",defaultTag:"默认"},Y1=JSON.parse('{"cmrt":{"6.5":{"instructions":["RMI 网址:(www.responsiblemineralsinitiative.org) 培训和指导、模板、负责任矿物审验流程合规冶炼厂列表。","介绍","此冲突矿产报告模板(CMRT 模板)是由负责任矿物计划 (RMI) 创建的免费标准报告模板。该模板促进了通过关于矿产原产国、所用冶炼厂和精炼厂的供应链来进行信息传输,并且支持法律合规性*。该模板还促进识别新的冶炼厂和精炼厂,以通过负责任矿物审验流程,对这些厂家进行潜在审核**。\\n\\nCMRT 旨在让下游企业披露其供应链有关的信息(准确来讲,不包括冶炼厂)。如果贵公司是 3TG 冶炼厂或精炼厂,根据 RMAP 协议,我们建议您在冶炼厂列表选项卡中输入贵公司的名称。\\n\\n填写表格时,单元格条目不应以“=”或“#”开头。","* 在 2010年,关注来源于刚果民主共和国 (DRC) 或毗邻国家或地区“冲突矿产”的《多德-弗兰克华尔街金融改革与消费者保护法》(U.S. Dodd-Frank Wall Street Reform and Consumer Protection Act) 正式通过。SEC 公布了最终规则,要求所有美国上市公司披露冲突矿产来源(有关规则,请访问 http://www.sec.gov/rules/final/2012/34-67716.pdf)。该规则参考了“经济合作与发展组织关于来自冲突影响和高风险区域之矿石的负责任供应链尽职调查指南”(http://www.oecd.org/dataoecd/62/30/46740847.pdf),明确了供应商如何制定政策、尽职框架和管理体系。\\n** 有关信息,请参见“负责任矿物计划”(www.responsiblemineralsinitiative.org)。\\n2017 年,欧洲议会和理事会 2017 年 5 月 17 日第 2017/821 号条例(欧盟)通过,该条例规定了进口源自受\\n冲突影响和高风险地区的锡、钽和钨及其矿石以及黄金的欧盟进口商的供应链尽职调查义务(请参见 https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=OJ:L:2017:130:FULL&from=EN)","公司信息的填写说明(第 8 至 22 行)。\\n请仅以英文作答","注:带星号 (*) 的字段为必填。","1. 插入贵公司的法定名称。请勿使用缩写。在此字段中,您可以选择添加其他商业名称、营业名称等。","2. 选择贵公司的申报范围。范围选项为:\\n\\nA. 全公司\\nB. 产品(或产品列表)\\nC. 用户自定义 \\n\\n对于“全公司”,申报涵盖公司产品或母公司生产的产品物质整体。如果用户在公司级别中报告冲突矿产数据,他们将报告关于其生产的所有产品的冲突矿产数据。\\n\\n如果选择范围为“产品(或产品列表)”,将显示产品列表的工作表选项卡。如果选择了此范围,则必须在“产品列表”工作表的 B 列中列出此申报范围涵盖的产品回复方产品序号。可选择是否在“产品列表”工作表的 C 列中列出回复方的产品名称。\\n\\n如果选择范围为“用户自定义”,用户必须描述 3TG 披露适用的范围。此类范围应由供应商在文本字段内予以定义,并确保客户或文档接收人可以清楚理解。例如,公司可提供链接来说明信息。\\n\\n此为必填字段。","3. 插入贵公司的唯一识别序号或编号(DUNS 号码、VAT 号码、客户特定识别码等)","4. 插入唯一识别序号或代码出处(例如“DUNS”、“VAT”、“客户”等)","5. 插入贵公司的完整地址(街道、城市、州、国家或地区、邮政编码)。此为必填字段。","6. 插入对此申报信息内容负责的联系人姓名。此为必填字段。","7. 插入联系人的电子邮件地址。如果没有电子邮件地址,请说明“无”或“不适用”。如留空此字段,会导致此表格出错。此为必填字段。","8. 插入联系人的电话号码。此为必填字段。","9. 插入负责申报信息内容的人员姓名。授权人可能与联系人不同。请勿填写“相同”或相似信息,而需提供授权人的姓名。此为必填字段。","10. 输入授权人的职位。 此为选填字段。","11. 输入授权人的电子邮件地址。如果没有电子邮件地址,请声明“无”或“不适用”。如留空此字段,会导致表格出错。此为必填字段。","12. 插入授权人的电话号码。此字段自由选择填写。","13. 请使用“日-月-年”的格式输入申报日期。此为必填字段。","14. 例如,用户应将文件名保存为“公司名-日期.xls”(日期格式为年-月-日)。","八道尽职调查问题的填写指南(第 24 至 71 行)。\\n请仅以英文作答","八道题明确了每种金属的用途、原产地和采购识别信息。这些问题旨在收集关于公司产品中 3TG 使用情况的信息,以确定法规适用情况。答案应与公司信息部分所选择的“申报范围”相对应。此部分中的答案可用于确定 3TG 报告的使用情况和完整性。","对于八道必答题,请使用下拉菜单选项,为每种金属提供答复。所有 3TG 都必须完成此部分中的问题。如果给定金属之问题 1和 2 的回答为肯定,则须完成该金属的后续问题,并应完成\\n关于公司总体尽职调查项目的后续尽职调查问题(A 至H)。","1. 这是两个问题中的第一道问题,其回答用来确定 3TG 是否在冲突矿产报告要求的范围内。此问题以 SEC 在关于确定 3TG 是否对于产品“功能或生产有必要”的最终规则之准则为准。SEC 准则以此假设为依据:如果 3TG 对于产品的广泛预期功能、用法或用途没有必要,则产品供应链中的公司不会有意添加 3TG 到该产品或产品的任何子组件中。同样地,准则假设 3TG 对于产品的生产没有必要,除非其被有意添加到该商品的生产流程中。此问题的答复用于排除任何痕量级杂质或自然生成的副产品,如钢中的锡。必须为每个 3TG 回答此问题。\\n\\n此问题询问是否有任何冲突矿产在贵公司生产或外包生产的产品中用作原材料、组件或添加物(包括原材料和组件)。原材料、组件、添加物、磨具和切削工具中的杂质不在此调查范围。\\n\\n必须为每个 3TG 回答此问题。此问题的有效回答为“是”或“否”。此问题必须作答。","如果回答为“否”,某些公司需要进一步求证,请在注释栏中详细说明。","2. 对于对问题 1 回答“是”的每个情况,必须为每个 3GT 回答此问题。这是两个问题中的第二个问题,其答复用来确定 3TG 是否在 SEC 关于确定 3TG 是否对产品功能或生产有必要的最终规则中所述的冲突矿产报告要求范围内。此问题取决于问题和对问题 1 的答复。此问题旨在确定在产品生产过程中有意添加或纳入的 3TG(若一定数量的 3TG 仍保留在成品中)。这包括可能并非要成为成品中的一部分以及可能并非对产品的功能有必要,而只是作为生产过程的残留物存在的 3TG。在很多情况下,制造商可能已在生产过程中试图除去或促进消耗 3TG,但还是有一定数量的 3TG 残留。若在生产过程中添加的 3TG 被完全移除,因此在该过程完成后,将没有 3TG 残留,对此问题的答复将是否。\\n\\n必须为每个 3TG 回答此问题。此问题的有效回答为“是”或“否”。此问题必须作答。","3. 这是要申报存在于一种产品或多种产品中的 3TG 之任何部分的源产地是刚果民主共和国或其毗邻国家或地区(请指明)。如果供应链中的任何冶炼厂从所指明的国家或地区进行采购,则对此问题的回答应为“是”,即使该等冶炼厂位于 RMI 合规冶炼厂和精炼厂列表中。有关更多信息,请参见 RMI 的冲突矿产尽职调查指南:http://www.responsiblemineralsinitiative.org/additional-training-and-resources/guidance-documents/。\\n\\n以“是”、“否”或“未知”来回答此问题。如果回答“是”,则建议在注释部分提供证明。\\n\\n如果问题 1 和问题 2 就特定金属的回答为“是”,必须为该金属回答此问题。","4. 这是要申报一种产品或多种产品中 3TG 的任何部分的原产地是受冲突影响和高风险地区 (CAHRA)。\\n\\n如果供应链中的任何冶炼厂从目标国家或 CAHRA 进行采购,则对此问题的答复应为“是”,即使该等冶炼厂被列入 RMI 合规冶炼厂和精炼厂名单。有关更多信息,请在此处查看 RMI 的冲突矿产尽职调查指南:http://www.responsiblemineralsinitiative.org/training-and-resources/publications-and-guidance/。\\n\\n以“是”、“否”或“不知道”来答复此问题。如果回答“是”,则建议在注释部分提供证明。如果对问题 1 和 2 就特定金属的答复为“是”,必须针对该金属回答此问题。","5. 此申报确定存在于产品中且对于该产品的功能有必要的 3TG 是否来自回收料或报废料。\\n\\n请以“是”、“否”或“未知”来回答此问题。如果问题 1 和问题 2 就特定金属的回答为“是”,必须为该金属回答此问题。\\n\\n回答“是”表示 100% 的 3TG 来自回收料或报废料。回答“否”表示部分 3TG 不是来自回收料或报废料。回答“未知”表示使用者不知道 100% 的 3TG 是否来自回收料或报废料。","6. 此问题是要确定公司是否有理由相信已从提供本申报范围内产品中含有 3TG 的所有直接供应商得到冲突矿产披露。本问题允许的回答包括:\\n\\n­ 100%\\n­ 大于 90%\\n­ 大于 75%\\n­ 大于 50%\\n- 50% 或更少\\n- 完全没有\\n\\n\\n如果问题 1 和问题 2 就特定金属的回答为“是”,则必须为该金属回答此问题。","7. 此问题是要核实供应商是否有理由相信他们已识别出提供此申报涵盖之产品中 3TG 的所有冶炼厂。本问题的回答包括“是”或“否”,并请就情况说明,例如冶炼厂列表。\\n\\n如果问题 1 和问题 2 就特定金属的答复为“是”,必须为该金属回答此问题。","8. 此问题是要核实经确定为提供此申报范围涵盖之产品中含有任何 3TG 的所有冶炼厂是否已在此申报中报告。本问题的回答包括有“是”或“否”,并请就情况说明,例如冶炼厂列表。如果问题 1 和问题 2 就特定金属的答复为“是”,必须为该金属回答此问题。","在注释部分提供您的意见,以进一步说明您的回答。","完成问题 A 至 H 的说明(第 75 至 89 行)。如果问题 1 和 2 就任何金属的回答为“是”,必须回答问题 A 至 H。\\n请仅以英文作答","根据经济合作与发展组织 (OECD) 针对“责任供应链中来自受冲突影响地区及高风险地区的矿产”所编写的尽职调查指南(OECD指南),“尽职调查”的定义是“通过持续、积极、有效的方法,确保所有企业尊重人权及不做有助于冲突活动的行为。“尽职调查”必须成为公司无冲突采购策略的一个组成部份。所列问题 A 至问题 H 的目的是对贵公司不使用冲突矿产采购策略中的尽职调查工作进行评估。对这部份问题的回答将体现出贵公司执行尽职调查工作的范围,并不应仅限于公司资料部分里所选择的”申报范围”。","A. 这是披露公司是否具有负责任矿产采购政策的申报。请以“是”或“否”来回答此问题。须在问题注释字段提供说明。\\n\\n此问题必须作答。","B. 这是披露公司的负责任矿产采购政策是否可在公司网站上获取的申报。请以“是”或“否”来回答此问题。如果回答“是”,用户应当在问题注释字段指出 URL。\\n\\n此问题必须作答。","C. 此申报是要确定公司要求直接供应商从经过验证的无冲突矿产的冶炼厂处采购 3TG。请以“是”或“否”来回答此问题。须在问题注释字段提供说明。\\n\\n此问题必须作答。","D. 请答复“是”或“否”,以披露贵公司是否已实施负责任矿产采购尽职调查措施。该申报并非旨在提供公司的尽职调查措施详情,而仅说明公司已实施了尽职调查措施。可接受尽职调查措施的具体情况,应当由请求者和供应商决定。\\n\\n尽职调查措施的示例可能包括:向供应商传达贵公司对负责任矿产供应链的预期以及将该等预期纳入到合同中(如可能);确定和评估供应链中的风险;设计和实施战略以应对确定的风险;核实贵公司的直接供应商符合不使用刚果民主共和国涉及冲突的冲突矿产的政策等。这些尽职调查措施的示例与国际公认的经济合作与发展组织指南涵盖的指导方针保持一致性。\\n\\n此问题必须作答。","E. 此问题是要披露公司是否要求供应商填写冲突矿产申报。接受的回答载列如下,在部分情况中,可能需要进一步解释,即提供用于收集信息的格式。如果回答为“是”,请使用其他格式,用户须在问题注释字段提供说明。本问题允许的回答包括:\\n\\n- 是,符合 IPC-1755 [例如 CMRT]\\n- 是,使用其他格式(请描述)\\n- 否\\n\\n此问题必须作答。","F. 请答复“是”或“否”。在注释部分,贵公司可提供贵公司所采用方法的其他信息。示例:\\n\\n “第三方审核”- 由独立第三方进行的供应商现场审核。\\n “仅审核文件编制情况”- 对供应商提交的记录以及由独立第三方或贵公司工作人员进行的文件编制予以审核。\\n “内部审核”- 由贵公司工作人员进行的供应商现场审核。\\n\\n此问题必须作答。","G. 此问题是要披露公司是否受 SEC 规则规限。请以“是”或“否”来回答此问题。须在问题注释字段提供说明。此问题必须作答。要了解更多信息,请参见 www.sec.gov。","H. 此问题是要披露公司是否受 SEC 规则、欧盟条例或上述两者的规限。请以“是,受 SEC 规则规限”、“是,受欧盟条例规限”、“是,受 SEC 规则和欧盟条例规限”或“否”来回答此问题。须在问题注释字段提供说明。此问题必须作答。要了解关于 SEC 规则的更多信息,请参见 www.sec.gov。\\n要了解关于欧盟条例的更多信息,请参见 https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX:32017R0821&from=EN。","冶炼厂列表选项卡的填写说明。请仅以英文作答","注:带星号 (*) 列表示必填字段。","此模板允许使用冶炼厂查找来识别具体的冶炼厂。必须按从左到右的顺序填写 B 列和 C 列,以使用冶炼厂查找功能。\\n对于各金属/冶炼厂/国家或地区组合,应使用分割线。","1. 冶炼厂识别输入列 - 如果您知道冶炼厂识别号码,请在 A 列输入号码(B、C、E、F、G、I 和 J 列将自动填入)。A 列不会自动填入。","2. 金属 (*) - 在下拉菜单中,选择正在输入信息的冶炼厂所提炼的金属。 此为必填字段。","3. 冶炼厂查找 (*) - 从下拉菜单中选择。列表列出了模板发布时已知的冶炼厂。如果冶炼厂不在列表中,请选择“冶炼厂未列出”。此时,您可以将该冶炼厂的名称输入 D 列。如果您不知道冶炼厂的名称或地点,请选择“冶炼厂尚未被识别”。如选择此选项,D 和 E 列将会自动填入“未知”。此为必填字段。","4. 冶炼厂名称 (1) - 如果选择 C 列中的冶炼厂名称,请填写冶炼厂的名称。如果选择 C 列中的“冶炼厂未列出”,此字段将自动填入。此为必填字段。","5. 冶炼厂所在国家或地区 (*) - 如果选择 C 列中的冶炼厂名称,此字段会自动填入。如果选择 C 列中的“冶炼厂未列出”,请使用下拉菜单,选择冶炼厂所在国家或地区。此为必填字段。","6. 冶炼厂识别 - 依据冶炼厂和精炼厂识别系统每一冶炼厂或精炼厂均有一独一无二的标识。相信会有一间冶炼厂或一间精炼厂存在多个名称的情况出现。 因此,唯一的冶炼厂标识能将其他名称和别名进行统一。","7. 冶炼厂识别号码 - F 列包括所有的冶炼厂识别号码。 如果在 C 列中使用下拉框选择冶炼厂名称,此字段会自动填入。","8. 冶炼厂所在街道 - 提供冶炼厂所在街道的名称。此为选填字段。","9. 冶炼厂所在城市 - 提供冶炼厂所在城市的名称。此为选填字段。","10. 冶炼厂地点:州/省(如适用)- 提供冶炼厂所在的州/省。此为选填字段。","11. 冶炼厂联系人名称 - 冲突矿产报告模板 (CMRT) 在所要求到的申报人的供应链中各间公司统一使用, 确保各公司都符合经济合作与发展组织来自受冲突影响和高风险区域的矿石的负责任供应链的尽职调查指南的要求,并符合美国证劵交易所就冲突矿产问题公布的最终规则。\\n\\n如果在统一使用此报告模板中,所在国家或地区有保护个人信息的法律法规,填写个人联系信息会有可能触犯法律法规,则建议申报公司在填写“冶炼厂联系人姓名”和“冶炼厂联系人电子邮件”列时,先确保联系人本人同意公开其联系信息。 。\\n\\n如果申报人已获得公开联系信息的授权信息,请输入与之合作的冶炼厂之联系人姓名。","12. 冶炼厂联系人电子邮件 - 填写被确定为冶炼厂联系人的电子邮件。例如: John.Smith@SmelterXXX.com。填写此字段栏前,请阅读冶炼厂联系人姓名填写指引。","13. 矿场名称 - 此字段可让公司为冶炼厂正在使用的实际矿场取名。如果已知实际矿场的名称,请输入该名称。如果冶炼厂的所有原料均来自回收料或报废料资源,则输入“回收料”或“报废料”以取代矿场名称,并在 P 列回答“是”。\\n\\n“根据 RMI 确认 RCOI”可能是该问题可接受的回答之一。","14. 矿场地点(国家或地区)- 无限制文本字段,公司可在此注明冶炼厂正在使用的矿场地点。请输入矿场所在国家或地区。如果原产国未知,则输入“未知”。如果冶炼厂的所有原料均来自回收料或报废料资源,则输入“回收料”或“报废料”以取代原产国。此为选填字段。\\n\\n“根据 RMI 确认 RCOI”可能是该问题可以接受的回答之一。","15. 表明冶炼厂是否仅从回收料或报废料资源中获取冶炼过程的来料。此为选答问题。本问题允许的回答包括:\\n\\n- 是\\n- 否\\n- 未知","16. 注释 - 无格式限制的文字栏,可输入有关冶炼厂的任何意见。例如:冶炼厂正在被 YYY 公司收购","检查工作表用于确认是否所有此模板中需要的信息均已提供、是否实时更新和是否经得起任何在填申报时进行查阅。 此工作表用于确认申报完毕。\\n\\n用此表检查是否已填妥所有字段(已填字段将高亮显示为绿色)。如果不是,请检查显示红色的字段,并阅读 C 列中的备注信息,并按指示操作。填表人可用 D 列中的 URL 直接进入要填写的字段。","条款及细则","负责任矿物审验流程(“流程”)、合规冶炼厂列表(“列表”)及报告模板和工具表,包括但不限于冲突矿产报告模板(统称为“工具”),所提供的一切信息仅供参考之用,并以其上载日期为准。在列表或工具表中,如有任何不准确或遗漏的信息,均非特拉华州非股份公司责任商业联盟 (RBA) 的责任所在。是否使用和/或如何使用列表上的全部资料或部分资料或使用任何工具,用户拥有唯一及绝对的决定权​​。使用列表或任何工具之前,请向自己的法律顾问征询意见。列表或工具中没有任何一部份会构成法律咨询。使用列表或任何工具均属自愿。","RBA 皆不会为名单或任何工具作任何的申述或保证。列表和工具依据“原样”和“现有”来提供。RBA 特此声明,不做任何性质的保证、明示、暗示或其他方式,或说明贸易或关税,包括但不限于任何隐含的适销性、非侵权性、质量、标题、为某一特定用途的适用性而作完整性或准确性的保证。","根据相关法律所允许的最大限度,RBA 声明拒绝任何损失、费用或任何性质的损害之责任,包括但不限于因用户使用名单或工具表而造成特殊、偶然、惩罚性、直接、间接的或后果性损害或失去收入或利润,无论是以侵权、合同、章程或其他方式造成的损害,即使他们已被告知有这种损害的可能性。","鉴于对列表和/或工具表单的使用,用户在此同意:a) 让 RBA 及其相关管理人员、董事、代理、员工、志愿者、代表、承包商、继承人、指定人解除并永远免除责任,而不会因使用列表或任何工具导致或产生的任何及全部索赔、行动、损失、诉讼、损害、判决、征费和处决而受损,这包括用户有过或曾经可以、应当或者可能拥有或声称拥有对 RBA 及其相关管理人员、董事、代理、员工、志愿者、代表、承包商、继承人、指定人的索赔;b) 保障和捍卫 RBA 及其相关管理人员、董事、代理、员工、志愿者、代表、承包商、继承人、指定人的权利,确保其不会因用户使用列表或任何工具而导致或产生的任何及全部索赔、行动、损失、诉讼、损害、判决、征费和处决而受损。","如果此条款及细则的某个条款部分在法律下无效或不可执行,被视为无效的部分应仅限于该无效或不能强制执行的部份,而不以任何方式影响到条款及细则的其余条款。","通过登入和使用该列表或任何工具,并经过考量,该用户同意上述条款。"],"smelterList":[],"productList":[],"definitions":[{"term":"3TG 是钽 (Tantalum)、锡 (Tin)、钨 (Tungsten)、金 (Gold) 的缩写","definition":"钽、锡、钨、金"},{"term":"授权人","definition":"此字段定义负责申报内容的人员。授权人可能与联络人不同。请勿填写“相同”或相似信息,需提供授权人的姓名。"},{"term":"受冲突影响和高风险地区 (CAHRA)","definition":"受冲突影响和高风险的地区是处于武装冲突状态的地区,脆弱的冲突后地区以及治理和安全薄弱或根本不存在的地区,例如失败的国家,广泛而系统地违反国际法的地区,包括侵犯人权行为。"},{"term":"冲突矿产","definition":"根据 2010 年通过的《多德-弗兰克华尔街金融改革与消费者保护法》(Dodd-Frank Wall Street Reform and Consumer Protection Act) 的法律定义,第 1502(e)(4)条:“冲突矿物”是指 (A) 钶-钽(钶钽)、锡石、金、黑钨或其衍生物质;或 (B) 任何由美国国务卿定性为引起刚果民主共和国或毗邻国家或地区财务冲突的矿产及其衍生物。(详细信息,请参见 http://www.sec.gov/about/laws/wallstreetreform-cpa.pdf)"},{"term":"指明国家或地区","definition":"2010 年,通过的《多德-弗兰克华尔街金融改革与消费者保护法》(Dodd-Frank Wall Street Reform and Consumer Protection Act) 定义了所禁止的源产地国家,即刚果民主共和国及与其分享国际公认国境线的 9 个国家,分别是安哥拉、布隆迪、中非共和国、刚果共和国、卢旺达、南苏单、坦桑尼亚、乌干达和赞比亚。"},{"term":"申报范围或种类","definition":"为实现本模板的设计目的,“申报范围”明确了申报公司所申报信息的适用性。申报范围可能涵盖了整间申报公司所提供的产品和服务或其部份适用的产品和服务。此模板也可用于单一、多种或申报人自定义的产品。 “用户自定义”的申报范围可用于仅部分公司营运适用或部分产品系列适用的情况。"},{"term":"多德-弗兰克","definition":"2010 年,美国通过立法《多德-弗兰克华尔街金融改革与消费者保护法》(Dodd-Frank Wall Street Reform and Consumer Protection Act) 第 1502 条(简称“多德-弗兰克”) (http://www.sec.gov/about/laws/wallstreetreform-cpa.pdf)"},{"term":"刚果民主共和国","definition":"刚果民主共和国"},{"term":"刚果民主共和国无冲突的冲突矿产","definition":"产品不含能直接或间直资助和受益于刚果民主共和国或毗邻国家内武装组织的物质成分。资料来源:2010 年,美国通过立法《多德-弗兰克华尔街金融改革与消费者保护法》第 1502 条 (http://www.sec.gov/about/laws/wallstreetreform-cpa.pdf)"},{"term":"金精炼厂(冶炼厂)","definition":"金精炼是指一种从黄金和含金量低的物料中提炼出纯度达 99.5% 或更高的黄金的冶金操作。请参考负责任矿物审验流程中的审核标准,了解对这类型金属的完整描述:https://www.responsiblemineralsinitiative.org/minerals-due-diligence/standards/。"},{"term":"独立的第三方审核机构","definition":"冶炼厂审核中提到的“独立的第三方审核机构”是私营部门组织,它评估冶炼厂或精炼厂对物料的可追朔性是否达到负责任矿物审验流程 (RMAP) 中的标准或相关审核标准。为确保中立及公正,这类机构及其审核团队必须与被审核方无利益交往。"},{"term":"有意添加","definition":"“有意添加”通常指故在产品生命周期的一个或多个阶段中使用的旨在赋予特定属性、反应或质量的物质。\\n\\n而美国证券交易委员会没有在最终规则* 里为措辞“有针对性添加”进行定义。最终规则里对此的序文表示为:\\n“我们认为有针对性地添加,而不是产品天然拥有,是一个判断冲突矿产是否必须在产品功能或生产制造中的重要因素。这与谁添加无关,只在乎冲突矿产有否存在于产品中。决定冲突矿产对产品是否需要,并非取决于冲突矿产是否直接添加进产品或直接添加进来自第三方的产品部件。所以,申报人必须报告含冲突矿产产品的总数,并与供应商合作共同遵守要求。 在判断产品中的冲突矿产是否需要时,申报人必须考虑其产品中有否冲突矿产,即使是原本就存在于由供应商提供的零部件中。”\\n\\n*(56296 Federal Register / Vol. 77, No. 177 / Wednesday, September 12, 2012 / Rules and Regulations)"},{"term":"IPC","definition":"位于伊利诺斯州班诺克本的 IPC (www.IPC.org) 是一个国际性组织。 它致力于提升其 3,400 个来自电子工业各层面会员的竞争优势和财务成就。会员有从事设计,线路板生产,电子装配,测试等。 IPC 作为一个会员至上和一个为行业制定标准,提供培训、调研市场、政策制定提供主要资源的机构,它支持多种计划项目以满足一个约值 2 万亿美元的行业的各种需要。IPC 在新墨西哥州的道斯、华盛顿特区、瑞典的斯德哥尔摩、俄罗斯的莫斯科、印度的班加罗尔、秦国曼谷,以及中国的上海、深圳、成都、苏州和北京均驻有办事处。"},{"term":"IPC-1755 冲突矿产数据交换标准","definition":"此 IPC 标准要求供应商与其客户交换冲突矿产的信息。为迎合大范围成员的需要,此标准对单一申报中的产品范围的要求是相当灵活的。 故此标准不能作为合规的指引。"},{"term":"产品功能需要","definition":"SEC 在最终规则* 中没有给出此词的正式定义。但是,规则给予了一些指引:一种冲突矿产被认为对某种功能或产品是需要的,必须满足以下几点: 1) 有针对性地添加到产品或组件,而且不是产品天然拥有;2) 对于满足产品所期望达到的功能、使用或用途是必要的;3) 与产品的装饰、美化或修饰无关,而无论是否产品的原旨就是装饰或美化。 \\n\\n注:适用于冲突矿产必须存在于产品中。 \\n\\n*(56296 Federal Register / Vol. 77, No. 177 / Wednesday, September 12, 2012 / Rules and Regulations)"},{"term":"产品生产需要","definition":"SEC 在最终规则* 中没有给出此词的正式定义;但是,规则给予了一些指引:一种冲突矿产被认为对某种功能或产品是需要的,必须满足以下几点: 1) 是添加于产品制造流程中,而非存在于制造产品的工具、机器或设备中(如计算机或电源线);2) 存在于产品中(适用于必须含在产品中);3) 为产品所需。\\n\\n*(56296 Federal Register / Vol. 77, No. 177 / Wednesday, September 12, 2012 / Rules and Regulations)"},{"term":"经济合作与发展组织(Organization for Economic Co-operation and Development,OECD)","definition":"经济合作与发展组织"},{"term":"产品","definition":"公司的产品或成品是指在制造生产阶段或最后完成阶段的物料或物品,并且已可以交付或销售给客户。"},{"term":"责任商业联盟(Responsible Business Alliance,RBA)","definition":"责任商业联盟 (www.responsiblebusiness.org)"},{"term":"回收或废料源","definition":"回收料或报废料是指循环使用的金属。它们是从最终用户使用过的产品中回收,或在产品制造过程产生的废料。回收金属包括多余的、废弃的、缺陷的、报废的金属材料。这些材料能用于循环再生钽、锡、钨、金。回收利用金属的定义中不包括经部份加工过的矿产、未经加工过的矿产及其他种类非金属矿石的副产品。"},{"term":"负责任矿物审验流程 (RMAP)","definition":"负责任矿物审验流程 (RMAP) 是由责任商业联盟 (RBA) 所制定,用于提高公司对金属责任采购进行查证的能力。有关 RMAP 的更多信息,请访问 http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/。"},{"term":"负责任矿物计划","definition":"负责任矿物计划由责任商业联盟 (RBA) 于 2008 年发起成立,并已成为公司供应链就冲突矿产问题而最广泛使用和认可的标准。 今天,来自 10 种不同行业的超过 360 家公司加入了负责任矿物计划,共同促成了一系列查证工具和资源的落实,例如负责任矿物审验流程、冲突矿产报告模板、合理的原产国信息查询和一系列无冲突矿产采购指引。另外,负责任矿物计划组织还会定期举办关于冲突矿产专题的工作坊、参与政策制度的修定、与前沿的社会团体和政府机构研讨等。有关更多信息,请造访http://www.responsiblemineralsinitiative.org"},{"term":"无冲突冶炼厂计划合规冶炼厂列表","definition":"负责任矿物审验流程 (RMAP) 中的合规冶炼厂列表包含所有被评估并且符合标准的冶炼厂和精炼厂。其中的标准有负责任矿物审验流程 (RMAP)、负责任矿物计划 (RMI) 或其他对等机构计划(例如责任珠宝委员会或伦敦金银市场协会)。如果冶炼厂或精炼厂不在列表内,则表示其未完成 RMAP 评估或不符合 RMAP 标准要求。\\n\\n要查看经验证符合 RMAP 的冶炼厂和精炼厂列表,请访问 https://www.responsiblemineralsinitiative.org/facilities-lists/active-conformant-facilities-list/。"},{"term":"证券交易委员会 (SEC)","definition":"美国证券交易委员会 (www.sec.gov)"},{"term":"冶炼厂","definition":"冶炼厂或精炼厂是指购买并加工矿石、矿渣、回收料、报废料从而提炼成金属或含金属的介质。产品有纯度为 99.5% 或更高的金属、金属粉体、金属锭、金属条、金属粒子、金属氧化物、金属盐类等。术语“冶炼厂”和“精炼厂”在各类型的刊物经常互用。"},{"term":"冶炼厂识别序号","definition":"负责任矿物计划 (RMI) 会编发独一无二的识别号码给由供应链成员申报上来的冶炼厂或精炼厂,无论其是否已确认过符合负责任矿物审验流程 (RMAP) 中审核标准所定义冶炼厂的物征。"},{"term":"钽 (Ta) 冶炼厂","definition":"钽冶炼厂(或称钽加工厂)是指能转换含钽矿石、高钝度钽矿石、矿渣、二手金属成含钽介质或其它含钽产品,用于直接销售或进一步深加工成其它含钽产品,例如钽粉、钽部件、氧化钽、合金、焊条、热压结条等的工厂。请参考 RMAP 中的审核标准,以了解对这类型金属的完整描述。 https://www.responsiblemineralsinitiative.org/minerals-due-diligence/standards/。"},{"term":"锡 (Sn) 冶炼厂","definition":"一级锡冶炼厂指的是拥有一种以上处理锡精矿设备、生产锡金属的工厂。二级锡冶炼厂 是指拥有一种以上设备可将二次料件还原为粗锡、高纯度锡或是锡制品(例如焊锡)的工 厂。参与 RMAP 审计的冶炼厂属于上述其中一种,或是同时拥有上述两种类型的冶炼厂。请参考适用于这类金属的 RMAP 审计协议完整描述:\\nhttps://www.responsiblemineralsinitiative.org/minerals-due-diligence/standards/。"},{"term":"钨 (W) 冶炼厂","definition":"钨冶炼厂指拥有一种或多种设施能使含钨矿石(黑钨矿和白钨矿)、钨精矿、含钨轴承废料(次件)转换为含钨介体,例如仲钨酸铵 (APT)、铵元钨 (AMT)、钨铁、钨氧化物,并将含钨介体用直接销售或进一步制造含钨产品(钨粉或钨碳粉)的工厂。 请参考负责任矿物审验流程 (RMAP) 中的审核标准,以了解对这类金属的完整描述:https://www.responsiblemineralsinitiative.org/minerals-due-diligence/standards/。"}],"smelterLookup":["以下目录是截止此模板发布时 RMI 的最新冶炼厂名称/别名信息。此目录实时更新,可于下述 RMI 网站查询最新版本:http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/exports/cmrt-export/。冶炼厂存在于此目录中不保证它就是负责任矿物审验流程内的目前有效或合规的冶炼厂。\\n\\n有关有效或合规标准冶炼厂名称的最新准确列表,请访问 RMI 网站 www.responsiblemineralsinitiative.org。\\n\\nB 列包括的名称表示供应链对于特定冶炼厂通常认可和报告使用的公司名称。这些名称可能包括公司曾用名、备用名称、简称、或其他变体。虽然这些名称可能不是 RMI 标准冶炼厂名称,但参考名称有助于识别列在冶炼厂查找中的 C 列之冶炼厂。\\n\\n在 ASCII 字符集中,C 列是正式标准冶炼厂名称列表。大多数冶炼厂的这两列具有相同条目,然而,如果常用名称与标准名称不同,则应在 B 列中注明这种变化。"]}},"emrt":{"2.1":{"instructions":["RMI 网站:(http://www.responsiblemineralsinitiative.org/)","介绍","此扩展矿物报告模板 (EMRT) 是 Responsible Minerals Initiative®(负责任矿物计划® (RMI®))创建的免费标准化报告‏‎模板。该模板促进了通过关于矿产原产国、所使用冶炼厂、精炼厂和加工厂的供应链的信息传输,并且支持了按照《经济合作与发展组织关于来自受冲突影响和高风险地区矿石的负责任供应链尽职调查指南》(OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-Af‎‎‎fected and High-Risk Areas) 执行尽职调查。该模板还促进辨识新的冶炼厂和精炼厂以通过负责任矿物审验流程对这些厂家进行潜在的审核。\\n\\nEMRT 旨在供下游企业披露与其供应链\\n(截至但不包括冶炼厂)相关的信息。如果贵公司是冶炼厂或精炼厂,我们建议您在“冶炼厂目录”选项卡中输入贵公司名称。\\n\\n填好的表格中不应有单元格条目以“=”或\\n“#”开头。","公司资料填写说明(第7-26行)。只限英文作答","注:带星号(*)的栏目必须填写","1. 插入贵公司的法定名称。请不要使用缩写。\\n在此字段中,您可以选择添加其他商业名称、营业名称等。此栏必须填写。","2. 选择贵公司的申报范围。范围的选项为:\\n\\nA. 全公司\\nB. 产品(或产品清单)\\nC. 自定义 \\n\\n如果选择范围为“全公司”,申报包括该公司的全部产品或由其母公司生产的全部产品物质。如果用户从公司层面报告指定矿产数据,则需要报告关于其生产的所有产品的数据。\\n\\n如果选择范围为“产品(或产品清单)”,将显示产品清单的工作表选项卡。如果选择了此范围,则必须在“产品清单”工作表的 B 列中列出此申报范围涵盖的\\n产品的回复方产品序号。可以选择是否在“产品清单”工作表的 C 列中列出回复方产品名称。\\n\\n如果选择范围为“自定义”,用户必须描述指定矿产披露适用的范围。该分类的范围应当由供应商在文本字段中定义,并且易于被客户或文档的接收人理解。举个例子,公司可以提供阐明信息的链接。\\n\\n此栏必须填写。","3. 决定贵公司的矿产申报范围。这些字段包含六种 EMRT 矿物。要从声明中删除某种矿物,用户可选择“Delete [Mineral]”。提出请求的公司必须说明哪些矿产属于申报范围。问题 1 至 7 和 C 会自动按字母顺序填充的矿产。\\n\\n这是必填项。","3. 输入贵公司的唯一识别序号或编号\\n(DUNS号码,VAT号码,客户特定识别码等)","4. 输入唯一识别序号或编号的出处 (如“DUNS”,“VAT”,“客户”等)","5. 插入贵公司的完整地址(街道、城市、州、国家或地区、邮政编码)。此为必填字段。","6. 插入与申报信息内容相关的联系人姓名。\\n此栏必须填写。","7. 插入联系人的电子邮件地址。如果没有电子邮件地址,请说明“无”或“不适用”。如留空此字段,会导致此表格出错。此为必填字段。","8. 插入联系人的电话号码。此栏必须填写。","9. 插入负责申报信息内容的人的姓名。\\n授权人可能是另一人而非联系人。使用“相\\n同”字眼或类似认定以提供授权人的姓名是不正确的。此栏必须填写。","10. 输入授权人的职位。 此为选填字段。","11. 插入授权人的电子邮件地址。\\n如果电子邮件地址不可用,说明“不可用”或“n/a”。空白字段可能导致表格填写错误。此栏必须填写。","12. 插入授权人的电话号码。此字段自由选择填写。","13. 请使用以下格式输入表格填写完毕的\\n日期:年—月—日。此栏必须填写。","14. 申报人应按“公司名-年月日.xlsx”\\n格式来命名并存档本报告。(日期格式为年-月-日)","六个申报范围问题的答复说明(第 28 - 107 行)。\\n仅以英文提供答复","这七个问题明确了指定矿产的用途、原产地和采购识别信息。这些问题旨在收集关于公司产品中指定矿产的使用情况和报告完整性的信息。对于这些问题的答复应当陈述公司信息部分中选择的“申报范围”。","按要求在备注部分提供备注来进一步说明您的答复。","使用下拉菜单选项提供答案。如果指定矿产的问题 1 答复是肯定的,则应完成指定矿产的所有问题,而且应完成关于公司的总体审核鉴定计划的后续审核鉴定问题(A 至 G)。","1. 此问题用于确定指定矿产是否属于报告要求的范围。此问题的答复用于排除任何痕量级杂质或自然生成的副产品。\\n\\n此问题询问是否有任何指定矿产在贵公司生产的产品(包括化合物)中用作原材料、组件或添加物。原材料、组件、添加物、磨具和切削工具中的杂质不在此调查范围。\\n\\n此问题的有效答复为“是”、“否”、“不知道”、或 “未申报”。当原料不在申报的范围内时,可以回答“对此申报不适用”。此问题必须作答。","部分公司可能要求给出“否”答复的证据,这些证据应当输入备注字段。","2. 对于对问题 1 答复“是”的每个情况,必须为指定矿产回答此问题。这是两个问题中的第一个问题,其答复用来确定指定矿产是否在冲突矿产报告模版的范围内。此问题取决于问题和对问题 1 的答复。此问题旨在确定在产品生产过程中有意添加或包含的指定矿产(若一定数量的指定矿产仍保留在成品中)。这包括可能并非要成为成品中的一部分以及可能并非对产品的功能有必要,而只是作为生产过程的残留物存在的指定矿产。在很多情况下,制造商可能已在生产过程中试图除去或促进消耗指定矿产,但还是有一定数量的指定矿产残留。若在生产过程中添加或纳入的指定矿产被完全移除,因此在该过程完成后,将没有指定矿产残留,对此问题的答复将是否。\\n\\n必须为指定矿产回答这个问题。此问题的有效答复为“是”、“否”、“不知道”。此问题必须作答。","3. 此申报是要确定一种产品或多种产品中指定矿产的任何部分的源产地是受冲突影响和高风险地区 (CAHRA)。如果供应链中的任何冶炼厂从 CAHRA 进行采购,无论此冶炼厂是否经过独立审计,则对此问题的答复应为“是”。\\n\\n为指定矿答案应该是“是”、“否”或 “不知道”。 如果回答“是”,请在备注部分提供证明。回答“不知道”是可接受的。如果对问题 1 和 2 的答复为“是”,则必须为指定矿产回答此问题。","4. 此申报确定产品中包含的指定矿产是否完全来自回收料或报废料。\\n\\n以“是”、“否”或“不知道”来答复此问题。\\n\\n答复“是”表示 100% 的指定矿产来自回收料或报废料。答复“否”表示部分原材料不是来自回收料或报废料。答复“不知道”表示用户不知道是否 100% 的原材料来自回收料或报废料。如果对问题 1 和 2 的答复为“是”,则必须为指定矿产回答此问题。","5. 此问题是要确定公司是否已经从被合理认为提供本申报范围中产品含有的指定矿产所有直接供应商处得到相关披露。本问题的允许答复有:\\n\\n­ 100%\\n- 超过 90%\\n- 超过 75%\\n- 超过 50%\\n- 50% 或以下\\n- 无\\n- 未调查\\n\\n如果对问题 1 和 2 的答复为“是”,则必须为指定矿产回答此问题。","6. 此问题是要核实供应商是否有理由相信他们已识别出提供此申报涵盖的产品中的指定矿产的所有冶炼厂。本问题的答复有“是”、“否”或“不知道”,并就情况进行说明,如冶炼厂目录。如果对问题 1 和 2 的答复为“是”,则必须为指定矿产回答此问题。","7. 此问题是要核实经确定为提供此申报范围涵盖产品中含有的任何原材料的所有冶炼厂或加工厂是否已在此申报中报告。本问题的答复有“是”、“否”或“不知道”,并就情况说明,如冶炼厂目录。如果对问题 1 和 2 的答复为“是”,则必须为指定矿产回答此问题。","问题 A – G 回答说明(113 - 137 行)。如果为指定矿产回答问题 1 和 2 的答复为“是”,则必须回答问题 A 到 G。\\n仅以英文提供答复。","《经济合作与发展组织关于来自受冲突影响和高风险地区矿石的负责任供应链尽职调查指南》(简称“经合组织指南”)将“尽职调查”定义为“一个持续的、主动性和应对性流程,通过该流程,公司可以确保其尊重人权而不会导致冲突。” 更多信息可以在 http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/.\\n\\n问题 A – G 旨在评估贵公司指定矿产采购的尽职调查活动。对这些问题的答复应当代表贵公司的完整活动范围,不仅限于公司信息部分选择的“申报范围”。对这些问题的答复应当代表贵公司的完整活动范围,不仅限于公司信息部分选择的“申报范围”。","A. 此申报是为披露公司是否具有可公开查阅的负责任矿物采购政策。以“是”或“否”来答复此问题。","B. 此申报是为披露公司的负责任矿物采购政策是否可在公司网站上获取。以“是”或“否”来答复此问题。如果答案为“是”,请在备注字段中填写 URL。此字段必须填写。","C. 此申报是要确定公司是否要求其直接供应商从经独立验证的冶炼厂和加工厂处采购指定矿产。此问题时的答案应该是“是”、“是,当多个加工厂已被验证”或“否”。 应在问题备注字段记录备注。此字段必须填写。","D. 此申报是要披露公司是否实施了负责任矿物采购尽职调查措施。此问题的目的不是要公司提供尽职调查措施的详情。可接受的尽职调查措施的具体情况应当由请求者和供应商决定。\\n\\n以“是”或“否”来答复此问题。如果答案是“是”,用户应该在问题的备注字段中概述已实施的尽职调查措施(如:《经合组织尽职调查指南》)。","E. 此问题是要披露公司是否要求其供应商填写扩展矿物报告模版。接受的答复载列如下,在部分情况中,可能需要进一步解释,即提供用于收集信息的格式。如果答复为“是,使用其他格式”,用户须在问题备注字段提供备注。本问题的允许答复有:\\n\\n- 是,根据 IPC-1755 要求(如 EMRT)\\n- 是,使用其他格式(请描述)\\n- 否\\n\\n此字段必须填写。","F. 请答复“是”或“否”。在备注部分,\\n您可以提供有关贵公司所采用方法的其他信\\n息。示例可以为:\\n\\n “第三方审计”——由独立第三方进行的供应商现场审计。\\n “仅审核文件编制情况”——由独立第三方和/或贵公司工作人员对供应商提交的记录和文件予以审核。\\n “内部审计”——由贵公司工作人员进行的供应商现场审计。\\n\\n此栏必须填写。","G. 此问题是要披露公司的审核流程是否\\n包括纠正措施管理。以“是”或“否”来答复此问题。须在问题备注字段记录备注。此栏必须填写。","冶炼厂名单工作表的填写说明。只限英文作答\\n\\n注:带星号(*)列表示此区域必须填写。","此模版可以使用冶炼厂查询清单来填写冶炼厂、精炼厂、加工厂。必须从左到右填写 B 列和 C 列,才能利用冶炼厂查询清单功能。\\n对于金属/冶炼厂/国家组合应使用分割线。","1. 冶炼厂识别输入列-如果您知道冶炼厂\\n识别号码,则在 A 列输入号码(B、C、D、\\nE、F、G、I 和 J 列将自动填入)。A 列不会自动填入。","2. 金属(*)- 在下拉菜单中选择\\n正在录入信息的冶炼厂所提炼的金属。仅当问题 1 和问题 2 中关于指定矿产的回答为“是”时,才会出现金属。此栏必须填写。","3. 冶炼厂查找 (*) - 从下拉菜单中\\n选择。目录列出了所有直到发布此申报模板时已知的冶炼厂。如果冶炼厂不在目录中时请选择‘冶炼厂没列出’。出现这种情况时请将该冶炼厂的名称输入 D 列。如果您不知道冶炼厂\\n的名称或地点,请选择‘冶炼厂尚未被识\\n别’。对于这个选项,D 和 E 列将会\\n自动填入‘未知’.","4. 冶炼厂名称 (1)- 如果在 C 列选择了\\n“冶炼厂未列出”,则填入冶炼厂名称。当在 C 列选择了冶炼厂名称后,\\n此字段将自动填充。此字段必须填写。","5. 冶炼厂所在国家 (*) - 当在 C 列选择了\\n冶炼厂名称,此字段将自动填充。如果在 C 列选择了“冶炼厂未列出”,则使用下拉菜单选择冶炼厂的国家位置。此栏必须填写。","6. 冶炼厂识别 - 依据冶炼厂和\\n精炼厂识别系统每一冶炼厂或精炼厂均有一独一无二的标识。 相信会有一间冶炼厂或一间\\n精炼厂存在多个名称的情况出现。因此,唯一的冶炼厂标识能将其它名称和别名进行统一。","7. 冶炼厂识别号码 - F 列包括所有的\\n冶炼厂识别号码。如果在 C 列中选出冶炼厂\\n名称,此栏会自动填入。","8. 冶炼厂所在街道 - 提供冶炼厂所在街道的名称。","9. 冶炼厂所在城市 - 提供冶炼厂所在城市的名称。","10. 冶炼厂地点: 州/省(如适用)- 提供冶炼厂所在的州/省。","11. 冶炼厂联系人姓名——扩展矿物报告模板 (EMRT) 在提出请求的公司的供应链公司中流传,以按照《经济合作与发展组织关于来自受冲突影响和高风险地区矿石的负责任供应链尽职调查指南》执行尽职调查。\\n\\n如果该模板在有保护个人信息立法的国家流传,在 EMRT 中分享个人信息可能会违反相关法规。因此,建议提出请求的公司采取预防措施,例如获得联系人的相关许可,以在填写“冶炼厂联系人姓名”以及“冶炼厂联系人电子邮件”列时可与供应链中的其他公司分享该信息。\\n\\"\\n如果获得了分享该信息的许可,请填入与贵公司合作的冶炼厂设施联系人姓名。","12. 冶炼厂联系电邮地址 - 填入被确认为冶炼厂联系人的电邮地址作为冶炼厂联系信息。 例如: John.Smith@SmelterXXX.com。 请在填写此栏前阅读冶炼厂联系名称指引。","13. 矿场名称——此字段供公司确定冶炼厂\\n正在使用的实际矿场。如果已知实际矿场的名称,请输入该名称。如果冶炼厂的所有原料均来自回收料或报废料资源,则输入“回收料”或“报废料”以取代矿场名称,并在 P 列回答“是”。","14. 矿场地点(国家)——这是可自由输入\\n文字的字段,供公司注明冶炼厂正在使用的矿场地点。请输入矿场所在国家。如果原产国未知,则输入“不知道”。如果冶炼厂的所有原料均来自回收料或报废料资源,则输入“回收料”或“报废料”以取代原产国。此字段自由选择填写。","15. 表明冶炼厂是否仅从回收料或报废料资源\\n中获取冶炼过程的来料。此问题自由选择答\\n复。本问题的允许答复有:\\n\\n- 是\\n- 否\\n- 不知道","16. 注释 - 用自由的格式的文字栏来输入\\n任何有关冶炼厂的意见。例如:冶炼厂正在被\\nYYY公司收购","矿厂列表选项卡的填写说明。请仅以英文作答。","1. 金属 - 在下拉菜单中,选择正在输入信息的矿厂所提炼的金属。仅当问题 1 和问题 2 中关于指定矿产的回答为“是”时,才会出现金属。","2. 从该矿厂采购的冶炼厂的名称 - 请尽可能填写从所列矿厂或矿场采购的冶炼厂的名称。","3. 矿厂名称 - 提供矿厂的名称。","4. 矿厂识别 - 依据矿厂识别系统每一矿厂均有一独一无二的标识。相信会有一间矿厂存在多个名称的情况出现。 因此,唯一的矿厂标识能将其他名称和别名进行统一。","5. 矿厂识别号颁发者 - 这是 D 栏中输入的矿厂识别号的颁发者。","6. 矿厂识别号颁发者 - 这是 D 栏中输入的矿厂识别号的颁发者。","7. 矿厂所在街道 - 提供矿厂所在街道的名称。","8. 矿厂所在城市 - 提供矿厂所在城市的名称。","9. 矿厂地点:州/省(如适用)- 提供矿厂所在的州/省。","10. 矿厂联系人名称 - 如果在统一使用此报告模板中,所在国家或地区有保护个人信息的法律法规,填写个人联系信息会有可能触犯法律法规,则建议申报公司在填写“矿厂联系人姓名”和“矿厂联系人电子邮件”列时,先确保联系人本人同意公开其联系信息。 。\\n\\n如果申报人已获得公开联系信息的授权信息,请输入与之合作的矿厂之联系人姓名。","11. 矿厂联系人电子邮件 - 填写被确定为矿厂联系人的电子邮件。例如: John.Smith@MineXXX.com。填写此字段栏前,请阅读矿厂联系人姓名填写指引。","12. 这是一个评论区,允许公司指定下一步管理矿厂的步骤。 如果该设施未列在负责任矿物审验流程 (RMAP) 合规矿厂列表,您可以对矿厂采取这些措施。 示例:要求通过 RMAP 评估矿厂设施,从首选供应商名单中删除等。","13. 注释 - 无格式限制的文字栏,可输入有关矿厂的任何意见。例如:矿厂正在被 YYY 公司收购","检查工作表用于确认模板中的全部必要信息是否均已填妥。该表格实时更新,并在使用模板时可以随时查阅。此工作表用于确认填写完\\n毕。\\n\\n要使用此表,确认已填完所有的必填字段(已填写的字段将用绿色突出显示)。否则请寻找红色的字段,并查阅 C 列中的“备注”并按照\\n指示操作。贵公司可以使用 D 列中的 URL 以直接访问相关字段进行填写。","条款和条件\\n如有异议,以英文版扩展矿产报告模板为准。","责任商业联盟冶炼厂目录(“目录”)及计划模板和工具,包括但不限于扩展矿物报告模板(统称为“工具”),包括但不限于此处所提供的一切信息,仅供参考之用,并以其上载明日期为准。在目录或工具中,如有任何不准确或遗漏的信息,责任商业联盟 (RBA)(特拉华州注册的非股份公司)\\n概不负责。是否使用和/或如何使用全部或部分目录或任何工具,用户拥有唯一及绝对的决定权​​。使用目录或任何工具之前,您应该向自己的法律顾问征询意见。目录或工具中没有任何一部份会构成法律意见。使用目录或任何工具都是自愿性行为。","RBA 不为目录或任何工具作任何的申述或保证。\\n目录和工具是依据“原样”和“现有”基础来提供。RBA 特此否认任何性质\\n(明示、暗示或其他方式)的所有保证,或因业务或惯例产生的所有保证,包括但不限于适销性、非侵权、质量、所有权、针对特定目的的适用性、完整性或准确性的任何暗示保证。","在适用法律允许的最大范围内,RBA 声明,不对任何性质的损失、费用或损害赔偿金承担任何责任,包括但不限于,因用户使用目录或任何工具而造成或引起的特殊的、偶发的、惩罚性的、直接的、间接的或后果性损害或收入或利润损失,不论是否因侵权行为、合同、条例或其他方式产生,即使已被告知此类损害的可能性。","鉴于对目录和/或任何工具的访问和使用,用户在此同意 (a) 因目录或任何工具\\n或及其使用而导致或产生的用户有过或者可能拥有或声称拥有的对 RBA 及其管理人员、\\n董事、代理、员工、志愿者、代表、承包商、继承人、指定人的任何及全部索赔、起诉、损失、诉讼、损害赔偿、判决、征费和处决,让 RBA 以及其管理人员、董事、代理、\\n员工、志愿者、代表、承包商、继承人、指定人解除并永远免除责任;(b) 保护 RBA 及其管理人员、董事、代理、员工、\\n志愿者、代表、承包商、继承人、指定人,确保他们不承担因用户使用目录或任何工具而导致或产生的任何及全部索赔、起诉、损失、诉讼、损害赔偿、判决、征费和处决。","如果本条款和条件的任何部分被适用法律认为无效或不可执行,该部分将仅因此类无效或不可执行性而无效,但不会以任何方式影响所述条款的剩余部分或上述条款和条件的剩余条款的效力。","访问和使用此目录或任何工具以及考虑此目录和任何工具时,即表示该用户同意上述条款。"],"smelterList":[],"productList":[],"definitions":[{"term":"授权人","definition":"此栏目定义对申报内容负责的责任人.授权人可能与申报内容责任人不一致,故不能填写“相同一样”, 需提供授权人的姓名。"},{"term":"钴精炼厂","definition":"处理钴精矿、中间产品或再循环材料并生产直接用于下游制造工艺的钴产品的实体。"},{"term":"受冲突影响和高风险地区 (CAHRA)","definition":"根据《经合组织尽职调查指南》的定义,受冲突影响和高风险地区 (CAHRA) 是指“识别为\\n存在武装冲突、大面积暴力活动或其他存在使人民遭受伤害风险的地区。武装冲突的形式多种多样,如国际冲突或非国际冲突,可能涉及两个或两个以上国家,可能由解放战争、叛\\n乱、内战等构成。高风险地区可能包括那些政局不稳或存在政治压迫、制度缺陷、不安全因素、民用基础设施崩溃、大面积暴力活动的地区。这类地区的特点往往是大规模侵犯人权、违反国际国内法律等。”"},{"term":"铜加工厂*","definition":"铜加工厂是通过冶金、化学或电化学工艺,将含铜材料转化为铜中间产品或最终铜产品的工厂。铜加工厂可能运营综合设施,也可能仅专注于铜产业价值链的一个环节或多个环节,其业务范围涵盖合金化、铸造及后续深加工等工序。"},{"term":"申报范围或类别","definition":"就本模板而言,“范围”明确了申报公司所提供信息的适用性。范围可能涵盖了公司的全部服务和/或产品,或者,根据公司自行决定,模板也可用于报告特定产品,或者可以“自定\\n义”。选择“自定义”范围或类别可以用于说明公司运营或产品组合的任何子集。"},{"term":"尽职调查","definition":"《经济合作与发展组织关于来自受冲突影响和高风险地区矿石的负责任供应链尽职调查指\\n南》(简称“经合组织指南”)将“尽职调\\n查”定义为“一个持续的、主动性和应对性流程,通过该流程,公司可以确保其尊重人权而不会导致冲突。” \\n更多信息可以在 http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/."},{"term":"天然石墨*","definition":"天然石墨是一种自然生成的结晶碳形态,主要见于片状石墨、无定形石墨和脉状石墨等含石墨矿石。天然石墨项目或经营(上游参与者)指正在进行的工业活动,主要专注于石墨矿石的开采及其后续选矿操作,最终生产石墨精矿。"},{"term":"石墨生产商*","definition":"球形石墨生产商(夹点)指通过将天然或合成石墨精矿加工为球形石墨(也称作球化石墨)来生产锂离子电池阳极用高纯度、细颗粒石墨产品(涂层或无涂层)的工厂。"},{"term":"独立的私营审核机构","definition":"就冶炼厂审计而言,“独立第三方审计事务\\n所”是指能够按照制定的标准对冶炼厂或精炼厂的尽职调查体系进行评估的私营机构。为保持中立和公正性,此类机构及其审计团队不得与被审单位存在利益冲突。"},{"term":"有目的添加","definition":"“有意添加”通常指故在产品生命周期的一个或多个阶段中使用的旨在赋予特定属性、反应或质量的物质。"},{"term":"锂加工厂*","definition":"锂加工厂是通过化学、热加工或电化学工艺,将含锂材料转化为锂化合物、金属锂或中间产品的工厂。加工产品可能包括碳酸锂、氢氧化锂、氯化锂、硫酸锂、氧化锂、金属锂或电池、陶瓷、玻璃、润滑剂和药品等其他用于下游应用的含锂中间产品。"},{"term":"组织经济合作与发展","definition":"经济合作与发展组织。经合组织制定了《经合组织负责任供应链尽职调查指南》。《经合组织尽职调查指南》内含详细建议,可帮助公司充分尊重人权,避免因其矿物采购的决定和行为而加剧冲突。该指南适用于可能从受冲突影响及高风险地区采购矿物或金属的任何公司。经合组织指南适用于全球范围内的所有矿物供应链。\\n(http://mneguidelines.oecd.org/mining.htm)"},{"term":"云母(天然)","definition":"天然云母是开采出或自然形成的矿物,如白云母或金云母。"},{"term":"云母(合成)","definition":"合成云母(氟金云母)是一种人工合成的材料,使用的原料包括镁、铝和硅。"},{"term":"云母加工厂","definition":"云母加工厂是指对开采的原矿(如伟晶岩(片岩)、长石、高岭土、白云母或金云母)施加各种物理或机械方法将非云母成分和云母成分分离,然后生产供下游生产工艺使用的具有一定等级的云母产品的实体。原矿加工包括分选、分离、研磨、磨矿、切割、冲压和结合。"},{"term":"镍加工厂*","definition":"镍加工厂是通过火法冶金、湿法冶金或电化学工艺,将含镍材料转化为金属镍、镍合金或中间产品的工厂。加工产品可能包括镍铁、镍生铁 (NPI)、镍锍、混合氢氧化物沉淀 (MHP)、混合硫化物沉淀 (MSP)、硫酸镍或精炼金属镍。"},{"term":"加工商","definition":"执行浓缩或纯化工艺,以去除原材料中所有混杂成分、分离出所需元素的工厂。这包括但不限于:清洁、分离、浓缩(例如,通过机械、加热或化学方法将有价值矿物与不需要的脉石分离)、焙烧(例如,冶炼、焙烧或其他去除杂质的方法)、阴极和阳极电解生产和其他精炼工艺。"},{"term":"产品","definition":"公司的产品或成品是指在制造生产阶段或最后完成阶段的物料或物品,并且已可以交付或销售给客户。"},{"term":"回收或废料源","definition":"回收料或报废料资源是指来自回收的最终用户产品或消费后产品的再生金属,或者在产品制造期间产生的金属加工废料。再生金属包括某些多余的、废弃的、缺陷的和废金属等材料,这些材料含有在生产此类金属时适于回收的已精炼或加工金属。再生金属的定义中不包括部分加工、未加工的矿物或者其他矿石的副产品。\\n\\n注:至本模版出版之日,目前尚未进行规模化回收用后云母。"},{"term":"责任商业联盟 (RBA)","definition":"责任商业联盟成立于 2004 年,是全球最大的\\n致力于在电子行业供应链中倡导企业责任的行业联盟。\\n(http://www.responsiblebusiness.org)"},{"term":"不使用冲突矿产冶炼厂计划(RMAP)","definition":"负责任矿物审验流程 (RMAP) 是由责任商业联盟 (RBA) 所制定,用于提高公司对金属责任采购进行查证的能力。有关 RMAP 的更多信息,请访问 http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/。"},{"term":"负责任矿物计划 (RMI)","definition":"负责任矿物计划 (RMI) 是由责任商业联盟和全球电子永续\\n倡议组织的成员于 2008 发起成立,\\n已发展成为公司解决其供应链中的冲突矿产问题而最广泛使用和认可的资源之一。今天来自 7 个不同行业的超过 150 家公司加入了 RMI,这些公司贡献了一系列工具和资源,包括负责任矿物审验流程、冲突矿产报告模板、合理原产国查询数据以及各类关于冲突矿产采购的指导文档。RMI 还定期举办关于冲突矿产问题\\n的研讨会,促进政策制订,并且与主要公民社会组织和政府展开辩论。更多信息请访问 http://www.responsiblemineralsinitiative.org/。"},{"term":"RMAP 合规冶炼厂目录","definition":"负责任矿物审验流程 (RMAP) 中的合规冶炼\\n厂目录包含了所有被评估并且符合标准的冶炼厂和精炼厂。其中的标准有负责任矿物审验流程 (RMAP)、负责任矿物计划 (RMI) 或其它对等机构计划(如,责任珠宝委员会或伦敦金银市场协会)。如果冶炼厂或精炼厂不在目录内,则表示其未完成 RMAP 评估或不\\n符合 RMAP 标准要求。\\n\\n要查看经验证符合 RMAP 的冶炼厂和精炼厂\\n目录,请访问 www.responsiblemineralsinitiative.\\norg。"},{"term":"冶炼厂","definition":"冶炼厂或精炼厂是指从回收料或报废料资源中采购和加工矿石、矿渣和/或原料并由此生成精炼金属或含有中间产品的金属的公司。其产物可以是纯的(99.5% 或以上)金属、粉末、铸块、棒条、颗粒、氧化物或金属盐。术语“冶炼厂”、“精炼厂”、“加工厂”在各种出版物中可通用。"},{"term":"冶炼厂识别序号","definition":"RMI 为一些公司指定的唯一识别号,这些公司被供应链中的成员报告为冶炼厂或精炼厂,无论它们是否经过验证符合 RMAP 审计标准或其他适用审计计划所定义的冶炼厂或精炼厂的特征。"}],"mineList":[],"smelterLookup":["以下目录是截至此模板发布时 RBA 的最新冶炼厂名称/别名信息。  此目录会适时更新。  冶炼厂存在于此目录中并不保证它就是独立第三方审计计划内的目前有效或合规的冶炼厂。\\n\\n在 B 列中包括的名称表示供应链对于特定冶炼厂\\n通常认可和报告使用的公司名称。这些名称可能包括公司曾用名、备用名称、简称或其他变体。虽然这些名称可能不是标准冶炼厂名称,但参考名称有助于识别列在“冶炼厂查找”中 C 列下的\\n冶炼厂。\\n\\n在 ASCII 字符集中,C 列是正式标准冶炼厂名\\n称目录。大多数冶炼厂的这两列具有相同的条目,然而,如果常用名称与标准名称不同,则在 B 列中注明这种变化。"]}},"crt":{"2.21":{"instructions":["RMI 网站:(http://www.responsiblemineralsinitiative.org/)","介绍","此钴报告模板 (CRT) 是 Responsible Minerals Initiative®(负责任矿物计划® (RMI®) 创建的免费标准化报告‏‎模板。\\n该模板促进了通过关于矿产原产国、所使用冶炼厂和精炼厂的供应链的信息传输,并且支持了按照《经济合作与发展组织关于来自受冲突影响和高风险地区矿石的负责任供应链尽职调查指南》(OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-Af‎‎‎fected and High-Risk Areas) 执行尽职调查。\\n该模板还促进辨识新的冶炼厂和精炼厂以通过负责任矿物审验流程对这些厂家进行潜在的审核。\\n\\nCRT 旨在供下游企业披露与其供应链\\n(截至但不包括冶炼厂)相关的信息。如果贵公司是冶炼厂或精炼厂,我们建议您在“冶炼厂目录”选项卡中输入贵公司名称。\\n\\n填好的表格中不应有单元格条目以“=”或\\n“#”开头。","公司资料填写说明(第8-22行)。只限英文作答","注:带星号(*)的栏目必须填写","1. 插入贵公司的法定名称。请不要使用缩写。\\n在此字段中,您可以选择添加其他商业名称、营业名称等。此栏必须填写。","2. 选择贵公司的申报范围。范围的选项为:\\n\\nA. 全公司\\nB. 产品(或产品清单)\\nC. 自定义 \\n\\n如果选择范围为“全公司”,申报包括该公司的全部产品或由其母公司生产的全部产品物质。如果用户从公司层面报告钴数据,则需要报告关于其生产的所有产品的数据。\\n\\n如果选择范围为“产品(或产品清单)”,将显示产品清单的工作表选项卡。如果选择了此范围,则必须在“产品清单”工作表的 B 列中列出此申报范围涵盖的\\n产品的制造商产品序号。可以选择是否在“产品清单”工作表的 C 列中列出制造商产品名称。\\n\\n如果选择范围为“自定义”,用户必须描述钴披露适用的范围。该分类的范围应当由供应商在文本字段中定义,并且易于被客户或文档的接收人理解。举个例子,公司可以提供阐明信息的链接。\\n\\n此栏必须填写。","3. 输入贵公司的唯一识别序号或编号\\n(DUNS号码,VAT号码,客户特定识别码等)","4. 输入唯一识别序号或编号的出处 (如“DUNS”,“VAT”,“客户”等)","5. 插入贵公司的完整地址(街道、城市、州、国家或地区、邮政编码)。此为必填字段。","6. 插入与申报信息内容相关的联系人姓名。\\n此栏必须填写。","7. 插入联系人的电子邮件地址。如果没有电子邮件地址,请说明“无”或“不适用”。如留空此字段,会导致此表格出错。此为必填字段。","8. 插入联系人的电话号码。此栏必须填写。","9. 插入负责申报信息内容的人的姓名。\\n授权人可能是另一人而非联系人。使用“相\\n同”字眼或类似认定以提供授权人的姓名是不正确的。此栏必须填写。","10. 输入授权人的职位。 此为选填字段。","11. 插入授权人的电子邮件地址。\\n如果电子邮件地址不可用,说明“不可用”或“n/a”。空白字段可能导致表格填写错误。此栏必须填写。","12. 插入授权人的电话号码。此字段自由选择填写。","13. 请使用以下格式输入表格填写完毕的\\n日期:年—月—日。此栏必须填写。","14. 申报人应按“公司名-年月日.xlsx”\\n格式来命名并存档本报告。(日期格式为年-月-日)","六个申报范围问题的答复说明(第 24 - 56 行)。\\n仅以英文提供答复","这六个问题明确了钴的用途、原产地和采购识别信息。这些问题旨在收集关于公司产品中钴的使用情况和报告完整性的信息。对于这些问题的答复应当陈述公司信息部分中选择的“申报范围”。","按要求在备注部分提供备注来进一步说明您的答复。","使用下拉菜单选项提供答案。如果钴的问题 1 答复是肯定的,则应完成钴的所有问题,而且应完成关于公司的总体审核鉴定计划的后续审核鉴定问题(A 至 I)。","1. 此问题用于确定钴是否在报告要求的范围\\n内。此问题的答复用于排除任何痕量级杂质或自然生成的副产品。\\n\\n此问题询问是否有任何钴在贵公司生产的产品(包括化合物)中用作原材料、组件或添加\\n物。原材料、组件、添加物、磨具和切削工具中的杂质不在此调查范围。\\n\\n此问题的有效答复为“是”、“否”或“不知道”。","部分公司可能要求给出“否”答复的证据,这些证据应当输入备注字段。","2. 这是要申报一种产品或多种产品中\\n钴的任何部分的源产地是受冲突影响和高风险地区 (CAHRA)。如果供应链中的任何\\n冶炼厂从 CAHRA 进行采购,无论此冶炼厂是否经过\\n独立审计,则对此问题的答复应为“是”。\\n\\n此问题的答案应该是“是”、“否”、“不知道”或者“仅刚果民主共和国及毗邻国家”。如果回答“是”,请在备注部分提供证明。回答“不知道”是可接受的。如果对问题 1 的答复为“是”,\\n则必须为钴回答此问题。","3. 此申报确定产品中包含的钴是否\\n完全来自回收料或报废料。\\n\\n以“是”、“否”或“不知道”来答复此\\n问题。\\n\\n答复“是”表示 100% 的钴来自回收料或报废料。\\n答复“否”表示部分原材料不是来自回收料或报废料。答复“不知道”表示用户不知道是否 100% 的原材料来自回收料或报废料。\\n此栏必须填写。","4. 此问题是要确定公司是否已经从被合理\\n认为提供本申报范围中产品含有的钴的所有直接供应商处得到相关披露。本问题的允许答复有:\\n\\n­ 100%\\n­ 超过 90%\\n­ 超过 75%\\n­ 超过 50%\\n- 50% 或以下\\n- 无\\n\\n此栏必须填写。","5. 此问题是要核实供应商是否有理由相信\\n他们已识别出提供此申报涵盖的产品中的钴的所有冶炼厂。本问题的答复有“是”、“否”或“不知道”,并就情况进行说明,如冶炼厂目录。此栏必须填写。","6. 此问题是要核实经确定为提供此申报\\n范围涵盖的产品中含有的任何钴的所有冶炼厂是否已在此申报中报告。本问题的答复有“是”、“否”或“不知道”,并就情况说明,如冶炼厂目录。如果对问题 1 就钴的答复为\\n“是”,必须为钴回答此问题。","问题 A – I 回答说明(63 - 79 行)。如果对问题 1 就任何金属的答复为\\n“是”,必须回答问题 A 至 I。仅以英文\\n提供答复","《经济合作与发展组织关于来自受冲突影响和高风险地区矿石的负责任供应链尽职调查指南》(简称“经合组织指南”)将“尽职调查”定义为“一个持续的、主动性和应对性流程,通过该流程,公司可以确保其尊重人权而不会导致冲突。” 更多信息可以在 http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/.\\n\\n问题 A – I 旨在评估贵公司钴采购的尽职调查活动。对这些问题的答复应当代表贵公司的完整活动范\\n围,不仅限于公司信息部分选择的“申报范\\n围”。","A. 此申报是为披露公司是否具有可公开查阅的钴采购政策。以“是”或“否”来答复此问题。如果答复“是”,用户应当在问题备注字段指定 URL。此栏必须填写。","B. 此申报是为披露公司的钴采购政策\\n是否阐述了《经合组织尽职调查指南》附录二《示范政策》所述的所有风险,以及是否阐述了童工问题的所有最恶劣的形式。以“是”或“否”来答复此问题。\\n\\n此栏必须填写。\\n\\n“附录二—风险”位于:http://www.oecd.org/daf/inv/mne/OECD-Due-Diligence-Guidance-Minerals-Edition3.pdf.","C. 请答复“是”或“否”,以披露贵公司\\n是否已实施钴采购尽职调查措施。此申报不是为了提供公司的尽职调查措施详情,仅是为了说明公司已实施了尽职调查措施。可接受的尽职调查措施的具体情况应当由请求者和供应商决定。\\n\\n尽职调查措施的示例可能包括:向供应商传达贵公司对负责任钴供应链的预期以及将该等预期纳入到合同中(如可能);确定和评估供应链中的风险;设计和实施战略以应对确定的风险等。这些尽职调查措施的示例与国际公认的经济合作与发展组织指南涵盖的指导方针保持一致性。\\n\\n此栏必须填写。","D. 此申报是要确定公司是否要求其直接\\n供应商按照《经合组织尽职调查指南》针对钴供应链实施尽职调查。以“是”或“否”来答复此问题。应在问题备注字段记录备注。此栏必须填写。","E. 此申报是要确定公司是否要求其直接\\n供应商从经独立验证的冶炼厂处采购钴。\\n以“是”或“否”来答复此问题。应在问题备注字段记录备注。此栏必须填写。","F. 此申报是要确定公司是否要求其供应链\\n中的冶炼厂按照《经合组织尽职调查指南》针对钴供应链实施尽职调查。以“是”或“否”来答复此问题。应在问题备注字段记录备注。此栏必须填写。\\n\\n“附录二—风险”位于:http://www.oecd.org/daf/inv/mne/OECD-Due-Diligence-Guidance-Minerals-Edition3.pdf.","G. 此问题是要披露公司是否要求其供应商\\n填写钴报告模板。接受的答复载列如下,在部分情况中,可能需要进一步解释,即提供用于收集信息的格式。如果答复为“是,使用其他格式”,用户须在问题备注字段提供备注。本问题的允许答复有:\\n\\n- 是,钴报告模板\\n- 是,使用其他格式(请描述)\\n- 否\\n\\n此栏必须填写。","H. 请答复“是”或“否”。在备注部分,\\n您可以提供有关贵公司所采用方法的其他信\\n息。示例可以为:\\n\\n “第三方审计”——由独立第三方进行的供应商现场审计。\\n “仅审核文件编制情况”——由独立第三方和/或贵公司工作人员对供应商提交的记录和文件予以审核。\\n “内部审计”——由贵公司工作人员进行的供应商现场审计。\\n\\n此栏必须填写。","I. 此问题是要披露公司的审核流程是否\\n包括纠正措施管理。以“是”或“否”来答复此问题。须在问题备注字段记录备注。此栏必须填写。","冶炼厂名单工作表的填写说明。只限英文作答\\n\\n注:带星号(*)列表示此区域必须填写。","此模板允许通过冶炼厂查找识别具体的冶炼厂。必须按从左到右的顺序填写 B 列和 C 列,以使用冶炼厂查找功能。\\n对于金属/冶炼厂/国家组合应使用分割线。","1. 冶炼厂识别输入列-如果您知道冶炼厂\\n识别号码,则在 A 列输入号码(B、C、D、\\nE、F、G、I 和 J 列将自动填入)。A 列不会自动填入。","2. 金属(*)- 在下拉菜单中选择\\n正在录入信息的冶炼厂所提炼的金属。","3. 冶炼厂查找 (*) - 从下拉菜单中\\n选择。目录列出了所有直到发布此申报模板时已知的冶炼厂。如果冶炼厂不在目录中时请选择‘冶炼厂没列出’。出现这种情况时请将该冶炼厂的名称输入 D 列。如果您不知道冶炼厂\\n的名称或地点,请选择‘冶炼厂尚未被识\\n别’。对于这个选项,D 和 E 列将会\\n自动填入‘未知’.","4. 冶炼厂名称 (1)- 如果在 C 列选择了\\n“冶炼厂未列出”,则填入冶炼厂名称。当在 C 列选择了冶炼厂名称后,\\n此字段将自动填充。此字段必须填写。","5. 冶炼厂所在国家 (*) - 当在 C 列选择了\\n冶炼厂名称,此字段将自动填充。如果在 C 列选择了“冶炼厂未列出”,则使用下拉菜单选择冶炼厂的国家位置。此栏必须填写。","6. 冶炼厂识别 - 依据冶炼厂和\\n精炼厂识别系统每一冶炼厂或精炼厂均有一独一无二的标识。 相信会有一间冶炼厂或一间\\n精炼厂存在多个名称的情况出现。因此,唯一的冶炼厂标识能将其它名称和别名进行统一。","7. 冶炼厂识别号码 - F 列包括所有的\\n冶炼厂识别号码。如果在 C 列中选出冶炼厂\\n名称,此栏会自动填入。","8. 冶炼厂所在街道 - 提供冶炼厂所在街道的名称。","9. 冶炼厂所在城市 - 提供冶炼厂所在城市的名称。","10. 冶炼厂地点: 州/省(如适用)- 提供冶炼厂所在的州/省。","11. 冶炼厂联系人姓名——钴报告模板 (CRT) 在提出请求的公司的供应链公司\\n中流传,以按照《经济合作与发展组织关于来自受冲突影响和高风险地区矿石的负责任供应链尽职调查指南》执行尽职调查。\\n\\n如果该模板在有保护个人信息立法的国家流\\n传,分享 CRT 中的个人联系信息可能会\\n违反相关法规。因此,建议提出请求的公司采取预防措施,例如获得联系人的相关许可,以在填写“冶炼厂联系人姓名”以及“冶炼厂联系人电子邮件”列时可与供应链中的其他公司分享该信息。\\n\\n如果获得了分享该信息的许可,请填入与贵公司合作的冶炼厂设施联系人姓名。","12. 冶炼厂联系电邮地址 - 填入被确认为冶炼厂联系人的电邮地址作为冶炼厂联系信息。 例如: John.Smith@SmelterXXX.com。 请在填写此栏前阅读冶炼厂联系名称指引。","13. 矿场名称——此字段供公司确定冶炼厂\\n正在使用的实际矿场。如果已知实际矿场的名称,请输入该名称。如果冶炼厂的所有原料均来自回收料或报废料资源,则输入“回收料”或“报废料”以取代矿场名称,并在 P 列回答“是”。","14. 矿场地点(国家)——这是可自由输入\\n文字的字段,供公司注明冶炼厂正在使用的矿场地点。请输入矿场所在国家。如果原产国未知,则输入“不知道”。如果冶炼厂的所有原料均来自回收料或报废料资源,则输入“回收料”或“报废料”以取代原产国。此字段自由选择填写。","15. 表明冶炼厂是否仅从回收料或报废料资源\\n中获取冶炼过程的来料。此问题自由选择答\\n复。本问题的允许答复有:\\n\\n- 是\\n- 否\\n- 不知道","16. 注释 - 用自由的格式的文字栏来输入\\n任何有关冶炼厂的意见。例如:冶炼厂正在被\\nYYY公司收购","检查工作表用于确认模板中的全部必要信息是否均已填妥。该表格实时更新,并在使用模板时可以随时查阅。此工作表用于确认填写完\\n毕。\\n\\n要使用此表,确认已填完所有的必填字段(已填写的字段将用绿色突出显示)。否则请寻找红色的字段,并查阅 C 列中的“备注”并按照\\n指示操作。贵公司可以使用 D 列中的 URL 以直接访问相关字段进行填写。","条款及细则\\n当有任何分歧时,英文版本的冲突矿产报告模板将被视为管控版本。","责任商业联盟冶炼厂目录(“目录”)及计划模板和工具,包括但不限于钴报告模板(统称为“工具”),包括但不限于此处所提供的一切信息,仅供参考之用,并以其上载明日期为准。在目录或工具中,如有任何不准确或遗漏的信息,责任商业联盟 (RBA)(特拉华州注册的非股份公司)\\n概不负责。是否使用和/或如何使用全部或部分目录或任何工具,用户拥有唯一及绝对的决定权​​。使用目录或任何工具之前,您应该向自己的法律顾问征询意见。目录或工具中没有任何一部份会构成法律意见。使用目录或任何工具都是自愿性行为。","RBA 不为目录或任何工具作任何的申述或保证。\\n目录和工具是依据“原样”和“现有”基础来提供。RBA 特此否认任何性质\\n(明示、暗示或其他方式)的所有保证,或因业务或惯例产生的所有保证,包括但不限于适销性、非侵权、质量、所有权、针对特定目的的适用性、完整性或准确性的任何暗示保证。","在适用法律允许的最大范围内,RBA 声明,不对任何性质的损失、费用或损害赔偿金承担任何责任,包括但不限于,因用户使用目录或任何工具而造成或引起的特殊的、偶发的、惩罚性的、直接的、间接的或后果性损害或收入或利润损失,不论是否因侵权行为、合同、条例或其他方式产生,即使已被告知此类损害的可能性。","鉴于对目录和/或任何工具的访问和使用,用户在此同意 (a) 因目录或任何工具\\n或及其使用而导致或产生的用户有过或者可能拥有或声称拥有的对 RBA 及其管理人员、\\n董事、代理、员工、志愿者、代表、承包商、继承人、指定人的任何及全部索赔、起诉、损失、诉讼、损害赔偿、判决、征费和处决,让 RBA 以及其管理人员、董事、代理、\\n员工、志愿者、代表、承包商、继承人、指定人解除并永远免除责任;(b) 保护 RBA 及其管理人员、董事、代理、员工、\\n志愿者、代表、承包商、继承人、指定人,确保他们不承担因用户使用目录或任何工具而导致或产生的任何及全部索赔、起诉、损失、诉讼、损害赔偿、判决、征费和处决。","如果本条款和条件的任何部分被适用法律认为无效或不可执行,该部分将仅因此类无效或不可执行性而无效,但不会以任何方式影响所述条款的剩余部分或上述条款和条件的剩余条款的效力。","访问和使用此目录或任何工具以及考虑此目录和任何工具时,即表示该用户同意上述条款。"],"smelterList":[],"productList":[],"definitions":[{"term":"授权人","definition":"此栏目定义对申报内容负责的责任人.授权人可能与申报内容责任人不一致,故不能填写“相同一样”, 需提供授权人的姓名。"},{"term":"钴精炼厂","definition":"处理钴精矿、中间产品或再循环材料并生产直接用于下游制造工艺的钴产品的实体。"},{"term":"受冲突影响和高风险地区 (CAHRA)","definition":"根据《经合组织尽职调查指南》的定义,受冲突影响和高风险地区 (CAHRA) 是指“识别为\\n存在武装冲突、大面积暴力活动或其他存在使人民遭受伤害风险的地区。武装冲突的形式多种多样,如国际冲突或非国际冲突,可能涉及两个或两个以上国家,可能由解放战争、叛\\n乱、内战等构成。高风险地区可能包括那些政局不稳或存在政治压迫、制度缺陷、不安全因素、民用基础设施崩溃、大面积暴力活动的地区。这类地区的特点往往是大规模侵犯人权、违反国际国内法律等。”"},{"term":"申报范围或类别","definition":"就本模板而言,“范围”明确了申报公司所提供信息的适用性。范围可能涵盖了公司的全部服务和/或产品,或者,根据公司自行决定,模板也可用于报告特定产品,或者可以“自定\\n义”。选择“自定义”范围或类别可以用于说明公司运营或产品组合的任何子集。"},{"term":"尽职调查","definition":"《经济合作与发展组织关于来自受冲突影响和高风险地区矿石的负责任供应链尽职调查指\\n南》(简称“经合组织指南”)将“尽职调\\n查”定义为“一个持续的、主动性和应对性流程,通过该流程,公司可以确保其尊重人权而不会导致冲突。” \\n更多信息可以在 http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/."},{"term":"刚果民主共和国和邻国","definition":"刚果民主共和国及与其分享国际公认的国境线的9个国家:安哥拉、布隆迪、中非共和国、刚果共和国、卢旺达、南苏单、坦桑尼亚、乌干达、赞比亚"},{"term":"独立的私营审核机构","definition":"就冶炼厂审计而言,“独立第三方审计事务\\n所”是指能够按照制定的标准对冶炼厂或精炼厂的尽职调查体系进行评估的私营机构。为保持中立和公正性,此类机构及其审计团队不得与被审单位存在利益冲突。"},{"term":"有目的添加","definition":"“有意添加”通常指故意将某种物质(此处指金属)按设想添加到产品配方中,以持续呈现某种具体的特征、外观或质量。"},{"term":"组织经济合作与发展","definition":"经济合作与发展组织。经合组织制定了《经合组织负责任供应链尽职调查指南》。《经合组织尽职调查指南》内含详细建议,可帮助公司充分尊重人权,避免因其矿物采购的决定和行为而加剧冲突。该指南适用于可能从受冲突影响及高风险地区采购矿物或金属的任何公司。经合组织指南适用于全球范围内的所有矿物供应链。\\n(http://mneguidelines.oecd.org/mining.htm)"},{"term":"产品","definition":"公司的产品或成品是指在制造生产阶段或最后完成阶段的物料或物品,并且已可以交付或销售给客户。"},{"term":"精炼厂","definition":"精炼厂是指从回收料或报废料资源中采购和加工矿石、矿渣和/或原料并由此生成精炼金属或含有中间产品的金属的公司。其产物可以是纯的(99.5% 或以上)金属、粉末、\\n铸块、棒条、颗粒、氧化物或金属盐。术语“冶炼厂”和“精炼厂”在各种出版物中可通\\n用。"},{"term":"回收或废料源","definition":"回收料或报废料资源是指来自回收的最终用户产品或消费后产品的再生钴,或者在产品制造期间产生的钴加工废\\n料。再生钴包括某些多余的、废弃的、缺陷的和废钴等材料,这些材料含有在生产此类金属时适于回收的已精炼或加工金属。再生钴的定义中不包括部分加工、未加工的矿物或者其他矿石的副产品。"},{"term":"责任商业联盟 (RBA)","definition":"责任商业联盟成立于 2004 年,是全球最大的\\n致力于在电子行业供应链中倡导企业责任的行业联盟。\\n(http://www.responsiblebusiness.org)"},{"term":"不使用冲突矿产冶炼厂计划(RMAP)","definition":"不使用冲突矿产冶炼厂计划是由电子行业公民联盟(RBA) 和全球电子可持续发展倡议组织 (GeSI) 来制定用以提高公司对金属责任采购\\n进行查证的能力。 如要了解更多详细的计划信息请登陆http://www.responsiblemineralsinitiative.org/smelter-introduction/"},{"term":"负责任矿物计划 (RMI)","definition":"负责任矿物计划 (RMI) 是由责任商业联盟和全球电子永续\\n倡议组织的成员于 2008 发起成立,\\n已发展成为公司解决其供应链中的冲突矿产问题而最广泛使用和认可的资源之一。今天来自 7 个不同行业的超过 150 家公司加入了 RMI,这些公司贡献了一系列工具和资源,包括负责任矿物审验流程、冲突矿产报告模板、合理原产国查询数据以及各类关于冲突矿产采购的指导文档。RMI 还定期举办关于冲突矿产问题\\n的研讨会,促进政策制订,并且与主要公民社会组织和政府展开辩论。更多信息请访问 http://www.responsiblemineralsinitiative.org/。"},{"term":"RMAP 合规冶炼厂目录","definition":"负责任矿物审验流程 (RMAP) 中的合规冶炼\\n厂目录包含了所有被评估并且符合标准的冶炼厂和精炼厂。其中的标准有负责任矿物审验流程 (RMAP)、负责任矿物计划 (RMI) 或其它对等机构计划(如,责任珠宝委员会或伦敦金银市场协会)。如果冶炼厂或精炼厂不在目录内,则表示其未完成 RMAP 评估或不\\n符合 RMAP 标准要求。\\n\\n要查看经验证符合 RMAP 的冶炼厂和精炼厂\\n目录,请访问 www.responsiblemineralsinitiative.\\norg。"},{"term":"冶炼厂","definition":"冶炼厂是指从回收料或报废料资源中采购和加工矿石、矿渣和/或原料并由此生成精炼金属或含有中间产品的金属的公司。其产物可以是纯的(99.5% 或以上)金属、粉末、铸块、\\n棒条、颗粒、氧化物或金属盐。术语“冶炼\\n厂”和“精炼厂”在各种出版物中可通用。"},{"term":"冶炼厂识别序号","definition":"RMI 为一些公司指定的唯一识别号,这些公司被供应链中的成员报告为冶炼厂或精炼厂,无论它们是否经过验证符合 RMAP 审计标准或其他适用审计计划所定义的冶炼厂或精炼厂的特征。"}],"smelterLookup":["以下目录是截至此模板发布时 RBA 的最新冶炼厂名称/别名信息。  此目录会适时更新。  冶炼厂存在于此目录中并不保证它就是独立第三方审计计划内的目前有效或合规的冶炼厂。\\n\\n在 B 列中包括的名称表示供应链对于特定冶炼厂\\n通常认可和报告使用的公司名称。这些名称可能包括公司曾用名、备用名称、简称或其他变体。虽然这些名称可能不是标准冶炼厂名称,但参考名称有助于识别列在“冶炼厂查找”中 C 列下的\\n冶炼厂。\\n\\n在 ASCII 字符集中,C 列是正式标准冶炼厂名\\n称目录。大多数冶炼厂的这两列具有相同的条目,然而,如果常用名称与标准名称不同,则在 B 列中注明这种变化。"]}},"amrt":{"1.3":{"instructions":["RMI 网址:(www.responsiblemineralsinitiative.org) 培训和指导、模板、负责任矿物审验流程合规冶炼厂列表。","介绍","额外矿物报告模板 (AMRT)是由负责任矿物计划 (RMI) 创建的免费标准报告模板。该模板促进了通过关于矿产原产国、所用冶炼厂和精炼厂的供应链来进行信息传输,并且支持法律合规性*。该模板还促进识别新的冶炼厂和精炼厂,以通过负责任矿物审验流程,对这些厂家进行潜在审核**。\\n\\nAMRT 旨在让下游企业披露其供应链有关的信息(准确来讲,不包括冶炼厂)。如果贵公司是冶炼厂或精炼厂,根据 RMAP 协议,我们建议您在冶炼厂列表选项卡中输入贵公司的名称。\\n\\n填写表格时,单元格条目不应以“=”或“#”开头。","* 在 2010年,关注来源于刚果民主共和国 (DRC) 或毗邻国家或地区“冲突矿产”的《多德-弗兰克华尔街金融改革与消费者保护法》(U.S. Dodd-Frank Wall Street Reform and Consumer Protection Act) 正式通过。SEC 公布了最终规则,要求所有美国上市公司披露冲突矿产来源(有关规则,请访问 http://www.sec.gov/rules/final/2012/34-67716.pdf)。该规则参考了“经济合作与发展组织关于来自冲突影响和高风险区域之矿石的负责任供应链尽职调查指南”(http://www.oecd.org/dataoecd/62/30/46740847.pdf),明确了供应商如何制定政策、尽职框架和管理体系。\\n** 有关信息,请参见“负责任矿物计划”(www.responsiblemineralsinitiative.org)。\\n2017 年,欧洲议会和理事会 2017 年 5 月 17 日第 2017/821 号条例(欧盟)通过,该条例规定了进口源自受\\n冲突影响和高风险地区的锡、钽和钨及其矿石以及黄金的欧盟进口商的供应链尽职调查义务(请参见 https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=OJ:L:2017:130:FULL&from=EN)","公司信息的填写说明(第 8 至 26 行)。\\n请仅以英文作答","注:带星号 (*) 的字段为必填。","1. 插入贵公司的法定名称。请勿使用缩写。在此字段中,您可以选择添加其他商业名称、营业名称等。","2. 选择贵公司的申报范围。范围选项为:\\n\\nA. 全公司\\nB. 产品(或产品列表)\\nC. 用户自定义 \\n\\n对于“全公司”,申报涵盖公司产品或母公司生产的产品物质整体。如果用户在公司级别中报告矿产数据,他们将报告关于其生产的所有产品的矿产数据。\\n\\n如果选择范围为“产品(或产品列表)”,将显示产品列表的工作表选项卡。如果选择了此范围,则必须在“产品列表”工作表的 B 列中列出此申报范围涵盖的产品制造商产品序号。可选择是否在“产品列表”工作表的 C 列中列出制造商的产品名称。\\n\\n如果选择范围为“用户自定义”,用户必须描述矿产披露适用的范围。此类范围应由供应商在文本字段内予以定义,并确保客户或文档接收人可以清楚理解。例如,公司可提供链接来说明信息。\\n\\n此为必填字段。","3. 决定贵公司的矿产申报范围(最多 10 种)。提出请求的公司必须说明哪些矿产属于申报范围。问题 1 和 2 会自动填充的矿产。\\n\\n矿产不包括 3TG(锡、钽、钨和金)、钴、铜、石墨、锂、云母和/或镍,因为它们已包含在 CMRT 和 EMRT 中。\\n\\n这是必填项。","4. 如果您申报的矿产范围包括“其他”,请在此处填写其他矿产名称。提出请求的公司必须说明哪些矿产属于申报范围。问题 1 和 2 会自动填充选定的矿产。\\n\\n如果在矿产/金属申报范围中至少选择了 1 次“其他”,则此为必填项.","4. 插入贵公司的唯一识别序号或编号(DUNS 号码、VAT 号码、客户特定识别码等)","5. 插入唯一识别序号或代码出处(例如“DUNS”、“VAT”、“客户”等)","6. 插入贵公司的完整地址(街道、城市、州、国家或地区、邮政编码)。此为必填字段。","7. 插入对此申报信息内容负责的联系人姓名。此为必填字段。","8. 插入联系人的电子邮件地址。如果没有电子邮件地址,请说明“无”或“不适用”。如留空此字段,会导致此表格出错。此为必填字段。","9. 插入联系人的电话号码。此为必填字段。","10. 插入负责申报信息内容的人员姓名。授权人可能与联系人不同。请勿填写“相同”或相似信息,而需提供授权人的姓名。此为必填字段。","11. 输入授权人的职位。 此为选填字段。","12. 输入授权人的电子邮件地址。如果没有电子邮件地址,请声明“无”或“不适用”。如留空此字段,会导致表格出错。此为必填字段。","13. 插入授权人的电话号码。此字段自由选择填写。","14. 请使用“日-月-年”的格式输入申报日期。此为必填字段。","15. 例如,用户应将文件名保存为“公司名-日期.xls”(日期格式为年-月-日)。","两个尽职调查问题的填写指南(第 26 至 49 行)。\\n请仅以英文作答。","这两个题明确了每种金属的用途和相关供应商的数据收集水平。这些问题旨在收集关于公司产品中矿产使用情况的信息,以确定法规适用情况。答案应与公司信息部分所选择的“申报范围”相对应。此部分中的答案可用于确定矿产报告的使用情况和完整性。","针对两个问题,请从下拉菜单选择您的回答。本章节的第一个问题必须针申请范围内的特定金属填写.","1. 此问题的答复用来确定任何特定矿产是否属于报告要求的范围。\\n\\n此问题询问是否有任何矿产在贵公司生产或外包生产的产品中用作原材料、组件或添加物(包括原材料和组件)。原材料、组件、添加物、磨具和切削工具中的杂质不在此调查范围。\\n\\n必须为每种特定矿产回答此问题。此问题的有效答复为“是”、“否”、“不知道”或“未申报”。此问题必须作答。","如果申报范围内的任何矿产特意添加到供应链的任意部份,它们就会被认为是特意添加到产品中。\\n\\n有些公司可能会要求为“否”的答案举证,此时需要在意见栏填写你的回复。","2. 这一问题以确定公司是否收到了所有直接供应商的相关矿产披露,这些供应商有理由被认为提供其申报范围所涵盖的产品中所含的申报矿产。\\n\\n- 100%\\n- Greater than 90%\\n- Greater than 75%\\n- Greater than 50%\\n- 50% or less\\n- None\\n- Unknown\\n- Did not survey","如果贵公司对问题 2 就任何矿产答复为“100%”,则贵公司需要提供所有被确定为加工贵公司供应链中使用的金属的冶炼厂名称,以使答复完整。\\n\\n部分公司可能要求贵公司如何定义“相关”供应商的证据,这些证据应当输入备注字段。如果贵公司尚未从贵公司相关供应商处得到 100% 答复,请提交贵公司表明相应百分比的试点报告模板,并继续调查贵公司的供应商。被调查的贵公司供应商百分比的提高可看作每年改善的一种标志。\\n\\n部分公司可能要求对答复“Did not survey (未调查)”的任何矿产提供进一步证据,应在“备注”字段输入这些证据。","“Minerals Scope”(矿物范围)选项卡的填写说明。请仅以英文作答。","强烈建议申请人先填写“Minerals Scope”(矿物范围)选项卡,然后再提交 AMRT 调查。","1. 选择属于申报范围的矿产 - 金属下拉菜单将根据您在“Declaration”(申报)页面的矿物范围列表自动填充结果。使用下拉菜单选择您要纳入 AMRT 的金属,在之后提供原因。","2. 纳入 AMRT 的原因 - 详细解释申请指定矿物数据的原因。原因示例包括矿物风险概况(包括在 Material Insights 平台上找到的概况),以及监管要求。","冶炼厂列表选项卡的填写说明。请仅以英文作答","注:带星号 (*) 列表示必填字段。","1. 冶炼厂识别输入列-如果您知道冶炼厂\\n识别号码,则在 A 列输入号码(B、C、D、\\nE、F、G、I 和 J 列将自动填入)。A 列不会自动填入。","2. 金属 (*) - 在下拉菜单中,选择正在输入信息的冶炼厂所提炼的金属。 此为必填字段。","3. 冶炼厂名称 (*) - 此为必填字段。","4. 冶炼厂所在国家或地区 (*) - 请使用下拉菜单,选择冶炼厂所在国家或地区。此为必填字段。","5. 冶炼厂识别 - 依据冶炼厂和精炼厂识别系统每一冶炼厂或精炼厂均有一独一无二的标识。相信会有一间冶炼厂或一间精炼厂存在多个名称的情况出现。 因此,唯一的冶炼厂标识能将其他名称和别名进行统一。","6. 冶炼厂识别号颁发者 - 这是 D 栏中输入的冶炼厂识别号的颁发者。","7. 冶炼厂所在街道 - 提供冶炼厂所在街道的名称。此为选填字段。","8. 冶炼厂所在城市 - 提供冶炼厂所在城市的名称。此为选填字段。","9. 冶炼厂地点:州/省(如适用)- 提供冶炼厂所在的州/省。此为选填字段。","10. 冶炼厂联系人名称 - 如果在统一使用此报告模板中,所在国家或地区有保护个人信息的法律法规,填写个人联系信息会有可能触犯法律法规,则建议申报公司在填写“冶炼厂联系人姓名”和“冶炼厂联系人电子邮件”列时,先确保联系人本人同意公开其联系信息。 。\\n\\n如果申报人已获得公开联系信息的授权信息,请输入与之合作的冶炼厂之联系人姓名。","11. 冶炼厂联系人电子邮件 - 填写被确定为冶炼厂联系人的电子邮件。例如: John.Smith@SmelterXXX.com。填写此字段栏前,请阅读冶炼厂联系人姓名填写指引。","12. 这是一个评论区,允许公司指定下一步管理冶炼厂的步骤。 如果该设施未列在负责任矿物审验流程 (RMAP) 无冲突冶炼厂计划合规冶炼厂列表,您可以对冶炼厂采取这些措施。 示例:要求通过 RMAP 评估冶炼厂设施,从首选供应商名单中删除等。","13. 矿场名称 - 此字段可让公司为冶炼厂正在使用的实际矿场取名。如果已知实际矿场的名称,请输入该名称。如果冶炼厂的所有原料均来自回收料或报废料资源,则输入“回收料”或“报废料”以取代矿场名称,并在 P 列回答“是”。\\n\\n“根据 RMI 确认 RCOI”可能是该问题可接受的回答之一。","14. 矿场地点(国家或地区)- 无限制文本字段,公司可在此注明冶炼厂正在使用的矿场地点。请输入矿场所在国家或地区。如果原产国未知,则输入“未知”。如果冶炼厂的所有原料均来自回收料或报废料资源,则输入“回收料”或“报废料”以取代原产国。此为选填字段。\\n\\n“根据 RMI 确认 RCOI”可能是该问题可以接受的回答之一。","15. 表明冶炼厂是否仅从回收料或报废料资源中获取冶炼过程的来料。此为选答问题。本问题允许的回答包括:\\n\\n- 是\\n- 否\\n- 未知","16. 注释 - 无格式限制的文字栏,可输入有关冶炼厂的任何意见。例如:冶炼厂正在被 YYY 公司收购","矿厂列表选项卡的填写说明。请仅以英文作答。","1. 金属 - 在下拉菜单中,选择正在输入信息的矿厂所提炼的金属。","2. 从该矿厂采购的冶炼厂的名称 - 请尽可能填写从所列矿厂或矿场采购的冶炼厂的名称。","3. 矿厂名称 - 提供矿厂的名称。","4. 矿厂识别 - 依据矿厂识别系统每一矿厂均有一独一无二的标识。相信会有一间矿厂存在多个名称的情况出现。 因此,唯一的矿厂标识能将其他名称和别名进行统一。","5. 矿厂识别号颁发者 - 这是 D 栏中输入的矿厂识别号的颁发者。","6. 矿厂识别号颁发者 - 这是 D 栏中输入的矿厂识别号的颁发者。","7. 矿厂所在街道 - 提供矿厂所在街道的名称。","8. 矿厂所在城市 - 提供矿厂所在城市的名称。","9. 矿厂地点:州/省(如适用)- 提供矿厂所在的州/省。","10. 矿厂联系人名称 - 如果在统一使用此报告模板中,所在国家或地区有保护个人信息的法律法规,填写个人联系信息会有可能触犯法律法规,则建议申报公司在填写“矿厂联系人姓名”和“矿厂联系人电子邮件”列时,先确保联系人本人同意公开其联系信息。 。\\n\\n如果申报人已获得公开联系信息的授权信息,请输入与之合作的矿厂之联系人姓名。","11. 矿厂联系人电子邮件 - 填写被确定为矿厂联系人的电子邮件。例如: John.Smith@MineXXX.com。填写此字段栏前,请阅读矿厂联系人姓名填写指引。","12. 这是一个评论区,允许公司指定下一步管理矿厂的步骤。 如果该设施未列在负责任矿物审验流程 (RMAP) 合规矿厂列表,您可以对矿厂采取这些措施。 示例:要求通过 RMAP 评估矿厂设施,从首选供应商名单中删除等。","13. 注释 - 无格式限制的文字栏,可输入有关矿厂的任何意见。例如:矿厂正在被 YYY 公司收购","检查工作表用于确认是否所有此模板中需要的信息均已提供、是否实时更新和是否经得起任何在填申报时进行查阅。 此工作表用于确认申报完毕。\\n\\n用此表检查是否已填妥所有字段(已填字段将高亮显示为绿色)。如果不是,请检查显示红色的字段,并阅读 C 列中的备注信息,并按指示操作。填表人可用 D 列中的 URL 直接进入要填写的字段。","条款及细则","负责任矿物审验流程(“流程”)、合规冶炼厂列表(“列表”)及报告模板和工具表,包括但不限于冲突矿产报告模板(统称为“工具”),所提供的一切信息仅供参考之用,并以其上载日期为准。在列表或工具表中,如有任何不准确或遗漏的信息,均非特拉华州非股份公司责任商业联盟 (RBA) 的责任所在。是否使用和/或如何使用列表上的全部资料或部分资料或使用任何工具,用户拥有唯一及绝对的决定权​​。使用列表或任何工具之前,请向自己的法律顾问征询意见。列表或工具中没有任何一部份会构成法律咨询。使用列表或任何工具均属自愿。","RBA 皆不会为名单或任何工具作任何的申述或保证。列表和工具依据“原样”和“现有”来提供。RBA 特此声明,不做任何性质的保证、明示、暗示或其他方式,或说明贸易或关税,包括但不限于任何隐含的适销性、非侵权性、质量、标题、为某一特定用途的适用性而作完整性或准确性的保证。","根据相关法律所允许的最大限度,RBA 声明拒绝任何损失、费用或任何性质的损害之责任,包括但不限于因用户使用名单或工具表而造成特殊、偶然、惩罚性、直接、间接的或后果性损害或失去收入或利润,无论是以侵权、合同、章程或其他方式造成的损害,即使他们已被告知有这种损害的可能性。","鉴于对列表和/或工具表单的使用,用户在此同意:a) 让 RBA 及其相关管理人员、董事、代理、员工、志愿者、代表、承包商、继承人、指定人解除并永远免除责任,而不会因使用列表或任何工具导致或产生的任何及全部索赔、行动、损失、诉讼、损害、判决、征费和处决而受损,这包括用户有过或曾经可以、应当或者可能拥有或声称拥有对 RBA 及其相关管理人员、董事、代理、员工、志愿者、代表、承包商、继承人、指定人的索赔;b) 保障和捍卫 RBA 及其相关管理人员、董事、代理、员工、志愿者、代表、承包商、继承人、指定人的权利,确保其不会因用户使用列表或任何工具而导致或产生的任何及全部索赔、行动、损失、诉讼、损害、判决、征费和处决而受损。","如果此条款及细则的某个条款部分在法律下无效或不可执行,被视为无效的部分应仅限于该无效或不能强制执行的部份,而不以任何方式影响到条款及细则的其余条款。"],"smelterList":[],"productList":[],"definitions":[{"term":"铝加工厂","definition":"铝加工厂是将铝土矿转化为氧化铝或将氧化铝冶炼成铝的工厂。铝加工厂还包括将二次材料(回收材料、报废产品)转化为铝金属或铝合金的工厂。"},{"term":"授权人","definition":"此字段定义负责申报内容的人员。授权人可能与联络人不同。请勿填写“相同”或相似信息,需提供授权人的姓名。"},{"term":"受冲突影响和高风险地区 (CAHRA)","definition":"受冲突影响和高风险的地区是处于武装冲突状态的地区,脆弱的冲突后地区以及治理和安全薄弱或根本不存在的地区,例如失败的国家,广泛而系统地违反国际法的地区,包括侵犯人权行为。"},{"term":"申报范围或种类","definition":"为实现本模板的设计目的,“申报范围”明确了申报公司所申报信息的适用性。申报范围可能涵盖了整间申报公司所提供的产品和服务或其部份适用的产品和服务。此模板也可用于单一、多种或申报人自定义的产品。 “用户自定义”的申报范围可用于仅部分公司营运适用或部分产品系列适用的情况。"},{"term":"尽职调查","definition":"《经济合作与发展组织关于来自受冲突影响和高风险地区矿石的负责任供应链尽职调查指\\n南》(简称“经合组织指南”)将“尽职调\\n查”定义为“一个持续的、主动性和应对性流程,通过该流程,公司可以确保其尊重人权而不会导致冲突。” \\n更多信息可以在 http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/."},{"term":"独立的第三方审核机构","definition":"冶炼厂审核中提到的“独立的第三方审核机构”是私营部门组织,它评估冶炼厂或精炼厂对物料的可追朔性是否达到负责任矿物审验流程 (RMAP) 中的标准或相关审核标准。为确保中立及公正,这类机构及其审核团队必须与被审核方无利益交往。"},{"term":"有意添加","definition":"针对性添加通常被认为有目的地在产品构成中使用某种物料,这里特指某种金属,从而持久地获得某种特性,观感或质量。\\n\\n而美国证券交易委员会没有在最终规则* 里为措辞“有针对性添加”进行定义。最终规则里对此的序文表示为:\\n“我们认为有针对性地添加,而不是产品天然拥有,是一个判断冲突矿产是否必须在产品功能或生产制造中的重要因素。这与谁添加无关,只在乎冲突矿产有否存在于产品中。决定冲突矿产对产品是否需要,并非取决于冲突矿产是否直接添加进产品或直接添加进来自第三方的产品部件。所以,申报人必须报告含冲突矿产产品的总数,并与供应商合作共同遵守要求。 在判断产品中的冲突矿产是否需要时,申报人必须考虑其产品中有否冲突矿产,即使是原本就存在于由供应商提供的零部件中。”\\n\\n*(56296 Federal Register / Vol. 77, No. 177 / Wednesday, September 12, 2012 / Rules and Regulations)"},{"term":"铁加工厂","definition":"铁加工厂是将铁矿石或废钢转化为生铁、粗钢、精炼钢、低合金或高合金钢的工厂。"},{"term":"矿厂(矿场)","definition":"矿厂或矿场是原材料的采挖点。"},{"term":"经济合作与发展组织(Organization for Economic Co-operation and Development,OECD)","definition":"经济合作与发展组织"},{"term":"加工厂","definition":"执行浓缩或纯化工艺,以去除原材料中所有混杂成分、分离出所需元素的工厂。这包括但不限于:清洁、分离、浓缩(例如,通过机械、加热或化学方法将有价值矿物与不需要的脉石分离)、焙烧(例如,冶炼、焙烧或其他去除杂质的方法)、阴极和阳极电解生产和其他精炼工艺。"},{"term":"产品","definition":"公司的产品或成品是指在制造生产阶段或最后完成阶段的物料或物品,并且已可以交付或销售给客户。"},{"term":"稀土元素精炼厂","definition":"稀土元素精炼厂是将稀土元素精矿或由离子吸附粘土浸出的稀土元素沉淀物转化为稀土氧化物、稀土元素金属或任何中间产品的工厂。"},{"term":"责任商业联盟(Responsible Business Alliance,RBA)","definition":"责任商业联盟 (www.responsiblebusiness.org)"},{"term":"负责任矿物审验流程 (RMAP)","definition":"负责任矿物审验流程 (RMAP) 是由责任商业联盟 (RBA) 所制定,用于提高公司对金属责任采购进行查证的能力。有关 RMAP 的更多信息,请访问 http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/。"},{"term":"负责任矿物计划","definition":"负责任矿物计划由责任商业联盟 (RBA) 于 2008 年发起成立,并已成为公司供应链就冲突矿产问题而最广泛使用和认可的标准。 今天,来自许多行业的超过 460 家公司加入了负责任矿物计划,共同促成了一系列查证工具和资源的落实,例如负责任矿物审验流程、冲突矿产报告模板、合理的原产国信息查询和一系列无冲突矿产采购指引。另外,负责任矿物计划组织还会定期举办关于冲突矿产专题的工作坊、参与政策制度的修定、与前沿的社会团体和政府机构研讨等。有关更多信息,请造访 http://www.responsiblemineralsinitiative.org"},{"term":"无冲突冶炼厂计划合规冶炼厂列表","definition":"负责任矿物审验流程 (RMAP) 中的合规冶炼厂列表包含所有被评估并且符合标准的冶炼厂和精炼厂。其中的标准有负责任矿物审验流程 (RMAP)、负责任矿物计划 (RMI) 或其他对等机构计划(例如责任珠宝委员会或伦敦金银市场协会)。如果冶炼厂或精炼厂不在列表内,则表示其未完成 RMAP 评估或不符合 RMAP 标准要求。\\n\\n要查看经验证符合 RMAP 的冶炼厂和精炼厂列表,请访问 www.responsiblemineralsinitiative.org。"},{"term":"冶炼厂","definition":"冶炼厂或精炼厂是指购买并加工矿石、矿渣、回收料、报废料从而提炼成金属或含金属的介质。产品有纯度为 99.5% 或更高的金属、金属粉体、金属锭、金属条、金属粒子、金属氧化物、金属盐类等。术语“冶炼厂”和“精炼厂”和“加工厂”在各类型的刊物经常互用。"},{"term":"冶炼厂识别序号","definition":"负责任矿物计划 (RMI) 会编发独一无二的识别号码给由供应链成员申报上来的冶炼厂或精炼厂,无论其是否已确认过符合负责任矿物审验流程 (RMAP) 中审核标准所定义冶炼厂的物征。"},{"term":"锌加工厂","definition":"锌加工厂是将硫化锌精矿、锌钙(由焙烧获得)或氧化锌(由回收获得)转化为特殊高品位锌 (SHG) 或任何中间产品(例如锌钙)的设施。"}],"mineList":[],"smelterLookup":["以下目录是截止此模板发布时 RMI 的最新冶炼厂名称/别名信息。此目录实时更新,可于下述 RMI 网站查询最新版本:http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/exports/cmrt-export/。冶炼厂存在于此目录中不保证它就是负责任矿物审验流程内的目前有效或合规的冶炼厂。\\n\\n有关有效或合规标准冶炼厂名称的最新准确列表,请访问 RMI 网站 www.responsiblemineralsinitiative.org。\\n\\nB 列包括的名称表示供应链对于特定冶炼厂通常认可和报告使用的公司名称。这些名称可能包括公司曾用名、备用名称、简称、或其他变体。虽然这些名称可能不是 RMI 标准冶炼厂名称,但参考名称有助于识别列在冶炼厂查找中的 C 列之冶炼厂。\\n\\n在 ASCII 字符集中,C 列是正式标准冶炼厂名称列表。大多数冶炼厂的这两列具有相同条目,然而,如果常用名称与标准名称不同,则应在 B 列中注明这种变化。"]}}}'),Z1={minerals:{tooManySelected:"选择的矿产过多",selectAtLeastOne:"请至少选择一种矿产",enterAtLeastOne:"请至少填写一种矿产",otherRequired:"选择“其他”后需填写矿产名称",otherNotAllowed:"未选择“其他”时请清空矿产名称",tooMany:"填写的矿产过多"},companyQuestions:{commentRequired:"请填写备注"},required:"必填",date:{invalid:"日期格式无效(DD-MMM-YYYY)"},email:{invalid:"邮箱格式无效"},externalPickFailedTitle:"外部选择失败",externalPickFailedContent:"外部选择器未能成功返回数据,请重试。"},H1={common:T1,templates:x1,tabs:_1,sections:I1,notices:R1,badges:N1,conditions:M1,placeholders:q1,productPlaceholders:A1,hints:L1,tables:E1,actions:P1,confirm:D1,selection:$1,options:O1,minerals:F1,questions:z1,companyQuestions:j1,productList:B1,fields:K1,docStatus:Q1,checker:U1,revision:G1,docs:Y1,errors:Z1},ia={"en-US":{translation:k1},"zh-CN":{translation:H1}},V1=()=>{je.use(fo.initReactI18next),fo.initReactI18next.init(je)};function kc(e="en-US"){return je.isInitialized?(V1(),Object.entries(ia).forEach(([t,n])=>{je.addResourceBundle(t,"translation",n.translation,!0,!1)}),je.language!==e&&je.changeLanguage(e),je):(je.use(fo.initReactI18next).init({resources:ia,lng:e,fallbackLng:"en-US",initImmediate:!1,interpolation:{escapeValue:!1}}),je)}function W1(){return je.isInitialized}function J1(e){const t={};return e.layout?.contentMaxWidth&&(t["--cm-content-max-width"]=e.layout.contentMaxWidth),e.layout?.pagePadding&&(t["--cm-page-padding"]=e.layout.pagePadding),e.layout?.sectionGap&&(t["--cm-section-gap"]=e.layout.sectionGap),e.layout?.stepNavPadding&&(t["--cm-step-nav-padding"]=e.layout.stepNavPadding),e.fieldRequired?.background&&(t["--cm-field-required-bg"]=e.fieldRequired.background),e.fieldRequired?.border&&(t["--cm-field-required-border"]=e.fieldRequired.border),e.fieldFocus?.shadowColor&&(t["--cm-field-focus-shadow-color"]=e.fieldFocus.shadowColor),e.animation?.duration&&(t["--cm-transition-duration"]=e.animation.duration),e.animation?.easing&&(t["--cm-transition-easing"]=e.animation.easing),e.fontSize?.xs&&(t["--cm-font-size-xs"]=e.fontSize.xs),e.fontSize?.sm&&(t["--cm-font-size-sm"]=e.fontSize.sm),e.fontSize?.base&&(t["--cm-font-size-base"]=e.fontSize.base),e.fontSize?.lg&&(t["--cm-font-size-lg"]=e.fontSize.lg),e.component?.buttonMinWidth&&(t["--cm-button-min-width"]=e.component.buttonMinWidth),e.component?.placeholderHeight&&(t["--cm-placeholder-height"]=e.component.placeholderHeight),e.component?.formControlMaxWidth&&(t["--cm-form-control-max-width"]=e.component.formControlMaxWidth),e.grid?.questionMatrixLabelWidth&&(t["--cm-question-matrix-label-width"]=e.grid.questionMatrixLabelWidth),e.grid?.questionMatrixAnswerWidth&&(t["--cm-question-matrix-answer-width"]=e.grid.questionMatrixAnswerWidth),e.grid?.companyQuestionLabelWidth&&(t["--cm-company-question-label-width"]=e.grid.companyQuestionLabelWidth),e.grid?.companyQuestionAnswerWidth&&(t["--cm-company-question-answer-width"]=e.grid.companyQuestionAnswerWidth),e.spacing?.listItemPadding&&(t["--cm-list-item-padding"]=e.spacing.listItemPadding),e.spacing?.emptyStatePadding&&(t["--cm-empty-state-padding"]=e.spacing.emptyStatePadding),t}const X1={cssVar:{prefix:"ant"},token:{colorPrimary:"#1565c0",colorPrimaryHover:"#1976d2",colorPrimaryActive:"#0d47a1",colorPrimaryBg:"#e3f2fd",colorPrimaryBorder:"#90caf9",colorSuccess:"#2e7d32",colorSuccessBg:"#e8f5e9",colorSuccessBorder:"#4caf50",colorWarning:"#f57c00",colorWarningBg:"#fff3e0",colorWarningBorder:"#ff9800",colorError:"#c62828",colorErrorBg:"#ffebee",colorErrorBorder:"#ef5350",colorInfo:"#0288d1",colorInfoBg:"#e1f5fe",colorInfoBorder:"#03a9f4",colorText:"#212121",colorTextSecondary:"#757575",colorTextTertiary:"#9e9e9e",colorTextHeading:"#212121",colorTextDescription:"#757575",colorBgLayout:"#f5f5f5",colorBgContainer:"#ffffff",colorBgElevated:"#ffffff",colorBorder:"#e0e0e0",colorBorderSecondary:"#eeeeee",colorFillSecondary:"#eeeeee",colorFillTertiary:"#f5f5f5",colorFillQuaternary:"#fafafa",borderRadius:6,borderRadiusLG:8,borderRadiusSM:4,borderRadiusXS:2,fontFamily:"'IBM Plex Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",fontFamilyCode:"'JetBrains Mono', 'Fira Code', 'Consolas', monospace",fontSize:14,boxShadow:"0 1px 2px rgba(0, 0, 0, 0.05)",boxShadowSecondary:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"}},{useToken:ek}=y.theme,tk=[["--app-bg-layout","colorBgLayout"],["--app-bg-container","colorBgContainer"],["--app-bg-elevated","colorBgElevated"],["--app-text","colorText"],["--app-text-secondary","colorTextSecondary"],["--app-text-tertiary","colorTextTertiary"],["--app-text-heading","colorTextHeading"],["--app-text-description","colorTextDescription"],["--app-border","colorBorder"],["--app-border-secondary","colorBorderSecondary"],["--app-split","colorSplit"],["--app-primary","colorPrimary"],["--app-primary-bg","colorPrimaryBg"],["--app-primary-border","colorPrimaryBorder"],["--app-info","colorInfo"],["--app-info-bg","colorInfoBg"],["--app-info-border","colorInfoBorder"],["--app-success","colorSuccess"],["--app-success-bg","colorSuccessBg"],["--app-success-border","colorSuccessBorder"],["--app-warning","colorWarning"],["--app-warning-bg","colorWarningBg"],["--app-warning-border","colorWarningBorder"],["--app-error","colorError"],["--app-error-bg","colorErrorBg"],["--app-error-border","colorErrorBorder"],["--app-fill-secondary","colorFillSecondary"],["--app-fill-tertiary","colorFillTertiary"],["--app-fill-quaternary","colorFillQuaternary"],["--app-bg-text-hover","colorBgTextHover"],["--app-bg-text-active","colorBgTextActive"]];function nk(e,t,n){const o=n?.[e];if(typeof o=="string"&&o.length>0)return`var(${o})`;const r=t[e];return r==null?"":String(r)}function ok(e,t){return tk.reduce((o,[r,i])=>(o[r]=nk(i,e,t),o),{})}function rk({children:e,cssVariables:t}){const n=ek(),o=ok(n.token,n.cssVar),r=t?J1(t):{},i={...o,...r};return p.jsx("div",{style:i,children:e})}var ln={},br={exports:{}},sa;function on(){return sa||(sa=1,(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(br)),br.exports}var cn={},aa;function ik(){if(aa)return cn;aa=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.default=void 0;const e={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"};return cn.default=e,cn}var un={},mn={},dn={},pn={},la;function Tc(){return la||(la=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.commonLocale=void 0,pn.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}),pn}var ca;function sk(){if(ca)return dn;ca=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.default=void 0;var e=Tc();function t(l){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},t(l)}function n(l,c){var u=Object.keys(l);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(l);c&&(f=f.filter(function(m){return Object.getOwnPropertyDescriptor(l,m).enumerable})),u.push.apply(u,f)}return u}function o(l){for(var c=1;c<arguments.length;c++){var u=arguments[c]!=null?arguments[c]:{};c%2?n(Object(u),!0).forEach(function(f){r(l,f,u[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(u)):n(Object(u)).forEach(function(f){Object.defineProperty(l,f,Object.getOwnPropertyDescriptor(u,f))})}return l}function r(l,c,u){return c=i(c),c in l?Object.defineProperty(l,c,{value:u,enumerable:!0,configurable:!0,writable:!0}):l[c]=u,l}function i(l){var c=s(l,"string");return t(c)=="symbol"?c:String(c)}function s(l,c){if(t(l)!="object"||!l)return l;var u=l[Symbol.toPrimitive];if(u!==void 0){var f=u.call(l,c);if(t(f)!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(l)}var a=o(o({},e.commonLocale),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",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",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"});return dn.default=a,dn}var fn={},ua;function xc(){if(ua)return fn;ua=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.default=void 0;const e={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};return fn.default=e,fn}var ma;function _c(){if(ma)return mn;ma=1;var e=on().default;Object.defineProperty(mn,"__esModule",{value:!0}),mn.default=void 0;var t=e(sk()),n=e(xc());const o={lang:{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"],...t.default},timePickerLocale:{...n.default}};return mn.default=o,mn}var da;function ak(){if(da)return un;da=1;var e=on().default;Object.defineProperty(un,"__esModule",{value:!0}),un.default=void 0;var t=e(_c());return un.default=t.default,un}var pa;function lk(){if(pa)return ln;pa=1;var e=on().default;Object.defineProperty(ln,"__esModule",{value:!0}),ln.default=void 0;var t=e(ik()),n=e(ak()),o=e(_c()),r=e(xc());const i="${label} is not a valid ${type}",s={locale:"en",Pagination:t.default,DatePicker:o.default,TimePicker:r.default,Calendar:n.default,global:{placeholder:"Please select",close:"Close",sortable:"sortable"},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:i,method:i,array:i,object:i,number:i,date:i,boolean:i,integer:i,float:i,regexp:i,email:i,url:i,hex:i},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}"}}},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};return ln.default=s,ln}var wr,fa;function ck(){return fa||(fa=1,wr=lk()),wr}var uk=ck();const mk=Ct(uk);var hn={},yn={},ha;function dk(){if(ha)return yn;ha=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.default=void 0;const e={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"};return yn.default=e,yn}var gn={},bn={},wn={},ya;function pk(){if(ya)return wn;ya=1,Object.defineProperty(wn,"__esModule",{value:!0}),wn.default=void 0;var e=Tc();function t(l){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},t(l)}function n(l,c){var u=Object.keys(l);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(l);c&&(f=f.filter(function(m){return Object.getOwnPropertyDescriptor(l,m).enumerable})),u.push.apply(u,f)}return u}function o(l){for(var c=1;c<arguments.length;c++){var u=arguments[c]!=null?arguments[c]:{};c%2?n(Object(u),!0).forEach(function(f){r(l,f,u[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(u)):n(Object(u)).forEach(function(f){Object.defineProperty(l,f,Object.getOwnPropertyDescriptor(u,f))})}return l}function r(l,c,u){return c=i(c),c in l?Object.defineProperty(l,c,{value:u,enumerable:!0,configurable:!0,writable:!0}):l[c]=u,l}function i(l){var c=s(l,"string");return t(c)=="symbol"?c:String(c)}function s(l,c){if(t(l)!="object"||!l)return l;var u=l[Symbol.toPrimitive];if(u!==void 0){var f=u.call(l,c);if(t(f)!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(l)}var a=o(o({},e.commonLocale),{},{locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",week:"周",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪",yearFormat:"YYYY年",cellDateFormat:"D",monthBeforeYear:!1});return wn.default=a,wn}var vn={},ga;function Ic(){if(ga)return vn;ga=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.default=void 0;const e={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]};return vn.default=e,vn}var ba;function Rc(){if(ba)return bn;ba=1;var e=on().default;Object.defineProperty(bn,"__esModule",{value:!0}),bn.default=void 0;var t=e(pk()),n=e(Ic());const o={lang:{placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"],...t.default},timePickerLocale:{...n.default}};return o.lang.ok="确定",bn.default=o,bn}var wa;function fk(){if(wa)return gn;wa=1;var e=on().default;Object.defineProperty(gn,"__esModule",{value:!0}),gn.default=void 0;var t=e(Rc());return gn.default=t.default,gn}var va;function hk(){if(va)return hn;va=1;var e=on().default;Object.defineProperty(hn,"__esModule",{value:!0}),hn.default=void 0;var t=e(dk()),n=e(fk()),o=e(Rc()),r=e(Ic());const i="${label}不是一个有效的${type}",s={locale:"zh-cn",Pagination:t.default,DatePicker:o.default,TimePicker:r.default,Calendar:n.default,global:{placeholder:"请选择",close:"关闭",sortable:"可排序"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckAll:"全选",filterSearchPlaceholder:"在筛选项中搜索",emptyText:"暂无数据",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Tour:{Next:"下一步",Previous:"上一步",Finish:"结束导览"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{titles:["",""],searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",deselectAll:"取消全选",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开",collapse:"收起"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:i,method:i,array:i,object:i,number:i,date:i,boolean:i,integer:i,float:i,regexp:i,email:i,url:i,hex:i},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},QRCode:{expired:"二维码过期",refresh:"点击刷新",scanned:"已扫描"},ColorPicker:{presetEmpty:"暂无",transparent:"无色",singleColor:"单色",gradientColor:"渐变色"}};return hn.default=s,hn}var vr,Sa;function yk(){return Sa||(Sa=1,vr=hk()),vr}var gk=yk();const bk=Ct(gk);var po={exports:{}},wk=po.exports,Ca;function vk(){return Ca||(Ca=1,(function(e,t){(function(n,o){e.exports=o(dc())})(wk,(function(n){function o(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var r=o(n),i={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(s,a){return a==="W"?s+"周":s+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(s,a){var l=100*s+a;return l<600?"凌晨":l<900?"早上":l<1100?"上午":l<1300?"中午":l<1800?"下午":"晚上"}};return r.default.locale(i,null,!0),i}))})(po)),po.exports}vk();W1()||kc("en-US");const Sk={"en-US":mk,"zh-CN":bk},Nc={"en-US":"en","zh-CN":"zh-cn"},Ck=e=>{kc(e),Xe.locale(Nc[e]??"en")};function kk({locale:e="en-US",onLocaleChange:t,theme:n=X1,cssVariables:o,children:r,fallback:i}){const s=re.useRef(e),a=Nc[e]??"en";(!je.hasResourceBundle("en-US","translation")||!je.hasResourceBundle("zh-CN","translation")||je.language!==e||Xe.locale()!==a)&&Ck(e),re.useEffect(()=>{s.current!==e&&(s.current=e,t?.(e))},[e,t]);const c=i??p.jsx(y.Flex,{justify:"center",align:"center",style:{height:256},children:p.jsx(y.Spin,{size:"large"})});return p.jsx(y.ConfigProvider,{theme:n,locale:Sk[e],children:p.jsx(y.App,{children:p.jsx(rk,{cssVariables:o,children:p.jsx(re.Suspense,{fallback:c,children:r})})})})}function $n(e){return e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&apos;/g,"'")}function Tk(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function xk(e){return new TextDecoder().decode(e)}function _k(e){return new TextEncoder().encode(e)}function Rt(e,t){const n=e[t];if(!n)throw new Error(`xlsx missing file: ${t}`);return xk(n)}function qo(e,t,n){e[t]=_k(n)}function Ik(e){const t=[],n=/<si\b[^>]*>([\s\S]*?)<\/si>/g;let o;for(;o=n.exec(e);){const r=o[1]??"",i=[],s=/<t\b[^>]*>([\s\S]*?)<\/t>/g;let a;for(;a=s.exec(r);)i.push($n(a[1]??""));t.push(i.join(""))}return t}function Rk(e,t){const n=new Map,o=/<sheet\b[^>]*\bname="([^"]+)"[^>]*\br:id="([^"]+)"[^>]*\/?>/g;let r;for(;r=o.exec(e);)n.set($n(r[1]??""),r[2]??"");const i=new Map,s=/<Relationship\b[^>]*\bId="([^"]+)"[^>]*\bTarget="([^"]+)"[^>]*\/?>/g;let a;for(;a=s.exec(t);)i.set(a[1]??"",$n(a[2]??""));const l=new Map;for(const[c,u]of n.entries()){const f=i.get(u);if(!f)continue;const m=f.startsWith("/")?f.slice(1):`xl/${f}`;l.set(c,m)}return l}function Ci(e,t){const n=`r="${t}"`,o=e.indexOf(n);if(o<0)return null;const r=e.lastIndexOf("<c",o);if(r<0)return null;const i=e.indexOf(">",o);if(i<0)return null;const s=e.slice(r,i+1);if(s.endsWith("/>"))return{start:r,end:i+1,openTag:s,body:""};const a=e.indexOf("</c>",i+1);if(a<0)return null;const l=e.slice(i+1,a);return{start:r,end:a+4,openTag:s,body:l}}function ka(e,t){const n=new RegExp(`\\s+${t}="[^"]*"`,"g");return e.replace(n,"")}function Nk(e,t){const n=Ci(e,t);return n?/<f[\s>]/.test(n.body):!1}function Ao(e,t,n){const o=Ci(e,t);if(!o)return null;const{openTag:r,body:i}=o,a=/\bt="([^"]+)"/.exec(r)?.[1];if(a==="inlineStr"){const m=/<t\b[^>]*>([\s\S]*?)<\/t>/.exec(i);return m?$n(m[1]??""):""}const c=/<v>([\s\S]*?)<\/v>/.exec(i);if(!c)return"";const u=$n(c[1]??"");if(a==="s"){const f=Number(u);return Number.isFinite(f)?n[f]??"":""}return u}function Ae(e,t,n){return Mc(e,t,n,{allowOverwriteFormula:!1})}function Mk(e,t,n){return Mc(e,t,n,{allowOverwriteFormula:!0})}function Mc(e,t,n,o){const r=Ci(e,t);if(!r)throw new Error(`cell not found in template: ${t}`);const{start:i,end:s,openTag:a,body:l}=r;if(!o.allowOverwriteFormula&&/<f[\s>]/.test(l))throw new Error(`refusing to overwrite formula cell: ${t}`);let c=a;c=ka(c,"t"),c=c.replace(/\s*\/>$/,">"),c=c.replace(/>$/,' t="inlineStr">'),c=c.replace(/\s+t="inlineStr"\s+t="inlineStr"/g,' t="inlineStr"');const u=n??"",f=u?`${c}<is><t xml:space="preserve">${Tk(u)}</t></is></c>`:(()=>{const m=ka(a,"t");return m.endsWith("/>")?m:m.replace(/>$/,"/>")})();return e.slice(0,i)+f+e.slice(s)}async function qk(e){const{unzipSync:t}=await Promise.resolve().then(()=>require("./browser-VGwYfUp0.cjs")),n=t(new Uint8Array(e)),o=Rt(n,"xl/workbook.xml"),r=Rt(n,"xl/_rels/workbook.xml.rels"),i=n["xl/sharedStrings.xml"]?Rt(n,"xl/sharedStrings.xml"):"",s=i?Ik(i):[];return{files:n,sharedStrings:s,sheetPathByName:Rk(o,r)}}function Ak(e){const t="xl/workbook.xml";let n=Rt(e,t);/<calcPr\b/.test(n)?n=n.replace(/<calcPr\b([^>]*)\/>/,(o,r)=>/\bfullCalcOnLoad=/.test(r)?`<calcPr${String(r).replace(/fullCalcOnLoad="[^"]*"/,'fullCalcOnLoad="1"')}/>`:`<calcPr${r} fullCalcOnLoad="1"/>`):n=n.replace(/<\/workbook>/,'<calcPr fullCalcOnLoad="1"/></workbook>'),qo(e,t,n)}function Lk(e){e["xl/calcChain.xml"]&&delete e["xl/calcChain.xml"];const t="[Content_Types].xml";if(e[t]){let o=Rt(e,t);o=o.replace(/<Override\b[^>]*PartName="\/xl\/calcChain\.xml"[^>]*\/>\s*/g,""),qo(e,t,o)}const n="xl/_rels/workbook.xml.rels";if(e[n]){let o=Rt(e,n);o=o.replace(/<Relationship\b[^>]*\bTarget="calcChain\.xml"[^>]*\/>\s*/g,""),o=o.replace(/<Relationship\b[^>]*\bTarget="\/xl\/calcChain\.xml"[^>]*\/>\s*/g,""),o=o.replace(/<Relationship\b[^>]*\bType="http:\/\/schemas\.openxmlformats\.org\/officeDocument\/2006\/relationships\/calcChain"[^>]*\/>\s*/g,""),qo(e,n,o)}}async function Ek(e){const{zipSync:t}=await Promise.resolve().then(()=>require("./browser-VGwYfUp0.cjs"));return t(e,{level:6})}function Ot(e,t){const n=e.sheetPathByName.get(t);if(!n)throw new Error(`xlsx missing sheet: ${t}`);return Rt(e.files,n)}function Sn(e,t,n){const o=e.sheetPathByName.get(t);if(!o)throw new Error(`xlsx missing sheet: ${t}`);qo(e.files,o,n)}const Pk={cmrt:{"6.01":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61,8:67},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:5,8:7},companyHeaderRowByKey:{A:75,B:77,C:79,D:81,E:83,F:85,G:87,H:89},companySpanByKey:{A:1,B:1,C:1,D:1,E:1,F:1,G:1,H:21},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"6.1":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61,8:67},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:5,8:7},companyHeaderRowByKey:{A:75,B:77,C:79,D:81,E:83,F:85,G:87,H:89},companySpanByKey:{A:1,B:1,C:1,D:1,E:1,F:1,G:1,H:21},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"6.22":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61,8:67},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:5,8:7},companyHeaderRowByKey:{A:75,B:77,C:79,D:81,E:83,F:85,G:87,H:89},companySpanByKey:{A:1,B:1,C:1,D:1,E:1,F:1,G:1,H:21},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"6.31":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61,8:67},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:5,8:7},companyHeaderRowByKey:{A:75,B:77,C:79,D:81,E:83,F:85,G:87,H:89},companySpanByKey:{A:1,B:1,C:1,D:1,E:1,F:1,G:1,H:21},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"6.4":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61,8:67},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:5,8:7},companyHeaderRowByKey:{A:75,B:77,C:79,D:81,E:83,F:85,G:87,H:89},companySpanByKey:{A:1,B:1,C:1,D:1,E:1,F:1,G:1,H:21},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"6.5":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61,8:67},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:5,8:7},companyHeaderRowByKey:{A:75,B:77,C:79,D:81,E:83,F:85,G:87,H:89},companySpanByKey:{A:1,B:1,C:1,D:1,E:1,F:1,G:1,H:21},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37}},emrt:{"1.1":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:7},companyHeaderRowByKey:{A:69,B:71,C:73,D:77,E:79,F:81,G:83},companySpanByKey:{A:1,B:1,C:3,D:1,E:1,F:1,G:36},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"1.11":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:7},companyHeaderRowByKey:{A:69,B:71,C:73,D:77,E:79,F:81,G:83},companySpanByKey:{A:1,B:1,C:3,D:1,E:1,F:1,G:36},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"1.2":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:7},companyHeaderRowByKey:{A:69,B:71,C:73,D:77,E:79,F:81,G:83},companySpanByKey:{A:1,B:1,C:3,D:1,E:1,F:1,G:36},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"1.3":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:7},companyHeaderRowByKey:{A:69,B:71,C:73,D:77,E:79,F:81,G:83},companySpanByKey:{A:1,B:1,C:3,D:1,E:1,F:1,G:36},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"2.0":{questionHeaderRowByNumber:{1:29,2:41,3:53,4:65,5:77,6:89,7:101},questionSpanByNumber:{1:11,2:11,3:11,4:11,5:11,6:11,7:13},companyHeaderRowByKey:{A:115,B:117,C:119,D:131,E:133,F:135,G:137},companySpanByKey:{A:1,B:1,C:11,D:1,E:1,F:1,G:50},amrtQ1Row:29,amrtQ2Row:41,amrtQ3Row:53},"2.1":{questionHeaderRowByNumber:{1:29,2:41,3:53,4:65,5:77,6:89,7:101},questionSpanByNumber:{1:11,2:11,3:11,4:11,5:11,6:11,7:13},companyHeaderRowByKey:{A:115,B:117,C:119,D:131,E:133,F:135,G:137},companySpanByKey:{A:1,B:1,C:11,D:1,E:1,F:1,G:50},amrtQ1Row:29,amrtQ2Row:41,amrtQ3Row:53}},crt:{"2.2":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:7},companyHeaderRowByKey:{A:63,B:65,C:67,D:69,E:71,F:73,G:75,H:77,I:79},companySpanByKey:{A:1,B:1,C:1,D:1,E:1,F:1,G:1,H:1,I:21},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"2.21":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:7},companyHeaderRowByKey:{A:63,B:65,C:67,D:69,E:71,F:73,G:75,H:77,I:79},companySpanByKey:{A:1,B:1,C:1,D:1,E:1,F:1,G:1,H:1,I:21},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37}},amrt:{"1.1":{questionHeaderRowByNumber:{1:27,2:39},questionSpanByNumber:{1:11,2:29},companyHeaderRowByKey:{},companySpanByKey:{},amrtQ1Row:27,amrtQ2Row:39,amrtQ3Row:null},"1.2":{questionHeaderRowByNumber:{1:27,2:39},questionSpanByNumber:{1:11,2:29},companyHeaderRowByKey:{},companySpanByKey:{},amrtQ1Row:27,amrtQ2Row:39,amrtQ3Row:null},"1.3":{questionHeaderRowByNumber:{1:30,2:42},questionSpanByNumber:{1:11,2:37},companyHeaderRowByKey:{},companySpanByKey:{},amrtQ1Row:30,amrtQ2Row:42,amrtQ3Row:null}}};function Dk(e,t){const o=Pk[e]?.[t];if(!o)throw new Error(`Missing Excel anchor mapping for ${e}@${t}. Run pnpm generate:excel-mapping.`);return o}function Me(e,t){return`${e}${t}`}function Ta(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"")}function Qn(e){const t=e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").trim();return t?t[0].toUpperCase()+t.slice(1):""}function $k(e,t){const n=e?.trim();return n?t.find(r=>r.trim().startsWith(`${n}.`))??e:""}function ki(e,t,n){const o=[];for(let a=68;a<=90;a+=1){const l=Ao(e,Me("B",a),t);l&&l.trim()&&o.push(l.trim())}const r=new Map,i=o.find(a=>a.toLowerCase().includes("other"));i&&r.set("other",i);const s={aluminum:["Aluminum","Aluminium"],sodaAsh:["Soda Ash"],rareEarthElements:["Rare Earth Elements"]};for(const a of n.mineralScope.minerals){if(a.key==="other")continue;const l=s[a.key]??[Qn(a.key)],c=l.map(Ta),u=o.find(f=>c.includes(Ta(f)));if(u){r.set(a.key,u);continue}r.set(a.key,l[0]??a.key)}return r}function Ok(e,t,n,o){const r=n.data.companyInfo??{},i=t.templateType,s={companyName:"D8",declarationScope:"D9",scopeDescription:"D10"},a=i==="emrt"?16:i==="amrt"?17:12;["companyId","companyAuthId","address","contactName","contactEmail","contactPhone","authorizerName","authorizerTitle","authorizerEmail","authorizerPhone","authorizationDate"].forEach((u,f)=>{s[u]=Me("D",a+f)});let c=e;for(const u of t.companyInfoFields){const f=u.key,m=s[f];if(!m)continue;const d=r[f]??"";if(d){if(f==="authorizationDate"){c=Ae(c,m,hy(d));continue}if(f==="declarationScope"){const h=o(m);c=Ae(c,m,$k(d,h));continue}c=Ae(c,m,d)}}return c}function Ti(e,t,n,o,r){let i=e;return n.forEach((s,a)=>{const l=t+a;for(const[c,u]of Object.entries(o)){const f=s[c];if(!f)continue;const m=r?r(c,f):f;i=Ae(i,Me(u,l),m)}}),i}function Fk(e,t,n,o){if(t.templateType!=="emrt"||t.mineralScope.mode!=="dynamic-dropdown")return e;const r=["D12","E12","G12","D13","E13","G13"],i=new Set(n.data.selectedMinerals??[]);let s=e;return t.mineralScope.minerals.forEach((a,l)=>{const c=r[l];if(!c)return;const u=Ao(e,c,o)??Qn(a.key),f=Ao(e,Me("C",175+l),o)??`(Delete ${u})`;s=Ae(s,c,i.has(a.key)?u:f)}),s}function zk(e,t,n,o){if(t.templateType!=="amrt"||t.mineralScope.mode!=="dynamic-dropdown")return e;const r=ki(e,o,t),i=["D12","E12","F12","G12","H12","I12","D13","E13","F13","G13","H13","I13"],s=(n.data.selectedMinerals??[]).filter(Boolean),a=t.mineralScope.maxCount??10,l=s.filter(w=>w!=="other").slice(0,a),c=s.includes("other"),u=(n.data.customMinerals??[]).map(w=>w.trim()),f=i.length,m=Array.from({length:f},()=>""),d=Array.from({length:f},()=>"");let h=0;if(c){for(let w=0;w<f&&h<a;w+=1){const S=u[w]??"";S&&(m[w]="other",d[w]=S,h+=1)}h===0&&a>0&&(m[0]="other",h=1)}for(const w of l){if(h>=a)break;const S=m.findIndex(v=>!v);if(S<0)break;m[S]=w,h+=1}let g=e;return i.forEach((w,S)=>{const v=m[S]??"",C=v?r.get(v)??Qn(v):"";g=Ae(g,w,C)}),["D15","E15","F15","G15","H15","I15","D16","E16","F16","G16","H16","I16"].forEach((w,S)=>{const v=m[S]==="other"?d[S]??"":"";g=Ae(g,w,v)}),g}function jk(e,t,n,o){if(t.templateType==="amrt")return e;const r=n.data.questions??{},i=n.data.questionComments??{},s=n.data.companyQuestions??{},a="D",l="G";let c=e;for(let f=1;f<=t.questions.length;f+=1){const m=t.questions[f-1];if(!m)continue;const d=o.questionHeaderRowByNumber[String(f)];if(d)if(m.perMineral){const h=t.mineralScope.minerals,g=o.questionSpanByNumber[String(f)]??0,b=Math.max(0,g);h.slice(0,b).forEach((w,S)=>{const v=d+1+S,C=r[m.key],N=i[m.key],_=C&&typeof C=="object"?C[w.key]??"":"",k=N&&typeof N=="object"?N[w.key]??"":"";_&&(c=Ae(c,Me(a,v),_)),k&&(c=Ae(c,Me(l,v),k))})}else{const h=r[m.key],g=i[m.key],b=typeof h=="string"?h:"",w=typeof g=="string"?g:"";b&&(c=Ae(c,Me(a,d+1),b)),w&&(c=Ae(c,Me(l,d+1),w))}}const u=new Map(t.companyQuestions.map(f=>[f.key,f]));for(const[f,m]of Object.entries(o.companyHeaderRowByKey)){const d=u.get(f);if(!d)continue;if(d.perMineral){const v=t.mineralScope.minerals,C=o.companySpanByKey[f]??0,N=Math.max(0,C),_=`${f}_comment`;v.slice(0,N).forEach((k,L)=>{const j=m+1+L,x=s[f],q=x&&typeof x=="object"?x[k.key]??"":"";if(q&&(c=Ae(c,Me(a,j),q)),!d.hasCommentField)return;const B=s[_],$=B&&typeof B=="object"?B[k.key]??"":"";$&&(c=Ae(c,Me(l,j),$))});continue}const h=s[f],g=typeof h=="string"?h:"";g&&(c=Ae(c,Me(a,m),g));const b=`${f}_comment`,w=s[b],S=typeof w=="string"?w:"";S&&(c=Ae(c,Me(l,m),S))}return c}function Bk(e,t,n,o,r){if(t.templateType!=="amrt")return e;const i=n.data.questions??{},s=n.data.questionComments??{},a=r.amrtQ1Row,l=r.amrtQ2Row;if(!a||!l)return e;const c=ki(e,o,t),u=(n.data.selectedMinerals??[]).filter(Boolean),m=u.includes("other")?(n.data.customMinerals??[]).map(v=>v.trim()).filter(Boolean):[],h=[...u.filter(v=>v!=="other").map(v=>({key:v,label:c.get(v)??Qn(v)??v})),...m.map((v,C)=>({key:`custom-${C}`,label:v}))].filter(v=>v.label.trim()).sort((v,C)=>{const N=v.label.trim(),_=C.label.trim(),k=N.localeCompare(_);return k!==0?k:v.key.localeCompare(C.key)}).slice(0,10),g=(v,C,N,_,k,L)=>{let j=v;const x=Math.min(h.length,Math.max(0,_-N+1));for(let q=0;q<x;q+=1){const B=N+q,$=h[q].key;if(!$.startsWith("custom-")){const I=i[C],R=s[C],M=I&&typeof I=="object"?I[$]??"":"",K=R&&typeof R=="object"?R[$]??"":"";M&&(j=Ae(j,Me(k,B),M)),K&&(j=Ae(j,Me(L,B),K))}}return j};let b=e;b=g(b,"Q1",a+1,l-1,"D","G");const w=r.amrtQ3Row,S=w?w-1:l+10;return b=g(b,"Q2",l+1,S,"D","G"),b}function Cn(e,t,n,o){return n?Nk(e,t)?o?Mk(e,t,n):e:Ae(e,t,n):e}function Kk(e,t,n,o){let r=e;return n.forEach((i,s)=>{const a=5+s,l=(i.smelterId??"").trim(),c=!!l,u=!c;t.smelterList.hasIdColumn&&c&&(r=Ae(r,Me("A",a),l));const f=i.metal?.trim();f&&(r=Cn(r,Me("B",a),o(f),u));const m=i.smelterLookup?.trim();t.smelterList.hasLookup&&m&&(r=Cn(r,Me("C",a),Ir(m),u));const d=[["smelterName","D"],["smelterCountry","E"],["smelterIdentification","F"],["sourceId","G"],["smelterStreet","H"],["smelterCity","I"],["smelterState","J"],["smelterContactName","K"],["smelterContactEmail","L"],["proposedNextSteps","M"],["mineName","N"],["mineCountry","O"],["recycledScrap","P"],["comments","Q"]];for(const[h,g]of d){const b=i[h]?.trim();b&&(r=Cn(r,Me(g,a),b,u))}if(t.smelterList.hasCombinedColumn){const h=i.combinedMetal?.trim();h&&(r=Cn(r,Me("R",a),o(h),u));const g=i.combinedSmelter?.trim();g&&(r=Cn(r,Me("S",a),g,u))}}),r}function Qk(e,t,n){return Ti(e,5,t,{metal:"A",smelterName:"B",mineName:"C",mineId:"D",mineIdSource:"E",mineCountry:"F",mineStreet:"G",mineCity:"H",mineProvince:"I",mineContactName:"J",mineContactEmail:"K",proposedNextSteps:"L",comments:"M"},(r,i)=>r==="metal"?n(i):i)}function Uk(e,t,n){return Ti(e,6,t,n?{productNumber:"B",productName:"C",requesterNumber:"D",requesterName:"E",comments:"F"}:{productNumber:"B",productName:"C",comments:"D"})}function Gk(e,t,n){const o=i=>{if(i.startsWith("other-")){const s=Number(i.slice(6));return t.data.customMinerals?.[s]?.trim()??""}return n(i)},r=(t.data.mineralsScope??[]).map(i=>({mineral:o(i.mineral),reason:i.reason}));return Ti(e,8,r,{mineral:"B",reason:"C"})}async function xi({templateXlsx:e,snapshot:t}){const n=Bo(t.templateType,t.versionId),o=Dk(t.templateType,t.versionId),r=await qk(e),i=m=>Ao(Ot(r,"Declaration"),m,r.sharedStrings),s=m=>m==="D9"?[i("P9"),i("Q9"),i("R9")].filter(h=>!!(h&&h.trim())):[];let a=Ot(r,"Declaration");a=Fk(a,n,t,r.sharedStrings),a=zk(a,n,t,r.sharedStrings),a=Ok(a,n,t,s),a=jk(a,n,t,o),a=Bk(a,n,t,r.sharedStrings,o),Sn(r,"Declaration",a);const l=n.templateType==="amrt"?ki(a,r.sharedStrings,n):null,c=m=>l?.get(m)??Qn(m)??m;if(t.data.smelterList?.length){const m=Ot(r,"Smelter List"),d=Kk(m,n,t.data.smelterList,c);Sn(r,"Smelter List",d)}if(t.data.mineList?.length&&r.sheetPathByName.has("Mine List")){const m=Ot(r,"Mine List"),d=Qk(m,t.data.mineList,c);Sn(r,"Mine List",d)}if(t.data.productList?.length){const m=Ot(r,"Product List"),d=Uk(m,t.data.productList,n.productList.hasRequesterColumns);Sn(r,"Product List",d)}if(t.templateType==="amrt"&&t.data.mineralsScope?.length&&r.sheetPathByName.has("Minerals Scope")){const m=Ot(r,"Minerals Scope"),d=Gk(m,t,c);Sn(r,"Minerals Scope",d)}Ak(r.files),Lk(r.files);const u=await Ek(r.files),f=u.buffer.slice(u.byteOffset,u.byteOffset+u.byteLength);return new Blob([f],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})}const qc=1,Yk=Go(["cmrt","emrt","crt","amrt"]),Zk=Go(["en-US","zh-CN"]),Hk=_t(T(),nt([T(),gt()])).superRefine((e,t)=>{for(const[n,o]of Object.entries(e))n!=="authorizationDate"&&typeof o!="string"&&t.addIssue({code:Ue.custom,path:[n],message:"公司信息字段必须为字符串"})}),Vk=be({id:T(),mineral:T(),reason:T()}),Wk=be({id:T(),metal:T(),smelterLookup:T(),smelterName:T(),smelterCountry:T(),combinedMetal:T().optional(),combinedSmelter:T().optional(),smelterId:T().optional(),smelterIdentification:T().optional(),sourceId:T().optional(),smelterStreet:T().optional(),smelterCity:T().optional(),smelterState:T().optional(),smelterContactName:T().optional(),smelterContactEmail:T().optional(),proposedNextSteps:T().optional(),mineName:T().optional(),mineCountry:T().optional(),recycledScrap:T().optional(),comments:T().optional()}).catchall(T().optional()),Jk=be({id:T(),metal:T(),smelterName:T(),mineName:T(),mineCountry:T(),mineId:T().optional(),mineIdSource:T().optional(),mineStreet:T().optional(),mineCity:T().optional(),mineProvince:T(),mineDistrict:T(),mineContactName:T().optional(),mineContactEmail:T().optional(),proposedNextSteps:T().optional(),comments:T()}).catchall(T().optional()),Xk=be({id:T(),productNumber:T(),productName:T(),requesterNumber:T().optional(),requesterName:T().optional(),comments:T()}).catchall(T().optional()),eT=be({schemaVersion:Rh(qc),templateType:Yk,versionId:T().min(1),locale:Zk.optional(),data:be({companyInfo:Hk,selectedMinerals:Le(T()),customMinerals:Le(T()),questions:_t(T(),nt([T(),_t(T(),T())])),questionComments:_t(T(),nt([T(),_t(T(),T())])),companyQuestions:_t(T(),nt([T(),_t(T(),T())])),mineralsScope:Le(Vk),smelterList:Le(Wk),mineList:Le(Jk),productList:Le(Xk)})});function tT(e){const t=eT.parse(e),n={};for(const[o,r]of Object.entries(t.data.companyInfo)){if(o==="authorizationDate"){n[o]=Sl(r);continue}n[o]=typeof r=="string"?r:String(r)}return{...t,data:{...t.data,companyInfo:n}}}function _i(e){return JSON.stringify(e)}async function Ac({templateType:e,versionId:t,validate:n,getSnapshot:o,navigation:r}){return await n()?o():(r&&r.actions.navigate(ho({template:e,version:t,page:"checker"})),null)}function nT({templateType:e,versionId:t,locale:n,initialSnapshot:o,onSnapshotChange:r,controllerRef:i}){const{meta:s,form:a,lists:l}=Fe(),{setFormData:c,validateForm:u}=Et(),f=Eo(),m=re.useRef(null),d=re.useRef(!o),h=re.useMemo(()=>({schemaVersion:1,templateType:s.templateType,versionId:s.versionId,locale:n,data:{...a,...l}}),[s.templateType,s.versionId,a,l,n]);return re.useLayoutEffect(()=>{if(!o){d.current=!0;return}m.current!==o&&(d.current=!1,c(o.data),m.current=o,d.current=!0)},[o,c]),re.useEffect(()=>{d.current&&r?.(h)},[h,r]),re.useImperativeHandle(i,()=>({getSnapshot:()=>h,setSnapshot:g=>{if(g.templateType!==e||g.versionId!==t)throw new Error("snapshot does not match templateType/versionId");c(g.data)},saveDraft:()=>h,submit:()=>Ac({templateType:e,versionId:t,validate:u,getSnapshot:()=>h,navigation:f}),exportJson:()=>_i(h),exportExcel:async g=>xi({...g,snapshot:h}),validate:()=>u()}),[f,c,h,e,u,t]),null}const oT=re.forwardRef(function({templateType:t,versionId:n,locale:o="en-US",onLocaleChange:r,theme:i,cssVariables:s,readOnly:a=!1,showPageActions:l=!0,maxContentWidth:c,integrations:u,initialSnapshot:f,onSnapshotChange:m,fallback:d},h){if(f&&(f.templateType!==t||f.versionId!==n))throw new Error("initialSnapshot does not match templateType/versionId");return p.jsx(kk,{locale:o,onLocaleChange:r,theme:i,cssVariables:s,fallback:d,children:p.jsx(WC,{templateType:t,versionId:n,readOnly:a,showPageActions:l,maxContentWidth:c,integrations:u,children:p.jsx(nT,{controllerRef:h,templateType:t,versionId:n,locale:o,initialSnapshot:f,onSnapshotChange:m})})})});function rT(){const{meta:e,form:t,lists:n}=Fe(),{setFormData:o,validateForm:r}=Et(),{locale:i}=Ce(),s=Eo(),a=re.useMemo(()=>({schemaVersion:1,templateType:e.templateType,versionId:e.versionId,locale:i,data:{...t,...n}}),[e.templateType,e.versionId,t,n,i]);return re.useMemo(()=>({snapshot:a,getSnapshot:()=>a,setSnapshot:l=>{if(l.templateType!==e.templateType||l.versionId!==e.versionId)throw new Error("snapshot does not match templateType/versionId");o(l.data)},saveDraft:()=>a,submit:()=>Ac({templateType:e.templateType,versionId:e.versionId,validate:r,getSnapshot:()=>a,navigation:s}),exportJson:()=>_i(a),exportExcel:l=>xi({...l,snapshot:a}),validate:()=>r()}),[e.templateType,e.versionId,s,o,a,r])}const iT=Go(["cmrt","emrt","crt","amrt"]),V=T().nullable(),sT=be({companyName:V.optional(),species:V.optional(),rangeDescription:V.optional(),identify:V.optional(),authorization:V.optional(),address:V.optional(),contactName:V.optional(),contactEmail:V.optional(),contactPhone:V.optional(),authorizerName:V.optional(),authorizerJobTitle:V.optional(),authorizerEmail:V.optional(),authorizerPhone:V.optional(),effectiveDate:nt([T(),gt()]).nullable().optional()}).passthrough(),aT=be({type:gt(),question:T(),answer:V.optional(),remark:V.optional()}).passthrough(),lT=be({question:T(),answer:V.optional(),remark:V.optional(),type:V.optional()}).passthrough(),cT=be({id:nt([T(),gt()]).optional(),metal:V.optional(),smelterLookUp:V.optional(),standardSmelterName:V.optional(),smelterNumber:V.optional(),smelterName:V.optional(),smelterCountry:V.optional(),smelterProvince:V.optional(),smelterCity:V.optional(),smelterStreet:V.optional(),smelterIdentification:V.optional(),smelterContact:V.optional(),smelterEmail:V.optional(),suggest:V.optional(),mineName:V.optional(),mineCountry:V.optional(),isRecycle:V.optional(),remark:V.optional(),smelterId:V.optional(),sourceId:V.optional()}).passthrough(),uT=be({smelterId:V.optional(),metal:V.optional(),smelterName:V.optional(),mineFacilityName:V.optional(),mineIdentification:V.optional(),mineIdentificationNumber:V.optional(),mineFacilityCountry:V.optional(),mineFacilityStreet:V.optional(),mineFacilityCity:V.optional(),mineFacilityProvince:V.optional(),mineFacilityContact:V.optional(),mineFacilityEmail:V.optional(),proposedNextSteps:V.optional(),comments:V.optional()}).passthrough(),mT=be({id:nt([T(),gt()]).optional(),partId:nt([T(),gt()]).nullable().optional(),productNumber:V.optional(),partNumber:V.optional(),productName:V.optional(),partName:V.optional(),requesterNumber:V.optional(),requestPartNumber:V.optional(),requesterName:V.optional(),requestPartName:V.optional(),comments:V.optional(),remark:V.optional()}).passthrough(),dT=be({id:nt([T(),gt()]).optional(),metal:V.optional(),reason:V.optional()}).passthrough(),pT=be({name:T().optional(),questionnaireType:gt().optional(),type:T().optional(),version:T().optional(),cmtCompany:sT.optional(),cmtRangeQuestions:Le(aT).optional(),cmtCompanyQuestions:Le(lT).optional(),cmtSmelters:Le(cT).optional(),minList:Le(uT).optional(),cmtParts:Le(mT).optional(),amrtReasonList:Le(dT).optional()}).passthrough(),fT=/RMI_(CMRT|EMRT|CRT|AMRT)_([0-9.]+)/i;function Lc(e){const t=e.toLowerCase(),n=iT.safeParse(t);return n.success?n.data:null}function xa(e){const t=e.match(fT);if(!t)return null;const n=Lc(t[1]);return n?{templateType:n,versionId:t[2]}:null}function Ec(e){const t=pT.parse(e),n=t.type?Lc(t.type):null,o=t.name?xa(t.name):null,r=t.version?xa(t.version):null,i=o??r,s=n??i?.templateType,a=i?.versionId;if(!s||!a)throw new Error("cannot infer templateType/versionId from legacy report");if(n&&i&&n!==i.templateType)throw new Error("legacy report templateType mismatch between type and name/version");try{Bo(s,a)}catch(l){const c=l instanceof Error?l.message:String(l);throw new Error(`unsupported template/version: ${s}@${a} (${c})`)}return{legacy:t,templateType:s,versionId:a}}function Pc(e){if(e==null)return"";const t=String(e).trim();if(!t)return"";const n=t.toLowerCase();return n==="1"||n==="yes"||n==="y"||n==="true"?"Yes":n==="0"||n==="no"||n==="n"||n==="false"?"No":n==="unknown"||n==="unk"?"Unknown":t}function tt(e,t){const n=t??"";return n||(e.exists?e.wasNull?null:"":void 0)}function sr(e,t,n,o){const r=t.get(n)??{exists:n in e,wasNull:e[n]===null,wasString:typeof e[n]=="string",wasNumber:typeof e[n]=="number"},i=tt(r,o);if(i===void 0){r.exists&&delete e[n];return}e[n]=i}const _a=new Map;function hT(e,t){return`${e}@${t}`}function Qr(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"")}function Dc(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").trim()}function $c(e){return e.split(/\s+/).filter(Boolean).map(t=>t[0].toUpperCase()+t.slice(1)).join(" ")}function yT(e){const t=Dc(e);return[e,t,$c(t)]}const gT={rareEarthElements:"Rare Earth Elements",sodaAsh:"Soda Ash"};function bT(e){const t=new Map,n=new Map;for(const o of e.mineralScope.minerals){const r=o.key,i=gT[r]??$c(Dc(r));n.set(r,i);for(const s of yT(r))t.set(Qr(s),r);t.set(Qr(i),r)}return{mineralKeyByLabel:t,preferredMineralLabelByKey:n}}function wT(e){const t=new Map;for(const n of e.questions){const o=/^Q(\d+)$/.exec(n.key);if(!o)continue;const r=Number(o[1]);Number.isFinite(r)&&t.set(r,n.key)}return t}function vT(){return new Map([["companyName","companyName"],["declarationScope","species"],["scopeDescription","rangeDescription"],["companyId","identify"],["companyAuthId","authorization"],["address","address"],["contactName","contactName"],["contactEmail","contactEmail"],["contactPhone","contactPhone"],["authorizerName","authorizerName"],["authorizerTitle","authorizerJobTitle"],["authorizerEmail","authorizerEmail"],["authorizerPhone","authorizerPhone"],["authorizationDate","effectiveDate"]])}function Un(e,t){const n=hT(e,t),o=_a.get(n);if(o)return o;const r=Bo(e,t),i=wT(r),{mineralKeyByLabel:s,preferredMineralLabelByKey:a}=bT(r),l=vT(),c={templateType:e,versionId:t,versionDef:r,questionKeyByType:i,mineralKeyByLabel:s,preferredMineralLabelByKey:a,legacyCompanyKeyByInternalKey:l};return _a.set(n,c),c}function He(e){return Qr(e)}function he(e){return e===""||e===null||e===void 0}function ST(e){const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;const n=Number(t[1]),o=Number(t[2]),r=Number(t[3]);return!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(r)?null:Date.UTC(n,o-1,r,0,0,0,0)}function Vt(e){return typeof e=="string"?e:""}function Ft(e){return e==null?"":(typeof e=="string"?e:String(e)).trim()}function Ia(e){const t=Vt(e).trim();if(!t)return"";const n=t.toLowerCase();return n==="yes"||n==="y"||n==="true"?"1":n==="no"||n==="n"||n==="false"?"0":n==="unknown"?"Unknown":t}function Wt(e,t,n,o){const r=Vt(n);if(!r)return"";const i=gi(r);if(i!==null){const l=o[i]?.trim();if(l)return l}const s=t.mineralLabelByKey.get(r);if(s)return s;const a=e.mineralKeyByLabel.get(He(r));return a?t.mineralLabelByKey.get(a)??e.preferredMineralLabelByKey.get(a)??r:r}function Lo(e,t,n){const o=e[t];return n?typeof o=="object"&&o&&typeof o[n]=="string"?o[n]:"":typeof o=="string"?o:""}function CT(e,t){const n=e.effectiveDate.originalValue,o=e.effectiveDate.originalType;if(t===e.effectiveDate.derivedAuthorizationDate)return n;if(!t)return o==="missing"?void 0:o==="null"?null:o==="number"?0:"";const r=ST(t);return r===null?n:o==="number"?r:String(r)}function kT(e,t,n,o){const r=t.companyInfo??{},i=e.cmtCompany??{},s=Un(n.templateType,n.versionId);for(const c of o.companyInfoFields){const u=s.legacyCompanyKeyByInternalKey.get(c.key)??c.key;if(u==="effectiveDate")continue;const f=r[c.key]??"",m=n.companyFieldStates.get(u)??{exists:!1,wasNull:!1},d=tt(m,f);if(d===void 0){m.exists&&delete i[u];continue}i[u]=d}const a=r.authorizationDate??"",l=CT(n,a);l===void 0?n.effectiveDate.originalType!=="missing"&&delete i.effectiveDate:i.effectiveDate=l,(!e.cmtCompany&&(Object.keys(i).length>0||n.companyFieldStates.size>0||n.effectiveDate.originalType!=="missing")||e.cmtCompany)&&(e.cmtCompany=i)}function TT(e,t,n,o){const r=Un(n.templateType,n.versionId),i=e.cmtRangeQuestions??[],s=e.cmtRangeQuestions?i:null,a=new Map(o.questions.map(d=>[d.key,d])),l=Bn(o,t.selectedMinerals??[],t.customMinerals??[]),c=new Set(l),u=new Map;for(const[d,h]of n.mineralLabelByKey.entries()){const g=He(h);!g||u.has(g)||u.set(g,d)}const f=d=>{const h=gi(d);if(h!==null){const w=t.customMinerals?.[h]?.trim();if(w)return w}const g=n.mineralLabelByKey.get(d);if(g)return g;const b=r.preferredMineralLabelByKey.get(d);return b||d},m=()=>(e.cmtRangeQuestions||(e.cmtRangeQuestions=[]),e.cmtRangeQuestions);for(const[d,h]of r.questionKeyByType.entries()){const g=a.get(h);if(!g)continue;if(g.perMineral){for(const x of l){const q=f(x),B=n.mineralLabelByKey.get(x)??q,$=`${d}|${B}`,I=n.rangeQuestionIndexByKey.get($),R=Lo(t.questions,h,x),M=Lo(t.questionComments,h,x);if(I===void 0){if(he(R)&&he(M))continue;m().push({type:d,question:q,answer:R??"",remark:M??""});continue}const K=i[I],O=n.rangeQuestionFieldStatesByIndex.get(I),Z=O?.answer??{exists:!0,wasNull:!1},E=O?.remark??{exists:!0,wasNull:!1},H=tt(Z,R),G=tt(E,M);H!==void 0&&(K.answer=H),G!==void 0&&(K.remark=G),K.type=d,K.question=q}continue}const b=Array.from(n.rangeQuestionIndexByKey.entries()).find(([x])=>x.startsWith(`${d}|`)),w=b?b[1]:void 0,S=Vt(t.questions[h]),v=Vt(t.questionComments[h]);if(w===void 0){if(he(S)&&he(v))continue;const x=m(),q=o.mineralScope.minerals[0]?.key??"",B=q?n.mineralLabelByKey.get(q)??r.preferredMineralLabelByKey.get(q)??q:"";x.push({type:d,question:B,answer:S,remark:v});continue}const C=i[w],N=n.rangeQuestionFieldStatesByIndex.get(w),_=N?.answer??{exists:!0,wasNull:!1},k=N?.remark??{exists:!0,wasNull:!1},L=tt(_,S),j=tt(k,v);L!==void 0&&(C.answer=L),j!==void 0&&(C.remark=j),C.type=d}if(!s&&e.cmtRangeQuestions&&e.cmtRangeQuestions.length===0&&delete e.cmtRangeQuestions,e.cmtRangeQuestions){const d=e.cmtRangeQuestions.filter(h=>{const g=typeof h.type=="number"?h.type:Number(h.type),b=Number.isFinite(g)?r.questionKeyByType.get(g):void 0;if(!b||!a.get(b)?.perMineral)return!0;const S=typeof h.question=="string"?h.question:String(h.question??""),v=He(S),C=r.mineralKeyByLabel.get(v)??u.get(v);return C?c.has(C):!0});e.cmtRangeQuestions=d,!s&&d.length===0&&delete e.cmtRangeQuestions}}function xT(e,t,n,o){const r=Un(n.templateType,n.versionId),i=e.cmtCompanyQuestions??[],s=e.cmtCompanyQuestions?i:null,a=Bn(o,t.selectedMinerals??[],t.customMinerals??[]),l=new Set(a),c=new Map;for(const[m,d]of n.mineralLabelByKey.entries()){const h=He(d);!h||c.has(h)||c.set(h,m)}const u=m=>{const d=gi(m);if(d!==null){const b=t.customMinerals?.[d]?.trim();if(b)return b}const h=n.mineralLabelByKey.get(m);if(h)return h;const g=r.preferredMineralLabelByKey.get(m);return g||m},f=()=>(e.cmtCompanyQuestions||(e.cmtCompanyQuestions=[]),e.cmtCompanyQuestions);for(const m of o.companyQuestions){if(m.perMineral){for(const k of a){const L=u(k),j=n.mineralLabelByKey.get(k)??L,x=`${m.key}|${j}`,q=n.companyQuestionIndexByKey.get(x),B=Lo(t.companyQuestions,m.key,k),$=Lo(t.companyQuestions,`${m.key}_comment`,k);if(q===void 0){if(he(B)&&he($))continue;f().push({question:m.key,type:L,answer:B??"",remark:$??""});continue}const I=i[q],R=n.companyQuestionFieldStatesByIndex.get(q),M=R?.answer??{exists:!0,wasNull:!1},K=R?.remark??{exists:!0,wasNull:!1},O=tt(M,B),Z=tt(K,$);O!==void 0&&(I.answer=O),Z!==void 0&&(I.remark=Z),I.question=m.key,I.type=L}continue}const d=`${m.key}|`,h=n.companyQuestionIndexByKey.get(d),g=Vt(t.companyQuestions[m.key]),b=Vt(t.companyQuestions[`${m.key}_comment`]);if(h===void 0){if(he(g)&&he(b))continue;f().push({question:m.key,type:null,answer:g,remark:b});continue}const w=i[h],S=n.companyQuestionFieldStatesByIndex.get(h),v=S?.answer??{exists:!0,wasNull:!1},C=S?.remark??{exists:!0,wasNull:!1},N=tt(v,g),_=tt(C,b);N!==void 0&&(w.answer=N),_!==void 0&&(w.remark=_),w.question=m.key,"type"in w&&(w.type=null)}if(!s&&e.cmtCompanyQuestions&&e.cmtCompanyQuestions.length===0&&delete e.cmtCompanyQuestions,e.cmtCompanyQuestions){const m=e.cmtCompanyQuestions.filter(d=>{const h=typeof d.question=="string"?d.question:String(d.question??"");if(!o.companyQuestions.find(v=>v.key===h)?.perMineral)return!0;const b=typeof d.type=="string"?d.type:d.type==null?"":String(d.type),w=He(b),S=r.mineralKeyByLabel.get(w)??c.get(w);return S?l.has(S):!0});e.cmtCompanyQuestions=m,!s&&m.length===0&&delete e.cmtCompanyQuestions}}function _T(e,t,n,o){const r=e.cmtSmelters??[],i=[];for(const s of t.smelterList??[]){const a=n.smelterLegacyIndexByInternalId.get(s.id);if(a!==void 0){const m=tn(r[a]??{}),d=n.smelterFieldStatesByIndex.get(a)??new Map,h=(M,K)=>sr(m,d,M,K),g=r[a]??{},b=Ft(g.smelterLookUp),w=Ft(g.smelterName),S=Ft(g.standardSmelterName),v=b||w||S,C=S||w,N=Ft(g.smelterNumber),_=Ft(g.smelterId),k=Ft(g.smelterIdentification),L=N||_,j=N||_,x=k,q=Pc(g.isRecycle);if(h("metal",Wt(o,n,s.metal,t.customMinerals??[])),(s.smelterLookup??"")!==v&&h("smelterLookUp",s.smelterLookup),(s.smelterName??"")!==C)if(S)h("standardSmelterName",s.smelterName);else{const M=d.get("smelterName"),K=n.smelterNameFallbackByIndex.get(a)??null;M?.wasNull&&K&&s.smelterName===K?m.smelterName=null:h("smelterName",s.smelterName)}h("smelterCountry",s.smelterCountry);const B=s.smelterId??"",$=s.smelterIdentification??"",I=B!==L;(I||$!==j)&&h(N?"smelterNumber":_?"smelterId":"smelterNumber",I?B:$),(s.sourceId??"")!==x&&h("smelterIdentification",s.sourceId??""),h("smelterStreet",s.smelterStreet??""),h("smelterCity",s.smelterCity??""),h("smelterProvince",s.smelterState??""),h("smelterContact",s.smelterContactName??""),h("smelterEmail",s.smelterContactEmail??""),h("suggest",s.proposedNextSteps??""),h("mineName",s.mineName??""),h("mineCountry",s.mineCountry??""),(s.recycledScrap??"")!==q&&h("isRecycle",Ia(s.recycledScrap??"")),h("remark",s.comments??""),m.id=m.id??s.id,i.push(m);continue}const l={id:s.id},c=Wt(o,n,s.metal,t.customMinerals??[]);he(c)||(l.metal=c),he(s.smelterLookup)||(l.smelterLookUp=s.smelterLookup),he(s.smelterName)||(l.smelterName=s.smelterName,he(s.smelterLookup)||(l.standardSmelterName=s.smelterName)),he(s.smelterCountry)||(l.smelterCountry=s.smelterCountry);const u=s.smelterIdentification||s.smelterId;he(u)||(l.smelterNumber=u),he(s.sourceId)||(l.smelterIdentification=s.sourceId);const f=Ia(s.recycledScrap??"");he(f)||(l.isRecycle=f),he(s.comments)||(l.remark=s.comments),i.push(l)}(e.cmtSmelters||i.length>0)&&(e.cmtSmelters=i)}function IT(e,t,n,o){const r=e.minList??[],i=[];for(const s of t.mineList??[]){const a=n.mineLegacyIndexByInternalId.get(s.id);if(a!==void 0){const u=tn(r[a]??{}),f=n.mineFieldStatesByIndex.get(a)??new Map,m=(d,h)=>sr(u,f,d,h);m("metal",Wt(o,n,s.metal,t.customMinerals??[])),m("smelterName",s.smelterName),m("mineFacilityName",s.mineName),m("mineFacilityCountry",s.mineCountry),m("mineFacilityStreet",s.mineStreet??""),m("mineFacilityCity",s.mineCity??""),m("mineFacilityProvince",s.mineProvince??""),m("mineIdentificationNumber",s.mineId??""),m("mineIdentification",s.mineIdSource??""),m("mineFacilityContact",s.mineContactName??""),m("mineFacilityEmail",s.mineContactEmail??""),m("proposedNextSteps",s.proposedNextSteps??""),m("comments",s.comments??""),i.push(u);continue}const l={},c=Wt(o,n,s.metal,t.customMinerals??[]);he(c)||(l.metal=c),he(s.smelterName)||(l.smelterName=s.smelterName),he(s.mineName)||(l.mineFacilityName=s.mineName),he(s.mineCountry)||(l.mineFacilityCountry=s.mineCountry),he(s.comments)||(l.comments=s.comments),i.push(l)}(e.minList||i.length>0)&&(e.minList=i)}function RT(e,t,n){const o=e.cmtParts??[],r=[],i=(()=>{for(const a of n.productLegacyKeyByInternalKeyByIndex.values())return a;return null})(),s=(a,l,c)=>a?.get(l)??c;for(const a of t.productList??[]){const l=n.productLegacyIndexByInternalId.get(a.id);if(l!==void 0){const b=tn(o[l]??{}),w=n.productFieldStatesByIndex.get(l)??new Map,S=n.productLegacyKeyByInternalKeyByIndex.get(l)??null,v=(C,N)=>sr(b,w,C,N);v(s(S,"productNumber","productNumber"),a.productNumber),v(s(S,"productName","productName"),a.productName),v(s(S,"requesterNumber","requesterNumber"),a.requesterNumber??""),v(s(S,"requesterName","requesterName"),a.requesterName??""),v(s(S,"comments","comments"),a.comments??""),r.push(b);continue}const c={id:a.id},u=i,f=s(u,"productNumber","productNumber"),m=s(u,"productName","productName"),d=s(u,"requesterNumber","requesterNumber"),h=s(u,"requesterName","requesterName"),g=s(u,"comments","comments");he(a.productNumber)||(c[f]=a.productNumber),he(a.productName)||(c[m]=a.productName),he(a.requesterNumber)||(c[d]=a.requesterNumber),he(a.requesterName)||(c[h]=a.requesterName),he(a.comments)||(c[g]=a.comments),r.push(c)}(e.cmtParts||r.length>0)&&(e.cmtParts=r)}function NT(e,t,n,o){const r=e.amrtReasonList??[],i=[];for(const s of t.mineralsScope??[]){const a=n.amrtReasonIndexByInternalId.get(s.id);if(a!==void 0){const u=tn(r[a]??{}),f=n.amrtReasonFieldStatesByIndex.get(a)??new Map,m=(d,h)=>sr(u,f,d,h);m("metal",Wt(o,n,s.mineral,t.customMinerals??[])),m("reason",s.reason),u.id=u.id??s.id,i.push(u);continue}const l={id:s.id},c=Wt(o,n,s.mineral,t.customMinerals??[]);he(c)||(l.metal=c),he(s.reason)||(l.reason=s.reason),i.push(l)}(e.amrtReasonList||i.length>0)&&(e.amrtReasonList=i)}function Ra(e,t){if(e.templateType!==t.templateType||e.versionId!==t.versionId)throw new Error("snapshot does not match ctx templateType/versionId");const n=tn(t.original),o=Un(t.templateType,t.versionId),r=o.versionDef,i=e.data;return kT(n,i,t,r),TT(n,i,t,r),xT(n,i,t,r),_T(n,i,t,o),IT(n,i,t,o),RT(n,i,t),NT(n,i,t,o),n}function et(e,t){if(!e)return{exists:!1,wasNull:!1,wasString:!1,wasNumber:!1};if(!Object.prototype.hasOwnProperty.call(e,t))return{exists:!1,wasNull:!1,wasString:!1,wasNumber:!1};const o=e[t];return{exists:!0,wasNull:o===null,wasString:typeof o=="string",wasNumber:typeof o=="number"}}function MT(e){return typeof e=="string"?e:""}function kn(e){return typeof e=="string"?e:typeof e=="number"&&Number.isFinite(e)?String(e):""}function Tn(e,t){for(const n of t)if(Object.prototype.hasOwnProperty.call(e,n))return n;return t[0]??""}function Na(e,t,n){if(typeof n!="string")return"";const o=n.trim();return o?e==="crt"&&t==="Q4"&&/^100\s*%$/.test(o)?"1":o:""}function qT(e){if(e==null)return"";const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t))return"";const n=new Date(t),o=n.getUTCFullYear(),r=String(n.getUTCMonth()+1).padStart(2,"0"),i=String(n.getUTCDate()).padStart(2,"0");return`${o}-${r}-${i}`}function Sr(e,t){return typeof e=="string"&&e.trim()?e:typeof e=="number"&&Number.isFinite(e)?String(e):t}function no(e,t){const n=e[t];if(typeof n=="object"&&n!==null)return n;const o={};return e[t]=o,o}function Oc(e){const t=Ec(e),n=Un(t.templateType,t.versionId),o=n.versionDef,r=t.legacy,i=tn(r),s=new Map,a=r.cmtCompany??void 0;for(const[,D]of n.legacyCompanyKeyByInternalKey.entries())D!=="effectiveDate"&&s.set(D,et(a,D));const l=et(a,"effectiveDate"),c=a?a.effectiveDate:void 0,u=l.exists?c===null?"null":c===void 0?"undefined":typeof c=="string"?"string":typeof c=="number"?"number":"other":"missing",f=qT(c),m=vl(o);for(const D of o.companyInfoFields){const P=n.legacyCompanyKeyByInternalKey.get(D.key)??D.key;if(P==="effectiveDate"){m.companyInfo[D.key]=f;continue}const U=a?a[P]:void 0;m.companyInfo[D.key]=MT(U)}const d=new Map,h=new Map,g=D=>{const P=typeof D=="string"?D:D==null?"":String(D);if(!P)return"";const U=He(P),J=n.mineralKeyByLabel.get(U)??h.get(U);return J&&!d.has(J)&&d.set(J,P),J??P},b=r.cmtRangeQuestions??[];if(o.mineralScope.mode!=="fixed"){const D=o.mineralScope.mode,P=[];for(const J of b){if(!J||J.type!==1)continue;const ie=typeof J.question=="string"?J.question.trim():"";ie&&P.push(ie)}const U=o.mineralScope.minerals.some(J=>J.key==="other");if(D==="dynamic-dropdown"){const J=new Set,ie=[],te=o.mineralScope.otherSlotCount??0;for(const le of P){const ve=He(le),ge=n.mineralKeyByLabel.get(ve);if(ge){J.add(ge),d.set(ge,le),h.set(ve,ge);continue}U&&te>0&&ie.length<te&&ie.push(le)}ie.length>0&&U&&te>0&&(J.add("other"),m.customMinerals=ie,ie.forEach((le,ve)=>{const ge=`other-${ve}`,ze=He(le);h.set(ze,ge),d.set(ge,le)})),(J.size>0||m.customMinerals.length>0)&&(m.selectedMinerals=Array.from(J))}else if(D==="free-text"&&P.length>0){const J=o.mineralScope.maxCount??P.length,ie=P.slice(0,J);m.customMinerals=ie;const te=o.mineralScope.minerals;for(let le=0;le<ie.length&&le<te.length;le++){const ve=te[le]?.key,ge=ie[le];!ve||!ge||(d.set(ve,ge),h.set(He(ge),ve))}}}const w=new Map,S=new Map,v=new Map(o.questions.map(D=>[D.key,D]));for(let D=0;D<b.length;D++){const P=b[D],U=n.questionKeyByType.get(P.type);if(!U)continue;const J=v.get(U);if(!J)continue;const ie=`${P.type}|${P.question}`;if(w.set(ie,D),S.set(D,{answer:et(P,"answer"),remark:et(P,"remark")}),J.perMineral){const te=He(P.question),le=n.mineralKeyByLabel.get(te)??h.get(te);if(!le)continue;d.has(le)||d.set(le,P.question);const ve=no(m.questions,U);ve[le]=Na(t.templateType,U,P.answer);const ge=no(m.questionComments,U);ge[le]=P.remark??"";continue}m.questions[U]=Na(t.templateType,U,P.answer),m.questionComments[U]=P.remark??""}const C=new Map,N=new Map,_=r.cmtCompanyQuestions??[],k=new Map(o.companyQuestions.map(D=>[D.key,D]));for(let D=0;D<_.length;D++){const P=_[D],U=P.question,J=k.get(U),ie=P.type??"",te=`${U}|${ie}`;if(C.set(te,D),N.set(D,{answer:et(P,"answer"),remark:et(P,"remark")}),!J)continue;if(J.perMineral){const ve=He(String(P.type??"")),ge=n.mineralKeyByLabel.get(ve)??h.get(ve);if(!ge)continue;d.set(ge,String(P.type??""));const ze=no(m.companyQuestions,U);ze[ge]=P.answer??"";const Qe=`${U}_comment`,Te=no(m.companyQuestions,Qe);Te[ge]=P.remark??"";continue}m.companyQuestions[U]=P.answer??"";const le=`${U}_comment`;le in m.companyQuestions&&(m.companyQuestions[le]=P.remark??"")}const L=new Map,j=new Map,x=new Map,q=r.cmtSmelters??[],B=[];for(let D=0;D<q.length;D++){const P=q[D],U=Sr(P.id,`smelter-${D}`);L.set(U,D);const J=new Map;for(const rn of["smelterName","smelterLookUp","smelterCountry","smelterId","remark","isRecycle","mineName","mineCountry","suggest"])J.set(rn,et(P,rn));j.set(D,J);const ie=g(P.metal),te=P.smelterLookUp??"",le=P.smelterName??"",ve=P.standardSmelterName??"",ge=te||le||ve,ze=ve||le;P.smelterName===null&&x.set(D,ve);const Qe=P.smelterCountry??"",Te=P.smelterNumber??"",ot=P.smelterId??"",kt=P.smelterIdentification??"";B.push({id:U,metal:ie,smelterLookup:ge,smelterName:ze,smelterCountry:Qe,smelterId:Te||ot||void 0,smelterIdentification:Te||ot||void 0,sourceId:kt||void 0,smelterStreet:P.smelterStreet??void 0,smelterCity:P.smelterCity??void 0,smelterState:P.smelterProvince??void 0,smelterContactName:P.smelterContact??void 0,smelterContactEmail:P.smelterEmail??void 0,proposedNextSteps:P.suggest??void 0,mineName:P.mineName??void 0,mineCountry:P.mineCountry??void 0,recycledScrap:Pc(P.isRecycle)||void 0,comments:P.remark??void 0})}m.smelterList=B;const $=new Map,I=new Map,R=r.minList??[],M=[];for(let D=0;D<R.length;D++){const P=R[D],U=`mine-${D}`;$.set(U,D);const J=new Map;for(const ie of["mineFacilityName","mineFacilityCountry","mineFacilityProvince","comments"])J.set(ie,et(P,ie));I.set(D,J),M.push({id:U,metal:g(P.metal),smelterName:P.smelterName??"",mineName:P.mineFacilityName??"",mineCountry:P.mineFacilityCountry??"",mineId:P.mineIdentificationNumber??void 0,mineIdSource:P.mineIdentification??void 0,mineStreet:P.mineFacilityStreet??void 0,mineCity:P.mineFacilityCity??void 0,mineProvince:P.mineFacilityProvince??"",mineDistrict:"",mineContactName:P.mineFacilityContact??void 0,mineContactEmail:P.mineFacilityEmail??void 0,proposedNextSteps:P.proposedNextSteps??void 0,comments:P.comments??""})}m.mineList=M;const K=new Map,O=new Map,Z=new Map,E=r.cmtParts??[],H=[];for(let D=0;D<E.length;D++){const P=E[D],U=P,J=Sr(U.id??U.partId,`product-${D}`);K.set(J,D);const ie=new Map;for(const kt of["productNumber","partNumber","productName","partName","requesterNumber","requestPartNumber","requesterName","requestPartName","comments","remark"])ie.set(kt,et(P,kt));O.set(D,ie);const te=new Map;te.set("productNumber",Tn(U,["productNumber","partNumber"])),te.set("productName",Tn(U,["productName","partName"])),te.set("requesterNumber",Tn(U,["requesterNumber","requestPartNumber"])),te.set("requesterName",Tn(U,["requesterName","requestPartName"])),te.set("comments",Tn(U,["comments","remark"])),Z.set(D,te);const le=kn(U[te.get("productNumber")]),ve=kn(U[te.get("productName")]),ge=te.get("requesterNumber"),ze=te.get("requesterName"),Qe=kn(U[ge]),Te=kn(U[ze]),ot=kn(U[te.get("comments")]);H.push({id:J,productNumber:le,productName:ve,requesterNumber:Qe||void 0,requesterName:Te||void 0,comments:ot})}m.productList=H;const G=new Map,ee=new Map,de=r.amrtReasonList??[],Y=[];for(let D=0;D<de.length;D++){const P=de[D],U=Sr(P.id,`minerals-scope-${D}`);G.set(U,D);const J=new Map;for(const ie of["metal","reason"])J.set(ie,et(P,ie));ee.set(D,J),Y.push({id:U,mineral:g(P.metal),reason:P.reason??""})}m.mineralsScope=Y;const se={schemaVersion:1,templateType:t.templateType,versionId:t.versionId,data:m},ae={templateType:t.templateType,versionId:t.versionId,original:i,companyFieldStates:s,effectiveDate:{exists:l.exists,originalValue:c,originalType:u,derivedAuthorizationDate:f},rangeQuestionIndexByKey:w,rangeQuestionFieldStatesByIndex:S,companyQuestionIndexByKey:C,companyQuestionFieldStatesByIndex:N,mineralLabelByKey:d,smelterLegacyIndexByInternalId:L,smelterFieldStatesByIndex:j,smelterNameFallbackByIndex:x,mineLegacyIndexByInternalId:$,mineFieldStatesByIndex:I,productLegacyIndexByInternalId:K,productFieldStatesByIndex:O,productLegacyKeyByInternalKeyByIndex:Z,amrtReasonIndexByInternalId:G,amrtReasonFieldStatesByIndex:ee};return{snapshot:se,ctx:ae}}function AT(e){if(e==="cmrt")return 1;if(e==="emrt")return 2;if(e==="amrt")return 3}const LT={parse:Ec,toInternal:Oc,toExternal:Ra,toExternalLoose:e=>{const t=ET(e.templateType,e.versionId);return Ra(e,t)}};function ET(e,t){const n=e.toUpperCase(),o=e==="crt"?{type:"crt",version:`RMI_${n}_${t}`,cmtCompany:{},cmtRangeQuestions:[],cmtCompanyQuestions:[],cmtSmelters:[],minList:[],cmtParts:[]}:{name:`RMI_${n}_${t}`,questionnaireType:AT(e),cmtCompany:{},cmtRangeQuestions:[],cmtCompanyQuestions:[],cmtSmelters:[],minList:[],cmtParts:[],...e==="amrt"?{amrtReasonList:[]}:{}};return Oc(o).ctx}exports.CMReporting=oT;exports.REPORT_SNAPSHOT_SCHEMA_VERSION=qc;exports.cirsGpmLegacyAdapter=LT;exports.exportToExcel=xi;exports.parseSnapshot=tT;exports.stringifySnapshot=_i;exports.useCMReporting=rT;
39
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const a=s[1];if(t===s[0]){i(s);continue}if(e.external){const c=e.external.registry.get(s[0])?.id;if(t!==s[0]&&c){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1&&e.reused==="ref"){i(s);continue}}}function fl(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=s=>{const a=e.seen.get(s);if(a.ref===null)return;const l=a.def??a.schema,c={...l},u=a.ref;if(a.ref=null,u){o(u);const m=e.seen.get(u),d=m.schema;if(d.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(d)):Object.assign(l,d),Object.assign(l,c),s._zod.parent===u)for(const g in l)g==="$ref"||g==="allOf"||g in c||delete l[g];if(d.$ref&&m.def)for(const g in l)g==="$ref"||g==="allOf"||g in m.def&&JSON.stringify(l[g])===JSON.stringify(m.def[g])&&delete l[g]}const p=s._zod.parent;if(p&&p!==u){o(p);const m=e.seen.get(p);if(m?.schema.$ref&&(l.$ref=m.schema.$ref,m.def))for(const d in l)d==="$ref"||d==="allOf"||d in m.def&&JSON.stringify(l[d])===JSON.stringify(m.def[d])&&delete l[d]}e.override({zodSchema:s,jsonSchema:l,path:a.path??[]})};for(const s of[...e.seen.entries()].reverse())o(s[0]);const r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Object.assign(r,n.def??n.schema);const i=e.external?.defs??{};for(const s of e.seen.entries()){const a=s[1];a.def&&a.defId&&(i[a.defId]=a.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?r.$defs=i:r.definitions=i);try{const s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:wo(t,"input",e.processors),output:wo(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function Pe(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Pe(o.element,n);if(o.type==="set")return Pe(o.valueType,n);if(o.type==="lazy")return Pe(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return Pe(o.innerType,n);if(o.type==="intersection")return Pe(o.left,n)||Pe(o.right,n);if(o.type==="record"||o.type==="map")return Pe(o.keyType,n)||Pe(o.valueType,n);if(o.type==="pipe")return Pe(o.in,n)||Pe(o.out,n);if(o.type==="object"){for(const r in o.shape)if(Pe(o.shape[r],n))return!0;return!1}if(o.type==="union"){for(const r of o.options)if(Pe(r,n))return!0;return!1}if(o.type==="tuple"){for(const r of o.items)if(Pe(r,n))return!0;return!!(o.rest&&Pe(o.rest,n))}return!1}const uf=(e,t={})=>n=>{const o=dl({...n,processors:t});return Le(e,o),pl(o,e),fl(o,e)},wo=(e,t,n={})=>o=>{const{libraryOptions:r,target:i}=o??{},s=dl({...r??{},target:i,io:t,processors:n});return Le(e,s),pl(s,e),fl(s,e)},mf={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},df=(e,t,n,o)=>{const r=n;r.type="string";const{minimum:i,maximum:s,format:a,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(r.minLength=i),typeof s=="number"&&(r.maxLength=s),a&&(r.format=mf[a]??a,r.format===""&&delete r.format,a==="time"&&delete r.format),c&&(r.contentEncoding=c),l&&l.size>0){const u=[...l];u.length===1?r.pattern=u[0].source:u.length>1&&(r.allOf=[...u.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},pf=(e,t,n,o)=>{const r=n,{minimum:i,maximum:s,format:a,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof a=="string"&&a.includes("int")?r.type="integer":r.type="number",typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u),typeof i=="number"&&(r.minimum=i,typeof u=="number"&&t.target!=="draft-04"&&(u>=i?delete r.minimum:delete r.exclusiveMinimum)),typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.maximum=c,r.exclusiveMaximum=!0):r.exclusiveMaximum=c),typeof s=="number"&&(r.maximum=s,typeof c=="number"&&t.target!=="draft-04"&&(c<=s?delete r.maximum:delete r.exclusiveMaximum)),typeof l=="number"&&(r.multipleOf=l)},ff=(e,t,n,o)=>{n.not={}},hf=(e,t,n,o)=>{},yf=(e,t,n,o)=>{const r=e._zod.def,i=Ga(r.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},gf=(e,t,n,o)=>{const r=e._zod.def,i=[];for(const s of r.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){const s=i[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),i.every(s=>typeof s=="boolean")&&(n.type="boolean"),i.every(s=>s===null)&&(n.type="null"),n.enum=i},bf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},wf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},vf=(e,t,n,o)=>{const r=n,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(r.minItems=s),typeof a=="number"&&(r.maxItems=a),r.type="array",r.items=Le(i.element,t,{...o,path:[...o.path,"items"]})},Sf=(e,t,n,o)=>{const r=n,i=e._zod.def;r.type="object",r.properties={};const s=i.shape;for(const c in s)r.properties[c]=Le(s[c],t,{...o,path:[...o.path,"properties",c]});const a=new Set(Object.keys(s)),l=new Set([...a].filter(c=>{const u=i.shape[c]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));l.size>0&&(r.required=Array.from(l)),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=Le(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},Cf=(e,t,n,o)=>{const r=e._zod.def,i=r.inclusive===!1,s=r.options.map((a,l)=>Le(a,t,{...o,path:[...o.path,i?"oneOf":"anyOf",l]}));i?n.oneOf=s:n.anyOf=s},kf=(e,t,n,o)=>{const r=e._zod.def,i=Le(r.left,t,{...o,path:[...o.path,"allOf",0]}),s=Le(r.right,t,{...o,path:[...o.path,"allOf",1]}),a=c=>"allOf"in c&&Object.keys(c).length===1,l=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];n.allOf=l},Tf=(e,t,n,o)=>{const r=n,i=e._zod.def;r.type="object";const s=i.keyType,l=s._zod.bag?.patterns;if(i.mode==="loose"&&l&&l.size>0){const u=Le(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(const p of l)r.patternProperties[p.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=Le(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=Le(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});const c=s._zod.values;if(c){const u=[...c].filter(p=>typeof p=="string"||typeof p=="number");u.length>0&&(r.required=u)}},xf=(e,t,n,o)=>{const r=e._zod.def,i=Le(r.innerType,t,o),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=r.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},_f=(e,t,n,o)=>{const r=e._zod.def;Le(r.innerType,t,o);const i=t.seen.get(e);i.ref=r.innerType},If=(e,t,n,o)=>{const r=e._zod.def;Le(r.innerType,t,o);const i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},Rf=(e,t,n,o)=>{const r=e._zod.def;Le(r.innerType,t,o);const i=t.seen.get(e);i.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},Mf=(e,t,n,o)=>{const r=e._zod.def;Le(r.innerType,t,o);const i=t.seen.get(e);i.ref=r.innerType;let s;try{s=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},Nf=(e,t,n,o)=>{const r=e._zod.def,i=t.io==="input"?r.in._zod.def.type==="transform"?r.out:r.in:r.out;Le(i,t,o);const s=t.seen.get(e);s.ref=i},Lf=(e,t,n,o)=>{const r=e._zod.def;Le(r.innerType,t,o);const i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0},hl=(e,t,n,o)=>{const r=e._zod.def;Le(r.innerType,t,o);const i=t.seen.get(e);i.ref=r.innerType},qf=q("ZodISODateTime",(e,t)=>{Pd.init(e,t),xe.init(e,t)});function Af(e){return zp(qf,e)}const Ef=q("ZodISODate",(e,t)=>{Dd.init(e,t),xe.init(e,t)});function Pf(e){return jp(Ef,e)}const Df=q("ZodISOTime",(e,t)=>{$d.init(e,t),xe.init(e,t)});function $f(e){return Bp(Df,e)}const Of=q("ZodISODuration",(e,t)=>{Od.init(e,t),xe.init(e,t)});function Ff(e){return Kp(Of,e)}const zf=(e,t)=>{Va.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Mm(e,n)},flatten:{value:n=>Rm(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Cr,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Cr,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ye=q("ZodError",zf,{Parent:Error}),jf=Jr(Ye),Bf=Xr(Ye),Kf=Ko(Ye),Qf=Qo(Ye),Uf=qm(Ye),Gf=Am(Ye),Yf=Em(Ye),Zf=Pm(Ye),Hf=Dm(Ye),Vf=$m(Ye),Wf=Om(Ye),Jf=Fm(Ye),Ie=q("ZodType",(e,t)=>(_e.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:wo(e,"input"),output:wo(e,"output")}}),e.toJSONSchema=uf(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(vt(t,{checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(n,o)=>St(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.parse=(n,o)=>jf(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Kf(e,n,o),e.parseAsync=async(n,o)=>Bf(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Qf(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>Uf(e,n,o),e.decode=(n,o)=>Gf(e,n,o),e.encodeAsync=async(n,o)=>Yf(e,n,o),e.decodeAsync=async(n,o)=>Zf(e,n,o),e.safeEncode=(n,o)=>Hf(e,n,o),e.safeDecode=(n,o)=>Vf(e,n,o),e.safeEncodeAsync=async(n,o)=>Wf(e,n,o),e.safeDecodeAsync=async(n,o)=>Jf(e,n,o),e.refine=(n,o)=>e.check(Uh(n,o)),e.superRefine=n=>e.check(Gh(n)),e.overwrite=n=>e.check(en(n)),e.optional=()=>Vi(e),e.exactOptional=()=>qh(e),e.nullable=()=>Wi(e),e.nullish=()=>Vi(Wi(e)),e.nonoptional=n=>Oh(e,n),e.array=()=>Ae(e),e.or=n=>nt([e,n]),e.and=n=>xh(e,n),e.transform=n=>Ji(e,Nh(n)),e.default=n=>Ph(e,n),e.prefault=n=>$h(e,n),e.catch=n=>zh(e,n),e.pipe=n=>Ji(e,n),e.readonly=()=>Kh(e),e.describe=n=>{const o=e.clone();return _n.add(o,{description:n}),o},Object.defineProperty(e,"description",{get(){return _n.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return _n.get(e);const o=e.clone();return _n.add(o,n[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),yl=q("_ZodString",(e,t)=>{ei.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(o,r,i)=>df(e,o,r);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...o)=>e.check(Zp(...o)),e.includes=(...o)=>e.check(Wp(...o)),e.startsWith=(...o)=>e.check(Jp(...o)),e.endsWith=(...o)=>e.check(Xp(...o)),e.min=(...o)=>e.check(bo(...o)),e.max=(...o)=>e.check(ul(...o)),e.length=(...o)=>e.check(ml(...o)),e.nonempty=(...o)=>e.check(bo(1,...o)),e.lowercase=o=>e.check(Hp(o)),e.uppercase=o=>e.check(Vp(o)),e.trim=()=>e.check(tf()),e.normalize=(...o)=>e.check(ef(...o)),e.toLowerCase=()=>e.check(nf()),e.toUpperCase=()=>e.check(of()),e.slugify=()=>e.check(rf())}),Xf=q("ZodString",(e,t)=>{ei.init(e,t),yl.init(e,t),e.email=n=>e.check(wp(eh,n)),e.url=n=>e.check(Tp(th,n)),e.jwt=n=>e.check(Fp(yh,n)),e.emoji=n=>e.check(xp(nh,n)),e.guid=n=>e.check(Ki(Yi,n)),e.uuid=n=>e.check(vp(Hn,n)),e.uuidv4=n=>e.check(Sp(Hn,n)),e.uuidv6=n=>e.check(Cp(Hn,n)),e.uuidv7=n=>e.check(kp(Hn,n)),e.nanoid=n=>e.check(_p(oh,n)),e.guid=n=>e.check(Ki(Yi,n)),e.cuid=n=>e.check(Ip(rh,n)),e.cuid2=n=>e.check(Rp(ih,n)),e.ulid=n=>e.check(Mp(sh,n)),e.base64=n=>e.check(Dp(ph,n)),e.base64url=n=>e.check($p(fh,n)),e.xid=n=>e.check(Np(ah,n)),e.ksuid=n=>e.check(Lp(lh,n)),e.ipv4=n=>e.check(qp(ch,n)),e.ipv6=n=>e.check(Ap(uh,n)),e.cidrv4=n=>e.check(Ep(mh,n)),e.cidrv6=n=>e.check(Pp(dh,n)),e.e164=n=>e.check(Op(hh,n)),e.datetime=n=>e.check(Af(n)),e.date=n=>e.check(Pf(n)),e.time=n=>e.check($f(n)),e.duration=n=>e.check(Ff(n))});function T(e){return bp(Xf,e)}const xe=q("ZodStringFormat",(e,t)=>{ke.init(e,t),yl.init(e,t)}),eh=q("ZodEmail",(e,t)=>{_d.init(e,t),xe.init(e,t)}),Yi=q("ZodGUID",(e,t)=>{Td.init(e,t),xe.init(e,t)}),Hn=q("ZodUUID",(e,t)=>{xd.init(e,t),xe.init(e,t)}),th=q("ZodURL",(e,t)=>{Id.init(e,t),xe.init(e,t)}),nh=q("ZodEmoji",(e,t)=>{Rd.init(e,t),xe.init(e,t)}),oh=q("ZodNanoID",(e,t)=>{Md.init(e,t),xe.init(e,t)}),rh=q("ZodCUID",(e,t)=>{Nd.init(e,t),xe.init(e,t)}),ih=q("ZodCUID2",(e,t)=>{Ld.init(e,t),xe.init(e,t)}),sh=q("ZodULID",(e,t)=>{qd.init(e,t),xe.init(e,t)}),ah=q("ZodXID",(e,t)=>{Ad.init(e,t),xe.init(e,t)}),lh=q("ZodKSUID",(e,t)=>{Ed.init(e,t),xe.init(e,t)}),ch=q("ZodIPv4",(e,t)=>{Fd.init(e,t),xe.init(e,t)}),uh=q("ZodIPv6",(e,t)=>{zd.init(e,t),xe.init(e,t)}),mh=q("ZodCIDRv4",(e,t)=>{jd.init(e,t),xe.init(e,t)}),dh=q("ZodCIDRv6",(e,t)=>{Bd.init(e,t),xe.init(e,t)}),ph=q("ZodBase64",(e,t)=>{Kd.init(e,t),xe.init(e,t)}),fh=q("ZodBase64URL",(e,t)=>{Ud.init(e,t),xe.init(e,t)}),hh=q("ZodE164",(e,t)=>{Gd.init(e,t),xe.init(e,t)}),yh=q("ZodJWT",(e,t)=>{Zd.init(e,t),xe.init(e,t)}),gl=q("ZodNumber",(e,t)=>{sl.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(o,r,i)=>pf(e,o,r),e.gt=(o,r)=>e.check(Ui(o,r)),e.gte=(o,r)=>e.check(cr(o,r)),e.min=(o,r)=>e.check(cr(o,r)),e.lt=(o,r)=>e.check(Qi(o,r)),e.lte=(o,r)=>e.check(lr(o,r)),e.max=(o,r)=>e.check(lr(o,r)),e.int=o=>e.check(Zi(o)),e.safe=o=>e.check(Zi(o)),e.positive=o=>e.check(Ui(0,o)),e.nonnegative=o=>e.check(cr(0,o)),e.negative=o=>e.check(Qi(0,o)),e.nonpositive=o=>e.check(lr(0,o)),e.multipleOf=(o,r)=>e.check(Gi(o,r)),e.step=(o,r)=>e.check(Gi(o,r)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function gt(e){return Qp(gl,e)}const gh=q("ZodNumberFormat",(e,t)=>{Hd.init(e,t),gl.init(e,t)});function Zi(e){return Up(gh,e)}const bh=q("ZodUnknown",(e,t)=>{Vd.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hf()});function Hi(){return Gp(bh)}const wh=q("ZodNever",(e,t)=>{Wd.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ff(e,n,o)});function vh(e){return Yp(wh,e)}const Sh=q("ZodArray",(e,t)=>{Jd.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>vf(e,n,o,r),e.element=t.element,e.min=(n,o)=>e.check(bo(n,o)),e.nonempty=n=>e.check(bo(1,n)),e.max=(n,o)=>e.check(ul(n,o)),e.length=(n,o)=>e.check(ml(n,o)),e.unwrap=()=>e.element});function Ae(e,t){return sf(Sh,e,t)}const Ch=q("ZodObject",(e,t)=>{ep.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sf(e,n,o,r),be(e,"shape",()=>t.shape),e.keyof=()=>Go(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Hi()}),e.loose=()=>e.clone({...e._zod.def,catchall:Hi()}),e.strict=()=>e.clone({...e._zod.def,catchall:vh()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>km(e,n),e.safeExtend=n=>Tm(e,n),e.merge=n=>xm(e,n),e.pick=n=>Sm(e,n),e.omit=n=>Cm(e,n),e.partial=(...n)=>_m(bl,e,n[0]),e.required=(...n)=>Im(wl,e,n[0])});function we(e,t){const n={type:"object",shape:e??{},...J(t)};return new Ch(n)}const kh=q("ZodUnion",(e,t)=>{tp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Cf(e,n,o,r),e.options=t.options});function nt(e,t){return new kh({type:"union",options:e,...J(t)})}const Th=q("ZodIntersection",(e,t)=>{np.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>kf(e,n,o,r)});function xh(e,t){return new Th({type:"intersection",left:e,right:t})}const _h=q("ZodRecord",(e,t)=>{op.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Tf(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});function _t(e,t,n){return new _h({type:"record",keyType:e,valueType:t,...J(n)})}const Tr=q("ZodEnum",(e,t)=>{rp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(o,r,i)=>yf(e,o,r),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{const i={};for(const s of o)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Tr({...t,checks:[],...J(r),entries:i})},e.exclude=(o,r)=>{const i={...t.entries};for(const s of o)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Tr({...t,checks:[],...J(r),entries:i})}});function Go(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Tr({type:"enum",entries:n,...J(t)})}const Ih=q("ZodLiteral",(e,t)=>{ip.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>gf(e,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Rh(e,t){return new Ih({type:"literal",values:Array.isArray(e)?e:[e],...J(t)})}const Mh=q("ZodTransform",(e,t)=>{sp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>wf(e,n),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Qa(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Mn(i,n.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(Mn(s))}};const r=t.transform(n.value,n);return r instanceof Promise?r.then(i=>(n.value=i,n)):(n.value=r,n)}});function Nh(e){return new Mh({type:"transform",transform:e})}const bl=q("ZodOptional",(e,t)=>{cl.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hl(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Vi(e){return new bl({type:"optional",innerType:e})}const Lh=q("ZodExactOptional",(e,t)=>{ap.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hl(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function qh(e){return new Lh({type:"optional",innerType:e})}const Ah=q("ZodNullable",(e,t)=>{lp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Wi(e){return new Ah({type:"nullable",innerType:e})}const Eh=q("ZodDefault",(e,t)=>{cp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>If(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ph(e,t){return new Eh({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Za(t)}})}const Dh=q("ZodPrefault",(e,t)=>{up.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Rf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function $h(e,t){return new Dh({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Za(t)}})}const wl=q("ZodNonOptional",(e,t)=>{mp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_f(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Oh(e,t){return new wl({type:"nonoptional",innerType:e,...J(t)})}const Fh=q("ZodCatch",(e,t)=>{dp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Mf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function zh(e,t){return new Fh({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const jh=q("ZodPipe",(e,t)=>{pp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Nf(e,n,o,r),e.in=t.in,e.out=t.out});function Ji(e,t){return new jh({type:"pipe",in:e,out:t})}const Bh=q("ZodReadonly",(e,t)=>{fp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Lf(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Kh(e){return new Bh({type:"readonly",innerType:e})}const Qh=q("ZodCustom",(e,t)=>{hp.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>bf(e,n)});function Uh(e,t={}){return af(Qh,e,t)}function Gh(e){return lf(e)}const Ue={custom:"custom"},pe={required:"errors.required",emailInvalid:"errors.email.invalid",dateInvalid:"errors.date.invalid",companyQuestions:{commentRequired:"errors.companyQuestions.commentRequired"},checker:{requiredField:"checker.requiredField",requiredCompanyQuestionComment:"checker.requiredCompanyQuestionComment",requiredProductList:"checker.requiredProductList",requiredSmelterList:"checker.requiredSmelterList",invalidEmail:"checker.invalidEmail"},minerals:{tooManySelected:"errors.minerals.tooManySelected",selectAtLeastOne:"errors.minerals.selectAtLeastOne",enterAtLeastOne:"errors.minerals.enterAtLeastOne",otherRequired:"errors.minerals.otherRequired",otherNotAllowed:"errors.minerals.otherNotAllowed",tooMany:"errors.minerals.tooMany"}},Yh="not available",Zh=T().refine(e=>e.includes("@"),pe.emailInvalid);function Hh(e){return e.trim().toLowerCase()===Yh}const xr=T().refine(e=>Hh(e)||Zh.safeParse(e).success,pe.emailInvalid);function _r(e){return xr.safeParse(e).success}const Xi=T().regex(/^\d{4}-\d{2}-\d{2}$/,pe.dateInvalid);function Vh(e){let t;switch(e.type){case"email":t=xr;break;case"date":t=Xi;break;default:t=T();break}return e.required===!0?e.type==="email"?xr.min(1,pe.required):e.type==="date"?Xi.min(1,pe.required):T().min(1,pe.required):t.optional()}function Wh(e){const t={};for(const n of e.companyInfoFields)t[n.key]=Vh(n);return we(t)}function Jh(e){const t={};for(const n of e.questions)if(n.perMineral){const o={};for(const r of e.mineralScope.minerals)o[r.key]=T().optional();t[n.key]=we(o)}else t[n.key]=T().optional();return we(t)}function Xh(e){const t={};for(const n of e.questions)if(n.perMineral){const o={};for(const r of e.mineralScope.minerals)o[r.key]=T().optional();t[n.key]=we(o)}else t[n.key]=T().optional();return we(t)}function ey(e){const t={};for(const n of e.companyQuestions){if(n.perMineral){const o={};for(const r of e.mineralScope.minerals)o[r.key]=T().optional();t[n.key]=we(o)}else t[n.key]=T().optional();if(n.hasCommentField)if(n.perMineral){const o={};for(const r of e.mineralScope.minerals)o[r.key]=T().optional();t[`${n.key}_comment`]=we(o)}else t[`${n.key}_comment`]=T().optional()}return we(t).superRefine((n,o)=>{const r=n;for(const i of e.companyQuestions){if(!i.hasCommentField)continue;const s=i.commentRequiredWhen??[],a=`${i.key}_comment`;if(i.perMineral){const u=r[i.key]&&typeof r[i.key]=="object"?r[i.key]:{},p=r[a]&&typeof r[a]=="object"?r[a]:{};if(s.length===0)continue;for(const m of e.mineralScope.minerals){const d=typeof u[m.key]=="string"?u[m.key]:"";!d||!s.includes(d)||(typeof p[m.key]=="string"?p[m.key]:"").trim()||o.addIssue({code:Ue.custom,path:[a,m.key],message:pe.companyQuestions.commentRequired})}continue}const l=typeof r[i.key]=="string"?r[i.key]:"";if(!l||!s.includes(l))continue;const c=r[a];typeof c=="string"&&c.trim()||o.addIssue({code:Ue.custom,path:[a],message:pe.companyQuestions.commentRequired})}})}function ty(e){const t={metal:T().min(1),smelterLookup:T().optional(),smelterName:T().optional(),smelterCountry:T().optional(),smelterIdentification:T().optional(),sourceId:T().optional(),smelterStreet:T().optional(),smelterCity:T().optional(),smelterState:T().optional(),smelterContactName:T().optional(),smelterContactEmail:T().optional(),proposedNextSteps:T().optional(),mineName:T().optional(),mineCountry:T().optional(),recycledScrap:T().optional(),comments:T().optional()};return e.smelterList.hasCombinedColumn&&(t.combinedMetal=T().optional(),t.combinedSmelter=T().optional()),e.smelterList.hasIdColumn&&(t.smelterId=T().optional()),we(t)}function ny(e){return e.mineList.available?we({metal:T().min(1),mineName:T().optional(),mineCountry:T().optional(),mineId:T().optional(),mineIdSource:T().optional(),mineStreet:T().optional(),mineCity:T().optional(),mineProvince:T().optional(),mineDistrict:T().optional(),mineContactName:T().optional(),mineContactEmail:T().optional(),proposedNextSteps:T().optional(),smelterName:T().optional(),comments:T().optional()}):null}function oy(e){const t={productNumber:T().optional(),productName:T().optional(),comments:T().optional()};return t.requesterNumber=T().optional(),t.requesterName=T().optional(),we(t)}function ry(e,t,n){if(n.mineralScope.mode!=="dynamic-dropdown")return;const o=n.mineralScope.maxCount;if(o&&e.selectedMinerals.length>o&&t.addIssue({code:Ue.custom,path:["selectedMinerals"],message:pe.minerals.tooManySelected}),e.selectedMinerals.length===0&&t.addIssue({code:Ue.custom,path:["selectedMinerals"],message:pe.minerals.selectAtLeastOne}),n.templateType!=="amrt")return;const r=e.selectedMinerals.includes("other"),i=e.customMinerals.map(a=>a.trim()).filter(Boolean),s=e.selectedMinerals.filter(a=>a!=="other").length;o&&s+i.length>o&&t.addIssue({code:Ue.custom,path:["selectedMinerals"],message:pe.minerals.tooManySelected}),r&&i.length===0&&t.addIssue({code:Ue.custom,path:["customMinerals",0],message:pe.minerals.otherRequired}),!r&&i.length>0&&i.forEach((a,l)=>{t.addIssue({code:Ue.custom,path:["customMinerals",l],message:pe.minerals.otherNotAllowed})})}function iy(e,t,n){if(n.mineralScope.mode!=="free-text")return;const o=n.mineralScope.maxCount??e.customMinerals.length;e.customMinerals.some(i=>i.trim())||t.addIssue({code:Ue.custom,path:["customMinerals"],message:pe.minerals.enterAtLeastOne}),o!==void 0&&e.customMinerals.length>o&&t.addIssue({code:Ue.custom,path:["customMinerals"],message:pe.minerals.tooMany})}function sy(e,t,n){n.templateType==="amrt"&&e.mineralsScope.forEach((o,r)=>{const i=o.mineral?.trim(),s=o.reason?.trim();i&&!s&&t.addIssue({code:Ue.custom,path:["mineralsScope",r,"reason"],message:pe.required}),!i&&s&&t.addIssue({code:Ue.custom,path:["mineralsScope",r,"mineral"],message:pe.required})})}function ay(e){const t=ny(e)??we({}),n=we({id:T(),mineral:T(),reason:T()});return we({companyInfo:Wh(e),selectedMinerals:Ae(T()),customMinerals:Ae(T()),questions:Jh(e),questionComments:Xh(e),companyQuestions:ey(e),mineralsScope:Ae(n),smelterList:Ae(ty(e)),mineList:Ae(t),productList:Ae(oy())}).superRefine((r,i)=>{ry(r,i,e),iy(r,i,e),sy(r,i,e)})}function es(e){return e.split(/[-_]/).map(t=>t&&t[0].toUpperCase()+t.slice(1)).join(" ")}function tn(e){return typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e))}function vl(e){const t={};for(const l of e.companyInfoFields)t[l.key]="";const n={},o={};for(const l of e.questions)if(l.perMineral){const c={};for(const u of e.mineralScope.minerals)c[u.key]="";n[l.key]=c,o[l.key]={...c}}else n[l.key]="",o[l.key]="";const r={};for(const l of e.companyQuestions){if(l.perMineral){const c={};for(const u of e.mineralScope.minerals)c[u.key]="";r[l.key]=c}else r[l.key]="";if(l.hasCommentField)if(l.perMineral){const c={};for(const u of e.mineralScope.minerals)c[u.key]="";r[`${l.key}_comment`]=c}else r[`${l.key}_comment`]=""}const i=e.mineralScope.minerals.map(l=>l.key),s=e.mineralScope.mode==="fixed"?i:[],a=e.mineralScope.mode==="free-text"?i.map((l,c)=>{const u=e.mineralScope.defaultCustomMinerals;return u&&u.length>0?u[c]??es(l):es(l)}):[];return{companyInfo:t,selectedMinerals:s,customMinerals:a,questions:n,questionComments:o,companyQuestions:r,mineralsScope:[],smelterList:[],mineList:[],productList:[]}}const ly=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],cy=/^\d{4}-\d{2}-\d{2}$/,uy=/^-?\d+$/,my=9,dy=10,py=11,fy=13;function hy(e){if(!e)return"";const[t,n,o]=e.split("-");if(!t||!n||!o)return e;const r=parseInt(n,10)-1;return r<0||r>11?e:`${o}-${ly[r]}-${t}`}function ts(e){if(!Number.isFinite(e))return null;const t=new Date(e);if(Number.isNaN(t.getTime()))return null;const n=t.getUTCFullYear(),o=String(t.getUTCMonth()+1).padStart(2,"0"),r=String(t.getUTCDate()).padStart(2,"0");return`${n}-${o}-${r}`}function yy(e,t){if(t){const r=t.replace(/^[+-]/,"").replace(/^0+(?=\d)/,"");return r.length>0?r.length:1}const n=Math.trunc(Math.abs(e));return n===0?1:String(n).length}function ns(e,t){if(!Number.isInteger(e))return null;const n=yy(e,t);return n>=py&&n<=fy?ts(e):n>=my&&n<=dy?ts(e*1e3):null}function Sl(e){if(e==null)return"";if(typeof e=="number")return Number.isFinite(e)?ns(e)??String(e):String(e);if(typeof e=="string"){const t=e.trim();if(!t)return"";if(cy.test(t)||!uy.test(t))return t;const n=Number(t);return Number.isFinite(n)?ns(n,t)??t:t}return String(e)}const Cl=["smelter not listed","Smelter not listed","Smelter Not Listed"],kl=["smelter not yet identified","Smelter not yet identified","Smelter Not Yet Identified"];function Ir(e){const t=e.toLowerCase().trim();return Cl.some(n=>n.toLowerCase()===t)?"Smelter not listed":kl.some(n=>n.toLowerCase()===t)?"Smelter not yet identified":e}function Yt(e){return Cl.some(t=>t.toLowerCase()===e.toLowerCase().trim())}function vo(e){return kl.some(t=>t.toLowerCase()===e.toLowerCase().trim())}var Tl=Symbol.for("immer-nothing"),os=Symbol.for("immer-draftable"),ue=Symbol.for("immer-state"),gy=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function $e(e,...t){if(process.env.NODE_ENV!=="production"){const n=gy[e],o=It(n)?n.apply(null,t):n;throw new Error(`[Immer] ${o}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ke=Object,Zt=Ke.getPrototypeOf,So="constructor",Yo="prototype",Rr="configurable",Co="enumerable",oo="writable",Nn="value",bt=e=>!!e&&!!e[ue];function We(e){return e?xl(e)||Zo(e)||!!e[os]||!!e[So]?.[os]||Ho(e)||Vo(e):!1}var by=Ke[Yo][So].toString(),rs=new WeakMap;function xl(e){if(!e||!Wo(e))return!1;const t=Zt(e);if(t===null||t===Ke[Yo])return!0;const n=Ke.hasOwnProperty.call(t,So)&&t[So];if(n===Object)return!0;if(!It(n))return!1;let o=rs.get(n);return o===void 0&&(o=Function.toString.call(n),rs.set(n,o)),o===by}function Fn(e,t,n=!0){zn(e)===0?(n?Reflect.ownKeys(e):Ke.keys(e)).forEach(r=>{t(r,e[r],e)}):e.forEach((o,r)=>t(r,o,e))}function zn(e){const t=e[ue];return t?t.type_:Zo(e)?1:Ho(e)?2:Vo(e)?3:0}var is=(e,t,n=zn(e))=>n===2?e.has(t):Ke[Yo].hasOwnProperty.call(e,t),Mr=(e,t,n=zn(e))=>n===2?e.get(t):e[t],ko=(e,t,n,o=zn(e))=>{o===2?e.set(t,n):o===3?e.add(n):e[t]=n};function wy(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Zo=Array.isArray,Ho=e=>e instanceof Map,Vo=e=>e instanceof Set,Wo=e=>typeof e=="object",It=e=>typeof e=="function",ur=e=>typeof e=="boolean";function vy(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Sy=e=>Wo(e)?e?.[ue]:null,Me=e=>e.copy_||e.base_,Cy=e=>{const t=Sy(e);return t?t.copy_??t.base_:e},ti=e=>e.modified_?e.copy_:e.base_;function Nr(e,t){if(Ho(e))return new Map(e);if(Vo(e))return new Set(e);if(Zo(e))return Array[Yo].slice.call(e);const n=xl(e);if(t===!0||t==="class_only"&&!n){const o=Ke.getOwnPropertyDescriptors(e);delete o[ue];let r=Reflect.ownKeys(o);for(let i=0;i<r.length;i++){const s=r[i],a=o[s];a[oo]===!1&&(a[oo]=!0,a[Rr]=!0),(a.get||a.set)&&(o[s]={[Rr]:!0,[oo]:!0,[Co]:a[Co],[Nn]:e[s]})}return Ke.create(Zt(e),o)}else{const o=Zt(e);if(o!==null&&n)return{...e};const r=Ke.create(o);return Ke.assign(r,e)}}function ni(e,t=!1){return Jo(e)||bt(e)||!We(e)||(zn(e)>1&&Ke.defineProperties(e,{set:Vn,add:Vn,clear:Vn,delete:Vn}),Ke.freeze(e),t&&Fn(e,(n,o)=>{ni(o,!0)},!1)),e}function ky(){$e(2)}var Vn={[Nn]:ky};function Jo(e){return e===null||!Wo(e)?!0:Ke.isFrozen(e)}var Ln="MapSet",Lr="Patches",ss="ArrayMethods",To={};function Mt(e){const t=To[e];return t||$e(0,e),t}var as=e=>!!To[e];function Ty(e,t){To[e]||(To[e]=t)}var qn,xo=()=>qn,xy=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:as(Ln)?Mt(Ln):void 0,arrayMethodsPlugin_:as(ss)?Mt(ss):void 0});function ls(e,t){t&&(e.patchPlugin_=Mt(Lr),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function qr(e){Ar(e),e.drafts_.forEach(_y),e.drafts_=null}function Ar(e){e===qn&&(qn=e.parent_)}var cs=e=>qn=xy(qn,e);function _y(e){const t=e[ue];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function us(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[ue].modified_&&(qr(t),$e(4)),We(e)&&(e=ms(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[ue].base_,e,t)}else e=ms(t,n);return Iy(t,e,!0),qr(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Tl?e:void 0}function ms(e,t){if(Jo(t))return t;const n=t[ue];if(!n)return _o(t,e.handledSet_,e);if(!Xo(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:o}=n;if(o)for(;o.length>0;)o.pop()(e);Rl(n,e)}return n.copy_}function Iy(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ni(t,n)}function _l(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Xo=(e,t)=>e.scope_===t,Ry=[];function Il(e,t,n,o){const r=Me(e),i=e.type_;if(o!==void 0&&Mr(r,o,i)===t){ko(r,o,n,i);return}if(!e.draftLocations_){const a=e.draftLocations_=new Map;Fn(r,(l,c)=>{if(bt(c)){const u=a.get(c)||[];u.push(l),a.set(c,u)}})}const s=e.draftLocations_.get(t)??Ry;for(const a of s)ko(r,a,n,i)}function My(e,t,n){e.callbacks_.push(function(r){const i=t;if(!i||!Xo(i,r))return;r.mapSetPlugin_?.fixSetContents(i);const s=ti(i);Il(e,i.draft_??i,s,n),Rl(i,r)})}function Rl(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:o}=t;if(o){const r=o.getPath(e);r&&o.generatePatches_(e,r,t)}_l(e)}}function Er(e,t,n){const{scope_:o}=e;if(bt(n)){const r=n[ue];Xo(r,o)&&r.callbacks_.push(function(){ro(e);const s=ti(r);Il(e,n,s,t)})}else We(n)&&e.callbacks_.push(function(){const i=Me(e);e.type_===3?i.has(n)&&_o(n,o.handledSet_,o):Mr(i,t,e.type_)===n&&o.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&_o(Mr(e.copy_,t,e.type_),o.handledSet_,o)})}function _o(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||bt(e)||t.has(e)||!We(e)||Jo(e)||(t.add(e),Fn(e,(o,r)=>{if(bt(r)){const i=r[ue];if(Xo(i,n)){const s=ti(i);ko(e,o,s,e.type_),_l(i)}}else We(r)&&_o(r,t,n)})),e}function Ny(e,t){const n=Zo(e),o={type_:n?1:0,scope_:t?t.scope_:xo(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let r=o,i=Io;n&&(r=[o],i=An);const{revoke:s,proxy:a}=Proxy.revocable(r,i);return o.draft_=a,o.revoke_=s,[a,o]}var Io={get(e,t){if(t===ue)return e;let n=e.scope_.arrayMethodsPlugin_;const o=e.type_===1&&typeof t=="string";if(o&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const r=Me(e);if(!is(r,t,e.type_))return Ly(e,r,t);const i=r[t];if(e.finalized_||!We(i)||o&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&vy(t))return i;if(i===mr(e.base_,t)){ro(e);const s=e.type_===1?+t:t,a=En(e.scope_,i,e,s);return e.copy_[s]=a}return i},has(e,t){return t in Me(e)},ownKeys(e){return Reflect.ownKeys(Me(e))},set(e,t,n){const o=Ml(Me(e),t);if(o?.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){const r=mr(Me(e),t),i=r?.[ue];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(wy(n,r)&&(n!==void 0||is(e.base_,t,e.type_)))return!0;ro(e),st(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),Er(e,t,n)),!0},deleteProperty(e,t){return ro(e),mr(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),st(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Me(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o&&{[oo]:!0,[Rr]:e.type_!==1||t!=="length",[Co]:o[Co],[Nn]:n[t]}},defineProperty(){$e(11)},getPrototypeOf(e){return Zt(e.base_)},setPrototypeOf(){$e(12)}},An={};for(let e in Io){let t=Io[e];An[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}An.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&$e(13),An.set.call(this,e,t,void 0)};An.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&$e(14),Io.set.call(this,e[0],t,n,e[0])};function mr(e,t){const n=e[ue];return(n?Me(n):e)[t]}function Ly(e,t,n){const o=Ml(t,n);return o?Nn in o?o[Nn]:o.get?.call(e.draft_):void 0}function Ml(e,t){if(!(t in e))return;let n=Zt(e);for(;n;){const o=Object.getOwnPropertyDescriptor(n,t);if(o)return o;n=Zt(n)}}function st(e){e.modified_||(e.modified_=!0,e.parent_&&st(e.parent_))}function ro(e){e.copy_||(e.assigned_=new Map,e.copy_=Nr(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var qy=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,n,o)=>{if(It(t)&&!It(n)){const i=n;n=t;const s=this;return function(l=i,...c){return s.produce(l,u=>n.call(this,u,...c))}}It(n)||$e(6),o!==void 0&&!It(o)&&$e(7);let r;if(We(t)){const i=cs(this),s=En(i,t,void 0);let a=!0;try{r=n(s),a=!1}finally{a?qr(i):Ar(i)}return ls(i,o),us(r,i)}else if(!t||!Wo(t)){if(r=n(t),r===void 0&&(r=t),r===Tl&&(r=void 0),this.autoFreeze_&&ni(r,!0),o){const i=[],s=[];Mt(Lr).generateReplacementPatches_(t,r,{patches_:i,inversePatches_:s}),o(i,s)}return r}else $e(1,t)},this.produceWithPatches=(t,n)=>{if(It(t))return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let o,r;return[this.produce(t,n,(s,a)=>{o=s,r=a}),o,r]},ur(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),ur(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),ur(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){We(e)||$e(8),bt(e)&&(e=Ay(e));const t=cs(this),n=En(t,e,void 0);return n[ue].isManual_=!0,Ar(t),n}finishDraft(e,t){const n=e&&e[ue];(!n||!n.isManual_)&&$e(9);const{scope_:o}=n;return ls(o,t),us(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(r.path.length===0&&r.op==="replace"){e=r.value;break}}n>-1&&(t=t.slice(n+1));const o=Mt(Lr).applyPatches_;return bt(e)?o(e,t):this.produce(e,r=>o(r,t))}};function En(e,t,n,o){const[r,i]=Ho(t)?Mt(Ln).proxyMap_(t,n):Vo(t)?Mt(Ln).proxySet_(t,n):Ny(t,n);return(n?.scope_??xo()).drafts_.push(r),i.callbacks_=n?.callbacks_??[],i.key_=o,n&&o!==void 0?My(n,i,o):i.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(i);const{patchPlugin_:c}=l;i.modified_&&c&&c.generatePatches_(i,[],l)}),r}function Ay(e){return bt(e)||$e(10,e),Nl(e)}function Nl(e){if(!We(e)||Jo(e))return e;const t=e[ue];let n,o=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Nr(e,t.scope_.immer_.useStrictShallowCopy_),o=t.scope_.immer_.shouldUseStrictIteration()}else n=Nr(e,!0);return Fn(n,(r,i)=>{ko(n,r,Nl(i))},o),t&&(t.finalized_=!1),n}function Ey(){class e extends Map{constructor(c,u){super(),this[ue]={type_:2,parent_:u,scope_:u?u.scope_:xo(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:c,draft_:this,isManual_:!1,revoked_:!1,callbacks_:[]}}get size(){return Me(this[ue]).size}has(c){return Me(this[ue]).has(c)}set(c,u){const p=this[ue];return s(p),(!Me(p).has(c)||Me(p).get(c)!==u)&&(n(p),st(p),p.assigned_.set(c,!0),p.copy_.set(c,u),p.assigned_.set(c,!0),Er(p,c,u)),this}delete(c){if(!this.has(c))return!1;const u=this[ue];return s(u),n(u),st(u),u.base_.has(c)?u.assigned_.set(c,!1):u.assigned_.delete(c),u.copy_.delete(c),!0}clear(){const c=this[ue];s(c),Me(c).size&&(n(c),st(c),c.assigned_=new Map,Fn(c.base_,u=>{c.assigned_.set(u,!1)}),c.copy_.clear())}forEach(c,u){const p=this[ue];Me(p).forEach((m,d,h)=>{c.call(u,this.get(d),d,this)})}get(c){const u=this[ue];s(u);const p=Me(u).get(c);if(u.finalized_||!We(p)||p!==u.base_.get(c))return p;const m=En(u.scope_,p,u,c);return n(u),u.copy_.set(c,m),m}keys(){return Me(this[ue]).keys()}values(){const c=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const u=c.next();return u.done?u:{done:!1,value:this.get(u.value)}}}}entries(){const c=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const u=c.next();if(u.done)return u;const p=this.get(u.value);return{done:!1,value:[u.value,p]}}}}[Symbol.iterator](){return this.entries()}}function t(l,c){const u=new e(l,c);return[u,u[ue]]}function n(l){l.copy_||(l.assigned_=new Map,l.copy_=new Map(l.base_))}class o extends Set{constructor(c,u){super(),this[ue]={type_:3,parent_:u,scope_:u?u.scope_:xo(),modified_:!1,finalized_:!1,copy_:void 0,base_:c,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1,assigned_:void 0,callbacks_:[]}}get size(){return Me(this[ue]).size}has(c){const u=this[ue];return s(u),u.copy_?!!(u.copy_.has(c)||u.drafts_.has(c)&&u.copy_.has(u.drafts_.get(c))):u.base_.has(c)}add(c){const u=this[ue];return s(u),this.has(c)||(i(u),st(u),u.copy_.add(c),Er(u,c,c)),this}delete(c){if(!this.has(c))return!1;const u=this[ue];return s(u),i(u),st(u),u.copy_.delete(c)||(u.drafts_.has(c)?u.copy_.delete(u.drafts_.get(c)):!1)}clear(){const c=this[ue];s(c),Me(c).size&&(i(c),st(c),c.copy_.clear())}values(){const c=this[ue];return s(c),i(c),c.copy_.values()}entries(){const c=this[ue];return s(c),i(c),c.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(c,u){const p=this.values();let m=p.next();for(;!m.done;)c.call(u,m.value,m.value,this),m=p.next()}}function r(l,c){const u=new o(l,c);return[u,u[ue]]}function i(l){l.copy_||(l.copy_=new Set,l.base_.forEach(c=>{if(We(c)){const u=En(l.scope_,c,l,c);l.drafts_.set(c,u),l.copy_.add(u)}else l.copy_.add(c)}))}function s(l){l.revoked_&&$e(3,JSON.stringify(Me(l)))}function a(l){if(l.type_===3&&l.copy_){const c=new Set(l.copy_);l.copy_.clear(),c.forEach(u=>{l.copy_.add(Cy(u))})}}Ty(Ln,{proxyMap_:t,proxySet_:r,fixSetContents:a})}var Py=new qy,Dy=Py.produce;const ds=e=>{let t;const n=new Set,o=(c,u)=>{const p=typeof c=="function"?c(t):c;if(!Object.is(p,t)){const m=t;t=u??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(d=>d(t,m))}},r=()=>t,a={setState:o,getState:r,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(o,r,a);return a},$y=(e=>e?ds(e):ds),Oy=e=>e;function Fy(e,t=Oy){const n=ie.useSyncExternalStore(e.subscribe,ie.useCallback(()=>t(e.getState()),[e,t]),ie.useCallback(()=>t(e.getInitialState()),[e,t]));return ie.useDebugValue(n),n}const zy=e=>(t,n,o)=>(o.setState=(r,i,...s)=>{const a=typeof r=="function"?Dy(r):r;return t(a,i,...s)},e(o.setState,n,o)),jy=zy,Ll=ie.createContext(null);function Kt(e){const t=ie.useContext(Ll);if(!t)throw new Error("useTemplateStore must be used within TemplateProvider");return Fy(t,e)}Ey();const Wn={companyInfo:{},customMinerals:{},mineralsScopeRows:{},questions:{},companyQuestions:{}};function ql(e,t,n,o){if(o){const r=e[t];typeof r=="object"?r[o]=n:e[t]={[o]:n}}else e[t]=n}function ps(e,t,n,o,r){if(t.perMineral){if(!o)return;ql(e,n,r,o)}else e[n]=r}function By(e){return{...e,companyInfo:{...e.companyInfo,authorizationDate:Sl(e.companyInfo.authorizationDate)}}}function fs(e){const t={companyInfo:{},customMinerals:{},mineralsScopeRows:{},questions:{},companyQuestions:{}};for(const n of e){const[o,...r]=n.path,i=n.message;switch(o){case"companyInfo":{const s=r[0];typeof s=="string"&&(t.companyInfo[s]=i);break}case"selectedMinerals":t.mineralsScope=i;break;case"customMinerals":{const s=r[0];typeof s=="number"&&(t.customMinerals[s]=i);break}case"mineralsScope":{const s=r[0],a=r[1];if(typeof s=="number"&&(a==="mineral"||a==="reason")){const l=t.mineralsScopeRows[s]??{};l[a]=i,t.mineralsScopeRows[s]=l}break}case"questions":{const s=r[0],a=r[1];if(typeof s=="string")if(typeof a=="string"){const l=t.questions[s];l&&typeof l=="object"?l[a]=i:t.questions[s]={[a]:i}}else t.questions[s]=i;break}case"companyQuestions":{const s=r[0],a=r[1];if(typeof s=="string")if(typeof a=="string"){const l=t.companyQuestions[s];l&&typeof l=="object"?l[a]=i:t.companyQuestions[s]={[a]:i}}else t.companyQuestions[s]=i;break}}}return t}function dr(e){return{companyInfo:e.companyInfo,selectedMinerals:e.selectedMinerals,customMinerals:e.customMinerals,questions:e.questions,questionComments:e.questionComments,companyQuestions:e.companyQuestions,mineralsScope:e.mineralsScope,smelterList:e.smelterList,mineList:e.mineList,productList:e.productList}}function hs(e,t,n,o){const r=Bo(e,t),i=vl(r),s=ay(r),a=new Map(r.questions.map(d=>[d.key,d])),l=r.questions.map(d=>d.key);function c(d){const h=s.safeParse(dr(d));return h.success?Wn:fs(h.error.issues)}let u=!1;function p(d,h){u||(u=!0,queueMicrotask(()=>{u=!1;const g=h(),b=c(g);b!==g.errors&&d({errors:b})}))}function m(d,h,g,b,w){if(h!=="Q1"&&h!=="Q2")return;const S={...dr(d).questions};if(w.perMineral&&g){const k=typeof S[h]=="object"?S[h]:{};S[h]={...k,[g]:b}}else w.perMineral||(S[h]=b);const v=Ka(r,S,w.perMineral?g??void 0:void 0),C=l.indexOf("Q2");if(C<0)return;const M=l.slice(C+1),_=(k,A)=>{const z=a.get(k);if(z)if(z.perMineral&&A){const I=d.questions[k];typeof I=="object"&&(I[A]="");const L=d.questionComments[k];typeof L=="object"&&(L[A]="")}else z.perMineral||(d.questions[k]="",d.questionComments[k]="")};v.q2Enabled?v.laterQuestionsEnabled||M.forEach(k=>_(k,g)):(_("Q2",g),M.forEach(k=>_(k,g)))}return $y()(jy((d,h)=>({templateType:e,versionId:t,versionDef:r,readOnly:n,integrations:o,...i,errors:Wn,isDirty:!1,setCompanyInfoField:(g,b)=>{h().readOnly||(d(w=>{w.companyInfo[g]=b,w.isDirty=!0}),p(d,h))},setSelectedMinerals:g=>{h().readOnly||(d(b=>{b.selectedMinerals=g,b.isDirty=!0}),p(d,h))},setCustomMinerals:g=>{h().readOnly||(d({customMinerals:g,isDirty:!0}),p(d,h))},setQuestionValue:(g,b,w)=>{h().readOnly||(d(S=>{const v=a.get(g);v&&(ps(S.questions,v,g,b,w),S.isDirty=!0,m(S,g,b,w,v))}),p(d,h))},setQuestionComment:(g,b,w)=>{h().readOnly||(d(S=>{const v=a.get(g);v&&(ps(S.questionComments,v,g,b,w),S.isDirty=!0)}),p(d,h))},setCompanyQuestionValue:(g,b,w)=>{h().readOnly||(d(S=>{ql(S.companyQuestions,g,b,w),S.isDirty=!0}),p(d,h))},setMineralsScope:g=>{h().readOnly||(d({mineralsScope:g,isDirty:!0}),p(d,h))},setSmelterList:g=>{h().readOnly||(d({smelterList:g,isDirty:!0}),p(d,h))},setMineList:g=>{h().readOnly||(d({mineList:g,isDirty:!0}),p(d,h))},setProductList:g=>{h().readOnly||(d({productList:g,isDirty:!0}),p(d,h))},setFormData:g=>{d({...By(g),isDirty:!1}),p(d,h)},validateForm:async()=>{const g=h(),b=s.safeParse(dr(g));return b.success?(d({errors:Wn}),!0):(d({errors:fs(b.error.issues)}),!1)},resetForm:()=>{d({...i,errors:Wn,isDirty:!1})}})))}function Ky({templateType:e,versionId:t,readOnly:n=!1,integrations:o,children:r}){const i=`${e}:${t}`,[s,a]=ie.useState(i),[l,c]=ie.useState(()=>hs(e,t,n,o));return i!==s&&(a(i),c(hs(e,t,n,o))),ie.useEffect(()=>{l.setState({integrations:o,readOnly:n})},[l,o,n]),ie.useEffect(()=>{if(typeof window>"u")return;const u=m=>{m.preventDefault(),m.returnValue=""},p=l.subscribe(m=>{m.isDirty?window.addEventListener("beforeunload",u):window.removeEventListener("beforeunload",u)});return()=>{p(),window.removeEventListener("beforeunload",u)}},[l]),f.jsx(Ll.Provider,{value:l,children:r})}const ys=e=>Symbol.iterator in e,gs=e=>"entries"in e,bs=(e,t)=>{const n=e instanceof Map?e:new Map(e.entries()),o=t instanceof Map?t:new Map(t.entries());if(n.size!==o.size)return!1;for(const[r,i]of n)if(!o.has(r)||!Object.is(i,o.get(r)))return!1;return!0},Qy=(e,t)=>{const n=e[Symbol.iterator](),o=t[Symbol.iterator]();let r=n.next(),i=o.next();for(;!r.done&&!i.done;){if(!Object.is(r.value,i.value))return!1;r=n.next(),i=o.next()}return!!r.done&&!!i.done};function Uy(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:ys(e)&&ys(t)?gs(e)&&gs(t)?bs(e,t):Qy(e,t):bs({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function io(e){const t=ie.useRef(void 0);return n=>{const o=e(n);return Uy(t.current,o)?t.current:t.current=o}}const Gy=e=>({templateType:e.templateType,versionId:e.versionId,versionDef:e.versionDef,readOnly:e.readOnly}),Yy=e=>({companyInfo:e.companyInfo,selectedMinerals:e.selectedMinerals,customMinerals:e.customMinerals,questions:e.questions,questionComments:e.questionComments,companyQuestions:e.companyQuestions}),Zy=e=>({mineralsScope:e.mineralsScope,smelterList:e.smelterList,mineList:e.mineList,productList:e.productList}),Hy=e=>e.errors,Vy=e=>e.integrations,Wy=e=>({setCompanyInfoField:e.setCompanyInfoField,setSelectedMinerals:e.setSelectedMinerals,setCustomMinerals:e.setCustomMinerals,setQuestionValue:e.setQuestionValue,setQuestionComment:e.setQuestionComment,setCompanyQuestionValue:e.setCompanyQuestionValue,setMineralsScope:e.setMineralsScope,setSmelterList:e.setSmelterList,setMineList:e.setMineList,setProductList:e.setProductList,setFormData:e.setFormData,validateForm:e.validateForm,resetForm:e.resetForm});function ze(){const e=Kt(io(Gy)),t=Kt(io(Yy)),n=Kt(io(Zy));return ie.useMemo(()=>({meta:e,form:t,lists:n}),[e,t,n])}function Al(){return Kt(Hy)}function Et(){return Kt(io(Wy))}function El(){return Kt(Vy)}var Pl=typeof global=="object"&&global&&global.Object===Object&&global,Jy=typeof self=="object"&&self&&self.Object===Object&&self,ct=Pl||Jy||Function("return this")(),wt=ct.Symbol,Dl=Object.prototype,Xy=Dl.hasOwnProperty,eg=Dl.toString,an=wt?wt.toStringTag:void 0;function tg(e){var t=Xy.call(e,an),n=e[an];try{e[an]=void 0;var o=!0}catch{}var r=eg.call(e);return o&&(t?e[an]=n:delete e[an]),r}var ng=Object.prototype,og=ng.toString;function rg(e){return og.call(e)}var ig="[object Null]",sg="[object Undefined]",ws=wt?wt.toStringTag:void 0;function nn(e){return e==null?e===void 0?sg:ig:ws&&ws in Object(e)?tg(e):rg(e)}function Nt(e){return e!=null&&typeof e=="object"}var ag="[object Symbol]";function oi(e){return typeof e=="symbol"||Nt(e)&&nn(e)==ag}function ri(e,t){for(var n=-1,o=e==null?0:e.length,r=Array(o);++n<o;)r[n]=t(e[n],n,e);return r}var Je=Array.isArray,vs=wt?wt.prototype:void 0,Ss=vs?vs.toString:void 0;function $l(e){if(typeof e=="string")return e;if(Je(e))return ri(e,$l)+"";if(oi(e))return Ss?Ss.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function ii(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function si(e){return e}var lg="[object AsyncFunction]",cg="[object Function]",ug="[object GeneratorFunction]",mg="[object Proxy]";function Ol(e){if(!ii(e))return!1;var t=nn(e);return t==cg||t==ug||t==lg||t==mg}var pr=ct["__core-js_shared__"],Cs=(function(){var e=/[^.]+$/.exec(pr&&pr.keys&&pr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function dg(e){return!!Cs&&Cs in e}var pg=Function.prototype,fg=pg.toString;function Pt(e){if(e!=null){try{return fg.call(e)}catch{}try{return e+""}catch{}}return""}var hg=/[\\^$.*+?()[\]{}|]/g,yg=/^\[object .+?Constructor\]$/,gg=Function.prototype,bg=Object.prototype,wg=gg.toString,vg=bg.hasOwnProperty,Sg=RegExp("^"+wg.call(vg).replace(hg,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Cg(e){if(!ii(e)||dg(e))return!1;var t=Ol(e)?Sg:yg;return t.test(Pt(e))}function kg(e,t){return e?.[t]}function Dt(e,t){var n=kg(e,t);return Cg(n)?n:void 0}var Pr=Dt(ct,"WeakMap");function Tg(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function xg(){}var _g=800,Ig=16,Rg=Date.now;function Mg(e){var t=0,n=0;return function(){var o=Rg(),r=Ig-(o-n);if(n=o,r>0){if(++t>=_g)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ng(e){return function(){return e}}var Ro=(function(){try{var e=Dt(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Lg=Ro?function(e,t){return Ro(e,"toString",{configurable:!0,enumerable:!1,value:Ng(t),writable:!0})}:si,qg=Mg(Lg);function Ag(e,t,n,o){for(var r=e.length,i=n+-1;++i<r;)if(t(e[i],i,e))return i;return-1}function Eg(e){return e!==e}function Pg(e,t,n){for(var o=n-1,r=e.length;++o<r;)if(e[o]===t)return o;return-1}function Dg(e,t,n){return t===t?Pg(e,t,n):Ag(e,Eg,n)}function Fl(e,t){var n=e==null?0:e.length;return!!n&&Dg(e,t,0)>-1}var $g=9007199254740991,Og=/^(?:0|[1-9]\d*)$/;function zl(e,t){var n=typeof e;return t=t??$g,!!t&&(n=="number"||n!="symbol"&&Og.test(e))&&e>-1&&e%1==0&&e<t}function Fg(e,t,n){t=="__proto__"&&Ro?Ro(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function jl(e,t){return e===t||e!==e&&t!==t}var ks=Math.max;function zg(e,t,n){return t=ks(t===void 0?e.length-1:t,0),function(){for(var o=arguments,r=-1,i=ks(o.length-t,0),s=Array(i);++r<i;)s[r]=o[t+r];r=-1;for(var a=Array(t+1);++r<t;)a[r]=o[r];return a[t]=n(s),Tg(e,this,a)}}function jg(e,t){return qg(zg(e,t,si),e+"")}var Bg=9007199254740991;function ai(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Bg}function li(e){return e!=null&&ai(e.length)&&!Ol(e)}var Kg=Object.prototype;function Qg(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Kg;return e===n}function Ug(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var Gg="[object Arguments]";function Ts(e){return Nt(e)&&nn(e)==Gg}var Bl=Object.prototype,Yg=Bl.hasOwnProperty,Zg=Bl.propertyIsEnumerable,Kl=Ts((function(){return arguments})())?Ts:function(e){return Nt(e)&&Yg.call(e,"callee")&&!Zg.call(e,"callee")};function Hg(){return!1}var Ql=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xs=Ql&&typeof module=="object"&&module&&!module.nodeType&&module,Vg=xs&&xs.exports===Ql,_s=Vg?ct.Buffer:void 0,Wg=_s?_s.isBuffer:void 0,Dr=Wg||Hg,Jg="[object Arguments]",Xg="[object Array]",eb="[object Boolean]",tb="[object Date]",nb="[object Error]",ob="[object Function]",rb="[object Map]",ib="[object Number]",sb="[object Object]",ab="[object RegExp]",lb="[object Set]",cb="[object String]",ub="[object WeakMap]",mb="[object ArrayBuffer]",db="[object DataView]",pb="[object Float32Array]",fb="[object Float64Array]",hb="[object Int8Array]",yb="[object Int16Array]",gb="[object Int32Array]",bb="[object Uint8Array]",wb="[object Uint8ClampedArray]",vb="[object Uint16Array]",Sb="[object Uint32Array]",Se={};Se[pb]=Se[fb]=Se[hb]=Se[yb]=Se[gb]=Se[bb]=Se[wb]=Se[vb]=Se[Sb]=!0;Se[Jg]=Se[Xg]=Se[mb]=Se[eb]=Se[db]=Se[tb]=Se[nb]=Se[ob]=Se[rb]=Se[ib]=Se[sb]=Se[ab]=Se[lb]=Se[cb]=Se[ub]=!1;function Cb(e){return Nt(e)&&ai(e.length)&&!!Se[nn(e)]}function Ul(e){return function(t){return e(t)}}var Gl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,In=Gl&&typeof module=="object"&&module&&!module.nodeType&&module,kb=In&&In.exports===Gl,fr=kb&&Pl.process,Is=(function(){try{var e=In&&In.require&&In.require("util").types;return e||fr&&fr.binding&&fr.binding("util")}catch{}})(),Rs=Is&&Is.isTypedArray,Yl=Rs?Ul(Rs):Cb,Tb=Object.prototype,xb=Tb.hasOwnProperty;function _b(e,t){var n=Je(e),o=!n&&Kl(e),r=!n&&!o&&Dr(e),i=!n&&!o&&!r&&Yl(e),s=n||o||r||i,a=s?Ug(e.length,String):[],l=a.length;for(var c in e)xb.call(e,c)&&!(s&&(c=="length"||r&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||zl(c,l)))&&a.push(c);return a}function Ib(e,t){return function(n){return e(t(n))}}var Rb=Ib(Object.keys,Object),Mb=Object.prototype,Nb=Mb.hasOwnProperty;function Lb(e){if(!Qg(e))return Rb(e);var t=[];for(var n in Object(e))Nb.call(e,n)&&n!="constructor"&&t.push(n);return t}function ci(e){return li(e)?_b(e):Lb(e)}var qb=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ab=/^\w*$/;function ui(e,t){if(Je(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||oi(e)?!0:Ab.test(e)||!qb.test(e)||t!=null&&e in Object(t)}var Pn=Dt(Object,"create");function Eb(){this.__data__=Pn?Pn(null):{},this.size=0}function Pb(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Db="__lodash_hash_undefined__",$b=Object.prototype,Ob=$b.hasOwnProperty;function Fb(e){var t=this.__data__;if(Pn){var n=t[e];return n===Db?void 0:n}return Ob.call(t,e)?t[e]:void 0}var zb=Object.prototype,jb=zb.hasOwnProperty;function Bb(e){var t=this.__data__;return Pn?t[e]!==void 0:jb.call(t,e)}var Kb="__lodash_hash_undefined__";function Qb(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Pn&&t===void 0?Kb:t,this}function Lt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Lt.prototype.clear=Eb;Lt.prototype.delete=Pb;Lt.prototype.get=Fb;Lt.prototype.has=Bb;Lt.prototype.set=Qb;function Ub(){this.__data__=[],this.size=0}function er(e,t){for(var n=e.length;n--;)if(jl(e[n][0],t))return n;return-1}var Gb=Array.prototype,Yb=Gb.splice;function Zb(e){var t=this.__data__,n=er(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():Yb.call(t,n,1),--this.size,!0}function Hb(e){var t=this.__data__,n=er(t,e);return n<0?void 0:t[n][1]}function Vb(e){return er(this.__data__,e)>-1}function Wb(e,t){var n=this.__data__,o=er(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}function ut(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}ut.prototype.clear=Ub;ut.prototype.delete=Zb;ut.prototype.get=Hb;ut.prototype.has=Vb;ut.prototype.set=Wb;var Dn=Dt(ct,"Map");function Jb(){this.size=0,this.__data__={hash:new Lt,map:new(Dn||ut),string:new Lt}}function Xb(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function tr(e,t){var n=e.__data__;return Xb(t)?n[typeof t=="string"?"string":"hash"]:n.map}function ew(e){var t=tr(this,e).delete(e);return this.size-=t?1:0,t}function tw(e){return tr(this,e).get(e)}function nw(e){return tr(this,e).has(e)}function ow(e,t){var n=tr(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}function mt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}mt.prototype.clear=Jb;mt.prototype.delete=ew;mt.prototype.get=tw;mt.prototype.has=nw;mt.prototype.set=ow;var rw="Expected a function";function mi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(rw);var n=function(){var o=arguments,r=t?t.apply(this,o):o[0],i=n.cache;if(i.has(r))return i.get(r);var s=e.apply(this,o);return n.cache=i.set(r,s)||i,s};return n.cache=new(mi.Cache||mt),n}mi.Cache=mt;var iw=500;function sw(e){var t=mi(e,function(o){return n.size===iw&&n.clear(),o}),n=t.cache;return t}var aw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lw=/\\(\\)?/g,cw=sw(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(aw,function(n,o,r,i){t.push(r?i.replace(lw,"$1"):o||n)}),t});function uw(e){return e==null?"":$l(e)}function Zl(e,t){return Je(e)?e:ui(e,t)?[e]:cw(uw(e))}function nr(e){if(typeof e=="string"||oi(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Hl(e,t){t=Zl(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[nr(t[n++])];return n&&n==o?e:void 0}function mw(e,t,n){var o=e==null?void 0:Hl(e,t);return o===void 0?n:o}function dw(e,t){for(var n=-1,o=t.length,r=e.length;++n<o;)e[r+n]=t[n];return e}function pw(){this.__data__=new ut,this.size=0}function fw(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function hw(e){return this.__data__.get(e)}function yw(e){return this.__data__.has(e)}var gw=200;function bw(e,t){var n=this.__data__;if(n instanceof ut){var o=n.__data__;if(!Dn||o.length<gw-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new mt(o)}return n.set(e,t),this.size=n.size,this}function lt(e){var t=this.__data__=new ut(e);this.size=t.size}lt.prototype.clear=pw;lt.prototype.delete=fw;lt.prototype.get=hw;lt.prototype.has=yw;lt.prototype.set=bw;function ww(e,t){for(var n=-1,o=e==null?0:e.length,r=0,i=[];++n<o;){var s=e[n];t(s,n,e)&&(i[r++]=s)}return i}function vw(){return[]}var Sw=Object.prototype,Cw=Sw.propertyIsEnumerable,Ms=Object.getOwnPropertySymbols,kw=Ms?function(e){return e==null?[]:(e=Object(e),ww(Ms(e),function(t){return Cw.call(e,t)}))}:vw;function Tw(e,t,n){var o=t(e);return Je(e)?o:dw(o,n(e))}function Ns(e){return Tw(e,ci,kw)}var $r=Dt(ct,"DataView"),Or=Dt(ct,"Promise"),Qt=Dt(ct,"Set"),Ls="[object Map]",xw="[object Object]",qs="[object Promise]",As="[object Set]",Es="[object WeakMap]",Ps="[object DataView]",_w=Pt($r),Iw=Pt(Dn),Rw=Pt(Or),Mw=Pt(Qt),Nw=Pt(Pr),pt=nn;($r&&pt(new $r(new ArrayBuffer(1)))!=Ps||Dn&&pt(new Dn)!=Ls||Or&&pt(Or.resolve())!=qs||Qt&&pt(new Qt)!=As||Pr&&pt(new Pr)!=Es)&&(pt=function(e){var t=nn(e),n=t==xw?e.constructor:void 0,o=n?Pt(n):"";if(o)switch(o){case _w:return Ps;case Iw:return Ls;case Rw:return qs;case Mw:return As;case Nw:return Es}return t});var Ds=ct.Uint8Array;function Oe(e){for(var t=-1,n=e==null?0:e.length,o=0,r=[];++t<n;){var i=e[t];i&&(r[o++]=i)}return r}var Lw="__lodash_hash_undefined__";function qw(e){return this.__data__.set(e,Lw),this}function Aw(e){return this.__data__.has(e)}function Ht(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new mt;++t<n;)this.add(e[t])}Ht.prototype.add=Ht.prototype.push=qw;Ht.prototype.has=Aw;function Vl(e,t){for(var n=-1,o=e==null?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}function Mo(e,t){return e.has(t)}var Ew=1,Pw=2;function Wl(e,t,n,o,r,i){var s=n&Ew,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var p=-1,m=!0,d=n&Pw?new Ht:void 0;for(i.set(e,t),i.set(t,e);++p<a;){var h=e[p],g=t[p];if(o)var b=s?o(g,h,p,t,e,i):o(h,g,p,e,t,i);if(b!==void 0){if(b)continue;m=!1;break}if(d){if(!Vl(t,function(w,S){if(!Mo(d,S)&&(h===w||r(h,w,n,o,i)))return d.push(S)})){m=!1;break}}else if(!(h===g||r(h,g,n,o,i))){m=!1;break}}return i.delete(e),i.delete(t),m}function Dw(e){var t=-1,n=Array(e.size);return e.forEach(function(o,r){n[++t]=[r,o]}),n}function di(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var $w=1,Ow=2,Fw="[object Boolean]",zw="[object Date]",jw="[object Error]",Bw="[object Map]",Kw="[object Number]",Qw="[object RegExp]",Uw="[object Set]",Gw="[object String]",Yw="[object Symbol]",Zw="[object ArrayBuffer]",Hw="[object DataView]",$s=wt?wt.prototype:void 0,hr=$s?$s.valueOf:void 0;function Vw(e,t,n,o,r,i,s){switch(n){case Hw:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Zw:return!(e.byteLength!=t.byteLength||!i(new Ds(e),new Ds(t)));case Fw:case zw:case Kw:return jl(+e,+t);case jw:return e.name==t.name&&e.message==t.message;case Qw:case Gw:return e==t+"";case Bw:var a=Dw;case Uw:var l=o&$w;if(a||(a=di),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;o|=Ow,s.set(e,t);var u=Wl(a(e),a(t),o,r,i,s);return s.delete(e),u;case Yw:if(hr)return hr.call(e)==hr.call(t)}return!1}var Ww=1,Jw=Object.prototype,Xw=Jw.hasOwnProperty;function ev(e,t,n,o,r,i){var s=n&Ww,a=Ns(e),l=a.length,c=Ns(t),u=c.length;if(l!=u&&!s)return!1;for(var p=l;p--;){var m=a[p];if(!(s?m in t:Xw.call(t,m)))return!1}var d=i.get(e),h=i.get(t);if(d&&h)return d==t&&h==e;var g=!0;i.set(e,t),i.set(t,e);for(var b=s;++p<l;){m=a[p];var w=e[m],S=t[m];if(o)var v=s?o(S,w,m,t,e,i):o(w,S,m,e,t,i);if(!(v===void 0?w===S||r(w,S,n,o,i):v)){g=!1;break}b||(b=m=="constructor")}if(g&&!b){var C=e.constructor,M=t.constructor;C!=M&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof M=="function"&&M instanceof M)&&(g=!1)}return i.delete(e),i.delete(t),g}var tv=1,Os="[object Arguments]",Fs="[object Array]",Jn="[object Object]",nv=Object.prototype,zs=nv.hasOwnProperty;function ov(e,t,n,o,r,i){var s=Je(e),a=Je(t),l=s?Fs:pt(e),c=a?Fs:pt(t);l=l==Os?Jn:l,c=c==Os?Jn:c;var u=l==Jn,p=c==Jn,m=l==c;if(m&&Dr(e)){if(!Dr(t))return!1;s=!0,u=!1}if(m&&!u)return i||(i=new lt),s||Yl(e)?Wl(e,t,n,o,r,i):Vw(e,t,l,n,o,r,i);if(!(n&tv)){var d=u&&zs.call(e,"__wrapped__"),h=p&&zs.call(t,"__wrapped__");if(d||h){var g=d?e.value():e,b=h?t.value():t;return i||(i=new lt),r(g,b,n,o,i)}}return m?(i||(i=new lt),ev(e,t,n,o,r,i)):!1}function pi(e,t,n,o,r){return e===t?!0:e==null||t==null||!Nt(e)&&!Nt(t)?e!==e&&t!==t:ov(e,t,n,o,pi,r)}var rv=1,iv=2;function sv(e,t,n,o){var r=n.length,i=r;if(e==null)return!i;for(e=Object(e);r--;){var s=n[r];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++r<i;){s=n[r];var a=s[0],l=e[a],c=s[1];if(s[2]){if(l===void 0&&!(a in e))return!1}else{var u=new lt,p;if(!(p===void 0?pi(c,l,rv|iv,o,u):p))return!1}}return!0}function Jl(e){return e===e&&!ii(e)}function av(e){for(var t=ci(e),n=t.length;n--;){var o=t[n],r=e[o];t[n]=[o,r,Jl(r)]}return t}function Xl(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function lv(e){var t=av(e);return t.length==1&&t[0][2]?Xl(t[0][0],t[0][1]):function(n){return n===e||sv(n,e,t)}}function cv(e,t){return e!=null&&t in Object(e)}function uv(e,t,n){t=Zl(t,e);for(var o=-1,r=t.length,i=!1;++o<r;){var s=nr(t[o]);if(!(i=e!=null&&n(e,s)))break;e=e[s]}return i||++o!=r?i:(r=e==null?0:e.length,!!r&&ai(r)&&zl(s,r)&&(Je(e)||Kl(e)))}function mv(e,t){return e!=null&&uv(e,t,cv)}var dv=1,pv=2;function fv(e,t){return ui(e)&&Jl(t)?Xl(nr(e),t):function(n){var o=mw(n,e);return o===void 0&&o===t?mv(n,e):pi(t,o,dv|pv)}}function hv(e){return function(t){return t?.[e]}}function yv(e){return function(t){return Hl(t,e)}}function gv(e){return ui(e)?hv(nr(e)):yv(e)}function or(e){return typeof e=="function"?e:e==null?si:typeof e=="object"?Je(e)?fv(e[0],e[1]):lv(e):gv(e)}function bv(e,t,n,o){for(var r=-1,i=e==null?0:e.length;++r<i;){var s=e[r];t(o,s,n(s),e)}return o}function wv(e){return function(t,n,o){for(var r=-1,i=Object(t),s=o(t),a=s.length;a--;){var l=s[++r];if(n(i[l],l,i)===!1)break}return t}}var vv=wv();function Sv(e,t){return e&&vv(e,t,ci)}function Cv(e,t){return function(n,o){if(n==null)return n;if(!li(n))return e(n,o);for(var r=n.length,i=-1,s=Object(n);++i<r&&o(s[i],i,s)!==!1;);return n}}var ec=Cv(Sv);function kv(e,t,n,o){return ec(e,function(r,i,s){t(o,r,n(r),s)}),o}function Tv(e,t){return function(n,o){var r=Je(n)?bv:kv,i={};return r(n,e,or(o),i)}}function xv(e){return Nt(e)&&li(e)}function js(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var _v=Object.prototype,Iv=_v.hasOwnProperty,tc=Tv(function(e,t,n){Iv.call(e,n)?e[n].push(t):Fg(e,n,[t])}),Rv=Math.min;function Mv(e,t,n){for(var o=Fl,r=e[0].length,i=e.length,s=i,a=Array(i),l=1/0,c=[];s--;){var u=e[s];s&&t&&(u=ri(u,Ul(t))),l=Rv(u.length,l),a[s]=t||r>=120&&u.length>=120?new Ht(s&&u):void 0}u=e[0];var p=-1,m=a[0];e:for(;++p<r&&c.length<l;){var d=u[p],h=t?t(d):d;if(d=d!==0?d:0,!(m?Mo(m,h):o(c,h))){for(s=i;--s;){var g=a[s];if(!(g?Mo(g,h):o(e[s],h)))continue e}m&&m.push(h),c.push(d)}}return c}function Nv(e){return xv(e)?e:[]}var Fr=jg(function(e){var t=js(e),n=ri(e,Nv);return t===js(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?Mv(n,or(t)):[]});function Lv(e,t){for(var n,o=-1,r=e.length;++o<r;){var i=t(e[o]);i!==void 0&&(n=n===void 0?i:n+i)}return n}function qv(e,t){var n;return ec(e,function(o,r,i){return n=t(o,r,i),!n}),!!n}function fi(e,t,n){var o=Je(e)?Vl:qv;return o(e,or(t))}function Bs(e,t){return e&&e.length?Lv(e,or(t)):0}var Av=1/0,Ev=Qt&&1/di(new Qt([,-0]))[1]==Av?function(e){return new Qt(e)}:xg,Pv=200;function Dv(e,t,n){var o=-1,r=Fl,i=e.length,s=!0,a=[],l=a;if(i>=Pv){var c=Ev(e);if(c)return di(c);s=!1,r=Mo,l=new Ht}else l=a;e:for(;++o<i;){var u=e[o],p=u;if(u=u!==0?u:0,s&&p===p){for(var m=l.length;m--;)if(l[m]===p)continue e;a.push(u)}else r(l,p,n)||(l!==a&&l.push(p),a.push(u))}return a}function hi(e){return e&&e.length?Dv(e):[]}const zr="other-";function yi(e){return`${zr}${e}`}function $v(e){return Oe(e.map((t,n)=>t.trim()?yi(n):null))}function Ov(e){return Oe(e.map((t,n)=>t.trim()?{key:yi(n),labelKey:"minerals.other"}:null))}function gi(e){if(!e.startsWith(zr))return null;const t=Number(e.slice(zr.length));return Number.isFinite(t)?t:null}function Ks(e,t,n){const o=e[t];return typeof o=="object"?o[n]||"":typeof o=="string"?o:""}function nc(e,t,n,o){return e?e.type==="fixed"?e.metals:e.type==="dynamic-active"?oc(t,o?.selectedMinerals??[],o?.customMinerals??[]):e.type==="dynamic-q1-yes"?Fr(t.mineralScope.minerals,Oe(t.mineralScope.minerals.map(r=>Ks(n,"Q1",r.key)==="Yes"?r:null)),r=>r.key):e.type==="dynamic-q2-yes"?Fr(t.mineralScope.minerals,Oe(t.mineralScope.minerals.map(r=>Ks(n,"Q2",r.key)==="Yes"?r:null)),r=>r.key):[]:[]}function jn(e,t,n=[]){const o=new Map;return e.mineralScope.mode==="free-text"?(e.mineralScope.minerals.forEach((r,i)=>{const s=t[i]?.trim();s&&o.set(r.key,s)}),o):(e.mineralScope.mode==="dynamic-dropdown"&&n.includes("other")&&t.forEach((r,i)=>{const s=r.trim();s&&o.set(yi(i),s)}),o)}function Bn(e,t,n){const o=e.mineralScope.minerals;if(e.mineralScope.mode==="dynamic-dropdown"){const r=o.filter(s=>s.key!=="other"&&t.includes(s.key)).map(s=>s.key),i=t.includes("other")?$v(n):[];return[...r,...i]}return e.mineralScope.mode==="free-text"?o.filter((r,i)=>!!n[i]?.trim()).map(r=>r.key):o.map(r=>r.key)}function oc(e,t,n){const o=e.mineralScope.minerals;if(e.mineralScope.mode==="dynamic-dropdown"){const r=Fr(o,Oe(o.map(s=>t.includes(s.key)&&s.key!=="other"?s:null)),s=>s.key),i=t.includes("other")?Ov(n):[];return[...r,...i]}return e.mineralScope.mode==="free-text"?Oe(o.map((r,i)=>n[i]?.trim()?r:null)):o}function bi(e,t,n){const o=oc(e,t,n),r=jn(e,n,t);return o.map(i=>({...i,label:r.get(i.key)}))}function rc(e){return new Map(e.mineralScope.minerals.map(t=>[t.key,t.labelKey]))}function jr(e,t,n,o){const r=e[t];return o&&typeof r=="object"?r[n]||"":!o&&typeof r=="string"?r:""}function ic(e){const{activeMinerals:t,gatingByMineral:n}=e;return Oe(t.map(o=>n.get(o)?.smelterListRequired?o:null))}function sc(e,t){const n=Bn(e,t.selectedMinerals??[],t.customMinerals??[]);return{gatingByMineral:Xt(e,t.questionAnswers,n),activeMinerals:n}}function ac(e,t){return lc(e,t,sc(e,t))}function lc(e,t,n){const{gatingByMineral:o}=n,r=new Set(n.activeMinerals),i=n.activeMinerals,s=new Map;for(const m of e.companyInfoFields)s.set(m.key,Fv(m,t));const a=new Map;for(const m of e.questions){const d=new Map;for(const h of i){if(!r.has(h)){d.set(h,!1);continue}const g=o.get(h);if(!g){d.set(h,!1);continue}if(m.key==="Q1"){d.set(h,!0);continue}if(m.key==="Q2"){e.templateType==="amrt"?d.set(h,!1):d.set(h,g.q2Enabled);continue}d.set(h,g.laterQuestionsEnabled)}a.set(m.key,d)}const l=new Map;let c=!1;for(const m of r)if(o.get(m)?.companyQuestionsEnabled){c=!0;break}for(const m of e.companyQuestions)l.set(m.key,c);let u=!1;for(const m of r)if(o.get(m)?.smelterListRequired){u=!0;break}const p=t.scopeType==="B";return{companyInfo:s,questions:a,companyQuestions:l,smelterListRequired:u,productListRequired:p}}function rr(e,t){return Bn(e,t.selectedMinerals??[],t.customMinerals??[])}function Fv(e,t){return e.required===!0?!0:e.required===!1?!1:e.required==="conditional"&&e.key==="scopeDescription"?t.scopeType==="C":!1}function zv(e,t,n){const o=[];return jv(e,t,n,o),Kv(e,t,o),Bv(e,t,n,o),Qv(e,t,n,o),Yv(e,t,n,o),Uv(e,t,n,o),Gv(e,n,o),Zv(e),Hv(n,o),o}function jv(e,t,n,o){for(const r of e.companyInfoFields){const i=n.companyInfo[r.key]||"";r.required===!0&&!i.trim()&&De(o,"R",pe.checker.requiredField,`companyInfo.${r.key}`,r.labelKey),r.required==="conditional"&&r.key==="scopeDescription"&&t.scopeType==="C"&&!i.trim()&&De(o,"R",pe.checker.requiredField,"companyInfo.scopeDescription","fields.scopeDescription")}}function Bv(e,t,n,o){const r=rr(e,t),i=Xt(e,t.questionAnswers,r);for(const s of e.questions)if(s.perMineral)for(const a of r){const l=i.get(a),c=jr(n.questions,s.key,a,s.perMineral);Gs(e,s.key,l)&&!c.trim()&&De(o,"E",pe.checker.requiredField,`questions.${s.key}.${a}`,s.labelKey)}else{const a=r[0]??e.mineralScope.minerals[0]?.key,l=a?i.get(a):void 0,c=jr(n.questions,s.key,a??"",s.perMineral);Gs(e,s.key,l)&&!c.trim()&&De(o,"E",pe.checker.requiredField,`questions.${s.key}`,s.labelKey)}}function Kv(e,t,n){e.templateType!=="emrt"&&e.templateType!=="amrt"||e.mineralScope.mode!=="dynamic-dropdown"||(t.selectedMinerals??[]).length>0||De(n,"R",pe.checker.requiredField,"mineralsScope.selection","tabs.mineralsScope")}function Qv(e,t,n,o){if(e.companyQuestions.length===0)return;const r=rr(e,t),i=Xt(e,t.questionAnswers,r);if(fi(r,a=>i.get(a)?.companyQuestionsEnabled===!0))for(const a of e.companyQuestions)if(a.perMineral)for(const l of r)i.get(l)?.companyQuestionsEnabled&&Qs(n,a,o,l);else Qs(n,a,o)}function Qs(e,t,n,o){const r=u=>typeof u=="string"?u:"",i=o?`.${o}`:"",s=r(o?Us(e.companyQuestions[t.key],o):e.companyQuestions[t.key]);if(!s.trim()){De(n,"E",pe.checker.requiredField,`companyQuestions.${t.key}${i}`,t.labelKey);return}if(!t.hasCommentField)return;const a=t.commentRequiredWhen??[];if(a.length===0||!a.includes(s))return;const l=`${t.key}_comment`;r(o?Us(e.companyQuestions[l],o):e.companyQuestions[l]).trim()||De(n,"E",pe.checker.requiredCompanyQuestionComment,`companyQuestions.${l}${i}`,t.commentLabelKey??t.labelKey)}function Us(e,t){return e&&typeof e=="object"?e[t]??"":""}function Uv(e,t,n,o){if(t.scopeType!=="B")return;const r=n.productList??[];if(r.length===0){De(o,"R",pe.checker.requiredProductList,"productList");return}r.forEach((i,s)=>{(i.productNumber||"").trim()||De(o,"R",pe.checker.requiredField,`productList.${s}.productNumber`,e.productList.productNumberLabelKey)})}function Gv(e,t,n){if(e.templateType!=="amrt")return;(t.mineralsScope??[]).forEach((r,i)=>{if(!(r.mineral??"").trim())return;(r.reason??"").trim()||De(n,"A",pe.checker.requiredField,`mineralsScope.${i}.reason`,"tables.mineralsScopeReason")})}function Yv(e,t,n,o){const r=n.smelterList??[],i=rr(e,t),s=Xt(e,t.questionAnswers,i),a=rc(e),l=jn(e,t.customMinerals??[],t.selectedMinerals??[]),c=ic({activeMinerals:i,gatingByMineral:s});if(c.length!==0){for(const u of c)if(!fi(r,m=>m.metal===u)){const m=l.get(u);De(o,"R",pe.checker.requiredSmelterList,`smelterList.${u}`,m?void 0:a.get(u),m?{field:m}:void 0)}e.smelterList.hasLookup&&((e.templateType==="emrt"||e.templateType==="amrt")&&r.forEach((u,p)=>{!(u.metal||"").trim()||(u.smelterLookup||"").trim()||De(o,"R",pe.checker.requiredField,`smelterList.${p}.smelterLookup`,"tables.smelterName")}),e.smelterList.notListedRequireNameCountry&&r.forEach((u,p)=>{if(!Yt(u.smelterLookup||""))return;(u.smelterName||"").trim()||De(o,"R",pe.checker.requiredField,`smelterList.${p}.smelterName`,"tables.smelterName"),(u.smelterCountry||"").trim()||De(o,"R",pe.checker.requiredField,`smelterList.${p}.smelterCountry`,"tables.country")}))}}function Zv(e){e.mineList.available}function Hv(e,t){const n=["contactEmail","authorizerEmail"];for(const o of n){const r=e.companyInfo[o]||"";if(r.trim()&&!_r(r)){const i=o==="contactEmail"?"fields.contactEmail":"fields.authorizerEmail";De(t,"E",pe.checker.invalidEmail,`companyInfo.${o}`,i)}}}function De(e,t,n,o,r,i){e.push({code:`${t}${String(e.length+1).padStart(3,"0")}`,messageKey:n,fieldPath:o,fieldLabelKey:r,messageValues:i,severity:"error"})}function Gs(e,t,n){return t==="Q1"?!0:t==="Q2"?e.templateType==="amrt"?!1:n?.q2Enabled??!0:n?.laterQuestionsEnabled??!0}function Vv(e,t){const n=sc(e,t),o=lc(e,t,n),{activeMinerals:r,gatingByMineral:i}=n,s=o.productListRequired?{type:"productListRequired"}:t.scopeType?{type:"productListNotRequired"}:{type:"productListUnknown"},a=Jv(e.gating.smelterListGating,r,t.questionAnswers);let l;if(r.length===0)l={type:"smelterListUnknown"};else if(a.length>0)l={type:"smelterListPending",metals:a,questions:Wv(e.gating.smelterListGating)};else if(o.smelterListRequired){const u=Oe(r.map(p=>i.get(p)?.smelterListRequired?p:null));l={type:"smelterListRequired",metals:hi(u)}}else l={type:"smelterListNotRequired"};const c=e.mineList.available?{type:"mineListAvailable"}:{type:"mineListNotAvailable"};return{productList:s,smelterList:l,mineList:c}}function Wv(e){if(!e)return"Q1/Q2";switch(e.type){case"q1-yes":case"q1-not-no":case"q1-not-negatives":return"Q1";case"q1q2-yes":case"q1q2-not-no":case"q1-not-negatives-and-q2-not-negatives":return"Q1/Q2";default:return"Q1/Q2"}}function Jv(e,t,n){if(!e)return[];const o=e.type==="q1-yes"||e.type==="q1-not-no"||e.type==="q1q2-not-no"||e.type==="q1-not-negatives"||e.type==="q1-not-negatives-and-q2-not-negatives",r=e.type==="q1q2-yes"||e.type==="q1q2-not-no"||e.type==="q1-not-negatives-and-q2-not-negatives",i=new Set;if(o){const s=n.Q1;typeof s=="string"?s.trim()||t.forEach(a=>i.add(a)):t.forEach(a=>{s?.[a]?.trim()||i.add(a)})}if(r){const s=n.Q2;typeof s=="string"?s.trim()||t.forEach(a=>i.add(a)):t.forEach(a=>{s?.[a]?.trim()||i.add(a)})}return hi(Array.from(i))}function Xv(e,t,n,o){const r=E=>typeof E=="string"?E:"",i=ac(e,t),{companyInfo:s,questions:a,companyQuestions:l,smelterList:c,productList:u}=n;let p=0,m=0;const d=[],h=(E,oe,le)=>{d.push({key:E,label:oe,location:le})},g=o("checker.groups.declaration"),b=o("checker.groups.smelter"),w=o("checker.groups.product"),S=rc(e),v=jn(e,t.customMinerals??[],t.selectedMinerals??[]);let C=0,M=0;for(const E of e.companyInfoFields){if(!(i.companyInfo.get(E.key)===!0))continue;p+=1,C+=1,(s[E.key]||"").trim()&&(m+=1,M+=1,h(`companyInfo.${E.key}`,o(E.labelKey),g))}C>0&&M===C&&h("summary.companyInfo",o("checker.sectionComplete",{section:o("sections.companyInfo")}),g),(e.templateType==="emrt"||e.templateType==="amrt")&&e.mineralScope.mode==="dynamic-dropdown"&&(p+=1,(t.selectedMinerals??[]).length>0&&(m+=1,h("mineralsScope.selection",o("tabs.mineralsScope"),g)));let k=0,A=0;for(const E of e.questions){const oe=i.questions.get(E.key);if(oe)for(const[le,Q]of oe.entries()){if(!Q)continue;if(p+=1,k+=1,jr(a,E.key,le,E.perMineral).trim()){m+=1,A+=1;const se=S.get(le),D=se?o(se):le;h(`questions.${E.key}.${le}`,`${E.key} ${D}`,g)}}}k>0&&A===k&&h("summary.questionMatrix",o("checker.sectionComplete",{section:o("sections.questionMatrix")}),g);const z=rr(e,t),I=Xt(e,t.questionAnswers,z);let L=0,j=0;for(const E of e.companyQuestions){if(E.perMineral){z.forEach(Q=>{if(!I.get(Q)?.companyQuestionsEnabled)return;p+=1,L+=1;const se=l[E.key],D=se&&typeof se=="object"?se[Q]??"":"",P=r(D);if(P.trim()){m+=1,j+=1;const G=v.get(Q),W=S.get(Q),re=G??(W?o(W):Q);h(`companyQuestions.${E.key}.${Q}`,`${E.key}. ${o(E.labelKey)} (${re})`,g)}if(E.hasCommentField){const G=E.commentRequiredWhen??[];if(G.length===0||!G.includes(P))return;p+=1,L+=1;const W=l[`${E.key}_comment`],re=W&&typeof W=="object"?W[Q]??"":"";if(r(re).trim()){m+=1,j+=1;const ce=v.get(Q),ye=S.get(Q),fe=ce??(ye?o(ye):Q);h(`companyQuestions.${E.key}_comment.${Q}`,`${o(E.commentLabelKey??E.labelKey)} (${fe})`,g)}}});continue}if(!(i.companyQuestions.get(E.key)===!0))continue;p+=1,L+=1;const le=r(l[E.key]);if(le.trim()&&(m+=1,j+=1,h(`companyQuestions.${E.key}`,`${E.key}. ${o(E.labelKey)}`,g)),E.hasCommentField){const Q=E.commentRequiredWhen??[];Q.length>0&&Q.includes(le)&&(p+=1,L+=1,r(l[`${E.key}_comment`]).trim()&&(m+=1,j+=1,h(`companyQuestions.${E.key}_comment`,o(E.commentLabelKey??E.labelKey),g)))}}L>0&&j===L&&h("summary.companyQuestions",o("checker.sectionComplete",{section:o("sections.companyQuestions")}),g);const O=ic({activeMinerals:z,gatingByMineral:I}),R=O.length>0;let x=0,N=0;O.forEach(E=>{if(p+=1,x+=1,fi(c,le=>le.metal===E)){m+=1,N+=1;const le=v.get(E),Q=S.get(E),ae=le??(Q?o(Q):E);h(`smelterList.${E}`,o("checker.passedSmelterForMineral",{mineral:ae}),b)}}),R&&e.smelterList.hasLookup&&(e.templateType==="emrt"||e.templateType==="amrt")&&c.forEach((E,oe)=>{if(!(E.metal||"").trim())return;p+=1,x+=1,(E.smelterLookup||"").trim()&&(m+=1,N+=1,h(`smelterList.${oe}.smelterLookup`,o("tables.smelterName"),b))}),R&&e.smelterList.hasLookup&&e.smelterList.notListedRequireNameCountry&&c.forEach((E,oe)=>{if(!Yt(E.smelterLookup||""))return;p+=1,x+=1,(E.smelterName||"").trim()&&(m+=1,N+=1,h(`smelterList.${oe}.smelterName`,o("tables.smelterName"),b)),p+=1,x+=1,(E.smelterCountry||"").trim()&&(m+=1,N+=1,h(`smelterList.${oe}.smelterCountry`,o("tables.country"),b))}),x>0&&N===x&&h("summary.smelterList",o("checker.sectionComplete",{section:o("tabs.smelterList")}),b);let K=0,$=0;t.scopeType==="B"&&(p+=1,K+=1,u.length>0&&(m+=1,$+=1,h("productList",o("checker.passedProductList"),w)),u.forEach((E,oe)=>{p+=1,K+=1,(E.productNumber||"").trim()&&(m+=1,$+=1,h(`productList.${E.id}.productNumber`,o("checker.passedProductRow",{index:oe+1}),w))}),K>0&&$===K&&h("summary.productList",o("checker.sectionComplete",{section:o("tabs.productList")}),w));const Y=s.contactEmail||"";Y.trim()&&_r(Y)&&h("companyInfo.contactEmail.valid",o("checker.validEmail",{field:o("fields.contactEmail")}),g);const Z=s.authorizerEmail||"";return Z.trim()&&_r(Z)&&h("companyInfo.authorizerEmail.valid",o("checker.validEmail",{field:o("fields.authorizerEmail")}),g),{summary:{completion:p>0?Math.round(m/p*100):100,totalRequired:p,completedRequired:m,sections:{companyInfo:{total:C,completed:M},questionMatrix:{total:k,completed:A},companyQuestions:{total:L,completed:j},smelterList:{total:x,completed:N},productList:{total:K,completed:$}}},passedItems:d}}const Rn=["China","Malaysia","Indonesia","Japan","USA","Germany","Switzerland","Vietnam","Thailand","Philippines"],eS=[...Rn,"Unknown"],tS={cmrt:Rn,emrt:Rn,crt:eS,amrt:Rn};function cc(e){return(tS[e]??Rn).map(n=>({value:n,label:n}))}function nS({versionDef:e,selectedMinerals:t,customMinerals:n}){return{displayMinerals:bi(e,t,n)}}function oS({templateType:e,versionDef:t,questionAnswers:n,selectedMinerals:o,customMinerals:r}){const i=jn(t,r??[],o??[]),s=nc(t.smelterList.metalDropdownSource,t,n,{selectedMinerals:o,customMinerals:r}).map(c=>({...c,label:i.get(c.key)})),a=cc(e),l=e==="emrt"&&t.version.id==="2.1"||e==="amrt"&&t.version.id==="1.3";return{availableMetals:s,countryOptions:a,showNotYetIdentifiedCountryHint:l}}function rS({templateType:e,versionDef:t,questionAnswers:n,selectedMinerals:o,customMinerals:r,smelterList:i}){const s=jn(t,r??[],o??[]),a=t.mineList.available?nc(t.mineList.metalDropdownSource,t,n,{selectedMinerals:o,customMinerals:r}).map(m=>({...m,label:s.get(m.key)})):[],l=cc(e),c=Oe(i.map(m=>m.smelterName?m.smelterName:m.smelterLookup&&!Yt(m.smelterLookup)&&!vo(m.smelterLookup)?m.smelterLookup:null)),u=hi(c).map(m=>({value:m,label:m})),p=(()=>{const m=new Map;return i.forEach(d=>{const h=d.metal?.trim();if(!h)return;const g=d.smelterName?d.smelterName:d.smelterLookup&&!Yt(d.smelterLookup)&&!vo(d.smelterLookup)?d.smelterLookup:"";if(!g)return;const b=m.get(h)??new Set;b.add(g),m.set(h,b)}),Object.fromEntries(Array.from(m.entries()).map(([d,h])=>[d,Array.from(h).map(g=>({value:g,label:g}))]))})();return{availableMetals:a,countryOptions:l,smelterOptions:u,smelterOptionsByMetal:p}}function uc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var o=n.call(e),r,i=[],s;try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}return i}var iS=function(e){return typeof e=="function"},sS=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test",V=function(e){sS&&(iS(e)||console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof e)));var t=ie.useRef(e);t.current=ie.useMemo(function(){return e},[e]);var n=ie.useRef(void 0);return n.current||(n.current=function(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];return t.current.apply(this,o)}),n.current};function aS(e,t){if(e===t)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}var ee=function(e,t){var n=ie.useRef({deps:t,obj:void 0,initialized:!1}).current;return(n.initialized===!1||!aS(n.deps,t))&&(n.deps=t,n.obj=e(),n.initialized=!0),n.obj};function mc(e){var t=ie.useRef(e);return t.current=e,t}function Ct(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function lS(e,t){var n=uc(ie.useState(e),2),o=n[0],r=n[1],i=ie.useMemo(function(){var s=!e,a=function(){return r(function(p){return p===e?s:e})},l=function(p){return r(p)},c=function(){return r(e)},u=function(){return r(s)};return{toggle:a,set:l,setLeft:c,setRight:u}},[]);return[o,i]}function wi(e){var t=uc(lS(!1),2),n=t[0],o=t[1],r=o.toggle,i=o.set,s=ie.useMemo(function(){var a=function(){return i(!0)},l=function(){return i(!1)};return{toggle:r,set:function(c){return i(!!c)},setTrue:a,setFalse:l}},[]);return[n,s]}var so={exports:{}},cS=so.exports,Ys;function dc(){return Ys||(Ys=1,(function(e,t){(function(n,o){e.exports=o()})(cS,(function(){var n=1e3,o=6e4,r=36e5,i="millisecond",s="second",a="minute",l="hour",c="day",u="week",p="month",m="quarter",d="year",h="date",g="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(R){var x=["th","st","nd","rd"],N=R%100;return"["+R+(x[(N-20)%10]||x[N]||x[0])+"]"}},v=function(R,x,N){var K=String(R);return!K||K.length>=x?R:""+Array(x+1-K.length).join(N)+R},C={s:v,z:function(R){var x=-R.utcOffset(),N=Math.abs(x),K=Math.floor(N/60),$=N%60;return(x<=0?"+":"-")+v(K,2,"0")+":"+v($,2,"0")},m:function R(x,N){if(x.date()<N.date())return-R(N,x);var K=12*(N.year()-x.year())+(N.month()-x.month()),$=x.clone().add(K,p),Y=N-$<0,Z=x.clone().add(K+(Y?-1:1),p);return+(-(K+(N-$)/(Y?$-Z:Z-$))||0)},a:function(R){return R<0?Math.ceil(R)||0:Math.floor(R)},p:function(R){return{M:p,y:d,w:u,d:c,D:h,h:l,m:a,s,ms:i,Q:m}[R]||String(R||"").toLowerCase().replace(/s$/,"")},u:function(R){return R===void 0}},M="en",_={};_[M]=S;var k="$isDayjsObject",A=function(R){return R instanceof j||!(!R||!R[k])},z=function R(x,N,K){var $;if(!x)return M;if(typeof x=="string"){var Y=x.toLowerCase();_[Y]&&($=Y),N&&(_[Y]=N,$=Y);var Z=x.split("-");if(!$&&Z.length>1)return R(Z[0])}else{var X=x.name;_[X]=x,$=X}return!K&&$&&(M=$),$||!K&&M},I=function(R,x){if(A(R))return R.clone();var N=typeof x=="object"?x:{};return N.date=R,N.args=arguments,new j(N)},L=C;L.l=z,L.i=A,L.w=function(R,x){return I(R,{locale:x.$L,utc:x.$u,x:x.$x,$offset:x.$offset})};var j=(function(){function R(N){this.$L=z(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[k]=!0}var x=R.prototype;return x.parse=function(N){this.$d=(function(K){var $=K.date,Y=K.utc;if($===null)return new Date(NaN);if(L.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var Z=$.match(b);if(Z){var X=Z[2]-1||0,E=(Z[7]||"0").substring(0,3);return Y?new Date(Date.UTC(Z[1],X,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,E)):new Date(Z[1],X,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,E)}}return new Date($)})(N),this.init()},x.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},x.$utils=function(){return L},x.isValid=function(){return this.$d.toString()!==g},x.isSame=function(N,K){var $=I(N);return this.startOf(K)<=$&&$<=this.endOf(K)},x.isAfter=function(N,K){return I(N)<this.startOf(K)},x.isBefore=function(N,K){return this.endOf(K)<I(N)},x.$g=function(N,K,$){return L.u(N)?this[K]:this.set($,N)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(N,K){var $=this,Y=!!L.u(K)||K,Z=L.p(N),X=function(P,G){var W=L.w($.$u?Date.UTC($.$y,G,P):new Date($.$y,G,P),$);return Y?W:W.endOf(c)},E=function(P,G){return L.w($.toDate()[P].apply($.toDate("s"),(Y?[0,0,0,0]:[23,59,59,999]).slice(G)),$)},oe=this.$W,le=this.$M,Q=this.$D,ae="set"+(this.$u?"UTC":"");switch(Z){case d:return Y?X(1,0):X(31,11);case p:return Y?X(1,le):X(0,le+1);case u:var se=this.$locale().weekStart||0,D=(oe<se?oe+7:oe)-se;return X(Y?Q-D:Q+(6-D),le);case c:case h:return E(ae+"Hours",0);case l:return E(ae+"Minutes",1);case a:return E(ae+"Seconds",2);case s:return E(ae+"Milliseconds",3);default:return this.clone()}},x.endOf=function(N){return this.startOf(N,!1)},x.$set=function(N,K){var $,Y=L.p(N),Z="set"+(this.$u?"UTC":""),X=($={},$[c]=Z+"Date",$[h]=Z+"Date",$[p]=Z+"Month",$[d]=Z+"FullYear",$[l]=Z+"Hours",$[a]=Z+"Minutes",$[s]=Z+"Seconds",$[i]=Z+"Milliseconds",$)[Y],E=Y===c?this.$D+(K-this.$W):K;if(Y===p||Y===d){var oe=this.clone().set(h,1);oe.$d[X](E),oe.init(),this.$d=oe.set(h,Math.min(this.$D,oe.daysInMonth())).$d}else X&&this.$d[X](E);return this.init(),this},x.set=function(N,K){return this.clone().$set(N,K)},x.get=function(N){return this[L.p(N)]()},x.add=function(N,K){var $,Y=this;N=Number(N);var Z=L.p(K),X=function(le){var Q=I(Y);return L.w(Q.date(Q.date()+Math.round(le*N)),Y)};if(Z===p)return this.set(p,this.$M+N);if(Z===d)return this.set(d,this.$y+N);if(Z===c)return X(1);if(Z===u)return X(7);var E=($={},$[a]=o,$[l]=r,$[s]=n,$)[Z]||1,oe=this.$d.getTime()+N*E;return L.w(oe,this)},x.subtract=function(N,K){return this.add(-1*N,K)},x.format=function(N){var K=this,$=this.$locale();if(!this.isValid())return $.invalidDate||g;var Y=N||"YYYY-MM-DDTHH:mm:ssZ",Z=L.z(this),X=this.$H,E=this.$m,oe=this.$M,le=$.weekdays,Q=$.months,ae=$.meridiem,se=function(G,W,re,te){return G&&(G[W]||G(K,Y))||re[W].slice(0,te)},D=function(G){return L.s(X%12||12,G,"0")},P=ae||function(G,W,re){var te=G<12?"AM":"PM";return re?te.toLowerCase():te};return Y.replace(w,(function(G,W){return W||(function(re){switch(re){case"YY":return String(K.$y).slice(-2);case"YYYY":return L.s(K.$y,4,"0");case"M":return oe+1;case"MM":return L.s(oe+1,2,"0");case"MMM":return se($.monthsShort,oe,Q,3);case"MMMM":return se(Q,oe);case"D":return K.$D;case"DD":return L.s(K.$D,2,"0");case"d":return String(K.$W);case"dd":return se($.weekdaysMin,K.$W,le,2);case"ddd":return se($.weekdaysShort,K.$W,le,3);case"dddd":return le[K.$W];case"H":return String(X);case"HH":return L.s(X,2,"0");case"h":return D(1);case"hh":return D(2);case"a":return P(X,E,!0);case"A":return P(X,E,!1);case"m":return String(E);case"mm":return L.s(E,2,"0");case"s":return String(K.$s);case"ss":return L.s(K.$s,2,"0");case"SSS":return L.s(K.$ms,3,"0");case"Z":return Z}return null})(G)||Z.replace(":","")}))},x.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},x.diff=function(N,K,$){var Y,Z=this,X=L.p(K),E=I(N),oe=(E.utcOffset()-this.utcOffset())*o,le=this-E,Q=function(){return L.m(Z,E)};switch(X){case d:Y=Q()/12;break;case p:Y=Q();break;case m:Y=Q()/3;break;case u:Y=(le-oe)/6048e5;break;case c:Y=(le-oe)/864e5;break;case l:Y=le/r;break;case a:Y=le/o;break;case s:Y=le/n;break;default:Y=le}return $?Y:L.a(Y)},x.daysInMonth=function(){return this.endOf(p).$D},x.$locale=function(){return _[this.$L]},x.locale=function(N,K){if(!N)return this.$L;var $=this.clone(),Y=z(N,K,!0);return Y&&($.$L=Y),$},x.clone=function(){return L.w(this.$d,this)},x.toDate=function(){return new Date(this.valueOf())},x.toJSON=function(){return this.isValid()?this.toISOString():null},x.toISOString=function(){return this.$d.toISOString()},x.toString=function(){return this.$d.toUTCString()},R})(),O=j.prototype;return I.prototype=O,[["$ms",i],["$s",s],["$m",a],["$H",l],["$W",c],["$M",p],["$y",d],["$D",h]].forEach((function(R){O[R[1]]=function(x){return this.$g(x,R[0],R[1])}})),I.extend=function(R,x){return R.$i||(R(x,j,I),R.$i=!0),I},I.locale=z,I.isDayjs=A,I.unix=function(R){return I(1e3*R)},I.en=_[M],I.Ls=_,I.p={},I}))})(so)),so.exports}var uS=dc();const Xe=Ct(uS);function Ce(){const{t:e,i18n:t}=fo.useTranslation();return{t:V((o,r)=>e(o,r)),locale:t.language,i18n:t,changeLocale:o=>t.changeLanguage(o)}}function mS(e){return{scopeType:e.companyInfo.declarationScope,questionAnswers:e.questions,selectedMinerals:e.selectedMinerals,customMinerals:e.customMinerals}}function dS(e){return{companyInfo:e.companyInfo,questions:e.questions,companyQuestions:e.companyQuestions,mineralsScope:e.mineralsScope,smelterList:e.smelterList,mineList:e.mineList,productList:e.productList}}function $t(){const{meta:e,form:t,lists:n}=ze(),{t:o}=Ce(),r=ee(()=>({companyInfo:t.companyInfo,selectedMinerals:t.selectedMinerals,customMinerals:t.customMinerals,questions:t.questions,questionComments:t.questionComments,companyQuestions:t.companyQuestions,mineralsScope:n.mineralsScope,smelterList:n.smelterList,mineList:n.mineList,productList:n.productList}),[t.companyInfo,t.selectedMinerals,t.customMinerals,t.questions,t.questionComments,t.companyQuestions,n.mineralsScope,n.smelterList,n.mineList,n.productList]),i=ee(()=>mS(r),[r]),s=ee(()=>dS(r),[r]),a=ee(()=>Bn(e.versionDef,t.selectedMinerals,t.customMinerals),[e.versionDef,t.selectedMinerals,t.customMinerals]),l=ee(()=>Xt(e.versionDef,i.questionAnswers,a),[e.versionDef,i.questionAnswers,a]),c=ee(()=>ac(e.versionDef,i),[e.versionDef,i]),u=ee(()=>zv(e.versionDef,i,s),[e.versionDef,i,s]),p=ee(()=>Xv(e.versionDef,i,s,o),[e.versionDef,i,s,o]),m=ee(()=>Vv(e.versionDef,i),[e.versionDef,i]),d=ee(()=>nS({versionDef:e.versionDef,selectedMinerals:t.selectedMinerals,customMinerals:t.customMinerals}),[e.versionDef,t.selectedMinerals,t.customMinerals]),h=ee(()=>oS({templateType:e.templateType,versionDef:e.versionDef,questionAnswers:t.questions,selectedMinerals:t.selectedMinerals,customMinerals:t.customMinerals}),[e.templateType,e.versionDef,t.questions,t.selectedMinerals,t.customMinerals,o]),g=ee(()=>rS({templateType:e.templateType,versionDef:e.versionDef,questionAnswers:t.questions,selectedMinerals:t.selectedMinerals,customMinerals:t.customMinerals,smelterList:n.smelterList}),[e.templateType,e.versionDef,t.questions,t.selectedMinerals,t.customMinerals,n.smelterList]);return{ruleInput:i,dataInput:s,gatingByMineral:l,requiredFields:c,checkerErrors:u,checkerSummary:p.summary,checkerPassedItems:p.passedItems,docStatusBySection:m,viewModels:{declaration:d,smelterList:h,mineList:g}}}const pS=[{key:"companyInfo",labelKey:"checker.groups.companyInfo"},{key:"mineralsScope",labelKey:"checker.groups.mineralsScope"},{key:"questionMatrix",labelKey:"checker.groups.questionMatrix"},{key:"companyQuestions",labelKey:"checker.groups.companyQuestions"},{key:"smelter",labelKey:"checker.groups.smelter"},{key:"mine",labelKey:"checker.groups.mine"},{key:"product",labelKey:"checker.groups.product"},{key:"other",labelKey:"checker.groups.other"}],fS=[{key:"companyInfo",labelKey:"checker.groups.companyInfo"},{key:"mineralsScope",labelKey:"checker.groups.mineralsScope"},{key:"questionMatrix",labelKey:"checker.groups.questionMatrix"},{key:"companyQuestions",labelKey:"checker.groups.companyQuestions"},{key:"product",labelKey:"checker.groups.product"},{key:"smelter",labelKey:"checker.groups.smelter"},{key:"mine",labelKey:"checker.groups.mine"},{key:"other",labelKey:"checker.groups.other"}],hS=e=>e==="cmrt"?pS:fS,yS=e=>{switch(e.split(".")[0]){case"companyInfo":return"companyInfo";case"mineralsScope":return"mineralsScope";case"questions":return"questionMatrix";case"companyQuestions":return"companyQuestions";case"smelterList":return"smelter";case"mineList":return"mine";case"productList":return"product";default:return"other"}},Xn=e=>{const t=Number(e);return Number.isFinite(t)?t:null},eo=e=>new Map(e.map((t,n)=>[t,n])),gS=e=>{if(!e)return(i,s)=>s.fieldPath;const t=eo(e.companyInfoFields.map(i=>i.key)),n=eo(e.questions.map(i=>i.key)),o=eo(e.mineralScope.minerals.map(i=>i.key)),r=eo(e.companyQuestions.map(i=>i.key));return(i,s)=>{const a=s.fieldPath.split(".");switch(i){case"companyInfo":{const l=a[1]??"";return`${t.get(l)??999}-${s.fieldPath}`}case"mineralsScope":return`${Xn(a[1]??"")??999}-mineralsScope-${s.fieldPath}`;case"questionMatrix":{const l=a[1]??"",c=a[2]??"",u=n.get(l)??999,p=c?o.get(c)??999:-1;return`${u}-${p}-${s.fieldPath}`}case"companyQuestions":{const l=a[1]??"",c=l.endsWith("_comment"),u=c?l.replace("_comment",""):l,p=r.get(u)??999,m=c?"":a[2],d=m?o.get(m)??999:-1;return`${p}-${c?2:m?0:1}-${d}-${s.fieldPath}`}case"smelter":{const l=Xn(a[1]??"");return l!==null?`${l}-smelter-${s.fieldPath}`:`${o.get(a[1]??"")??999}-mineral-${s.fieldPath}`}case"mine":return`${Xn(a[1]??"")??-1}-mine-${s.fieldPath}`;case"product":return`${Xn(a[1]??"")??-1}-product-${s.fieldPath}`;default:return s.fieldPath}}};function bS(e,t){const n=tc(e,i=>yS(i.fieldPath)),o=gS(t);return hS(t?.templateType).flatMap(i=>{const s=n[i.key];if(!s||s.length===0)return[];const a=[...s].sort((l,c)=>o(i.key,l).localeCompare(o(i.key,c)));return[{key:i.key,labelKey:i.labelKey,items:a}]})}function Re(e,t){const n=ee(e,t);return V(o=>n.get(o))}const{Text:Tt,Title:wS}=y.Typography;function vS(e){const t=e.split(".");return t[0]==="questions"&&t.length===3||t[0]==="companyQuestions"&&t.length===3?t[2]:null}function SS(e){return{tantalum:"minerals.tantalum",tin:"minerals.tin",gold:"minerals.gold",tungsten:"minerals.tungsten",cobalt:"minerals.cobalt",mica:"minerals.mica",copper:"minerals.copper",graphite:"minerals.graphite",lithium:"minerals.lithium",nickel:"minerals.nickel"}[e]??null}function CS({versionDef:e,errors:t,summary:n,passedItems:o=[],onGoToField:r}){const{t:i}=Ce(),s=V((w,S)=>i(w,S)),a=t.length>0,[l,{toggle:c}]=wi(),u=n?.totalRequired??0,p=n?.completedRequired??0,m=n?i("checker.passedSummary",{count:p,total:u}):i("checker.noErrors"),d=ee(()=>bS(t,e),[t,e]),h=V(w=>{r?.(w)}),g=Re(()=>{const w=new Map;return r&&t.forEach(S=>{w.set(`${S.code}-${S.fieldPath}`,()=>h(S))}),w},[t,h,r]),b=l?void 0:{display:"none"};return f.jsxs(y.Flex,{vertical:!0,gap:16,children:[f.jsxs("div",{children:[f.jsx(wS,{level:5,style:{margin:0},children:i("tabs.checker")}),f.jsx(Tt,{type:"secondary",children:i("checker.subtitle")})]}),f.jsx(y.Card,{title:f.jsxs(y.Flex,{align:"center",justify:"space-between",style:{width:"100%"},children:[f.jsxs(y.Flex,{align:"center",gap:8,children:[f.jsx("span",{"aria-hidden":!0,children:"❌"}),f.jsx(Tt,{type:"danger",strong:!0,children:i("checker.errorsTitle")})]}),f.jsx(y.Tag,{color:"error",children:i("checker.errorBadge",{count:t.length})})]}),children:a?f.jsx(y.Collapse,{bordered:!1,defaultActiveKey:d.map(w=>w.key),items:d.map(w=>({key:w.key,label:f.jsxs(y.Flex,{align:"center",justify:"space-between",style:{width:"100%"},children:[f.jsx(Tt,{type:"secondary",children:i(w.labelKey)}),f.jsx(y.Tag,{children:i("checker.groupCount",{count:w.items.length})})]}),children:f.jsx(y.Flex,{vertical:!0,gap:8,children:w.items.map(S=>{const v=`${S.code}-${S.fieldPath}`,C=vS(S.fieldPath),M=C?SS(C):null,_=M?i(M):null;return f.jsxs(y.Flex,{align:"flex-start",justify:"space-between",gap:12,children:[f.jsxs(y.Flex,{align:"baseline",gap:8,wrap:!0,children:[_&&f.jsx(y.Tag,{color:"blue",className:"shrink-0",children:_}),f.jsx(Tt,{children:s(S.messageKey,{field:S.fieldLabelKey?i(S.fieldLabelKey):void 0,...S.messageValues??{}})})]}),r&&f.jsx(y.Button,{type:"link",onClick:g(`${S.code}-${S.fieldPath}`),className:"shrink-0",children:i("checker.goToField")})]},v)})})}))}):f.jsx(y.Typography.Text,{type:"secondary",children:i("checker.noErrors")})}),f.jsx(y.Card,{styles:{body:b},title:f.jsxs(y.Flex,{align:"center",justify:"space-between",style:{width:"100%",cursor:"pointer"},onClick:c,children:[f.jsxs(Tt,{type:"success",strong:!0,children:["✅ ",m]}),f.jsx(Tt,{type:"secondary",style:{fontSize:12},children:i(l?"checker.passedToggleHide":"checker.passedToggleShow")})]}),children:l&&(o.length===0?f.jsx(Tt,{type:"secondary",children:i("checker.passedEmpty")}):f.jsx(y.List,{dataSource:o,renderItem:w=>f.jsx(y.List.Item,{children:f.jsx(y.List.Item.Meta,{title:w.label,description:w.location})},w.key)}))})]})}function kS({onNavigateToField:e}){const{meta:t}=ze(),{templateType:n,versionId:o,versionDef:r}=t,{checkerErrors:i,checkerSummary:s,checkerPassedItems:a}=$t(),l=Eo(),c=i,u=V(p=>{const m=Uc(p.fieldPath);if(e){e(m,p.fieldPath);return}if(l){const d=ho({template:n,version:o,page:m});l.actions.navigate(`${d}?focus=${encodeURIComponent(p.fieldPath)}`);return}if(typeof window<"u"){const d=ho({template:n,version:o,page:m});window.location.assign(`${d}?focus=${encodeURIComponent(p.fieldPath)}`)}});return f.jsx(CS,{versionDef:r,errors:c,summary:s,passedItems:a,onGoToField:u})}function Kn(e,t){if(t)return e(t)}function vi({value:e,onChange:t,label:n,placeholder:o,hint:r,required:i,disabled:s,error:a,multiline:l,rows:c=3,fieldPath:u,className:p,style:m,autoComplete:d,spellCheck:h}){const{t:g}=Ce(),{componentDisabled:b}=y.ConfigProvider.useConfig(),w=s||b,S=o??g("placeholders.input"),v=V(k=>{t?.(k.target.value)}),C=Kn(g,a),M=C?"error":void 0,_=i&&!w&&!e?.trim()?"field-required-empty":void 0;return f.jsx(y.Form.Item,{label:n,required:i,validateStatus:M,help:C,extra:r,layout:"vertical","data-field-path":u,className:p,style:m,children:l?f.jsx(y.Input.TextArea,{value:e||void 0,onChange:v,placeholder:S,disabled:w,rows:c,className:_,autoComplete:d,spellCheck:h}):f.jsx(y.Input,{value:e||void 0,onChange:v,placeholder:S,disabled:w,className:_,autoComplete:d,spellCheck:h})})}function Si({value:e,onChange:t,label:n,placeholder:o,hint:r,required:i,disabled:s,error:a,options:l,allowClear:c=!0,fieldPath:u,className:p,style:m}){const{t:d}=Ce(),{componentDisabled:h}=y.ConfigProvider.useConfig(),g=s||h,b=Kn(d,a),w=b?"error":void 0,S=o??d("placeholders.select"),v=V(k=>{t?.(k??"")}),C=V(k=>{if(g)return;const A=k.key.toLowerCase();if(A!=="y"&&A!=="n"&&A!=="u")return;const z=l.find(I=>I.value.toLowerCase().startsWith(A));z&&(k.preventDefault(),t?.(z.value))}),M=e===""?void 0:e,_=i&&!g&&!e?"field-required-empty":void 0;return f.jsx(y.Form.Item,{label:n,required:i,validateStatus:w,help:b,extra:r,layout:"vertical","data-field-path":u,className:p,style:m,children:f.jsx(y.Select,{value:M,onChange:v,onKeyDown:C,placeholder:S,disabled:g,options:l,allowClear:c,className:_})})}var ao={exports:{}},TS=ao.exports,Zs;function xS(){return Zs||(Zs=1,(function(e,t){(function(n,o){e.exports=o()})(TS,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,i=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},c=function(b){return(b=+b)+(b>68?1900:2e3)},u=function(b){return function(w){this[b]=+w}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(b){(this.zone||(this.zone={})).offset=(function(w){if(!w||w==="Z")return 0;var S=w.match(/([+-]|\d\d)/g),v=60*S[1]+(+S[2]||0);return v===0?0:S[0]==="+"?-v:v})(b)}],m=function(b){var w=l[b];return w&&(w.indexOf?w:w.s.concat(w.f))},d=function(b,w){var S,v=l.meridiem;if(v){for(var C=1;C<=24;C+=1)if(b.indexOf(v(C,0,w))>-1){S=C>12;break}}else S=b===(w?"pm":"PM");return S},h={A:[a,function(b){this.afternoon=d(b,!1)}],a:[a,function(b){this.afternoon=d(b,!0)}],Q:[r,function(b){this.month=3*(b-1)+1}],S:[r,function(b){this.milliseconds=100*+b}],SS:[i,function(b){this.milliseconds=10*+b}],SSS:[/\d{3}/,function(b){this.milliseconds=+b}],s:[s,u("seconds")],ss:[s,u("seconds")],m:[s,u("minutes")],mm:[s,u("minutes")],H:[s,u("hours")],h:[s,u("hours")],HH:[s,u("hours")],hh:[s,u("hours")],D:[s,u("day")],DD:[i,u("day")],Do:[a,function(b){var w=l.ordinal,S=b.match(/\d+/);if(this.day=S[0],w)for(var v=1;v<=31;v+=1)w(v).replace(/\[|\]/g,"")===b&&(this.day=v)}],w:[s,u("week")],ww:[i,u("week")],M:[s,u("month")],MM:[i,u("month")],MMM:[a,function(b){var w=m("months"),S=(m("monthsShort")||w.map((function(v){return v.slice(0,3)}))).indexOf(b)+1;if(S<1)throw new Error;this.month=S%12||S}],MMMM:[a,function(b){var w=m("months").indexOf(b)+1;if(w<1)throw new Error;this.month=w%12||w}],Y:[/[+-]?\d+/,u("year")],YY:[i,function(b){this.year=c(b)}],YYYY:[/\d{4}/,u("year")],Z:p,ZZ:p};function g(b){var w,S;w=b,S=l&&l.formats;for(var v=(b=w.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(I,L,j){var O=j&&j.toUpperCase();return L||S[j]||n[j]||S[O].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(R,x,N){return x||N.slice(1)}))}))).match(o),C=v.length,M=0;M<C;M+=1){var _=v[M],k=h[_],A=k&&k[0],z=k&&k[1];v[M]=z?{regex:A,parser:z}:_.replace(/^\[|\]$/g,"")}return function(I){for(var L={},j=0,O=0;j<C;j+=1){var R=v[j];if(typeof R=="string")O+=R.length;else{var x=R.regex,N=R.parser,K=I.slice(O),$=x.exec(K)[0];N.call(L,$),I=I.replace($,"")}}return(function(Y){var Z=Y.afternoon;if(Z!==void 0){var X=Y.hours;Z?X<12&&(Y.hours+=12):X===12&&(Y.hours=0),delete Y.afternoon}})(L),L}}return function(b,w,S){S.p.customParseFormat=!0,b&&b.parseTwoDigitYear&&(c=b.parseTwoDigitYear);var v=w.prototype,C=v.parse;v.parse=function(M){var _=M.date,k=M.utc,A=M.args;this.$u=k;var z=A[1];if(typeof z=="string"){var I=A[2]===!0,L=A[3]===!0,j=I||L,O=A[2];L&&(O=A[2]),l=this.$locale(),!I&&O&&(l=S.Ls[O]),this.$d=(function(K,$,Y,Z){try{if(["x","X"].indexOf($)>-1)return new Date(($==="X"?1e3:1)*K);var X=g($)(K),E=X.year,oe=X.month,le=X.day,Q=X.hours,ae=X.minutes,se=X.seconds,D=X.milliseconds,P=X.zone,G=X.week,W=new Date,re=le||(E||oe?1:W.getDate()),te=E||W.getFullYear(),ce=0;E&&!oe||(ce=oe>0?oe-1:W.getMonth());var ye,fe=Q||0,je=ae||0,Qe=se||0,Te=D||0;return P?new Date(Date.UTC(te,ce,re,fe,je,Qe,Te+60*P.offset*1e3)):Y?new Date(Date.UTC(te,ce,re,fe,je,Qe,Te)):(ye=new Date(te,ce,re,fe,je,Qe,Te),G&&(ye=Z(ye).week(G).toDate()),ye)}catch{return new Date("")}})(_,z,k,S),this.init(),O&&O!==!0&&(this.$L=this.locale(O).$L),j&&_!=this.format(z)&&(this.$d=new Date("")),l={}}else if(z instanceof Array)for(var R=z.length,x=1;x<=R;x+=1){A[1]=z[x-1];var N=S.apply(this,A);if(N.isValid()){this.$d=N.$d,this.$L=N.$L,this.init();break}x===R&&(this.$d=new Date(""))}else C.call(this,M)}}}))})(ao)),ao.exports}var _S=xS();const IS=Ct(_S);var lo={exports:{}},RS=lo.exports,Hs;function MS(){return Hs||(Hs=1,(function(e,t){(function(n,o){e.exports=o()})(RS,(function(){return function(n,o,r){var i=o.prototype,s=function(p){return p&&(p.indexOf?p:p.s)},a=function(p,m,d,h,g){var b=p.name?p:p.$locale(),w=s(b[m]),S=s(b[d]),v=w||S.map((function(M){return M.slice(0,h)}));if(!g)return v;var C=b.weekStart;return v.map((function(M,_){return v[(_+(C||0))%7]}))},l=function(){return r.Ls[r.locale()]},c=function(p,m){return p.formats[m]||(function(d){return d.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(h,g,b){return g||b.slice(1)}))})(p.formats[m.toUpperCase()])},u=function(){var p=this;return{months:function(m){return m?m.format("MMMM"):a(p,"months")},monthsShort:function(m){return m?m.format("MMM"):a(p,"monthsShort","months",3)},firstDayOfWeek:function(){return p.$locale().weekStart||0},weekdays:function(m){return m?m.format("dddd"):a(p,"weekdays")},weekdaysMin:function(m){return m?m.format("dd"):a(p,"weekdaysMin","weekdays",2)},weekdaysShort:function(m){return m?m.format("ddd"):a(p,"weekdaysShort","weekdays",3)},longDateFormat:function(m){return c(p.$locale(),m)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};i.localeData=function(){return u.bind(this)()},r.localeData=function(){var p=l();return{firstDayOfWeek:function(){return p.weekStart||0},weekdays:function(){return r.weekdays()},weekdaysShort:function(){return r.weekdaysShort()},weekdaysMin:function(){return r.weekdaysMin()},months:function(){return r.months()},monthsShort:function(){return r.monthsShort()},longDateFormat:function(m){return c(p,m)},meridiem:p.meridiem,ordinal:p.ordinal}},r.months=function(){return a(l(),"months")},r.monthsShort=function(){return a(l(),"monthsShort","months",3)},r.weekdays=function(p){return a(l(),"weekdays",null,null,p)},r.weekdaysShort=function(p){return a(l(),"weekdaysShort","weekdays",3,p)},r.weekdaysMin=function(p){return a(l(),"weekdaysMin","weekdays",2,p)}}}))})(lo)),lo.exports}var NS=MS();const LS=Ct(NS);var co={exports:{}},qS=co.exports,Vs;function AS(){return Vs||(Vs=1,(function(e,t){(function(n,o){e.exports=o()})(qS,(function(){return function(n,o){o.prototype.weekday=function(r){var i=this.$locale().weekStart||0,s=this.$W,a=(s<i?s+7:s)-i;return this.$utils().u(r)?a:this.subtract(a,"day").add(r,"day")}}}))})(co)),co.exports}var ES=AS();const PS=Ct(ES);var uo={exports:{}},DS=uo.exports,Ws;function $S(){return Ws||(Ws=1,(function(e,t){(function(n,o){e.exports=o()})(DS,(function(){var n="week",o="year";return function(r,i,s){var a=i.prototype;a.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=s(this).startOf(o).add(1,o).date(c),p=s(this).endOf(n);if(u.isBefore(p))return 1}var m=s(this).startOf(o).date(c).startOf(n).subtract(1,"millisecond"),d=this.diff(m,n,!0);return d<0?s(this).startOf("week").week():Math.ceil(d)},a.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}}))})(uo)),uo.exports}var OS=$S();const FS=Ct(OS);var mo={exports:{}},zS=mo.exports,Js;function jS(){return Js||(Js=1,(function(e,t){(function(n,o){e.exports=o()})(zS,(function(){return function(n,o){o.prototype.weekYear=function(){var r=this.month(),i=this.week(),s=this.year();return i===1&&r===11?s+1:r===0&&i>=52?s-1:s}}}))})(mo)),mo.exports}var BS=jS();const KS=Ct(BS),pc="DD-MMM-YYYY",fc="YYYY-MM-DD",QS=/^\d{4}-\d{2}-\d{2}$/,US=/^\d{2}-[A-Za-z]{3}-\d{4}$/;Xe.extend(IS);Xe.extend(LS);Xe.extend(FS);Xe.extend(KS);Xe.extend(PS);function GS(e){if(!e)return;const t=e.trim();if(!t)return;if(QS.test(t)){const o=Xe(t,fc,!0);if(o.isValid())return o}if(!US.test(t))return;const n=Xe(t,pc,!0);return n.isValid()?n:void 0}function YS({value:e,onChange:t,label:n,placeholder:o,hint:r,formatHint:i,required:s,disabled:a,error:l,minDate:c,maxDate:u,fieldPath:p,className:m,style:d}){const{t:h}=Ce(),{componentDisabled:g}=y.ConfigProvider.useConfig(),b=a||g,w=Kn(h,l),S=w?"error":void 0,v=GS(e),C=r??i,M=o??i??h("placeholders.date"),_=V(z=>{t?.(z?z.format(fc):"")}),k=V(z=>z?!!(c&&z.isBefore(Xe(c),"day")||u&&z.isAfter(Xe(u),"day")):!1),A=s&&!b&&!e?"field-required-empty":void 0;return f.jsx(y.Form.Item,{label:n,required:s,validateStatus:S,help:w,extra:C,layout:"vertical","data-field-path":p,className:m,style:d,children:f.jsx(y.DatePicker,{value:v,onChange:_,placeholder:M,disabled:b,disabledDate:k,format:pc,className:A,style:{width:"100%"}})})}const{Title:ZS}=y.Typography,HS=[{value:"A",label:"A. Company-wide"},{value:"B",label:"B. Product (or List of Products)"},{value:"C",label:"C. User defined"}],VS=new Set(["companyName","declarationScope","scopeDescription","companyId","companyAuthId","address"]),WS=new Set(["contactName","contactEmail","contactPhone"]),JS=new Set(["authorizerName","authorizerTitle","authorizerEmail","authorizerPhone","authorizationDate"]),XS={companyName:"placeholders.companyName",declarationScope:"placeholders.declarationScope",scopeDescription:"placeholders.scopeDescription",companyId:"placeholders.companyId",companyAuthId:"placeholders.companyAuthId",address:"placeholders.address",contactName:"placeholders.contactName",contactEmail:"placeholders.contactEmail",contactPhone:"placeholders.contactPhone",authorizerName:"placeholders.authorizerName",authorizerTitle:"placeholders.authorizerTitle",authorizerEmail:"placeholders.authorizerEmail",authorizerPhone:"placeholders.authorizerPhone",authorizationDate:"placeholders.authorizationDate"},eC={companyName:"organization",address:"street-address",contactName:"name",contactEmail:"email",contactPhone:"tel",authorizerName:"name",authorizerTitle:"organization-title",authorizerEmail:"email",authorizerPhone:"tel"},tC=new Set(["contactEmail","authorizerEmail","contactPhone","authorizerPhone","companyId","companyAuthId"]);function nC({versionDef:e,values:t,onChange:n,errors:o={},requiredFields:r,dateFormatHint:i}){const{t:s}=Ce(),{componentDisabled:a}=y.ConfigProvider.useConfig(),l=e.templateType!=="cmrt"||["6.31","6.4","6.5"].includes(e.version.id),c=t.declarationScope,u=V((k,A)=>{n(k,A)}),p=Re(()=>{const k=new Map;return e.companyInfoFields.forEach(A=>{k.set(A.key,z=>u(A.key,z))}),k},[e.companyInfoFields,u]),m=k=>{const A=XS[k];if(A)return l?s(A):""},d=(k,A=12)=>{const z=t[k.key]||"",I=o[k.key],L=r?.get(k.key)??k.required===!0,j=s(k.labelKey),O=m(k.key),R=p(k.key),x=(()=>{if(k.type==="select"&&k.key==="declarationScope")return f.jsx(Si,{value:z,onChange:R,label:j,required:L,error:I,options:HS,placeholder:O,fieldPath:`companyInfo.${k.key}`});if(k.type==="date"){const N=l?i:void 0;return f.jsx(YS,{value:z,onChange:R,label:j,required:L,error:I,minDate:e.dateConfig.minDate,maxDate:e.dateConfig.maxDate,placeholder:O,formatHint:N,fieldPath:`companyInfo.${k.key}`})}return f.jsx(vi,{value:z,onChange:R,label:j,required:L,error:I,multiline:k.type==="textarea",rows:k.key==="scopeDescription"?3:void 0,placeholder:O,fieldPath:`companyInfo.${k.key}`,autoComplete:eC[k.key],spellCheck:tC.has(k.key)?!1:void 0})})();return f.jsx(y.Col,{xs:24,md:A,children:x},k.key)},{companyFields:h,contactFields:g,authorizerFields:b}=ee(()=>{const k=tc(e.companyInfoFields,I=>WS.has(I.key)?"contact":JS.has(I.key)?"authorizer":VS.has(I.key)?"company":"other"),A=k.company??[];return{companyFields:c==="C"?A:A.filter(I=>I.key!=="scopeDescription"),contactFields:k.contact??[],authorizerFields:k.authorizer??[]}},[e.companyInfoFields,c]),w=k=>r?r.get(k.key)===!0:k.required===!0,S=ee(()=>Bs(e.companyInfoFields,k=>w(k)?1:0),[e.companyInfoFields,r]),v=ee(()=>Bs(e.companyInfoFields,k=>{if(!w(k))return 0;const A=t[k.key];return typeof A=="string"&&A.trim().length>0?1:0}),[e.companyInfoFields,r,t]),C={marginBottom:0},M=V(()=>{t.contactName&&n("authorizerName",t.contactName),t.contactEmail&&n("authorizerEmail",t.contactEmail),t.contactPhone&&n("authorizerPhone",t.contactPhone)}),_=!!(t.contactName||t.contactEmail||t.contactPhone);return f.jsx(y.Card,{title:f.jsxs(y.Flex,{align:"center",justify:"space-between",style:{width:"100%"},children:[f.jsx(ZS,{level:5,style:C,children:s("sections.companyInfo")}),S>0&&f.jsx(y.Tag,{color:"orange",children:s("badges.requiredCompleted",{done:v,total:S})})]}),children:f.jsxs(y.Flex,{vertical:!0,gap:24,children:[f.jsx(y.Row,{gutter:[24,0],children:h.map(k=>d(k,12))}),g.length>0&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"border-t border-gray-200 pt-4",children:f.jsx(y.Typography.Text,{strong:!0,className:"text-gray-600 text-sm",children:s("sections.contact")})}),f.jsx(y.Row,{gutter:[24,0],children:g.map(k=>d(k,12))})]}),b.length>0&&f.jsxs(f.Fragment,{children:[f.jsxs(y.Flex,{align:"center",justify:"space-between",className:"border-t border-gray-200 pt-4",children:[f.jsx(y.Typography.Text,{strong:!0,className:"text-gray-600 text-sm",children:s("sections.authorizer")}),g.length>0&&!a&&f.jsx(y.Button,{type:"link",size:"small",icon:f.jsx(ve.CopyOutlined,{}),onClick:M,disabled:!_,children:s("actions.sameAsContact")})]}),f.jsx(y.Row,{gutter:[24,0],children:b.map(k=>d(k,12))})]})]})})}function oC({questions:e,questionDefs:t,values:n,onChange:o,minerals:r=[],gatingByMineral:i,gatingCondition:s,requiredByQuestion:a,errors:l={}}){const{t:c}=Ce(),u=ee(()=>(t??[]).map(_=>`${_.key}:${_.options.map(k=>`${k.value}:${k.labelKey}`).join(",")}`).join("|"),[t]),p=ee(()=>{const _=new Map;return(t??[]).forEach(k=>{const A=new Map;k.options.forEach(z=>{A.set(z.value,c(z.labelKey))}),_.set(k.key,A)}),_},[t,u,c]),d=!(a?Array.from(a.values()).some(_=>_):i?Array.from(i.values()).some(_=>_.companyQuestionsEnabled):!1),h=ee(()=>sC(c,s,p),[c,s,p]),g=e.map(_=>`${_.key}:${_.perMineral?1:0}:${_.hasCommentField?1:0}:${_.options.map(k=>`${k.value}:${k.labelKey}`).join(",")}`).join("|"),b=ee(()=>{const _=new Map;return e.forEach(k=>{_.set(k.key,Oe(k.options.map(A=>{const z=c(A.labelKey);return z?{value:A.value,label:z}:null})))}),_},[e,g,c]),w=V((_,k)=>{o(_,k)}),S=Re(()=>{const _=new Map;return e.forEach(k=>{k.perMineral||_.set(k.key,A=>w(k.key,A))}),_},[e,g,w]),v=Re(()=>{const _=new Map;return e.forEach(k=>{k.perMineral&&r.forEach(A=>{_.set(`${k.key}:${A.key}`,z=>o(k.key,z,A.key))})}),_},[e,r,o,g]),C=Re(()=>{const _=new Map;return e.forEach(k=>{if(!k.hasCommentField||k.perMineral)return;const A=`${k.key}_comment`;_.set(A,z=>w(A,z))}),_},[e,g,w]),M=Re(()=>{const _=new Map;return e.forEach(k=>{if(!k.hasCommentField||!k.perMineral)return;const A=`${k.key}_comment`;r.forEach(z=>{_.set(`${A}:${z.key}`,I=>o(A,I,z.key))})}),_},[e,r,o,g]);return e.length===0?null:f.jsx(y.Card,{title:f.jsxs(y.Flex,{wrap:!0,align:"center",justify:"space-between",gap:8,children:[f.jsx(y.Typography.Title,{level:5,style:{margin:0},children:c("sections.companyQuestions")}),f.jsx(y.Tag,{color:"blue",children:h})]}),children:f.jsx(y.Flex,{vertical:!0,gap:0,"data-optional":d?"true":"false",children:e.map(_=>_.perMineral?iC({question:_,minerals:r,values:n,errors:l,gatingByMineral:i,options:b.get(_.key)??[],getPerMineralHandler:v,getPerMineralCommentHandler:M,t:c}):rC({question:_,values:n,errors:l,isOptional:d,requiredByQuestion:a,options:b.get(_.key)??[],getSelectHandler:S,getCommentHandler:C,t:c}))})})}function rC({question:e,values:t,errors:n,isOptional:o,requiredByQuestion:r,options:i,getSelectHandler:s,getCommentHandler:a,t:l}){const c=hc(n,e.key,"",!1),u=`${e.key}_comment`,p=s(e.key),m=a(u),d=e.commentRequiredWhen??[],h=Br(t,e.key,"",!1),g=gc(n,u,"",!1),b=r?.get(e.key)??!o,w=e.hasCommentField&&d.includes(h||""),S=b&&w,v=yc(t,u,"",!1);return f.jsx("div",{className:"company-question-row",children:f.jsxs("div",{className:"company-question-grid",children:[f.jsx(y.Typography.Text,{className:"company-question-label",children:l(e.labelKey)}),f.jsx("div",{className:"company-question-answer",children:f.jsx(Si,{value:Br(t,e.key,"",!1),onChange:p,options:i,placeholder:l("placeholders.select"),required:b,error:c,allowClear:!0,fieldPath:`companyQuestions.${e.key}`})}),f.jsx("div",{className:"company-question-comment",children:e.hasCommentField&&f.jsx(vi,{value:v,onChange:m,placeholder:e.commentLabelKey?l(e.commentLabelKey):l("placeholders.comments"),required:S,multiline:!0,rows:2,error:g,fieldPath:`companyQuestions.${u}`})})]})},e.key)}function iC({question:e,minerals:t,values:n,errors:o,gatingByMineral:r,options:i,getPerMineralHandler:s,getPerMineralCommentHandler:a,t:l}){if(t.length===0)return null;const c=`${e.key}_comment`;return f.jsx("div",{className:"company-question-row",children:f.jsxs("div",{className:"company-question-grid company-question-grid-per-mineral",children:[f.jsx(y.Typography.Text,{className:"company-question-label company-question-label-full",strong:!0,children:l(e.labelKey)}),t.map(u=>{const p=r?.get(u.key)?.companyQuestionsEnabled===!0,m=Br(n,e.key,u.key,!0),d=hc(o,e.key,u.key,!0),h=s(`${e.key}:${u.key}`),g=yc(n,c,u.key,!0),b=gc(o,c,u.key,!0),w=e.commentRequiredWhen??[],S=e.hasCommentField&&w.includes(m||""),v=p&&S,C=a(`${c}:${u.key}`);return f.jsxs("div",{className:"company-question-mineral-row",children:[f.jsx(y.Typography.Text,{className:"company-question-mineral-label",children:u.label??l(u.labelKey)}),f.jsx("div",{className:"company-question-answer",children:f.jsx(Si,{value:m,onChange:h,options:i,placeholder:l("placeholders.select"),required:p,error:d,allowClear:!0,fieldPath:`companyQuestions.${e.key}.${u.key}`})}),f.jsx("div",{className:"company-question-comment",children:e.hasCommentField&&f.jsx(vi,{value:g,onChange:C,placeholder:e.commentLabelKey?l(e.commentLabelKey):l("placeholders.comments"),required:v,multiline:!0,rows:2,error:b,fieldPath:`companyQuestions.${c}.${u.key}`})})]},u.key)})]})},e.key)}function Br(e,t,n,o){const r=e[t];return o&&typeof r=="object"?r[n]||"":!o&&typeof r=="string"?r:""}function hc(e,t,n,o){const r=e[t];if(o&&r&&typeof r=="object")return r[n];if(!o&&typeof r=="string")return r}function yc(e,t,n,o){const r=e[t];return o&&r&&typeof r=="object"?r[n]||"":!o&&typeof r=="string"?r:""}function gc(e,t,n,o){const r=e[t];if(o&&r&&typeof r=="object")return r[n];if(!o&&typeof r=="string")return r}function sC(e,t,n){const o=t?aC(e,t,n):e("conditions.always");return e("badges.companyQuestionsRequired",{condition:o})}function aC(e,t,n){const o=(i,s)=>n?.get(i)?.get(s)??s,r=i=>i.filter(Boolean).join(" / ");switch(t.type){case"always":return e("conditions.always");case"q1-not-no":return e("conditions.q1NotNo",{no:o("Q1","No")});case"q1-yes":return e("conditions.q1Yes",{yes:o("Q1","Yes")});case"q1q2-not-no":return e("conditions.q1q2NotNo",{no:o("Q1","No"),noQ2:o("Q2","No")});case"q1q2-yes":return e("conditions.q1q2Yes",{yes:o("Q1","Yes"),yesQ2:o("Q2","Yes")});case"q1-not-negatives":return e("conditions.q1NotNegatives",{negatives:r(t.negatives.map(i=>o("Q1",i)))});case"q1-not-negatives-and-q2-not-negatives":return e("conditions.q1NotNegativesAndQ2NotNegatives",{q1Negatives:r(t.q1Negatives.map(i=>o("Q1",i))),q2Negatives:r(t.q2Negatives.map(i=>o("Q2",i)))});default:return e("conditions.always")}}const{Title:lC}=y.Typography;function cC({versionDef:e,selectedMinerals:t,onMineralsChange:n,errors:o,customMinerals:r=[],onCustomMineralsChange:i}){const{t:s,locale:a,i18n:l}=Ce(),{componentDisabled:c}=y.ConfigProvider.useConfig(),{mineralScope:u}=e,p=a.startsWith("zh"),m=u.mode!=="fixed",d=u.mode==="free-text"?u.maxCount||10:0,h=u.otherSlotCount??0,g=ee(()=>d>0?Array.from({length:d},(O,R)=>R):[],[d]),b=ee(()=>h>0?Array.from({length:h},(O,R)=>R):[],[h]),{maxCountHint:w,maxCountReachedHint:S}=ee(()=>uC(s,u.maxCount),[s,u.maxCount]),v=Kn(s,o?.selection),C=mC(s,o?.custom),M=V((O,R)=>{if(R){if(u.maxCount&&t.length>=u.maxCount)return;n([...t,O.key]);return}n(t.filter(x=>x!==O.key))}),_=V((O,R)=>{const x=[...r];x[O]=R,i?.(x)}),k=u.mode==="free-text"?g:b,A=Re(()=>{const O=new Map;return u.minerals.forEach(R=>{O.set(R.key,x=>M(R,x.target.checked))}),O},[u.minerals,M]),z=Re(()=>{const O=new Map;return u.minerals.forEach(R=>{O.set(R.key,()=>{const x=t.includes(R.key);!x&&u.maxCount!==void 0&&t.length>=u.maxCount||M(R,!x)})}),O},[u.minerals,M,t,u.maxCount]),I=Re(()=>{const O=new Map;return k.forEach(R=>{O.set(R,x=>_(R,x.target.value))}),O},[k,_]),L=V(O=>{const R=s(O.labelKey);if(!p)return R;const x=l.t(O.labelKey,{lng:"en-US"});return x===R?R:`${R} ${x}`}),j=f.jsxs(y.Flex,{align:"center",justify:"space-between",className:"w-full",children:[f.jsxs(y.Flex,{align:"center",gap:8,children:[f.jsx(lC,{level:5,style:{margin:0},children:s("sections.mineralsScope")}),m&&f.jsx(y.Typography.Text,{type:"danger",children:"*"})]}),u.mode==="dynamic-dropdown"&&u.maxCount&&f.jsxs(y.Tag,{color:"orange",children:[t.length,"/",u.maxCount]})]});if(u.mode==="fixed")return f.jsx(y.Card,{title:j,children:f.jsx(y.Row,{gutter:[10,10],children:u.minerals.map(O=>f.jsx(y.Col,{xs:8,sm:6,md:4,children:f.jsx("div",{className:"rounded-md border border-blue-200 bg-blue-50 px-3 py-1.5 text-center",children:f.jsx(y.Typography.Text,{strong:!0,className:"text-blue-600 text-sm",children:L(O)})})},O.key))})});if(u.mode==="dynamic-dropdown"){const O=t.includes("other");return f.jsx(y.Card,{title:j,children:f.jsxs(y.Flex,{vertical:!0,gap:16,children:[f.jsx(y.Row,{gutter:[10,10],children:u.minerals.map(R=>{const x=t.includes(R.key);if(c)return f.jsx(y.Col,{xs:12,sm:8,md:6,children:f.jsx("div",{className:["rounded-md border px-3 py-1.5 select-none",x?"border-blue-400 bg-blue-50":"border-gray-200 bg-white"].join(" "),children:f.jsx(y.Typography.Text,{strong:x,type:x?void 0:"secondary",className:"text-sm",children:L(R)})})},R.key);const N=!x&&u.maxCount!==void 0&&t.length>=u.maxCount,K=N?void 0:z(R.key),$=f.jsx("div",{className:["rounded-md border px-3 py-1.5 transition-all cursor-pointer select-none",x?"border-blue-400 bg-blue-50":"border-gray-200 bg-white hover:border-blue-300 hover:bg-blue-50/50",N?"opacity-50 cursor-not-allowed":""].join(" "),onClick:K,children:f.jsx(y.Checkbox,{checked:x,disabled:N,onChange:A(R.key),onClick:Y=>Y.stopPropagation(),children:f.jsx(y.Typography.Text,{strong:x,className:"text-sm",children:L(R)})})});return f.jsx(y.Col,{xs:12,sm:8,md:6,children:N&&S?f.jsx(y.Tooltip,{title:S,children:$}):$},R.key)})}),w&&f.jsx(y.Typography.Text,{type:"secondary",className:"text-xs",children:w}),O&&b.length>0&&f.jsxs(y.Flex,{vertical:!0,gap:8,children:[f.jsxs(y.Flex,{align:"center",gap:4,children:[f.jsx(y.Typography.Text,{type:"secondary",className:"text-xs",children:s("sections.mineralsOther")}),f.jsx(y.Typography.Text,{type:"danger",children:"*"})]}),f.jsx(y.Row,{gutter:[8,8],children:b.map(R=>f.jsx(y.Col,{xs:12,md:6,children:f.jsx(y.Input,{value:r[R]||void 0,onChange:I(R),placeholder:s("placeholders.customMineral",{index:R+1}),disabled:c,status:C[R]?"error":void 0})},R))}),C[0]&&f.jsx(y.Typography.Text,{type:"danger",className:"text-xs",children:C[0]})]}),v&&f.jsx(y.Typography.Text,{type:"danger",className:"text-xs",children:v})]})})}return u.mode==="free-text"?f.jsx(y.Card,{title:j,children:f.jsxs(y.Flex,{vertical:!0,gap:12,children:[f.jsx(y.Typography.Text,{type:"secondary",className:"text-xs",children:s("hints.mineralsMaxCount",{max:d})}),f.jsx(y.Row,{gutter:[8,8],children:g.map(O=>f.jsx(y.Col,{xs:12,md:6,children:f.jsx(y.Input,{value:r[O]||void 0,onChange:I(O),placeholder:s("placeholders.customMineral",{index:O+1}),disabled:c,status:C[O]?"error":void 0})},O))}),C[0]&&f.jsx(y.Typography.Text,{type:"danger",className:"text-xs",children:C[0]})]})}):null}function uC(e,t){return t?{maxCountHint:e("hints.mineralsMaxCount",{max:t}),maxCountReachedHint:e("hints.mineralsMaxCountReached")}:{maxCountHint:void 0,maxCountReachedHint:void 0}}function mC(e,t){const n={};return t&&Object.entries(t).forEach(([o,r])=>{if(!r)return;const i=Number(o);Number.isNaN(i)||(n[i]=Kn(e,r)??r)}),n}function bc(e){return e.map(t=>`${t.value}:${t.labelKey}`).join(",")}function dC(e){return e?Object.keys(e).sort().map(t=>`${t}[${bc(e[t]??[])}]`).join("|"):""}function pC({versionDef:e,minerals:t,values:n,commentValues:o,onChange:r,onCommentChange:i,gatingByMineral:s,requiredByQuestion:a,errors:l={}}){const{t:c}=Ce(),{componentDisabled:u}=y.ConfigProvider.useConfig(),{questions:p,mineralScope:m}=e,d=t??m.minerals,h=d.map(I=>`${I.key}:${I.labelKey??""}`).join("|"),g=p.map(I=>`${I.key}:${I.perMineral?1:0}:${I.labelKey}:${bc(I.options)}:${dC(I.optionsByMineral)}`).join("|"),b=ee(()=>d.map(I=>({...I})),[d,h]),w=ee(()=>{const I=new Map,L=j=>j.map(O=>({value:O.value,label:c(O.labelKey)}));return p.forEach(j=>{if(j.perMineral){b.forEach(O=>{const x=j.optionsByMineral?.[O.key]??j.options;I.set(`${j.key}:${O.key}`,L(x))});return}I.set(`${j.key}:__all`,L(j.options))}),I},[p,b,h,g,c]),S=V((I,L,j)=>{r(I,L,j)}),v=V((I,L,j)=>{i(I,L,j)}),C=Re(()=>{const I=new Map;return p.forEach(L=>{if(L.perMineral){b.forEach(j=>{I.set(`${L.key}:${j.key}`,O=>S(L.key,j.key,O))});return}I.set(`${L.key}:__all`,j=>S(L.key,null,j))}),I},[S,b,p,h,g]),M=Re(()=>{const I=new Map;return p.forEach(L=>{if(L.perMineral){b.forEach(j=>{I.set(`${L.key}:${j.key}`,O=>v(L.key,j.key,O))});return}I.set(`${L.key}:__all`,j=>v(L.key,null,j))}),I},[v,b,p,h,g]),_=V((I,L,j)=>{const O=j?`${I}:${L??""}`:`${I}:__all`;return C(O)}),k=V((I,L,j)=>{const O=j?`${I}:${L??""}`:`${I}:__all`;return M(O)}),A=V((I,L,j)=>{const O=j?`${I}:${L??""}`:`${I}:__all`;return w.get(O)??[]}),z=V((I,L)=>{b.forEach(j=>{A(I,j.key,!0).some(R=>R.value===L)&&r(I,j.key,L)})});return f.jsx(y.Card,{title:f.jsxs(y.Flex,{wrap:!0,align:"center",justify:"space-between",gap:8,children:[f.jsxs("div",{children:[f.jsx(y.Typography.Title,{level:5,style:{margin:0},children:c("sections.questionMatrix")}),f.jsx(y.Typography.Text,{type:"secondary",children:c("sections.questionMatrixHint")})]}),f.jsx(y.Tag,{color:"blue",children:c("badges.questionRange",{from:1,to:p.length})})]}),children:f.jsx(y.Flex,{vertical:!0,gap:0,children:p.map(I=>f.jsx(fC,{question:I,minerals:b,values:n,commentValues:o,errors:l,gatingByMineral:s,requiredByQuestion:a,getOptions:A,getCellHandler:_,getCommentHandler:k,onBatchSet:z,t:c,readOnly:u},I.key))})})}function fC({question:e,minerals:t,values:n,commentValues:o,errors:r,gatingByMineral:i,requiredByQuestion:s,getOptions:a,getCellHandler:l,getCommentHandler:c,onBatchSet:u,t:p,readOnly:m}){let d=e.key!=="Q1";for(const b of t){const w=i?.get(b.key);if(!Xs(e.key,w)){d=!1;break}}const h=e.perMineral&&t.length>1,g=ee(()=>{if(!h)return[];const b=t.map(v=>new Set(a(e.key,v.key,!0).map(C=>C.value))),w=b.reduce((v,C)=>new Set([...v].filter(M=>C.has(M))),b[0]??new Set);return a(e.key,t[0]?.key??null,!0).filter(v=>w.has(v.value))},[h,e.key,t,a]);return f.jsx("div",{className:`question-matrix-row ${d?"question-row-disabled":""}`,children:f.jsxs(y.Flex,{vertical:!0,gap:12,children:[f.jsxs(y.Flex,{align:"center",justify:"space-between",gap:12,children:[f.jsx(y.Typography.Text,{strong:!0,style:{fontSize:14,flex:1},children:p(e.labelKey)}),h&&g.length>0&&!d&&!m&&f.jsx(y.Select,{placeholder:p("actions.setAllTo"),options:g,onChange:b=>u(e.key,b),style:{width:140},size:"small",allowClear:!0,value:void 0})]}),f.jsx(y.Flex,{vertical:!0,gap:8,children:t.map(b=>{const w=i?.get(b.key),S=m||Xs(e.key,w),v=ea(n,e.key,b.key,e.perMineral),C=ea(o,e.key,b.key,e.perMineral);yC(r,e.key,b.key,e.perMineral);const M=s?.get(e.key)?.get(b.key)===!0,_=!S&&M&&!v?"field-required-empty":void 0,k=l(e.key,b.key,e.perMineral),A=c(e.key,b.key,e.perMineral),z=a(e.key,b.key,e.perMineral);return f.jsxs("div",{className:"question-matrix-grid",children:[f.jsx(y.Typography.Text,{className:"question-matrix-label",type:S?"secondary":void 0,children:b.label??p(b.labelKey)}),f.jsx("div",{className:"question-matrix-answer",children:f.jsx(y.Select,{value:v||void 0,onChange:k,onKeyDown:hC(z,k,S),options:z,placeholder:p("placeholders.select"),disabled:S,allowClear:!0,className:_,"data-field-path":e.perMineral?`questions.${e.key}.${b.key}`:`questions.${e.key}`})}),f.jsx("div",{className:"question-matrix-comment",children:f.jsx(y.Input.TextArea,{value:C||void 0,onChange:I=>A?.(I.target.value),placeholder:p("placeholders.comments"),disabled:S,autoSize:{minRows:1,maxRows:2},rows:1,style:{resize:"none"},"data-field-path":e.perMineral?`questionComments.${e.key}.${b.key}`:`questionComments.${e.key}`})})]},b.key)})})]})})}function hC(e,t,n){return o=>{if(n||!t)return;const r=o.key.toLowerCase();if(r!=="y"&&r!=="n"&&r!=="u")return;const i=e.find(s=>s.value.toLowerCase().startsWith(r));i&&(o.preventDefault(),t(i.value))}}function Xs(e,t){return!t||e==="Q1"?!1:e==="Q2"?!t.q2Enabled:!t.laterQuestionsEnabled}function ea(e,t,n,o){const r=e[t];return o&&typeof r=="object"?r[n]||"":typeof r=="string"?r:""}function yC(e,t,n,o){const r=e[t];if(o&&typeof r=="object")return r[n];if(typeof r=="string")return r}const to=4,qt={xs:to,sm:to*2,md:to*3,lg:to*4},Ve={pagePadding:qt.lg,sectionGap:qt.lg};function ir(){const e=Eo(),t=ee(()=>e?e.state.searchParams:typeof window<"u"?new URLSearchParams(window.location.search):new URLSearchParams,[e]);ie.useEffect(()=>{const n=t.get("focus");if(!n)return;const o=document.querySelector(`[data-field-path="${n}"]`);if(!o)return;o.scrollIntoView({behavior:"smooth",block:"center"}),o.querySelector("input, textarea, .ant-select-selector")?.focus(),o.classList.add("app-field-focus");const i=window.setTimeout(()=>{o.classList.remove("app-field-focus")},1500);return()=>window.clearTimeout(i)},[t])}function ta(){const{meta:e,form:t}=ze(),{versionDef:n}=e,{companyInfo:o,selectedMinerals:r,customMinerals:i,questions:s,questionComments:a,companyQuestions:l}=t,c=Al(),{setCompanyInfoField:u,setSelectedMinerals:p,setCustomMinerals:m,setQuestionValue:d,setQuestionComment:h,setCompanyQuestionValue:g}=Et(),{t:b}=Ce(),{gatingByMineral:w,requiredFields:S,viewModels:v}=$t(),{displayMinerals:C}=v.declaration;return ir(),f.jsxs(y.Flex,{vertical:!0,gap:Ve.sectionGap,children:[f.jsx(nC,{versionDef:n,values:o,onChange:u,requiredFields:S.companyInfo,errors:c.companyInfo,dateFormatHint:b("hints.authorizationDate")}),f.jsx(cC,{versionDef:n,selectedMinerals:r,onMineralsChange:p,customMinerals:i,onCustomMineralsChange:m,errors:{selection:c.mineralsScope,custom:c.customMinerals}}),f.jsx(pC,{versionDef:n,minerals:C,values:s,commentValues:a,onChange:d,onCommentChange:h,gatingByMineral:w,requiredByQuestion:S.questions,errors:c.questions}),f.jsx(oC,{questions:n.companyQuestions,questionDefs:n.questions,minerals:C,values:l,onChange:g,gatingByMineral:w,gatingCondition:n.gating.companyQuestionsGating,requiredByQuestion:S.companyQuestions,errors:c.companyQuestions})]})}const{Title:DT,Text:gC}=y.Typography;function na({title:e}){const{t}=Ce();return f.jsx(y.Flex,{justify:"center",align:"center",style:{height:256},children:f.jsx(gC,{type:"secondary",style:{fontSize:18},children:t("common.comingSoon",{title:e})})})}const bC={productListRequired:{tone:"success",key:"docStatus.productListRequired"},productListNotRequired:{tone:"info",key:"docStatus.productListNotRequired"},productListUnknown:{tone:"warning",key:"docStatus.productListUnknown"},smelterListUnknown:{tone:"warning",key:"docStatus.smelterListUnknown"},smelterListNotRequired:{tone:"info",key:"docStatus.smelterListNotRequired"},smelterListPending:{tone:"warning",key:"docStatus.smelterListPending"},smelterListRequired:{tone:"success",key:"docStatus.smelterListRequired",withMetalsKey:"docStatus.smelterListRequiredWithMetals"},mineListAvailable:{tone:"info",key:"docStatus.mineListAvailable"},mineListNotAvailable:{tone:"info",key:"docStatus.mineListNotAvailable"}};function wc(e){const{meta:t,form:n}=ze(),{versionDef:o}=t,{selectedMinerals:r,customMinerals:i}=n,{docStatusBySection:s}=$t(),{t:a}=Ce(),l=s;return e==="productList"?yr(l.productList,a):e==="smelterList"?yr(l.smelterList,a,o,r,i):e==="mineList"?yr(l.mineList,a):null}function yr(e,t,n,o=[],r=[]){const i=bC[e.type];if(!i)return{tone:"info",text:t("docStatus.productListNotRequired")};let s=i.key;const a={};if(e.type==="smelterListPending"){const l=n?oa(n,o,r,e.metals??[],t):[];a.metals=l.join(", "),a.questions=e.questions??"Q1/Q2"}if(e.type==="smelterListRequired"){const l=n?oa(n,o,r,e.metals??[],t):[];l.length>0&&i.withMetalsKey&&(s=i.withMetalsKey,a.metals=l.join(", "))}return{tone:i.tone,text:t(s,a)}}function oa(e,t,n,o,r){const i=bi(e,t,n),s=new Map(i.map(a=>[a.key,a.label??r(a.labelKey)]));return Oe(o.map(a=>s.get(a)))}const{Title:ra,Paragraph:Kr,Text:wC}=y.Typography;function vC(e,t,n,o){const r=`docs.${e}.${t}.${n}`;return o(r)?r:`docs.${e}.${pm(e)}.${n}`}function vc(e){const{meta:t}=ze(),{templateType:n,versionId:o}=t,{locale:r,i18n:i}=Ce(),s=V(a=>i.exists(a));return ee(()=>vC(n,o,e,s),[n,o,e,s,r])}function Sc(e){const{t}=Ce(),n=vc(e);return ee(()=>{const o=t(n,{returnObjects:!0,defaultValue:[]});return Array.isArray(o)?Oe(o.map(r=>typeof r=="string"&&r.trim().length>0?r:null)):[]},[n,t])}function SC(){const{t:e}=Ce(),t=vc("definitions");return ee(()=>{const n=e(t,{returnObjects:!0,defaultValue:[]});return Array.isArray(n)?Oe(n.map(o=>{if(!o||typeof o!="object"||!("term"in o)||!("definition"in o))return null;const r=o;return typeof r.term!="string"||typeof r.definition!="string"?null:r})):[]},[t,e])}function Cc(e){const t=e.tone==="success"?"success":e.tone==="warning"?"warning":"info";return f.jsx(y.Alert,{type:t,message:e.text,showIcon:!0,style:{marginBottom:qt.sm}})}function No({section:e}){const t=Sc(e),n=wc(e);return t.length===0?null:f.jsxs(y.Card,{children:[n?Cc(n):null,f.jsx(y.Typography,{children:t.map((o,r)=>f.jsx(Kr,{style:{marginBottom:r<t.length-1?qt.sm:0,whiteSpace:"pre-line"},type:"secondary",children:o},`${e}-${r}`))})]})}function gr({titleKey:e,section:t}){const{t:n}=Ce(),o=Sc(t),r=SC(),i=wc(t);return t==="definitions"?r.length===0?f.jsx(na,{title:n(e)}):f.jsxs(y.Flex,{vertical:!0,gap:Ve.sectionGap,children:[f.jsx(ra,{level:4,style:{margin:0},children:n(e)}),r.map((s,a)=>f.jsxs(y.Card,{children:[f.jsx(wC,{strong:!0,children:s.term}),f.jsx(Kr,{type:"secondary",style:{marginTop:qt.xs,marginBottom:0,whiteSpace:"pre-line"},children:s.definition})]},`definition-${a}`))]}):o.length===0?f.jsx(na,{title:n(e)}):f.jsxs(y.Flex,{vertical:!0,gap:Ve.sectionGap,children:[f.jsx(ra,{level:4,style:{margin:0},children:n(e)}),i?Cc(i):null,f.jsx(y.Typography,{children:o.map((s,a)=>f.jsx(Kr,{type:"secondary",style:{marginBottom:a<o.length-1?qt.md:0,whiteSpace:"pre-line"},children:s},`${t}-${a}`))})]})}function Ge(e,t,n=!1){return!e||n?t:f.jsx("div",{className:"field-required",children:t})}const CC=["smelterName","mineName","mineId","mineIdSource","mineStreet","mineCity","mineProvince","mineContactName","mineContactEmail","proposedNextSteps","comments"],kC=["metal","smelterName","mineCountry"];function TC({config:e,availableMetals:t,rows:n,onChange:o,countryOptions:r=[],smelterOptions:i=[],smelterOptionsByMetal:s={}}){const{t:a}=Ce(),{componentDisabled:l}=y.ConfigProvider.useConfig(),c=ee(()=>new Map(n.map((v,C)=>[v.id,C])),[n]),u=V(()=>{if(l)return;const v={id:`mine-${Date.now()}`,metal:"",smelterName:"",mineName:"",mineCountry:"",mineId:"",mineIdSource:"",mineStreet:"",mineCity:"",mineProvince:"",mineDistrict:"",mineContactName:"",mineContactEmail:"",proposedNextSteps:"",comments:""};o([...n,v])}),p=V(v=>{if(l)return;const C=c.get(v);if(C===void 0)return;const M=n.slice();M.splice(C,1),o(M)}),m=V((v,C,M)=>{if(l)return;const _=c.get(v);if(_===void 0)return;const k=n[_];if(!k||k[C]===M)return;const A=n.slice();A[_]={...k,[C]:M},o(A)}),d=Re(()=>{const v=new Map;return n.forEach(C=>{CC.forEach(M=>{v.set(`${C.id}:${M}`,_=>m(C.id,M,_.target.value))})}),v},[n,m]),h=Re(()=>{const v=new Map;return n.forEach(C=>{kC.forEach(M=>{v.set(`${C.id}:${M}`,_=>m(C.id,M,_))})}),v},[n,m]),g=Re(()=>{const v=new Map;return n.forEach(C=>{v.set(C.id,()=>p(C.id))}),v},[n,p]),b=ee(()=>t.map(v=>({value:v.key,label:v.label??a(v.labelKey)})),[t,a]),w=V((v,C)=>(C?.label??"").toLowerCase().includes(v.toLowerCase())),S=ee(()=>[{title:a("tables.metal"),dataIndex:"metal",key:"metal",width:150,render:(v,C)=>Ge(!0,f.jsx(y.Select,{value:v||void 0,onChange:h(`${C.id}:metal`),options:b,placeholder:a("placeholders.select"),className:"w-full"}),l)},{title:a("tables.mineSmelterName"),dataIndex:"smelterName",key:"smelterName",width:220,render:(v,C)=>{const M=C.metal?s[C.metal]??[]:i,_=!!C.metal;return e.smelterNameMode==="dropdown"?Ge(_,f.jsx(y.Select,{value:v||void 0,onChange:h(`${C.id}:smelterName`),options:M,placeholder:a("placeholders.mineSmelterSelect"),showSearch:!0,filterOption:w,className:"w-full"}),l):Ge(_,f.jsx(y.AutoComplete,{value:v||void 0,onChange:h(`${C.id}:smelterName`),placeholder:a("placeholders.mineSmelterInput"),options:M,allowClear:!0,filterOption:w,className:"w-full"}),l)}},{title:a("tables.mineName"),dataIndex:"mineName",key:"mineName",width:180,render:(v,C)=>Ge(!!C.metal,f.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:mineName`),placeholder:a("placeholders.mineName")}),l)},{title:a("tables.mineId"),dataIndex:"mineId",key:"mineId",width:160,render:(v,C)=>f.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:mineId`),placeholder:a("placeholders.mineId")})},{title:a("tables.mineSourceId"),dataIndex:"mineIdSource",key:"mineIdSource",width:180,render:(v,C)=>f.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:mineIdSource`),placeholder:a("placeholders.mineSourceId")})},{title:a("tables.country"),dataIndex:"mineCountry",key:"mineCountry",width:160,render:(v,C)=>Ge(!!C.metal,f.jsx(y.Select,{value:v||void 0,onChange:h(`${C.id}:mineCountry`),options:r,placeholder:a("placeholders.mineCountry"),showSearch:!0,filterOption:w,className:"w-full"}),l)},{title:a("tables.street"),dataIndex:"mineStreet",key:"mineStreet",width:200,render:(v,C)=>f.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:mineStreet`),placeholder:a("placeholders.mineStreet")})},{title:a("tables.city"),dataIndex:"mineCity",key:"mineCity",width:160,render:(v,C)=>f.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:mineCity`),placeholder:a("placeholders.mineCity")})},{title:a("tables.stateProvince"),dataIndex:"mineProvince",key:"mineProvince",width:170,render:(v,C)=>f.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:mineProvince`),placeholder:a("placeholders.mineState")})},{title:a("tables.contactName"),dataIndex:"mineContactName",key:"mineContactName",width:180,render:(v,C)=>f.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:mineContactName`),placeholder:a("placeholders.mineContactName")})},{title:a("tables.contactEmail"),dataIndex:"mineContactEmail",key:"mineContactEmail",width:200,render:(v,C)=>f.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:mineContactEmail`),placeholder:a("placeholders.mineContactEmail")})},{title:a("tables.proposedNextSteps"),dataIndex:"proposedNextSteps",key:"proposedNextSteps",width:200,render:(v,C)=>f.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:proposedNextSteps`),placeholder:a("placeholders.mineNextSteps")})},{title:a("tables.comments"),dataIndex:"comments",key:"comments",width:180,render:(v,C)=>f.jsx(y.Input,{value:v||void 0,onChange:d(`${C.id}:comments`),placeholder:a("placeholders.mineComments")})},...l?[]:[{title:"",key:"actions",width:60,render:(v,C)=>f.jsx(y.Button,{type:"text",danger:!0,icon:f.jsx(ve.DeleteOutlined,{}),onClick:g(C.id)})}]],[l,e.smelterNameMode,r,w,d,g,h,b,i,a]);return e.available?f.jsx(y.Card,{title:f.jsxs(y.Flex,{align:"center",justify:"space-between",style:{width:"100%"},children:[f.jsxs(y.Flex,{align:"center",gap:8,children:[f.jsx(y.Typography.Title,{level:5,style:{margin:0},children:a("tabs.mineList")}),f.jsx(y.Tag,{color:"blue",children:a("badges.recordCount",{count:n.length})})]}),!l&&f.jsx(y.Button,{type:"primary",icon:f.jsx(ve.PlusOutlined,{}),onClick:u,children:a("actions.addRow")})]}),children:f.jsx(y.Table,{columns:S,dataSource:n,rowKey:"id",pagination:!1,scroll:{x:"max-content"},bordered:!0})}):null}function xC(){const{meta:e,lists:t}=ze(),{versionDef:n}=e,{mineList:o}=t,{setMineList:r}=Et(),{viewModels:i}=$t(),{availableMetals:s,countryOptions:a,smelterOptions:l,smelterOptionsByMetal:c}=i.mineList;return ir(),n.mineList.available?f.jsxs(y.Flex,{vertical:!0,gap:Ve.sectionGap,children:[f.jsx(No,{section:"mineList"}),f.jsx(TC,{config:n.mineList,availableMetals:s,rows:o,onChange:r,countryOptions:a,smelterOptions:l,smelterOptionsByMetal:c})]}):f.jsx(y.Typography.Text,{type:"secondary",children:f.jsx(No,{section:"mineList"})})}function _C({versionDef:e,rows:t,selectedMinerals:n,customMinerals:o,onChange:r,errors:i={}}){const{t:s}=Ce(),{componentDisabled:a}=y.ConfigProvider.useConfig(),l=ee(()=>{const b=bi(e,n,o);return(e.templateType==="amrt"?[...b].sort((S,v)=>{const C=(S.label??s(S.labelKey)).trim(),M=(v.label??s(v.labelKey)).trim(),_=C.localeCompare(M);return _!==0?_:S.key.localeCompare(v.key)}):b).map(S=>({value:S.key,label:S.label??s(S.labelKey)}))},[e,n,o,s]),c=ee(()=>new Map(t.map((b,w)=>[b.id,w])),[t]),u=V(()=>{const b={id:`minerals-scope-${Date.now()}`,mineral:"",reason:""};r([...t,b])}),p=V(b=>{const w=c.get(b);if(w===void 0)return;const S=t.slice();S.splice(w,1),r(S)}),m=V((b,w,S)=>{const v=c.get(b);if(v===void 0)return;const C=t[v];if(!C||C[w]===S)return;const M=t.slice();M[v]={...C,[w]:S},r(M)}),d=Re(()=>{const b=new Map;return t.forEach(w=>{b.set(w.id,S=>m(w.id,"reason",S.target.value))}),b},[t,m]),h=Re(()=>{const b=new Map;return t.forEach(w=>{b.set(w.id,S=>m(w.id,"mineral",S))}),b},[t,m]),g=ee(()=>[{title:s("tables.metal"),dataIndex:"mineral",key:"mineral",width:220,render:(b,w)=>{const S=i[c.get(w.id)??-1]?.mineral;return Ge(!0,f.jsx(y.Select,{value:b||void 0,onChange:h(w.id),options:l,placeholder:s("placeholders.select"),disabled:a,className:"w-full",status:S?"error":void 0}),a)}},{title:e.templateType==="amrt"?s(e.version.id==="1.1"?"tables.mineralsScopeReasonPrt":"tables.mineralsScopeReasonAmrt"):s("tables.mineralsScopeReason"),dataIndex:"reason",key:"reason",render:(b,w)=>{const S=i[c.get(w.id)??-1]?.reason;return Ge(!0,f.jsx(y.Input,{value:b||void 0,onChange:d(w.id),placeholder:s("placeholders.mineralsScopeReason"),disabled:a,status:S?"error":void 0}),a)}},{title:"",key:"actions",width:60,render:(b,w)=>a?null:f.jsx(y.Button,{type:"text",danger:!0,icon:f.jsx(ve.DeleteOutlined,{}),onClick:()=>p(w.id)})}],[s,l,i,c,h,d,p,a]);return f.jsxs(y.Flex,{vertical:!0,gap:Ve.sectionGap,children:[f.jsxs(y.Flex,{align:"center",justify:"space-between",children:[f.jsxs(y.Flex,{wrap:!0,align:"center",gap:8,children:[f.jsx(y.Typography.Title,{level:5,style:{margin:0},children:s("tabs.mineralsScope")}),f.jsx(y.Tag,{color:"blue",children:s("badges.recordCount",{count:t.length})})]}),!a&&f.jsx(y.Button,{type:"primary",onClick:u,children:s("actions.addRow")})]}),f.jsx(y.Table,{columns:g,dataSource:t,rowKey:"id",pagination:!1,scroll:{x:"max-content"},bordered:!0}),t.length===0&&f.jsx(y.Typography.Text,{type:"secondary",style:{display:"block",textAlign:"center",padding:"32px 0"},children:s("tables.noData")})]})}function IC(){const{meta:e,form:t,lists:n}=ze(),{versionDef:o}=e,{selectedMinerals:r,customMinerals:i}=t,{mineralsScope:s}=n,{setMineralsScope:a}=Et(),l=Al();return f.jsx(_C,{versionDef:o,rows:s,selectedMinerals:r,customMinerals:i,onChange:a,errors:l.mineralsScopeRows})}const RC=["productNumber","productName","requesterNumber","requesterName","comments"],MC=ie.memo(function({templateType:t,versionId:n,versionDef:o,config:r,rows:i,onChange:s,required:a=!1,showRequesterColumns:l,integration:c}){const{t:u,locale:p}=Ce(),{componentDisabled:m}=y.ConfigProvider.useConfig(),[d,h]=ie.useState([]),[g,{setTrue:b,setFalse:w}]=wi(),S=mc(i),v=ee(()=>{const Q=new Set(i.map(ae=>ae.id));return d.filter(ae=>Q.has(ae))},[i,d]),C=ee(()=>new Map(i.map((Q,ae)=>[Q.id,ae])),[i]),M=V(()=>{if(m)return;const Q={id:`product-${Date.now()}`,productNumber:"",productName:"",comments:""};s([...i,Q])}),_=c?.addMode??"append-empty-row",k=!!c&&_!=="append-empty-row",A=_!=="external-only",z=c?.label??u("actions.pickExternal"),I=c?.showLoadingIndicator??!1,L=V((Q,ae)=>{const se=`product-${Date.now()}-${ae}`;return{...Q,id:typeof Q.id=="string"&&Q.id.trim()?Q.id:se,productNumber:Q.productNumber??"",productName:Q.productName??"",requesterNumber:Q.requesterNumber??"",requesterName:Q.requesterName??"",comments:Q.comments??""}}),j=V(()=>S.current.map(Q=>({...Q}))),O=V(async()=>{if(m||!c||g)return;const Q=j(),ae={templateType:t,versionId:n,locale:p,versionDef:o,config:r,currentRows:Q};b();try{const D=(await c.onPickProducts(ae))?.items??[];if(D.length===0)return;const P=D.map((G,W)=>L(G,W));s([...S.current,...P])}catch{y.Modal.error({title:u("errors.externalPickFailedTitle"),content:u("errors.externalPickFailedContent")})}finally{w()}}),R=V(Q=>{if(m)return;const ae=C.get(Q);if(ae===void 0)return;const se=i.slice();se.splice(ae,1),s(se)}),x=V((Q,ae,se)=>{if(m)return;const D=C.get(Q);if(D===void 0)return;const P=i[D];if(!P||P[ae]===se)return;const G=i.slice();G[D]={...P,[ae]:se},s(G)}),N=Re(()=>{const Q=new Map;return i.forEach(ae=>{RC.forEach(se=>{Q.set(`${ae.id}:${se}`,D=>x(ae.id,se,D.target.value))})}),Q},[i,x]),K=V(Q=>{h(ae=>ae.filter(se=>se!==Q)),R(Q)}),$=Re(()=>{const Q=new Map;return i.forEach(ae=>{Q.set(ae.id,()=>K(ae.id))}),Q},[i,K]),Y=V(()=>{m||v.length!==0&&y.Modal.confirm({title:u("confirm.batchDelete"),content:u("confirm.batchDeleteContent",{count:v.length}),okText:u("actions.batchDelete"),okType:"danger",cancelText:u("actions.cancelSelection"),onOk:()=>{const Q=new Set(v);s(i.filter(ae=>!Q.has(ae.id))),h([])}})}),Z=V(()=>{m||h([])}),X={selectedRowKeys:v,onChange:Q=>h(Q)},E=!m,oe=ee(()=>{const Q=[{title:u(r.productNumberLabelKey),dataIndex:"productNumber",key:"productNumber",width:180,fixed:"left",render:(se,D)=>Ge(a,f.jsx(y.Input,{value:se||void 0,onChange:N(`${D.id}:productNumber`),placeholder:u("productPlaceholders.productNumber")}),m)},{title:u(r.productNameLabelKey),dataIndex:"productName",key:"productName",width:200,render:(se,D)=>f.jsx(y.Input,{value:se||void 0,onChange:N(`${D.id}:productName`),placeholder:u("productPlaceholders.productName")})}];return(l??r.hasRequesterColumns)&&Q.push({title:u("tables.requesterNumber"),dataIndex:"requesterNumber",key:"requesterNumber",width:180,render:(se,D)=>f.jsx(y.Input,{value:se||void 0,onChange:N(`${D.id}:requesterNumber`),placeholder:u("productPlaceholders.requesterNumber")})},{title:u("tables.requesterName"),dataIndex:"requesterName",key:"requesterName",width:200,render:(se,D)=>f.jsx(y.Input,{value:se||void 0,onChange:N(`${D.id}:requesterName`),placeholder:u("productPlaceholders.requesterName")})}),Q.push({title:u(r.commentLabelKey),dataIndex:"comments",key:"comments",width:200,render:(se,D)=>f.jsx(y.Input,{value:se||void 0,onChange:N(`${D.id}:comments`),placeholder:u("productPlaceholders.comments")})}),E&&Q.push({title:"",key:"actions",width:60,fixed:"right",render:(se,D)=>f.jsx(y.Button,{type:"text",danger:!0,icon:f.jsx(ve.DeleteOutlined,{}),onClick:$(D.id)})}),Q},[r,m,N,$,a,l,E,u]),le={emptyText:f.jsxs(y.Flex,{vertical:!0,align:"center",gap:16,className:"py-8",children:[f.jsx(y.Typography.Text,{type:"secondary",className:"text-sm",children:u("tables.noData")}),f.jsxs(y.Flex,{align:"center",gap:8,children:[E&&A&&f.jsx(y.Button,{type:"primary",icon:f.jsx(ve.PlusOutlined,{}),onClick:M,children:u("actions.addRow")}),E&&k&&f.jsx(y.Button,{type:A?"default":"primary",icon:f.jsx(ve.PlusOutlined,{}),onClick:O,loading:I&&g,children:z})]})]})};return f.jsx(y.Card,{title:f.jsxs(y.Flex,{vertical:!0,gap:8,style:{width:"100%"},children:[f.jsxs(y.Flex,{align:"center",justify:"space-between",children:[f.jsxs(y.Flex,{align:"center",gap:8,children:[f.jsx(y.Typography.Title,{level:5,style:{margin:0},children:u("tabs.productList")}),f.jsx(y.Tag,{color:"blue",children:u("badges.recordCount",{count:i.length})})]}),f.jsxs(y.Flex,{align:"center",gap:8,children:[E&&A&&f.jsx(y.Button,{type:"primary",icon:f.jsx(ve.PlusOutlined,{}),onClick:M,children:u("actions.addRow")}),E&&k&&f.jsx(y.Button,{type:A?"default":"primary",icon:f.jsx(ve.PlusOutlined,{}),onClick:O,loading:I&&g,children:z})]})]}),E&&v.length>0&&f.jsxs(y.Flex,{align:"center",gap:12,style:{padding:"8px 12px",background:"var(--ant-color-primary-bg)",borderRadius:6},children:[f.jsx(y.Typography.Text,{strong:!0,children:u("selection.selected",{count:v.length})}),f.jsx(y.Button,{type:"primary",danger:!0,size:"small",icon:f.jsx(ve.DeleteOutlined,{}),onClick:Y,children:u("actions.batchDelete")}),f.jsx(y.Button,{type:"text",size:"small",icon:f.jsx(ve.CloseOutlined,{}),onClick:Z,children:u("actions.cancelSelection")})]})]}),children:f.jsx(y.Table,{columns:oe,dataSource:i,rowKey:"id",rowSelection:E?X:void 0,pagination:!1,scroll:{x:"max-content",y:i.length>20?600:void 0},virtual:i.length>50,bordered:!0,locale:le})})});function NC(){const{meta:e,lists:t}=ze(),{versionDef:n}=e,{productList:o}=t,{setProductList:r}=Et(),{requiredFields:i}=$t(),s=El();return ir(),f.jsxs(y.Flex,{vertical:!0,gap:Ve.sectionGap,children:[f.jsx(No,{section:"productList"}),f.jsx(MC,{templateType:e.templateType,versionId:e.versionId,versionDef:n,config:n.productList,rows:o,onChange:r,required:i.productListRequired,showRequesterColumns:n.productList.hasRequesterColumns,integration:s?.productList})]})}const{Title:LC,Text:xt}=y.Typography;function qC(){const{meta:e}=ze(),{templateType:t,versionId:n}=e,{t:o}=Ce(),r=Ba(t),i=r.versions,s=i.some(l=>!!l.releaseDate),a=V(l=>f.jsx(y.List.Item,{children:f.jsxs(y.Flex,{align:"center",justify:"space-between",style:{width:"100%"},children:[f.jsxs(y.Flex,{align:"center",gap:qt.sm,children:[f.jsx(xt,{strong:!0,children:l.label}),l.id===n&&f.jsx(y.Tag,{color:"blue",children:o("revision.currentTag")}),l.id===r.defaultVersion&&f.jsx(y.Tag,{color:"gold",children:o("revision.defaultTag")})]}),s&&l.releaseDate?f.jsx(xt,{type:"secondary",style:{fontSize:12},children:l.releaseDate}):null]})}));return f.jsxs(y.Flex,{vertical:!0,gap:Ve.sectionGap,children:[f.jsxs("div",{children:[f.jsx(LC,{level:4,style:{margin:0},children:o("tabs.revision")}),f.jsx(xt,{type:"secondary",children:o("revision.subtitle")})]}),f.jsx(y.Card,{children:f.jsxs(y.Descriptions,{column:{xs:1,md:2},children:[f.jsx(y.Descriptions.Item,{label:o("revision.templateName"),children:f.jsx(xt,{strong:!0,children:o(r.fullNameKey)})}),f.jsx(y.Descriptions.Item,{label:o("revision.currentVersion"),children:f.jsx(xt,{strong:!0,children:n})}),f.jsx(y.Descriptions.Item,{label:o("revision.defaultVersion"),children:f.jsx(xt,{strong:!0,children:r.defaultVersion})}),f.jsx(y.Descriptions.Item,{label:o("revision.totalVersions"),children:f.jsx(xt,{strong:!0,children:i.length})})]})}),f.jsx(y.Card,{title:o("revision.availableVersions"),children:f.jsx(y.List,{dataSource:i,renderItem:a})})]})}const at={placeholder:"Select from list…",notListed:"Smelter not listed",notYetIdentified:"Smelter not yet identified",separator:"---"};at.placeholder,at.notListed,at.notYetIdentified,at.separator;at.placeholder,at.notListed,at.notYetIdentified,at.separator;const AC={"Ningxia Orient Tantalum Industry Co., Ltd.":{smelterId:"CID001277",sourceId:"RMI-Ta-001",country:"China",street:"123 Industrial Road",city:"Shizuishan",state:"Ningxia"},"Malaysia Smelting Corporation":{smelterId:"CID001105",sourceId:"RMI-Sn-002",country:"Malaysia",street:"88 Smelter Ave",city:"Butterworth",state:"Penang"},"Xiamen Tungsten Co., Ltd.":{smelterId:"CID002082",sourceId:"RMI-W-003",country:"China",street:"56 Tungsten Blvd",city:"Xiamen",state:"Fujian"},"Metalor Technologies SA":{smelterId:"CID001149",sourceId:"RMI-Au-004",country:"Switzerland",street:"2 Metalor Strasse",city:"Marin-Epagnier",state:"Neuchatel"}},EC=["smelterId","smelterName","smelterIdentification","sourceId","smelterStreet","smelterCity","smelterState","smelterContactName","smelterContactEmail","proposedNextSteps","mineName","comments","combinedSmelter"],PC=["metal","smelterLookup","smelterCountry","mineCountry","recycledScrap","combinedMetal"],DC=ie.memo(function({templateType:t,versionId:n,versionDef:o,config:r,availableMetals:i,rows:s,onChange:a,countryOptions:l=[],smelterLookupRecords:c,smelterLookupMeta:u,showNotYetIdentifiedCountryHint:p=!1,integration:m}){const{t:d,locale:h}=Ce(),{componentDisabled:g}=y.ConfigProvider.useConfig(),[b,w]=ie.useState([]),[S,{setTrue:v,setFalse:C}]=wi(),M=mc(s),[_,k]=ie.useState(null),A=ee(()=>{const B=new Set(s.map(ne=>ne.id));return b.filter(ne=>B.has(ne))},[s,b]),z=ee(()=>new Map(s.map((B,ne)=>[B.id,ne])),[s]),I=B=>!!(u&&Yt(B)),L=B=>!!(u&&vo(B)),j=B=>{if(!B||I(B)||L(B))return!1;const ne=Ir(B);return!!c?.[ne]},O=r.notListedRequireNameCountry??!0,R=B=>{const ne=r.notYetIdentifiedCountryByMetal?.[B];return typeof ne=="string"?ne:r.notYetIdentifiedCountryDefault??"Unknown"},x=V(()=>{if(g)return;const B={id:`smelter-${Date.now()}`,metal:"",smelterLookup:"",smelterName:"",smelterCountry:"",combinedMetal:"",combinedSmelter:"",smelterId:"",smelterIdentification:"",sourceId:"",smelterStreet:"",smelterCity:"",smelterState:"",smelterContactName:"",smelterContactEmail:"",proposedNextSteps:"",mineName:"",mineCountry:"",recycledScrap:"",comments:""};a([...s,B])}),N=m?.addMode??"append-empty-row",K=!!m?.onPickSmelters&&N!=="append-empty-row",$=N!=="external-only",Y=m?.label??d("actions.pickExternal"),Z=m?.showLoadingIndicator??!1,X=m?.lookupMode??"internal",E=X==="external"||X==="hybrid",oe=V(()=>M.current.map(B=>({...B}))),le=V((B,ne)=>{const U=`smelter-${Date.now()}-${ne}`;return{...B,id:typeof B.id=="string"&&B.id.trim()?B.id:U,metal:B.metal??"",smelterLookup:B.smelterLookup??"",smelterName:B.smelterName??"",smelterCountry:B.smelterCountry??"",combinedMetal:B.combinedMetal??"",combinedSmelter:B.combinedSmelter??"",smelterId:B.smelterId??"",smelterIdentification:B.smelterIdentification??"",sourceId:B.sourceId??"",smelterStreet:B.smelterStreet??"",smelterCity:B.smelterCity??"",smelterState:B.smelterState??"",smelterContactName:B.smelterContactName??"",smelterContactEmail:B.smelterContactEmail??"",proposedNextSteps:B.proposedNextSteps??"",mineName:B.mineName??"",mineCountry:B.mineCountry??"",recycledScrap:B.recycledScrap??"",comments:B.comments??""}}),Q=V(async()=>{if(g||!m||!m.onPickSmelters||S)return;const B=oe(),ne={templateType:t,versionId:n,locale:h,versionDef:o,config:r,currentRows:B};v();try{const F=(await m.onPickSmelters(ne))?.items??[];if(F.length===0)return;const de=F.map((Ee,dt)=>le(Ee,dt));a([...M.current,...de])}catch{y.Modal.error({title:d("errors.externalPickFailedTitle"),content:d("errors.externalPickFailedContent")})}finally{C()}}),ae=V((B,ne)=>{const U={...B,...ne,id:B.id,metal:B.metal};if(!U.smelterLookup||!u)return U;const F=!U.smelterName&&!I(U.smelterLookup)&&!L(U.smelterLookup)?{...U,smelterName:U.smelterLookup}:U;return j(F.smelterLookup)?W(F,F.smelterLookup):F}),se=V((B,ne)=>{const U=M.current,F=U.findIndex(Ee=>Ee.id===B);if(F<0)return;const de=U.slice();de[F]=ne,a(de)}),D=V(async B=>{if(g||!m?.onPickSmelterForRow||_)return;const U=M.current.find(de=>de.id===B);if(!U||!U.metal)return;const F={templateType:t,versionId:n,locale:h,versionDef:o,config:r,currentRows:oe(),rowId:B,row:{...U},metal:U.metal};k(B);try{const Ee=(await m.onPickSmelterForRow(F))?.items?.[0];if(!Ee)return;se(B,ae(U,Ee))}catch{y.Modal.error({title:d("errors.externalPickFailedTitle"),content:d("errors.externalPickFailedContent")})}finally{k(null)}}),P=V(B=>{if(g)return;const ne=z.get(B);if(ne===void 0)return;const U=s.slice();U.splice(ne,1),a(U)}),G=V(B=>{w(ne=>ne.filter(U=>U!==B)),P(B)}),W=(B,ne)=>{const U=Ir(ne),F={...B,smelterLookup:U};if(!u||!ne)return F;if(Yt(U))return{...F,smelterId:"",smelterName:"",smelterCountry:"",smelterIdentification:"",sourceId:"",smelterStreet:"",smelterCity:"",smelterState:""};if(vo(U)){const Ee=R(B.metal);return{...F,smelterName:"Unknown",smelterCountry:Ee,smelterId:"Unknown",smelterIdentification:"Unknown",sourceId:"",smelterStreet:"",smelterCity:"",smelterState:""}}if(!E)return{...F,smelterName:U};const de=c?.[U];return de?{...F,smelterName:U,smelterId:de.smelterId,smelterIdentification:de.smelterId,sourceId:de.sourceId,smelterCountry:de.country,smelterStreet:de.street,smelterCity:de.city,smelterState:de.state}:F},re=V((B,ne,U)=>{if(g)return;const F=z.get(B);if(F===void 0)return;const de=s[F];if(!de)return;const Ee=(()=>{if(ne==="smelterLookup")return W(de,U);if(ne==="metal"&&L(de.smelterLookup)){const sn=R(U);return{...de,metal:U,smelterName:de.smelterName||"Unknown",smelterCountry:sn,smelterIdentification:de.smelterIdentification||"Unknown"}}return de[ne]===U?de:{...de,[ne]:U}})();if(Ee===de)return;const dt=s.slice();dt[F]=Ee,a(dt)}),te=Re(()=>{const B=new Map;return s.forEach(ne=>{EC.forEach(U=>{B.set(`${ne.id}:${U}`,F=>re(ne.id,U,F.target.value))})}),B},[s,re]),ce=Re(()=>{const B=new Map;return s.forEach(ne=>{PC.forEach(U=>{B.set(`${ne.id}:${U}`,F=>re(ne.id,U,F))})}),B},[s,re]),ye=Re(()=>{const B=new Map;return s.forEach(ne=>{B.set(ne.id,()=>G(ne.id))}),B},[s,G]),fe=V(()=>{g||A.length!==0&&y.Modal.confirm({title:d("confirm.batchDelete"),content:d("confirm.batchDeleteContent",{count:A.length}),okText:d("actions.batchDelete"),okType:"danger",cancelText:d("actions.cancelSelection"),onOk:()=>{const B=new Set(A);a(s.filter(ne=>!B.has(ne.id))),w([])}})}),je=V(()=>{g||w([])}),Qe={selectedRowKeys:A,onChange:B=>w(B)},Te=!g,ot=ee(()=>i.map(B=>({value:B.key,label:B.label??d(B.labelKey)})),[i,d]),kt=ee(()=>[{value:"Yes",label:d("options.yes")},{value:"No",label:d("options.no")},{value:"Unknown",label:d("options.unknown")}],[d]),rn=ee(()=>[{value:"Yes",label:d("options.yes")},{value:"No",label:d("options.no")}],[d]),Ii=r.recycledScrapOptions==="yes-no"?rn:kt,Fc=V((B,ne)=>(ne?.label??"").toLowerCase().includes(B.toLowerCase())),zc=ee(()=>{const B=[];return B.push({title:d("tables.metal"),dataIndex:"metal",key:"metal",width:140,fixed:"left",render:(U,F)=>Ge(!0,f.jsx(y.Select,{value:U||void 0,onChange:ce(`${F.id}:metal`),options:ot,placeholder:d("placeholders.select"),className:"w-full"}),g)}),r.hasLookup&&B.push({title:d("tables.smelterName"),dataIndex:"smelterLookup",key:"smelterLookup",width:220,fixed:"left",render:(U,F)=>Ge(!!F.metal,E&&m?.onPickSmelterForRow?f.jsxs(y.Flex,{align:"center",gap:8,children:[I(F.smelterLookup)&&O?f.jsx(y.Input,{value:F.smelterName||void 0,onChange:te(`${F.id}:smelterName`),placeholder:d("placeholders.smelterNameRequired")}):F.smelterLookup?f.jsxs(f.Fragment,{children:[f.jsx(y.Typography.Text,{ellipsis:!0,style:{maxWidth:150},children:F.smelterLookup}),Te&&f.jsx(y.Button,{type:"link",size:"small",onClick:()=>D(F.id),disabled:!F.metal||_===F.id,loading:Z&&_===F.id,children:d("actions.edit")})]}):Te?f.jsx(y.Button,{type:"link",size:"small",onClick:()=>D(F.id),disabled:!F.metal||_===F.id,loading:Z&&_===F.id,children:d("actions.chooseSmelter")}):f.jsx(y.Typography.Text,{type:"secondary",children:"-"}),Te&&X==="hybrid"&&f.jsx(y.Typography.Text,{type:"secondary",style:{fontSize:12},children:d("actions.pickExternal")})]}):f.jsxs(y.Flex,{vertical:!0,gap:4,children:[f.jsx(y.AutoComplete,{value:U||void 0,onChange:ce(`${F.id}:smelterLookup`),options:u?[{value:u.notListed,label:u.notListed},{value:u.notYetIdentified,label:u.notYetIdentified}]:[],placeholder:d("placeholders.smelterName"),allowClear:!0,className:"w-full"}),I(F.smelterLookup)&&O&&f.jsx(y.Input,{value:F.smelterName||void 0,onChange:te(`${F.id}:smelterName`),placeholder:d("placeholders.smelterNameRequired")})]}),g)}),r.hasIdColumn&&B.push({title:d("tables.smelterId"),dataIndex:"smelterId",key:"smelterId",width:180,fixed:"left",render:(U,F)=>f.jsx(y.Input,{value:U||void 0,onChange:te(`${F.id}:smelterId`),placeholder:d("placeholders.smelterIdInput"),className:"font-mono text-xs",disabled:E&&j(F.smelterLookup)})}),r.hasLookup||B.push({title:d("tables.smelterName"),dataIndex:"smelterName",key:"smelterName",width:200,render:(U,F)=>{const de=I(F.smelterLookup)&&O,Ee=L(F.smelterLookup),dt=j(F.smelterLookup),sn=d(de?"placeholders.smelterNameRequired":Ee?"placeholders.smelterNameOptional":"placeholders.smelterName");return Ge(de,f.jsx(y.Input,{value:U||void 0,onChange:te(`${F.id}:smelterName`),placeholder:sn,disabled:E&&dt}),g)}}),B.push({title:d("tables.country"),dataIndex:"smelterCountry",key:"smelterCountry",width:180,render:(U,F)=>{const de=I(F.smelterLookup)&&O,Ee=L(F.smelterLookup),dt=j(F.smelterLookup),sn=d(de?"placeholders.smelterCountryRequired":"placeholders.smelterCountry"),Bc=Ee&&p;return Ge(de,f.jsxs(y.Flex,{vertical:!0,gap:4,children:[f.jsx(y.Select,{value:U||void 0,onChange:ce(`${F.id}:smelterCountry`),options:l,placeholder:sn,showSearch:!0,filterOption:Fc,className:"w-full",disabled:E&&dt}),Bc&&f.jsx(y.Typography.Text,{type:"secondary",style:{fontSize:12},children:d("hints.smelterNotYetIdentifiedCountry")})]}),g)}},{title:d("tables.smelterIdentification"),dataIndex:"smelterIdentification",key:"smelterIdentification",width:180,render:(U,F)=>f.jsx(y.Input,{value:U||void 0,onChange:te(`${F.id}:smelterIdentification`),placeholder:d("placeholders.smelterIdentification"),disabled:E&&j(F.smelterLookup)})},{title:d("tables.sourceId"),dataIndex:"sourceId",key:"sourceId",width:180,render:(U,F)=>f.jsx(y.Input,{value:U||void 0,onChange:te(`${F.id}:sourceId`),placeholder:d("placeholders.smelterSourceId"),disabled:E&&j(F.smelterLookup)})},{title:d("tables.street"),dataIndex:"smelterStreet",key:"smelterStreet",width:200,render:(U,F)=>f.jsx(y.Input,{value:U||void 0,onChange:te(`${F.id}:smelterStreet`),placeholder:d("placeholders.smelterStreet"),disabled:E&&j(F.smelterLookup)})},{title:d("tables.city"),dataIndex:"smelterCity",key:"smelterCity",width:160,render:(U,F)=>f.jsx(y.Input,{value:U||void 0,onChange:te(`${F.id}:smelterCity`),placeholder:d("placeholders.smelterCity"),disabled:E&&j(F.smelterLookup)})},{title:d("tables.stateProvince"),dataIndex:"smelterState",key:"smelterState",width:170,render:(U,F)=>f.jsx(y.Input,{value:U||void 0,onChange:te(`${F.id}:smelterState`),placeholder:d("placeholders.smelterState"),disabled:E&&j(F.smelterLookup)})},{title:d("tables.contactName"),dataIndex:"smelterContactName",key:"smelterContactName",width:180,render:(U,F)=>f.jsx(y.Input,{value:U||void 0,onChange:te(`${F.id}:smelterContactName`),placeholder:d("placeholders.smelterContactName")})},{title:d("tables.contactEmail"),dataIndex:"smelterContactEmail",key:"smelterContactEmail",width:200,render:(U,F)=>f.jsx(y.Input,{value:U||void 0,onChange:te(`${F.id}:smelterContactEmail`),placeholder:d("placeholders.smelterContactEmail")})},{title:d("tables.proposedNextSteps"),dataIndex:"proposedNextSteps",key:"proposedNextSteps",width:200,render:(U,F)=>f.jsx(y.Input,{value:U||void 0,onChange:te(`${F.id}:proposedNextSteps`),placeholder:d("placeholders.smelterNextSteps")})},{title:d("tables.mineName"),dataIndex:"mineName",key:"mineName",width:180,render:(U,F)=>f.jsx(y.Input,{value:U||void 0,onChange:te(`${F.id}:mineName`),placeholder:d("placeholders.smelterMineName")})},{title:d("tables.mineCountry"),dataIndex:"mineCountry",key:"mineCountry",width:240,render:(U,F)=>f.jsx(y.AutoComplete,{value:U||void 0,onChange:ce(`${F.id}:mineCountry`),placeholder:d("placeholders.smelterMineCountry"),options:l,allowClear:!0,className:"w-full"})},{title:d("tables.recycledScrap"),dataIndex:"recycledScrap",key:"recycledScrap",width:260,render:(U,F)=>f.jsx(y.Select,{value:U||void 0,onChange:ce(`${F.id}:recycledScrap`),options:Ii,placeholder:d("placeholders.select"),className:"w-full"})},{title:d("tables.comments"),dataIndex:"comments",key:"comments",width:200,render:(U,F)=>f.jsx(y.Input,{value:U||void 0,onChange:te(`${F.id}:comments`),placeholder:d("placeholders.smelterComments")})}),r.hasCombinedColumn&&B.push({title:d("tables.combinedMetal"),dataIndex:"combinedMetal",key:"combinedMetal",width:180,render:(U,F)=>f.jsx(y.Select,{value:U||void 0,onChange:ce(`${F.id}:combinedMetal`),options:ot,placeholder:d("placeholders.smelterCombinedMetal"),className:"w-full"})},{title:d("tables.combinedSmelter"),dataIndex:"combinedSmelter",key:"combinedSmelter",width:220,render:(U,F)=>f.jsx(y.Input,{value:U||void 0,onChange:te(`${F.id}:combinedSmelter`),placeholder:d("placeholders.smelterCombinedSmelter")})}),Te&&B.push({title:"",key:"actions",width:60,fixed:"right",render:(U,F)=>f.jsx(y.Button,{type:"text",danger:!0,icon:f.jsx(ve.DeleteOutlined,{}),onClick:ye(F.id)})}),B},[r,g,l,re,D,P,m,ot,O,_,Z,Te,u,X,d,E,kt,rn,Ii]),jc={emptyText:f.jsxs(y.Flex,{vertical:!0,align:"center",gap:16,className:"py-8",children:[f.jsx(y.Typography.Text,{type:"secondary",className:"text-sm",children:d("tables.noData")}),f.jsxs(y.Flex,{align:"center",gap:8,children:[Te&&$&&f.jsx(y.Button,{type:"primary",icon:f.jsx(ve.PlusOutlined,{}),onClick:x,children:d("actions.addRow")}),Te&&K&&f.jsx(y.Button,{type:$?"default":"primary",icon:f.jsx(ve.PlusOutlined,{}),onClick:Q,loading:Z&&S,children:Y})]})]})},Ri=m?.rowClassName;return f.jsx(y.Card,{title:f.jsxs(y.Flex,{vertical:!0,gap:8,style:{width:"100%"},children:[f.jsxs(y.Flex,{align:"center",justify:"space-between",children:[f.jsxs(y.Flex,{align:"center",gap:8,children:[f.jsx(y.Typography.Title,{level:5,style:{margin:0},children:d("tabs.smelterList")}),f.jsx(y.Tag,{color:"blue",children:d("badges.recordCount",{count:s.length})})]}),f.jsxs(y.Flex,{align:"center",gap:8,children:[Te&&$&&f.jsx(y.Button,{type:"primary",icon:f.jsx(ve.PlusOutlined,{}),onClick:x,children:d("actions.addRow")}),Te&&K&&f.jsx(y.Button,{type:$?"default":"primary",icon:f.jsx(ve.PlusOutlined,{}),onClick:Q,loading:Z&&S,children:Y})]})]}),Te&&A.length>0&&f.jsxs(y.Flex,{align:"center",gap:12,style:{padding:"8px 12px",background:"var(--ant-color-primary-bg)",borderRadius:6},children:[f.jsx(y.Typography.Text,{strong:!0,children:d("selection.selected",{count:A.length})}),f.jsx(y.Button,{type:"primary",danger:!0,size:"small",icon:f.jsx(ve.DeleteOutlined,{}),onClick:fe,children:d("actions.batchDelete")}),f.jsx(y.Button,{type:"text",size:"small",icon:f.jsx(ve.CloseOutlined,{}),onClick:je,children:d("actions.cancelSelection")})]})]}),children:f.jsx(y.Table,{className:"smelter-list-table",columns:zc,dataSource:s,rowKey:"id",rowClassName:Ri?(B,ne)=>Ri(B,ne):void 0,rowSelection:Te?Qe:void 0,pagination:!1,scroll:{x:"max-content",y:s.length>20?600:void 0},virtual:s.length>50,bordered:!0,locale:jc})})});function $C(){const{meta:e,lists:t}=ze(),{versionDef:n}=e,{smelterList:o}=t,{setSmelterList:r}=Et(),{viewModels:i}=$t(),s=El(),{availableMetals:a,countryOptions:l,showNotYetIdentifiedCountryHint:c}=i.smelterList;return ir(),f.jsxs(y.Flex,{vertical:!0,gap:Ve.sectionGap,children:[f.jsx(No,{section:"smelterList"}),f.jsx(DC,{templateType:e.templateType,versionId:e.versionId,versionDef:n,config:n.smelterList,availableMetals:a,rows:o,onChange:r,countryOptions:l,smelterLookupRecords:AC,smelterLookupMeta:at,showNotYetIdentifiedCountryHint:c,integration:s?.smelterList})]})}const OC={cmrt:["declaration","smelter-list","product-list","checker"],crt:["declaration","smelter-list","product-list","checker"],emrt:["declaration","smelter-list","mine-list","product-list","checker"],amrt:["declaration","minerals-scope","smelter-list","mine-list","product-list","checker"]};function FC(e){const t=new Map(e.pages.map(o=>[o.key,o]));return(OC[e.templateType]??[]).map(o=>t.get(o)).filter(o=>!!(o&&o.available))}const{Sider:zC}=y.Layout,jC=[{key:"declaration",label:"Declaration",icon:f.jsx(ve.FileTextOutlined,{})},{key:"smelter-list",label:"Smelter List",icon:f.jsx(ve.UnorderedListOutlined,{})},{key:"checker",label:"Checker",icon:f.jsx(ve.CheckCircleOutlined,{})},{key:"product-list",label:"Product List",icon:f.jsx(ve.ShoppingOutlined,{})},{key:"smelter-lookup",label:"Smelter Look-up",icon:f.jsx(ve.SearchOutlined,{})},{key:"definitions",label:"Definitions",icon:f.jsx(ve.BookOutlined,{})},{key:"instructions",label:"Instructions",icon:f.jsx(ve.InfoCircleOutlined,{})}];function BC({tabs:e=jC,collapsed:t=!1,onCollapse:n,selectedKey:o,onSelect:r}){const i=ee(()=>e.map(c=>({key:c.key,icon:c.icon,label:c.label})),[e]),s=V(c=>{r?.(c.key)}),a=V(c=>{n?.(c)}),l=o??e[0]?.key;return f.jsx(zC,{collapsible:!0,collapsed:t,onCollapse:a,theme:"light",className:"border-r border-gray-200 bg-white",width:200,children:f.jsx(y.Menu,{mode:"inline",selectedKeys:l?[l]:[],items:i,onClick:s,className:"h-full border-r-0 px-2 py-2"})})}function KC({steps:e,currentKey:t,onChange:n}){const o=e.findIndex(s=>s.key===t),r=V(s=>{const a=e[s];a&&n?.(a.key)});if(e.length===0)return null;const i=e.map((s,a)=>{const l=s.progress&&s.progress.completed===s.progress.total&&s.progress.total>0,c=s.progress&&s.progress.total>0;return{key:s.key,title:f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{children:s.label}),c&&f.jsxs(y.Tag,{color:l?"success":"default",className:"text-xs ml-1",style:{margin:0},children:[s.progress.completed,"/",s.progress.total]})]}),icon:l?f.jsx(ve.CheckCircleOutlined,{style:{color:"var(--ant-color-success)"}}):void 0,status:l||a<o?"finish":a===o?"process":"wait"}});return f.jsx("div",{className:"step-nav-container",children:f.jsx("div",{className:"step-nav-inner",children:f.jsx(y.Steps,{current:o>=0?o:0,items:i,onChange:r,type:"default",className:"step-nav-steps"})})})}const{Content:QC}=y.Layout;function UC({tabs:e,steps:t,topBanner:n,bottomSlot:o,currentTabKey:r,onTabChange:i,currentStepKey:s,onStepChange:a,children:l,maxContentWidth:c,className:u,style:p}){const[m,d]=ie.useState(!1),h=V(S=>{d(S)}),g=!!(t&&t.length>0),b=!!(e&&e.length>0&&!g),w=c?{...p??{},"--cm-content-max-width":`${c}px`}:p;return f.jsxs(y.Layout,{className:`h-full min-h-full bg-gray-100 ${u??""}`,style:w,children:[g&&f.jsx(KC,{steps:t,currentKey:s,onChange:a}),n,f.jsxs(y.Layout,{children:[b&&f.jsx(BC,{tabs:e,collapsed:m,onCollapse:h,selectedKey:r,onSelect:i}),f.jsxs(y.Layout,{style:{padding:Ve.pagePadding,display:"flex",flexDirection:"column"},children:[f.jsx(QC,{style:{flex:1,overflow:"auto"},children:f.jsx(y.Flex,{vertical:!0,gap:Ve.sectionGap,className:"animate-fade-in w-full",style:c?{maxWidth:c,margin:"0 auto"}:void 0,children:l})}),o&&f.jsx("div",{className:"sticky-bottom-nav",style:{position:"sticky",bottom:0,zIndex:10,marginTop:Ve.sectionGap,maxWidth:c,marginLeft:c?"auto":void 0,marginRight:c?"auto":void 0,width:"100%"},children:f.jsx(y.Card,{children:o})})]})]})]})}function GC({className:e,errorCount:t=0,onGoToChecker:n}){const{t:o}=Ce();return t===0?f.jsx(y.Alert,{type:"success",showIcon:!0,className:e,message:o("checker.globalSuccessBar")}):f.jsx(y.Alert,{type:"warning",showIcon:!0,className:e,message:o("checker.globalErrorBar",{count:t}),action:n?f.jsxs(y.Button,{type:"link",size:"small",onClick:n,children:[o("checker.globalErrorAction")," ",f.jsx(ve.RightOutlined,{className:"text-xs"})]}):void 0})}function YC({currentPageKey:e,onNavigatePage:t,pageOrder:n}){const{meta:o}=ze(),{versionDef:r}=o,{t:i}=Ce(),{prev:s,next:a}=ee(()=>{const u=n&&n.length>0?n:r.pages.filter(m=>m.available),p=u.findIndex(m=>m.key===e);return p<0?{prev:null,next:null}:{prev:u[p-1]??null,next:u[p+1]??null}},[e,n,r.pages]),l=V(()=>{s&&t(s.key)}),c=V(()=>{a&&t(a.key)});return!s&&!a?null:f.jsxs(y.Flex,{align:"center",justify:"space-between",children:[f.jsx(y.Button,{onClick:l,disabled:!s,style:{minWidth:96},children:i("actions.prev")}),f.jsx(y.Button,{type:"primary",onClick:c,disabled:!a,style:{minWidth:96},children:i("actions.next")})]})}function ZC(e,t){return t.includes(e)}function HC({templateType:e,versionId:t,readOnly:n=!1,showPageActions:o=!0,pageKey:r,onNavigatePage:i,renderPage:s,integrations:a,maxContentWidth:l,children:c}){return f.jsxs(Ky,{templateType:e,versionId:t,integrations:a,readOnly:n,children:[c,f.jsx(VC,{readOnly:n,showPageActions:o,pageKey:r,onNavigatePage:i,renderPage:s,maxContentWidth:l})]})}function VC({readOnly:e=!1,showPageActions:t=!0,pageKey:n,onNavigatePage:o,renderPage:r,maxContentWidth:i}){const{componentDisabled:s}=y.ConfigProvider.useConfig(),{meta:a}=ze(),{versionDef:l}=a,{t:c,locale:u,i18n:p}=Ce(),{checkerErrors:m,checkerSummary:d}=$t(),h=!!(s||e),g=V(A=>{o(A)}),b=ee(()=>{const A=FC(l);return e?A.filter(z=>z.key!=="checker"):A},[l,e]),w=ee(()=>{if(!(!e||n!=="checker"))return b[0]?.key},[e,n,b]),S=w??n;ie.useEffect(()=>{w&&w!==n&&g(w)},[w,n,g]);const v=A=>{const{sections:z}=d;switch(A){case"declaration":return{total:z.companyInfo.total+z.questionMatrix.total+z.companyQuestions.total,completed:z.companyInfo.completed+z.questionMatrix.completed+z.companyQuestions.completed};case"smelterList":return z.smelterList;case"productList":return z.productList;default:return}},C=ee(()=>b.map(A=>({key:A.key,label:c(A.labelKey),progress:v(A.key)})),[b,c,u,p.isInitialized,d]),M=ee(()=>b.map(A=>A.key),[b]),_=V(A=>{ZC(A,M)&&g(A)}),k=V(()=>{e||g("checker")});return f.jsxs(UC,{steps:C,currentStepKey:S,onStepChange:_,maxContentWidth:i,bottomSlot:e||!t?void 0:f.jsx(YC,{currentPageKey:S,onNavigatePage:g,pageOrder:b}),children:[!e&&S!=="checker"&&f.jsx(GC,{errorCount:m.length,onGoToChecker:k}),f.jsx(y.ConfigProvider,{componentDisabled:h,children:r(S)})]})}const WC="declaration";function JC({templateType:e,versionId:t,readOnly:n=!1,showPageActions:o=!0,pageKey:r,onNavigatePage:i,maxContentWidth:s,integrations:a,children:l}){const[c,u]=ie.useState(WC),[p,m]=ie.useState(new URLSearchParams),d=r??c,h=ie.useCallback(w=>{i?i(w):u(w),m(new URLSearchParams)},[i]),g=ie.useMemo(()=>({state:{pathname:ho({template:e,version:t,page:d}),params:{template:e,version:t,page:d},searchParams:p},actions:{navigate:w=>{const S=new URL(w,"http://app.local"),C=Oe(S.pathname.split("/"))[2]||d;h(C),m(new URLSearchParams(S.search))}}}),[d,p,e,t,h]),b=ie.useCallback(w=>{switch(w){case"revision":return f.jsx(qC,{});case"instructions":return f.jsx(gr,{titleKey:"tabs.instructions",section:"instructions"});case"definitions":return f.jsx(gr,{titleKey:"tabs.definitions",section:"definitions"});case"declaration":return f.jsx(ta,{});case"minerals-scope":return f.jsx(IC,{});case"smelter-list":return f.jsx($C,{});case"checker":return f.jsx(kS,{onNavigateToField:(S,v)=>{h(S),m(new URLSearchParams({focus:v}))}});case"mine-list":return f.jsx(xC,{});case"product-list":return f.jsx(NC,{});case"smelter-lookup":return f.jsx(gr,{titleKey:"tabs.smelterLookup",section:"smelterLookup"});default:return f.jsx(ta,{})}},[h]);return f.jsx(Kc,{value:g,children:f.jsx(HC,{templateType:e,versionId:t,readOnly:n,showPageActions:o,pageKey:d,onNavigatePage:h,renderPage:b,maxContentWidth:s,integrations:a,children:l})})}const XC={appTitle:"Conflict Minerals Reporting",selectTemplate:"Select Template",selectVersion:"Version",export:"Export",lookupSeparator:"----------",comingSoon:"{{title}} - Coming Soon",homeTitle:"Conflict Minerals Reporting Templates",homeSubtitle:"Select a template from the header to get started",language:"Language"},e1={cmrt:"CMRT",emrt:"EMRT",crt:"CRT",amrt:"AMRT",cmrt_full:"Conflict Minerals Reporting Template",emrt_full:"Extended Minerals Reporting Template",crt_full:"Cobalt Reporting Template",amrt_full:"Additional Minerals Reporting Template"},t1={revision:"Revision",declaration:"Declaration",smelterList:"Smelter List",checker:"Checker",productList:"Product List",smelterLookup:"Smelter Look-up",definitions:"Definitions",instructions:"Instructions",mineList:"Mine List",mineralsScope:"Minerals Scope"},n1={companyInfo:"Company Information",contact:"Contact",authorizer:"Authorizer",questionMatrix:"Question Matrix",questionMatrixHint:"Based on the reporting scope above, answer questions 1 to 8.",companyQuestions:"Company-level Questions",mineralsScope:"Minerals in Scope",mineralsOther:"Other minerals"},o1={requiredHintTitle:"Filling tip:",requiredHintBody:"Fields highlighted in yellow are required. Please complete them before submitting."},r1={requiredCompleted:"{{done}}/{{total}} required completed",questionRange:"Q{{from}}-Q{{to}}",companyQuestionsRequired:"Required when any metal {{condition}}",recordCount:"{{count}} records"},i1={always:"always",q1NotNo:"Q1 ≠ {{no}}",q1Yes:"Q1 = {{yes}}",q1q2NotNo:"Q1 ≠ {{no}} and Q2 ≠ {{noQ2}}",q1q2Yes:"Q1 = {{yes}} and Q2 = {{yesQ2}}",q1NotNegatives:"Q1 not in {{negatives}}",q1NotNegativesAndQ2NotNegatives:"Q1 not in {{q1Negatives}} and Q2 not in {{q2Negatives}}"},s1={select:"Select",input:"Enter value",number:"Enter number",date:"Select date",companyName:"Enter the company’s legal registered name",declarationScope:"Select…",scopeDescription:"Describe the custom reporting scope",customMineral:"Mineral {{index}}",companyId:"DUNS, VAT, organization ID, etc.",companyAuthId:"Authorization identifier",address:"Company address",contactName:"Enter contact name",contactEmail:"example@company.com",contactPhone:"+86 xxx xxxx xxxx",authorizerName:"Enter authorizer name",authorizerTitle:"Title",authorizerEmail:"example@company.com",authorizerPhone:"+86 xxx xxxx xxxx",authorizationDate:"DD-MMM-YYYY",smelterIdInput:"e.g. CID001105",smelterLookup:"Search smelter…",smelterName:"Smelter name",smelterNameRequired:"Required: Smelter name",smelterNameOptional:"Smelter name (optional)",smelterCountry:"Select country",smelterCountryRequired:"Required: Country",smelterIdentification:"CID…",smelterSourceId:"Source ID",smelterStreet:"Street",smelterCity:"City",smelterState:"State / Province",smelterContactName:"Contact name",smelterContactEmail:"email@…",smelterNextSteps:"Next steps",smelterMineName:"Mine name",smelterMineCountry:"Mine country",mineralsScopeReason:"Reason for inclusion",smelterComments:"Comments",comments:"Comments",smelterCombinedMetal:"Select",smelterCombinedSmelter:"Combined smelter",mineSmelterSelect:"Select smelter",mineSmelterInput:"Smelter name",mineName:"Mine name",mineId:"CID…",mineSourceId:"Source ID",mineCountry:"Select country",mineStreet:"Street",mineCity:"City",mineState:"State / Province",mineContactName:"Contact name",mineContactEmail:"email@…",mineNextSteps:"Next steps",mineComments:"Comments"},a1={productNumber:"PRD-xxxx-xxx",productName:"Product name",requesterNumber:"Requester number",requesterName:"Requester name",comments:"Comments"},l1={companyName:"Use the formal registered name; no abbreviations.",declarationScope:"A=Company-wide | B=Product (requires Product List) | C=User defined",contactEmail:'If no email, enter "not available".',authorizerName:'Do not enter placeholders like "same".',authorizationDate:"Format: DD-MMM-YYYY (e.g., 01-Jan-2026)",smelterNotYetIdentifiedCountry:"Not yet identified: leave country blank.",mineralsMaxCount:"Select up to {{max}} minerals",mineralsMaxCountReached:"Maximum minerals selected"},c1={metal:"Metal",smelterLookup:"Smelter Look-up",smelterName:"Smelter Name",smelterId:"Smelter Identification Number Input Column",smelterIdentification:"Smelter Identification",sourceId:"Source ID",country:"Country",street:"Street",city:"City",stateProvince:"State / Province",contactName:"Contact Name",contactEmail:"Contact Email",proposedNextSteps:"Proposed Next Steps",mineCountry:"Mine Country",mineSmelterName:"Smelter name sourced from this mine",mineSourceId:"Smelter Source ID",mineId:"Mine Identification",mineIdSource:"Mine ID Source",recycledScrap:"100% Recycled or Scrap?",combinedMetal:"Combined Metal",combinedSmelter:"Combined Smelter",mineName:"Mine Name",province:"Province",mineralsScopeReason:"Reasons for inclusion",mineralsScopeReasonPrt:"Reasons for inclusion on the PRT",mineralsScopeReasonAmrt:"Reasons for inclusion on the AMRT",comments:"Comments",requesterNumber:"Requester Number",requesterName:"Requester Name",noData:"No data"},u1={addRow:"Add Row",pickExternal:"Pick from External",chooseSmelter:"Choose Smelter",edit:"Edit",prev:"Previous",next:"Next",submit:"Submit",close:"Close",setAllTo:"Set all to",sameAsContact:"Same as Contact",batchDelete:"Delete Selected",cancelSelection:"Cancel"},m1={batchDelete:"Confirm Batch Delete",batchDeleteContent:"Are you sure you want to delete the selected {{count}} records? This action cannot be undone."},d1={selected:"{{count}} selected"},p1={yes:"Yes",no:"No",unknown:"Unknown",notApplicable:"Not applicable",notApplicableForDeclaration:"Not applicable for this declaration",notDeclaring:"Not declaring",none:"None",didNotSurvey:"Did not survey",drcOnly:"DRC only",drcOrAdjoiningOnly:"DRC or adjoining countries only",indiaMadagascarOnly:"India and/or Madagascar only",percentage100:"100%",percentageOne:"1",percentageAbove90:"Greater than 90%",percentageAbove75:"Greater than 75%",percentageAbove50:"Greater than 50%",percentage50OrLess:"50% or less",percentageLess25:"Less than 25%",yesCrtTemplate:"Yes, CRT",yesOtherFormat:"Yes, using other format (describe)",yesOtherFormatTitle:"Yes, Using Other Format (Describe)",yesIpc1755:"Yes, in conformance with IPC1755 (e.g., CMRT)",yesIpc1755Emrt:"Yes, in conformance with IPC1755 (e.g. EMRT)",yesWhenMoreValidated:"Yes, when more processors are validated",yesWithSec:"Yes, with the SEC",yesWithEu:"Yes, with the EU",yesWithSecAndEu:"Yes, with the SEC and the EU"},f1={tantalum:"Tantalum",tin:"Tin",gold:"Gold",tungsten:"Tungsten",cobalt:"Cobalt",mica:"Mica",copper:"Copper",graphite:"Graphite",lithium:"Lithium",nickel:"Nickel",silver:"Silver",aluminum:"Aluminum",antimony:"Antimony",chromium:"Chromium",germanium:"Germanium",iridium:"Iridium",lime:"Lime",magnesium:"Magnesium",manganese:"Manganese",palladium:"Palladium",phosphorus:"Phosphorus",platinum:"Platinum",rareEarthElements:"Rare Earth Elements",rhodium:"Rhodium",ruthenium:"Ruthenium",silicon:"Silicon",sodaAsh:"Soda Ash",titanium:"Titanium",vanadium:"Vanadium",zinc:"Zinc",zirconium:"Zirconium",other:"Other"},h1={cmrt:{q1:"1) Is any 3TG intentionally added or used in the product(s) or in the production process?",q2:"2) Does any 3TG remain in the product(s)?",q3:"3) Do any of the smelters in your supply chain source the 3TG from the covered countries? (SEC term, see definitions tab)",q4:"4) Do any of the smelters in your supply chain source the 3TG from conflict-affected and high-risk areas?",q5:"5) Does 100 percent of the 3TG (necessary to the functionality or production of your products) originate from recycled or scrap sources?",q6:"6) What percentage of relevant suppliers have provided a response to your supply chain survey?",q7:"7) Have you identified all of the smelters supplying the 3TG to your supply chain?",q8:"8) Has all applicable smelter information received by your company been reported in this declaration?"},emrt:{q1:"1) Is any of the specified mineral/metal intentionally added or used in the product(s) or in the production process?",q2:"2) Does any of the specified mineral/metal remain in the product(s)?",q3:"3) Do any of the smelters or processors in your supply chain source the specified mineral/metal from conflict-affected and high-risk areas? (OECD Due Diligence Guidance, see definitions tab)",q4:"4) Does 100 percent of the specified mineral/metal originate from recycled or scrap sources?",q5:"5) What percentage of relevant suppliers have provided a response to your supply chain survey?",q6:"6) Have you identified all of the smelters or processors supplying the specified minerals/metal to your supply chain?",q7:"7) Has all applicable smelter or processor information received by your company been reported in this declaration?",v1:{q1:"1) Is any cobalt or mica intentionally added or used in the product(s) or in the production process?",q2:"2) Does any cobalt or mica remain in the product(s)?",q3:"3) Do any of the smelters or processors in your supply chain source cobalt or mica from conflict-affected and high-risk areas? (OECD Due Diligence Guidance, see definitions tab)",q4:"4) Does 100 percent of the cobalt originate from recycled or scrap sources?",q5:"5) What percentage of relevant suppliers have provided a response to your supply chain survey?",q6:"6) Have you identified all of the smelters or processors supplying cobalt or mica to your supply chain?",q7:"7) Has all applicable smelter or processor information received by your company been reported in this declaration?"}},crt:{q1:"1) Is any of the cobalt intentionally added or used in the product(s) or in the production process?",q2:"2) Do any of the smelters in your supply chain source the cobalt from a Conflict-Affected and High-Risk area? (OECD Due Diligence Guidance, see definitions tab)",q3:"3) Does 100 percent of the cobalt originate from recycled or scrap sources?",q4:"4) What percentage of relevant suppliers have provided a response to your supply chain survey?",q5:"5) Have you identified all of the smelters supplying the cobalt to your supply chain?",q6:"6) Has all applicable smelter information received by your company been reported in this declaration?"},amrt:{q1:"1) Is any of the following minerals or metals intentionally added or used in the product(s) or in the production process?",q2:"2) What percentage of relevant suppliers have provided a response to your supply chain survey?"}},y1={cmrt:{a:"A. Have you established a responsible minerals sourcing policy?",b:"B. Is your responsible minerals sourcing policy publicly available on your website? (Note – If yes, the user shall specify the URL in the comment field.)",b_comment:"Please specify the URL",c:"C. Do you require your direct suppliers to source the 3TG from smelters whose due diligence practices have been validated by an independent third party audit program?",d:"D. Have you implemented due diligence measures for responsible sourcing?",e:"E. Does your company conduct Conflict Minerals survey(s) of your relevant supplier(s)?",e_comment:"Describe other format",f:"F. Do you review due diligence information received from your suppliers against your company’s expectations?",g:"G. Does your review process include corrective action management?",h:"H. Is your company required to file an annual conflict minerals disclosure?"},emrt:{a:"A. Have you established a responsible minerals sourcing policy?",b:"B. Is your responsible minerals sourcing policy publicly available on your website? (Note – If yes, the user shall specify the URL in the comment field.)",b_comment:"Please specify the URL",c:"C. Do you require your direct suppliers to source the specified minerals/metals from smelters whose due diligence practices have been validated by an independent third-party audit program?",d:"D. Have you implemented due diligence measures for responsible sourcing?",e:"E. Does your company conduct supply chain survey(s) of your relevant supplier(s) on the specified minerals/metals?",e_comment:"Describe other format",f:"F. Do you review due diligence information received from your suppliers against your company’s expectations?",g:"G. Does your review process include corrective action management?",v1:{c:"C. Do you require your direct suppliers to source cobalt from smelters whose due diligence practices have been validated by an independent third-party audit program, or mica from processors with equivalent qualifications?",e:"E. Does your company conduct cobalt and/or mica supply chain survey(s) of your relevant supplier(s)?"},v11:{a:"A. Have you established a publicly available cobalt sourcing policy?",b:"B. Does your policy cover, at a minimum, all risks in the OECD Due Diligence Guidance Annex II Model Policy, as well as the worst forms of child labor?",c:"C. Do you require your direct suppliers to source cobalt from smelters whose due diligence practices have been validated by an independent third-party audit program, or mica from processors with equivalent qualifications?",d:"D. Do you require suppliers' due diligence practices to cover, at a minimum, all risks in the OECD Due Diligence Guidance Annex II Model Policy, as well as the worst forms of child labor?",e:"E. Does your company conduct cobalt and/or mica supply chain survey(s) of your relevant supplier(s)?",f:"F. Do you review due diligence information received from your suppliers against your company’s expectations?",g:"G. Does your review process include corrective action management?"}},crt:{a:"A. Have you established a publicly available cobalt sourcing policy?",a_comment:"Please specify the URL",b:"B. Does your policy cover, at a minimum, all risks in the OECD Due Diligence Guidance Annex II Model Policy, as well as the worst forms of child labor?",c:"C. Have you implemented due diligence measures for cobalt in the declaration scope indicated above?",d:"D. Do you require suppliers to exercise due diligence over the cobalt supply chain in accordance with the OECD Due Diligence Guidance?",e:"E. Do you require your direct suppliers to source cobalt from smelters whose due diligence practices have been validated by an independent third party audit program?",f:"F. Do you require suppliers' due diligence practices to cover, at a minimum, all risks in the OECD Due Diligence Guidance Annex II Model Policy, as well as the worst forms of child labor?",g:"G. Does your company conduct cobalt supply chain survey(s) of your relevant supplier(s)?",g_comment:"Describe other format",h:"H. Do you review due diligence information received from your suppliers against your company’s expectations?",i:"I. Does your review process include corrective action management?"}},g1={cmrt:{respondentNumber:"Responder’s Product Number",respondentName:"Responder’s Product Name",manufacturerNumber:"Manufacturer’s Product Number",manufacturerName:"Manufacturer’s Product Name",comment:"Comments"},emrt:{respondentNumber:"Responder Product Number",respondentName:"Responder Product Name",comment:"Comments"},crt:{manufacturerNumber:"Manufacturer’s Product Number",manufacturerName:"Manufacturer’s Product Name",comment:"Comments"},amrt:{manufacturerNumber:"Manufacturer’s Product Number",manufacturerName:"Manufacturer’s Product Name",comment:"Comments"}},b1={companyName:"Company Name",reportingScope:"Scope of Reporting",scopeDescription:"Description of Scope",companyId:"Company Unique Identification",companyAuthId:"Company Unique Authority ID",address:"Address",contactName:"Contact Name",contactEmail:"Contact Email",contactPhone:"Contact Phone",authorizerName:"Authorizer Name",authorizerTitle:"Authorizer Title",authorizerEmail:"Authorizer Email",authorizerPhone:"Authorizer Phone",authorizationDate:"Date of Completion"},w1={productListRequired:"Current scope: Product List is required.",productListNotRequired:"Current scope: Product List is not required.",productListUnknown:"Select Declaration Scope to determine if Product List is required.",smelterListRequired:"Current answers require the Smelter List.",smelterListRequiredWithMetals:"Smelter List required for: {{metals}}.",smelterListPending:"Complete {{questions}} for: {{metals}} to determine Smelter List requirement.",smelterListNotRequired:"Current answers do not require the Smelter List.",smelterListUnknown:"Complete the mineral scope and Q1/Q2 to determine Smelter List requirement.",mineListAvailable:"Mine List is available for this version.",mineListNotAvailable:"Mine List is not available for this version."},v1={subtitle:"System automatically checks completeness and compliance.",progressTitle:"Overall completion",progressDetail:"{{done}}/{{total}} required completed",errorsTitle:"Errors (must fix)",errorBadge:"{{count}} items",groupCount:"{{count}} items",groupToggleShow:"Expand",groupToggleHide:"Collapse",passedTitle:"Passed",passedBadge:"{{count}} items",passedSummary:"Passed {{count}} required checks",passedToggleShow:"Show details",passedToggleHide:"Hide details",passedEmpty:"No passed items yet",passedProductList:"Product List provided",passedProductRow:"Product List row {{index}} has product number",passedSmelterForMineral:"{{mineral}} smelter record provided",sectionComplete:"{{section}} required items completed",validEmail:"Valid email: {{field}}",submit:"Submit",submitTitle:"Pre-submission check",submitCompletion:"Completion",submitErrors:"Errors",submitAllPass:"All passed",submitFixTop:"To fix (top 5)",submitContinue:"Continue",submitFix:"Fix now",andMoreErrors:"and {{count}} more errors…",globalErrorBar:"⚠️ {{count}} required items remain incomplete. Click to review.",globalSuccessBar:"✅ All required items are completed.",globalErrorAction:"Go to Checker",sessionSaved:"Saved in session",sessionSavedHint:"Your data is temporarily saved in the browser session. Please export the file before closing the page to save permanently.",groups:{declaration:"Declaration",companyInfo:"Company Information",mineralsScope:"Minerals Scope",questionMatrix:"Based on the reporting scope above, answer questions 1 to 8.",companyQuestions:"From a company-level, answer the following questions.",smelter:"Smelter List",mine:"Mine List",product:"Product List",other:"Other"},error:"Error",pass:"Pass",noErrors:"No errors found",totalErrors:"{{count}} error(s) found",goToField:"Go to field",requiredField:"{{field}} is required.",requiredCompanyQuestionComment:"Comment is required: {{field}}.",requiredProductList:"Product List is required for scope B.",requiredSmelterList:"Smelter List entry required for {{field}}.",invalidEmail:"Invalid email format: {{field}}."},S1={subtitle:"Template version overview based on registry metadata.",templateName:"Template name",currentVersion:"Current version",defaultVersion:"Default version",totalVersions:"Total versions",availableVersions:"Available versions",currentTag:"Current",defaultTag:"Default"},C1=JSON.parse(`{"cmrt":{"6.5":{"instructions":["RMI website: (www.responsiblemineralsinitiative.org)\\nTraining and guidance, template, Responsible Minerals Assurance Process conformant smelter list.","Introduction","This Conflict Minerals Reporting Template (Template) is a free, standardized reporting template created by the Responsible Minerals Initiative (RMI). The Template facilitates the transfer of information through the supply chain regarding mineral country of origin and smelters and refiners being utilized and supports compliance to legislation*. The template also facilitates the identification of new smelters and refiners to potentially undergo an audit via the Responsible Minerals Assurance Process**.\\n\\nThe CMRT was designed for downstream companies to disclose information about their supply chains up to but not including the smelter. If you are a 3TG smelter or refiner, in accordance with the RMAP protocols, we recommend you enter your own name in the smelter list tab.\\n\\nWhen filling out the form, none of the cell entries should start will \\"=\\" or \\"#.\\"","* In 2010, the U.S. Dodd-Frank Wall Street Reform and Consumer Protection Act was passed concerning “conflict minerals” originating from the Democratic Republic of the Congo (DRC) or adjoining countries. The SEC published final rules associated with the disclosure of the source of conflict minerals by U.S. publicly traded companies (see the rules at http://www.sec.gov/rules/final/2012/34-67716.pdf). The rules reference the OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-Affected and High-Risk Areas, (http://www.oecd.org/daf/inv/mne/GuidanceEdition2.pdf), which guides suppliers to establish policies, due diligence frameworks and management systems.\\nIn 2017, Regulation (EU) 2017/821 of the European Parliament and of the European Council of 17 May 2017 was passed concerning supply chain due diligence obligations for Union importers of tin, tantalum and tungsten, their ores, and gold originating from conflict-affected and high-risk areas (see regulation at https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=OJ:L:2017:130:FULL&from=EN)\\n** See information on the Responsible Minerals Initiative (www.responsiblemineralsinitiative.org).","Instructions for completing Company Information questions (rows 8 - 22).\\nProvide comments in ENGLISH only","Note: Entries with (*) are mandatory fields.","1. Insert your company's Legal Name. Please do not use abbreviations. In this field you have the option to add other commercial names, DBAs, etc.","2. Select your company's Declaration Scope. The options for scope are:\\n\\nA. Company-wide\\nB. Product (or List of Products)\\nC. User-Defined \\n\\nFor \\"Company-wide\\", the declaration encompasses the entirety of a company's products or product substances produced by the parent company. Therefore if the user is reporting 3TG data at the company level, they will be reporting conflict minerals data on all products they manufacture. \\n\\nFor Scope selection of Product (or List of Products), a link to the worksheet tab for Product List will be displayed. If this scope is chosen, it is mandatory to list the Responder's Product Number of the products covered under the Scope of this Declaration in Column B of the Product List worksheet. It is optional to list the Responder's Product Name in Column C of the Product List worksheet.\\n\\nFor Scope selection of \\"User Defined\\", it is mandatory that the user describes the scope to which the 3TG disclosure is applicable. The scope of this class shall be defined in a text field by the supplier and should be easily understood by customers or the receivers of the document. As an example, companies may provide a link to clarifying information.\\n\\nThis field is mandatory.","3. Insert your company’s unique identifier number or code (DUNS number, VAT number, customer-specific identifier, etc.)","4. Insert the source for the unique identifier number or code (\\"DUNS\\", \\"VAT\\", \\"Customer\\", etc).","5. Insert your full company address (street, city, state, country, postal code). This field is optional.","6. Insert the name of the person to contact regarding the contents of the declaration information. This field is mandatory.","7. Insert the email address of the contact person. If an email address is not available, state ‘‘not available’’ or ‘‘n/a.’’ A blank field may cause an error in form implementation. This field is mandatory.","8. Insert the telephone number for the contact. This field is mandatory.","9. Insert the name of the person who is responsible for the contents of the declaration information. The authorizer may be a different individual than the contact person. It is not correct to use the words ‘‘same’’ or similar identification to provide the name of the authorizer. This field is mandatory.","10. Insert the title for the Authorizing person. This field is optional.","11. Insert the email address of the Authorizing person. If an email address is not available, state ‘‘not available’’ or ‘‘n/a.’’ A blank field may cause an error in form implementation. This field is mandatory.","12. Insert the telephone number for the Authorizing person. This field is optional.","13. Please enter the Date of Completion for this form using the format DD-MMM-YYYY. This field is mandatory.","14. As an example, the user may save the file name as: companyname-date.xls (date as YYYY-MM-DD).","Instructions for completing the eight Due Diligence Questions (rows 24 - 71).\\nProvide answers in ENGLISH only","These eight questions define the usage, origination and sourcing identification for each of the metals. The questions are designed to collect information about the use of 3TG in the company’s product(s) to allow for the determination of regulatory applicability. Responses to these questions shall represent the ‘Declaration Scope’ selected in the company information section.The responses to the questions in this section can be used to determine applicability and completeness of 3TG reporting.","For each of the eight required questions, provide an answer for each metal using the pull down menu selections.The questions in this section must be completed for all 3TG. If the response for a given metal to questions 1 and 2 is positive, then the subsequent questions shall be completed for that metal and the following due diligence questions (A to H) shall be completed about the company’s overall due diligence program.","1. This is the first of two questions for which the response is used to determine whether the 3TG is within the scope of conflict minerals reporting requirements. This question relies upon the guidance provided by the SEC in the final rules regarding the determination if a 3TG is “necessary to the functionality or production” of a product. The SEC guidance is based upon the presumption that a company in the supply chain for a product would not intentionally add a 3TG to that product or any of a product’s sub-components if that 3TG was not necessary to the product’s generally expected function, use, or purpose. Similarly, the guidance presumes that a 3TG would not be necessary to the production of a product unless it was intentionally included in the production process of that product. The response to this question serves to exclude any trace-level contaminants or naturally-occurring by-products such as tin in steel. This question shall be answered for each 3TG.\\n\\nThis question asks if any conflict minerals are used as raw material, component or additive in a product that you manufacture or contract to manufacture (including raw material and components). Impurities from raw materials, components, additives, abrasives, and cutting tools are outside the scope of the survey.\\n\\nThis question shall be answered for each 3TG. Valid responses to this question are either \\"yes\\" or \\"no\\". This question is mandatory.","Some companies may require substantiation for a \\"No\\" answer that should be entered into the Comment Field.","2. This question shall be answered for each 3TG for each the answer to question 1 is \\"yes.\\" This is the second of two questions for which the response is used to determine whether the 3TG is within the scope of conflict minerals reporting requirements as described in the SECs final rules regarding the determination if a 3TG is necessary to the functionality or production of a product. This question is dependent upon the question and response to Question 1. This question is intended to identify 3TGs which are intentionally added or included in the manufacturing process of a product where some amount of the 3TG remains in the finished product. This includes 3TGs which may not have been intended to become part of the final product and may not be necessary to the functionality of the product but are only present as residuals of the manufacturing process. In many cases, the manufacturer may have attempted to remove or facilitate consumption of the 3TG during the manufacturing process, however, some amount of the 3TG remains. Should the 3TG, which is added or included during the manufacturing process, be completely removed such that none of the 3TG remains upon the completion of that process, the response to this question would be no.\\n\\nThis question shall be answered for each 3TG. Valid answers to this question are either \\"yes\\" or \\"no\\". This question is mandatory.","3. This is a declaration that any portion of the 3TGs contained in a product or multiple products originates from the DRC or an adjoining country (covered countries). The answer to this question should be \\"yes\\" if any smelter in the supply chain sources from the covered countries, even if those smelters are on the RMI conformant smelter and refiner list. For more information, see RMI's due diligence guidance on conflict minerals here: http://www.responsiblemineralsinitiative.org/training-and-resources/publications-and-guidance/.\\n\\nThe answer to this question shall be \\"yes\\", \\"no\\", or \\"unknown\\". It is recommended to substantiate a \\"Yes\\" answer in the comments section.\\n\\nThis question is mandatory for a specific metal if the response to Question 1 and 2 is “Yes” for that metal.","4. This is a declaration that any portion of the 3TGs contained in a product or multiple products originates from conflict-affected and high-risk areas (CAHRAs).\\n\\nThe answer to this question should be “yes” if any smelter in the supply chain sources from covered countries or CAHRAs, even if those smelters are on the RMI conformant smelter and refiner list. For more information, see RMI's due diligence guidance on conflict minerals here: http://www.responsiblemineralsinitiative.org/training-and-resources/publications-and-guidance/. \\n\\nThe answer to this question shall be yes, no or unknown. It is recommended to substantiate a “yes” answer in the comments section. This question is mandatory for a specific metal if the response to Question 1 and 2 is “yes” for that metal.","5. This is a declaration that identifies whether 3TGs contained in the product(s) necessary to the functionality of that product(s) originate from recycled or scrap sources. \\n\\nThe answer to this question shall be \\"yes\\", \\"no\\", or \\"unknown\\". This question is mandatory for a specific metal if the response to Question 1 and 2 is “Yes” for that metal. \\n\\nA \\"Yes\\" answer means that 100% of the 3TG comes from recycled or scrap sources. A \\"No\\" answer means that some of the 3TG does not come from recycled or scrap sources. An \\"Unknown\\" answer means that the user does not know whether or not 100% of the 3TG comes from recycled or scrap sources.","6. This is a question to determine whether a company has received conflict minerals disclosures from all direct suppliers reasonably believed to be providing 3TGs contained in the products covered by the scope of this declaration. Permissible responses to this question are:\\n\\n­ 100%\\n­ Greater than 90%\\n­ Greater than 75%\\n- Greater than 50%\\n- 50% or less\\n- None\\n\\nThis question is mandatory for a specific metal if the response to Question 1 and 2 is “Yes” for that metal.","7. This question verifies if the supplier has reason to believe they have identified all of the smelters providing 3TGs in the products covered by this declaration. The answer to this question shall be \\"Yes\\" or \\"No\\", along with a comment in certain cases, e.g. list of smelters. \\n\\nThis question is mandatory for a specific metal if the response to Question 1 and 2 is “Yes” for that metal.","8. This question verifies that all of the smelters identified to be providing any of the 3TGs contained in the products covered by the scope of this declaration have been reported in this declaration. The answer to this question shall be \\"yes\\" or \\"no\\" along with a comment in certain cases, e.g. list of smelters. This question is mandatory for a specific metal if the response to Question 1 and 2 is “Yes” for that metal.","Provide comments in the Comment sections as required to clarify your responses.","Instructions for completing Questions A. – H. (rows 75 - 89). Questions A. through H. are mandatory if the both of responses to Question 1 and 2 are “Yes” for any metal.\\nProvide answers in ENGLISH only","The OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-affected and High-risk Areas (OECD Guidance) defines “Due Diligence” as “an on-going, proactive and reactive process through which companies can ensure that they respect human rights and do not contribute to conflict”. Due diligence should be an integral part of your company’s overall conflict free sourcing strategy. Questions A. thru H. are designed to assess your company’s conflict-free minerals sourcing due diligence activities. Responses to these questions shall represent the full scope of your company’s activities and shall not be limited to the ‘Declaration Scope’ selected in the company information section.","A. This is a declaration to disclose whether a company has a responsible minerals sourcing policy. The answer to this question shall be \\"yes\\" or \\"no.\\" Comments shall be captured in a question comment field. \\n\\nThis question is mandatory.","B. This is a declaration to disclose whether a company’s responsible minerals sourcing policy is available on the company website. The answer to this question shall be \\"yes\\" or \\"no.\\" If \\"Yes\\" the user shall specify the URL in a question comment field. \\n\\nThis question is mandatory.","C. This is a declaration to determine whether a company requires their direct suppliers to source 3TG from validated smelters. The answer to this question shall be \\"yes\\" or \\"no.\\" Comments should be captured in a question comment field.\\n\\nThis question is mandatory.","D. Please answer \\"yes\\" or \\"no\\" to disclose whether your company has implemented responsible sourcing due diligence measures. This declaration is not intended to provide the details of a company’s due diligence measures - just that a company has implemented due diligence measures. The aspects of acceptable due diligence measures shall be determined by the requestor and supplier.\\n\\nExamples of due diligence measures may include: communicating and incorporating into contracts (where possible) your expectations to suppliers on responsible mineral supply chain; identifying and assessing risks in the supply chain; designing and implementing a strategy to respond to identified risks; verifying your direct supplier’s compliance to its responsible minerals sourcing policy, etc. These due diligence measure examples are consistent with the guidelines included in the internationally recognized OECD Guidance.\\n\\nThis question is mandatory.","E. This is a question to disclose whether a company requests their supplier to fill out a conflict minerals declaration. Acceptable answers are listed below, in certain cases further explanation may be required, i.e., to provide the format used for collecting information. If the answer is \\"Yes,\\" using other format the user shall provide a comment in a question comment field. Permissible responses to this question are:\\n\\n- Yes, in conformance with IPC-1755 [e.g., CMRT]\\n- Yes, using other format (describe)\\n- No\\n\\nThis question is mandatory.","F. Please answer “Yes” or “No”. In the comments section, you can provide additional information on your approach. Examples could be:\\n\\n “3rd party audit” - on-site audits of your suppliers conducted by independent third parties. \\n “Documentation review only” - a reviewof supplier submitted records and documentation conducted by independent third parties and, or your company personnel. \\n “Internal audit” - on-site audits of your suppliers conducted by your company personnel.\\n\\nThis question is mandatory.","G. This is a question to disclose whether a company’s review process includes corrective action management. The answer to this question shall be \\"yes\\" or \\"no.\\" Comments shall be captured in a question comment field. \\n\\nThis question is mandatory.","H. This is a question to disclose whether a company is subject to the SEC rule, the EU regulation, or both. The answer to this question shall be \\"yes, with the SEC\\", \\"yes, with the EU\\", \\"yes with the SEC and the EU\\" or \\"no.\\" Comments shall be captured in a question comment field. This question is mandatory. For more information on the SEC rule, please refer to www.sec.gov. For more information on the EU regulation, please refer to https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX:32017R0821&from=EN.","Instructions for completing the Smelter List Tab.\\nProvide answers in ENGLISH only","Note: Columns with (*) are mandatory fields","This template allows for smelter identification using the Smelter Look-up. Columns B, and C must be completed in order from left to right to utilize the Smelter Look-up feature.\\nUse a separate line for each metal/smelter/country combination.","1. Smelter Identification Input Column - If you know the Smelter Identification Number, input the number in Column A (columns B, C, E, F, G, I, and J will auto-populate). Column A does not autopopulate.","2. Metal (*) - Use the pull down menu to select the metal for which you are entering smelter information. This field is mandatory.","3. Smelter Look-up (*) - Select from dropdown. This is the list of known smelters as of template release date. If smelter is not listed select 'Smelter Not Listed'. This will allow you to enter the name of the smelter in Column D. If you do not know the name or location of the smelter, select 'Smelter Not Yet Identified.' For this option, columns D and E will autopopulate to say, 'unknown.' This field is mandatory.","4. Smelter Name (1)- Fill in smelter name if you selected \\"Smelter Not Listed\\" in column C. This field will auto-populate when a smelter name in selected in Column C. This field is mandatory.","5. Smelter Country (*) – This field will auto-populate when a smelter name is selected in column C. If you selected \\"Smelter Not Listed\\" in column C, use the pull down menu to select the country location of the smelter. This field is mandatory.","6. Smelter Identification - This is a unique identifier assigned to a smelter or refiner according to an established smelter and refinery identification system. It is expected that multiple names or aliases could be used to describe a single smelter or refiner and therefore multiple names or aliases could be associated to a single ‘Smelter ID’.","7. Source of Smelter Identification Number - This is the source of the Smelter Identification Number entered in Column F. If a smelter name was selected in Column C using the dropdown box, this field will auto-populate.","8. Smelter Street - Provide the street name on which the smelter is located. This field is optional.","9. Smelter City – Provide the city name of where the smelter is located. This field is optional.","10. Smelter Location: State/Province, if applicable – Provide the state or province where the smelter is located. This field is optional.","11. Smelter Contact Name – The Conflict Minerals Reporting Template (CMRT) is circulated among companies in the requesting company's supply chain to ensure compliance with the OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-Affected and High-Risk Areas and the U.S. Securities and Exchange Commission Final Rule on conflict minerals.\\n\\nIf the template is circulated in a country where laws protecting personal information exist, sharing personal contact information in the CMRT may violate related regulations. Therefore, it is recommended that the requesting company take precautions such as obtaining the contact person's permission to share the information with other companies in the supply chain when completing \\"Smelter Contact Name\\" and the \\"Smelter Contact Email\\" columns.\\n\\nIf you have permission to share this information, please fill in the name of the Smelter Facility Contact person who you worked with.","12. Smelter Contact Email – Fill in the email address of the Smelter Facility contact person who was identified as the Smelter Contact Name. Example: John.Smith@SmelterXXX.com. Please review the instructions for Smelter Contact Name before completing this field.","13. Name of Mine(s) - This field allows a company to define the actual mines being used by the smelter. Please enter the actual mine names if known. If 100% of the smelter’s feedstock originates from recycled or scrap sources, enter \\"Recycled\\" or \\"Scrap\\" in place of the name of the mine and answer \\"Yes\\" in Column P.\\n\\n\\"RCOI confirmed as per RMI\\" may be an acceptable answer to this question.","14. Location (Country) of Mine(s) - This is a free form text field that allows a company to define the location of the mines being used by the smelter. Please enter the country of the mine(s). If the country of origin is not known, enter \\"Unknown\\". If 100% of the smelter’s feedstock originates from recycled or scrap sources, enter \\"Recycled\\" or \\"Scrap\\" in place of the country of origin. This field is optional.\\n\\n\\"RCOI confirmed as per RMI\\" may be an acceptable answer to this question.","15. Indicates whether the smelter solely obtains inputs for its smelting process(es) from recycled or scrap sources. This question is optional. Permissible responses to this question are:\\n\\n- Yes\\n- No\\n- Unknown","16. Comments – free form text field to enter any comments concerning the smelter. Example: smelter is being acquired by Company YYY","The Checker worksheet is used to verify if all the required information in the Template has been completed. It is updated real-time and can be reviewed at any time while using the Template. It is used to verify completion.\\n\\nTo use this sheet, verify if all required fields have been completed (completed fields will be highlighted in green). If not, look for the red field(s) and review the \\"Notes\\" in Column C for required actions. You may use the URL in Column D to directly access the field for completion.","TERMS AND CONDITIONS","The Responsible Minerals Assurance Process (“Process”) Conformant Smelter List (the \\"List\\") and Process templates and tools, including, without limitation, the Conflict Minerals Reporting Template (collectively “Tools”), including, without limitation, all information provided therein, are provided for informational purposes only and are current as of the date set forth therein. Any inaccuracy or omission in the List or any Tool is not the responsibility of the Responsible Business Alliance, a Delaware non-stock corporation (\\"RBA\\"). Determination of whether and/or how to use all or any portion of the List or any Tool is to be made in the User’s sole and absolute discretion. Prior to using the List or any Tool, you should review it with your own legal counsel. No part of the List or any Tool constitutes legal advice. Use of the List or any Tool is voluntary.","RBA makes no representations or warranties with respect to the List or any Tool. The List and Tools are provided on an \\"AS IS\\" and on an \\"AS AVAILABLE\\" basis. RBA hereby disclaims all warranties of any nature, express, implied or otherwise, or arising from trade or custom, including, without limitation, any implied warranties of merchantability, non-infringement, quality, title, fitness for a particular purpose, completeness or accuracy.","To the fullest extent permitted by applicable laws, RBA renounces any liability for any losses, expenses or damages of any nature, including, without limitation, special, incidental, punitive, direct, indirect or consequential damages or lost income or profits, resulting from or arising out of the User’s use of the List or any Tool, whether arising in tort, contract, statute, or otherwise, even if shown that they were advised of the possibility of such damages.","In consideration for access and use of the List and/or any Tool, THE USER hereby agrees to and does (a) release and forever discharge RBA, as well as their respective officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, from any and all claims, actions, losses, suits, damages, judgments, levies, and executions, which the User has ever had, has, or ever can, shall, or may have or claim to have against RBA, as well as their respective officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, resulting from or arising out of the List or any Tool or use thereof, and agrees to (b) indemnify, defend and hold harmless RBA, as well as their respective officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, from any and all claims, actions, losses, suits, damages, judgments, levies, and executions resulting from or arising out of the USER'S use of the List or any Tool.","If any part of any provision of these Terms and Conditions shall be invalid or unenforceable under applicable law, said part shall be deemed ineffective to the extent of such invalidity or unenforceability only, without in any way affecting the remaining parts of said provision or the remaining provisions of these Terms and Conditions.","By accessing and using the List or any Tool, and in consideration thereof, the User agrees to the foregoing."],"smelterList":[],"productList":[],"definitions":[{"term":"3TG","definition":"Tantalum, tin, tungsten, gold"},{"term":"Authorizer","definition":"This field identifies the person responsible for the content of the declaration. The authorizer may be a different individual from the contact person. It is not correct to use the words ‘‘same’’ or similar identification to provide the name of the authorizer."},{"term":"Conflict-Affected and High-Risk Area (CAHRA)","definition":"Conflict-affected and high-risk areas are areas in a state of armed conflict, fragile post-conflict areas, as well as areas witnessing weak or non-existing governance and security, such as failed states, and widespread and systematic violations of international law, including human rights abuses."},{"term":"Conflict Mineral","definition":"As defined in 2010 United States legislation, Dodd-Frank Wall Street Reform and Consumer Protection Act, Section 1502(e)(4):\\nCONFLICT MINERAL.—The term ‘‘conflict mineral’’ means—\\n(A) columbite-tantalite (coltan), cassiterite, gold, wolframite, or their derivatives; or\\n(B) any other mineral or its derivatives determined by the Secretary of State to be financing conflict in the Democratic Republic of the Congo or an adjoining country. (available at http://www.sec.gov/about/laws/wallstreetreform-cpa.pdf)"},{"term":"Covered Country(ies)","definition":"Covered Country(ies) as defined by the United States Dodd-Frank Wall Street Reform and Consumer Protection Act of 2010. These countries include the Democratic Republic of the Congo and the nine countries with which it shares an internationally recognized border: Angola, Burundi, Central African Republic, Republic of the Congo, Rwanda, South Sudan, Tanzania, Uganda, Zambia."},{"term":"Declaration Scope or Class","definition":"For the purposes of this template, “scope” describes the applicability of the information provided by the reporting company. The scope may encompass the entirety of a company’s services and/or products, or at a company’s discretion, the template may be used to report on a specific product (or products), or, be ‘User defined’. The ‘User defined’ scope selection or class may be used to describe any subset of a company’s operation or product portfolio."},{"term":"Dodd-Frank","definition":"2010 United States legislation, Dodd-Frank Wall Street Reform and Consumer Protection Act, Section 1502 (“Dodd-Frank”) (http://www.sec.gov/about/laws/wallstreetreform-cpa.pdf)"},{"term":"DRC","definition":"Democratic Republic of Congo"},{"term":"DRC conflict-free","definition":"Products that do not contain minerals that directly or indirectly finance or benefit armed groups in the Democratic Republic of the Congo or an adjoining country. Source: 2010 United States legislation, Dodd-Frank Wall Street Reform and Consumer Protection Act, Section 1502 (http://www.sec.gov/about/laws/wallstreetreform-cpa.pdf)"},{"term":"Gold (Au) refiner (smelter)","definition":"A gold refiner is a metallurgical operation that produces fine gold with a concentration of 99.5% or higher from gold and gold-bearing materials with lower concentrations. Refer to the RMAP assessment standard for this metal for a complete description at: https://www.responsiblemineralsinitiative.org/minerals-due-diligence/standards/."},{"term":"Independent Third-Party Assessment Firm","definition":"With respect to smelter assessments, an “Independent Third-Party Assessment Firm” is a private sector organization competent in evaluating the smelter or refiner’s materials traceability against the standards of the RMAP or equivalent assessment standards. To maintain neutrality and impartiality, such organization and its team members must have no conflicts of interest with the assessment participant."},{"term":"Intentionally added","definition":"Intentionally added refers to a substance used in one or more product life cycle stage(s) intended to give a particular property, reaction or quality.\\n\\nWhile the SEC does not define the phrase “intentionally added” in the final rule*, the rule’s preamble states:\\n“[W]e agree that being intentionally added, rather than being a naturally-occurring by-product, is a significant factor in determining whether a conflict mineral is ‘‘necessary to the functionality or production’’ of a product. This is true regardless of who intentionally added the conflict mineral to the product so long as it is contained in the product. [D]etermining whether a conflict mineral is considered ‘‘necessary’’ to a product should not depend on whether the conflict mineral is added directly to the product by the issuer or whether it is added to a component of the product that the issuer receives from a third party. Instead, the issuer should ‘report on the totality of the product and work with suppliers to comply with the requirements.’ Therefore, in determining whether a conflict mineral is ‘‘necessary’’ to a product, an issuer must consider any conflict mineral contained in its product, even if that conflict mineral is only in the product because it was included as part of a component of the product that was manufactured originally by a third party.”\\n*(56296 Federal Register / Vol. 77, No. 177 / Wednesday, September 12, 2012 / Rules and Regulations)"},{"term":"IPC","definition":"IPC (www.IPC.org) is a global industry association based in Bannockburn, Ill., dedicated to the competitive excellence and financial success of its 3,400 member companies which represent all facets of the electronics industry, including design, printed board manufacturing, electronics assembly and test. As a member-driven organization and leading source for industry standards, training, market research and public policy advocacy, IPC supports programs to meet the needs of an estimated $2.0 trillion global electronics industry. IPC maintains additional offices in Taos, N.M.; Washington, D.C.; Stockholm, Sweden; Moscow, Russia; Bangalore, India; Bangkok, Thailand; and Shanghai, Shenzhen, Chengdu, Suzhou and Beijing, China."},{"term":"IPC-1755 Responsible Sourcing of Minerals Data Exchange Standard","definition":"This IPC standard establishes the requirements for exchanging conflict minerals data between suppliers and their customers. To meet the needs of a broad range of users, this standard provides flexibility in the scope of the products covered within a single declaration. This standard is not a compliance guide."},{"term":"Necessary for the Functionality of a Product","definition":"The SEC does not provide a formal definition of this phrase in the final rule*, however it provides some guidance: A conflict mineral will be considered to be necessary to its functionality of a product if it meets the following: 1) is intentionally added to the product or any component of the product and is not a naturally-occurring byproduct; 2) is necessary to the product’s generally expected function, use or purpose; and 3) is incorporated for the purpose of ornamentation, decoration, or embellishment, whether the primary purpose of the product is ornamentation or decoration.\\n\\nNOTE: The conflict mineral must be contained in the product to be applicable.\\n\\n*(56296 Federal Register / Vol. 77, No. 177 / Wednesday, September 12, 2012 / Rules and Regulations)"},{"term":"Necessary for the Production of a Product","definition":"The SEC does not provide a formal definition of this phrase in the final rule*; however, it provides some guidance: A conflict mineral will be considered to be necessary to the production of a product when: 1) it is intentionally included in the product’s production process, other than if it is included in a tool, machine, or equipment used to produce the product (such as computers or power lines); 2) it is included in the product (MUST be contained in the product to be applicable); and 3) it is necessary to the product.\\n\\n*(56296 Federal Register / Vol. 77, No. 177 / Wednesday, September 12, 2012 / Rules and Regulations)"},{"term":"OECD","definition":"Organisation for Economic Co-operation and Development"},{"term":"Product","definition":"A company’s Product or Finished good is a material or item which has completed the final stage of manufacturing and/or processing and is available for distribution or sale to customers."},{"term":"RBA","definition":"Responsible Business Alliance (www.responsiblebusiness.org)"},{"term":"Recycled or Scrap Sources","definition":"Recycled or scrap sources are recycled metals, that are reclaimed end-user or post-consumer products, or scrap processed metals created during product manufacturing. Recycled metal includes excess, obsolete, defective, and scrap metal materials that contain refined or processed metals that are appropriate to recycle in the production of tin, tantalum, tungsten and/or gold. Minerals partially processed, unprocessed or byproducts from other ores are not included in the definition of recycled metal."},{"term":"Responsible Minerals Assurance Process (RMAP)","definition":"The Responsible Minerals Assurance Process (RMAP) is a process developed by the RBA to enhance company capability to verify the responsible sourcing of metals. Further details of the RMAP can be found here: http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/."},{"term":"Responsible Minerals Initiative","definition":"Founded in 2008 by members of the Responsible Business Alliance, the Responsible Minerals Initiative has grown into one of the most utilized and respected resources for companies addressing conflict minerals issues in their supply chains. Over 360 companies from ten different industries participate in the RMI today, contributing to a range of tools and resources including the Responsible Minerals Assurance Process, the Conflict Minerals Reporting Template, Reasonable Country of Origin Inquiry data and a range of guidance documents on conflict minerals sourcing. The RMI also runs regular workshops on conflict minerals issues and contributes to policy development and debates with leading civil society organizations and governments. Additional information is available at http://www.responsiblemineralsinitiative.org."},{"term":"RMAP Conformant Smelter List","definition":"The Responsible Minerals Assurance Process (RMAP) Conformant Smelter List is a published list of smelters and refiners that have undergone assessment through the RMAP, a program of the Responsible Minerals Initiative (RMI) or industry equivalent program (such as Responsible Jewellery Council or London Bullion Market Association) and have been validated to be in conformance with the standards. If a smelter or refiner is not on the list, it has either not completed a RMAP assessment or is not in conformance with the RMAP standard. \\n\\nA list of smelters and refiners which have been validated to be conformant to the RMAP can be found at https://www.responsiblemineralsinitiative.org/facilities-lists/active-conformant-facilities-list/."},{"term":"SEC","definition":"U.S. Securities and Exchange Commission (www.sec.gov)"},{"term":"Smelter","definition":"A smelter or refiner is a company that procures and processes mineral ore, slag and/or materials from recycled or scrap sources into refined metal or metal containing intermediate products. The output can be pure (99.5% or greater) metals, powders, ingots, bars, grains, oxides or salts. The terms “smelter” and “refiner” are used interchangeably throughout various publications."},{"term":"Smelter Identification Number","definition":"A unique identification number the RMI assigns to companies that have been reported by members of the supply chain as smelters or refiners, whether or not they have been verified to meet the characteristics of smelters or refiners as defined in the RMAP assessment standards."},{"term":"Tantalum (Ta) smelter","definition":"A tantalum smelter (also known as a processor) is defined as a company that converts Ta-containing ores, concentrates, slags or secondary materials into tantalum intermediate products or other tantalum containing products for direct sales or further processing into Ta-containing products, such as Ta powders, Ta components, Ta oxides, alloys, wires, sintered bars, etc. Refer to the RMAP assessment standard for this metal for a complete description at: https://www.responsiblemineralsinitiative.org/minerals-due-diligence/standards/."},{"term":"Tin (Sn) smelter","definition":"Primary [tin] smelters are companies with one or more facilities treating tin containing ore concentrates in order to produce tin metal. Secondary [tin] smelters are companies with one or more facilities that treat secondary materials by reduction for the production of crude or higher grade tin or tin product such as solder. A smelter as referred to within this audit protocol may operate as either one or both types of business operation. Refer to the RMAP assessment standard for this metal for a complete description at: https://www.responsiblemineralsinitiative.org/minerals-due-diligence/standards/."},{"term":"Tungsten (W) smelter","definition":"A company with one or more facilities that converts W-containing ores (such as wolframite and scheelite), W concentrates, or W-bearing scrap (secondary material) into tungsten containing intermediates such as Ammonium Para-Tungstate (APT), Ammonium Meta-Tungstate (AMT), ferrotungsten, and tungsten oxides for direct sales or further processed into W-containing products (such as W powder or W-carbide powder). Refer to the RMAP assessment standard for this metal for a complete description at: https://www.responsiblemineralsinitiative.org/minerals-due-diligence/standards/."}],"smelterLookup":["The following list represents the RMI's latest smelter name/alias information as of this templates release.  This list is updated frequently, and the most up-to-date version can be found on the RMI website http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/exports/cmrt-export/.  The presence of a smelter here is NOT a guarantee that it is currently Active or Conformant within the Responsible Minerals Assurance Process.\\n\\nPlease refer to the RMI web site www.responsiblemineralsinitiative.org for the most current and accurate list of standard smelter names that are Active or Conformant. \\n\\nNames included in column B represent company names that are commonly recognized and reported by the supply chain for a particular smelter. These names may include former company names, alternate names, abbreviations, or other variations. Although the names may not be the RMI Standard Smelter Name, the reference names are helpful to identify the smelter, which is listed under column C in the Smelter Look-up.\\n\\nColumn C is the list of the official standard smelter names, in the ASCII character set. The majority of smelters will have the same entry for both columns, however if the common name varies from the standard name, the variation is noted in Column B."]}},"emrt":{"2.1":{"instructions":["RMI:www.responsiblemineralsinitiative.org/","Introduction","This Extended Mineral Reporting Template (EMRT) is a free, standardized reporting template created by the Responsible Minerals Initiative® (RMI®). The Template facilitates the transfer of information through the supply chain regarding mineral country of origin and smelters, refiners and processors being utilized and supports the exercise of due diligence in accordance with the OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-Affected and High-Risk Areas. The template also facilitates the identification of new smelters and refiners to potentially undergo an audit via the Responsible Minerals Assurance Process.\\n\\nThe EMRT was designed for downstream companies to disclose information about their supply chains up to but not including the smelter. If you are a smelter or refiner, we recommend you enter your own name in the smelter list tab.\\n\\nWhen filling out the form, none of the cell entries should start with \\"=\\" or \\"#.\\"","Instructions for completing Company Information questions (rows 7 - 26).\\nProvide comments in ENGLISH only","Note: Entries with (*) are mandatory fields.","1. Insert your company's Legal Name. Please do not use abbreviations. In this field you have the option to add other commercial names, DBAs, etc. This field is mandatory.","2. Select your company's Declaration Scope. The options for scope are:\\n\\nA. Company-wide\\nB. Product (or List of Products)\\nC. User-Defined \\n\\nFor \\"Company-wide\\", the declaration encompasses the entirety of a company's products or product substances produced by the parent company. Therefore if the user is reporting specified mineral data at the company level, they will be reporting data on all products they manufacture. \\n\\nFor Scope selection of Product (or List of Products), a link to the worksheet tab for Product List will be displayed. If this scope is chosen, it is mandatory to list the Responder's Product Number of the products covered under the Scope of this Declaration in Column B of the Product List worksheet. It is optional to list the Responder's Product Name in Column C of the Product List worksheet.\\n\\nFor Scope selection of \\"User Defined\\", it is mandatory that the user describes the scope to which the specified minerals disclosure is applicable. The scope of this class shall be defined in a text field by the supplier and should be easily understood by customers or the receivers of the document. As an example, companies may provide a link to clarifying information.\\n\\nThis field is mandatory.","3. The requesting company is required to select all minerals that are in scope of the declaration. These fields are pre-populated with the six EMRT minerals. To remove a mineral from the declaration, the user selects \\"Delete [Mineral]\\". Minerals are automatically populated in alphabetical order for Questions 1-7 and C.\\n\\nThis field is mandatory.","4. Insert your company’s unique identifier number or code (DUNS number, VAT number, customer-specific identifier, etc.)","5. Insert the source for the unique identifier number or code (\\"DUNS\\", \\"VAT\\", \\"Customer\\", etc).","6. Insert your full company address (street, city, state, country, postal code). This field is optional.","7. Insert the name of the person to contact regarding the contents of the declaration information. This field is mandatory.","8. Insert the email address of the contact person. If an email address is not available, state \\"not available\\" or \\"n/a\\". A blank field may cause an error in form implementation. This field is mandatory.","9. Insert the telephone number for the contact. This field is mandatory.","10. Insert the name of the person who is responsible for the contents of the declaration information. The authorizer may be a different individual than the contact person. It is not correct to use the words ‘‘same’’ or similar identification to provide the name of the authorizer. This field is mandatory.","11. Insert the title for the Authorizing person. This field is optional.","12. Insert the email address of the Authorizing person. If an email address is not available, state ‘‘not available’’ or ‘‘n/a.’’ A blank field may cause an error in form implementation. This field is mandatory.","13. Insert the telephone number for the Authorizing person. This field is optional.","14. Please enter the Date of Completion for this form using the format DD-MMM-YYYY. This field is mandatory.","15. As an example, the user may save the file name as: companyname-date.xlsx (date as YYYY-MM-DD).","Instructions for completing the seven Declaration of Scope Questions (rows 28 - 107).\\nProvide answers in ENGLISH only","These seven questions define the usage, origination and sourcing identification for each of the specified minerals. The questions are designed to collect information about the use of the specified mineral in the company’s product(s) and the completeness of reporting. Responses to these questions shall represent the ‘Declaration Scope’ selected in the company information section.","Provide comments in the Comment sections as required to clarify your responses.","Provide an answer using the pull down menu selections. If the response for the specified mineral to question 1 and 2 is positive, then all questions shall be completed for that mineral and the following due diligence questions (A to G) shall be completed about the company’s overall due diligence program.","1. This question is used to determine whether the specified mineral is within the scope of the reporting requirement. The response to this question serves to exclude any trace-level contaminants or naturally-occurring by-products.\\n\\nThis question asks if any of the specified mineral is used as raw material, component or additive in a product that you manufacture, including compounds. Impurities from raw materials, components, additives, abrasives, and cutting tools are outside the scope of the survey.\\n\\nThe answer to this question shall be either \\"yes\\" \\"no\\" \\"unknown\\" or \\"not declaring\\". This question is mandatory.","Some companies may require substantiation for a \\"No\\" answer that should be entered into the Comment Field.","2. This question shall be answered for the specified minerals for which the answer to question 1 is \\"yes.\\" This is the second of two questions for which the response is used to determine whether the specified mineral is within the scope of this reporting template. This question is dependent upon the question and response to Question 1. This question is intended to identify the specified mineral which is intentionally added or included in the manufacturing process of a product where some amount of the specified mineral remains in the finished product. This includes any specified mineral which may not have been intended to become part of the final product and may not be necessary to the functionality of the product but are only present as residuals of the manufacturing process. In many cases, the manufacturer may have attempted to remove or facilitate consumption of the specified mineral during the manufacturing process, however, some amount of the specified mineral remains. Should the specified mineral, which is added or included during the manufacturing process, be completely removed such that none of the specified mineral remains upon the completion of that process, the response to this question would be no.\\n\\nThis question shall be answered for the specified minerals. Valid answers to this question are either \\"yes\\", \\"no\\", or \\"unknown\\". This question is mandatory.","3. This is a declaration that any portion of the specified mineral contained in a product or multiple products originates from a conflict-affected and high-risk area (CAHRA). The answer to this question should be \\"yes\\" if any smelter in the supply chain sources from CAHRAs, regardless of whether such a smelter has been independently audited or not.\\n\\nThe answers to this question for the specified mineral shall be \\"yes,\\" \\"no,\\" or \\"unknown,\\". Substantiate a \\"Yes\\" answer in the comments section. An answer of \\"unknown\\" is an acceptable response. This question is mandatory for the specified mineral if the response to Question 1 and 2 is \\"Yes.\\"","4. This is a declaration that identifies whether the specified mineral contained in the product(s) originate exclusively from recycled or scrap sources. \\n\\nThe answer to this question shall be \\"yes\\", \\"no\\", or \\"unknown\\".\\n\\nA \\"Yes\\" answer means that 100% of the specified mineral comes from recycled or scrap sources. A \\"No\\" answer means that some of the raw material does not come from recycled or scrap sources. An \\"Unknown\\" answer means that the user does not know whether or not 100% of the raw material comes from recycled or scrap sources. This question is mandatory for the specified mineral if the response to Question 1 and 2 is \\"Yes.\\"","5. This is a question to determine whether a company has received disclosures from all direct suppliers reasonably believed to be providing the specified mineral contained in the products covered by the scope of this declaration. Permissible responses to this question are:\\n\\n­ 100%\\n­ Greater than 90%\\n­ Greater than 75%\\n- Greater than 50%\\n- 50% or less\\n- None\\n- Did not survey\\n\\nThis question is mandatory for the specified mineral if the response to Question 1 and 2 is \\"Yes.\\"","6. This question verifies if the supplier has reason to believe they have identified all of the smelters providing the specified mineral in the products covered by this declaration. The answer to this question shall be \\"Yes\\" \\"No\\" or \\"unknown\\", along with a comment in certain cases, e.g. list of smelters. This question is mandatory for the specified mineral if the response to Question 1 and 2 is \\"Yes.\\"","7. This question verifies that all of the smelters or processors identified to be providing any of the raw materials contained in the products covered by the scope of this declaration have been reported in this declaration. The answer to this question shall be \\"yes,\\" \\"no,\\" or \\"unknown\\" along with a comment in certain cases e.g. list of smelters. This question is mandatory for the specified mineral if the response to Question 1 and 2 is \\"Yes.\\"","Instructions for completing Questions A. – G. (rows 113 - 137). Questions A through G are mandatory if the response to Question 1 and Question 2 is \\"Yes\\" for the specified mineral.\\nProvide answers in ENGLISH only.","The OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-affected and High-risk Areas (OECD Guidance) defines “Due Diligence” as “an on-going, proactive and reactive process through which companies can ensure that they respect human rights and do not contribute to conflict”. More information is available at http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/.\\n\\nQuestions A. through G are designed to assess your company’s responsible minerals sourcing due diligence activities. Responses to these questions shall represent the full scope of your company’s activities and shall not be limited to the ‘Declaration Scope’ selected in the company information section.","A. This is a declaration to disclose whether a company has a responsible minerals sourcing policy. The answer to this question shall be \\"yes\\" or \\"no\\". This field is mandatory.","B. This is a declaration to disclose whether a company's responsible minerals sourcing policy is available on the company website. The answer to this question shall be \\"yes\\" or \\"no.\\" If \\"yes,\\" add the URL in the comments field. This field is mandatory.","C. This is a declaration to determine whether a company requires their direct suppliers to source the specified minerals from independently validated smelters and processors. The answer to this question shall be \\"yes,\\" \\"yes, when more processors are validated,\\" or \\"no.\\" Comments should be captured in a question comment field. This field is mandatory.","D. This is a question to disclose whether a company has implemented responsible minerals sourcing due diligence measures. This question is not intended to provide details of a company's due diligence measures. The aspects of acceptable due diligence measures shall be determined by the requestor and supplier.\\n\\nThe answer to this question shall be \\"yes\\" or \\"no.\\" If \\"yes,\\" the user shall describe the due diligence measures implemented in the question comment field (e.g. OECD Due Diligence Framework).","E. This is a question to disclose whether a company requests their supplier to fill out an extended mineral reporting template. Acceptable answers are listed below, in certain cases further explanation may be required, i.e., to provide the format used for collecting information. If the answer is \\"Yes, using other format\\" the user shall provide a comment in a question comment field. Permissible responses to this question are:\\n\\n- Yes, in conformance with IPC-1755 (e.g. EMRT)\\n- Yes, using other format (describe)\\n- No\\n\\nThis field is mandatory.","F. Please answer “Yes” or “No”. In the comments section, you can provide additional information on your approach. Examples could be:\\n\\n “3rd party audit” - on-site audits of your suppliers conducted by independent third parties. \\n “Documentation review only” - a review of supplier submitted records and documentation conducted by independent third parties and, or your company personnel. \\n “Internal audit” - on-site audits of your suppliers conducted by your company personnel.\\n\\nThis field is mandatory.","G. This is a question to disclose whether a company’s review process includes corrective action management. The answer to this question shall be \\"yes\\" or \\"no.\\" Comments shall be captured in a question comment field. This field is mandatory.","Instructions for completing the Smelter List Tab.\\nProvide answers in ENGLISH only\\n\\nNote: Columns with (*) are mandatory fields","This template allows for the identification of smelters, refiners, or processors using the Smelter Look-up. Columns B, and C must be completed in order from left to right to utilize the Smelter Look-up feature.\\nUse a separate line for each metal/smelter/country combination.","1. Smelter Identification Input Column - If you know the Smelter Identification Number, input the number in Column A (columns B, C, D, E, F, G, I, and J will auto-populate). Column A does not autopopulate","2. Metal (*) - Use the pull down menu to select the metal for which you are entering smelter information. Metals appear only if Declaration Questions 1 and 2 are answered \\"Yes\\" for those metals. This field is mandatory.","3. Smelter Look-up (*) - Select from dropdown. This is the list of known smelters as of template release date. If smelter is not listed select 'Smelter Not Listed'. This will allow you to enter the name of the smelter in Column D. If you do not know the name or location of the smelter, select 'Smelter Not Yet Identified.' For this option, columns D and E will autopopulate to say, 'unknown.' This field is mandatory.","4. Smelter Name (1) - Fill in smelter name if you selected \\"Smelter Not Listed\\" in column C. This field will auto-populate when a smelter name in selected in Column C. This field is mandatory.","5. Smelter Country (*) – This field will auto-populate when a smelter name is selected in column C. If you selected \\"Smelter Not Listed\\" in column C, use the pull down menu to select the country location of the smelter. This field is mandatory.","6. Smelter Identification - This is a unique identifier assigned to a smelter or refiner according to an established smelter and refinery identification system. It is expected that multiple names or aliases could be used to describe a single smelter or refiner and therefore multiple names or aliases could be associated to a single ‘Smelter ID’.","7. Source of Smelter Identification Number - This is the source of the Smelter Identification Number entered in Column F. If a smelter name was selected in Column C using the dropdown box, this field will auto-populate.","8. Smelter Street - Provide the street name on which the smelter is located. This field is optional.","9. Smelter City – Provide the city name of where the smelter is located. This field is optional.","10. Smelter Location: State/Province, if applicable – Provide the state or province where the smelter is located. This field is optional.","11. Smelter Contact Name – The Extended Mineral Reporting Template (EMRT) is circulated among companies in the requesting company's supply chain to exercise due diligence in accordance with the OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-Affected and High-Risk.\\n\\nIf the template is circulated in a country where laws protecting personal information exist, sharing personal contact information in the EMRT may violate related regulations. Therefore, it is recommended that the requesting company take precautions such as obtaining the contact person's permission to share the information with other companies in the supply chain when completing \\"Smelter Contact Name\\" and the \\"Smelter Contact Email\\" columns.\\n\\nIf you have permission to share this information, please fill in the name of the Smelter Facility Contact person who you worked with.","12. Smelter Contact Email – Fill in the email address of the Smelter Facility contact person who was identified as the Smelter Contact Name. Example: John.Smith@SmelterXXX.com. Please review the instructions for Smelter Contact Name before completing this field.","13. Name of Mine(s) - This field allows a company to define the actual mines being used by the smelter. Please enter the actual mine names if known. If 100% of the smelter’s feedstock originates from recycled or scrap sources, enter \\"Recycled\\" or \\"Scrap\\" in place of the name of the mine and answer \\"Yes\\" in Column P.","14. Location (Country) of Mine(s) - This is a free form text field that allows a company to define the location of the mines being used by the smelter. Please enter the country of the mine(s). If the country of origin is not known, enter \\"Unknown\\". If 100% of the smelter’s feedstock originates from recycled or scrap sources, enter \\"Recycled\\" or \\"Scrap\\" in place of the country of origin. This field is optional.","15. Indicates whether the smelter solely obtains inputs for its smelting process(es) from recycled or scrap sources. This question is optional. Permissible responses to this question are:\\n\\n- Yes\\n- No\\n- Unknown","16. Comments – free form text field to enter any comments concerning the smelter. Example: smelter is being acquired by Company YYY","Instructions for completing the Mine List Tab.\\nProvide answers in ENGLISH only","1. Metal - Use the pull down menu to select the metal for which you are entering mine facility information. Metals appear only if Declaration Questions 1 and 2 are answered \\"Yes\\" for those metals.","2. Name of Smelter(s) sourcing from this Mine Facility - When possible, fill in the name of the smelter(s) that is sourcing from the listed mine facility.","3. Mine Facility (Site) Name - Fill in the mine facility name as you know it.","4. Mine Identification - This is a unique identifier assigned to a mine facility according to an established mine facility identification system. It is expected that multiple names or aliases could be used to describe a single mine facility and therefore multiple names or aliases could be associated to a single ‘Facility ID’.","5. Source of Mine Identification Number - This is the source of the Mine Identification Number entered in Column D.","6. Mine Facility (Site) Country - Select from dropdown, the country where the mine facility is located.","7. Mine Facility Street - Provide the street name on which the mine is located. This field is optional.","8. Mine Facility City – Provide the city name of where the mine facility is located.","9. Mine Facility Location: State/Province, if applicable – Provide the state or province where the mine facility is located.","10. Mine Facility Contact Name – If the template is circulated in a country where laws protecting personal information exist, sharing personal contact information in the AMRT may violate related regulations. Therefore, it is recommended that the requesting company take precautions such as obtaining the contact person's permission to share the information with other companies in the supply chain when completing \\"Mine Facility Contact Name\\" and the \\"Mine Facility Contact Email\\" columns.\\n\\nIf you have permission to share this information, please fill in the name of the Mine Facility Contact person who you worked with.","11. Mine Facility Contact Email – Fill in the email address of the Mine Facility contact person who was identified as the Mine Facility Contact Name. Example: John.Smith@MineXXX.com. Please review the instructions for Mine Facility Contact Name before completing this field.","12. Proposed next steps - This is a comments area, which allows the company to specify the next steps to manage mine facilities. These are the actions you may take with the mine if the facility is not listed on the Responsible Minerals Initiative (RMI) Conformant Facility List. Example: request mine facility to undergo an RMI assessment, remove from preferred supplier list, etc.","13. Comments – free form text field to enter any comments concerning the mine facility. Example: mine is being acquired by Company YYY","The Checker worksheet is used to verify if all the required information in the Template has been completed. It is updated real-time and can be reviewed at any time while using the Template. It is used to verify completion.\\n\\nTo use this sheet, verify if all required fields have been completed (completed fields will be highlighted in green). If not, look for the red field(s) and review the \\"Notes\\" in Column C for required actions. You may use the URL in Column D to directly access the field for completion.","TERMS AND CONDITIONS","The Responsible Minerals Initiative Smelter List (the \\"List\\") and Program templates and tools, including, without limitation, the Extended Mineral Reporting Template (collectively “Tools”), including, without limitation, all information provided therein, are provided for informational purposes only and are current as of the date set forth therein. Any inaccuracy or omission in the List or any Tool is not the responsibility of the Responsible Business Alliance, Incorporated, a Delaware non-stock corporation (\\"RBA\\"). Determination of whether and/or how to use all or any portion of the List or any Tool is to be made in the User’s sole and absolute discretion. Prior to using the List or any Tool, you should review it with your own legal counsel. No part of the List or any Tool constitutes legal advice. Use of the List or any Tool is voluntary.","RBA does not make any representations or warranties with respect to the List or any Tool. The List and Tools are provided on an \\"AS IS\\" and on an \\"AS AVAILABLE\\" basis. RBA hereby disclaim all warranties of any nature, express, implied or otherwise, or arising from trade or custom, including, without limitation, any implied warranties of merchantability, non-infringement, quality, title, fitness for a particular purpose, completeness or accuracy.","To the fullest extent permitted by applicable laws, RBA renounces any liability for any losses, expenses or damages of any nature, including, without limitation, special, incidental, punitive, direct, indirect or consequential damages or lost income or profits, resulting from or arising out of the User’s use of the List or any Tool, whether arising in tort, contract, statute, or otherwise, even if shown that they were advised of the possibility of such damages.","In consideration for access and use of the List and/or any Tool, THE USER hereby agrees to and does (a) release and forever discharge RBA as well as its officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, from any and all claims, actions, losses, suits, damages, judgments, levies, and executions, which the User has ever had, has, or ever can, shall, or may have or claim to have against RBA , as well as its officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, resulting from or arising out of the List or any Tool or use thereof, and agrees to (b) indemnify, defend and hold harmless RBA, as well as its officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, from any and all claims, actions, losses, suits, damages, judgments, levies, and executions resulting from or arising out of the USER'S use of the List or any Tool.","If any part of any provision of these Terms and Conditions shall be invalid or unenforceable under applicable law, said part shall be deemed ineffective to the extent of such invalidity or unenforceability only, without in any way affecting the remaining parts of said provision or the remaining provisions of these Terms and Conditions.","By accessing and using the List or any Tool, and in consideration thereof, the User agrees to the foregoing."],"smelterList":[],"productList":[],"definitions":[{"term":"Authorizer","definition":"This field identifies the person responsible for the content of the declaration. The authorizer may be a different individual from the contact person. It is not correct to use the words ‘‘same’’ or similar identification to provide the name of the authorizer."},{"term":"Cobalt Refiner","definition":"An entity that processes cobalt concentrates, intermediates or recycled feed and produces a cobalt product for direct use in a downstream manufacturing process."},{"term":"Conflict-Affected and High-Risk Areas (CAHRA)","definition":"Conflict-Affected and High-Risk Areas (CAHRA) are defined by the OECD Due Diligence Guidance as \\"areas identified by the presence of armed conflict, widespread violence or other risks of harm to people. Armed conflict may take a variety of forms, such as a conflict of international or non-international character, which may involve two or more states, or may consist of wars of liberation, or insurgencies, civil wars, etc. High-risk areas may include areas of political instability or repression, institutional weakness, insecurity, collapse of civil infrastructure and widespread violence. Such areas are often characterised by widespread human right abuses and violations of national or international law.\\""},{"term":"Copper Processor*","definition":"A copper processor is a facility engaged in the transformation of copper-bearing materials into intermediate or final copper products through metallurgical, chemical, or electrochemical processes. Copper processors may operate integrated facilities or specialize in one or more stages of the copper value chain, including alloying, casting, or further fabrication."},{"term":"Declaration of Scope or Class","definition":"For the purposes of this template, “scope” describes the applicability of the information provided by the reporting company. The scope may encompass the entirety of a company’s services and/or products, or at a company’s discretion, the template may be used to report on a specific product (or products), or, be ‘User defined’. The ‘User defined’ scope selection or class may be used to describe any subset of a company’s operation or product portfolio"},{"term":"Due Diligence","definition":"The OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-affected and High-risk Areas (OECD Guidance) defines “Due Diligence” as “an on-going, proactive and reactive process through which companies can ensure that they respect human rights and do not contribute to conflict”. More information is available at http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/."},{"term":"Graphite (Natural)*","definition":"Natural Graphite is a naturally occurring form of crystalline carbon, found in graphite-bearing ores: flake graphite; amorphous and vein graphite. A natural graphite project or operations (Upstream actor) refers to an active industrial undertaking focused on the extraction of graphite ore and its subsequent beneficiation into graphite concentrate."},{"term":"Graphite Processor*","definition":"A spherical graphite producer (Pinch Point) is a facility that manufactures high-purity, fine-particle graphite products—either coated or uncoated—by processing natural or synthetic graphite concentrate into spherical graphite (also known as spheroidized graphite), primarily for use in lithium-ion battery anodes."},{"term":"Independent Third-Party Audit Firm","definition":"With respect to smelter audits, an “Independent Third-Party Audit Firm” is a private sector organization competent in evaluating the smelter or refiner’s due diligence system against a defined standard. To maintain neutrality and impartiality, such organization and its audit team members must have no conflicts of interest with the auditee."},{"term":"Intentionally added","definition":"Intentionally added refers to a substance used in one or more product life cycle stage(s) intended to give a particular property, reaction or quality."},{"term":"Lithium Processor*","definition":"A lithium processor is a facility that converts lithium-bearing materials into lithium compounds, lithium metal, or intermediates through chemical, thermal, or electrochemical processes. Processed outputs may include lithium carbonate, lithium hydroxide, lithium chloride, lithium sulfate, lithium oxide, lithium metal, or other lithium-containing intermediates used in downstream applications such as batteries, ceramics, glass, lubricants, and pharmaceuticals."},{"term":"OECD","definition":"Organisation for Economic Co-operation and Development. The OECD has developed the OECD Due Diligence Guidance for Responsible Supply Chains. The OECD Due Diligence Guidance provides detailed recommendations to help companies respect human rights and avoid contributing to conflict through their mineral purchasing decisions and practices and uses a reasonableness approach. This Guidance is for use by any company potentially sourcing minerals or metals from conflict-affected and high-risk areas. The OECD Guidance is global in scope, and applies to all mineral supply chains. (http://mneguidelines.oecd.org/mining.htm)"},{"term":"Mica (Natural)","definition":"Natural mica is a mineral that is mined or naturally occurring, such as muscovite and phlogopite."},{"term":"Mica (Synthetic)","definition":"Synthetic mica (fluorophlogopite) is a man-made material composed of such materials as magnesium, aluminum and silicon."},{"term":"Mica Processor","definition":"A mica processor is an entity that takes raw mined minerals such as pegmatites (schist), feldspar, kaolin, muscovite or phlogopite and subjects them to various physical or mechanical methods to separate non-mica components from mica components, then produce grades of mica products for use in downstream manufacturing processes. Raw mineral processing can include sorting, separation, milling, grinding, cutting, stamping and binding."},{"term":"Nickel Processor*","definition":"A nickel processor is a facility that transforms nickel-bearing materials into nickel metal, nickel alloys, or intermediates through pyrometallurgical, hydrometallurgical, or electrochemical processes. Processed products may include ferronickel, nickel pig iron (NPI), nickel matte, mixed hydroxide precipitate (MHP), mixed sulfide precipitate (MSP), nickel sulfate, or refined nickel metal."},{"term":"Processor","definition":"A facility that performs process or processes to remove all undesirable and separate the desired elements of primary materials by concentration or purification. This includes, but is not limited to: cleaning, separation, concentrating (e.g. separate valuable minerals from unwanted gangue by mechanical, thermal or chemical means), roasting (e.g. smelting, roasting, or other means to drive off impurities), cathode and anode production and other refining processes. The terms \\"smelter\\", \\"refiner\\", and \\"processor\\" are used interchangeably throughout various publications."},{"term":"Product","definition":"A company’s Product or Finished good is a material or item which has completed the final stage of manufacturing and/or processing and is available for distribution or sale to customers."},{"term":"Recycled or Scrap Sources","definition":"Recycled metals are reclaimed end-user or post-consumer products, or scrap processed metals created during product manufacturing. Recycled metal includes excess, obsolete, defective, and scrap metal materials which contain refined or processed metals that are appropriate to recycle in the production of the in scope metals. Minerals partially processed, unprocessed or a bi-product from another ore are not recycled metals.\\n\\nNote: As of the date of this publication, there is no significant post-consumer recycling of mica."},{"term":"Responsible Business Alliance (RBA)","definition":"Founded in 2004 the Responsible Business Alliance is the world’s largest industry coalition dedicated to electronics supply chain responsibility. (http://www.responsiblebusiness.org)"},{"term":"Responsible Minerals Assurance Process (RMAP)","definition":"The Responsible Minerals Assurance Process (RMAP) is a process developed by the RBA to enhance company capability to verify the responsible sourcing of metals. Further details of the RMAP can be found here: http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/."},{"term":"Responsible Minerals Initiative (RMI)","definition":"Founded in 2008 by members of the Responsible Business Alliance and the Global e-Sustainability Initiative, the Responsible Minerals Initiative has grown into one of the most utilized and respected resources for companies addressing conflict minerals issues in their supply chains. Over 150 companies from seven different industries participate in the RMI today, contributing to a range of tools and resources including the Responsible Minerals Assurance Process, the Conflict Minerals Reporting Template, Reasonable Country of Origin Inquiry data and a range of guidance documents on conflict minerals sourcing. The RMI also runs regular workshops on conflict minerals issues and contributes to policy development and debates with leading civil society organizations and governments. Additional information is available at http://www.responsiblemineralsinitiative.org/."},{"term":"RMAP Conformant Smelter List","definition":"The Responsible Minerals Assurance Process (RMAP) Conformant Smelter List is a published list of smelters and refiners that have undergone assessment through the RMAP, a program of the Responsible Minerals Initiative (RMI) or industry equivalent program (such as Responsible Jewellery Council or London Bullion Market Association) and have been validated to be in conformance with the protocols. If a smelter or refiner is not on the list, it has either not completed a RMAP assessment or is not in conformance with the RMAP protocol. \\n\\nA list of smelters and refiners which have been validated to be conformant to the RMAP can be found at www.responsiblemineralsinitiative.org"},{"term":"Smelter","definition":"A smelter or refiner is a company that procures and processes mineral ore, slag and/or materials from recycled or scrap sources into refined metal or metal containing intermediate products. The output can be pure (99.5% or greater) metals, powders, ingots, bars, grains, oxides or salts. The terms \\"smelter\\", \\"refiner\\", and \\"processor\\" are used interchangeably throughout various publications."},{"term":"Smelter Identification Number","definition":"A unique identification number the RMI assigns to companies that have been reported by members of the supply chain as smelters or refiners, whether or not they have been verified to meet the characteristics of smelters or refiners as defined in the RMAP audit protocols or other applicable audit programs."}],"mineList":[],"smelterLookup":["The following list represents the RMI's latest smelter name/alias information as of this templates release.  This list is updated frequently, and the most up-to-date version can be found on the RMI website http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/exports/cmt-export/.  The presence of a smelter here is NOT a guarantee that it is currently Active or Conformant within an independent third party audit program.\\n\\nPlease refer to the RMI web site www.responsiblemineralsinitiative.org for the most current and accurate list of standard smelter names that are Active or Conformant. \\n\\nNames included in column B represent company names that are commonly recognized and reported by the supply chain for a particular smelter. These names may include former company names, alternate names, abbreviations, or other variations. Although the names may not be the Standard Smelter Name, the reference names are helpful to identify the smelter, which is listed under column C in the Smelter Look-up.\\n\\nColumn C is the list of the official standard smelter names, in the ASCII character set. The majority of smelters will have the same entry for both columns, however if the common name varies from the standard name, the variation is noted in Column B."]}},"crt":{"2.21":{"instructions":["RMI:www.responsiblemineralsinitiative.org/","Introduction","This Cobalt Reporting Template (CRT) is a free, standardized reporting template created by the Responsible Minerals Initiative® (RMI®). The Template facilitates the transfer of information through the supply chain regarding mineral country of origin and smelters and refiners being utilized and supports the exercise of due diligence in accordance with the OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-Affected and High-Risk Areas. The template also facilitates the identification of new smelters and refiners to potentially undergo an audit via the Responsible Minerals Assurance Process.\\n\\nThe CRT was designed for downstream companies to disclose information about their supply chains up to but not including the smelter. If you are a smelter or refiner, we recommend you enter your own name in the smelter list tab.\\n\\nWhen filling out the form, none of the cell entries should start with \\"=\\" or \\"#.\\"","Instructions for completing Company Information questions (rows 8 - 22).\\nProvide comments in ENGLISH only","Note: Entries with (*) are mandatory fields.","1. Insert your company's Legal Name. Please do not use abbreviations. In this field you have the option to add other commercial names, DBAs, etc. This field is mandatory.","2. Select your company's Declaration Scope. The options for scope are:\\n\\nA. Company-wide\\nB. Product (or List of Products)\\nC. User-Defined \\n\\nFor \\"Company-wide\\", the declaration encompasses the entirety of a company's products or product substances produced by the parent company. Therefore if the user is reporting cobalt data at the company level, they will be reporting data on all products they manufacture. \\n\\nFor Scope selection of Product (or List of Products), a link to the worksheet tab for Product List will be displayed. If this scope is chosen, it is mandatory to list the Manufacturer's Product Number of the products covered under the Scope of this Declaration in Column B of the Product List worksheet. It is optional to list the Manufacturer's Product Name in Column C of the Product List worksheet.\\n\\nFor Scope selection of \\"User Defined\\", it is mandatory that the user describes the scope to which the cobalt disclosure is applicable. The scope of this class shall be defined in a text field by the supplier and should be easily understood by customers or the receivers of the document. As an example, companies may provide a link to clarifying information.\\n\\nThis field is mandatory.","3. Insert your company’s unique identifier number or code (DUNS number, VAT number, customer-specific identifier, etc.)","4. Insert the source for the unique identifier number or code (\\"DUNS\\", \\"VAT\\", \\"Customer\\", etc).","5. Insert your full company address (street, city, state, country, postal code). This field is optional.","6. Insert the name of the person to contact regarding the contents of the declaration information. This field is mandatory.","7. Insert the email address of the contact person. If an email address is not available, state \\"not available\\" or \\"n/A\\". A blank field may cause an error in form implementation. This field is mandatory.","8. Insert the telephone number for the contact. This field is mandatory.","9. Insert the name of the person who is responsible for the contents of the declaration information. The authorizer may be a different individual than the contact person. It is not correct to use the words ‘‘same’’ or similar identification to provide the name of the authorizer. This field is mandatory.","10. Insert the title for the Authorizing person. This field is optional.","11. Insert the email address of the Authorizing person. If an email address is not available, state ‘‘not available’’ or ‘‘n/a.’’ A blank field may cause an error in form implementation. This field is mandatory.","12. Insert the telephone number for the Authorizing person. This field is optional.","13. Please enter the Date of Completion for this form using the format DD-MMM-YYYY. This field is mandatory.","14. As an example, the user may save the file name as: companyname-date.xlsx (date as YYYY-MM-DD).","Instructions for completing the six Declaration of Scope Questions (rows 24 - 56).\\nProvide answers in ENGLISH only","These six questions define the usage, origination and sourcing identification for cobalt. The questions are designed to collect information about the use of cobalt in the company’s product(s) and the completeness of reporting. Responses to these questions shall represent the ‘Declaration Scope’ selected in the company information section.","Provide comments in the Comment sections as required to clarify your responses.","Provide an answer using the pull down menu selections. If the response for cobalt to question 1 is positive, then all questions shall be completed for cobalt and the following due diligence questions (A to I) shall be completed about the company’s overall due diligence program.","1. This question is used to determine whether cobalt is within the scope of the reporting requirement. The response to this question serves to exclude any trace-level contaminants or naturally-occurring by-products.\\n\\nThis question asks if any cobalt is used as raw material, component or additive in a product that you manufacture, including compounds. Impurities from raw materials, components, additives, abrasives, and cutting tools are outside the scope of the survey.\\n\\nThe answer to this question shall be either \\"yes\\" \\"no\\" or \\"unknown.\\"","Some companies may require substantiation for a \\"No\\" answer that should be entered into the Comment Field.","2. This is a declaration that any portion of the cobalt contained in a product or multiple products originates from a conflict-affected and high-risk area (CAHRA). The answer to this question should be \\"yes\\" if any smelter in the supply chain sources from a CAHRA, regardless of whether such a smelter has been independently audited or not.\\n\\nThe answers to this question shall be \\"yes,\\" \\"no,\\" \\"unknown,\\" or \\"DRC or adjoining countries only.\\" Substantiate a \\"Yes\\" answer in the comments section. An answer of \\"unknown\\" is an acceptable response. This question is mandatory for cobalt if the response to Question 1 is \\"Yes.\\"","3. This is a declaration that identifies whether cobalt contained in the product(s) originate exclusively from recycled or scrap sources. \\n\\nThe answer to this question shall be \\"yes\\", \\"no\\", or \\"unknown\\".\\n\\nA \\"Yes\\" answer means that 100% of the cobalt comes from recycled or scrap sources. A \\"No\\" answer means that some of the raw material does not come from recycled or scrap sources. An \\"Unknown\\" answer means that the user does not know whether or not 100% of the raw material comes from recycled or scrap sources. This field is mandatory.","4. This is a question to determine whether a company has received disclosures from all direct suppliers reasonably believed to be providing cobalt contained in the products covered by the scope of this declaration. Permissible responses to this question are:\\n\\n­ 100%\\n­ Greater than 90%\\n­ Greater than 75%\\n- Greater than 50%\\n- 50% or less\\n- None\\n\\nThis field is mandatory.","5. This question verifies if the supplier has reason to believe they have identified all of the smelters providing cobalt in the products covered by this declaration. The answer to this question shall be \\"Yes\\" \\"No\\" or \\"unknown\\", along with a comment in certain cases, e.g. list of smelters. This field is mandatory.","6. This question verifies that all of the smelters identified to be providing any of the cobalt contained in the products covered by the scope of this declaration have been reported in this declaration. The answer to this question shall be \\"yes\\" \\"no\\" or \\"unknown\\" along with a comment in certain cases, e.g. list of smelters. This question is mandatory for cobalt if the response to Question 1 is “Yes” for cobalt.","Instructions for completing Questions A. – I. (rows 63 - 79). Questions A. through I. are mandatory if the response to Question 1 is “Yes” for cobalt.\\nProvide answers in ENGLISH only.","The OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-affected and High-risk Areas (OECD Guidance) defines “Due Diligence” as “an on-going, proactive and reactive process through which companies can ensure that they respect human rights and do not contribute to conflict”. More information is available at http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/.\\n\\nQuestions A. thru I. are designed to assess your company’s cobalt sourcing due diligence activities. Responses to these questions shall represent the full scope of your company’s activities and shall not be limited to the ‘Declaration Scope’ selected in the company information section.","A. This is a declaration to disclose whether a company has a publicly available cobalt sourcing policy. The answer to this question shall be \\"yes\\" or \\"no.\\" If \\"Yes\\" the user shall specify the URL in a question comment field. This field is mandatory.","B. This is a declaration whether the company's cobalt sourcing policy addresses all risks in the OECD Due Diligence Guidance Annex II Model Policy as well as all the worst forms of child labor. The answer to this question shall be \\"yes\\" or \\"no\\". \\n\\nThis field is mandatory.\\n\\n\\"Annex II Risks\\" can be found at http://www.oecd.org/daf/inv/mne/OECD-Due-Diligence-Guidance-Minerals-Edition3.pdf.","C. Please answer \\"yes\\" or \\"no\\" to disclose whether your company has implemented cobalt sourcing due diligence measures. This declaration is not intended to provide the details of a company’s due diligence measures - just that a company has implemented due diligence measures. The aspects of acceptable due diligence measures shall be determined by the requestor and supplier. \\n\\nExamples of due diligence measures may include: communicating and incorporating into contracts (where possible) your expectations to suppliers on responsible cobalt supply chain; identifying and assessing risks in the supply chain; designing and implementing a strategy to respond to identified risks, etc. These due diligence measure examples are consistent with the guidelines included in the internationally recognized OECD Guidance. \\n\\nThis field is mandatory.","D. This is a declaration to determine whether a company requires their direct suppliers to exercise due diligence over the cobalt supply chain in accordance with the OECD Due Diligence Guidance. The answer to this question shall be \\"yes\\" or \\"no.\\" Comments should be captured in a question comment field. This field is mandatory.","E. This is a declaration to determine whether a company requires their direct suppliers to source cobalt from independently validated smelters. The answer to this question shall be \\"yes\\" or \\"no.\\" Comments should be captured in a question comment field. This field is mandatory.","F. This is a declaration to determine whether a company requires smelters in their supply chain to exercise due diligence over the cobalt supply chain in accordance with the OECD Due Diligence Guidance. The answer to this question shall be \\"yes\\" or \\"no.\\" Comments should be captured in a question comment field. This field is mandatory.\\n\\n\\"Annex II Risks\\" can be found at http://www.oecd.org/daf/inv/mne/OECD-Due-Diligence-Guidance-Minerals-Edition3.pdf.","G. This is a question to disclose whether a company requests their supplier to fill out a cobalt reporting template. Acceptable answers are listed below, in certain cases further explanation may be required, i.e., to provide the format used for collecting information. If the answer is \\"Yes, using other format\\" the user shall provide a comment in a question comment field. Permissible responses to this question are:\\n\\n- Yes, Cobalt Reporting Template\\n- Yes, using other format (describe)\\n- No\\n\\nThis field is mandatory.","H. Please answer “Yes” or “No”. In the comments section, you can provide additional information on your approach. Examples could be:\\n\\n “3rd party audit” - on-site audits of your suppliers conducted by independent third parties. \\n “Documentation review only” - a review of supplier submitted records and documentation conducted by independent third parties and, or your company personnel. \\n “Internal audit” - on-site audits of your suppliers conducted by your company personnel.\\n\\nThis field is mandatory.","I. This is a question to disclose whether a company’s review process includes corrective action management. The answer to this question shall be \\"yes\\" or \\"no.\\" Comments shall be captured in a question comment field. This field is mandatory.","Instructions for completing the Smelter List Tab.\\nProvide answers in ENGLISH only\\n\\nNote: Columns with (*) are mandatory fields","This template allows for smelter identification using the Smelter Look-up. Columns B, and C must be completed in order from left to right to utilize the Smelter Look-up feature.\\nUse a separate line for each metal/smelter/country combination.","1. Smelter Identification Input Column - If you know the Smelter Identification Number, input the number in Column A (columns B, C, D, E, F, G, I, and J will auto-populate). Column A does not autopopulate","2. Metal (*) - Use the pull down menu to select the metal for which you are entering smelter information. This field is mandatory.","3. Smelter Look-up (*) - Select from dropdown. This is the list of known smelters as of template release date. If smelter is not listed select 'Smelter Not Listed'. This will allow you to enter the name of the smelter in Column D. If you do not know the name or location of the smelter, select 'Smelter Not Yet Identified.' For this option, columns D and E will autopopulate to say, 'unknown.' This field is mandatory.","4. Smelter Name (1)- Fill in smelter name if you selected \\"Smelter Not Listed\\" in column C. This field will auto-populate when a smelter name in selected in Column C. This field is mandatory.","5. Smelter Country (*) – This field will auto-populate when a smelter name is selected in column C. If you selected \\"Smelter Not Listed\\" in column C, use the pull down menu to select the country location of the smelter. This field is mandatory.","6. Smelter Identification - This is a unique identifier assigned to a smelter or refiner according to an established smelter and refinery identification system. It is expected that multiple names or aliases could be used to describe a single smelter or refiner and therefore multiple names or aliases could be associated to a single ‘Smelter ID’.","7. Source of Smelter Identification Number - This is the source of the Smelter Identification Number entered in Column F. If a smelter name was selected in Column C using the dropdown box, this field will auto-populate.","8. Smelter Street - Provide the street name on which the smelter is located. This field is optional.","9. Smelter City – Provide the city name of where the smelter is located. This field is optional.","10.. Smelter Location: State/Province, if applicable – Provide the state or province where the smelter is located. This field is optional.","11. Smelter Contact Name – The Cobalt Reporting Template (CRT) is circulated among companies in the requesting company's supply chain to exercise due diligence in accordance with the OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-Affected and High-Risk.\\n\\nIf the template is circulated in a country where laws protecting personal information exist, sharing personal contact information in the CRT may violate related regulations. Therefore, it is recommended that the requesting company take precautions such as obtaining the contact person's permission to share the information with other companies in the supply chain when completing \\"Smelter Contact Name\\" and the \\"Smelter Contact Email\\" columns.\\n\\nIf you have permission to share this information, please fill in the name of the Smelter Facility Contact person who you worked with.","12. Smelter Contact Email – Fill in the email address of the Smelter Facility contact person who was identified as the Smelter Contact Name. Example: John.Smith@SmelterXXX.com. Please review the instructions for Smelter Contact Name before completing this field.","13. Name of Mine(s) - This field allows a company to define the actual mines being used by the smelter. Please enter the actual mine names if known. If 100% of the smelter’s feedstock originates from recycled or scrap sources, enter \\"Recycled\\" or \\"Scrap\\" in place of the name of the mine and answer \\"Yes\\" in Column P.","14. Location (Country) of Mine(s) - This is a free form text field that allows a company to define the location of the mines being used by the smelter. Please enter the country of the mine(s). If the country of origin is not known, enter \\"Unknown\\". If 100% of the smelter’s feedstock originates from recycled or scrap sources, enter \\"Recycled\\" or \\"Scrap\\" in place of the country of origin. This field is optional.","15. Indicates whether the smelter solely obtains inputs for its smelting process(es) from recycled or scrap sources. This question is optional. Permissible responses to this question are:\\n\\n- Yes\\n- No\\n- Unknown","16. Comments – free form text field to enter any comments concerning the smelter. Example: smelter is being acquired by Company YYY","The Checker worksheet is used to verify if all the required information in the Template has been completed. It is updated real-time and can be reviewed at any time while using the Template. It is used to verify completion.\\n\\nTo use this sheet, verify if all required fields have been completed (completed fields will be highlighted in green). If not, look for the red field(s) and review the \\"Notes\\" in Column C for required actions. You may use the URL in Column D to directly access the field for completion.","TERMS AND CONDITIONS","The Responsible Minerals Initiative Smelter List (the \\"List\\") and Program templates and tools, including, without limitation, the Cobalt Reporting Template (collectively “Tools”), including, without limitation, all information provided therein, are provided for informational purposes only and are current as of the date set forth therein. Any inaccuracy or omission in the List or any Tool is not the responsibility of the Responsible Business Alliance, Incorporated, a Delaware non-stock corporation (\\"RBA\\"). Determination of whether and/or how to use all or any portion of the List or any Tool is to be made in the User’s sole and absolute discretion. Prior to using the List or any Tool, you should review it with your own legal counsel. No part of the List or any Tool constitutes legal advice. Use of the List or any Tool is voluntary.","RBA does not make any representations or warranties with respect to the List or any Tool. The List and Tools are provided on an \\"AS IS\\" and on an \\"AS AVAILABLE\\" basis. RBA hereby disclaim all warranties of any nature, express, implied or otherwise, or arising from trade or custom, including, without limitation, any implied warranties of merchantability, non-infringement, quality, title, fitness for a particular purpose, completeness or accuracy.","To the fullest extent permitted by applicable laws, RBA renounces any liability for any losses, expenses or damages of any nature, including, without limitation, special, incidental, punitive, direct, indirect or consequential damages or lost income or profits, resulting from or arising out of the User’s use of the List or any Tool, whether arising in tort, contract, statute, or otherwise, even if shown that they were advised of the possibility of such damages.","In consideration for access and use of the List and/or any Tool, THE USER hereby agrees to and does (a) release and forever discharge RBA as well as its officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, from any and all claims, actions, losses, suits, damages, judgments, levies, and executions, which the User has ever had, has, or ever can, shall, or may have or claim to have against RBA , as well as its officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, resulting from or arising out of the List or any Tool or use thereof, and agrees to (b) indemnify, defend and hold harmless RBA, as well as its officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, from any and all claims, actions, losses, suits, damages, judgments, levies, and executions resulting from or arising out of the USER'S use of the List or any Tool.","If any part of any provision of these Terms and Conditions shall be invalid or unenforceable under applicable law, said part shall be deemed ineffective to the extent of such invalidity or unenforceability only, without in any way affecting the remaining parts of said provision or the remaining provisions of these Terms and Conditions.","By accessing and using the List or any Tool, and in consideration thereof, the User agrees to the foregoing."],"smelterList":[],"productList":[],"definitions":[{"term":"Authorizer","definition":"This field identifies the person responsible for the content of the declaration. The authorizer may be a different individual from the contact person. It is not correct to use the words ‘‘same’’ or similar identification to provide the name of the authorizer."},{"term":"Cobalt Refiner","definition":"An entity that processes cobalt concentrates, intermediates or recycled feed and produces a cobalt product for direct use in a downstream manufacturing process."},{"term":"Conflict-Affected and High-Risk Areas (CAHRA)","definition":"Conflict-Affected and High-Risk Areas (CAHRA) are defined by the OECD Due Diligence Guidance as \\"areas identified by the presence of armed conflict, widespread violence or other risks of harm to people. Armed conflict may take a variety of forms, such as a conflict of international or non-international character, which may involve two or more states, or may consist of wars of liberation, or insurgencies, civil wars, etc. High-risk areas may include areas of political instability or repression, institutional weakness, insecurity, collapse of civil infrastructure and widespread violence. Such areas are often characterised by widespread human right abuses and violations of national or international law.\\""},{"term":"Declaration of Scope or Class","definition":"For the purposes of this template, “scope” describes the applicability of the information provided by the reporting company. The scope may encompass the entirety of a company’s services and/or products, or at a company’s discretion, the template may be used to report on a specific product (or products), or, be ‘User defined’. The ‘User defined’ scope selection or class may be used to describe any subset of a company’s operation or product portfolio"},{"term":"Due Diligence","definition":"The OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-affected and High-risk Areas (OECD Guidance) defines “Due Diligence” as “an on-going, proactive and reactive process through which companies can ensure that they respect human rights and do not contribute to conflict”. More information is available at http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/."},{"term":"DRC or adjoining countries","definition":"Democratic Republic of Congo and the nine countries with which it shares an internationally recognized border: Angola, Burundi, Central African Republic, Republic of the Congo, Rwanda, South Sudan, Tanzania, Uganda, Zambia."},{"term":"Independent Third-Party Audit Firm","definition":"With respect to smelter audits, an “Independent Third-Party Audit Firm” is a private sector organization competent in evaluating the smelter or refiner’s due diligence system against a defined standard. To maintain neutrality and impartiality, such organization and its audit team members must have no conflicts of interest with the auditee."},{"term":"Intentionally added","definition":"Intentionally added is commonly known as the deliberate use of a substance, or in this case metal, in the formulation of a product where continued presence is desired to provide a specific characteristic, appearance or quality."},{"term":"OECD","definition":"Organisation for Economic Co-operation and Development. The OECD has developed the OECD Due Diligence Guidance for Responsible Supply Chains. The OECD Due Diligence Guidance provides detailed recommendations to help companies respect human rights and avoid contributing to conflict through their mineral purchasing decisions and practices and uses a reasonableness approach. This Guidance is for use by any company potentially sourcing minerals or metals from conflict-affected and high-risk areas. The OECD Guidance is global in scope, and applies to all mineral supply chains. (http://mneguidelines.oecd.org/mining.htm)"},{"term":"Product","definition":"A company’s Product or Finished good is a material or item which has completed the final stage of manufacturing and/or processing and is available for distribution or sale to customers."},{"term":"Refiner","definition":"A refiner is a company that procures and processes mineral ore, slag and/or materials from recycled or scrap sources into refined metal or metal containing intermediate products. The output can be pure (99.5% or greater) metals, powders, ingots, bars, grains, oxides or salts. The terms “smelter” and “refiner” are used interchangeably throughout various publications."},{"term":"Recycled or Scrap Sources","definition":"Recycled or scrap sources are recycled cobalt that are reclaimed end-user or post-consumer products, or scrap processed cobalt created during product manufacturing. Recycled cobalt includes excess, obsolete, defective, and scrap cobalt materials that contain refined or processed metals that are appropriate to recycle in the production of such metals. Minerals partially processed, unprocessed or byproducts from other ores are not included in the definition of recycled cobalt"},{"term":"Responsible Business Alliance (RBA)","definition":"Founded in 2004 the Responsible Business Alliance is the world’s largest industry coalition dedicated to electronics supply chain responsibility. (http://www.responsiblebusiness.org)"},{"term":"Responsible Minerals Assurance Process (RMAP)","definition":"The Responsible Minerals Assurance Process (RMAP) is a program developed by the RBA and GeSI to enhance company capability to verify the responsible sourcing of metals. Further details of the RMAP can be found here: http://www.responsiblemineralsinitiative.org/smelter-introduction/"},{"term":"Responsible Minerals Initiative (RMI)","definition":"Founded in 2008 by members of the Responsible Business Alliance and the Global e-Sustainability Initiative, the Responsible Minerals Initiative has grown into one of the most utilized and respected resources for companies addressing conflict minerals issues in their supply chains. Over 150 companies from seven different industries participate in the RMI today, contributing to a range of tools and resources including the Responsible Minerals Assurance Process, the Conflict Minerals Reporting Template, Reasonable Country of Origin Inquiry data and a range of guidance documents on conflict minerals sourcing. The RMI also runs regular workshops on conflict minerals issues and contributes to policy development and debates with leading civil society organizations and governments. Additional information is available at http://www.responsiblemineralsinitiative.org/."},{"term":"RMAP Conformant Smelter List","definition":"The Responsible Minerals Assurance Process (RMAP) Conformant Smelter List is a published list of smelters and refiners that have undergone assessment through the RMAP, a program of the Responsible Minerals Initiative (RMI) or industry equivalent program (such as Responsible Jewellery Council or London Bullion Market Association) and have been validated to be in conformance with the protocols. If a smelter or refiner is not on the list, it has either not completed a RMAP assessment or is not in conformance with the RMAP protocol. \\n\\nA list of smelters and refiners which have been validated to be conformant to the RMAP can be found at www.responsiblemineralsinitiative.org"},{"term":"Smelter","definition":"A smelter is a company that procures and processes mineral ore, slag and/or materials from recycled or scrap sources into refined metal or metal containing intermediate products. The output can be pure (99.5% or greater) metals, powders, ingots, bars, grains, oxides or salts. The terms “smelter” and “refiner” are used interchangeably throughout various publications."},{"term":"Smelter Identification Number","definition":"A unique identification number the RMI assigns to companies that have been reported by members of the supply chain as smelters or refiners, whether or not they have been verified to meet the characteristics of smelters or refiners as defined in the RMAP audit protocols or other applicable audit programs."}],"smelterLookup":["The following list represents the RMI's latest smelter name/alias information as of this templates release.  This list is updated frequently, and the most up-to-date version can be found on the RMI website http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/exports/cmt-export/.  The presence of a smelter here is NOT a guarantee that it is currently Active or Conformant within an independent third party audit program.\\n\\nPlease refer to the RMI web site www.responsiblemineralsinitiative.org for the most current and accurate list of standard smelter names that are Active or Conformant. \\n\\nNames included in column B represent company names that are commonly recognized and reported by the supply chain for a particular smelter. These names may include former company names, alternate names, abbreviations, or other variations. Although the names may not be the Standard Smelter Name, the reference names are helpful to identify the smelter, which is listed under column C in the Smelter Look-up.\\n\\nColumn C is the list of the official standard smelter names, in the ASCII character set. The majority of smelters will have the same entry for both columns, however if the common name varies from the standard name, the variation is noted in Column B."]}},"amrt":{"1.3":{"instructions":["RMI website: (www.responsiblemineralsinitiative.org)","Introduction","This Additional Minerals Reporting Template (Template) is a free, standardized reporting template created by the Responsible Minerals Initiative (RMI). The Template facilitates the transfer of information through the supply chain regarding mineral country of origin and smelters and refiners being utilized and supports compliance to legislation*. The template also facilitates the identification of new smelters and refiners to potentially undergo an audit via the Responsible Minerals Assurance Process**.\\n\\nThe AMRT was designed for downstream companies to disclose information about their supply chains up to but not including the smelter. If you are a smelter, refiner, or processor, in accordance with the RMAP protocols, we recommend you enter your own name in the smelter list tab.\\n\\nWhen filling out the form, none of the cell entries should start will \\"=\\" or \\"#.\\"","* In 2010, the U.S. Dodd-Frank Wall Street Reform and Consumer Protection Act was passed concerning “conflict minerals” originating from the Democratic Republic of the Congo (DRC) or adjoining countries. The SEC published final rules associated with the disclosure of the source of conflict minerals by U.S. publicly traded companies (see the rules at http://www.sec.gov/rules/final/2012/34-67716.pdf). The rules reference the OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-Affected and High-Risk Areas, (http://www.oecd.org/daf/inv/mne/GuidanceEdition2.pdf), which guides suppliers to establish policies, due diligence frameworks and management systems.\\nIn 2017, Regulation (EU) 2017/821 of the European Parliament and of the European Council of 17 May 2017 was passed concerning supply chain due diligence obligations for Union importers of tin, tantalum and tungsten, their ores, and gold originating from conflict-affected and high-risk areas (see regulation at https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=OJ:L:2017:130:FULL&from=EN)\\n** See information on the Responsible Minerals Initiative (www.responsiblemineralsinitiative.org).","Instructions for completing Company Information questions (rows 8 - 24).\\nProvide comments in ENGLISH only","Note: Entries with (*) are mandatory fields.","1. Insert your company's Legal Name. Please do not use abbreviations. In this field you have the option to add other commercial names, DBAs, etc.","2. Select your company's Declaration Scope. The options for scope are:\\n\\nA. Company-wide\\nB. Product (or List of Products)\\nC. User-Defined \\n\\nFor \\"Company-wide\\", the declaration encompasses the entirety of a company's products or product substances produced by the parent company. Therefore if the user is reporting mineral data at the company level, they will be reporting mineral data on all products they manufacture. \\n\\nFor Scope selection of Product (or List of Products), a link to the worksheet tab for Product List will be displayed. If this scope is chosen, it is mandatory to list the Responder Product Number of the products covered under the Scope of this Declaration in Column B of the Product List worksheet. It is optional to list the Responder Product Name in Column C of the Product List worksheet.\\n\\nFor Scope selection of \\"User Defined\\", it is mandatory that the user describes the scope to which the mineral disclosure is applicable. The scope of this class shall be defined in a text field by the supplier and should be easily understood by customers or the receivers of the document. As an example, companies may provide a link to clarifying information.\\n\\nThis field is mandatory.","3. The requesting company is required to input all minerals that are in scope of the declaration (up to a maximum of 10). You may select a mineral from the drop-down menu or enter another metal manually. Minerals are automatically populated in alphabetical order for Questions 1 and 2.\\n\\nMinerals should not include 3TG (tin, tantalum, tungsten, and gold), cobalt, copper, graphite, lithium, mica and/or nickel, as they are included in the CMRT & EMRT.\\n\\nThis field is mandatory.","4. If your declaration scope of minerals includes “Other”, input the additional minerals here. The requesting company is required to specify which minerals are in scope. Selected minerals are automatically populated for Questions 1 and 2.\\n\\nThis field is mandatory if “Other” is selected at least 1 time in the Declaration Scope of Minerals/Metals.","4. Insert your company’s unique identifier number or code (DUNS number, VAT number, customer-specific identifier, etc.)","5. Insert the source for the unique identifier number or code (\\"DUNS\\", \\"VAT\\", \\"Customer\\", etc).","6. Insert your full company address (street, city, state, country, postal code). This field is optional.","7. Insert the name of the person to contact regarding the contents of the declaration information. This field is mandatory.","8. Insert the email address of the contact person. If an email address is not available, state ‘‘not available’’ or ‘‘n/a.’’ A blank field may cause an error in form implementation. This field is mandatory.","9. Insert the telephone number for the contact. This field is mandatory.","10. Insert the name of the person who is responsible for the contents of the declaration information. The authorizer may be a different individual than the contact person. It is not correct to use the words ‘‘same’’ or similar identification to provide the name of the authorizer. This field is mandatory.","11. Insert the title for the Authorizing person. This field is optional.","12. Insert the email address of the Authorizing person. If an email address is not available, state ‘‘not available’’ or ‘‘n/a.’’ A blank field may cause an error in form implementation. This field is mandatory.","13. Insert the telephone number for the Authorizing person. This field is optional.","14. Please enter the Date of Completion for this form using the format DD-MMM-YYYY. This field is mandatory.","15. As an example, the user may save the file name as: companyname-date.xls (date as YYYY-MM-DD).","Instructions for completing the two Due Diligence Questions (rows 26 - 49).\\nProvide answers in ENGLISH only","These two questions define the usage and the level of relevant suppliers’ data collection for the declaration scope of minerals. The questions are designed to collect information about the use of all specified minerals in the company’s product(s) to determine the applicability and completeness of reporting. Responses to these questions shall represent the ‘Declaration Scope’ selected in the company information section.","For each of the two questions, provide an answer for each mineral using the drop-down menu selections. The first question in this section must be completed for all specified minerals in the declaration scope.","1. The response to this question is used to determine whether any of the specified minerals are within the scope of the reporting requirement.\\n\\nThis question asks if any specified minerals are used as a raw material, component or additive in a product that you manufacture, including compounds. Impurities from raw materials, components, additives, abrasives and cutting tools are outside the scope of the survey.\\n\\nThis question shall be answered for each specified mineral. Valid responses to this question are either \\"yes\\", \\"no\\", \\"unknown\\", or \\"not declaring\\". This question is mandatory.","Understand that if any mineral from the declaration scope is intentionally added anywhere within your supply chain, they are considered intentionally added to your product.\\n\\nSome companies may require substantiation for a \\"No\\" answer that should be entered into the Comment Field.","2. This is a question to determine whether a company has received relevant mineral disclosures from all direct suppliers reasonably believed to be providing the declared mineral(s) contained in the products covered by the scope of their declaration. Permissible responses to this question are:\\n\\n- 100%\\n- Greater than 90%\\n- Greater than 75%\\n- Greater than 50%\\n- 50% or less\\n- None\\n- Unknown\\n- Did not survey","If you respond “100%” for any metal in Question 2, you are expected to provide the names of all smelters that were identified to process the metal(s) used in your supply chain in order for this answer to be complete.\\n\\nSome companies may require substantiation for how you have defined “relevant” suppliers, which should be entered into the Comments Field. If you have not achieved a 100% response rate from your relevant suppliers, please submit your AMRT indicating the appropriate percentage and continue to survey your suppliers. An increase in your company’s percentage of suppliers surveyed may be one indication of year-over-year improvement.\\n\\nSome companies may require further substantiation for any mineral with the response “Did not survey”, which should be entered in the Comments Field.","Instructions for completing the Minerals Scope Tab.\\nProvide answers in ENGLISH only","It is strongly recommended that the requestor complete the Minerals Scope tab prior to sharing their AMRT survey.","1. Select Minerals/Metals in Scope – The metal dropdown will auto-populate with the list of in scope minerals from your Declaration page. Use the drop-down menu to select the metal for which you are providing reasons for inclusion on the AMRT.","2. Reasons for inclusion on the AMRT - Provide details on why you are requesting data for the specified mineral(s). Examples include mineral risk profiles, such as those found on the Material Insights platform, and/or regulatory requirements.","Instructions for completing the Smelter List Tab.\\nProvide answers in ENGLISH only","Note: Columns with (*) are mandatory fields","1. Smelter Identification Input Column - If you know the Smelter Identification Number, input the number in Column A (columns B, C, D, E, F, G, I, and J will auto-populate). Column A does not autopopulate","2. Metal (*) - Use the pull down menu to select the metal for which you are entering smelter information. This field is mandatory.","3. Smelter Name (*) – This field is mandatory.","4. Smelter Country (*) – Use the pull down menu to select the country location of the smelter. This field is mandatory.","5. Smelter Identification - This is a unique identifier assigned to a smelter or refiner according to an established smelter and refinery identification system. It is expected that multiple names or aliases could be used to describe a single smelter or refiner and therefore multiple names or aliases could be associated to a single ‘Smelter ID’.","6. Source of Smelter Identification Number - This is the source of the Smelter Identification Number entered in Column D.","7. Smelter Street - Provide the street name on which the smelter is located. This field is optional.","8. Smelter City – Provide the city name of where the smelter is located. This field is optional.","9. Smelter Location: State/Province, if applicable – Provide the state or province where the smelter is located. This field is optional.","10. Smelter Contact Name – If the template is circulated in a country where laws protecting personal information exist, sharing personal contact information in the AMRT may violate related regulations. Therefore, it is recommended that the requesting company take precautions such as obtaining the contact person's permission to share the information with other companies in the supply chain when completing \\"Smelter Contact Name\\" and the \\"Smelter Contact Email\\" columns.\\n\\nIf you have permission to share this information, please fill in the name of the Smelter Facility Contact person who you worked with.","11. Smelter Contact Email – Fill in the email address of the Smelter Facility contact person who was identified as the Smelter Contact Name. Example: John.Smith@SmelterXXX.com. Please review the instructions for Smelter Contact Name before completing this field.","12. Proposed next steps - This is a comments area, which allows the company to specify the next steps to manage smelters. These are the actions you may take with the smelter if the facility is not listed on the Responsible Minerals Initiative (RMI) Conformant Facility List. Example: request smelter facility to undergo an RMI assessment, remove from preferred supplier list, etc.","13. Name of Mine(s) - This field allows a company to define the actual mines being used by the smelter. Please enter the actual mine names if known. If 100% of the smelter’s feedstock originates from recycled or scrap sources, enter \\"Recycled\\" or \\"Scrap\\" in place of the name of the mine and answer \\"Yes\\" in Column P.\\n\\n\\"RCOI confirmed as per RMI\\" may be an acceptable answer to this question.","14. Location (Country) of Mine(s) - This is a free form text field that allows a company to define the location of the mines being used by the smelter. Please enter the country of the mine(s). If the country of origin is not known, enter \\"Unknown\\". If 100% of the smelter’s feedstock originates from recycled or scrap sources, enter \\"Recycled\\" or \\"Scrap\\" in place of the country of origin. This field is optional.\\n\\n\\"RCOI confirmed as per RMI\\" may be an acceptable answer to this question.","15. Indicates whether the smelter solely obtains inputs for its smelting process(es) from recycled or scrap sources. This question is optional. Permissible responses to this question are:\\n\\n- Yes\\n- No\\n- Unknown","16. Comments – free form text field to enter any comments concerning the smelter. Example: smelter is being acquired by Company YYY","Instructions for completing the Mine List Tab.\\nProvide answers in ENGLISH only","1. Metal - Use the pull down menu to select the metal for which you are entering mine facility information.","2. Name of Smelter(s) sourcing from this Mine Facility - When possible, fill in the name of the smelter(s) that is sourcing from the listed mine facility.","3. Mine Facility (Site) Name - Fill in the mine facility name as you know it.","4. Mine Identification - This is a unique identifier assigned to a mine facility according to an established mine facility identification system. It is expected that multiple names or aliases could be used to describe a single mine facility and therefore multiple names or aliases could be associated to a single ‘Facility ID’.","5. Source of Mine Identification Number - This is the source of the Mine Identification Number entered in Column D.","6. Mine Facility (Site) Country - Select from dropdown, the country where the mine facility is located.","7. Mine Facility Street - Provide the street name on which the mine is located. This field is optional.","8. Mine Facility City – Provide the city name of where the mine facility is located.","9. Mine Facility Location: State/Province, if applicable – Provide the state or province where the mine facility is located.","10. Mine Facility Contact Name – If the template is circulated in a country where laws protecting personal information exist, sharing personal contact information in the AMRT may violate related regulations. Therefore, it is recommended that the requesting company take precautions such as obtaining the contact person's permission to share the information with other companies in the supply chain when completing \\"Mine Facility Contact Name\\" and the \\"Mine Facility Contact Email\\" columns.\\n\\nIf you have permission to share this information, please fill in the name of the Mine Facility Contact person who you worked with.","11. Mine Facility Contact Email – Fill in the email address of the Mine Facility contact person who was identified as the Mine Facility Contact Name. Example: John.Smith@MineXXX.com. Please review the instructions for Mine Facility Contact Name before completing this field.","12. Proposed next steps - This is a comments area, which allows the company to specify the next steps to manage mine facilities. These are the actions you may take with the mine if the facility is not listed on the Responsible Minerals Initiative (RMI) Conformant Facility List. Example: request mine facility to undergo an RMI assessment, remove from preferred supplier list, etc.","13. Comments – free form text field to enter any comments concerning the mine facility. Example: mine is being acquired by Company YYY","The Checker worksheet is used to verify if all the required information in the Template has been completed. It is updated real-time and can be reviewed at any time while using the Template. It is used to verify completion.\\n\\nTo use this sheet, verify if all required fields have been completed (completed fields will be highlighted in green). If not, look for the red field(s) and review the \\"Notes\\" in Column C for required actions. You may use the URL in Column D to directly access the field for completion.","TERMS AND CONDITIONS","The Responsible Minerals Assurance Process (“Process”) Conformant Smelter List (the \\"List\\") and Process templates and tools, including, without limitation, the Additional Minerals Reporting Template (collectively “Tools”), including, without limitation, all information provided therein, are provided for informational purposes only and are current as of the date set forth therein. Any inaccuracy or omission in the List or any Tool is not the responsibility of the Responsible Business Alliance, a Delaware non-stock corporation (\\"RBA\\"). Determination of whether and/or how to use all or any portion of the List or any Tool is to be made in the User’s sole and absolute discretion. Prior to using the List or any Tool, you should review it with your own legal counsel. No part of the List or any Tool constitutes legal advice. Use of the List or any Tool is voluntary.","RBA makes no representations or warranties with respect to the List or any Tool. The List and Tools are provided on an \\"AS IS\\" and on an \\"AS AVAILABLE\\" basis. RBA hereby disclaims all warranties of any nature, express, implied or otherwise, or arising from trade or custom, including, without limitation, any implied warranties of merchantability, non-infringement, quality, title, fitness for a particular purpose, completeness or accuracy.","To the fullest extent permitted by applicable laws, RBA renounces any liability for any losses, expenses or damages of any nature, including, without limitation, special, incidental, punitive, direct, indirect or consequential damages or lost income or profits, resulting from or arising out of the User’s use of the List or any Tool, whether arising in tort, contract, statute, or otherwise, even if shown that they were advised of the possibility of such damages.","In consideration for access and use of the List and/or any Tool, THE USER hereby agrees to and does (a) release and forever discharge RBA, as well as their respective officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, from any and all claims, actions, losses, suits, damages, judgments, levies, and executions, which the User has ever had, has, or ever can, shall, or may have or claim to have against RBA, as well as their respective officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, resulting from or arising out of the List or any Tool or use thereof, and agrees to (b) indemnify, defend and hold harmless RBA, as well as their respective officers, directors, agents, employees, volunteers, representatives, contractors, successors, and assigns, from any and all claims, actions, losses, suits, damages, judgments, levies, and executions resulting from or arising out of the USER'S use of the List or any Tool.","If any part of any provision of these Terms and Conditions shall be invalid or unenforceable under applicable law, said part shall be deemed ineffective to the extent of such invalidity or unenforceability only, without in any way affecting the remaining parts of said provision or the remaining provisions of these Terms and Conditions."],"smelterList":[],"productList":[],"definitions":[{"term":"Aluminum Processor","definition":"An aluminum processor is a facility that transforms bauxite into alumina or smelts alumina into aluminum. Aluminum processors also include facilities that transform secondary material (recycled material, end of life products) in aluminum metal or aluminum alloys."},{"term":"Authorizer","definition":"This field identifies the person responsible for the content of the declaration. The authorizer may be a different individual from the contact person. It is not correct to use the words ‘‘same’’ or similar identification to provide the name of the authorizer."},{"term":"Conflict-Affected and High-Risk Area (CAHRA)","definition":"Conflict-affected and high-risk areas are areas in a state of armed conflict, fragile post-conflict areas, as well as areas witnessing weak or non-existing governance and security, such as failed states, and widespread and systematic violations of international law, including human rights abuses."},{"term":"Declaration Scope or Class","definition":"For the purposes of this template, “scope” describes the applicability of the information provided by the reporting company. The scope may encompass the entirety of a company’s services and/or products, or at a company’s discretion, the template may be used to report on a specific product (or products), or, be ‘User defined’. The ‘User defined’ scope selection or class may be used to describe any subset of a company’s operation or product portfolio."},{"term":"Due Diligence","definition":"The OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-affected and High-risk Areas (OECD Guidance) defines “Due Diligence” as “an on-going, proactive and reactive process through which companies can ensure that they respect human rights and do not contribute to conflict”. More information is available at http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/."},{"term":"Independent Third-Party Audit Firm","definition":"With respect to smelter audits, an “Independent Third-Party Audit Firm” is a private sector organization competent in evaluating the smelter or refiner’s materials traceability against the standards of the RMAP or equivalent audit protocols. To maintain neutrality and impartiality, such organization and its audit team members must have no conflicts of interest with the auditee."},{"term":"Intentionally added","definition":"Intentionally added is commonly known as the deliberate use of a substance, or in this case metal, in the formulation of a product where continued presence is desired to provide a specific characteristic, appearance or quality.\\n\\nWhile the SEC does not define the phrase “intentionally added” in the final rule*, the rule’s preamble states:\\n“[W]e agree that being intentionally added, rather than being a naturally-occurring by-product, is a significant factor in determining whether a conflict mineral is ‘‘necessary to the functionality or production’’ of a product. This is true regardless of who intentionally added the conflict mineral to the product so long as it is contained in the product. [D]etermining whether a conflict mineral is considered ‘‘necessary’’ to a product should not depend on whether the conflict mineral is added directly to the product by the issuer or whether it is added to a component of the product that the issuer receives from a third party. Instead, the issuer should ‘report on the totality of the product and work with suppliers to comply with the requirements.’ Therefore, in determining whether a conflict mineral is ‘‘necessary’’ to a product, an issuer must consider any conflict mineral contained in its product, even if that conflict mineral is only in the product because it was included as part of a component of the product that was manufactured originally by a third party.”\\n*(56296 Federal Register / Vol. 77, No. 177 / Wednesday, September 12, 2012 / Rules and Regulations)"},{"term":"Iron Processor","definition":"An iron processor is a facility that transforms iron ore or steel scrap into pig iron, crude steel, refined steel, low-alloy or high-alloy steel."},{"term":"Mine Facility (Site)","definition":"A mine facility or site is the point of extraction of the raw material."},{"term":"OECD","definition":"Organisation for Economic Co-operation and Development"},{"term":"Processor","definition":"A facility that performs process or processes to remove all undesirable and separate the desired elements of primary materials by concentration or purification. This includes, but is not limited to: cleaning, separation, concentrating (e.g. separate valuable minerals from unwanted gangue by mechanical, thermal or chemical means), roasting (e.g. smelting, roasting, or other means to drive off impurities), cathode and anode production and other refining processes. The terms \\"smelter\\", \\"refiner\\", and \\"processor\\" are used interchangeably throughout various publications."},{"term":"Product","definition":"A company’s Product or Finished good is a material or item which has completed the final stage of manufacturing and/or processing and is available for distribution or sale to customers."},{"term":"Rare Earth Element (REE) Processor","definition":"An REE refiner is a facility that produces rare earth oxides, rare earth element metals or any intermediates derived from the transformation of REE concentrates or REEs-bearing precipitates from leaching of ion-adsorption clays."},{"term":"Responsible Business Alliance (RBA)","definition":"Responsible Business Alliance (www.responsiblebusiness.org)"},{"term":"Responsible Minerals Assurance Process (RMAP)","definition":"The Responsible Minerals Assurance Process (RMAP) is a process developed by the RBA to enhance company capability to verify the responsible sourcing of metals. Further details of the RMAP can be found here: http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/."},{"term":"Responsible Minerals Initiative (RMI)","definition":"Founded in 2008 by members of the Responsible Business Alliance, the Responsible Minerals Initiative has grown into one of the most utilized and respected resources for companies addressing conflict minerals issues in their supply chains. Over 460 companies from a range of industries participate in the RMI today, contributing to a range of tools and resources including the Responsible Minerals Assurance Process, the Conflict Minerals Reporting Template, Reasonable Country of Origin Inquiry data and a range of guidance documents on conflict minerals sourcing. The RMI also runs regular workshops on conflict minerals issues and contributes to policy development and debates with leading civil society organizations and governments. Additional information is available at http://www.responsiblemineralsinitiative.org."},{"term":"RMI Conformant Smelter List","definition":"The Responsible Minerals Initiative (RMI) Conformant Facility List is a published list of facilities that have undergone assessment through the RMI or industry equivalent program (such as Responsible Jewellery Council or London Bullion Market Association) and have been validated to be in conformance with the protocols. If a facility is not on the list, it has either not completed an RMI assessment or is not in conformance with the RMI assessment standard. \\n\\nA list of facilities which have been validated to be conformant with an RMI assessment standard can be found at www.responsiblemineralsinitiative.org."},{"term":"Smelter","definition":"A smelter or refiner is a company that procures and processes mineral ore, slag and/or materials from recycled or scrap sources into refined metal or metal containing intermediate products. The output can be pure (99.5% or greater) metals, powders, ingots, bars, grains, oxides or salts. The terms \\"smelter\\", \\"refiner\\", and \\"processor\\" are used interchangeably throughout various publications."},{"term":"Smelter Identification Number","definition":"A unique identification number the RMI assigns to companies that have been reported by members of the supply chain as smelters or refiners, whether or not they have been verified to meet the characteristics of smelters or refiners as defined in the RMAP audit protocols."},{"term":"Zinc Processor","definition":"A zinc processor is a facility that transforms zinc sulfide concentrate, zinc calcine (derived from roasting) or zinc oxide (derived from recycling) into Special High Grade Zinc (SHG) or any intermediate (e.g. zinc calcine)."}],"mineList":[],"smelterLookup":["The following list represents the RMI's latest smelter name/alias information as of this templates release.  This list is updated frequently, and the most up-to-date version can be found on the RMI website http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/exports/cmrt-export/.  The presence of a smelter here is NOT a guarantee that it is currently Active or Conformant within the Responsible Minerals Assurance Process.\\n\\nPlease refer to the RMI web site www.responsiblemineralsinitiative.org for the most current and accurate list of standard smelter names that are Active or Conformant. \\n\\nNames included in column B represent company names that are commonly recognized and reported by the supply chain for a particular smelter. These names may include former company names, alternate names, abbreviations, or other variations. Although the names may not be the RMI Standard Smelter Name, the reference names are helpful to identify the smelter, which is listed under column C in the Smelter Look-up.\\n\\nColumn C is the list of the official standard smelter names, in the ASCII character set. The majority of smelters will have the same entry for both columns, however if the common name varies from the standard name, the variation is noted in Column B."]}}}`),k1={minerals:{tooManySelected:"Too many minerals selected",selectAtLeastOne:"Select at least one mineral",enterAtLeastOne:"Enter at least one mineral",otherRequired:"Enter other minerals when “Other” is selected",otherNotAllowed:"Clear other minerals when “Other” is not selected",tooMany:"Too many minerals"},companyQuestions:{commentRequired:"Comment is required"},required:"Required",date:{invalid:"Invalid date format (DD-MMM-YYYY)"},email:{invalid:"Invalid email address"},externalPickFailedTitle:"External selection failed",externalPickFailedContent:"The external picker did not return data successfully. Please try again."},T1={common:XC,templates:e1,tabs:t1,sections:n1,notices:o1,badges:r1,conditions:i1,placeholders:s1,productPlaceholders:a1,hints:l1,tables:c1,actions:u1,confirm:m1,selection:d1,options:p1,minerals:f1,questions:h1,companyQuestions:y1,productList:g1,fields:b1,docStatus:w1,checker:v1,revision:S1,docs:C1,errors:k1},x1={appTitle:"冲突矿产报告",selectTemplate:"选择模板",selectVersion:"版本",export:"导出",lookupSeparator:"----------",comingSoon:"{{title}} - 即将推出",homeTitle:"冲突矿产报告模板",homeSubtitle:"请从顶部选择一个模板开始",language:"语言"},_1={cmrt:"CMRT",emrt:"EMRT",crt:"CRT",amrt:"AMRT",cmrt_full:"冲突矿产报告模板",emrt_full:"扩展矿产报告模板",crt_full:"钴报告模板",amrt_full:"附加矿产报告模板"},I1={revision:"版本说明",declaration:"申报",smelterList:"冶炼厂列表",checker:"校验",productList:"产品列表",smelterLookup:"冶炼厂查询",definitions:"术语定义",instructions:"说明",mineList:"矿场列表",mineralsScope:"矿产申报范围"},R1={companyInfo:"公司信息",contact:"联系人",authorizer:"授权人",questionMatrix:"问题矩阵",questionMatrixHint:"根据上述申报范围,回答以下 1 至 8 题。",companyQuestions:"公司层面问题",mineralsScope:"矿产申报范围",mineralsOther:"其他矿产"},M1={requiredHintTitle:"填写提示:",requiredHintBody:"黄色底色字段为必填项,请确保全部填写完整后再提交。"},N1={requiredCompleted:"{{done}}/{{total}} 必填已完成",questionRange:"Q{{from}}-Q{{to}}",companyQuestionsRequired:"当任一金属{{condition}}时必填",recordCount:"{{count}} 条记录"},L1={always:"始终",q1NotNo:"Q1 ≠ {{no}}",q1Yes:"Q1 = {{yes}}",q1q2NotNo:"Q1 ≠ {{no}} 且 Q2 ≠ {{noQ2}}",q1q2Yes:"Q1 = {{yes}} 且 Q2 = {{yesQ2}}",q1NotNegatives:"Q1 不在 {{negatives}}",q1NotNegativesAndQ2NotNegatives:"Q1 不在 {{q1Negatives}} 且 Q2 不在 {{q2Negatives}}"},q1={select:"请选择",input:"请输入",number:"请输入数值",date:"请选择日期",companyName:"请输入公司正式注册名称",declarationScope:"请选择",scopeDescription:"请描述自定义申报范围",customMineral:"矿种{{index}}",companyId:"DUNS, VAT, 组织机构代码等",companyAuthId:"授权识别信息",address:"公司地址",contactName:"请输入联系人姓名",contactEmail:"example@company.com",contactPhone:"+86 xxx xxxx xxxx",authorizerName:"请输入授权人姓名",authorizerTitle:"职务名称",authorizerEmail:"example@company.com",authorizerPhone:"+86 xxx xxxx xxxx",authorizationDate:"DD-MMM-YYYY",smelterIdInput:"例如:CID001105",smelterLookup:"搜索冶炼厂…",smelterName:"冶炼厂名称",smelterNameRequired:"必填:冶炼厂名称",smelterNameOptional:"可填写冶炼厂名称",smelterCountry:"选择国家/地区",smelterCountryRequired:"必填:国家/地区",smelterIdentification:"CID…",smelterSourceId:"Source ID",smelterStreet:"街道",smelterCity:"城市",smelterState:"州/省",smelterContactName:"联系人",smelterContactEmail:"email@…",smelterNextSteps:"后续步骤",smelterMineName:"矿井名称",smelterMineCountry:"矿井国家",mineralsScopeReason:"请填写纳入原因",smelterComments:"注释",comments:"注释",smelterCombinedMetal:"请选择",smelterCombinedSmelter:"合并冶炼厂",mineSmelterSelect:"选择冶炼厂",mineSmelterInput:"冶炼厂名称",mineName:"矿厂名称",mineId:"CID…",mineSourceId:"Source ID",mineCountry:"选择国家/地区",mineStreet:"街道",mineCity:"城市",mineState:"州/省",mineContactName:"联系人",mineContactEmail:"email@…",mineNextSteps:"后续步骤",mineComments:"注释"},A1={productNumber:"PRD-xxxx-xxx",productName:"产品名称",requesterNumber:"回复方产品编号",requesterName:"回复方产品名称",comments:"注释"},E1={companyName:"使用正式注册名称,不得使用缩写。",declarationScope:"A=公司级 | B=产品级(需填Product List) | C=自定义",contactEmail:'无邮箱可填 "not available"。',authorizerName:'不可填 "same" 等占位。',authorizationDate:"格式: DD-MMM-YYYY (如 01-Jan-2026)",smelterNotYetIdentifiedCountry:"尚未识别:国家保持为空即可。",mineralsMaxCount:"最多选择 {{max}} 种矿产",mineralsMaxCountReached:"已达到矿产选择上限"},P1={metal:"金属",smelterLookup:"冶炼厂查询",smelterName:"冶炼厂名称",smelterId:"冶炼厂识别号码输入列",smelterIdentification:"冶炼厂识别",sourceId:"识别号来源",country:"国家",street:"街道",city:"城市",stateProvince:"州/省",contactName:"联系人",contactEmail:"联系人邮箱",proposedNextSteps:"建议的后续步骤",mineCountry:"矿场所在国家或地区",mineSmelterName:"从该矿厂采购的冶炼厂名称",mineSourceId:"冶炼厂出处识别号",mineId:"矿场识别号",mineIdSource:"矿场识别来源",recycledScrap:"100% 回收/报废料?",combinedMetal:"合并金属",combinedSmelter:"合并冶炼厂",mineName:"矿场名称",province:"省/州",mineralsScopeReason:"纳入原因",mineralsScopeReasonPrt:"纳入 PRT 的原因",mineralsScopeReasonAmrt:"纳入 AMRT 的原因",comments:"备注",requesterNumber:"请求方编号",requesterName:"请求方名称",noData:"暂无数据"},D1={addRow:"新增一行",pickExternal:"从外部选择",chooseSmelter:"选择冶炼厂",edit:"修改",prev:"上一页",next:"下一页",submit:"提交",close:"关闭",setAllTo:"全部设为",sameAsContact:"同联系人",batchDelete:"批量删除",cancelSelection:"取消选择"},$1={batchDelete:"确认批量删除",batchDeleteContent:"确定要删除选中的 {{count}} 条记录吗?此操作不可撤销。"},O1={selected:"已选 {{count}} 项"},F1={yes:"是",no:"否",unknown:"未知",notApplicable:"不适用",notApplicableForDeclaration:"本申报不适用",notDeclaring:"不申报",none:"完全没有",didNotSurvey:"未调查",drcOnly:"仅刚果(金)",drcOrAdjoiningOnly:"仅刚果(金)或毗邻国家",indiaMadagascarOnly:"仅印度和/或马达加斯加",percentage100:"100%",percentageOne:"1",percentageAbove90:"超过 90%",percentageAbove75:"超过 75%",percentageAbove50:"超过 50%",percentage50OrLess:"50% 或以下",percentageLess25:"少于 25%",yesCrtTemplate:"是,CRT",yesOtherFormat:"是,使用其他格式(请描述)",yesOtherFormatTitle:"是,使用其他格式(请描述)",yesIpc1755:"是,符合 IPC1755(如 CMRT)",yesIpc1755Emrt:"是,符合 IPC1755(如 EMRT)",yesWhenMoreValidated:"是,当更多处理商通过验证时",yesWithSec:"是,向 SEC 报告",yesWithEu:"是,向欧盟报告",yesWithSecAndEu:"是,向 SEC 与欧盟报告"},z1={tantalum:"钽",tin:"锡",gold:"金",tungsten:"钨",cobalt:"钴",mica:"云母",copper:"铜",graphite:"石墨",lithium:"锂",nickel:"镍",silver:"银",aluminum:"铝",antimony:"锑",chromium:"铬",germanium:"锗",iridium:"铱",lime:"石灰",magnesium:"镁",manganese:"锰",palladium:"钯",phosphorus:"磷",platinum:"铂",rareEarthElements:"稀土元素",rhodium:"铑",ruthenium:"钌",silicon:"硅",sodaAsh:"纯碱",titanium:"钛",vanadium:"钒",zinc:"锌",zirconium:"锆",other:"其他"},j1={cmrt:{q1:"1) 是否在产品或生产流程中有意添加或使用任何 3TG?",q2:"2) 是否有任何 3TG 仍存在于产品中?",q3:"3) 贵公司供应链中的冶炼厂是否从所指明的国家采购 3TG?(有关术语“SEC”,请参见定义选项卡)",q4:"4) 贵公司供应链中是否有冶炼厂从受冲突影响和高风险地区采购 3TG?",q5:"5) 是否 100% 的 3TG(因产品功能或生产而必须使用)来自于回收料或报废料?",q6:"6) 已对贵公司供应链调查提供答复的相关供应商百分比是多少?",q7:"7) 您是否识别出为贵公司供应链供应 3TG 的所有冶炼厂?",q8:"8) 贵公司收到的所有适用冶炼厂信息是否已在此申报中报告?"},emrt:{q1:"1) 是否在产品或生产流程中有意添加或使用任何指定矿产?",q2:"2) 产品中是否还存有任何指定矿产?",q3:"3) 贵公司供应链中是否有冶炼厂或加工厂从受冲突影响和高风险地区采购指定矿产?(《经合组织尽职调查指南》,参见定义选项卡)",q4:"4) 是否 100% 的指定矿产来自回收料或报废料资源?",q5:"5) 百分之多少的相关供应商已对贵公司的供应链调查提供答复?",q6:"6) 您是否识别出为贵公司的供应链供应指定矿产的所有冶炼厂或加工厂?",q7:"7) 贵公司收到的所有适用冶炼厂或加工厂信息是否已在此申报中报告?",v1:{q1:"1) 是否在产品或生产流程中有意添加或使用任何钴或天然云母?",q2:"2) 产品中是否还存有任何钴或天然云母?",q3:"3) 贵公司供应链中是否有冶炼厂或加工厂从受冲突影响和高风险地区采购钴或天然云母?(《经合组织尽职调查指南》,参见定义选项卡)",q4:"4) 是否 100% 的钴来自回收料或报废料资源?",q5:"5) 百分之多少的相关供应商已对贵公司的供应链调查提供答复?",q6:"6) 您是否识别出为贵公司的供应链供应钴或天然云母的所有冶炼厂或加工厂?",q7:"7) 贵公司收到的所有适用冶炼厂或加工厂信息是否已在此申报中报告?"}},crt:{q1:"1) 是否在产品或生产流程中有意添加或使用任何钴?",q2:"2) 贵公司供应链中的冶炼厂是否从受冲突影响和高风险地区采购钴?(《经合组织尽职调查指南》,参见定义选项卡)",q3:"3) 是否 100% 的钴来自回收料或报废料资源?",q4:"4) 已对贵公司供应链调查提供答复的相关供应商百分比是多少?",q5:"5) 您是否识别出为贵公司供应链供应钴的所有冶炼厂?",q6:"6) 贵公司收到的所有适用冶炼厂信息是否已在此申报中报告?"},amrt:{q1:"1) 是否在产品或生产流程中有意添加或使用以下矿产或金属?",q2:"2) 已对贵公司供应链调查提供答复的相关供应商百分比是多少?"}},B1={cmrt:{a:"A. 贵公司是否已制定负责任矿产采购政策?",b:"B. 贵公司的负责任矿产采购政策是否公开发布于贵公司网页上?(备注 - 如果是,请在注释字段中注明 URL。)",b_comment:"请填写网址",c:"C. 您是否要求您的直接供应商从其尽职调查实践已被被独立第三方审核机构验证过的冶炼厂采购 3TG?",d:"D. 贵公司是否已实施负责任矿产采购的尽职调查措施?",e:"E. 贵公司是否开展了相关供应商的冲突矿产调查?",e_comment:"请描述其他格式",f:"F. 贵公司是否根据公司期望来审查供应商提交的尽职调查信息?",g:"G. 贵公司的验证程序是否包括纠正措施管理?",h:"H. 贵公司是否需要提交年度冲突矿产披露?"},emrt:{a:"A. 贵公司是否制定了可公开查阅的矿产采购政策?",b:"B. 贵公司的负责任矿产采购政策是否公开发布于贵公司网页上?(备注 - 如果是,请在注释字段中注明 URL。)",b_comment:"请填写网址",c:"C. 贵公司是否要求贵公司的直接供应商从尽职调查实践经独立第三方审计计划验证过的冶炼厂采购指定矿产?",d:"D. 贵公司是否已实施负责任矿产采购的尽职调查措施?",e:"E. 贵公司是否针对相关供应商进行指定矿产供应链调查?",e_comment:"请描述其他格式",f:"F. 贵公司是否会根据预期审核从供应商处收到的尽职调查信息?",g:"G. 贵公司的审核流程是否包括纠错行动管理?",v1:{c:"C. 贵公司是否要求贵公司的直接供应商从尽职调查实践经独立第三方审计计划验证过的冶炼厂采购钴或从拥有相同资质的加工厂采购天然云母?",e:"E. 贵公司是否针对相关供应商进行钴和/或天然云母供应链调查?"},v11:{a:"A. 贵公司是否制定了可公开查阅的钴采购政策?",b:"B. 贵公司的政策是否至少涵盖《经合组织尽职调查指南》附录二《示范政策》中的所有风险以及童工问题的最恶劣形式?",c:"C. 贵公司是否要求贵公司的直接供应商从尽职调查实践经独立第三方审计计划验证过的冶炼厂采购钴或从拥有相同资质的加工厂采购天然云母?",d:"D. 贵公司是否要求供应商的尽职调查实践至少涵盖《经合组织尽职调查指南》附录二《示范政策》中的所有风险以及童工问题的最恶劣形式?",e:"E. 贵公司是否针对相关供应商进行钴和/或天然云母供应链调查?",f:"F. 贵公司是否会根据预期审核从供应商处收到的尽职调查信息?",g:"G. 贵公司的审核流程是否包括纠错行动管理?"}},crt:{a:"A. 贵公司是否制定了可公开查阅的钴采购政策?",a_comment:"请填写网址",b:"B. 贵公司的政策是否至少涵盖《经合组织尽职调查指南》附录二《示范政策》中的所有风险以及童工问题的最恶劣形式?",c:"C. 贵公司是否针对上述指明申报范围中的钴实施了尽职调查措施?",d:"D. 贵公司是否要求供应商按照《经合组织尽职调查指南》针对钴供应链实施尽职调查?",e:"E. 贵公司是否要求贵公司的直接供应商从尽职调查实践经独立第三方审计计划验证过的冶炼厂采购钴?",f:"F. 贵公司是否要求供应商的尽职调查实践至少涵盖《经合组织尽职调查指南》附录二《示范政策》中的所有风险以及童工问题的最恶劣形式?",g:"G. 贵公司是否针对相关供应商进行钴供应链调查?",g_comment:"请描述其他格式",h:"H. 贵公司是否会根据预期审核从供应商处收到的尽职调查信息?",i:"I. 贵公司的审核流程是否包括纠错行动管理?"}},K1={cmrt:{respondentNumber:"回复方的产品编号",respondentName:"回复方的产品名称",manufacturerNumber:"制造商的产品序号",manufacturerName:"制造商的产品名称",comment:"注释"},emrt:{respondentNumber:"回复方的产品编号",respondentName:"回复方的产品名称",comment:"注释"},crt:{manufacturerNumber:"制造商的产品序号",manufacturerName:"制造商的产品名称",comment:"注释"},amrt:{manufacturerNumber:"制造商的产品序号",manufacturerName:"制造商的产品名称",comment:"注释"}},Q1={companyName:"公司名称",reportingScope:"报告范围",scopeDescription:"范围描述",companyId:"公司唯一标识",companyAuthId:"公司唯一授权ID",address:"地址",contactName:"联系人姓名",contactEmail:"联系人邮箱",contactPhone:"联系人电话",authorizerName:"授权人姓名",authorizerTitle:"授权人职务",authorizerEmail:"授权人邮箱",authorizerPhone:"授权人电话",authorizationDate:"完成日期"},U1={productListRequired:"当前范围:需要填写 Product List。",productListNotRequired:"当前范围:不需要填写 Product List。",productListUnknown:"请选择 Declaration Scope 以确定是否需要 Product List。",smelterListRequired:"当前答案要求填写 Smelter List。",smelterListRequiredWithMetals:"需要填写 Smelter List 的矿种:{{metals}}。",smelterListPending:"请先完成 {{questions}}({{metals}})以判断是否需要 Smelter List。",smelterListNotRequired:"当前答案不要求填写 Smelter List。",smelterListUnknown:"请先完成矿产范围与 Q1/Q2 以判断是否需要 Smelter List。",mineListAvailable:"当前版本支持 Mine List。",mineListNotAvailable:"当前版本不支持 Mine List。"},G1={subtitle:"系统自动检测填写完整性和合规性。",progressTitle:"总体完成度",progressDetail:"{{done}}/{{total}} 必填已完成",errorsTitle:"错误(必须修正)",errorBadge:"{{count}} 项",groupCount:"{{count}} 项",groupToggleShow:"展开",groupToggleHide:"收起",passedTitle:"通过",passedBadge:"{{count}} 项",passedSummary:"已通过 {{count}} 项必填检查",passedToggleShow:"展开查看",passedToggleHide:"收起",passedEmpty:"暂无通过项",passedProductList:"已填写产品清单",passedProductRow:"产品清单第 {{index}} 行已填写产品编号",passedSmelterForMineral:"{{mineral}} 冶炼厂记录已填写",sectionComplete:"{{section}} 必填项已完成",validEmail:"邮箱有效:{{field}}",submit:"提交",submitTitle:"提交前检查",submitCompletion:"完成度",submitErrors:"错误",submitAllPass:"全部通过",submitFixTop:"待修复(前 5 条)",submitContinue:"继续填写",submitFix:"去修复",andMoreErrors:"还有 {{count}} 条错误…",globalErrorBar:"⚠️ 还有 {{count}} 个必填项未完成,点击查看。",globalSuccessBar:"✅ 所有必填项已完成。",globalErrorAction:"前往 Checker",sessionSaved:"数据已保存到会话",sessionSavedHint:"您的数据已临时保存在浏览器会话中。关闭页面前请导出文件以永久保存。",groups:{declaration:"申报信息",companyInfo:"公司信息",mineralsScope:"矿产申报范围",questionMatrix:"根据上述申报范围,回答以下 1 至 8 题",companyQuestions:"从公司层面,回答以下问题",smelter:"冶炼厂清单",mine:"矿厂清单",product:"产品清单",other:"其他"},error:"错误",pass:"通过",noErrors:"未发现错误",totalErrors:"发现 {{count}} 个错误",goToField:"定位字段",requiredField:"{{field}} 为必填项。",requiredCompanyQuestionComment:"需要填写备注:{{field}}。",requiredProductList:"申报范围为 B 时必须填写产品列表。",requiredSmelterList:"{{field}} 需要填写冶炼厂记录。",invalidEmail:"邮箱格式不正确:{{field}}。"},Y1={subtitle:"基于注册中心元数据的版本概览。",templateName:"模板名称",currentVersion:"当前版本",defaultVersion:"默认版本",totalVersions:"版本总数",availableVersions:"可用版本",currentTag:"当前",defaultTag:"默认"},Z1=JSON.parse('{"cmrt":{"6.5":{"instructions":["RMI 网址:(www.responsiblemineralsinitiative.org) 培训和指导、模板、负责任矿物审验流程合规冶炼厂列表。","介绍","此冲突矿产报告模板(CMRT 模板)是由负责任矿物计划 (RMI) 创建的免费标准报告模板。该模板促进了通过关于矿产原产国、所用冶炼厂和精炼厂的供应链来进行信息传输,并且支持法律合规性*。该模板还促进识别新的冶炼厂和精炼厂,以通过负责任矿物审验流程,对这些厂家进行潜在审核**。\\n\\nCMRT 旨在让下游企业披露其供应链有关的信息(准确来讲,不包括冶炼厂)。如果贵公司是 3TG 冶炼厂或精炼厂,根据 RMAP 协议,我们建议您在冶炼厂列表选项卡中输入贵公司的名称。\\n\\n填写表格时,单元格条目不应以“=”或“#”开头。","* 在 2010年,关注来源于刚果民主共和国 (DRC) 或毗邻国家或地区“冲突矿产”的《多德-弗兰克华尔街金融改革与消费者保护法》(U.S. Dodd-Frank Wall Street Reform and Consumer Protection Act) 正式通过。SEC 公布了最终规则,要求所有美国上市公司披露冲突矿产来源(有关规则,请访问 http://www.sec.gov/rules/final/2012/34-67716.pdf)。该规则参考了“经济合作与发展组织关于来自冲突影响和高风险区域之矿石的负责任供应链尽职调查指南”(http://www.oecd.org/dataoecd/62/30/46740847.pdf),明确了供应商如何制定政策、尽职框架和管理体系。\\n** 有关信息,请参见“负责任矿物计划”(www.responsiblemineralsinitiative.org)。\\n2017 年,欧洲议会和理事会 2017 年 5 月 17 日第 2017/821 号条例(欧盟)通过,该条例规定了进口源自受\\n冲突影响和高风险地区的锡、钽和钨及其矿石以及黄金的欧盟进口商的供应链尽职调查义务(请参见 https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=OJ:L:2017:130:FULL&from=EN)","公司信息的填写说明(第 8 至 22 行)。\\n请仅以英文作答","注:带星号 (*) 的字段为必填。","1. 插入贵公司的法定名称。请勿使用缩写。在此字段中,您可以选择添加其他商业名称、营业名称等。","2. 选择贵公司的申报范围。范围选项为:\\n\\nA. 全公司\\nB. 产品(或产品列表)\\nC. 用户自定义 \\n\\n对于“全公司”,申报涵盖公司产品或母公司生产的产品物质整体。如果用户在公司级别中报告冲突矿产数据,他们将报告关于其生产的所有产品的冲突矿产数据。\\n\\n如果选择范围为“产品(或产品列表)”,将显示产品列表的工作表选项卡。如果选择了此范围,则必须在“产品列表”工作表的 B 列中列出此申报范围涵盖的产品回复方产品序号。可选择是否在“产品列表”工作表的 C 列中列出回复方的产品名称。\\n\\n如果选择范围为“用户自定义”,用户必须描述 3TG 披露适用的范围。此类范围应由供应商在文本字段内予以定义,并确保客户或文档接收人可以清楚理解。例如,公司可提供链接来说明信息。\\n\\n此为必填字段。","3. 插入贵公司的唯一识别序号或编号(DUNS 号码、VAT 号码、客户特定识别码等)","4. 插入唯一识别序号或代码出处(例如“DUNS”、“VAT”、“客户”等)","5. 插入贵公司的完整地址(街道、城市、州、国家或地区、邮政编码)。此为必填字段。","6. 插入对此申报信息内容负责的联系人姓名。此为必填字段。","7. 插入联系人的电子邮件地址。如果没有电子邮件地址,请说明“无”或“不适用”。如留空此字段,会导致此表格出错。此为必填字段。","8. 插入联系人的电话号码。此为必填字段。","9. 插入负责申报信息内容的人员姓名。授权人可能与联系人不同。请勿填写“相同”或相似信息,而需提供授权人的姓名。此为必填字段。","10. 输入授权人的职位。 此为选填字段。","11. 输入授权人的电子邮件地址。如果没有电子邮件地址,请声明“无”或“不适用”。如留空此字段,会导致表格出错。此为必填字段。","12. 插入授权人的电话号码。此字段自由选择填写。","13. 请使用“日-月-年”的格式输入申报日期。此为必填字段。","14. 例如,用户应将文件名保存为“公司名-日期.xls”(日期格式为年-月-日)。","八道尽职调查问题的填写指南(第 24 至 71 行)。\\n请仅以英文作答","八道题明确了每种金属的用途、原产地和采购识别信息。这些问题旨在收集关于公司产品中 3TG 使用情况的信息,以确定法规适用情况。答案应与公司信息部分所选择的“申报范围”相对应。此部分中的答案可用于确定 3TG 报告的使用情况和完整性。","对于八道必答题,请使用下拉菜单选项,为每种金属提供答复。所有 3TG 都必须完成此部分中的问题。如果给定金属之问题 1和 2 的回答为肯定,则须完成该金属的后续问题,并应完成\\n关于公司总体尽职调查项目的后续尽职调查问题(A 至H)。","1. 这是两个问题中的第一道问题,其回答用来确定 3TG 是否在冲突矿产报告要求的范围内。此问题以 SEC 在关于确定 3TG 是否对于产品“功能或生产有必要”的最终规则之准则为准。SEC 准则以此假设为依据:如果 3TG 对于产品的广泛预期功能、用法或用途没有必要,则产品供应链中的公司不会有意添加 3TG 到该产品或产品的任何子组件中。同样地,准则假设 3TG 对于产品的生产没有必要,除非其被有意添加到该商品的生产流程中。此问题的答复用于排除任何痕量级杂质或自然生成的副产品,如钢中的锡。必须为每个 3TG 回答此问题。\\n\\n此问题询问是否有任何冲突矿产在贵公司生产或外包生产的产品中用作原材料、组件或添加物(包括原材料和组件)。原材料、组件、添加物、磨具和切削工具中的杂质不在此调查范围。\\n\\n必须为每个 3TG 回答此问题。此问题的有效回答为“是”或“否”。此问题必须作答。","如果回答为“否”,某些公司需要进一步求证,请在注释栏中详细说明。","2. 对于对问题 1 回答“是”的每个情况,必须为每个 3GT 回答此问题。这是两个问题中的第二个问题,其答复用来确定 3TG 是否在 SEC 关于确定 3TG 是否对产品功能或生产有必要的最终规则中所述的冲突矿产报告要求范围内。此问题取决于问题和对问题 1 的答复。此问题旨在确定在产品生产过程中有意添加或纳入的 3TG(若一定数量的 3TG 仍保留在成品中)。这包括可能并非要成为成品中的一部分以及可能并非对产品的功能有必要,而只是作为生产过程的残留物存在的 3TG。在很多情况下,制造商可能已在生产过程中试图除去或促进消耗 3TG,但还是有一定数量的 3TG 残留。若在生产过程中添加的 3TG 被完全移除,因此在该过程完成后,将没有 3TG 残留,对此问题的答复将是否。\\n\\n必须为每个 3TG 回答此问题。此问题的有效回答为“是”或“否”。此问题必须作答。","3. 这是要申报存在于一种产品或多种产品中的 3TG 之任何部分的源产地是刚果民主共和国或其毗邻国家或地区(请指明)。如果供应链中的任何冶炼厂从所指明的国家或地区进行采购,则对此问题的回答应为“是”,即使该等冶炼厂位于 RMI 合规冶炼厂和精炼厂列表中。有关更多信息,请参见 RMI 的冲突矿产尽职调查指南:http://www.responsiblemineralsinitiative.org/additional-training-and-resources/guidance-documents/。\\n\\n以“是”、“否”或“未知”来回答此问题。如果回答“是”,则建议在注释部分提供证明。\\n\\n如果问题 1 和问题 2 就特定金属的回答为“是”,必须为该金属回答此问题。","4. 这是要申报一种产品或多种产品中 3TG 的任何部分的原产地是受冲突影响和高风险地区 (CAHRA)。\\n\\n如果供应链中的任何冶炼厂从目标国家或 CAHRA 进行采购,则对此问题的答复应为“是”,即使该等冶炼厂被列入 RMI 合规冶炼厂和精炼厂名单。有关更多信息,请在此处查看 RMI 的冲突矿产尽职调查指南:http://www.responsiblemineralsinitiative.org/training-and-resources/publications-and-guidance/。\\n\\n以“是”、“否”或“不知道”来答复此问题。如果回答“是”,则建议在注释部分提供证明。如果对问题 1 和 2 就特定金属的答复为“是”,必须针对该金属回答此问题。","5. 此申报确定存在于产品中且对于该产品的功能有必要的 3TG 是否来自回收料或报废料。\\n\\n请以“是”、“否”或“未知”来回答此问题。如果问题 1 和问题 2 就特定金属的回答为“是”,必须为该金属回答此问题。\\n\\n回答“是”表示 100% 的 3TG 来自回收料或报废料。回答“否”表示部分 3TG 不是来自回收料或报废料。回答“未知”表示使用者不知道 100% 的 3TG 是否来自回收料或报废料。","6. 此问题是要确定公司是否有理由相信已从提供本申报范围内产品中含有 3TG 的所有直接供应商得到冲突矿产披露。本问题允许的回答包括:\\n\\n­ 100%\\n­ 大于 90%\\n­ 大于 75%\\n­ 大于 50%\\n- 50% 或更少\\n- 完全没有\\n\\n\\n如果问题 1 和问题 2 就特定金属的回答为“是”,则必须为该金属回答此问题。","7. 此问题是要核实供应商是否有理由相信他们已识别出提供此申报涵盖之产品中 3TG 的所有冶炼厂。本问题的回答包括“是”或“否”,并请就情况说明,例如冶炼厂列表。\\n\\n如果问题 1 和问题 2 就特定金属的答复为“是”,必须为该金属回答此问题。","8. 此问题是要核实经确定为提供此申报范围涵盖之产品中含有任何 3TG 的所有冶炼厂是否已在此申报中报告。本问题的回答包括有“是”或“否”,并请就情况说明,例如冶炼厂列表。如果问题 1 和问题 2 就特定金属的答复为“是”,必须为该金属回答此问题。","在注释部分提供您的意见,以进一步说明您的回答。","完成问题 A 至 H 的说明(第 75 至 89 行)。如果问题 1 和 2 就任何金属的回答为“是”,必须回答问题 A 至 H。\\n请仅以英文作答","根据经济合作与发展组织 (OECD) 针对“责任供应链中来自受冲突影响地区及高风险地区的矿产”所编写的尽职调查指南(OECD指南),“尽职调查”的定义是“通过持续、积极、有效的方法,确保所有企业尊重人权及不做有助于冲突活动的行为。“尽职调查”必须成为公司无冲突采购策略的一个组成部份。所列问题 A 至问题 H 的目的是对贵公司不使用冲突矿产采购策略中的尽职调查工作进行评估。对这部份问题的回答将体现出贵公司执行尽职调查工作的范围,并不应仅限于公司资料部分里所选择的”申报范围”。","A. 这是披露公司是否具有负责任矿产采购政策的申报。请以“是”或“否”来回答此问题。须在问题注释字段提供说明。\\n\\n此问题必须作答。","B. 这是披露公司的负责任矿产采购政策是否可在公司网站上获取的申报。请以“是”或“否”来回答此问题。如果回答“是”,用户应当在问题注释字段指出 URL。\\n\\n此问题必须作答。","C. 此申报是要确定公司要求直接供应商从经过验证的无冲突矿产的冶炼厂处采购 3TG。请以“是”或“否”来回答此问题。须在问题注释字段提供说明。\\n\\n此问题必须作答。","D. 请答复“是”或“否”,以披露贵公司是否已实施负责任矿产采购尽职调查措施。该申报并非旨在提供公司的尽职调查措施详情,而仅说明公司已实施了尽职调查措施。可接受尽职调查措施的具体情况,应当由请求者和供应商决定。\\n\\n尽职调查措施的示例可能包括:向供应商传达贵公司对负责任矿产供应链的预期以及将该等预期纳入到合同中(如可能);确定和评估供应链中的风险;设计和实施战略以应对确定的风险;核实贵公司的直接供应商符合不使用刚果民主共和国涉及冲突的冲突矿产的政策等。这些尽职调查措施的示例与国际公认的经济合作与发展组织指南涵盖的指导方针保持一致性。\\n\\n此问题必须作答。","E. 此问题是要披露公司是否要求供应商填写冲突矿产申报。接受的回答载列如下,在部分情况中,可能需要进一步解释,即提供用于收集信息的格式。如果回答为“是”,请使用其他格式,用户须在问题注释字段提供说明。本问题允许的回答包括:\\n\\n- 是,符合 IPC-1755 [例如 CMRT]\\n- 是,使用其他格式(请描述)\\n- 否\\n\\n此问题必须作答。","F. 请答复“是”或“否”。在注释部分,贵公司可提供贵公司所采用方法的其他信息。示例:\\n\\n “第三方审核”- 由独立第三方进行的供应商现场审核。\\n “仅审核文件编制情况”- 对供应商提交的记录以及由独立第三方或贵公司工作人员进行的文件编制予以审核。\\n “内部审核”- 由贵公司工作人员进行的供应商现场审核。\\n\\n此问题必须作答。","G. 此问题是要披露公司是否受 SEC 规则规限。请以“是”或“否”来回答此问题。须在问题注释字段提供说明。此问题必须作答。要了解更多信息,请参见 www.sec.gov。","H. 此问题是要披露公司是否受 SEC 规则、欧盟条例或上述两者的规限。请以“是,受 SEC 规则规限”、“是,受欧盟条例规限”、“是,受 SEC 规则和欧盟条例规限”或“否”来回答此问题。须在问题注释字段提供说明。此问题必须作答。要了解关于 SEC 规则的更多信息,请参见 www.sec.gov。\\n要了解关于欧盟条例的更多信息,请参见 https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX:32017R0821&from=EN。","冶炼厂列表选项卡的填写说明。请仅以英文作答","注:带星号 (*) 列表示必填字段。","此模板允许使用冶炼厂查找来识别具体的冶炼厂。必须按从左到右的顺序填写 B 列和 C 列,以使用冶炼厂查找功能。\\n对于各金属/冶炼厂/国家或地区组合,应使用分割线。","1. 冶炼厂识别输入列 - 如果您知道冶炼厂识别号码,请在 A 列输入号码(B、C、E、F、G、I 和 J 列将自动填入)。A 列不会自动填入。","2. 金属 (*) - 在下拉菜单中,选择正在输入信息的冶炼厂所提炼的金属。 此为必填字段。","3. 冶炼厂查找 (*) - 从下拉菜单中选择。列表列出了模板发布时已知的冶炼厂。如果冶炼厂不在列表中,请选择“冶炼厂未列出”。此时,您可以将该冶炼厂的名称输入 D 列。如果您不知道冶炼厂的名称或地点,请选择“冶炼厂尚未被识别”。如选择此选项,D 和 E 列将会自动填入“未知”。此为必填字段。","4. 冶炼厂名称 (1) - 如果选择 C 列中的冶炼厂名称,请填写冶炼厂的名称。如果选择 C 列中的“冶炼厂未列出”,此字段将自动填入。此为必填字段。","5. 冶炼厂所在国家或地区 (*) - 如果选择 C 列中的冶炼厂名称,此字段会自动填入。如果选择 C 列中的“冶炼厂未列出”,请使用下拉菜单,选择冶炼厂所在国家或地区。此为必填字段。","6. 冶炼厂识别 - 依据冶炼厂和精炼厂识别系统每一冶炼厂或精炼厂均有一独一无二的标识。相信会有一间冶炼厂或一间精炼厂存在多个名称的情况出现。 因此,唯一的冶炼厂标识能将其他名称和别名进行统一。","7. 冶炼厂识别号码 - F 列包括所有的冶炼厂识别号码。 如果在 C 列中使用下拉框选择冶炼厂名称,此字段会自动填入。","8. 冶炼厂所在街道 - 提供冶炼厂所在街道的名称。此为选填字段。","9. 冶炼厂所在城市 - 提供冶炼厂所在城市的名称。此为选填字段。","10. 冶炼厂地点:州/省(如适用)- 提供冶炼厂所在的州/省。此为选填字段。","11. 冶炼厂联系人名称 - 冲突矿产报告模板 (CMRT) 在所要求到的申报人的供应链中各间公司统一使用, 确保各公司都符合经济合作与发展组织来自受冲突影响和高风险区域的矿石的负责任供应链的尽职调查指南的要求,并符合美国证劵交易所就冲突矿产问题公布的最终规则。\\n\\n如果在统一使用此报告模板中,所在国家或地区有保护个人信息的法律法规,填写个人联系信息会有可能触犯法律法规,则建议申报公司在填写“冶炼厂联系人姓名”和“冶炼厂联系人电子邮件”列时,先确保联系人本人同意公开其联系信息。 。\\n\\n如果申报人已获得公开联系信息的授权信息,请输入与之合作的冶炼厂之联系人姓名。","12. 冶炼厂联系人电子邮件 - 填写被确定为冶炼厂联系人的电子邮件。例如: John.Smith@SmelterXXX.com。填写此字段栏前,请阅读冶炼厂联系人姓名填写指引。","13. 矿场名称 - 此字段可让公司为冶炼厂正在使用的实际矿场取名。如果已知实际矿场的名称,请输入该名称。如果冶炼厂的所有原料均来自回收料或报废料资源,则输入“回收料”或“报废料”以取代矿场名称,并在 P 列回答“是”。\\n\\n“根据 RMI 确认 RCOI”可能是该问题可接受的回答之一。","14. 矿场地点(国家或地区)- 无限制文本字段,公司可在此注明冶炼厂正在使用的矿场地点。请输入矿场所在国家或地区。如果原产国未知,则输入“未知”。如果冶炼厂的所有原料均来自回收料或报废料资源,则输入“回收料”或“报废料”以取代原产国。此为选填字段。\\n\\n“根据 RMI 确认 RCOI”可能是该问题可以接受的回答之一。","15. 表明冶炼厂是否仅从回收料或报废料资源中获取冶炼过程的来料。此为选答问题。本问题允许的回答包括:\\n\\n- 是\\n- 否\\n- 未知","16. 注释 - 无格式限制的文字栏,可输入有关冶炼厂的任何意见。例如:冶炼厂正在被 YYY 公司收购","检查工作表用于确认是否所有此模板中需要的信息均已提供、是否实时更新和是否经得起任何在填申报时进行查阅。 此工作表用于确认申报完毕。\\n\\n用此表检查是否已填妥所有字段(已填字段将高亮显示为绿色)。如果不是,请检查显示红色的字段,并阅读 C 列中的备注信息,并按指示操作。填表人可用 D 列中的 URL 直接进入要填写的字段。","条款及细则","负责任矿物审验流程(“流程”)、合规冶炼厂列表(“列表”)及报告模板和工具表,包括但不限于冲突矿产报告模板(统称为“工具”),所提供的一切信息仅供参考之用,并以其上载日期为准。在列表或工具表中,如有任何不准确或遗漏的信息,均非特拉华州非股份公司责任商业联盟 (RBA) 的责任所在。是否使用和/或如何使用列表上的全部资料或部分资料或使用任何工具,用户拥有唯一及绝对的决定权​​。使用列表或任何工具之前,请向自己的法律顾问征询意见。列表或工具中没有任何一部份会构成法律咨询。使用列表或任何工具均属自愿。","RBA 皆不会为名单或任何工具作任何的申述或保证。列表和工具依据“原样”和“现有”来提供。RBA 特此声明,不做任何性质的保证、明示、暗示或其他方式,或说明贸易或关税,包括但不限于任何隐含的适销性、非侵权性、质量、标题、为某一特定用途的适用性而作完整性或准确性的保证。","根据相关法律所允许的最大限度,RBA 声明拒绝任何损失、费用或任何性质的损害之责任,包括但不限于因用户使用名单或工具表而造成特殊、偶然、惩罚性、直接、间接的或后果性损害或失去收入或利润,无论是以侵权、合同、章程或其他方式造成的损害,即使他们已被告知有这种损害的可能性。","鉴于对列表和/或工具表单的使用,用户在此同意:a) 让 RBA 及其相关管理人员、董事、代理、员工、志愿者、代表、承包商、继承人、指定人解除并永远免除责任,而不会因使用列表或任何工具导致或产生的任何及全部索赔、行动、损失、诉讼、损害、判决、征费和处决而受损,这包括用户有过或曾经可以、应当或者可能拥有或声称拥有对 RBA 及其相关管理人员、董事、代理、员工、志愿者、代表、承包商、继承人、指定人的索赔;b) 保障和捍卫 RBA 及其相关管理人员、董事、代理、员工、志愿者、代表、承包商、继承人、指定人的权利,确保其不会因用户使用列表或任何工具而导致或产生的任何及全部索赔、行动、损失、诉讼、损害、判决、征费和处决而受损。","如果此条款及细则的某个条款部分在法律下无效或不可执行,被视为无效的部分应仅限于该无效或不能强制执行的部份,而不以任何方式影响到条款及细则的其余条款。","通过登入和使用该列表或任何工具,并经过考量,该用户同意上述条款。"],"smelterList":[],"productList":[],"definitions":[{"term":"3TG 是钽 (Tantalum)、锡 (Tin)、钨 (Tungsten)、金 (Gold) 的缩写","definition":"钽、锡、钨、金"},{"term":"授权人","definition":"此字段定义负责申报内容的人员。授权人可能与联络人不同。请勿填写“相同”或相似信息,需提供授权人的姓名。"},{"term":"受冲突影响和高风险地区 (CAHRA)","definition":"受冲突影响和高风险的地区是处于武装冲突状态的地区,脆弱的冲突后地区以及治理和安全薄弱或根本不存在的地区,例如失败的国家,广泛而系统地违反国际法的地区,包括侵犯人权行为。"},{"term":"冲突矿产","definition":"根据 2010 年通过的《多德-弗兰克华尔街金融改革与消费者保护法》(Dodd-Frank Wall Street Reform and Consumer Protection Act) 的法律定义,第 1502(e)(4)条:“冲突矿物”是指 (A) 钶-钽(钶钽)、锡石、金、黑钨或其衍生物质;或 (B) 任何由美国国务卿定性为引起刚果民主共和国或毗邻国家或地区财务冲突的矿产及其衍生物。(详细信息,请参见 http://www.sec.gov/about/laws/wallstreetreform-cpa.pdf)"},{"term":"指明国家或地区","definition":"2010 年,通过的《多德-弗兰克华尔街金融改革与消费者保护法》(Dodd-Frank Wall Street Reform and Consumer Protection Act) 定义了所禁止的源产地国家,即刚果民主共和国及与其分享国际公认国境线的 9 个国家,分别是安哥拉、布隆迪、中非共和国、刚果共和国、卢旺达、南苏单、坦桑尼亚、乌干达和赞比亚。"},{"term":"申报范围或种类","definition":"为实现本模板的设计目的,“申报范围”明确了申报公司所申报信息的适用性。申报范围可能涵盖了整间申报公司所提供的产品和服务或其部份适用的产品和服务。此模板也可用于单一、多种或申报人自定义的产品。 “用户自定义”的申报范围可用于仅部分公司营运适用或部分产品系列适用的情况。"},{"term":"多德-弗兰克","definition":"2010 年,美国通过立法《多德-弗兰克华尔街金融改革与消费者保护法》(Dodd-Frank Wall Street Reform and Consumer Protection Act) 第 1502 条(简称“多德-弗兰克”) (http://www.sec.gov/about/laws/wallstreetreform-cpa.pdf)"},{"term":"刚果民主共和国","definition":"刚果民主共和国"},{"term":"刚果民主共和国无冲突的冲突矿产","definition":"产品不含能直接或间直资助和受益于刚果民主共和国或毗邻国家内武装组织的物质成分。资料来源:2010 年,美国通过立法《多德-弗兰克华尔街金融改革与消费者保护法》第 1502 条 (http://www.sec.gov/about/laws/wallstreetreform-cpa.pdf)"},{"term":"金精炼厂(冶炼厂)","definition":"金精炼是指一种从黄金和含金量低的物料中提炼出纯度达 99.5% 或更高的黄金的冶金操作。请参考负责任矿物审验流程中的审核标准,了解对这类型金属的完整描述:https://www.responsiblemineralsinitiative.org/minerals-due-diligence/standards/。"},{"term":"独立的第三方审核机构","definition":"冶炼厂审核中提到的“独立的第三方审核机构”是私营部门组织,它评估冶炼厂或精炼厂对物料的可追朔性是否达到负责任矿物审验流程 (RMAP) 中的标准或相关审核标准。为确保中立及公正,这类机构及其审核团队必须与被审核方无利益交往。"},{"term":"有意添加","definition":"“有意添加”通常指故在产品生命周期的一个或多个阶段中使用的旨在赋予特定属性、反应或质量的物质。\\n\\n而美国证券交易委员会没有在最终规则* 里为措辞“有针对性添加”进行定义。最终规则里对此的序文表示为:\\n“我们认为有针对性地添加,而不是产品天然拥有,是一个判断冲突矿产是否必须在产品功能或生产制造中的重要因素。这与谁添加无关,只在乎冲突矿产有否存在于产品中。决定冲突矿产对产品是否需要,并非取决于冲突矿产是否直接添加进产品或直接添加进来自第三方的产品部件。所以,申报人必须报告含冲突矿产产品的总数,并与供应商合作共同遵守要求。 在判断产品中的冲突矿产是否需要时,申报人必须考虑其产品中有否冲突矿产,即使是原本就存在于由供应商提供的零部件中。”\\n\\n*(56296 Federal Register / Vol. 77, No. 177 / Wednesday, September 12, 2012 / Rules and Regulations)"},{"term":"IPC","definition":"位于伊利诺斯州班诺克本的 IPC (www.IPC.org) 是一个国际性组织。 它致力于提升其 3,400 个来自电子工业各层面会员的竞争优势和财务成就。会员有从事设计,线路板生产,电子装配,测试等。 IPC 作为一个会员至上和一个为行业制定标准,提供培训、调研市场、政策制定提供主要资源的机构,它支持多种计划项目以满足一个约值 2 万亿美元的行业的各种需要。IPC 在新墨西哥州的道斯、华盛顿特区、瑞典的斯德哥尔摩、俄罗斯的莫斯科、印度的班加罗尔、秦国曼谷,以及中国的上海、深圳、成都、苏州和北京均驻有办事处。"},{"term":"IPC-1755 冲突矿产数据交换标准","definition":"此 IPC 标准要求供应商与其客户交换冲突矿产的信息。为迎合大范围成员的需要,此标准对单一申报中的产品范围的要求是相当灵活的。 故此标准不能作为合规的指引。"},{"term":"产品功能需要","definition":"SEC 在最终规则* 中没有给出此词的正式定义。但是,规则给予了一些指引:一种冲突矿产被认为对某种功能或产品是需要的,必须满足以下几点: 1) 有针对性地添加到产品或组件,而且不是产品天然拥有;2) 对于满足产品所期望达到的功能、使用或用途是必要的;3) 与产品的装饰、美化或修饰无关,而无论是否产品的原旨就是装饰或美化。 \\n\\n注:适用于冲突矿产必须存在于产品中。 \\n\\n*(56296 Federal Register / Vol. 77, No. 177 / Wednesday, September 12, 2012 / Rules and Regulations)"},{"term":"产品生产需要","definition":"SEC 在最终规则* 中没有给出此词的正式定义;但是,规则给予了一些指引:一种冲突矿产被认为对某种功能或产品是需要的,必须满足以下几点: 1) 是添加于产品制造流程中,而非存在于制造产品的工具、机器或设备中(如计算机或电源线);2) 存在于产品中(适用于必须含在产品中);3) 为产品所需。\\n\\n*(56296 Federal Register / Vol. 77, No. 177 / Wednesday, September 12, 2012 / Rules and Regulations)"},{"term":"经济合作与发展组织(Organization for Economic Co-operation and Development,OECD)","definition":"经济合作与发展组织"},{"term":"产品","definition":"公司的产品或成品是指在制造生产阶段或最后完成阶段的物料或物品,并且已可以交付或销售给客户。"},{"term":"责任商业联盟(Responsible Business Alliance,RBA)","definition":"责任商业联盟 (www.responsiblebusiness.org)"},{"term":"回收或废料源","definition":"回收料或报废料是指循环使用的金属。它们是从最终用户使用过的产品中回收,或在产品制造过程产生的废料。回收金属包括多余的、废弃的、缺陷的、报废的金属材料。这些材料能用于循环再生钽、锡、钨、金。回收利用金属的定义中不包括经部份加工过的矿产、未经加工过的矿产及其他种类非金属矿石的副产品。"},{"term":"负责任矿物审验流程 (RMAP)","definition":"负责任矿物审验流程 (RMAP) 是由责任商业联盟 (RBA) 所制定,用于提高公司对金属责任采购进行查证的能力。有关 RMAP 的更多信息,请访问 http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/。"},{"term":"负责任矿物计划","definition":"负责任矿物计划由责任商业联盟 (RBA) 于 2008 年发起成立,并已成为公司供应链就冲突矿产问题而最广泛使用和认可的标准。 今天,来自 10 种不同行业的超过 360 家公司加入了负责任矿物计划,共同促成了一系列查证工具和资源的落实,例如负责任矿物审验流程、冲突矿产报告模板、合理的原产国信息查询和一系列无冲突矿产采购指引。另外,负责任矿物计划组织还会定期举办关于冲突矿产专题的工作坊、参与政策制度的修定、与前沿的社会团体和政府机构研讨等。有关更多信息,请造访http://www.responsiblemineralsinitiative.org"},{"term":"无冲突冶炼厂计划合规冶炼厂列表","definition":"负责任矿物审验流程 (RMAP) 中的合规冶炼厂列表包含所有被评估并且符合标准的冶炼厂和精炼厂。其中的标准有负责任矿物审验流程 (RMAP)、负责任矿物计划 (RMI) 或其他对等机构计划(例如责任珠宝委员会或伦敦金银市场协会)。如果冶炼厂或精炼厂不在列表内,则表示其未完成 RMAP 评估或不符合 RMAP 标准要求。\\n\\n要查看经验证符合 RMAP 的冶炼厂和精炼厂列表,请访问 https://www.responsiblemineralsinitiative.org/facilities-lists/active-conformant-facilities-list/。"},{"term":"证券交易委员会 (SEC)","definition":"美国证券交易委员会 (www.sec.gov)"},{"term":"冶炼厂","definition":"冶炼厂或精炼厂是指购买并加工矿石、矿渣、回收料、报废料从而提炼成金属或含金属的介质。产品有纯度为 99.5% 或更高的金属、金属粉体、金属锭、金属条、金属粒子、金属氧化物、金属盐类等。术语“冶炼厂”和“精炼厂”在各类型的刊物经常互用。"},{"term":"冶炼厂识别序号","definition":"负责任矿物计划 (RMI) 会编发独一无二的识别号码给由供应链成员申报上来的冶炼厂或精炼厂,无论其是否已确认过符合负责任矿物审验流程 (RMAP) 中审核标准所定义冶炼厂的物征。"},{"term":"钽 (Ta) 冶炼厂","definition":"钽冶炼厂(或称钽加工厂)是指能转换含钽矿石、高钝度钽矿石、矿渣、二手金属成含钽介质或其它含钽产品,用于直接销售或进一步深加工成其它含钽产品,例如钽粉、钽部件、氧化钽、合金、焊条、热压结条等的工厂。请参考 RMAP 中的审核标准,以了解对这类型金属的完整描述。 https://www.responsiblemineralsinitiative.org/minerals-due-diligence/standards/。"},{"term":"锡 (Sn) 冶炼厂","definition":"一级锡冶炼厂指的是拥有一种以上处理锡精矿设备、生产锡金属的工厂。二级锡冶炼厂 是指拥有一种以上设备可将二次料件还原为粗锡、高纯度锡或是锡制品(例如焊锡)的工 厂。参与 RMAP 审计的冶炼厂属于上述其中一种,或是同时拥有上述两种类型的冶炼厂。请参考适用于这类金属的 RMAP 审计协议完整描述:\\nhttps://www.responsiblemineralsinitiative.org/minerals-due-diligence/standards/。"},{"term":"钨 (W) 冶炼厂","definition":"钨冶炼厂指拥有一种或多种设施能使含钨矿石(黑钨矿和白钨矿)、钨精矿、含钨轴承废料(次件)转换为含钨介体,例如仲钨酸铵 (APT)、铵元钨 (AMT)、钨铁、钨氧化物,并将含钨介体用直接销售或进一步制造含钨产品(钨粉或钨碳粉)的工厂。 请参考负责任矿物审验流程 (RMAP) 中的审核标准,以了解对这类金属的完整描述:https://www.responsiblemineralsinitiative.org/minerals-due-diligence/standards/。"}],"smelterLookup":["以下目录是截止此模板发布时 RMI 的最新冶炼厂名称/别名信息。此目录实时更新,可于下述 RMI 网站查询最新版本:http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/exports/cmrt-export/。冶炼厂存在于此目录中不保证它就是负责任矿物审验流程内的目前有效或合规的冶炼厂。\\n\\n有关有效或合规标准冶炼厂名称的最新准确列表,请访问 RMI 网站 www.responsiblemineralsinitiative.org。\\n\\nB 列包括的名称表示供应链对于特定冶炼厂通常认可和报告使用的公司名称。这些名称可能包括公司曾用名、备用名称、简称、或其他变体。虽然这些名称可能不是 RMI 标准冶炼厂名称,但参考名称有助于识别列在冶炼厂查找中的 C 列之冶炼厂。\\n\\n在 ASCII 字符集中,C 列是正式标准冶炼厂名称列表。大多数冶炼厂的这两列具有相同条目,然而,如果常用名称与标准名称不同,则应在 B 列中注明这种变化。"]}},"emrt":{"2.1":{"instructions":["RMI 网站:(http://www.responsiblemineralsinitiative.org/)","介绍","此扩展矿物报告模板 (EMRT) 是 Responsible Minerals Initiative®(负责任矿物计划® (RMI®))创建的免费标准化报告‏‎模板。该模板促进了通过关于矿产原产国、所使用冶炼厂、精炼厂和加工厂的供应链的信息传输,并且支持了按照《经济合作与发展组织关于来自受冲突影响和高风险地区矿石的负责任供应链尽职调查指南》(OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-Af‎‎‎fected and High-Risk Areas) 执行尽职调查。该模板还促进辨识新的冶炼厂和精炼厂以通过负责任矿物审验流程对这些厂家进行潜在的审核。\\n\\nEMRT 旨在供下游企业披露与其供应链\\n(截至但不包括冶炼厂)相关的信息。如果贵公司是冶炼厂或精炼厂,我们建议您在“冶炼厂目录”选项卡中输入贵公司名称。\\n\\n填好的表格中不应有单元格条目以“=”或\\n“#”开头。","公司资料填写说明(第7-26行)。只限英文作答","注:带星号(*)的栏目必须填写","1. 插入贵公司的法定名称。请不要使用缩写。\\n在此字段中,您可以选择添加其他商业名称、营业名称等。此栏必须填写。","2. 选择贵公司的申报范围。范围的选项为:\\n\\nA. 全公司\\nB. 产品(或产品清单)\\nC. 自定义 \\n\\n如果选择范围为“全公司”,申报包括该公司的全部产品或由其母公司生产的全部产品物质。如果用户从公司层面报告指定矿产数据,则需要报告关于其生产的所有产品的数据。\\n\\n如果选择范围为“产品(或产品清单)”,将显示产品清单的工作表选项卡。如果选择了此范围,则必须在“产品清单”工作表的 B 列中列出此申报范围涵盖的\\n产品的回复方产品序号。可以选择是否在“产品清单”工作表的 C 列中列出回复方产品名称。\\n\\n如果选择范围为“自定义”,用户必须描述指定矿产披露适用的范围。该分类的范围应当由供应商在文本字段中定义,并且易于被客户或文档的接收人理解。举个例子,公司可以提供阐明信息的链接。\\n\\n此栏必须填写。","3. 决定贵公司的矿产申报范围。这些字段包含六种 EMRT 矿物。要从声明中删除某种矿物,用户可选择“Delete [Mineral]”。提出请求的公司必须说明哪些矿产属于申报范围。问题 1 至 7 和 C 会自动按字母顺序填充的矿产。\\n\\n这是必填项。","3. 输入贵公司的唯一识别序号或编号\\n(DUNS号码,VAT号码,客户特定识别码等)","4. 输入唯一识别序号或编号的出处 (如“DUNS”,“VAT”,“客户”等)","5. 插入贵公司的完整地址(街道、城市、州、国家或地区、邮政编码)。此为必填字段。","6. 插入与申报信息内容相关的联系人姓名。\\n此栏必须填写。","7. 插入联系人的电子邮件地址。如果没有电子邮件地址,请说明“无”或“不适用”。如留空此字段,会导致此表格出错。此为必填字段。","8. 插入联系人的电话号码。此栏必须填写。","9. 插入负责申报信息内容的人的姓名。\\n授权人可能是另一人而非联系人。使用“相\\n同”字眼或类似认定以提供授权人的姓名是不正确的。此栏必须填写。","10. 输入授权人的职位。 此为选填字段。","11. 插入授权人的电子邮件地址。\\n如果电子邮件地址不可用,说明“不可用”或“n/a”。空白字段可能导致表格填写错误。此栏必须填写。","12. 插入授权人的电话号码。此字段自由选择填写。","13. 请使用以下格式输入表格填写完毕的\\n日期:年—月—日。此栏必须填写。","14. 申报人应按“公司名-年月日.xlsx”\\n格式来命名并存档本报告。(日期格式为年-月-日)","六个申报范围问题的答复说明(第 28 - 107 行)。\\n仅以英文提供答复","这七个问题明确了指定矿产的用途、原产地和采购识别信息。这些问题旨在收集关于公司产品中指定矿产的使用情况和报告完整性的信息。对于这些问题的答复应当陈述公司信息部分中选择的“申报范围”。","按要求在备注部分提供备注来进一步说明您的答复。","使用下拉菜单选项提供答案。如果指定矿产的问题 1 答复是肯定的,则应完成指定矿产的所有问题,而且应完成关于公司的总体审核鉴定计划的后续审核鉴定问题(A 至 G)。","1. 此问题用于确定指定矿产是否属于报告要求的范围。此问题的答复用于排除任何痕量级杂质或自然生成的副产品。\\n\\n此问题询问是否有任何指定矿产在贵公司生产的产品(包括化合物)中用作原材料、组件或添加物。原材料、组件、添加物、磨具和切削工具中的杂质不在此调查范围。\\n\\n此问题的有效答复为“是”、“否”、“不知道”、或 “未申报”。当原料不在申报的范围内时,可以回答“对此申报不适用”。此问题必须作答。","部分公司可能要求给出“否”答复的证据,这些证据应当输入备注字段。","2. 对于对问题 1 答复“是”的每个情况,必须为指定矿产回答此问题。这是两个问题中的第一个问题,其答复用来确定指定矿产是否在冲突矿产报告模版的范围内。此问题取决于问题和对问题 1 的答复。此问题旨在确定在产品生产过程中有意添加或包含的指定矿产(若一定数量的指定矿产仍保留在成品中)。这包括可能并非要成为成品中的一部分以及可能并非对产品的功能有必要,而只是作为生产过程的残留物存在的指定矿产。在很多情况下,制造商可能已在生产过程中试图除去或促进消耗指定矿产,但还是有一定数量的指定矿产残留。若在生产过程中添加或纳入的指定矿产被完全移除,因此在该过程完成后,将没有指定矿产残留,对此问题的答复将是否。\\n\\n必须为指定矿产回答这个问题。此问题的有效答复为“是”、“否”、“不知道”。此问题必须作答。","3. 此申报是要确定一种产品或多种产品中指定矿产的任何部分的源产地是受冲突影响和高风险地区 (CAHRA)。如果供应链中的任何冶炼厂从 CAHRA 进行采购,无论此冶炼厂是否经过独立审计,则对此问题的答复应为“是”。\\n\\n为指定矿答案应该是“是”、“否”或 “不知道”。 如果回答“是”,请在备注部分提供证明。回答“不知道”是可接受的。如果对问题 1 和 2 的答复为“是”,则必须为指定矿产回答此问题。","4. 此申报确定产品中包含的指定矿产是否完全来自回收料或报废料。\\n\\n以“是”、“否”或“不知道”来答复此问题。\\n\\n答复“是”表示 100% 的指定矿产来自回收料或报废料。答复“否”表示部分原材料不是来自回收料或报废料。答复“不知道”表示用户不知道是否 100% 的原材料来自回收料或报废料。如果对问题 1 和 2 的答复为“是”,则必须为指定矿产回答此问题。","5. 此问题是要确定公司是否已经从被合理认为提供本申报范围中产品含有的指定矿产所有直接供应商处得到相关披露。本问题的允许答复有:\\n\\n­ 100%\\n- 超过 90%\\n- 超过 75%\\n- 超过 50%\\n- 50% 或以下\\n- 无\\n- 未调查\\n\\n如果对问题 1 和 2 的答复为“是”,则必须为指定矿产回答此问题。","6. 此问题是要核实供应商是否有理由相信他们已识别出提供此申报涵盖的产品中的指定矿产的所有冶炼厂。本问题的答复有“是”、“否”或“不知道”,并就情况进行说明,如冶炼厂目录。如果对问题 1 和 2 的答复为“是”,则必须为指定矿产回答此问题。","7. 此问题是要核实经确定为提供此申报范围涵盖产品中含有的任何原材料的所有冶炼厂或加工厂是否已在此申报中报告。本问题的答复有“是”、“否”或“不知道”,并就情况说明,如冶炼厂目录。如果对问题 1 和 2 的答复为“是”,则必须为指定矿产回答此问题。","问题 A – G 回答说明(113 - 137 行)。如果为指定矿产回答问题 1 和 2 的答复为“是”,则必须回答问题 A 到 G。\\n仅以英文提供答复。","《经济合作与发展组织关于来自受冲突影响和高风险地区矿石的负责任供应链尽职调查指南》(简称“经合组织指南”)将“尽职调查”定义为“一个持续的、主动性和应对性流程,通过该流程,公司可以确保其尊重人权而不会导致冲突。” 更多信息可以在 http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/.\\n\\n问题 A – G 旨在评估贵公司指定矿产采购的尽职调查活动。对这些问题的答复应当代表贵公司的完整活动范围,不仅限于公司信息部分选择的“申报范围”。对这些问题的答复应当代表贵公司的完整活动范围,不仅限于公司信息部分选择的“申报范围”。","A. 此申报是为披露公司是否具有可公开查阅的负责任矿物采购政策。以“是”或“否”来答复此问题。","B. 此申报是为披露公司的负责任矿物采购政策是否可在公司网站上获取。以“是”或“否”来答复此问题。如果答案为“是”,请在备注字段中填写 URL。此字段必须填写。","C. 此申报是要确定公司是否要求其直接供应商从经独立验证的冶炼厂和加工厂处采购指定矿产。此问题时的答案应该是“是”、“是,当多个加工厂已被验证”或“否”。 应在问题备注字段记录备注。此字段必须填写。","D. 此申报是要披露公司是否实施了负责任矿物采购尽职调查措施。此问题的目的不是要公司提供尽职调查措施的详情。可接受的尽职调查措施的具体情况应当由请求者和供应商决定。\\n\\n以“是”或“否”来答复此问题。如果答案是“是”,用户应该在问题的备注字段中概述已实施的尽职调查措施(如:《经合组织尽职调查指南》)。","E. 此问题是要披露公司是否要求其供应商填写扩展矿物报告模版。接受的答复载列如下,在部分情况中,可能需要进一步解释,即提供用于收集信息的格式。如果答复为“是,使用其他格式”,用户须在问题备注字段提供备注。本问题的允许答复有:\\n\\n- 是,根据 IPC-1755 要求(如 EMRT)\\n- 是,使用其他格式(请描述)\\n- 否\\n\\n此字段必须填写。","F. 请答复“是”或“否”。在备注部分,\\n您可以提供有关贵公司所采用方法的其他信\\n息。示例可以为:\\n\\n “第三方审计”——由独立第三方进行的供应商现场审计。\\n “仅审核文件编制情况”——由独立第三方和/或贵公司工作人员对供应商提交的记录和文件予以审核。\\n “内部审计”——由贵公司工作人员进行的供应商现场审计。\\n\\n此栏必须填写。","G. 此问题是要披露公司的审核流程是否\\n包括纠正措施管理。以“是”或“否”来答复此问题。须在问题备注字段记录备注。此栏必须填写。","冶炼厂名单工作表的填写说明。只限英文作答\\n\\n注:带星号(*)列表示此区域必须填写。","此模版可以使用冶炼厂查询清单来填写冶炼厂、精炼厂、加工厂。必须从左到右填写 B 列和 C 列,才能利用冶炼厂查询清单功能。\\n对于金属/冶炼厂/国家组合应使用分割线。","1. 冶炼厂识别输入列-如果您知道冶炼厂\\n识别号码,则在 A 列输入号码(B、C、D、\\nE、F、G、I 和 J 列将自动填入)。A 列不会自动填入。","2. 金属(*)- 在下拉菜单中选择\\n正在录入信息的冶炼厂所提炼的金属。仅当问题 1 和问题 2 中关于指定矿产的回答为“是”时,才会出现金属。此栏必须填写。","3. 冶炼厂查找 (*) - 从下拉菜单中\\n选择。目录列出了所有直到发布此申报模板时已知的冶炼厂。如果冶炼厂不在目录中时请选择‘冶炼厂没列出’。出现这种情况时请将该冶炼厂的名称输入 D 列。如果您不知道冶炼厂\\n的名称或地点,请选择‘冶炼厂尚未被识\\n别’。对于这个选项,D 和 E 列将会\\n自动填入‘未知’.","4. 冶炼厂名称 (1)- 如果在 C 列选择了\\n“冶炼厂未列出”,则填入冶炼厂名称。当在 C 列选择了冶炼厂名称后,\\n此字段将自动填充。此字段必须填写。","5. 冶炼厂所在国家 (*) - 当在 C 列选择了\\n冶炼厂名称,此字段将自动填充。如果在 C 列选择了“冶炼厂未列出”,则使用下拉菜单选择冶炼厂的国家位置。此栏必须填写。","6. 冶炼厂识别 - 依据冶炼厂和\\n精炼厂识别系统每一冶炼厂或精炼厂均有一独一无二的标识。 相信会有一间冶炼厂或一间\\n精炼厂存在多个名称的情况出现。因此,唯一的冶炼厂标识能将其它名称和别名进行统一。","7. 冶炼厂识别号码 - F 列包括所有的\\n冶炼厂识别号码。如果在 C 列中选出冶炼厂\\n名称,此栏会自动填入。","8. 冶炼厂所在街道 - 提供冶炼厂所在街道的名称。","9. 冶炼厂所在城市 - 提供冶炼厂所在城市的名称。","10. 冶炼厂地点: 州/省(如适用)- 提供冶炼厂所在的州/省。","11. 冶炼厂联系人姓名——扩展矿物报告模板 (EMRT) 在提出请求的公司的供应链公司中流传,以按照《经济合作与发展组织关于来自受冲突影响和高风险地区矿石的负责任供应链尽职调查指南》执行尽职调查。\\n\\n如果该模板在有保护个人信息立法的国家流传,在 EMRT 中分享个人信息可能会违反相关法规。因此,建议提出请求的公司采取预防措施,例如获得联系人的相关许可,以在填写“冶炼厂联系人姓名”以及“冶炼厂联系人电子邮件”列时可与供应链中的其他公司分享该信息。\\n\\"\\n如果获得了分享该信息的许可,请填入与贵公司合作的冶炼厂设施联系人姓名。","12. 冶炼厂联系电邮地址 - 填入被确认为冶炼厂联系人的电邮地址作为冶炼厂联系信息。 例如: John.Smith@SmelterXXX.com。 请在填写此栏前阅读冶炼厂联系名称指引。","13. 矿场名称——此字段供公司确定冶炼厂\\n正在使用的实际矿场。如果已知实际矿场的名称,请输入该名称。如果冶炼厂的所有原料均来自回收料或报废料资源,则输入“回收料”或“报废料”以取代矿场名称,并在 P 列回答“是”。","14. 矿场地点(国家)——这是可自由输入\\n文字的字段,供公司注明冶炼厂正在使用的矿场地点。请输入矿场所在国家。如果原产国未知,则输入“不知道”。如果冶炼厂的所有原料均来自回收料或报废料资源,则输入“回收料”或“报废料”以取代原产国。此字段自由选择填写。","15. 表明冶炼厂是否仅从回收料或报废料资源\\n中获取冶炼过程的来料。此问题自由选择答\\n复。本问题的允许答复有:\\n\\n- 是\\n- 否\\n- 不知道","16. 注释 - 用自由的格式的文字栏来输入\\n任何有关冶炼厂的意见。例如:冶炼厂正在被\\nYYY公司收购","矿厂列表选项卡的填写说明。请仅以英文作答。","1. 金属 - 在下拉菜单中,选择正在输入信息的矿厂所提炼的金属。仅当问题 1 和问题 2 中关于指定矿产的回答为“是”时,才会出现金属。","2. 从该矿厂采购的冶炼厂的名称 - 请尽可能填写从所列矿厂或矿场采购的冶炼厂的名称。","3. 矿厂名称 - 提供矿厂的名称。","4. 矿厂识别 - 依据矿厂识别系统每一矿厂均有一独一无二的标识。相信会有一间矿厂存在多个名称的情况出现。 因此,唯一的矿厂标识能将其他名称和别名进行统一。","5. 矿厂识别号颁发者 - 这是 D 栏中输入的矿厂识别号的颁发者。","6. 矿厂识别号颁发者 - 这是 D 栏中输入的矿厂识别号的颁发者。","7. 矿厂所在街道 - 提供矿厂所在街道的名称。","8. 矿厂所在城市 - 提供矿厂所在城市的名称。","9. 矿厂地点:州/省(如适用)- 提供矿厂所在的州/省。","10. 矿厂联系人名称 - 如果在统一使用此报告模板中,所在国家或地区有保护个人信息的法律法规,填写个人联系信息会有可能触犯法律法规,则建议申报公司在填写“矿厂联系人姓名”和“矿厂联系人电子邮件”列时,先确保联系人本人同意公开其联系信息。 。\\n\\n如果申报人已获得公开联系信息的授权信息,请输入与之合作的矿厂之联系人姓名。","11. 矿厂联系人电子邮件 - 填写被确定为矿厂联系人的电子邮件。例如: John.Smith@MineXXX.com。填写此字段栏前,请阅读矿厂联系人姓名填写指引。","12. 这是一个评论区,允许公司指定下一步管理矿厂的步骤。 如果该设施未列在负责任矿物审验流程 (RMAP) 合规矿厂列表,您可以对矿厂采取这些措施。 示例:要求通过 RMAP 评估矿厂设施,从首选供应商名单中删除等。","13. 注释 - 无格式限制的文字栏,可输入有关矿厂的任何意见。例如:矿厂正在被 YYY 公司收购","检查工作表用于确认模板中的全部必要信息是否均已填妥。该表格实时更新,并在使用模板时可以随时查阅。此工作表用于确认填写完\\n毕。\\n\\n要使用此表,确认已填完所有的必填字段(已填写的字段将用绿色突出显示)。否则请寻找红色的字段,并查阅 C 列中的“备注”并按照\\n指示操作。贵公司可以使用 D 列中的 URL 以直接访问相关字段进行填写。","条款和条件\\n如有异议,以英文版扩展矿产报告模板为准。","责任商业联盟冶炼厂目录(“目录”)及计划模板和工具,包括但不限于扩展矿物报告模板(统称为“工具”),包括但不限于此处所提供的一切信息,仅供参考之用,并以其上载明日期为准。在目录或工具中,如有任何不准确或遗漏的信息,责任商业联盟 (RBA)(特拉华州注册的非股份公司)\\n概不负责。是否使用和/或如何使用全部或部分目录或任何工具,用户拥有唯一及绝对的决定权​​。使用目录或任何工具之前,您应该向自己的法律顾问征询意见。目录或工具中没有任何一部份会构成法律意见。使用目录或任何工具都是自愿性行为。","RBA 不为目录或任何工具作任何的申述或保证。\\n目录和工具是依据“原样”和“现有”基础来提供。RBA 特此否认任何性质\\n(明示、暗示或其他方式)的所有保证,或因业务或惯例产生的所有保证,包括但不限于适销性、非侵权、质量、所有权、针对特定目的的适用性、完整性或准确性的任何暗示保证。","在适用法律允许的最大范围内,RBA 声明,不对任何性质的损失、费用或损害赔偿金承担任何责任,包括但不限于,因用户使用目录或任何工具而造成或引起的特殊的、偶发的、惩罚性的、直接的、间接的或后果性损害或收入或利润损失,不论是否因侵权行为、合同、条例或其他方式产生,即使已被告知此类损害的可能性。","鉴于对目录和/或任何工具的访问和使用,用户在此同意 (a) 因目录或任何工具\\n或及其使用而导致或产生的用户有过或者可能拥有或声称拥有的对 RBA 及其管理人员、\\n董事、代理、员工、志愿者、代表、承包商、继承人、指定人的任何及全部索赔、起诉、损失、诉讼、损害赔偿、判决、征费和处决,让 RBA 以及其管理人员、董事、代理、\\n员工、志愿者、代表、承包商、继承人、指定人解除并永远免除责任;(b) 保护 RBA 及其管理人员、董事、代理、员工、\\n志愿者、代表、承包商、继承人、指定人,确保他们不承担因用户使用目录或任何工具而导致或产生的任何及全部索赔、起诉、损失、诉讼、损害赔偿、判决、征费和处决。","如果本条款和条件的任何部分被适用法律认为无效或不可执行,该部分将仅因此类无效或不可执行性而无效,但不会以任何方式影响所述条款的剩余部分或上述条款和条件的剩余条款的效力。","访问和使用此目录或任何工具以及考虑此目录和任何工具时,即表示该用户同意上述条款。"],"smelterList":[],"productList":[],"definitions":[{"term":"授权人","definition":"此栏目定义对申报内容负责的责任人.授权人可能与申报内容责任人不一致,故不能填写“相同一样”, 需提供授权人的姓名。"},{"term":"钴精炼厂","definition":"处理钴精矿、中间产品或再循环材料并生产直接用于下游制造工艺的钴产品的实体。"},{"term":"受冲突影响和高风险地区 (CAHRA)","definition":"根据《经合组织尽职调查指南》的定义,受冲突影响和高风险地区 (CAHRA) 是指“识别为\\n存在武装冲突、大面积暴力活动或其他存在使人民遭受伤害风险的地区。武装冲突的形式多种多样,如国际冲突或非国际冲突,可能涉及两个或两个以上国家,可能由解放战争、叛\\n乱、内战等构成。高风险地区可能包括那些政局不稳或存在政治压迫、制度缺陷、不安全因素、民用基础设施崩溃、大面积暴力活动的地区。这类地区的特点往往是大规模侵犯人权、违反国际国内法律等。”"},{"term":"铜加工厂*","definition":"铜加工厂是通过冶金、化学或电化学工艺,将含铜材料转化为铜中间产品或最终铜产品的工厂。铜加工厂可能运营综合设施,也可能仅专注于铜产业价值链的一个环节或多个环节,其业务范围涵盖合金化、铸造及后续深加工等工序。"},{"term":"申报范围或类别","definition":"就本模板而言,“范围”明确了申报公司所提供信息的适用性。范围可能涵盖了公司的全部服务和/或产品,或者,根据公司自行决定,模板也可用于报告特定产品,或者可以“自定\\n义”。选择“自定义”范围或类别可以用于说明公司运营或产品组合的任何子集。"},{"term":"尽职调查","definition":"《经济合作与发展组织关于来自受冲突影响和高风险地区矿石的负责任供应链尽职调查指\\n南》(简称“经合组织指南”)将“尽职调\\n查”定义为“一个持续的、主动性和应对性流程,通过该流程,公司可以确保其尊重人权而不会导致冲突。” \\n更多信息可以在 http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/."},{"term":"天然石墨*","definition":"天然石墨是一种自然生成的结晶碳形态,主要见于片状石墨、无定形石墨和脉状石墨等含石墨矿石。天然石墨项目或经营(上游参与者)指正在进行的工业活动,主要专注于石墨矿石的开采及其后续选矿操作,最终生产石墨精矿。"},{"term":"石墨生产商*","definition":"球形石墨生产商(夹点)指通过将天然或合成石墨精矿加工为球形石墨(也称作球化石墨)来生产锂离子电池阳极用高纯度、细颗粒石墨产品(涂层或无涂层)的工厂。"},{"term":"独立的私营审核机构","definition":"就冶炼厂审计而言,“独立第三方审计事务\\n所”是指能够按照制定的标准对冶炼厂或精炼厂的尽职调查体系进行评估的私营机构。为保持中立和公正性,此类机构及其审计团队不得与被审单位存在利益冲突。"},{"term":"有目的添加","definition":"“有意添加”通常指故在产品生命周期的一个或多个阶段中使用的旨在赋予特定属性、反应或质量的物质。"},{"term":"锂加工厂*","definition":"锂加工厂是通过化学、热加工或电化学工艺,将含锂材料转化为锂化合物、金属锂或中间产品的工厂。加工产品可能包括碳酸锂、氢氧化锂、氯化锂、硫酸锂、氧化锂、金属锂或电池、陶瓷、玻璃、润滑剂和药品等其他用于下游应用的含锂中间产品。"},{"term":"组织经济合作与发展","definition":"经济合作与发展组织。经合组织制定了《经合组织负责任供应链尽职调查指南》。《经合组织尽职调查指南》内含详细建议,可帮助公司充分尊重人权,避免因其矿物采购的决定和行为而加剧冲突。该指南适用于可能从受冲突影响及高风险地区采购矿物或金属的任何公司。经合组织指南适用于全球范围内的所有矿物供应链。\\n(http://mneguidelines.oecd.org/mining.htm)"},{"term":"云母(天然)","definition":"天然云母是开采出或自然形成的矿物,如白云母或金云母。"},{"term":"云母(合成)","definition":"合成云母(氟金云母)是一种人工合成的材料,使用的原料包括镁、铝和硅。"},{"term":"云母加工厂","definition":"云母加工厂是指对开采的原矿(如伟晶岩(片岩)、长石、高岭土、白云母或金云母)施加各种物理或机械方法将非云母成分和云母成分分离,然后生产供下游生产工艺使用的具有一定等级的云母产品的实体。原矿加工包括分选、分离、研磨、磨矿、切割、冲压和结合。"},{"term":"镍加工厂*","definition":"镍加工厂是通过火法冶金、湿法冶金或电化学工艺,将含镍材料转化为金属镍、镍合金或中间产品的工厂。加工产品可能包括镍铁、镍生铁 (NPI)、镍锍、混合氢氧化物沉淀 (MHP)、混合硫化物沉淀 (MSP)、硫酸镍或精炼金属镍。"},{"term":"加工商","definition":"执行浓缩或纯化工艺,以去除原材料中所有混杂成分、分离出所需元素的工厂。这包括但不限于:清洁、分离、浓缩(例如,通过机械、加热或化学方法将有价值矿物与不需要的脉石分离)、焙烧(例如,冶炼、焙烧或其他去除杂质的方法)、阴极和阳极电解生产和其他精炼工艺。"},{"term":"产品","definition":"公司的产品或成品是指在制造生产阶段或最后完成阶段的物料或物品,并且已可以交付或销售给客户。"},{"term":"回收或废料源","definition":"回收料或报废料资源是指来自回收的最终用户产品或消费后产品的再生金属,或者在产品制造期间产生的金属加工废料。再生金属包括某些多余的、废弃的、缺陷的和废金属等材料,这些材料含有在生产此类金属时适于回收的已精炼或加工金属。再生金属的定义中不包括部分加工、未加工的矿物或者其他矿石的副产品。\\n\\n注:至本模版出版之日,目前尚未进行规模化回收用后云母。"},{"term":"责任商业联盟 (RBA)","definition":"责任商业联盟成立于 2004 年,是全球最大的\\n致力于在电子行业供应链中倡导企业责任的行业联盟。\\n(http://www.responsiblebusiness.org)"},{"term":"不使用冲突矿产冶炼厂计划(RMAP)","definition":"负责任矿物审验流程 (RMAP) 是由责任商业联盟 (RBA) 所制定,用于提高公司对金属责任采购进行查证的能力。有关 RMAP 的更多信息,请访问 http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/。"},{"term":"负责任矿物计划 (RMI)","definition":"负责任矿物计划 (RMI) 是由责任商业联盟和全球电子永续\\n倡议组织的成员于 2008 发起成立,\\n已发展成为公司解决其供应链中的冲突矿产问题而最广泛使用和认可的资源之一。今天来自 7 个不同行业的超过 150 家公司加入了 RMI,这些公司贡献了一系列工具和资源,包括负责任矿物审验流程、冲突矿产报告模板、合理原产国查询数据以及各类关于冲突矿产采购的指导文档。RMI 还定期举办关于冲突矿产问题\\n的研讨会,促进政策制订,并且与主要公民社会组织和政府展开辩论。更多信息请访问 http://www.responsiblemineralsinitiative.org/。"},{"term":"RMAP 合规冶炼厂目录","definition":"负责任矿物审验流程 (RMAP) 中的合规冶炼\\n厂目录包含了所有被评估并且符合标准的冶炼厂和精炼厂。其中的标准有负责任矿物审验流程 (RMAP)、负责任矿物计划 (RMI) 或其它对等机构计划(如,责任珠宝委员会或伦敦金银市场协会)。如果冶炼厂或精炼厂不在目录内,则表示其未完成 RMAP 评估或不\\n符合 RMAP 标准要求。\\n\\n要查看经验证符合 RMAP 的冶炼厂和精炼厂\\n目录,请访问 www.responsiblemineralsinitiative.\\norg。"},{"term":"冶炼厂","definition":"冶炼厂或精炼厂是指从回收料或报废料资源中采购和加工矿石、矿渣和/或原料并由此生成精炼金属或含有中间产品的金属的公司。其产物可以是纯的(99.5% 或以上)金属、粉末、铸块、棒条、颗粒、氧化物或金属盐。术语“冶炼厂”、“精炼厂”、“加工厂”在各种出版物中可通用。"},{"term":"冶炼厂识别序号","definition":"RMI 为一些公司指定的唯一识别号,这些公司被供应链中的成员报告为冶炼厂或精炼厂,无论它们是否经过验证符合 RMAP 审计标准或其他适用审计计划所定义的冶炼厂或精炼厂的特征。"}],"mineList":[],"smelterLookup":["以下目录是截至此模板发布时 RBA 的最新冶炼厂名称/别名信息。  此目录会适时更新。  冶炼厂存在于此目录中并不保证它就是独立第三方审计计划内的目前有效或合规的冶炼厂。\\n\\n在 B 列中包括的名称表示供应链对于特定冶炼厂\\n通常认可和报告使用的公司名称。这些名称可能包括公司曾用名、备用名称、简称或其他变体。虽然这些名称可能不是标准冶炼厂名称,但参考名称有助于识别列在“冶炼厂查找”中 C 列下的\\n冶炼厂。\\n\\n在 ASCII 字符集中,C 列是正式标准冶炼厂名\\n称目录。大多数冶炼厂的这两列具有相同的条目,然而,如果常用名称与标准名称不同,则在 B 列中注明这种变化。"]}},"crt":{"2.21":{"instructions":["RMI 网站:(http://www.responsiblemineralsinitiative.org/)","介绍","此钴报告模板 (CRT) 是 Responsible Minerals Initiative®(负责任矿物计划® (RMI®) 创建的免费标准化报告‏‎模板。\\n该模板促进了通过关于矿产原产国、所使用冶炼厂和精炼厂的供应链的信息传输,并且支持了按照《经济合作与发展组织关于来自受冲突影响和高风险地区矿石的负责任供应链尽职调查指南》(OECD Due Diligence Guidance for Responsible Supply Chains of Minerals from Conflict-Af‎‎‎fected and High-Risk Areas) 执行尽职调查。\\n该模板还促进辨识新的冶炼厂和精炼厂以通过负责任矿物审验流程对这些厂家进行潜在的审核。\\n\\nCRT 旨在供下游企业披露与其供应链\\n(截至但不包括冶炼厂)相关的信息。如果贵公司是冶炼厂或精炼厂,我们建议您在“冶炼厂目录”选项卡中输入贵公司名称。\\n\\n填好的表格中不应有单元格条目以“=”或\\n“#”开头。","公司资料填写说明(第8-22行)。只限英文作答","注:带星号(*)的栏目必须填写","1. 插入贵公司的法定名称。请不要使用缩写。\\n在此字段中,您可以选择添加其他商业名称、营业名称等。此栏必须填写。","2. 选择贵公司的申报范围。范围的选项为:\\n\\nA. 全公司\\nB. 产品(或产品清单)\\nC. 自定义 \\n\\n如果选择范围为“全公司”,申报包括该公司的全部产品或由其母公司生产的全部产品物质。如果用户从公司层面报告钴数据,则需要报告关于其生产的所有产品的数据。\\n\\n如果选择范围为“产品(或产品清单)”,将显示产品清单的工作表选项卡。如果选择了此范围,则必须在“产品清单”工作表的 B 列中列出此申报范围涵盖的\\n产品的制造商产品序号。可以选择是否在“产品清单”工作表的 C 列中列出制造商产品名称。\\n\\n如果选择范围为“自定义”,用户必须描述钴披露适用的范围。该分类的范围应当由供应商在文本字段中定义,并且易于被客户或文档的接收人理解。举个例子,公司可以提供阐明信息的链接。\\n\\n此栏必须填写。","3. 输入贵公司的唯一识别序号或编号\\n(DUNS号码,VAT号码,客户特定识别码等)","4. 输入唯一识别序号或编号的出处 (如“DUNS”,“VAT”,“客户”等)","5. 插入贵公司的完整地址(街道、城市、州、国家或地区、邮政编码)。此为必填字段。","6. 插入与申报信息内容相关的联系人姓名。\\n此栏必须填写。","7. 插入联系人的电子邮件地址。如果没有电子邮件地址,请说明“无”或“不适用”。如留空此字段,会导致此表格出错。此为必填字段。","8. 插入联系人的电话号码。此栏必须填写。","9. 插入负责申报信息内容的人的姓名。\\n授权人可能是另一人而非联系人。使用“相\\n同”字眼或类似认定以提供授权人的姓名是不正确的。此栏必须填写。","10. 输入授权人的职位。 此为选填字段。","11. 插入授权人的电子邮件地址。\\n如果电子邮件地址不可用,说明“不可用”或“n/a”。空白字段可能导致表格填写错误。此栏必须填写。","12. 插入授权人的电话号码。此字段自由选择填写。","13. 请使用以下格式输入表格填写完毕的\\n日期:年—月—日。此栏必须填写。","14. 申报人应按“公司名-年月日.xlsx”\\n格式来命名并存档本报告。(日期格式为年-月-日)","六个申报范围问题的答复说明(第 24 - 56 行)。\\n仅以英文提供答复","这六个问题明确了钴的用途、原产地和采购识别信息。这些问题旨在收集关于公司产品中钴的使用情况和报告完整性的信息。对于这些问题的答复应当陈述公司信息部分中选择的“申报范围”。","按要求在备注部分提供备注来进一步说明您的答复。","使用下拉菜单选项提供答案。如果钴的问题 1 答复是肯定的,则应完成钴的所有问题,而且应完成关于公司的总体审核鉴定计划的后续审核鉴定问题(A 至 I)。","1. 此问题用于确定钴是否在报告要求的范围\\n内。此问题的答复用于排除任何痕量级杂质或自然生成的副产品。\\n\\n此问题询问是否有任何钴在贵公司生产的产品(包括化合物)中用作原材料、组件或添加\\n物。原材料、组件、添加物、磨具和切削工具中的杂质不在此调查范围。\\n\\n此问题的有效答复为“是”、“否”或“不知道”。","部分公司可能要求给出“否”答复的证据,这些证据应当输入备注字段。","2. 这是要申报一种产品或多种产品中\\n钴的任何部分的源产地是受冲突影响和高风险地区 (CAHRA)。如果供应链中的任何\\n冶炼厂从 CAHRA 进行采购,无论此冶炼厂是否经过\\n独立审计,则对此问题的答复应为“是”。\\n\\n此问题的答案应该是“是”、“否”、“不知道”或者“仅刚果民主共和国及毗邻国家”。如果回答“是”,请在备注部分提供证明。回答“不知道”是可接受的。如果对问题 1 的答复为“是”,\\n则必须为钴回答此问题。","3. 此申报确定产品中包含的钴是否\\n完全来自回收料或报废料。\\n\\n以“是”、“否”或“不知道”来答复此\\n问题。\\n\\n答复“是”表示 100% 的钴来自回收料或报废料。\\n答复“否”表示部分原材料不是来自回收料或报废料。答复“不知道”表示用户不知道是否 100% 的原材料来自回收料或报废料。\\n此栏必须填写。","4. 此问题是要确定公司是否已经从被合理\\n认为提供本申报范围中产品含有的钴的所有直接供应商处得到相关披露。本问题的允许答复有:\\n\\n­ 100%\\n­ 超过 90%\\n­ 超过 75%\\n­ 超过 50%\\n- 50% 或以下\\n- 无\\n\\n此栏必须填写。","5. 此问题是要核实供应商是否有理由相信\\n他们已识别出提供此申报涵盖的产品中的钴的所有冶炼厂。本问题的答复有“是”、“否”或“不知道”,并就情况进行说明,如冶炼厂目录。此栏必须填写。","6. 此问题是要核实经确定为提供此申报\\n范围涵盖的产品中含有的任何钴的所有冶炼厂是否已在此申报中报告。本问题的答复有“是”、“否”或“不知道”,并就情况说明,如冶炼厂目录。如果对问题 1 就钴的答复为\\n“是”,必须为钴回答此问题。","问题 A – I 回答说明(63 - 79 行)。如果对问题 1 就任何金属的答复为\\n“是”,必须回答问题 A 至 I。仅以英文\\n提供答复","《经济合作与发展组织关于来自受冲突影响和高风险地区矿石的负责任供应链尽职调查指南》(简称“经合组织指南”)将“尽职调查”定义为“一个持续的、主动性和应对性流程,通过该流程,公司可以确保其尊重人权而不会导致冲突。” 更多信息可以在 http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/.\\n\\n问题 A – I 旨在评估贵公司钴采购的尽职调查活动。对这些问题的答复应当代表贵公司的完整活动范\\n围,不仅限于公司信息部分选择的“申报范\\n围”。","A. 此申报是为披露公司是否具有可公开查阅的钴采购政策。以“是”或“否”来答复此问题。如果答复“是”,用户应当在问题备注字段指定 URL。此栏必须填写。","B. 此申报是为披露公司的钴采购政策\\n是否阐述了《经合组织尽职调查指南》附录二《示范政策》所述的所有风险,以及是否阐述了童工问题的所有最恶劣的形式。以“是”或“否”来答复此问题。\\n\\n此栏必须填写。\\n\\n“附录二—风险”位于:http://www.oecd.org/daf/inv/mne/OECD-Due-Diligence-Guidance-Minerals-Edition3.pdf.","C. 请答复“是”或“否”,以披露贵公司\\n是否已实施钴采购尽职调查措施。此申报不是为了提供公司的尽职调查措施详情,仅是为了说明公司已实施了尽职调查措施。可接受的尽职调查措施的具体情况应当由请求者和供应商决定。\\n\\n尽职调查措施的示例可能包括:向供应商传达贵公司对负责任钴供应链的预期以及将该等预期纳入到合同中(如可能);确定和评估供应链中的风险;设计和实施战略以应对确定的风险等。这些尽职调查措施的示例与国际公认的经济合作与发展组织指南涵盖的指导方针保持一致性。\\n\\n此栏必须填写。","D. 此申报是要确定公司是否要求其直接\\n供应商按照《经合组织尽职调查指南》针对钴供应链实施尽职调查。以“是”或“否”来答复此问题。应在问题备注字段记录备注。此栏必须填写。","E. 此申报是要确定公司是否要求其直接\\n供应商从经独立验证的冶炼厂处采购钴。\\n以“是”或“否”来答复此问题。应在问题备注字段记录备注。此栏必须填写。","F. 此申报是要确定公司是否要求其供应链\\n中的冶炼厂按照《经合组织尽职调查指南》针对钴供应链实施尽职调查。以“是”或“否”来答复此问题。应在问题备注字段记录备注。此栏必须填写。\\n\\n“附录二—风险”位于:http://www.oecd.org/daf/inv/mne/OECD-Due-Diligence-Guidance-Minerals-Edition3.pdf.","G. 此问题是要披露公司是否要求其供应商\\n填写钴报告模板。接受的答复载列如下,在部分情况中,可能需要进一步解释,即提供用于收集信息的格式。如果答复为“是,使用其他格式”,用户须在问题备注字段提供备注。本问题的允许答复有:\\n\\n- 是,钴报告模板\\n- 是,使用其他格式(请描述)\\n- 否\\n\\n此栏必须填写。","H. 请答复“是”或“否”。在备注部分,\\n您可以提供有关贵公司所采用方法的其他信\\n息。示例可以为:\\n\\n “第三方审计”——由独立第三方进行的供应商现场审计。\\n “仅审核文件编制情况”——由独立第三方和/或贵公司工作人员对供应商提交的记录和文件予以审核。\\n “内部审计”——由贵公司工作人员进行的供应商现场审计。\\n\\n此栏必须填写。","I. 此问题是要披露公司的审核流程是否\\n包括纠正措施管理。以“是”或“否”来答复此问题。须在问题备注字段记录备注。此栏必须填写。","冶炼厂名单工作表的填写说明。只限英文作答\\n\\n注:带星号(*)列表示此区域必须填写。","此模板允许通过冶炼厂查找识别具体的冶炼厂。必须按从左到右的顺序填写 B 列和 C 列,以使用冶炼厂查找功能。\\n对于金属/冶炼厂/国家组合应使用分割线。","1. 冶炼厂识别输入列-如果您知道冶炼厂\\n识别号码,则在 A 列输入号码(B、C、D、\\nE、F、G、I 和 J 列将自动填入)。A 列不会自动填入。","2. 金属(*)- 在下拉菜单中选择\\n正在录入信息的冶炼厂所提炼的金属。","3. 冶炼厂查找 (*) - 从下拉菜单中\\n选择。目录列出了所有直到发布此申报模板时已知的冶炼厂。如果冶炼厂不在目录中时请选择‘冶炼厂没列出’。出现这种情况时请将该冶炼厂的名称输入 D 列。如果您不知道冶炼厂\\n的名称或地点,请选择‘冶炼厂尚未被识\\n别’。对于这个选项,D 和 E 列将会\\n自动填入‘未知’.","4. 冶炼厂名称 (1)- 如果在 C 列选择了\\n“冶炼厂未列出”,则填入冶炼厂名称。当在 C 列选择了冶炼厂名称后,\\n此字段将自动填充。此字段必须填写。","5. 冶炼厂所在国家 (*) - 当在 C 列选择了\\n冶炼厂名称,此字段将自动填充。如果在 C 列选择了“冶炼厂未列出”,则使用下拉菜单选择冶炼厂的国家位置。此栏必须填写。","6. 冶炼厂识别 - 依据冶炼厂和\\n精炼厂识别系统每一冶炼厂或精炼厂均有一独一无二的标识。 相信会有一间冶炼厂或一间\\n精炼厂存在多个名称的情况出现。因此,唯一的冶炼厂标识能将其它名称和别名进行统一。","7. 冶炼厂识别号码 - F 列包括所有的\\n冶炼厂识别号码。如果在 C 列中选出冶炼厂\\n名称,此栏会自动填入。","8. 冶炼厂所在街道 - 提供冶炼厂所在街道的名称。","9. 冶炼厂所在城市 - 提供冶炼厂所在城市的名称。","10. 冶炼厂地点: 州/省(如适用)- 提供冶炼厂所在的州/省。","11. 冶炼厂联系人姓名——钴报告模板 (CRT) 在提出请求的公司的供应链公司\\n中流传,以按照《经济合作与发展组织关于来自受冲突影响和高风险地区矿石的负责任供应链尽职调查指南》执行尽职调查。\\n\\n如果该模板在有保护个人信息立法的国家流\\n传,分享 CRT 中的个人联系信息可能会\\n违反相关法规。因此,建议提出请求的公司采取预防措施,例如获得联系人的相关许可,以在填写“冶炼厂联系人姓名”以及“冶炼厂联系人电子邮件”列时可与供应链中的其他公司分享该信息。\\n\\n如果获得了分享该信息的许可,请填入与贵公司合作的冶炼厂设施联系人姓名。","12. 冶炼厂联系电邮地址 - 填入被确认为冶炼厂联系人的电邮地址作为冶炼厂联系信息。 例如: John.Smith@SmelterXXX.com。 请在填写此栏前阅读冶炼厂联系名称指引。","13. 矿场名称——此字段供公司确定冶炼厂\\n正在使用的实际矿场。如果已知实际矿场的名称,请输入该名称。如果冶炼厂的所有原料均来自回收料或报废料资源,则输入“回收料”或“报废料”以取代矿场名称,并在 P 列回答“是”。","14. 矿场地点(国家)——这是可自由输入\\n文字的字段,供公司注明冶炼厂正在使用的矿场地点。请输入矿场所在国家。如果原产国未知,则输入“不知道”。如果冶炼厂的所有原料均来自回收料或报废料资源,则输入“回收料”或“报废料”以取代原产国。此字段自由选择填写。","15. 表明冶炼厂是否仅从回收料或报废料资源\\n中获取冶炼过程的来料。此问题自由选择答\\n复。本问题的允许答复有:\\n\\n- 是\\n- 否\\n- 不知道","16. 注释 - 用自由的格式的文字栏来输入\\n任何有关冶炼厂的意见。例如:冶炼厂正在被\\nYYY公司收购","检查工作表用于确认模板中的全部必要信息是否均已填妥。该表格实时更新,并在使用模板时可以随时查阅。此工作表用于确认填写完\\n毕。\\n\\n要使用此表,确认已填完所有的必填字段(已填写的字段将用绿色突出显示)。否则请寻找红色的字段,并查阅 C 列中的“备注”并按照\\n指示操作。贵公司可以使用 D 列中的 URL 以直接访问相关字段进行填写。","条款及细则\\n当有任何分歧时,英文版本的冲突矿产报告模板将被视为管控版本。","责任商业联盟冶炼厂目录(“目录”)及计划模板和工具,包括但不限于钴报告模板(统称为“工具”),包括但不限于此处所提供的一切信息,仅供参考之用,并以其上载明日期为准。在目录或工具中,如有任何不准确或遗漏的信息,责任商业联盟 (RBA)(特拉华州注册的非股份公司)\\n概不负责。是否使用和/或如何使用全部或部分目录或任何工具,用户拥有唯一及绝对的决定权​​。使用目录或任何工具之前,您应该向自己的法律顾问征询意见。目录或工具中没有任何一部份会构成法律意见。使用目录或任何工具都是自愿性行为。","RBA 不为目录或任何工具作任何的申述或保证。\\n目录和工具是依据“原样”和“现有”基础来提供。RBA 特此否认任何性质\\n(明示、暗示或其他方式)的所有保证,或因业务或惯例产生的所有保证,包括但不限于适销性、非侵权、质量、所有权、针对特定目的的适用性、完整性或准确性的任何暗示保证。","在适用法律允许的最大范围内,RBA 声明,不对任何性质的损失、费用或损害赔偿金承担任何责任,包括但不限于,因用户使用目录或任何工具而造成或引起的特殊的、偶发的、惩罚性的、直接的、间接的或后果性损害或收入或利润损失,不论是否因侵权行为、合同、条例或其他方式产生,即使已被告知此类损害的可能性。","鉴于对目录和/或任何工具的访问和使用,用户在此同意 (a) 因目录或任何工具\\n或及其使用而导致或产生的用户有过或者可能拥有或声称拥有的对 RBA 及其管理人员、\\n董事、代理、员工、志愿者、代表、承包商、继承人、指定人的任何及全部索赔、起诉、损失、诉讼、损害赔偿、判决、征费和处决,让 RBA 以及其管理人员、董事、代理、\\n员工、志愿者、代表、承包商、继承人、指定人解除并永远免除责任;(b) 保护 RBA 及其管理人员、董事、代理、员工、\\n志愿者、代表、承包商、继承人、指定人,确保他们不承担因用户使用目录或任何工具而导致或产生的任何及全部索赔、起诉、损失、诉讼、损害赔偿、判决、征费和处决。","如果本条款和条件的任何部分被适用法律认为无效或不可执行,该部分将仅因此类无效或不可执行性而无效,但不会以任何方式影响所述条款的剩余部分或上述条款和条件的剩余条款的效力。","访问和使用此目录或任何工具以及考虑此目录和任何工具时,即表示该用户同意上述条款。"],"smelterList":[],"productList":[],"definitions":[{"term":"授权人","definition":"此栏目定义对申报内容负责的责任人.授权人可能与申报内容责任人不一致,故不能填写“相同一样”, 需提供授权人的姓名。"},{"term":"钴精炼厂","definition":"处理钴精矿、中间产品或再循环材料并生产直接用于下游制造工艺的钴产品的实体。"},{"term":"受冲突影响和高风险地区 (CAHRA)","definition":"根据《经合组织尽职调查指南》的定义,受冲突影响和高风险地区 (CAHRA) 是指“识别为\\n存在武装冲突、大面积暴力活动或其他存在使人民遭受伤害风险的地区。武装冲突的形式多种多样,如国际冲突或非国际冲突,可能涉及两个或两个以上国家,可能由解放战争、叛\\n乱、内战等构成。高风险地区可能包括那些政局不稳或存在政治压迫、制度缺陷、不安全因素、民用基础设施崩溃、大面积暴力活动的地区。这类地区的特点往往是大规模侵犯人权、违反国际国内法律等。”"},{"term":"申报范围或类别","definition":"就本模板而言,“范围”明确了申报公司所提供信息的适用性。范围可能涵盖了公司的全部服务和/或产品,或者,根据公司自行决定,模板也可用于报告特定产品,或者可以“自定\\n义”。选择“自定义”范围或类别可以用于说明公司运营或产品组合的任何子集。"},{"term":"尽职调查","definition":"《经济合作与发展组织关于来自受冲突影响和高风险地区矿石的负责任供应链尽职调查指\\n南》(简称“经合组织指南”)将“尽职调\\n查”定义为“一个持续的、主动性和应对性流程,通过该流程,公司可以确保其尊重人权而不会导致冲突。” \\n更多信息可以在 http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/."},{"term":"刚果民主共和国和邻国","definition":"刚果民主共和国及与其分享国际公认的国境线的9个国家:安哥拉、布隆迪、中非共和国、刚果共和国、卢旺达、南苏单、坦桑尼亚、乌干达、赞比亚"},{"term":"独立的私营审核机构","definition":"就冶炼厂审计而言,“独立第三方审计事务\\n所”是指能够按照制定的标准对冶炼厂或精炼厂的尽职调查体系进行评估的私营机构。为保持中立和公正性,此类机构及其审计团队不得与被审单位存在利益冲突。"},{"term":"有目的添加","definition":"“有意添加”通常指故意将某种物质(此处指金属)按设想添加到产品配方中,以持续呈现某种具体的特征、外观或质量。"},{"term":"组织经济合作与发展","definition":"经济合作与发展组织。经合组织制定了《经合组织负责任供应链尽职调查指南》。《经合组织尽职调查指南》内含详细建议,可帮助公司充分尊重人权,避免因其矿物采购的决定和行为而加剧冲突。该指南适用于可能从受冲突影响及高风险地区采购矿物或金属的任何公司。经合组织指南适用于全球范围内的所有矿物供应链。\\n(http://mneguidelines.oecd.org/mining.htm)"},{"term":"产品","definition":"公司的产品或成品是指在制造生产阶段或最后完成阶段的物料或物品,并且已可以交付或销售给客户。"},{"term":"精炼厂","definition":"精炼厂是指从回收料或报废料资源中采购和加工矿石、矿渣和/或原料并由此生成精炼金属或含有中间产品的金属的公司。其产物可以是纯的(99.5% 或以上)金属、粉末、\\n铸块、棒条、颗粒、氧化物或金属盐。术语“冶炼厂”和“精炼厂”在各种出版物中可通\\n用。"},{"term":"回收或废料源","definition":"回收料或报废料资源是指来自回收的最终用户产品或消费后产品的再生钴,或者在产品制造期间产生的钴加工废\\n料。再生钴包括某些多余的、废弃的、缺陷的和废钴等材料,这些材料含有在生产此类金属时适于回收的已精炼或加工金属。再生钴的定义中不包括部分加工、未加工的矿物或者其他矿石的副产品。"},{"term":"责任商业联盟 (RBA)","definition":"责任商业联盟成立于 2004 年,是全球最大的\\n致力于在电子行业供应链中倡导企业责任的行业联盟。\\n(http://www.responsiblebusiness.org)"},{"term":"不使用冲突矿产冶炼厂计划(RMAP)","definition":"不使用冲突矿产冶炼厂计划是由电子行业公民联盟(RBA) 和全球电子可持续发展倡议组织 (GeSI) 来制定用以提高公司对金属责任采购\\n进行查证的能力。 如要了解更多详细的计划信息请登陆http://www.responsiblemineralsinitiative.org/smelter-introduction/"},{"term":"负责任矿物计划 (RMI)","definition":"负责任矿物计划 (RMI) 是由责任商业联盟和全球电子永续\\n倡议组织的成员于 2008 发起成立,\\n已发展成为公司解决其供应链中的冲突矿产问题而最广泛使用和认可的资源之一。今天来自 7 个不同行业的超过 150 家公司加入了 RMI,这些公司贡献了一系列工具和资源,包括负责任矿物审验流程、冲突矿产报告模板、合理原产国查询数据以及各类关于冲突矿产采购的指导文档。RMI 还定期举办关于冲突矿产问题\\n的研讨会,促进政策制订,并且与主要公民社会组织和政府展开辩论。更多信息请访问 http://www.responsiblemineralsinitiative.org/。"},{"term":"RMAP 合规冶炼厂目录","definition":"负责任矿物审验流程 (RMAP) 中的合规冶炼\\n厂目录包含了所有被评估并且符合标准的冶炼厂和精炼厂。其中的标准有负责任矿物审验流程 (RMAP)、负责任矿物计划 (RMI) 或其它对等机构计划(如,责任珠宝委员会或伦敦金银市场协会)。如果冶炼厂或精炼厂不在目录内,则表示其未完成 RMAP 评估或不\\n符合 RMAP 标准要求。\\n\\n要查看经验证符合 RMAP 的冶炼厂和精炼厂\\n目录,请访问 www.responsiblemineralsinitiative.\\norg。"},{"term":"冶炼厂","definition":"冶炼厂是指从回收料或报废料资源中采购和加工矿石、矿渣和/或原料并由此生成精炼金属或含有中间产品的金属的公司。其产物可以是纯的(99.5% 或以上)金属、粉末、铸块、\\n棒条、颗粒、氧化物或金属盐。术语“冶炼\\n厂”和“精炼厂”在各种出版物中可通用。"},{"term":"冶炼厂识别序号","definition":"RMI 为一些公司指定的唯一识别号,这些公司被供应链中的成员报告为冶炼厂或精炼厂,无论它们是否经过验证符合 RMAP 审计标准或其他适用审计计划所定义的冶炼厂或精炼厂的特征。"}],"smelterLookup":["以下目录是截至此模板发布时 RBA 的最新冶炼厂名称/别名信息。  此目录会适时更新。  冶炼厂存在于此目录中并不保证它就是独立第三方审计计划内的目前有效或合规的冶炼厂。\\n\\n在 B 列中包括的名称表示供应链对于特定冶炼厂\\n通常认可和报告使用的公司名称。这些名称可能包括公司曾用名、备用名称、简称或其他变体。虽然这些名称可能不是标准冶炼厂名称,但参考名称有助于识别列在“冶炼厂查找”中 C 列下的\\n冶炼厂。\\n\\n在 ASCII 字符集中,C 列是正式标准冶炼厂名\\n称目录。大多数冶炼厂的这两列具有相同的条目,然而,如果常用名称与标准名称不同,则在 B 列中注明这种变化。"]}},"amrt":{"1.3":{"instructions":["RMI 网址:(www.responsiblemineralsinitiative.org) 培训和指导、模板、负责任矿物审验流程合规冶炼厂列表。","介绍","额外矿物报告模板 (AMRT)是由负责任矿物计划 (RMI) 创建的免费标准报告模板。该模板促进了通过关于矿产原产国、所用冶炼厂和精炼厂的供应链来进行信息传输,并且支持法律合规性*。该模板还促进识别新的冶炼厂和精炼厂,以通过负责任矿物审验流程,对这些厂家进行潜在审核**。\\n\\nAMRT 旨在让下游企业披露其供应链有关的信息(准确来讲,不包括冶炼厂)。如果贵公司是冶炼厂或精炼厂,根据 RMAP 协议,我们建议您在冶炼厂列表选项卡中输入贵公司的名称。\\n\\n填写表格时,单元格条目不应以“=”或“#”开头。","* 在 2010年,关注来源于刚果民主共和国 (DRC) 或毗邻国家或地区“冲突矿产”的《多德-弗兰克华尔街金融改革与消费者保护法》(U.S. Dodd-Frank Wall Street Reform and Consumer Protection Act) 正式通过。SEC 公布了最终规则,要求所有美国上市公司披露冲突矿产来源(有关规则,请访问 http://www.sec.gov/rules/final/2012/34-67716.pdf)。该规则参考了“经济合作与发展组织关于来自冲突影响和高风险区域之矿石的负责任供应链尽职调查指南”(http://www.oecd.org/dataoecd/62/30/46740847.pdf),明确了供应商如何制定政策、尽职框架和管理体系。\\n** 有关信息,请参见“负责任矿物计划”(www.responsiblemineralsinitiative.org)。\\n2017 年,欧洲议会和理事会 2017 年 5 月 17 日第 2017/821 号条例(欧盟)通过,该条例规定了进口源自受\\n冲突影响和高风险地区的锡、钽和钨及其矿石以及黄金的欧盟进口商的供应链尽职调查义务(请参见 https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=OJ:L:2017:130:FULL&from=EN)","公司信息的填写说明(第 8 至 26 行)。\\n请仅以英文作答","注:带星号 (*) 的字段为必填。","1. 插入贵公司的法定名称。请勿使用缩写。在此字段中,您可以选择添加其他商业名称、营业名称等。","2. 选择贵公司的申报范围。范围选项为:\\n\\nA. 全公司\\nB. 产品(或产品列表)\\nC. 用户自定义 \\n\\n对于“全公司”,申报涵盖公司产品或母公司生产的产品物质整体。如果用户在公司级别中报告矿产数据,他们将报告关于其生产的所有产品的矿产数据。\\n\\n如果选择范围为“产品(或产品列表)”,将显示产品列表的工作表选项卡。如果选择了此范围,则必须在“产品列表”工作表的 B 列中列出此申报范围涵盖的产品制造商产品序号。可选择是否在“产品列表”工作表的 C 列中列出制造商的产品名称。\\n\\n如果选择范围为“用户自定义”,用户必须描述矿产披露适用的范围。此类范围应由供应商在文本字段内予以定义,并确保客户或文档接收人可以清楚理解。例如,公司可提供链接来说明信息。\\n\\n此为必填字段。","3. 决定贵公司的矿产申报范围(最多 10 种)。提出请求的公司必须说明哪些矿产属于申报范围。问题 1 和 2 会自动填充的矿产。\\n\\n矿产不包括 3TG(锡、钽、钨和金)、钴、铜、石墨、锂、云母和/或镍,因为它们已包含在 CMRT 和 EMRT 中。\\n\\n这是必填项。","4. 如果您申报的矿产范围包括“其他”,请在此处填写其他矿产名称。提出请求的公司必须说明哪些矿产属于申报范围。问题 1 和 2 会自动填充选定的矿产。\\n\\n如果在矿产/金属申报范围中至少选择了 1 次“其他”,则此为必填项.","4. 插入贵公司的唯一识别序号或编号(DUNS 号码、VAT 号码、客户特定识别码等)","5. 插入唯一识别序号或代码出处(例如“DUNS”、“VAT”、“客户”等)","6. 插入贵公司的完整地址(街道、城市、州、国家或地区、邮政编码)。此为必填字段。","7. 插入对此申报信息内容负责的联系人姓名。此为必填字段。","8. 插入联系人的电子邮件地址。如果没有电子邮件地址,请说明“无”或“不适用”。如留空此字段,会导致此表格出错。此为必填字段。","9. 插入联系人的电话号码。此为必填字段。","10. 插入负责申报信息内容的人员姓名。授权人可能与联系人不同。请勿填写“相同”或相似信息,而需提供授权人的姓名。此为必填字段。","11. 输入授权人的职位。 此为选填字段。","12. 输入授权人的电子邮件地址。如果没有电子邮件地址,请声明“无”或“不适用”。如留空此字段,会导致表格出错。此为必填字段。","13. 插入授权人的电话号码。此字段自由选择填写。","14. 请使用“日-月-年”的格式输入申报日期。此为必填字段。","15. 例如,用户应将文件名保存为“公司名-日期.xls”(日期格式为年-月-日)。","两个尽职调查问题的填写指南(第 26 至 49 行)。\\n请仅以英文作答。","这两个题明确了每种金属的用途和相关供应商的数据收集水平。这些问题旨在收集关于公司产品中矿产使用情况的信息,以确定法规适用情况。答案应与公司信息部分所选择的“申报范围”相对应。此部分中的答案可用于确定矿产报告的使用情况和完整性。","针对两个问题,请从下拉菜单选择您的回答。本章节的第一个问题必须针申请范围内的特定金属填写.","1. 此问题的答复用来确定任何特定矿产是否属于报告要求的范围。\\n\\n此问题询问是否有任何矿产在贵公司生产或外包生产的产品中用作原材料、组件或添加物(包括原材料和组件)。原材料、组件、添加物、磨具和切削工具中的杂质不在此调查范围。\\n\\n必须为每种特定矿产回答此问题。此问题的有效答复为“是”、“否”、“不知道”或“未申报”。此问题必须作答。","如果申报范围内的任何矿产特意添加到供应链的任意部份,它们就会被认为是特意添加到产品中。\\n\\n有些公司可能会要求为“否”的答案举证,此时需要在意见栏填写你的回复。","2. 这一问题以确定公司是否收到了所有直接供应商的相关矿产披露,这些供应商有理由被认为提供其申报范围所涵盖的产品中所含的申报矿产。\\n\\n- 100%\\n- Greater than 90%\\n- Greater than 75%\\n- Greater than 50%\\n- 50% or less\\n- None\\n- Unknown\\n- Did not survey","如果贵公司对问题 2 就任何矿产答复为“100%”,则贵公司需要提供所有被确定为加工贵公司供应链中使用的金属的冶炼厂名称,以使答复完整。\\n\\n部分公司可能要求贵公司如何定义“相关”供应商的证据,这些证据应当输入备注字段。如果贵公司尚未从贵公司相关供应商处得到 100% 答复,请提交贵公司表明相应百分比的试点报告模板,并继续调查贵公司的供应商。被调查的贵公司供应商百分比的提高可看作每年改善的一种标志。\\n\\n部分公司可能要求对答复“Did not survey (未调查)”的任何矿产提供进一步证据,应在“备注”字段输入这些证据。","“Minerals Scope”(矿物范围)选项卡的填写说明。请仅以英文作答。","强烈建议申请人先填写“Minerals Scope”(矿物范围)选项卡,然后再提交 AMRT 调查。","1. 选择属于申报范围的矿产 - 金属下拉菜单将根据您在“Declaration”(申报)页面的矿物范围列表自动填充结果。使用下拉菜单选择您要纳入 AMRT 的金属,在之后提供原因。","2. 纳入 AMRT 的原因 - 详细解释申请指定矿物数据的原因。原因示例包括矿物风险概况(包括在 Material Insights 平台上找到的概况),以及监管要求。","冶炼厂列表选项卡的填写说明。请仅以英文作答","注:带星号 (*) 列表示必填字段。","1. 冶炼厂识别输入列-如果您知道冶炼厂\\n识别号码,则在 A 列输入号码(B、C、D、\\nE、F、G、I 和 J 列将自动填入)。A 列不会自动填入。","2. 金属 (*) - 在下拉菜单中,选择正在输入信息的冶炼厂所提炼的金属。 此为必填字段。","3. 冶炼厂名称 (*) - 此为必填字段。","4. 冶炼厂所在国家或地区 (*) - 请使用下拉菜单,选择冶炼厂所在国家或地区。此为必填字段。","5. 冶炼厂识别 - 依据冶炼厂和精炼厂识别系统每一冶炼厂或精炼厂均有一独一无二的标识。相信会有一间冶炼厂或一间精炼厂存在多个名称的情况出现。 因此,唯一的冶炼厂标识能将其他名称和别名进行统一。","6. 冶炼厂识别号颁发者 - 这是 D 栏中输入的冶炼厂识别号的颁发者。","7. 冶炼厂所在街道 - 提供冶炼厂所在街道的名称。此为选填字段。","8. 冶炼厂所在城市 - 提供冶炼厂所在城市的名称。此为选填字段。","9. 冶炼厂地点:州/省(如适用)- 提供冶炼厂所在的州/省。此为选填字段。","10. 冶炼厂联系人名称 - 如果在统一使用此报告模板中,所在国家或地区有保护个人信息的法律法规,填写个人联系信息会有可能触犯法律法规,则建议申报公司在填写“冶炼厂联系人姓名”和“冶炼厂联系人电子邮件”列时,先确保联系人本人同意公开其联系信息。 。\\n\\n如果申报人已获得公开联系信息的授权信息,请输入与之合作的冶炼厂之联系人姓名。","11. 冶炼厂联系人电子邮件 - 填写被确定为冶炼厂联系人的电子邮件。例如: John.Smith@SmelterXXX.com。填写此字段栏前,请阅读冶炼厂联系人姓名填写指引。","12. 这是一个评论区,允许公司指定下一步管理冶炼厂的步骤。 如果该设施未列在负责任矿物审验流程 (RMAP) 无冲突冶炼厂计划合规冶炼厂列表,您可以对冶炼厂采取这些措施。 示例:要求通过 RMAP 评估冶炼厂设施,从首选供应商名单中删除等。","13. 矿场名称 - 此字段可让公司为冶炼厂正在使用的实际矿场取名。如果已知实际矿场的名称,请输入该名称。如果冶炼厂的所有原料均来自回收料或报废料资源,则输入“回收料”或“报废料”以取代矿场名称,并在 P 列回答“是”。\\n\\n“根据 RMI 确认 RCOI”可能是该问题可接受的回答之一。","14. 矿场地点(国家或地区)- 无限制文本字段,公司可在此注明冶炼厂正在使用的矿场地点。请输入矿场所在国家或地区。如果原产国未知,则输入“未知”。如果冶炼厂的所有原料均来自回收料或报废料资源,则输入“回收料”或“报废料”以取代原产国。此为选填字段。\\n\\n“根据 RMI 确认 RCOI”可能是该问题可以接受的回答之一。","15. 表明冶炼厂是否仅从回收料或报废料资源中获取冶炼过程的来料。此为选答问题。本问题允许的回答包括:\\n\\n- 是\\n- 否\\n- 未知","16. 注释 - 无格式限制的文字栏,可输入有关冶炼厂的任何意见。例如:冶炼厂正在被 YYY 公司收购","矿厂列表选项卡的填写说明。请仅以英文作答。","1. 金属 - 在下拉菜单中,选择正在输入信息的矿厂所提炼的金属。","2. 从该矿厂采购的冶炼厂的名称 - 请尽可能填写从所列矿厂或矿场采购的冶炼厂的名称。","3. 矿厂名称 - 提供矿厂的名称。","4. 矿厂识别 - 依据矿厂识别系统每一矿厂均有一独一无二的标识。相信会有一间矿厂存在多个名称的情况出现。 因此,唯一的矿厂标识能将其他名称和别名进行统一。","5. 矿厂识别号颁发者 - 这是 D 栏中输入的矿厂识别号的颁发者。","6. 矿厂识别号颁发者 - 这是 D 栏中输入的矿厂识别号的颁发者。","7. 矿厂所在街道 - 提供矿厂所在街道的名称。","8. 矿厂所在城市 - 提供矿厂所在城市的名称。","9. 矿厂地点:州/省(如适用)- 提供矿厂所在的州/省。","10. 矿厂联系人名称 - 如果在统一使用此报告模板中,所在国家或地区有保护个人信息的法律法规,填写个人联系信息会有可能触犯法律法规,则建议申报公司在填写“矿厂联系人姓名”和“矿厂联系人电子邮件”列时,先确保联系人本人同意公开其联系信息。 。\\n\\n如果申报人已获得公开联系信息的授权信息,请输入与之合作的矿厂之联系人姓名。","11. 矿厂联系人电子邮件 - 填写被确定为矿厂联系人的电子邮件。例如: John.Smith@MineXXX.com。填写此字段栏前,请阅读矿厂联系人姓名填写指引。","12. 这是一个评论区,允许公司指定下一步管理矿厂的步骤。 如果该设施未列在负责任矿物审验流程 (RMAP) 合规矿厂列表,您可以对矿厂采取这些措施。 示例:要求通过 RMAP 评估矿厂设施,从首选供应商名单中删除等。","13. 注释 - 无格式限制的文字栏,可输入有关矿厂的任何意见。例如:矿厂正在被 YYY 公司收购","检查工作表用于确认是否所有此模板中需要的信息均已提供、是否实时更新和是否经得起任何在填申报时进行查阅。 此工作表用于确认申报完毕。\\n\\n用此表检查是否已填妥所有字段(已填字段将高亮显示为绿色)。如果不是,请检查显示红色的字段,并阅读 C 列中的备注信息,并按指示操作。填表人可用 D 列中的 URL 直接进入要填写的字段。","条款及细则","负责任矿物审验流程(“流程”)、合规冶炼厂列表(“列表”)及报告模板和工具表,包括但不限于冲突矿产报告模板(统称为“工具”),所提供的一切信息仅供参考之用,并以其上载日期为准。在列表或工具表中,如有任何不准确或遗漏的信息,均非特拉华州非股份公司责任商业联盟 (RBA) 的责任所在。是否使用和/或如何使用列表上的全部资料或部分资料或使用任何工具,用户拥有唯一及绝对的决定权​​。使用列表或任何工具之前,请向自己的法律顾问征询意见。列表或工具中没有任何一部份会构成法律咨询。使用列表或任何工具均属自愿。","RBA 皆不会为名单或任何工具作任何的申述或保证。列表和工具依据“原样”和“现有”来提供。RBA 特此声明,不做任何性质的保证、明示、暗示或其他方式,或说明贸易或关税,包括但不限于任何隐含的适销性、非侵权性、质量、标题、为某一特定用途的适用性而作完整性或准确性的保证。","根据相关法律所允许的最大限度,RBA 声明拒绝任何损失、费用或任何性质的损害之责任,包括但不限于因用户使用名单或工具表而造成特殊、偶然、惩罚性、直接、间接的或后果性损害或失去收入或利润,无论是以侵权、合同、章程或其他方式造成的损害,即使他们已被告知有这种损害的可能性。","鉴于对列表和/或工具表单的使用,用户在此同意:a) 让 RBA 及其相关管理人员、董事、代理、员工、志愿者、代表、承包商、继承人、指定人解除并永远免除责任,而不会因使用列表或任何工具导致或产生的任何及全部索赔、行动、损失、诉讼、损害、判决、征费和处决而受损,这包括用户有过或曾经可以、应当或者可能拥有或声称拥有对 RBA 及其相关管理人员、董事、代理、员工、志愿者、代表、承包商、继承人、指定人的索赔;b) 保障和捍卫 RBA 及其相关管理人员、董事、代理、员工、志愿者、代表、承包商、继承人、指定人的权利,确保其不会因用户使用列表或任何工具而导致或产生的任何及全部索赔、行动、损失、诉讼、损害、判决、征费和处决而受损。","如果此条款及细则的某个条款部分在法律下无效或不可执行,被视为无效的部分应仅限于该无效或不能强制执行的部份,而不以任何方式影响到条款及细则的其余条款。"],"smelterList":[],"productList":[],"definitions":[{"term":"铝加工厂","definition":"铝加工厂是将铝土矿转化为氧化铝或将氧化铝冶炼成铝的工厂。铝加工厂还包括将二次材料(回收材料、报废产品)转化为铝金属或铝合金的工厂。"},{"term":"授权人","definition":"此字段定义负责申报内容的人员。授权人可能与联络人不同。请勿填写“相同”或相似信息,需提供授权人的姓名。"},{"term":"受冲突影响和高风险地区 (CAHRA)","definition":"受冲突影响和高风险的地区是处于武装冲突状态的地区,脆弱的冲突后地区以及治理和安全薄弱或根本不存在的地区,例如失败的国家,广泛而系统地违反国际法的地区,包括侵犯人权行为。"},{"term":"申报范围或种类","definition":"为实现本模板的设计目的,“申报范围”明确了申报公司所申报信息的适用性。申报范围可能涵盖了整间申报公司所提供的产品和服务或其部份适用的产品和服务。此模板也可用于单一、多种或申报人自定义的产品。 “用户自定义”的申报范围可用于仅部分公司营运适用或部分产品系列适用的情况。"},{"term":"尽职调查","definition":"《经济合作与发展组织关于来自受冲突影响和高风险地区矿石的负责任供应链尽职调查指\\n南》(简称“经合组织指南”)将“尽职调\\n查”定义为“一个持续的、主动性和应对性流程,通过该流程,公司可以确保其尊重人权而不会导致冲突。” \\n更多信息可以在 http://www.responsiblemineralsinitiative.org/training-and-resources/conflict-affected-and-high-risk-areas/."},{"term":"独立的第三方审核机构","definition":"冶炼厂审核中提到的“独立的第三方审核机构”是私营部门组织,它评估冶炼厂或精炼厂对物料的可追朔性是否达到负责任矿物审验流程 (RMAP) 中的标准或相关审核标准。为确保中立及公正,这类机构及其审核团队必须与被审核方无利益交往。"},{"term":"有意添加","definition":"针对性添加通常被认为有目的地在产品构成中使用某种物料,这里特指某种金属,从而持久地获得某种特性,观感或质量。\\n\\n而美国证券交易委员会没有在最终规则* 里为措辞“有针对性添加”进行定义。最终规则里对此的序文表示为:\\n“我们认为有针对性地添加,而不是产品天然拥有,是一个判断冲突矿产是否必须在产品功能或生产制造中的重要因素。这与谁添加无关,只在乎冲突矿产有否存在于产品中。决定冲突矿产对产品是否需要,并非取决于冲突矿产是否直接添加进产品或直接添加进来自第三方的产品部件。所以,申报人必须报告含冲突矿产产品的总数,并与供应商合作共同遵守要求。 在判断产品中的冲突矿产是否需要时,申报人必须考虑其产品中有否冲突矿产,即使是原本就存在于由供应商提供的零部件中。”\\n\\n*(56296 Federal Register / Vol. 77, No. 177 / Wednesday, September 12, 2012 / Rules and Regulations)"},{"term":"铁加工厂","definition":"铁加工厂是将铁矿石或废钢转化为生铁、粗钢、精炼钢、低合金或高合金钢的工厂。"},{"term":"矿厂(矿场)","definition":"矿厂或矿场是原材料的采挖点。"},{"term":"经济合作与发展组织(Organization for Economic Co-operation and Development,OECD)","definition":"经济合作与发展组织"},{"term":"加工厂","definition":"执行浓缩或纯化工艺,以去除原材料中所有混杂成分、分离出所需元素的工厂。这包括但不限于:清洁、分离、浓缩(例如,通过机械、加热或化学方法将有价值矿物与不需要的脉石分离)、焙烧(例如,冶炼、焙烧或其他去除杂质的方法)、阴极和阳极电解生产和其他精炼工艺。"},{"term":"产品","definition":"公司的产品或成品是指在制造生产阶段或最后完成阶段的物料或物品,并且已可以交付或销售给客户。"},{"term":"稀土元素精炼厂","definition":"稀土元素精炼厂是将稀土元素精矿或由离子吸附粘土浸出的稀土元素沉淀物转化为稀土氧化物、稀土元素金属或任何中间产品的工厂。"},{"term":"责任商业联盟(Responsible Business Alliance,RBA)","definition":"责任商业联盟 (www.responsiblebusiness.org)"},{"term":"负责任矿物审验流程 (RMAP)","definition":"负责任矿物审验流程 (RMAP) 是由责任商业联盟 (RBA) 所制定,用于提高公司对金属责任采购进行查证的能力。有关 RMAP 的更多信息,请访问 http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/。"},{"term":"负责任矿物计划","definition":"负责任矿物计划由责任商业联盟 (RBA) 于 2008 年发起成立,并已成为公司供应链就冲突矿产问题而最广泛使用和认可的标准。 今天,来自许多行业的超过 460 家公司加入了负责任矿物计划,共同促成了一系列查证工具和资源的落实,例如负责任矿物审验流程、冲突矿产报告模板、合理的原产国信息查询和一系列无冲突矿产采购指引。另外,负责任矿物计划组织还会定期举办关于冲突矿产专题的工作坊、参与政策制度的修定、与前沿的社会团体和政府机构研讨等。有关更多信息,请造访 http://www.responsiblemineralsinitiative.org"},{"term":"无冲突冶炼厂计划合规冶炼厂列表","definition":"负责任矿物审验流程 (RMAP) 中的合规冶炼厂列表包含所有被评估并且符合标准的冶炼厂和精炼厂。其中的标准有负责任矿物审验流程 (RMAP)、负责任矿物计划 (RMI) 或其他对等机构计划(例如责任珠宝委员会或伦敦金银市场协会)。如果冶炼厂或精炼厂不在列表内,则表示其未完成 RMAP 评估或不符合 RMAP 标准要求。\\n\\n要查看经验证符合 RMAP 的冶炼厂和精炼厂列表,请访问 www.responsiblemineralsinitiative.org。"},{"term":"冶炼厂","definition":"冶炼厂或精炼厂是指购买并加工矿石、矿渣、回收料、报废料从而提炼成金属或含金属的介质。产品有纯度为 99.5% 或更高的金属、金属粉体、金属锭、金属条、金属粒子、金属氧化物、金属盐类等。术语“冶炼厂”和“精炼厂”和“加工厂”在各类型的刊物经常互用。"},{"term":"冶炼厂识别序号","definition":"负责任矿物计划 (RMI) 会编发独一无二的识别号码给由供应链成员申报上来的冶炼厂或精炼厂,无论其是否已确认过符合负责任矿物审验流程 (RMAP) 中审核标准所定义冶炼厂的物征。"},{"term":"锌加工厂","definition":"锌加工厂是将硫化锌精矿、锌钙(由焙烧获得)或氧化锌(由回收获得)转化为特殊高品位锌 (SHG) 或任何中间产品(例如锌钙)的设施。"}],"mineList":[],"smelterLookup":["以下目录是截止此模板发布时 RMI 的最新冶炼厂名称/别名信息。此目录实时更新,可于下述 RMI 网站查询最新版本:http://www.responsiblemineralsinitiative.org/responsible-minerals-assurance-process/exports/cmrt-export/。冶炼厂存在于此目录中不保证它就是负责任矿物审验流程内的目前有效或合规的冶炼厂。\\n\\n有关有效或合规标准冶炼厂名称的最新准确列表,请访问 RMI 网站 www.responsiblemineralsinitiative.org。\\n\\nB 列包括的名称表示供应链对于特定冶炼厂通常认可和报告使用的公司名称。这些名称可能包括公司曾用名、备用名称、简称、或其他变体。虽然这些名称可能不是 RMI 标准冶炼厂名称,但参考名称有助于识别列在冶炼厂查找中的 C 列之冶炼厂。\\n\\n在 ASCII 字符集中,C 列是正式标准冶炼厂名称列表。大多数冶炼厂的这两列具有相同条目,然而,如果常用名称与标准名称不同,则应在 B 列中注明这种变化。"]}}}'),H1={minerals:{tooManySelected:"选择的矿产过多",selectAtLeastOne:"请至少选择一种矿产",enterAtLeastOne:"请至少填写一种矿产",otherRequired:"选择“其他”后需填写矿产名称",otherNotAllowed:"未选择“其他”时请清空矿产名称",tooMany:"填写的矿产过多"},companyQuestions:{commentRequired:"请填写备注"},required:"必填",date:{invalid:"日期格式无效(DD-MMM-YYYY)"},email:{invalid:"邮箱格式无效"},externalPickFailedTitle:"外部选择失败",externalPickFailedContent:"外部选择器未能成功返回数据,请重试。"},V1={common:x1,templates:_1,tabs:I1,sections:R1,notices:M1,badges:N1,conditions:L1,placeholders:q1,productPlaceholders:A1,hints:E1,tables:P1,actions:D1,confirm:$1,selection:O1,options:F1,minerals:z1,questions:j1,companyQuestions:B1,productList:K1,fields:Q1,docStatus:U1,checker:G1,revision:Y1,docs:Z1,errors:H1},ia={"en-US":{translation:T1},"zh-CN":{translation:V1}},W1=()=>{Be.use(fo.initReactI18next),fo.initReactI18next.init(Be)};function kc(e="en-US"){return Be.isInitialized?(W1(),Object.entries(ia).forEach(([t,n])=>{Be.addResourceBundle(t,"translation",n.translation,!0,!1)}),Be.language!==e&&Be.changeLanguage(e),Be):(Be.use(fo.initReactI18next).init({resources:ia,lng:e,fallbackLng:"en-US",initImmediate:!1,interpolation:{escapeValue:!1}}),Be)}function J1(){return Be.isInitialized}function X1(e){const t={};return e.layout?.contentMaxWidth&&(t["--cm-content-max-width"]=e.layout.contentMaxWidth),e.layout?.pagePadding&&(t["--cm-page-padding"]=e.layout.pagePadding),e.layout?.sectionGap&&(t["--cm-section-gap"]=e.layout.sectionGap),e.layout?.stepNavPadding&&(t["--cm-step-nav-padding"]=e.layout.stepNavPadding),e.fieldRequired?.background&&(t["--cm-field-required-bg"]=e.fieldRequired.background),e.fieldRequired?.border&&(t["--cm-field-required-border"]=e.fieldRequired.border),e.fieldFocus?.shadowColor&&(t["--cm-field-focus-shadow-color"]=e.fieldFocus.shadowColor),e.animation?.duration&&(t["--cm-transition-duration"]=e.animation.duration),e.animation?.easing&&(t["--cm-transition-easing"]=e.animation.easing),e.fontSize?.xs&&(t["--cm-font-size-xs"]=e.fontSize.xs),e.fontSize?.sm&&(t["--cm-font-size-sm"]=e.fontSize.sm),e.fontSize?.base&&(t["--cm-font-size-base"]=e.fontSize.base),e.fontSize?.lg&&(t["--cm-font-size-lg"]=e.fontSize.lg),e.component?.buttonMinWidth&&(t["--cm-button-min-width"]=e.component.buttonMinWidth),e.component?.placeholderHeight&&(t["--cm-placeholder-height"]=e.component.placeholderHeight),e.component?.formControlMaxWidth&&(t["--cm-form-control-max-width"]=e.component.formControlMaxWidth),e.grid?.questionMatrixLabelWidth&&(t["--cm-question-matrix-label-width"]=e.grid.questionMatrixLabelWidth),e.grid?.questionMatrixAnswerWidth&&(t["--cm-question-matrix-answer-width"]=e.grid.questionMatrixAnswerWidth),e.grid?.companyQuestionLabelWidth&&(t["--cm-company-question-label-width"]=e.grid.companyQuestionLabelWidth),e.grid?.companyQuestionAnswerWidth&&(t["--cm-company-question-answer-width"]=e.grid.companyQuestionAnswerWidth),e.spacing?.listItemPadding&&(t["--cm-list-item-padding"]=e.spacing.listItemPadding),e.spacing?.emptyStatePadding&&(t["--cm-empty-state-padding"]=e.spacing.emptyStatePadding),t}const ek={cssVar:{prefix:"ant"},token:{colorPrimary:"#1565c0",colorPrimaryHover:"#1976d2",colorPrimaryActive:"#0d47a1",colorPrimaryBg:"#e3f2fd",colorPrimaryBorder:"#90caf9",colorSuccess:"#2e7d32",colorSuccessBg:"#e8f5e9",colorSuccessBorder:"#4caf50",colorWarning:"#f57c00",colorWarningBg:"#fff3e0",colorWarningBorder:"#ff9800",colorError:"#c62828",colorErrorBg:"#ffebee",colorErrorBorder:"#ef5350",colorInfo:"#0288d1",colorInfoBg:"#e1f5fe",colorInfoBorder:"#03a9f4",colorText:"#212121",colorTextSecondary:"#757575",colorTextTertiary:"#9e9e9e",colorTextHeading:"#212121",colorTextDescription:"#757575",colorBgLayout:"#f5f5f5",colorBgContainer:"#ffffff",colorBgElevated:"#ffffff",colorBorder:"#e0e0e0",colorBorderSecondary:"#eeeeee",colorFillSecondary:"#eeeeee",colorFillTertiary:"#f5f5f5",colorFillQuaternary:"#fafafa",borderRadius:6,borderRadiusLG:8,borderRadiusSM:4,borderRadiusXS:2,fontFamily:"'IBM Plex Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",fontFamilyCode:"'JetBrains Mono', 'Fira Code', 'Consolas', monospace",fontSize:14,boxShadow:"0 1px 2px rgba(0, 0, 0, 0.05)",boxShadowSecondary:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"}},{useToken:tk}=y.theme,nk=[["--app-bg-layout","colorBgLayout"],["--app-bg-container","colorBgContainer"],["--app-bg-elevated","colorBgElevated"],["--app-text","colorText"],["--app-text-secondary","colorTextSecondary"],["--app-text-tertiary","colorTextTertiary"],["--app-text-heading","colorTextHeading"],["--app-text-description","colorTextDescription"],["--app-border","colorBorder"],["--app-border-secondary","colorBorderSecondary"],["--app-split","colorSplit"],["--app-primary","colorPrimary"],["--app-primary-bg","colorPrimaryBg"],["--app-primary-border","colorPrimaryBorder"],["--app-info","colorInfo"],["--app-info-bg","colorInfoBg"],["--app-info-border","colorInfoBorder"],["--app-success","colorSuccess"],["--app-success-bg","colorSuccessBg"],["--app-success-border","colorSuccessBorder"],["--app-warning","colorWarning"],["--app-warning-bg","colorWarningBg"],["--app-warning-border","colorWarningBorder"],["--app-error","colorError"],["--app-error-bg","colorErrorBg"],["--app-error-border","colorErrorBorder"],["--app-fill-secondary","colorFillSecondary"],["--app-fill-tertiary","colorFillTertiary"],["--app-fill-quaternary","colorFillQuaternary"],["--app-bg-text-hover","colorBgTextHover"],["--app-bg-text-active","colorBgTextActive"]];function ok(e,t,n){const o=n?.[e];if(typeof o=="string"&&o.length>0)return`var(${o})`;const r=t[e];return r==null?"":String(r)}function rk(e,t){return nk.reduce((o,[r,i])=>(o[r]=ok(i,e,t),o),{})}function ik({children:e,cssVariables:t}){const n=tk(),o=rk(n.token,n.cssVar),r=t?X1(t):{},i={...o,...r};return f.jsx("div",{style:i,children:e})}var ln={},br={exports:{}},sa;function on(){return sa||(sa=1,(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(br)),br.exports}var cn={},aa;function sk(){if(aa)return cn;aa=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.default=void 0;const e={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"};return cn.default=e,cn}var un={},mn={},dn={},pn={},la;function Tc(){return la||(la=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.commonLocale=void 0,pn.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}),pn}var ca;function ak(){if(ca)return dn;ca=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.default=void 0;var e=Tc();function t(l){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},t(l)}function n(l,c){var u=Object.keys(l);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(l);c&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(l,m).enumerable})),u.push.apply(u,p)}return u}function o(l){for(var c=1;c<arguments.length;c++){var u=arguments[c]!=null?arguments[c]:{};c%2?n(Object(u),!0).forEach(function(p){r(l,p,u[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(u)):n(Object(u)).forEach(function(p){Object.defineProperty(l,p,Object.getOwnPropertyDescriptor(u,p))})}return l}function r(l,c,u){return c=i(c),c in l?Object.defineProperty(l,c,{value:u,enumerable:!0,configurable:!0,writable:!0}):l[c]=u,l}function i(l){var c=s(l,"string");return t(c)=="symbol"?c:String(c)}function s(l,c){if(t(l)!="object"||!l)return l;var u=l[Symbol.toPrimitive];if(u!==void 0){var p=u.call(l,c);if(t(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(l)}var a=o(o({},e.commonLocale),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",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",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"});return dn.default=a,dn}var fn={},ua;function xc(){if(ua)return fn;ua=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.default=void 0;const e={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};return fn.default=e,fn}var ma;function _c(){if(ma)return mn;ma=1;var e=on().default;Object.defineProperty(mn,"__esModule",{value:!0}),mn.default=void 0;var t=e(ak()),n=e(xc());const o={lang:{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"],...t.default},timePickerLocale:{...n.default}};return mn.default=o,mn}var da;function lk(){if(da)return un;da=1;var e=on().default;Object.defineProperty(un,"__esModule",{value:!0}),un.default=void 0;var t=e(_c());return un.default=t.default,un}var pa;function ck(){if(pa)return ln;pa=1;var e=on().default;Object.defineProperty(ln,"__esModule",{value:!0}),ln.default=void 0;var t=e(sk()),n=e(lk()),o=e(_c()),r=e(xc());const i="${label} is not a valid ${type}",s={locale:"en",Pagination:t.default,DatePicker:o.default,TimePicker:r.default,Calendar:n.default,global:{placeholder:"Please select",close:"Close",sortable:"sortable"},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:i,method:i,array:i,object:i,number:i,date:i,boolean:i,integer:i,float:i,regexp:i,email:i,url:i,hex:i},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}"}}},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};return ln.default=s,ln}var wr,fa;function uk(){return fa||(fa=1,wr=ck()),wr}var mk=uk();const dk=Ct(mk);var hn={},yn={},ha;function pk(){if(ha)return yn;ha=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.default=void 0;const e={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"};return yn.default=e,yn}var gn={},bn={},wn={},ya;function fk(){if(ya)return wn;ya=1,Object.defineProperty(wn,"__esModule",{value:!0}),wn.default=void 0;var e=Tc();function t(l){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},t(l)}function n(l,c){var u=Object.keys(l);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(l);c&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(l,m).enumerable})),u.push.apply(u,p)}return u}function o(l){for(var c=1;c<arguments.length;c++){var u=arguments[c]!=null?arguments[c]:{};c%2?n(Object(u),!0).forEach(function(p){r(l,p,u[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(u)):n(Object(u)).forEach(function(p){Object.defineProperty(l,p,Object.getOwnPropertyDescriptor(u,p))})}return l}function r(l,c,u){return c=i(c),c in l?Object.defineProperty(l,c,{value:u,enumerable:!0,configurable:!0,writable:!0}):l[c]=u,l}function i(l){var c=s(l,"string");return t(c)=="symbol"?c:String(c)}function s(l,c){if(t(l)!="object"||!l)return l;var u=l[Symbol.toPrimitive];if(u!==void 0){var p=u.call(l,c);if(t(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(l)}var a=o(o({},e.commonLocale),{},{locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",week:"周",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪",yearFormat:"YYYY年",cellDateFormat:"D",monthBeforeYear:!1});return wn.default=a,wn}var vn={},ga;function Ic(){if(ga)return vn;ga=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.default=void 0;const e={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]};return vn.default=e,vn}var ba;function Rc(){if(ba)return bn;ba=1;var e=on().default;Object.defineProperty(bn,"__esModule",{value:!0}),bn.default=void 0;var t=e(fk()),n=e(Ic());const o={lang:{placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"],...t.default},timePickerLocale:{...n.default}};return o.lang.ok="确定",bn.default=o,bn}var wa;function hk(){if(wa)return gn;wa=1;var e=on().default;Object.defineProperty(gn,"__esModule",{value:!0}),gn.default=void 0;var t=e(Rc());return gn.default=t.default,gn}var va;function yk(){if(va)return hn;va=1;var e=on().default;Object.defineProperty(hn,"__esModule",{value:!0}),hn.default=void 0;var t=e(pk()),n=e(hk()),o=e(Rc()),r=e(Ic());const i="${label}不是一个有效的${type}",s={locale:"zh-cn",Pagination:t.default,DatePicker:o.default,TimePicker:r.default,Calendar:n.default,global:{placeholder:"请选择",close:"关闭",sortable:"可排序"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckAll:"全选",filterSearchPlaceholder:"在筛选项中搜索",emptyText:"暂无数据",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Tour:{Next:"下一步",Previous:"上一步",Finish:"结束导览"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{titles:["",""],searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",deselectAll:"取消全选",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开",collapse:"收起"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:i,method:i,array:i,object:i,number:i,date:i,boolean:i,integer:i,float:i,regexp:i,email:i,url:i,hex:i},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},QRCode:{expired:"二维码过期",refresh:"点击刷新",scanned:"已扫描"},ColorPicker:{presetEmpty:"暂无",transparent:"无色",singleColor:"单色",gradientColor:"渐变色"}};return hn.default=s,hn}var vr,Sa;function gk(){return Sa||(Sa=1,vr=yk()),vr}var bk=gk();const wk=Ct(bk);var po={exports:{}},vk=po.exports,Ca;function Sk(){return Ca||(Ca=1,(function(e,t){(function(n,o){e.exports=o(dc())})(vk,(function(n){function o(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var r=o(n),i={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(s,a){return a==="W"?s+"周":s+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(s,a){var l=100*s+a;return l<600?"凌晨":l<900?"早上":l<1100?"上午":l<1300?"中午":l<1800?"下午":"晚上"}};return r.default.locale(i,null,!0),i}))})(po)),po.exports}Sk();J1()||kc("en-US");const Ck={"en-US":dk,"zh-CN":wk},Mc={"en-US":"en","zh-CN":"zh-cn"},kk=e=>{kc(e),Xe.locale(Mc[e]??"en")};function Tk({locale:e="en-US",onLocaleChange:t,theme:n=ek,cssVariables:o,children:r,fallback:i}){const s=ie.useRef(e),a=Mc[e]??"en";(!Be.hasResourceBundle("en-US","translation")||!Be.hasResourceBundle("zh-CN","translation")||Be.language!==e||Xe.locale()!==a)&&kk(e),ie.useEffect(()=>{s.current!==e&&(s.current=e,t?.(e))},[e,t]);const c=i??f.jsx(y.Flex,{justify:"center",align:"center",style:{height:256},children:f.jsx(y.Spin,{size:"large"})});return f.jsx(y.ConfigProvider,{theme:n,locale:Ck[e],children:f.jsx(y.App,{children:f.jsx(ik,{cssVariables:o,children:f.jsx(ie.Suspense,{fallback:c,children:r})})})})}function $n(e){return e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&apos;/g,"'")}function xk(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function _k(e){return new TextDecoder().decode(e)}function Ik(e){return new TextEncoder().encode(e)}function Rt(e,t){const n=e[t];if(!n)throw new Error(`xlsx missing file: ${t}`);return _k(n)}function Lo(e,t,n){e[t]=Ik(n)}function Rk(e){const t=[],n=/<si\b[^>]*>([\s\S]*?)<\/si>/g;let o;for(;o=n.exec(e);){const r=o[1]??"",i=[],s=/<t\b[^>]*>([\s\S]*?)<\/t>/g;let a;for(;a=s.exec(r);)i.push($n(a[1]??""));t.push(i.join(""))}return t}function Mk(e,t){const n=new Map,o=/<sheet\b[^>]*\bname="([^"]+)"[^>]*\br:id="([^"]+)"[^>]*\/?>/g;let r;for(;r=o.exec(e);)n.set($n(r[1]??""),r[2]??"");const i=new Map,s=/<Relationship\b[^>]*\bId="([^"]+)"[^>]*\bTarget="([^"]+)"[^>]*\/?>/g;let a;for(;a=s.exec(t);)i.set(a[1]??"",$n(a[2]??""));const l=new Map;for(const[c,u]of n.entries()){const p=i.get(u);if(!p)continue;const m=p.startsWith("/")?p.slice(1):`xl/${p}`;l.set(c,m)}return l}function Ci(e,t){const n=`r="${t}"`,o=e.indexOf(n);if(o<0)return null;const r=e.lastIndexOf("<c",o);if(r<0)return null;const i=e.indexOf(">",o);if(i<0)return null;const s=e.slice(r,i+1);if(s.endsWith("/>"))return{start:r,end:i+1,openTag:s,body:""};const a=e.indexOf("</c>",i+1);if(a<0)return null;const l=e.slice(i+1,a);return{start:r,end:a+4,openTag:s,body:l}}function ka(e,t){const n=new RegExp(`\\s+${t}="[^"]*"`,"g");return e.replace(n,"")}function Nk(e,t){const n=Ci(e,t);return n?/<f[\s>]/.test(n.body):!1}function qo(e,t,n){const o=Ci(e,t);if(!o)return null;const{openTag:r,body:i}=o,a=/\bt="([^"]+)"/.exec(r)?.[1];if(a==="inlineStr"){const m=/<t\b[^>]*>([\s\S]*?)<\/t>/.exec(i);return m?$n(m[1]??""):""}const c=/<v>([\s\S]*?)<\/v>/.exec(i);if(!c)return"";const u=$n(c[1]??"");if(a==="s"){const p=Number(u);return Number.isFinite(p)?n[p]??"":""}return u}function qe(e,t,n){return Nc(e,t,n,{allowOverwriteFormula:!1})}function Lk(e,t,n){return Nc(e,t,n,{allowOverwriteFormula:!0})}function Nc(e,t,n,o){const r=Ci(e,t);if(!r)throw new Error(`cell not found in template: ${t}`);const{start:i,end:s,openTag:a,body:l}=r;if(!o.allowOverwriteFormula&&/<f[\s>]/.test(l))throw new Error(`refusing to overwrite formula cell: ${t}`);let c=a;c=ka(c,"t"),c=c.replace(/\s*\/>$/,">"),c=c.replace(/>$/,' t="inlineStr">'),c=c.replace(/\s+t="inlineStr"\s+t="inlineStr"/g,' t="inlineStr"');const u=n??"",p=u?`${c}<is><t xml:space="preserve">${xk(u)}</t></is></c>`:(()=>{const m=ka(a,"t");return m.endsWith("/>")?m:m.replace(/>$/,"/>")})();return e.slice(0,i)+p+e.slice(s)}async function qk(e){const{unzipSync:t}=await Promise.resolve().then(()=>require("./browser-VGwYfUp0.cjs")),n=t(new Uint8Array(e)),o=Rt(n,"xl/workbook.xml"),r=Rt(n,"xl/_rels/workbook.xml.rels"),i=n["xl/sharedStrings.xml"]?Rt(n,"xl/sharedStrings.xml"):"",s=i?Rk(i):[];return{files:n,sharedStrings:s,sheetPathByName:Mk(o,r)}}function Ak(e){const t="xl/workbook.xml";let n=Rt(e,t);/<calcPr\b/.test(n)?n=n.replace(/<calcPr\b([^>]*)\/>/,(o,r)=>/\bfullCalcOnLoad=/.test(r)?`<calcPr${String(r).replace(/fullCalcOnLoad="[^"]*"/,'fullCalcOnLoad="1"')}/>`:`<calcPr${r} fullCalcOnLoad="1"/>`):n=n.replace(/<\/workbook>/,'<calcPr fullCalcOnLoad="1"/></workbook>'),Lo(e,t,n)}function Ek(e){e["xl/calcChain.xml"]&&delete e["xl/calcChain.xml"];const t="[Content_Types].xml";if(e[t]){let o=Rt(e,t);o=o.replace(/<Override\b[^>]*PartName="\/xl\/calcChain\.xml"[^>]*\/>\s*/g,""),Lo(e,t,o)}const n="xl/_rels/workbook.xml.rels";if(e[n]){let o=Rt(e,n);o=o.replace(/<Relationship\b[^>]*\bTarget="calcChain\.xml"[^>]*\/>\s*/g,""),o=o.replace(/<Relationship\b[^>]*\bTarget="\/xl\/calcChain\.xml"[^>]*\/>\s*/g,""),o=o.replace(/<Relationship\b[^>]*\bType="http:\/\/schemas\.openxmlformats\.org\/officeDocument\/2006\/relationships\/calcChain"[^>]*\/>\s*/g,""),Lo(e,n,o)}}async function Pk(e){const{zipSync:t}=await Promise.resolve().then(()=>require("./browser-VGwYfUp0.cjs"));return t(e,{level:6})}function Ot(e,t){const n=e.sheetPathByName.get(t);if(!n)throw new Error(`xlsx missing sheet: ${t}`);return Rt(e.files,n)}function Sn(e,t,n){const o=e.sheetPathByName.get(t);if(!o)throw new Error(`xlsx missing sheet: ${t}`);Lo(e.files,o,n)}const Dk={cmrt:{"6.01":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61,8:67},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:5,8:7},companyHeaderRowByKey:{A:75,B:77,C:79,D:81,E:83,F:85,G:87,H:89},companySpanByKey:{A:1,B:1,C:1,D:1,E:1,F:1,G:1,H:21},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"6.1":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61,8:67},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:5,8:7},companyHeaderRowByKey:{A:75,B:77,C:79,D:81,E:83,F:85,G:87,H:89},companySpanByKey:{A:1,B:1,C:1,D:1,E:1,F:1,G:1,H:21},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"6.22":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61,8:67},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:5,8:7},companyHeaderRowByKey:{A:75,B:77,C:79,D:81,E:83,F:85,G:87,H:89},companySpanByKey:{A:1,B:1,C:1,D:1,E:1,F:1,G:1,H:21},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"6.31":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61,8:67},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:5,8:7},companyHeaderRowByKey:{A:75,B:77,C:79,D:81,E:83,F:85,G:87,H:89},companySpanByKey:{A:1,B:1,C:1,D:1,E:1,F:1,G:1,H:21},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"6.4":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61,8:67},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:5,8:7},companyHeaderRowByKey:{A:75,B:77,C:79,D:81,E:83,F:85,G:87,H:89},companySpanByKey:{A:1,B:1,C:1,D:1,E:1,F:1,G:1,H:21},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"6.5":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61,8:67},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:5,8:7},companyHeaderRowByKey:{A:75,B:77,C:79,D:81,E:83,F:85,G:87,H:89},companySpanByKey:{A:1,B:1,C:1,D:1,E:1,F:1,G:1,H:21},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37}},emrt:{"1.1":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:7},companyHeaderRowByKey:{A:69,B:71,C:73,D:77,E:79,F:81,G:83},companySpanByKey:{A:1,B:1,C:3,D:1,E:1,F:1,G:36},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"1.11":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:7},companyHeaderRowByKey:{A:69,B:71,C:73,D:77,E:79,F:81,G:83},companySpanByKey:{A:1,B:1,C:3,D:1,E:1,F:1,G:36},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"1.2":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:7},companyHeaderRowByKey:{A:69,B:71,C:73,D:77,E:79,F:81,G:83},companySpanByKey:{A:1,B:1,C:3,D:1,E:1,F:1,G:36},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"1.3":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55,7:61},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:5,7:7},companyHeaderRowByKey:{A:69,B:71,C:73,D:77,E:79,F:81,G:83},companySpanByKey:{A:1,B:1,C:3,D:1,E:1,F:1,G:36},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"2.0":{questionHeaderRowByNumber:{1:29,2:41,3:53,4:65,5:77,6:89,7:101},questionSpanByNumber:{1:11,2:11,3:11,4:11,5:11,6:11,7:13},companyHeaderRowByKey:{A:115,B:117,C:119,D:131,E:133,F:135,G:137},companySpanByKey:{A:1,B:1,C:11,D:1,E:1,F:1,G:50},amrtQ1Row:29,amrtQ2Row:41,amrtQ3Row:53},"2.1":{questionHeaderRowByNumber:{1:29,2:41,3:53,4:65,5:77,6:89,7:101},questionSpanByNumber:{1:11,2:11,3:11,4:11,5:11,6:11,7:13},companyHeaderRowByKey:{A:115,B:117,C:119,D:131,E:133,F:135,G:137},companySpanByKey:{A:1,B:1,C:11,D:1,E:1,F:1,G:50},amrtQ1Row:29,amrtQ2Row:41,amrtQ3Row:53}},crt:{"2.2":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:7},companyHeaderRowByKey:{A:63,B:65,C:67,D:69,E:71,F:73,G:75,H:77,I:79},companySpanByKey:{A:1,B:1,C:1,D:1,E:1,F:1,G:1,H:1,I:21},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37},"2.21":{questionHeaderRowByNumber:{1:25,2:31,3:37,4:43,5:49,6:55},questionSpanByNumber:{1:5,2:5,3:5,4:5,5:5,6:7},companyHeaderRowByKey:{A:63,B:65,C:67,D:69,E:71,F:73,G:75,H:77,I:79},companySpanByKey:{A:1,B:1,C:1,D:1,E:1,F:1,G:1,H:1,I:21},amrtQ1Row:25,amrtQ2Row:31,amrtQ3Row:37}},amrt:{"1.1":{questionHeaderRowByNumber:{1:27,2:39},questionSpanByNumber:{1:11,2:29},companyHeaderRowByKey:{},companySpanByKey:{},amrtQ1Row:27,amrtQ2Row:39,amrtQ3Row:null},"1.2":{questionHeaderRowByNumber:{1:27,2:39},questionSpanByNumber:{1:11,2:29},companyHeaderRowByKey:{},companySpanByKey:{},amrtQ1Row:27,amrtQ2Row:39,amrtQ3Row:null},"1.3":{questionHeaderRowByNumber:{1:30,2:42},questionSpanByNumber:{1:11,2:37},companyHeaderRowByKey:{},companySpanByKey:{},amrtQ1Row:30,amrtQ2Row:42,amrtQ3Row:null}}};function $k(e,t){const o=Dk[e]?.[t];if(!o)throw new Error(`Missing Excel anchor mapping for ${e}@${t}. Run pnpm generate:excel-mapping.`);return o}function Ne(e,t){return`${e}${t}`}function Ta(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"")}function Qn(e){const t=e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").trim();return t?t[0].toUpperCase()+t.slice(1):""}function Ok(e,t){const n=e?.trim();return n?t.find(r=>r.trim().startsWith(`${n}.`))??e:""}function ki(e,t,n){const o=[];for(let a=68;a<=90;a+=1){const l=qo(e,Ne("B",a),t);l&&l.trim()&&o.push(l.trim())}const r=new Map,i=o.find(a=>a.toLowerCase().includes("other"));i&&r.set("other",i);const s={aluminum:["Aluminum","Aluminium"],sodaAsh:["Soda Ash"],rareEarthElements:["Rare Earth Elements"]};for(const a of n.mineralScope.minerals){if(a.key==="other")continue;const l=s[a.key]??[Qn(a.key)],c=l.map(Ta),u=o.find(p=>c.includes(Ta(p)));if(u){r.set(a.key,u);continue}r.set(a.key,l[0]??a.key)}return r}function Fk(e,t,n,o){const r=n.data.companyInfo??{},i=t.templateType,s={companyName:"D8",declarationScope:"D9",scopeDescription:"D10"},a=i==="emrt"?16:i==="amrt"?17:12;["companyId","companyAuthId","address","contactName","contactEmail","contactPhone","authorizerName","authorizerTitle","authorizerEmail","authorizerPhone","authorizationDate"].forEach((u,p)=>{s[u]=Ne("D",a+p)});let c=e;for(const u of t.companyInfoFields){const p=u.key,m=s[p];if(!m)continue;const d=r[p]??"";if(d){if(p==="authorizationDate"){c=qe(c,m,hy(d));continue}if(p==="declarationScope"){const h=o(m);c=qe(c,m,Ok(d,h));continue}c=qe(c,m,d)}}return c}function Ti(e,t,n,o,r){let i=e;return n.forEach((s,a)=>{const l=t+a;for(const[c,u]of Object.entries(o)){const p=s[c];if(!p)continue;const m=r?r(c,p):p;i=qe(i,Ne(u,l),m)}}),i}function zk(e,t,n,o){if(t.templateType!=="emrt"||t.mineralScope.mode!=="dynamic-dropdown")return e;const r=["D12","E12","G12","D13","E13","G13"],i=new Set(n.data.selectedMinerals??[]);let s=e;return t.mineralScope.minerals.forEach((a,l)=>{const c=r[l];if(!c)return;const u=qo(e,c,o)??Qn(a.key),p=qo(e,Ne("C",175+l),o)??`(Delete ${u})`;s=qe(s,c,i.has(a.key)?u:p)}),s}function jk(e,t,n,o){if(t.templateType!=="amrt"||t.mineralScope.mode!=="dynamic-dropdown")return e;const r=ki(e,o,t),i=["D12","E12","F12","G12","H12","I12","D13","E13","F13","G13","H13","I13"],s=(n.data.selectedMinerals??[]).filter(Boolean),a=t.mineralScope.maxCount??10,l=s.filter(w=>w!=="other").slice(0,a),c=s.includes("other"),u=(n.data.customMinerals??[]).map(w=>w.trim()),p=i.length,m=Array.from({length:p},()=>""),d=Array.from({length:p},()=>"");let h=0;if(c){for(let w=0;w<p&&h<a;w+=1){const S=u[w]??"";S&&(m[w]="other",d[w]=S,h+=1)}h===0&&a>0&&(m[0]="other",h=1)}for(const w of l){if(h>=a)break;const S=m.findIndex(v=>!v);if(S<0)break;m[S]=w,h+=1}let g=e;return i.forEach((w,S)=>{const v=m[S]??"",C=v?r.get(v)??Qn(v):"";g=qe(g,w,C)}),["D15","E15","F15","G15","H15","I15","D16","E16","F16","G16","H16","I16"].forEach((w,S)=>{const v=m[S]==="other"?d[S]??"":"";g=qe(g,w,v)}),g}function Bk(e,t,n,o){if(t.templateType==="amrt")return e;const r=n.data.questions??{},i=n.data.questionComments??{},s=n.data.companyQuestions??{},a="D",l="G";let c=e;for(let p=1;p<=t.questions.length;p+=1){const m=t.questions[p-1];if(!m)continue;const d=o.questionHeaderRowByNumber[String(p)];if(d)if(m.perMineral){const h=t.mineralScope.minerals,g=o.questionSpanByNumber[String(p)]??0,b=Math.max(0,g);h.slice(0,b).forEach((w,S)=>{const v=d+1+S,C=r[m.key],M=i[m.key],_=C&&typeof C=="object"?C[w.key]??"":"",k=M&&typeof M=="object"?M[w.key]??"":"";_&&(c=qe(c,Ne(a,v),_)),k&&(c=qe(c,Ne(l,v),k))})}else{const h=r[m.key],g=i[m.key],b=typeof h=="string"?h:"",w=typeof g=="string"?g:"";b&&(c=qe(c,Ne(a,d+1),b)),w&&(c=qe(c,Ne(l,d+1),w))}}const u=new Map(t.companyQuestions.map(p=>[p.key,p]));for(const[p,m]of Object.entries(o.companyHeaderRowByKey)){const d=u.get(p);if(!d)continue;if(d.perMineral){const v=t.mineralScope.minerals,C=o.companySpanByKey[p]??0,M=Math.max(0,C),_=`${p}_comment`;v.slice(0,M).forEach((k,A)=>{const z=m+1+A,I=s[p],L=I&&typeof I=="object"?I[k.key]??"":"";if(L&&(c=qe(c,Ne(a,z),L)),!d.hasCommentField)return;const j=s[_],O=j&&typeof j=="object"?j[k.key]??"":"";O&&(c=qe(c,Ne(l,z),O))});continue}const h=s[p],g=typeof h=="string"?h:"";g&&(c=qe(c,Ne(a,m),g));const b=`${p}_comment`,w=s[b],S=typeof w=="string"?w:"";S&&(c=qe(c,Ne(l,m),S))}return c}function Kk(e,t,n,o,r){if(t.templateType!=="amrt")return e;const i=n.data.questions??{},s=n.data.questionComments??{},a=r.amrtQ1Row,l=r.amrtQ2Row;if(!a||!l)return e;const c=ki(e,o,t),u=(n.data.selectedMinerals??[]).filter(Boolean),m=u.includes("other")?(n.data.customMinerals??[]).map(v=>v.trim()).filter(Boolean):[],h=[...u.filter(v=>v!=="other").map(v=>({key:v,label:c.get(v)??Qn(v)??v})),...m.map((v,C)=>({key:`custom-${C}`,label:v}))].filter(v=>v.label.trim()).sort((v,C)=>{const M=v.label.trim(),_=C.label.trim(),k=M.localeCompare(_);return k!==0?k:v.key.localeCompare(C.key)}).slice(0,10),g=(v,C,M,_,k,A)=>{let z=v;const I=Math.min(h.length,Math.max(0,_-M+1));for(let L=0;L<I;L+=1){const j=M+L,O=h[L].key;if(!O.startsWith("custom-")){const R=i[C],x=s[C],N=R&&typeof R=="object"?R[O]??"":"",K=x&&typeof x=="object"?x[O]??"":"";N&&(z=qe(z,Ne(k,j),N)),K&&(z=qe(z,Ne(A,j),K))}}return z};let b=e;b=g(b,"Q1",a+1,l-1,"D","G");const w=r.amrtQ3Row,S=w?w-1:l+10;return b=g(b,"Q2",l+1,S,"D","G"),b}function Cn(e,t,n,o){return n?Nk(e,t)?o?Lk(e,t,n):e:qe(e,t,n):e}function Qk(e,t,n,o){let r=e;return n.forEach((i,s)=>{const a=5+s,l=(i.smelterId??"").trim(),c=!!l,u=!c;t.smelterList.hasIdColumn&&c&&(r=qe(r,Ne("A",a),l));const p=i.metal?.trim();p&&(r=Cn(r,Ne("B",a),o(p),u));const m=i.smelterLookup?.trim();t.smelterList.hasLookup&&m&&(r=Cn(r,Ne("C",a),Ir(m),u));const d=[["smelterName","D"],["smelterCountry","E"],["smelterIdentification","F"],["sourceId","G"],["smelterStreet","H"],["smelterCity","I"],["smelterState","J"],["smelterContactName","K"],["smelterContactEmail","L"],["proposedNextSteps","M"],["mineName","N"],["mineCountry","O"],["recycledScrap","P"],["comments","Q"]];for(const[h,g]of d){const b=i[h]?.trim();b&&(r=Cn(r,Ne(g,a),b,u))}if(t.smelterList.hasCombinedColumn){const h=i.combinedMetal?.trim();h&&(r=Cn(r,Ne("R",a),o(h),u));const g=i.combinedSmelter?.trim();g&&(r=Cn(r,Ne("S",a),g,u))}}),r}function Uk(e,t,n){return Ti(e,5,t,{metal:"A",smelterName:"B",mineName:"C",mineId:"D",mineIdSource:"E",mineCountry:"F",mineStreet:"G",mineCity:"H",mineProvince:"I",mineContactName:"J",mineContactEmail:"K",proposedNextSteps:"L",comments:"M"},(r,i)=>r==="metal"?n(i):i)}function Gk(e,t,n){return Ti(e,6,t,n?{productNumber:"B",productName:"C",requesterNumber:"D",requesterName:"E",comments:"F"}:{productNumber:"B",productName:"C",comments:"D"})}function Yk(e,t,n){const o=i=>{if(i.startsWith("other-")){const s=Number(i.slice(6));return t.data.customMinerals?.[s]?.trim()??""}return n(i)},r=(t.data.mineralsScope??[]).map(i=>({mineral:o(i.mineral),reason:i.reason}));return Ti(e,8,r,{mineral:"B",reason:"C"})}async function xi({templateXlsx:e,snapshot:t}){const n=Bo(t.templateType,t.versionId),o=$k(t.templateType,t.versionId),r=await qk(e),i=m=>qo(Ot(r,"Declaration"),m,r.sharedStrings),s=m=>m==="D9"?[i("P9"),i("Q9"),i("R9")].filter(h=>!!(h&&h.trim())):[];let a=Ot(r,"Declaration");a=zk(a,n,t,r.sharedStrings),a=jk(a,n,t,r.sharedStrings),a=Fk(a,n,t,s),a=Bk(a,n,t,o),a=Kk(a,n,t,r.sharedStrings,o),Sn(r,"Declaration",a);const l=n.templateType==="amrt"?ki(a,r.sharedStrings,n):null,c=m=>l?.get(m)??Qn(m)??m;if(t.data.smelterList?.length){const m=Ot(r,"Smelter List"),d=Qk(m,n,t.data.smelterList,c);Sn(r,"Smelter List",d)}if(t.data.mineList?.length&&r.sheetPathByName.has("Mine List")){const m=Ot(r,"Mine List"),d=Uk(m,t.data.mineList,c);Sn(r,"Mine List",d)}if(t.data.productList?.length){const m=Ot(r,"Product List"),d=Gk(m,t.data.productList,n.productList.hasRequesterColumns);Sn(r,"Product List",d)}if(t.templateType==="amrt"&&t.data.mineralsScope?.length&&r.sheetPathByName.has("Minerals Scope")){const m=Ot(r,"Minerals Scope"),d=Yk(m,t,c);Sn(r,"Minerals Scope",d)}Ak(r.files),Ek(r.files);const u=await Pk(r.files),p=u.buffer.slice(u.byteOffset,u.byteOffset+u.byteLength);return new Blob([p],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})}const Lc=1,Zk=Go(["cmrt","emrt","crt","amrt"]),Hk=Go(["en-US","zh-CN"]),Vk=_t(T(),nt([T(),gt()])).superRefine((e,t)=>{for(const[n,o]of Object.entries(e))n!=="authorizationDate"&&typeof o!="string"&&t.addIssue({code:Ue.custom,path:[n],message:"公司信息字段必须为字符串"})}),Wk=we({id:T(),mineral:T(),reason:T()}),Jk=we({id:T(),metal:T(),smelterLookup:T(),smelterName:T(),smelterCountry:T(),combinedMetal:T().optional(),combinedSmelter:T().optional(),smelterId:T().optional(),smelterIdentification:T().optional(),sourceId:T().optional(),smelterStreet:T().optional(),smelterCity:T().optional(),smelterState:T().optional(),smelterContactName:T().optional(),smelterContactEmail:T().optional(),proposedNextSteps:T().optional(),mineName:T().optional(),mineCountry:T().optional(),recycledScrap:T().optional(),comments:T().optional()}).catchall(T().optional()),Xk=we({id:T(),metal:T(),smelterName:T(),mineName:T(),mineCountry:T(),mineId:T().optional(),mineIdSource:T().optional(),mineStreet:T().optional(),mineCity:T().optional(),mineProvince:T(),mineDistrict:T(),mineContactName:T().optional(),mineContactEmail:T().optional(),proposedNextSteps:T().optional(),comments:T()}).catchall(T().optional()),eT=we({id:T(),productNumber:T(),productName:T(),requesterNumber:T().optional(),requesterName:T().optional(),comments:T()}).catchall(T().optional()),tT=we({schemaVersion:Rh(Lc),templateType:Zk,versionId:T().min(1),locale:Hk.optional(),data:we({companyInfo:Vk,selectedMinerals:Ae(T()),customMinerals:Ae(T()),questions:_t(T(),nt([T(),_t(T(),T())])),questionComments:_t(T(),nt([T(),_t(T(),T())])),companyQuestions:_t(T(),nt([T(),_t(T(),T())])),mineralsScope:Ae(Wk),smelterList:Ae(Jk),mineList:Ae(Xk),productList:Ae(eT)})});function nT(e){const t=tT.parse(e),n={};for(const[o,r]of Object.entries(t.data.companyInfo)){if(o==="authorizationDate"){n[o]=Sl(r);continue}n[o]=typeof r=="string"?r:String(r)}return{...t,data:{...t.data,companyInfo:n}}}function _i(e){return JSON.stringify(e)}async function qc({templateType:e,versionId:t,validate:n,getSnapshot:o,navigation:r}){return await n()?o():(r&&r.actions.navigate(ho({template:e,version:t,page:"checker"})),null)}function oT({templateType:e,versionId:t,locale:n,initialSnapshot:o,onSnapshotChange:r,controllerRef:i}){const{meta:s,form:a,lists:l}=ze(),{setFormData:c,validateForm:u}=Et(),p=Eo(),m=ie.useRef(null),d=ie.useRef(!o),h=ie.useMemo(()=>({schemaVersion:1,templateType:s.templateType,versionId:s.versionId,locale:n,data:{...a,...l}}),[s.templateType,s.versionId,a,l,n]);return ie.useLayoutEffect(()=>{if(!o){d.current=!0;return}m.current!==o&&(d.current=!1,c(o.data),m.current=o,d.current=!0)},[o,c]),ie.useEffect(()=>{d.current&&r?.(h)},[h,r]),ie.useImperativeHandle(i,()=>({getSnapshot:()=>h,setSnapshot:g=>{if(g.templateType!==e||g.versionId!==t)throw new Error("snapshot does not match templateType/versionId");c(g.data)},saveDraft:()=>h,submit:()=>qc({templateType:e,versionId:t,validate:u,getSnapshot:()=>h,navigation:p}),exportJson:()=>_i(h),exportExcel:async g=>xi({...g,snapshot:h}),validate:()=>u()}),[p,c,h,e,u,t]),null}const rT=ie.forwardRef(function({templateType:t,versionId:n,locale:o="en-US",onLocaleChange:r,theme:i,cssVariables:s,readOnly:a=!1,showPageActions:l=!0,maxContentWidth:c,integrations:u,initialSnapshot:p,onSnapshotChange:m,fallback:d},h){if(p&&(p.templateType!==t||p.versionId!==n))throw new Error("initialSnapshot does not match templateType/versionId");return f.jsx(Tk,{locale:o,onLocaleChange:r,theme:i,cssVariables:s,fallback:d,children:f.jsx(JC,{templateType:t,versionId:n,readOnly:a,showPageActions:l,maxContentWidth:c,integrations:u,children:f.jsx(oT,{controllerRef:h,templateType:t,versionId:n,locale:o,initialSnapshot:p,onSnapshotChange:m})})})});function iT(){const{meta:e,form:t,lists:n}=ze(),{setFormData:o,validateForm:r}=Et(),{locale:i}=Ce(),s=Eo(),a=ie.useMemo(()=>({schemaVersion:1,templateType:e.templateType,versionId:e.versionId,locale:i,data:{...t,...n}}),[e.templateType,e.versionId,t,n,i]);return ie.useMemo(()=>({snapshot:a,getSnapshot:()=>a,setSnapshot:l=>{if(l.templateType!==e.templateType||l.versionId!==e.versionId)throw new Error("snapshot does not match templateType/versionId");o(l.data)},saveDraft:()=>a,submit:()=>qc({templateType:e.templateType,versionId:e.versionId,validate:r,getSnapshot:()=>a,navigation:s}),exportJson:()=>_i(a),exportExcel:l=>xi({...l,snapshot:a}),validate:()=>r()}),[e.templateType,e.versionId,s,o,a,r])}const sT=Go(["cmrt","emrt","crt","amrt"]),H=T().nullable(),aT=we({companyName:H.optional(),species:H.optional(),rangeDescription:H.optional(),identify:H.optional(),authorization:H.optional(),address:H.optional(),contactName:H.optional(),contactEmail:H.optional(),contactPhone:H.optional(),authorizerName:H.optional(),authorizerJobTitle:H.optional(),authorizerEmail:H.optional(),authorizerPhone:H.optional(),effectiveDate:nt([T(),gt()]).nullable().optional()}).passthrough(),lT=we({type:gt(),question:T(),answer:H.optional(),remark:H.optional()}).passthrough(),cT=we({question:T(),answer:H.optional(),remark:H.optional(),type:H.optional()}).passthrough(),uT=we({id:nt([T(),gt()]).optional(),metal:H.optional(),smelterLookUp:H.optional(),standardSmelterName:H.optional(),smelterNumber:H.optional(),smelterName:H.optional(),smelterCountry:H.optional(),smelterProvince:H.optional(),smelterCity:H.optional(),smelterStreet:H.optional(),smelterIdentification:H.optional(),smelterContact:H.optional(),smelterEmail:H.optional(),suggest:H.optional(),mineName:H.optional(),mineCountry:H.optional(),isRecycle:H.optional(),remark:H.optional(),smelterId:H.optional(),sourceId:H.optional()}).passthrough(),mT=we({smelterId:H.optional(),metal:H.optional(),smelterName:H.optional(),mineFacilityName:H.optional(),mineIdentification:H.optional(),mineIdentificationNumber:H.optional(),mineFacilityCountry:H.optional(),mineFacilityStreet:H.optional(),mineFacilityCity:H.optional(),mineFacilityProvince:H.optional(),mineFacilityContact:H.optional(),mineFacilityEmail:H.optional(),proposedNextSteps:H.optional(),comments:H.optional()}).passthrough(),dT=we({id:nt([T(),gt()]).optional(),partId:nt([T(),gt()]).nullable().optional(),productNumber:H.optional(),partNumber:H.optional(),productName:H.optional(),partName:H.optional(),requesterNumber:H.optional(),requestPartNumber:H.optional(),requesterName:H.optional(),requestPartName:H.optional(),comments:H.optional(),remark:H.optional()}).passthrough(),pT=we({id:nt([T(),gt()]).optional(),metal:H.optional(),reason:H.optional()}).passthrough(),fT=we({name:T().optional(),questionnaireType:gt().optional(),type:T().optional(),version:T().optional(),cmtCompany:aT.optional(),cmtRangeQuestions:Ae(lT).optional(),cmtCompanyQuestions:Ae(cT).optional(),cmtSmelters:Ae(uT).optional(),minList:Ae(mT).optional(),cmtParts:Ae(dT).optional(),amrtReasonList:Ae(pT).optional()}).passthrough(),hT=/RMI_(CMRT|EMRT|CRT|AMRT)_([0-9.]+)/i;function Ac(e){const t=e.toLowerCase(),n=sT.safeParse(t);return n.success?n.data:null}function xa(e){const t=e.match(hT);if(!t)return null;const n=Ac(t[1]);return n?{templateType:n,versionId:t[2]}:null}function Ec(e){const t=fT.parse(e),n=t.type?Ac(t.type):null,o=t.name?xa(t.name):null,r=t.version?xa(t.version):null,i=o??r,s=n??i?.templateType,a=i?.versionId;if(!s||!a)throw new Error("cannot infer templateType/versionId from legacy report");if(n&&i&&n!==i.templateType)throw new Error("legacy report templateType mismatch between type and name/version");try{Bo(s,a)}catch(l){const c=l instanceof Error?l.message:String(l);throw new Error(`unsupported template/version: ${s}@${a} (${c})`)}return{legacy:t,templateType:s,versionId:a}}function Pc(e){if(e==null)return"";const t=String(e).trim();if(!t)return"";const n=t.toLowerCase();return n==="1"||n==="yes"||n==="y"||n==="true"?"Yes":n==="0"||n==="no"||n==="n"||n==="false"?"No":n==="unknown"||n==="unk"?"Unknown":t}function tt(e,t){const n=t??"";return n||(e.exists?e.wasNull?null:"":void 0)}function sr(e,t,n,o){const r=t.get(n)??{exists:n in e,wasNull:e[n]===null,wasString:typeof e[n]=="string",wasNumber:typeof e[n]=="number"},i=tt(r,o);if(i===void 0){r.exists&&delete e[n];return}e[n]=i}const _a=new Map;function yT(e,t){return`${e}@${t}`}function Qr(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"")}function Dc(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").trim()}function $c(e){return e.split(/\s+/).filter(Boolean).map(t=>t[0].toUpperCase()+t.slice(1)).join(" ")}function gT(e){const t=Dc(e);return[e,t,$c(t)]}const bT={rareEarthElements:"Rare Earth Elements",sodaAsh:"Soda Ash"};function wT(e){const t=new Map,n=new Map;for(const o of e.mineralScope.minerals){const r=o.key,i=bT[r]??$c(Dc(r));n.set(r,i);for(const s of gT(r))t.set(Qr(s),r);t.set(Qr(i),r)}return{mineralKeyByLabel:t,preferredMineralLabelByKey:n}}function vT(e){const t=new Map;for(const n of e.questions){const o=/^Q(\d+)$/.exec(n.key);if(!o)continue;const r=Number(o[1]);Number.isFinite(r)&&t.set(r,n.key)}return t}function ST(){return new Map([["companyName","companyName"],["declarationScope","species"],["scopeDescription","rangeDescription"],["companyId","identify"],["companyAuthId","authorization"],["address","address"],["contactName","contactName"],["contactEmail","contactEmail"],["contactPhone","contactPhone"],["authorizerName","authorizerName"],["authorizerTitle","authorizerJobTitle"],["authorizerEmail","authorizerEmail"],["authorizerPhone","authorizerPhone"],["authorizationDate","effectiveDate"]])}function Un(e,t){const n=yT(e,t),o=_a.get(n);if(o)return o;const r=Bo(e,t),i=vT(r),{mineralKeyByLabel:s,preferredMineralLabelByKey:a}=wT(r),l=ST(),c={templateType:e,versionId:t,versionDef:r,questionKeyByType:i,mineralKeyByLabel:s,preferredMineralLabelByKey:a,legacyCompanyKeyByInternalKey:l};return _a.set(n,c),c}function He(e){return Qr(e)}function ge(e){return e===""||e===null||e===void 0}function CT(e){const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;const n=Number(t[1]),o=Number(t[2]),r=Number(t[3]);return!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(r)?null:Date.UTC(n,o-1,r,0,0,0,0)}function Vt(e){return typeof e=="string"?e:""}function Ft(e){return e==null?"":(typeof e=="string"?e:String(e)).trim()}function Ia(e){const t=Vt(e).trim();if(!t)return"";const n=t.toLowerCase();return n==="yes"||n==="y"||n==="true"?"1":n==="no"||n==="n"||n==="false"?"0":n==="unknown"?"Unknown":t}function Wt(e,t,n,o){const r=Vt(n);if(!r)return"";const i=gi(r);if(i!==null){const l=o[i]?.trim();if(l)return l}const s=t.mineralLabelByKey.get(r);if(s)return s;const a=e.mineralKeyByLabel.get(He(r));return a?t.mineralLabelByKey.get(a)??e.preferredMineralLabelByKey.get(a)??r:r}function Ao(e,t,n){const o=e[t];return n?typeof o=="object"&&o&&typeof o[n]=="string"?o[n]:"":typeof o=="string"?o:""}function kT(e,t){const n=e.effectiveDate.originalValue,o=e.effectiveDate.originalType;if(t===e.effectiveDate.derivedAuthorizationDate)return n;if(!t)return o==="missing"?void 0:o==="null"?null:o==="number"?0:"";const r=CT(t);return r===null?n:o==="number"?r:String(r)}function TT(e,t,n,o){const r=t.companyInfo??{},i=e.cmtCompany??{},s=Un(n.templateType,n.versionId);for(const c of o.companyInfoFields){const u=s.legacyCompanyKeyByInternalKey.get(c.key)??c.key;if(u==="effectiveDate")continue;const p=r[c.key]??"",m=n.companyFieldStates.get(u)??{exists:!1,wasNull:!1},d=tt(m,p);if(d===void 0){m.exists&&delete i[u];continue}i[u]=d}const a=r.authorizationDate??"",l=kT(n,a);l===void 0?n.effectiveDate.originalType!=="missing"&&delete i.effectiveDate:i.effectiveDate=l,(!e.cmtCompany&&(Object.keys(i).length>0||n.companyFieldStates.size>0||n.effectiveDate.originalType!=="missing")||e.cmtCompany)&&(e.cmtCompany=i)}function xT(e,t,n,o){const r=Un(n.templateType,n.versionId),i=e.cmtRangeQuestions??[],s=e.cmtRangeQuestions?i:null,a=new Map(o.questions.map(d=>[d.key,d])),l=Bn(o,t.selectedMinerals??[],t.customMinerals??[]),c=new Set(l),u=new Map;for(const[d,h]of n.mineralLabelByKey.entries()){const g=He(h);!g||u.has(g)||u.set(g,d)}const p=d=>{const h=gi(d);if(h!==null){const w=t.customMinerals?.[h]?.trim();if(w)return w}const g=n.mineralLabelByKey.get(d);if(g)return g;const b=r.preferredMineralLabelByKey.get(d);return b||d},m=()=>(e.cmtRangeQuestions||(e.cmtRangeQuestions=[]),e.cmtRangeQuestions);for(const[d,h]of r.questionKeyByType.entries()){const g=a.get(h);if(!g)continue;if(g.perMineral){for(const I of l){const L=p(I),j=n.mineralLabelByKey.get(I)??L,O=`${d}|${j}`,R=n.rangeQuestionIndexByKey.get(O),x=Ao(t.questions,h,I),N=Ao(t.questionComments,h,I);if(R===void 0){if(ge(x)&&ge(N))continue;m().push({type:d,question:L,answer:x??"",remark:N??""});continue}const K=i[R],$=n.rangeQuestionFieldStatesByIndex.get(R),Y=$?.answer??{exists:!0,wasNull:!1},Z=$?.remark??{exists:!0,wasNull:!1},X=tt(Y,x),E=tt(Z,N);X!==void 0&&(K.answer=X),E!==void 0&&(K.remark=E),K.type=d,K.question=L}continue}const b=Array.from(n.rangeQuestionIndexByKey.entries()).find(([I])=>I.startsWith(`${d}|`)),w=b?b[1]:void 0,S=Vt(t.questions[h]),v=Vt(t.questionComments[h]);if(w===void 0){if(ge(S)&&ge(v))continue;const I=m(),L=o.mineralScope.minerals[0]?.key??"",j=L?n.mineralLabelByKey.get(L)??r.preferredMineralLabelByKey.get(L)??L:"";I.push({type:d,question:j,answer:S,remark:v});continue}const C=i[w],M=n.rangeQuestionFieldStatesByIndex.get(w),_=M?.answer??{exists:!0,wasNull:!1},k=M?.remark??{exists:!0,wasNull:!1},A=tt(_,S),z=tt(k,v);A!==void 0&&(C.answer=A),z!==void 0&&(C.remark=z),C.type=d}if(!s&&e.cmtRangeQuestions&&e.cmtRangeQuestions.length===0&&delete e.cmtRangeQuestions,e.cmtRangeQuestions){const d=e.cmtRangeQuestions.filter(h=>{const g=typeof h.type=="number"?h.type:Number(h.type),b=Number.isFinite(g)?r.questionKeyByType.get(g):void 0;if(!b||!a.get(b)?.perMineral)return!0;const S=typeof h.question=="string"?h.question:String(h.question??""),v=He(S),C=r.mineralKeyByLabel.get(v)??u.get(v);return C?c.has(C):!0});e.cmtRangeQuestions=d,!s&&d.length===0&&delete e.cmtRangeQuestions}}function _T(e,t,n,o){const r=Un(n.templateType,n.versionId),i=e.cmtCompanyQuestions??[],s=e.cmtCompanyQuestions?i:null,a=Bn(o,t.selectedMinerals??[],t.customMinerals??[]),l=new Set(a),c=new Map;for(const[m,d]of n.mineralLabelByKey.entries()){const h=He(d);!h||c.has(h)||c.set(h,m)}const u=m=>{const d=gi(m);if(d!==null){const b=t.customMinerals?.[d]?.trim();if(b)return b}const h=n.mineralLabelByKey.get(m);if(h)return h;const g=r.preferredMineralLabelByKey.get(m);return g||m},p=()=>(e.cmtCompanyQuestions||(e.cmtCompanyQuestions=[]),e.cmtCompanyQuestions);for(const m of o.companyQuestions){if(m.perMineral){for(const k of a){const A=u(k),z=n.mineralLabelByKey.get(k)??A,I=`${m.key}|${z}`,L=n.companyQuestionIndexByKey.get(I),j=Ao(t.companyQuestions,m.key,k),O=Ao(t.companyQuestions,`${m.key}_comment`,k);if(L===void 0){if(ge(j)&&ge(O))continue;p().push({question:m.key,type:A,answer:j??"",remark:O??""});continue}const R=i[L],x=n.companyQuestionFieldStatesByIndex.get(L),N=x?.answer??{exists:!0,wasNull:!1},K=x?.remark??{exists:!0,wasNull:!1},$=tt(N,j),Y=tt(K,O);$!==void 0&&(R.answer=$),Y!==void 0&&(R.remark=Y),R.question=m.key,R.type=A}continue}const d=`${m.key}|`,h=n.companyQuestionIndexByKey.get(d),g=Vt(t.companyQuestions[m.key]),b=Vt(t.companyQuestions[`${m.key}_comment`]);if(h===void 0){if(ge(g)&&ge(b))continue;p().push({question:m.key,type:null,answer:g,remark:b});continue}const w=i[h],S=n.companyQuestionFieldStatesByIndex.get(h),v=S?.answer??{exists:!0,wasNull:!1},C=S?.remark??{exists:!0,wasNull:!1},M=tt(v,g),_=tt(C,b);M!==void 0&&(w.answer=M),_!==void 0&&(w.remark=_),w.question=m.key,"type"in w&&(w.type=null)}if(!s&&e.cmtCompanyQuestions&&e.cmtCompanyQuestions.length===0&&delete e.cmtCompanyQuestions,e.cmtCompanyQuestions){const m=e.cmtCompanyQuestions.filter(d=>{const h=typeof d.question=="string"?d.question:String(d.question??"");if(!o.companyQuestions.find(v=>v.key===h)?.perMineral)return!0;const b=typeof d.type=="string"?d.type:d.type==null?"":String(d.type),w=He(b),S=r.mineralKeyByLabel.get(w)??c.get(w);return S?l.has(S):!0});e.cmtCompanyQuestions=m,!s&&m.length===0&&delete e.cmtCompanyQuestions}}function IT(e,t,n,o){const r=e.cmtSmelters??[],i=[];for(const s of t.smelterList??[]){const a=n.smelterLegacyIndexByInternalId.get(s.id);if(a!==void 0){const m=tn(r[a]??{}),d=n.smelterFieldStatesByIndex.get(a)??new Map,h=(N,K)=>sr(m,d,N,K),g=r[a]??{},b=Ft(g.smelterLookUp),w=Ft(g.smelterName),S=Ft(g.standardSmelterName),v=b||w||S,C=S||w,M=Ft(g.smelterNumber),_=Ft(g.smelterId),k=Ft(g.smelterIdentification),A=M||_,z=M||_,I=k,L=Pc(g.isRecycle);if(h("metal",Wt(o,n,s.metal,t.customMinerals??[])),(s.smelterLookup??"")!==v&&h("smelterLookUp",s.smelterLookup),(s.smelterName??"")!==C)if(S)h("standardSmelterName",s.smelterName);else{const N=d.get("smelterName"),K=n.smelterNameFallbackByIndex.get(a)??null;N?.wasNull&&K&&s.smelterName===K?m.smelterName=null:h("smelterName",s.smelterName)}h("smelterCountry",s.smelterCountry);const j=s.smelterId??"",O=s.smelterIdentification??"",R=j!==A;(R||O!==z)&&h(M?"smelterNumber":_?"smelterId":"smelterNumber",R?j:O),(s.sourceId??"")!==I&&h("smelterIdentification",s.sourceId??""),h("smelterStreet",s.smelterStreet??""),h("smelterCity",s.smelterCity??""),h("smelterProvince",s.smelterState??""),h("smelterContact",s.smelterContactName??""),h("smelterEmail",s.smelterContactEmail??""),h("suggest",s.proposedNextSteps??""),h("mineName",s.mineName??""),h("mineCountry",s.mineCountry??""),(s.recycledScrap??"")!==L&&h("isRecycle",Ia(s.recycledScrap??"")),h("remark",s.comments??""),m.id=m.id??s.id,i.push(m);continue}const l={id:s.id},c=Wt(o,n,s.metal,t.customMinerals??[]);ge(c)||(l.metal=c),ge(s.smelterLookup)||(l.smelterLookUp=s.smelterLookup),ge(s.smelterName)||(l.smelterName=s.smelterName,ge(s.smelterLookup)||(l.standardSmelterName=s.smelterName)),ge(s.smelterCountry)||(l.smelterCountry=s.smelterCountry);const u=s.smelterIdentification||s.smelterId;ge(u)||(l.smelterNumber=u),ge(s.sourceId)||(l.smelterIdentification=s.sourceId);const p=Ia(s.recycledScrap??"");ge(p)||(l.isRecycle=p),ge(s.comments)||(l.remark=s.comments),i.push(l)}(e.cmtSmelters||i.length>0)&&(e.cmtSmelters=i)}function RT(e,t,n,o){const r=e.minList??[],i=[];for(const s of t.mineList??[]){const a=n.mineLegacyIndexByInternalId.get(s.id);if(a!==void 0){const u=tn(r[a]??{}),p=n.mineFieldStatesByIndex.get(a)??new Map,m=(d,h)=>sr(u,p,d,h);m("metal",Wt(o,n,s.metal,t.customMinerals??[])),m("smelterName",s.smelterName),m("mineFacilityName",s.mineName),m("mineFacilityCountry",s.mineCountry),m("mineFacilityStreet",s.mineStreet??""),m("mineFacilityCity",s.mineCity??""),m("mineFacilityProvince",s.mineProvince??""),m("mineIdentificationNumber",s.mineId??""),m("mineIdentification",s.mineIdSource??""),m("mineFacilityContact",s.mineContactName??""),m("mineFacilityEmail",s.mineContactEmail??""),m("proposedNextSteps",s.proposedNextSteps??""),m("comments",s.comments??""),i.push(u);continue}const l={},c=Wt(o,n,s.metal,t.customMinerals??[]);ge(c)||(l.metal=c),ge(s.smelterName)||(l.smelterName=s.smelterName),ge(s.mineName)||(l.mineFacilityName=s.mineName),ge(s.mineCountry)||(l.mineFacilityCountry=s.mineCountry),ge(s.comments)||(l.comments=s.comments),i.push(l)}(e.minList||i.length>0)&&(e.minList=i)}function MT(e,t,n){const o=e.cmtParts??[],r=[],i=(()=>{for(const a of n.productLegacyKeyByInternalKeyByIndex.values())return a;return null})(),s=(a,l,c)=>a?.get(l)??c;for(const a of t.productList??[]){const l=n.productLegacyIndexByInternalId.get(a.id);if(l!==void 0){const b=tn(o[l]??{}),w=n.productFieldStatesByIndex.get(l)??new Map,S=n.productLegacyKeyByInternalKeyByIndex.get(l)??null,v=(C,M)=>sr(b,w,C,M);v(s(S,"productNumber","productNumber"),a.productNumber),v(s(S,"productName","productName"),a.productName),v(s(S,"requesterNumber","requesterNumber"),a.requesterNumber??""),v(s(S,"requesterName","requesterName"),a.requesterName??""),v(s(S,"comments","comments"),a.comments??""),r.push(b);continue}const c={id:a.id},u=i,p=s(u,"productNumber","productNumber"),m=s(u,"productName","productName"),d=s(u,"requesterNumber","requesterNumber"),h=s(u,"requesterName","requesterName"),g=s(u,"comments","comments");ge(a.productNumber)||(c[p]=a.productNumber),ge(a.productName)||(c[m]=a.productName),ge(a.requesterNumber)||(c[d]=a.requesterNumber),ge(a.requesterName)||(c[h]=a.requesterName),ge(a.comments)||(c[g]=a.comments),r.push(c)}(e.cmtParts||r.length>0)&&(e.cmtParts=r)}function NT(e,t,n,o){const r=e.amrtReasonList??[],i=[];for(const s of t.mineralsScope??[]){const a=n.amrtReasonIndexByInternalId.get(s.id);if(a!==void 0){const u=tn(r[a]??{}),p=n.amrtReasonFieldStatesByIndex.get(a)??new Map,m=(d,h)=>sr(u,p,d,h);m("metal",Wt(o,n,s.mineral,t.customMinerals??[])),m("reason",s.reason),u.id=u.id??s.id,i.push(u);continue}const l={id:s.id},c=Wt(o,n,s.mineral,t.customMinerals??[]);ge(c)||(l.metal=c),ge(s.reason)||(l.reason=s.reason),i.push(l)}(e.amrtReasonList||i.length>0)&&(e.amrtReasonList=i)}function Ra(e,t){if(e.templateType!==t.templateType||e.versionId!==t.versionId)throw new Error("snapshot does not match ctx templateType/versionId");const n=tn(t.original),o=Un(t.templateType,t.versionId),r=o.versionDef,i=e.data;return TT(n,i,t,r),xT(n,i,t,r),_T(n,i,t,r),IT(n,i,t,o),RT(n,i,t,o),MT(n,i,t),NT(n,i,t,o),n}function et(e,t){if(!e)return{exists:!1,wasNull:!1,wasString:!1,wasNumber:!1};if(!Object.prototype.hasOwnProperty.call(e,t))return{exists:!1,wasNull:!1,wasString:!1,wasNumber:!1};const o=e[t];return{exists:!0,wasNull:o===null,wasString:typeof o=="string",wasNumber:typeof o=="number"}}function LT(e){return typeof e=="string"?e:""}function kn(e){return typeof e=="string"?e:typeof e=="number"&&Number.isFinite(e)?String(e):""}function Tn(e,t){for(const n of t)if(Object.prototype.hasOwnProperty.call(e,n))return n;return t[0]??""}function Ma(e,t,n){if(typeof n!="string")return"";const o=n.trim();return o?e==="crt"&&t==="Q4"&&/^100\s*%$/.test(o)?"1":o:""}function qT(e){if(e==null)return"";const t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t))return"";const n=new Date(t),o=n.getUTCFullYear(),r=String(n.getUTCMonth()+1).padStart(2,"0"),i=String(n.getUTCDate()).padStart(2,"0");return`${o}-${r}-${i}`}function Sr(e,t){return typeof e=="string"&&e.trim()?e:typeof e=="number"&&Number.isFinite(e)?String(e):t}function no(e,t){const n=e[t];if(typeof n=="object"&&n!==null)return n;const o={};return e[t]=o,o}function Oc(e){const t=Ec(e),n=Un(t.templateType,t.versionId),o=n.versionDef,r=t.legacy,i=tn(r),s=new Map,a=r.cmtCompany??void 0;for(const[,D]of n.legacyCompanyKeyByInternalKey.entries())D!=="effectiveDate"&&s.set(D,et(a,D));const l=et(a,"effectiveDate"),c=a?a.effectiveDate:void 0,u=l.exists?c===null?"null":c===void 0?"undefined":typeof c=="string"?"string":typeof c=="number"?"number":"other":"missing",p=qT(c),m=vl(o);for(const D of o.companyInfoFields){const P=n.legacyCompanyKeyByInternalKey.get(D.key)??D.key;if(P==="effectiveDate"){m.companyInfo[D.key]=p;continue}const G=a?a[P]:void 0;m.companyInfo[D.key]=LT(G)}const d=new Map,h=new Map,g=D=>{const P=typeof D=="string"?D:D==null?"":String(D);if(!P)return"";const G=He(P),W=n.mineralKeyByLabel.get(G)??h.get(G);return W&&!d.has(W)&&d.set(W,P),W??P},b=r.cmtRangeQuestions??[];if(o.mineralScope.mode!=="fixed"){const D=o.mineralScope.mode,P=[];for(const W of b){if(!W||W.type!==1)continue;const re=typeof W.question=="string"?W.question.trim():"";re&&P.push(re)}const G=o.mineralScope.minerals.some(W=>W.key==="other");if(D==="dynamic-dropdown"){const W=new Set,re=[],te=o.mineralScope.otherSlotCount??0;for(const ce of P){const ye=He(ce),fe=n.mineralKeyByLabel.get(ye);if(fe){W.add(fe),d.set(fe,ce),h.set(ye,fe);continue}G&&te>0&&re.length<te&&re.push(ce)}re.length>0&&G&&te>0&&(W.add("other"),m.customMinerals=re,re.forEach((ce,ye)=>{const fe=`other-${ye}`,je=He(ce);h.set(je,fe),d.set(fe,ce)})),(W.size>0||m.customMinerals.length>0)&&(m.selectedMinerals=Array.from(W))}else if(D==="free-text"&&P.length>0){const W=o.mineralScope.maxCount??P.length,re=P.slice(0,W);m.customMinerals=re;const te=o.mineralScope.minerals;for(let ce=0;ce<re.length&&ce<te.length;ce++){const ye=te[ce]?.key,fe=re[ce];!ye||!fe||(d.set(ye,fe),h.set(He(fe),ye))}}}const w=new Map,S=new Map,v=new Map(o.questions.map(D=>[D.key,D]));for(let D=0;D<b.length;D++){const P=b[D],G=n.questionKeyByType.get(P.type);if(!G)continue;const W=v.get(G);if(!W)continue;const re=`${P.type}|${P.question}`;if(w.set(re,D),S.set(D,{answer:et(P,"answer"),remark:et(P,"remark")}),W.perMineral){const te=He(P.question),ce=n.mineralKeyByLabel.get(te)??h.get(te);if(!ce)continue;d.has(ce)||d.set(ce,P.question);const ye=no(m.questions,G);ye[ce]=Ma(t.templateType,G,P.answer);const fe=no(m.questionComments,G);fe[ce]=P.remark??"";continue}m.questions[G]=Ma(t.templateType,G,P.answer),m.questionComments[G]=P.remark??""}const C=new Map,M=new Map,_=r.cmtCompanyQuestions??[],k=new Map(o.companyQuestions.map(D=>[D.key,D]));for(let D=0;D<_.length;D++){const P=_[D],G=P.question,W=k.get(G),re=P.type??"",te=`${G}|${re}`;if(C.set(te,D),M.set(D,{answer:et(P,"answer"),remark:et(P,"remark")}),!W)continue;if(W.perMineral){const ye=He(String(P.type??"")),fe=n.mineralKeyByLabel.get(ye)??h.get(ye);if(!fe)continue;d.set(fe,String(P.type??""));const je=no(m.companyQuestions,G);je[fe]=P.answer??"";const Qe=`${G}_comment`,Te=no(m.companyQuestions,Qe);Te[fe]=P.remark??"";continue}m.companyQuestions[G]=P.answer??"";const ce=`${G}_comment`;ce in m.companyQuestions&&(m.companyQuestions[ce]=P.remark??"")}const A=new Map,z=new Map,I=new Map,L=r.cmtSmelters??[],j=[];for(let D=0;D<L.length;D++){const P=L[D],G=Sr(P.id,`smelter-${D}`);A.set(G,D);const W=new Map;for(const rn of["smelterName","smelterLookUp","smelterCountry","smelterId","remark","isRecycle","mineName","mineCountry","suggest"])W.set(rn,et(P,rn));z.set(D,W);const re=g(P.metal),te=P.smelterLookUp??"",ce=P.smelterName??"",ye=P.standardSmelterName??"",fe=te||ce||ye,je=ye||ce;P.smelterName===null&&I.set(D,ye);const Qe=P.smelterCountry??"",Te=P.smelterNumber??"",ot=P.smelterId??"",kt=P.smelterIdentification??"";j.push({id:G,metal:re,smelterLookup:fe,smelterName:je,smelterCountry:Qe,smelterId:Te||ot||void 0,smelterIdentification:Te||ot||void 0,sourceId:kt||void 0,smelterStreet:P.smelterStreet??void 0,smelterCity:P.smelterCity??void 0,smelterState:P.smelterProvince??void 0,smelterContactName:P.smelterContact??void 0,smelterContactEmail:P.smelterEmail??void 0,proposedNextSteps:P.suggest??void 0,mineName:P.mineName??void 0,mineCountry:P.mineCountry??void 0,recycledScrap:Pc(P.isRecycle)||void 0,comments:P.remark??void 0})}m.smelterList=j;const O=new Map,R=new Map,x=r.minList??[],N=[];for(let D=0;D<x.length;D++){const P=x[D],G=`mine-${D}`;O.set(G,D);const W=new Map;for(const re of["mineFacilityName","mineFacilityCountry","mineFacilityProvince","comments"])W.set(re,et(P,re));R.set(D,W),N.push({id:G,metal:g(P.metal),smelterName:P.smelterName??"",mineName:P.mineFacilityName??"",mineCountry:P.mineFacilityCountry??"",mineId:P.mineIdentificationNumber??void 0,mineIdSource:P.mineIdentification??void 0,mineStreet:P.mineFacilityStreet??void 0,mineCity:P.mineFacilityCity??void 0,mineProvince:P.mineFacilityProvince??"",mineDistrict:"",mineContactName:P.mineFacilityContact??void 0,mineContactEmail:P.mineFacilityEmail??void 0,proposedNextSteps:P.proposedNextSteps??void 0,comments:P.comments??""})}m.mineList=N;const K=new Map,$=new Map,Y=new Map,Z=r.cmtParts??[],X=[];for(let D=0;D<Z.length;D++){const P=Z[D],G=P,W=Sr(G.id??G.partId,`product-${D}`);K.set(W,D);const re=new Map;for(const kt of["productNumber","partNumber","productName","partName","requesterNumber","requestPartNumber","requesterName","requestPartName","comments","remark"])re.set(kt,et(P,kt));$.set(D,re);const te=new Map;te.set("productNumber",Tn(G,["productNumber","partNumber"])),te.set("productName",Tn(G,["productName","partName"])),te.set("requesterNumber",Tn(G,["requesterNumber","requestPartNumber"])),te.set("requesterName",Tn(G,["requesterName","requestPartName"])),te.set("comments",Tn(G,["comments","remark"])),Y.set(D,te);const ce=kn(G[te.get("productNumber")]),ye=kn(G[te.get("productName")]),fe=te.get("requesterNumber"),je=te.get("requesterName"),Qe=kn(G[fe]),Te=kn(G[je]),ot=kn(G[te.get("comments")]);X.push({id:W,productNumber:ce,productName:ye,requesterNumber:Qe||void 0,requesterName:Te||void 0,comments:ot})}m.productList=X;const E=new Map,oe=new Map,le=r.amrtReasonList??[],Q=[];for(let D=0;D<le.length;D++){const P=le[D],G=Sr(P.id,`minerals-scope-${D}`);E.set(G,D);const W=new Map;for(const re of["metal","reason"])W.set(re,et(P,re));oe.set(D,W),Q.push({id:G,mineral:g(P.metal),reason:P.reason??""})}m.mineralsScope=Q;const ae={schemaVersion:1,templateType:t.templateType,versionId:t.versionId,data:m},se={templateType:t.templateType,versionId:t.versionId,original:i,companyFieldStates:s,effectiveDate:{exists:l.exists,originalValue:c,originalType:u,derivedAuthorizationDate:p},rangeQuestionIndexByKey:w,rangeQuestionFieldStatesByIndex:S,companyQuestionIndexByKey:C,companyQuestionFieldStatesByIndex:M,mineralLabelByKey:d,smelterLegacyIndexByInternalId:A,smelterFieldStatesByIndex:z,smelterNameFallbackByIndex:I,mineLegacyIndexByInternalId:O,mineFieldStatesByIndex:R,productLegacyIndexByInternalId:K,productFieldStatesByIndex:$,productLegacyKeyByInternalKeyByIndex:Y,amrtReasonIndexByInternalId:E,amrtReasonFieldStatesByIndex:oe};return{snapshot:ae,ctx:se}}function AT(e){if(e==="cmrt")return 1;if(e==="emrt")return 2;if(e==="amrt")return 3}const ET={parse:Ec,toInternal:Oc,toExternal:Ra,toExternalLoose:e=>{const t=PT(e.templateType,e.versionId);return Ra(e,t)}};function PT(e,t){const n=e.toUpperCase(),o=e==="crt"?{type:"crt",version:`RMI_${n}_${t}`,cmtCompany:{},cmtRangeQuestions:[],cmtCompanyQuestions:[],cmtSmelters:[],minList:[],cmtParts:[]}:{name:`RMI_${n}_${t}`,questionnaireType:AT(e),cmtCompany:{},cmtRangeQuestions:[],cmtCompanyQuestions:[],cmtSmelters:[],minList:[],cmtParts:[],...e==="amrt"?{amrtReasonList:[]}:{}};return Oc(o).ctx}exports.CMReporting=rT;exports.REPORT_SNAPSHOT_SCHEMA_VERSION=Lc;exports.cirsGpmLegacyAdapter=ET;exports.exportToExcel=xi;exports.parseSnapshot=nT;exports.stringifySnapshot=_i;exports.useCMReporting=iT;
40
40
  //# sourceMappingURL=index.cjs.map