text: {"version":3,"file":"script.min.js","sources":["script.js"],"names":["BX","CrmEntitySelector","parameters","this","randomString","jsObject","fieldUid","fieldName","usePrefix","listPrefix","multiple","listElement","listEntityType","pluralCreation","Boolean","listEntityCreateUrl","currentEntityType","context","initialize","prototype","popupObject","popupId","popupBindElement","popupContent","externalRequestData","externalEventHandler","createNewEntity","event","window","currentTarget","createPopup","performExternalRequest","entityType","popupWindow","close","setCurrentEntityType","url","util","add_url_param","getCreateUrl","external_context","wnd","open","delegate","onExternalEvent","addCustomEvent","params","key","type","isNotEmptyString","value","isPlainObject","typeName","toUpperCase","isCanceled","isBoolean","k","length","entityInfo","push","initWidgetEntitySelection","popupItems","text","message","onclick","PopupMenu","getMenuById","buttonRect","getBoundingClientRect","create","closeByEsc","angle","offsetLeft","width","show","hasOwnProperty","loadCSS","loadScript","CRM","Set","lead","contact","company","deal","quote","ok","cancel","wait","noresult","add","edit","search","last"],"mappings":"AAAAA,GAAGC,kBAAoB,WAEtB,GAAIA,GAAoB,SAAUC,GAEjCC,KAAKC,aAAeF,EAAWE,YAC/BD,MAAKE,SAAWH,EAAWG,QAC3BF,MAAKG,SAAWJ,EAAWI,QAC3BH,MAAKI,UAAYL,EAAWK,SAC5BJ,MAAKK,UAAYN,EAAWM,SAC5BL,MAAKM,WAAaP,EAAWO,UAC7BN,MAAKO,SAAWR,EAAWQ,QAC3BP,MAAKQ,YAAcT,EAAWS,WAC9BR,MAAKS,eAAiBV,EAAWU,cACjCT,MAAKU,eAAiBC,QAAQZ,EAAWW,eACzCV,MAAKY,oBAAsBb,EAAWa,mBACtCZ,MAAKa,kBAAoBd,EAAWc,iBACpCb,MAAKc,QAAUf,EAAWe,OAE1Bd,MAAKe,aAGNjB,GAAkBkB,UAAUD,WAAa,WAExCf,KAAKiB,YAAc,IACnBjB,MAAKkB,QAAU,OAAOlB,KAAKC,aAAa,QACxCD,MAAKmB,iBAAmB,IACxBnB,MAAKoB,aAAe,EACpBpB,MAAKqB,oBAAsB,IAC3Br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