12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402 |
- !function(t) {
- var e = this.webpackHotUpdate;
- this.webpackHotUpdate = function(t, i) {
- !function(t, e) {
- if (!v[t] || !y[t])
- return;
- for (var i in y[t] = !1,
- e)
- Object.prototype.hasOwnProperty.call(e, i) && (c[i] = e[i]);
- 0 == --p && 0 === d && _()
- }(t, i),
- e && e(t, i)
- }
- ;
- var i, n = !0, g = "6ebc6af84dfdad10b153", A = {}, r = [], o = [];
- function C(t) {
- var e = P[t];
- if (!e)
- return O;
- var n = function(n) {
- return e.hot.active ? (P[n] ? -1 === P[n].parents.indexOf(t) && P[n].parents.push(t) : (r = [t],
- i = n),
- -1 === e.children.indexOf(n) && e.children.push(n)) : (console.warn("[HMR] unexpected require(" + n + ") from disposed module " + t),
- r = []),
- O(n)
- }
- , g = function(t) {
- return {
- configurable: !0,
- enumerable: !0,
- get: function() {
- return O[t]
- },
- set: function(e) {
- O[t] = e
- }
- }
- };
- for (var A in O)
- Object.prototype.hasOwnProperty.call(O, A) && "e" !== A && "t" !== A && Object.defineProperty(n, A, g(A));
- return n.e = function(t) {
- return "ready" === a && l("prepare"),
- d++,
- O.e(t).then(e, (function(t) {
- throw e(),
- t
- }
- ));
- function e() {
- d--,
- "prepare" === a && (f[t] || x(t),
- 0 === d && 0 === p && _())
- }
- }
- ,
- n.t = function(t, e) {
- return 1 & e && (t = n(t)),
- O.t(t, -2 & e)
- }
- ,
- n
- }
- function I(t) {
- var e = {
- _acceptedDependencies: {},
- _declinedDependencies: {},
- _selfAccepted: !1,
- _selfDeclined: !1,
- _disposeHandlers: [],
- _main: i !== t,
- active: !0,
- accept: function(t, i) {
- if (void 0 === t)
- e._selfAccepted = !0;
- else if ("function" == typeof t)
- e._selfAccepted = t;
- else if ("object" == typeof t)
- for (var n = 0; n < t.length; n++)
- e._acceptedDependencies[t[n]] = i || function() {}
- ;
- else
- e._acceptedDependencies[t] = i || function() {}
- },
- decline: function(t) {
- if (void 0 === t)
- e._selfDeclined = !0;
- else if ("object" == typeof t)
- for (var i = 0; i < t.length; i++)
- e._declinedDependencies[t[i]] = !0;
- else
- e._declinedDependencies[t] = !0
- },
- dispose: function(t) {
- e._disposeHandlers.push(t)
- },
- addDisposeHandler: function(t) {
- e._disposeHandlers.push(t)
- },
- removeDisposeHandler: function(t) {
- var i = e._disposeHandlers.indexOf(t);
- i >= 0 && e._disposeHandlers.splice(i, 1)
- },
- check: b,
- apply: w,
- status: function(t) {
- if (!t)
- return a;
- s.push(t)
- },
- addStatusHandler: function(t) {
- s.push(t)
- },
- removeStatusHandler: function(t) {
- var e = s.indexOf(t);
- e >= 0 && s.splice(e, 1)
- },
- data: A[t]
- };
- return i = void 0,
- e
- }
- var s = []
- , a = "idle";
- function l(t) {
- a = t;
- for (var e = 0; e < s.length; e++)
- s[e].call(null, t)
- }
- var u, c, h, p = 0, d = 0, f = {}, y = {}, v = {};
- function m(t) {
- return +t + "" === t ? +t : t
- }
- function b(t) {
- if ("idle" !== a)
- throw new Error("check() is only allowed in idle status");
- return n = t,
- l("check"),
- (e = 1e4,
- e = e || 1e4,
- new Promise((function(t, i) {
- if ("undefined" == typeof XMLHttpRequest)
- return i(new Error("No browser support"));
- try {
- var n = new XMLHttpRequest
- , A = O.p + "" + g + ".hot-update.json";
- n.open("GET", A, !0),
- n.timeout = e,
- n.send(null)
- } catch (t) {
- return i(t)
- }
- n.onreadystatechange = function() {
- if (4 === n.readyState)
- if (0 === n.status)
- i(new Error("Manifest request to " + A + " timed out."));
- else if (404 === n.status)
- t();
- else if (200 !== n.status && 304 !== n.status)
- i(new Error("Manifest request to " + A + " failed."));
- else {
- try {
- var e = JSON.parse(n.responseText)
- } catch (t) {
- return void i(t)
- }
- t(e)
- }
- }
- }
- ))).then((function(t) {
- if (!t)
- return l("idle"),
- null;
- y = {},
- f = {},
- v = t.c,
- h = t.h,
- l("prepare");
- var e = new Promise((function(t, e) {
- u = {
- resolve: t,
- reject: e
- }
- }
- ));
- c = {};
- return x(0),
- "prepare" === a && 0 === d && 0 === p && _(),
- e
- }
- ));
- var e
- }
- function x(t) {
- v[t] ? (y[t] = !0,
- p++,
- function(t) {
- var e = document.createElement("script");
- e.charset = "utf-8",
- e.src = O.p + "" + t + "." + g + ".hot-update.js",
- document.head.appendChild(e)
- }(t)) : f[t] = !0
- }
- function _() {
- l("ready");
- var t = u;
- if (u = null,
- t)
- if (n)
- Promise.resolve().then((function() {
- return w(n)
- }
- )).then((function(e) {
- t.resolve(e)
- }
- ), (function(e) {
- t.reject(e)
- }
- ));
- else {
- var e = [];
- for (var i in c)
- Object.prototype.hasOwnProperty.call(c, i) && e.push(m(i));
- t.resolve(e)
- }
- }
- function w(e) {
- if ("ready" !== a)
- throw new Error("apply() is only allowed in ready status");
- var i, n, o, C, I;
- function s(t) {
- for (var e = [t], i = {}, n = e.map((function(t) {
- return {
- chain: [t],
- id: t
- }
- }
- )); n.length > 0; ) {
- var g = n.pop()
- , A = g.id
- , r = g.chain;
- if ((C = P[A]) && !C.hot._selfAccepted) {
- if (C.hot._selfDeclined)
- return {
- type: "self-declined",
- chain: r,
- moduleId: A
- };
- if (C.hot._main)
- return {
- type: "unaccepted",
- chain: r,
- moduleId: A
- };
- for (var o = 0; o < C.parents.length; o++) {
- var I = C.parents[o]
- , s = P[I];
- if (s) {
- if (s.hot._declinedDependencies[A])
- return {
- type: "declined",
- chain: r.concat([I]),
- moduleId: A,
- parentId: I
- };
- -1 === e.indexOf(I) && (s.hot._acceptedDependencies[A] ? (i[I] || (i[I] = []),
- u(i[I], [A])) : (delete i[I],
- e.push(I),
- n.push({
- chain: r.concat([I]),
- id: I
- })))
- }
- }
- }
- }
- return {
- type: "accepted",
- moduleId: t,
- outdatedModules: e,
- outdatedDependencies: i
- }
- }
- function u(t, e) {
- for (var i = 0; i < e.length; i++) {
- var n = e[i];
- -1 === t.indexOf(n) && t.push(n)
- }
- }
- e = e || {};
- var p = {}
- , d = []
- , f = {}
- , y = function() {
- console.warn("[HMR] unexpected require(" + x.moduleId + ") to disposed module")
- };
- for (var b in c)
- if (Object.prototype.hasOwnProperty.call(c, b)) {
- var x;
- I = m(b);
- var _ = !1
- , w = !1
- , S = !1
- , E = "";
- switch ((x = c[b] ? s(I) : {
- type: "disposed",
- moduleId: b
- }).chain && (E = "\nUpdate propagation: " + x.chain.join(" -> ")),
- x.type) {
- case "self-declined":
- e.onDeclined && e.onDeclined(x),
- e.ignoreDeclined || (_ = new Error("Aborted because of self decline: " + x.moduleId + E));
- break;
- case "declined":
- e.onDeclined && e.onDeclined(x),
- e.ignoreDeclined || (_ = new Error("Aborted because of declined dependency: " + x.moduleId + " in " + x.parentId + E));
- break;
- case "unaccepted":
- e.onUnaccepted && e.onUnaccepted(x),
- e.ignoreUnaccepted || (_ = new Error("Aborted because " + I + " is not accepted" + E));
- break;
- case "accepted":
- e.onAccepted && e.onAccepted(x),
- w = !0;
- break;
- case "disposed":
- e.onDisposed && e.onDisposed(x),
- S = !0;
- break;
- default:
- throw new Error("Unexception type " + x.type)
- }
- if (_)
- return l("abort"),
- Promise.reject(_);
- if (w)
- for (I in f[I] = c[I],
- u(d, x.outdatedModules),
- x.outdatedDependencies)
- Object.prototype.hasOwnProperty.call(x.outdatedDependencies, I) && (p[I] || (p[I] = []),
- u(p[I], x.outdatedDependencies[I]));
- S && (u(d, [x.moduleId]),
- f[I] = y)
- }
- var D, k = [];
- for (n = 0; n < d.length; n++)
- I = d[n],
- P[I] && P[I].hot._selfAccepted && f[I] !== y && k.push({
- module: I,
- errorHandler: P[I].hot._selfAccepted
- });
- l("dispose"),
- Object.keys(v).forEach((function(t) {
- !1 === v[t] && function(t) {
- delete installedChunks[t]
- }(t)
- }
- ));
- for (var M, L, N = d.slice(); N.length > 0; )
- if (I = N.pop(),
- C = P[I]) {
- var j = {}
- , R = C.hot._disposeHandlers;
- for (o = 0; o < R.length; o++)
- (i = R[o])(j);
- for (A[I] = j,
- C.hot.active = !1,
- delete P[I],
- delete p[I],
- o = 0; o < C.children.length; o++) {
- var G = P[C.children[o]];
- G && ((D = G.parents.indexOf(I)) >= 0 && G.parents.splice(D, 1))
- }
- }
- for (I in p)
- if (Object.prototype.hasOwnProperty.call(p, I) && (C = P[I]))
- for (L = p[I],
- o = 0; o < L.length; o++)
- M = L[o],
- (D = C.children.indexOf(M)) >= 0 && C.children.splice(D, 1);
- for (I in l("apply"),
- g = h,
- f)
- Object.prototype.hasOwnProperty.call(f, I) && (t[I] = f[I]);
- var T = null;
- for (I in p)
- if (Object.prototype.hasOwnProperty.call(p, I) && (C = P[I])) {
- L = p[I];
- var V = [];
- for (n = 0; n < L.length; n++)
- if (M = L[n],
- i = C.hot._acceptedDependencies[M]) {
- if (-1 !== V.indexOf(i))
- continue;
- V.push(i)
- }
- for (n = 0; n < V.length; n++) {
- i = V[n];
- try {
- i(L)
- } catch (t) {
- e.onErrored && e.onErrored({
- type: "accept-errored",
- moduleId: I,
- dependencyId: L[n],
- error: t
- }),
- e.ignoreErrored || T || (T = t)
- }
- }
- }
- for (n = 0; n < k.length; n++) {
- var U = k[n];
- I = U.module,
- r = [I];
- try {
- O(I)
- } catch (t) {
- if ("function" == typeof U.errorHandler)
- try {
- U.errorHandler(t)
- } catch (i) {
- e.onErrored && e.onErrored({
- type: "self-accept-error-handler-errored",
- moduleId: I,
- error: i,
- originalError: t
- }),
- e.ignoreErrored || T || (T = i),
- T || (T = t)
- }
- else
- e.onErrored && e.onErrored({
- type: "self-accept-errored",
- moduleId: I,
- error: t
- }),
- e.ignoreErrored || T || (T = t)
- }
- }
- return T ? (l("fail"),
- Promise.reject(T)) : (l("idle"),
- new Promise((function(t) {
- t(d)
- }
- )))
- }
- var P = {};
- function O(e) {
- if (P[e])
- return P[e].exports;
- var i = P[e] = {
- i: e,
- l: !1,
- exports: {},
- hot: I(e),
- parents: (o = r,
- r = [],
- o),
- children: []
- };
- return t[e].call(i.exports, i, i.exports, C(e)),
- i.l = !0,
- i.exports
- }
- O.m = t,
- O.c = P,
- O.d = function(t, e, i) {
- O.o(t, e) || Object.defineProperty(t, e, {
- enumerable: !0,
- get: i
- })
- }
- ,
- O.r = function(t) {
- "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {
- value: "Module"
- }),
- Object.defineProperty(t, "__esModule", {
- value: !0
- })
- }
- ,
- O.t = function(t, e) {
- if (1 & e && (t = O(t)),
- 8 & e)
- return t;
- if (4 & e && "object" == typeof t && t && t.__esModule)
- return t;
- var i = Object.create(null);
- if (O.r(i),
- Object.defineProperty(i, "default", {
- enumerable: !0,
- value: t
- }),
- 2 & e && "string" != typeof t)
- for (var n in t)
- O.d(i, n, function(e) {
- return t[e]
- }
- .bind(null, n));
- return i
- }
- ,
- O.n = function(t) {
- var e = t && t.__esModule ? function() {
- return t.default
- }
- : function() {
- return t
- }
- ;
- return O.d(e, "a", e),
- e
- }
- ,
- O.o = function(t, e) {
- return Object.prototype.hasOwnProperty.call(t, e)
- }
- ,
- O.p = "",
- O.h = function() {
- return g
- }
- ,
- C(24)(O.s = 24)
- }([function(t, e, i) {
- "use strict";
- var n = this && this.__assign || function() {
- return (n = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var g = i(3);
- e.calcVector = function(t) {
- var e = 1 / ((t = n({}, t)).x * t.y < 0 ? Math.abs(t.x - t.y) : t.x + t.y);
- return t.x = t.x * e,
- t.y = t.y * e,
- t
- }
- ,
- e.strictLineVector = function(t) {
- var i = t.points[1].x - t.points[0].x
- , n = t.points[1].y - t.points[0].y
- , g = Math.abs(i / 1)
- , A = Math.abs(n / 1)
- , r = g > A ? g : A
- , o = {
- x: i / r,
- y: n / r
- };
- return e.calcVector(o)
- }
- ,
- e.lineVector = function(t, i) {
- void 0 === i && (i = .001);
- var n = e.strictLineVector(t);
- return Math.abs(n.x) < i && (n.x = 0),
- Math.abs(n.y) < i && (n.y = 0),
- n
- }
- ,
- e.verticalLine = function(t) {
- var i = e.lineVector(t)
- , n = i.x
- , g = i.y;
- if (n - g != 0) {
- var A = {
- x: g / (g - n),
- y: n / (n - g)
- };
- return e.calcVector(A)
- }
- return {
- x: n,
- y: g
- }
- }
- ,
- e.lineDis = function(t) {
- return Number(Math.sqrt(Math.pow(t.points[0].x - t.points[1].x, 2) + Math.pow(t.points[0].y - t.points[1].y, 2)).toFixed(4))
- }
- ,
- e.lineCenter = function(t) {
- return {
- x: (t.points[0].x + t.points[1].x) / 2,
- y: (t.points[0].y + t.points[1].y) / 2
- }
- }
- ,
- e.segmentsIntr = function(t, i) {
- var n = t.points
- , g = n[0]
- , A = n[1]
- , r = i.points
- , o = r[0]
- , C = r[1]
- , I = (A.y - g.y) * (C.x - o.x) - (g.x - A.x) * (o.y - C.y);
- if (0 == I)
- return !1;
- var s = ((A.x - g.x) * (C.x - o.x) * (o.y - g.y) + (A.y - g.y) * (C.x - o.x) * g.x - (C.y - o.y) * (A.x - g.x) * o.x) / I
- , a = -((A.y - g.y) * (C.y - o.y) * (o.x - g.x) + (A.x - g.x) * (C.y - o.y) * g.y - (C.x - o.x) * (A.y - g.y) * o.y) / I;
- return !(!e.isContainPoint(t, {
- x: s,
- y: a
- }) || !e.isContainPoint(i, {
- x: s,
- y: a
- })) && {
- x: s,
- y: a
- }
- }
- ,
- e.segmentsIntrFine = function(t, e) {
- var i = t.points
- , n = i[0]
- , g = i[1]
- , A = e.points
- , r = A[0]
- , o = A[1]
- , C = (g.y - n.y) * (o.x - r.x) - (n.x - g.x) * (r.y - o.y);
- if (0 == C)
- return !1;
- var I = ((g.x - n.x) * (o.x - r.x) * (r.y - n.y) + (g.y - n.y) * (o.x - r.x) * n.x - (o.y - r.y) * (g.x - n.x) * r.x) / C
- , s = -((g.y - n.y) * (o.y - r.y) * (r.x - n.x) + (g.x - n.x) * (o.y - r.y) * n.y - (o.x - r.x) * (g.y - n.y) * r.y) / C;
- return !isNaN(I) && !isNaN(s) && {
- x: I,
- y: s
- }
- }
- ,
- e.pointLineDis = function(t, e) {
- var i = 0
- , n = t.points[1].x - t.points[0].x
- , g = e.x - t.points[0].x
- , A = e.x - t.points[1].x
- , r = t.points[1].y - t.points[0].y
- , o = e.y - t.points[0].y
- , C = e.y - t.points[1].y
- , I = n * g + r * o
- , s = n * n + r * r;
- if (I <= 0)
- i = Math.sqrt(g * g + o * o);
- else if (I >= s)
- i = Math.sqrt(A * A + C * C);
- else {
- var a = I / s
- , l = t.points[0].x + n * a
- , u = t.points[0].y + r * a;
- i = Math.sqrt((e.x - l) * (e.x - l) + (u - e.y) * (u - e.y))
- }
- return i
- }
- ,
- e.isContainPoint = function(t, i) {
- return !Math.abs(e.pointLineDis(t, i)) || Math.abs(e.pointLineDis(t, i)) < .01
- }
- ,
- e.getVerLinePoint = function(t, i) {
- return e.getVectorPosPoint(e.verticalLine(t), t.points[0], i)
- }
- ,
- e.getVectorPosPoint = function(t, i, n) {
- var g = {
- points: [i, {
- x: i.x + 1e4 * t.x,
- y: i.y + 1e4 * t.y
- }]
- };
- return e.getLinePoint(g, n)
- }
- ,
- e.getLinePoint = function(t, i) {
- var n, A = i;
- if (g.type.isNumber(A.x) && g.type.isNumber(A.y)) {
- var r = e.lineVector(t)
- , o = r.x
- , C = r.y
- , I = Math.abs(o) > Math.abs(C) ? "x" : "y";
- (n = {})[I] = A[I],
- A = n
- }
- var s = e.lineVector(t, 1e-4)
- , a = s.y / s.x
- , l = t.points[0].y - a * t.points[0].x;
- return a > 100 || a < -100 ? {
- x: t.points[0].x,
- y: A.y
- } : g.type.isNumber(A.x) ? {
- x: A.x,
- y: a * A.x + l
- } : g.type.isNumber(A.y) ? {
- x: (A.y - l) / a,
- y: A.y
- } : {
- x: 0,
- y: 0
- }
- }
- ,
- e.getFlexLinePoint = function(t, i) {
- var n = e.strictLineVector(t)
- , g = n.x
- , A = n.y
- , r = (g = Math.abs(g)) > (A = Math.abs(A)) ? {
- x: i.x
- } : {
- y: i.y
- };
- return e.getLinePoint(t, r)
- }
- ,
- e.getDisVectorPoints = function(t, e, i) {
- var n = Math.atan(t.y / t.x);
- return [{
- x: e.x + i * Math.cos(n),
- y: e.y + i * Math.sin(n)
- }, {
- x: e.x + -i * Math.cos(n),
- y: e.y + -i * Math.sin(n)
- }]
- }
- ,
- e.getDisPointLinePoints = function(t, i, n) {
- return e.getDisVectorPoints(e.lineVector(t), i, n)
- }
- ,
- e.getLineDisPoint = function(t, i) {
- var n = e.getDisPointLinePoints(t, t.points[0], i)
- , g = n[0]
- , A = n[1]
- , r = e.lineVector(t)
- , o = e.lineVector({
- points: [t.points[0], g]
- });
- return r.x * o.x >= 0 && r.y * o.y >= 0 ? g : A
- }
- ,
- e.getLineDisSelectPoint = function(t, i, n) {
- var g = e.getDisPointLinePoints(t, i, n)
- , A = g[0]
- , r = g[1];
- return e.pointLineDis(t, A) < e.pointLineDis(t, r) ? A : r
- }
- ,
- e.getDisVerticalLinePoints = function(t, i, n) {
- return e.getDisVectorPoints(e.verticalLine(t), i, n)
- }
- ,
- e.getLineVerticalChangePoint = function(t, i, n) {
- var g = e.segmentsIntrFine(t, i);
- return g ? e.getLineVerticalPoint(t, g, e.lineVector(i), n) : g
- }
- ,
- e.getLineVerticalPoint = function(t, i, n, g) {
- var A = e.getDisVerticalLinePoints(t, i, g)
- , r = A[0]
- , o = A[1]
- , C = e.lineVector({
- points: [i, r]
- })
- , I = e.lineVector({
- points: [i, o]
- })
- , s = n.x * C.x
- , a = n.y * C.y
- , l = n.x * I.x
- , u = n.x * I.y;
- return s >= 0 && a >= 0 ? r : l >= 0 && u >= 0 || (s < a ? s : a) < (l < u ? l : u) ? o : r
- }
- ,
- e.getPointCoordinate = function(t) {
- return t.x >= 0 && t.y >= 0 ? 1 : t.x >= 0 && t.y <= 0 ? 2 : t.x <= 0 && t.y <= 0 ? 3 : t.x <= 0 && t.y >= 0 ? 4 : 0
- }
- ,
- e.getLineCoordinate = function(t) {
- var e = t.points[1].x - t.points[0].x
- , i = t.points[1].y - t.points[0].y;
- return e >= 0 && i >= 0 ? 1 : e >= 0 && i <= 0 ? 4 : e <= 0 && i <= 0 ? 3 : 2
- }
- ,
- e.getPointCoordDistance = function(t, i) {
- return e.getPointCoordinate(t) - e.getPointCoordinate(i)
- }
- ,
- e.faceArea = function(t) {
- var e = t.length;
- if (e < 3)
- return 0;
- for (var i = t[0].y * (t[e - 1].x - t[1].x), n = 1; n < e; ++n)
- i += t[n].y * (t[n - 1].x - t[(n + 1) % e].x);
- return Math.abs(i / 2)
- }
- ,
- e.pointInside = function(t, e) {
- for (var i = !1, n = e.x, g = e.y, A = 0, r = t.length - 1; A < t.length; r = A++) {
- var o = t[A].x
- , C = t[A].y
- , I = t[r].x
- , s = t[r].y;
- C > g != s > g && n <= (I - o) * (g - C) / (s - C) + o && (i = !i)
- }
- return i
- }
- ,
- e.isPointInPoly = function(t, e) {
- for (var i = e.x, n = e.y, g = !1, A = 0, r = t.length - 1; A < t.length; r = A++) {
- var o = t[A]
- , C = t[r]
- , I = o.x
- , s = o.y
- , a = C.x
- , l = C.y;
- s > n != l > n && i < (a - I) * (n - s) / (l - s) + I && (g = !g)
- }
- return g
- }
- ,
- e.pointInsideBorder = function(t, i) {
- for (var n = 0; n < t.length; n++) {
- var g = {
- points: [t[n], t[n === t.length - 1 ? 0 : n + 1]]
- };
- if (e.isContainPoint(g, i))
- return !0
- }
- return !1
- }
- ,
- e.isClockWise = function(t, e) {
- var i, n, g;
- void 0 === e && (e = !0);
- var A, r = 0, o = e ? -1 : 1;
- if (null == t || t.length < 3)
- return !1;
- var C = t.length;
- for (i = 0; i < C; i++)
- g = (i + 2) % C,
- A = (t[n = (i + 1) % C].x - t[i].x) * (t[g].y * o - t[n].y * o),
- (A -= (t[n].y * o - t[i].y * o) * (t[g].x - t[n].x)) < 0 ? r-- : A > 0 && r++;
- return r > 0
- }
- ,
- e.isLineIntersect = function(t, e) {
- var i = t.points[1].y - t.points[0].y
- , n = t.points[0].x - t.points[1].x
- , g = i * t.points[0].x + n * t.points[0].y
- , A = e.points[1].y - e.points[0].y
- , r = e.points[0].x - e.points[1].x
- , o = A * e.points[0].x + r * e.points[0].y
- , C = i * r - A * n;
- if (0 == C)
- return !1;
- var I = (r * g - n * o) / C
- , s = (i * o - A * g) / C;
- if ((a(t.points[0].x, I, t.points[1].x) || a(t.points[0].y, s, t.points[1].y)) && (a(e.points[0].x, I, e.points[1].x) || a(e.points[0].y, s, e.points[1].y)))
- return !0;
- function a(t, e, i) {
- return !(Math.abs(t - e) < 1e-6 || Math.abs(e - i) < 1e-6) && (t <= e && e <= i || i <= e && e <= t)
- }
- return !1
- }
- ,
- e.isFaceIntersect = function(t, i) {
- for (var n = 0; n < t.length; n++)
- for (var g = n + 1 === t.length ? 0 : n + 1, A = {
- points: [t[n], t[g]]
- }, r = 0; r < i.length; r++) {
- g = r + 1 === i.length ? 0 : r + 1;
- var o = {
- points: [i[r], i[g]]
- }
- , C = e.isLineIntersect(o, A)
- , I = e.isLineIntersect(A, o);
- if (C && I)
- return !0
- }
- return !1
- }
- ,
- e.isFaceContain = function(t, i) {
- return i.every((function(i) {
- return e.pointInside(t, i)
- }
- )) && !e.isFaceIntersect(t, i)
- }
- ,
- e.isFaceChild = function(t, i) {
- return i.every((function(i) {
- return e.pointInside(t, i) || e.pointInsideBorder(t, i)
- }
- )) && !e.isFaceIntersect(t, i)
- }
- ,
- e.faceCenter = function(t) {
- for (var e = 0, i = 0, n = 0; n < t.length; n++)
- e += t[n].x,
- i += t[n].y;
- return {
- x: e /= t.length,
- y: i /= t.length
- }
- }
- ,
- e.faceRotate = function(t, i) {
- var n = window.THREE
- , g = e.faceCenter(t)
- , A = (new n.Matrix3).translate(-g.x, -g.y)
- , r = (new n.Matrix3).rotate(n.Math.degToRad(i))
- , o = (new n.Matrix3).translate(g.x, g.y)
- , C = new n.Matrix3;
- return C.premultiply(A),
- C.premultiply(r),
- C.premultiply(o),
- t.map((function(t) {
- var e = new n.Vector2(t.x,t.y);
- return e.applyMatrix3(C),
- {
- x: e.x,
- y: e.y
- }
- }
- ))
- }
- ,
- e.lineStretch = function(t, i) {
- t = n(n({}, t), {
- points: t.points.map((function(t) {
- return {
- x: t.x,
- y: t.y
- }
- }
- ))
- });
- var g = e.lineCenter(t)
- , A = e.getDisPointLinePoints(t, g, i / 2)
- , r = A[0]
- , o = A[1];
- return e.lineDis({
- points: [t.points[0], r]
- }) > e.lineDis({
- points: [t.points[0], o]
- }) ? (t.points[0].x = o.x,
- t.points[0].y = o.y,
- t.points[1].x = r.x,
- t.points[1].y = r.y) : (t.points[0].x = r.x,
- t.points[0].y = r.y,
- t.points[1].x = o.x,
- t.points[1].y = o.y),
- t
- }
- ,
- e.lineDeg = function(t) {
- return 180 * Math.atan2(t.points[1].y - t.points[0].y, t.points[1].x - t.points[0].x) / Math.PI
- }
- ,
- e.getAngle = function(t, e) {
- var i, n, g, A;
- ~(A = t.points.indexOf(e.points[0])) ? (i = t.points[A],
- n = e.points[1],
- g = t.points[Number(!A)]) : ~(A = t.points.indexOf(e.points[1])) && (i = t.points[A],
- n = e.points[0],
- g = t.points[Number(!A)]);
- var r, o, C = 0, I = n.x - i.x, s = n.y - i.y, a = g.x - i.x, l = g.y - i.y;
- return C = I * a + s * l,
- o = (I * I + s * s) * (a * a + l * l),
- (C /= Math.sqrt(o)) >= 1 ? 0 : C <= -1 ? 180 : 180 * (r = Math.acos(C)) / Math.PI < 180 ? 180 * r / Math.PI : 360 - 180 * r / Math.PI
- }
- ,
- e.rotatePoint = function(t, e, i) {
- var n = t.x - i.x
- , g = t.y - i.y
- , A = Math.cos(e) * n - Math.sin(e) * g
- , r = Math.sin(e) * n + Math.cos(e) * g;
- return {
- x: A + i.x,
- y: r + i.y
- }
- }
- ,
- e.rotateData = function(t, i, n) {
- try {
- var g = ["furnColumn", "furnFlue", "column"];
- return (t = JSON.parse(JSON.stringify(t))).vertex.forEach((function(t) {
- var g = e.rotatePoint(t, i, n);
- t.x = g.x,
- t.y = g.y
- }
- )),
- t.tagging.forEach((function(t) {
- var g = e.rotatePoint({
- x: t.pos[0],
- y: t.pos[1]
- }, i, n);
- t.pos[0] = g.x,
- t.pos[1] = g.y
- }
- )),
- ["window", "door", "slideDoor", "groundCase", "bayCase", "doubleDoor"].concat(g).forEach((function(g) {
- t[g].forEach((function(t) {
- var g = e.rotatePoint({
- x: t.pos[0],
- y: t.pos[1]
- }, i, n)
- , A = e.rotatePoint({
- x: t.pos[2],
- y: t.pos[3]
- }, i, n);
- t.pos[0] = g.x,
- t.pos[1] = g.y,
- t.pos[2] = A.x,
- t.pos[3] = A.y
- }
- ))
- }
- )),
- g.forEach((function(g) {
- t[g].forEach((function(t) {
- var g = e.rotatePoint({
- x: t.pos[4],
- y: t.pos[5]
- }, i, n)
- , A = e.rotatePoint({
- x: t.pos[6],
- y: t.pos[7]
- }, i, n);
- t.pos[4] = g.x,
- t.pos[5] = g.y,
- t.pos[6] = A.x,
- t.pos[7] = A.y
- }
- ))
- }
- )),
- t
- } catch (e) {
- return t
- }
- }
- }
- , function(t, e, i) {
- "use strict";
- var n, g;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var A = i(9);
- e.SVGURI = "http://www.w3.org/2000/svg",
- e.SVGPATH = "http://www.w3.org/1999/xlink",
- e.STATE_CHILD = "__state",
- e.POINT = "point",
- e.DOOR = "door",
- e.DOUBLEDOOR = "double_door",
- e.COLUMN = "column",
- e.CASEMENT = "casement",
- e.SLIDEDOOR = "slideDoor",
- e.TAGGING = "tagging",
- e.GROUNDCASE = "groundCase",
- e.BAYCASE = "bayCase",
- e.FURNCOLUMN = "furnColumn",
- e.FURNFLUE = "furnFlue",
- e.LINE = "line",
- e.SEFTLINE = "seftline",
- e.ARCH = ((n = {})[e.POINT] = A.i18n.t("modules.model.point"),
- n[e.DOOR] = A.i18n.t("modules.model.door"),
- n[e.DOUBLEDOOR] = A.i18n.t("modules.model.double_door"),
- n[e.COLUMN] = A.i18n.t("modules.model.column"),
- n[e.CASEMENT] = A.i18n.t("modules.model.casement"),
- n[e.SLIDEDOOR] = A.i18n.t("modules.model.slideDoor"),
- n[e.TAGGING] = A.i18n.t("modules.model.tagging"),
- n[e.GROUNDCASE] = A.i18n.t("modules.model.groundCase"),
- n[e.BAYCASE] = A.i18n.t("modules.model.bayCase"),
- n[e.FURNCOLUMN] = A.i18n.t("modules.model.furnColumn"),
- n[e.FURNFLUE] = A.i18n.t("modules.model.furnFlue"),
- n[e.LINE] = A.i18n.t("modules.model.line"),
- n[e.SEFTLINE] = A.i18n.t("modules.model.line"),
- n),
- e.DEFAULT = ((g = {})[e.DOOR] = {
- width: .8,
- height: 2
- },
- g[e.DOUBLEDOOR] = {
- width: 1.6,
- height: 2
- },
- g[e.SLIDEDOOR] = {
- width: 1.5,
- height: 2
- },
- g[e.CASEMENT] = {
- width: .8,
- height: 1.2
- },
- g[e.BAYCASE] = {
- width: 1.5,
- height: 1.2
- },
- g[e.GROUNDCASE] = {
- width: 1.5,
- height: 2
- },
- g[e.COLUMN] = {
- width: .65,
- tick: .65
- },
- g[e.FURNCOLUMN] = {
- width: .65,
- tick: .65
- },
- g[e.FURNFLUE] = {
- width: .65,
- tick: .65
- },
- g[e.LINE] = {
- width: .5
- },
- g)
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__assign || function() {
- return (n = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var g = i(29)
- , A = i(1)
- , r = i(3)
- , o = 0
- , C = {
- enter: "mouseenter",
- leave: "mouseleave",
- click: "click",
- drag: "mousedown"
- }
- , I = function() {
- function t(e) {
- var i = this;
- this.zIndex = 0,
- this.render = e.renderer,
- this.id = ++o,
- this.__state = new g.State(n(n({}, e), {
- select: !1
- }),{
- afferent: this,
- notice: function() {
- for (var t = [], e = 0; e < arguments.length; e++)
- t[e] = arguments[e];
- i.notice && i.notice.apply(i, t),
- i.update && i.update();
- var n = Object.keys(t[0].args);
- if ((~n.indexOf("x") || ~n.indexOf("y")) && i.wallPos)
- try {
- i.wallPos()
- } catch (t) {}
- ~n.indexOf("select") && i.wallSelect && i.wallSelect()
- },
- childAttr: A.STATE_CHILD,
- intercept: this.intercept && function() {
- for (var t = [], e = 0; e < arguments.length; e++)
- t[e] = arguments[e];
- return i.intercept.apply(i, t)
- }
- }),
- this.__state.bindDataChange(),
- g.getter(this, this.__state),
- g.setter(this, this.__state),
- Object.defineProperties(this, {
- multiple: {
- get: function() {
- return i.renderer.props.multiple / i.renderer.props.scale
- }
- }
- }),
- t.examples.get(this.renderer).push(this),
- this.grentNode && (this.real = this.grentNode(),
- this.setHoverStyle && this.setUnHoverStyle && (this.enter = function() {
- i.real.style.cursor = "pointer",
- i.setHoverStyle()
- }
- ,
- this.leave = function() {
- i.select || (i.setUnHoverStyle(),
- i.real.style.cursor = "inherit")
- }
- ,
- this.wallSelect = function() {
- i.select ? (i.real.style.cursor = "pointer",
- i.setHoverStyle()) : (i.real.style.cursor = "inherit",
- i.setUnHoverStyle())
- }
- ),
- this.listen()),
- this.real.id = "ele" + o.toString(),
- this.nextTick((function() {
- try {
- i.update()
- } catch (t) {}
- }
- ))
- }
- return t.prototype.intercept = function(t, e, i, n) {
- return e
- }
- ,
- t.prototype.changeSelect = function(e) {
- var i = this;
- this.select !== e && (this.select = e,
- this.wallSelect && this.wallSelect(),
- this.update && this.update(),
- e && t.examples.get(this.renderer).forEach((function(t) {
- t !== i && t.select && t.changeSelect(!1)
- }
- )))
- }
- ,
- t.prototype.click = function(t) {
- var e = this;
- this.changeSelect(!0),
- this.renderer.processing.attrs.forEach((function(t) {
- var i = e.renderer.processing[t].find((function(t) {
- return t.ele === e
- }
- ));
- i && console.log(i)
- }
- )),
- t.stopPropagation()
- }
- ,
- t.prototype.nextTick = function(t) {
- this.__state.nextTick(t)
- }
- ,
- t.prototype.nextChange = function(t) {
- this.__state.nextChange(t)
- }
- ,
- t.prototype.listen = function() {
- this.__draging = !1,
- this.bindEvent("enter"),
- this.bindEvent("leave"),
- this.bindEvent("click"),
- this.bindEvent("drag")
- }
- ,
- t.prototype.unEvent = function() {
- this.unbindEvent("enter"),
- this.unbindEvent("leave"),
- this.unbindEvent("click"),
- this.unbindEvent("drag")
- }
- ,
- t.prototype.destroy = function() {
- this.__destroy = !0,
- this.unEvent();
- var e = t.examples.get(this.renderer);
- ~e.indexOf(this) && (e.splice(e.indexOf(this), 1),
- this.renderer.remove(this))
- }
- ,
- t.prototype.bindDrag = function(t) {
- var e = this
- , i = {
- x: t.offsetX,
- y: t.offsetY
- };
- this.dragStart && this.dragStart(t, i);
- var n = r.throttle((function(t) {
- var n = {
- x: t.offsetX,
- y: t.offsetY
- };
- e.__draging = !0,
- e.drag({
- x: n.x - i.x,
- y: n.y - i.y
- }, n, i),
- t.preventDefault()
- }
- ), 10)
- , g = function(t) {
- document.documentElement.removeEventListener("mousemove", n, !1),
- document.documentElement.removeEventListener("mouseup", g, !1),
- e.__draging = !1,
- e.dragEnd && e.dragEnd({
- x: t.offsetX,
- y: t.offsetY
- }),
- e.__leave && e.leave()
- };
- document.documentElement.addEventListener("mousemove", n, !1),
- document.documentElement.addEventListener("mouseup", g, !1),
- t.preventDefault()
- }
- ,
- t.prototype.bindEvent = function(e) {
- var i = this;
- if (this[e]) {
- var n = "__bind_" + e;
- this[n] && this.unbindEvent(e);
- var g = "drag" === e ? this.bindDrag.bind(this) : function(n) {
- var g = t.examples.get(i.renderer);
- "enter" === e && g.some((function(t) {
- return t.__draging
- }
- )) || (!i.__draging || "enter" !== e && "leave" !== e ? i[e](n) : i.__leave = "leave" === e)
- }
- ;
- this.real.addEventListener(C[e], g, !1),
- this[n] = g
- }
- }
- ,
- t.prototype.unbindEvent = function(t) {
- this["__bind_" + t] && this.real.removeEventListener(C[t], this["__bind_" + t], !1)
- }
- ,
- t.examples = new Map,
- t.multiples = new Map,
- t.update = function(e, i) {
- void 0 === i && (i = []);
- var n = t.examples.get(e).concat(i);
- (n = Array.from(new Set(n))).forEach((function(t) {
- t.update && t.update()
- }
- ))
- }
- ,
- t.init = function(e) {
- t.examples.set(e, [])
- }
- ,
- t
- }();
- e.CADElement = I
- }
- , function(t, e, i) {
- "use strict";
- Object.defineProperty(e, "__esModule", {
- value: !0
- }),
- e.getRange = function(t) {
- var e = Math.abs(Math.min.apply(Math, t))
- , i = Math.abs(Math.max.apply(Math, t));
- return Math.ceil(e + i)
- }
- ,
- e.getMapMultipleWH = function(t, e, i, n) {
- void 0 === n && (n = 10);
- var g = Math.abs(Math.min.apply(Math, i.vertex.map((function(t) {
- return t.x
- }
- ))))
- , A = Math.abs(Math.max.apply(Math, i.vertex.map((function(t) {
- return t.x
- }
- ))))
- , r = Math.abs(Math.min.apply(Math, i.vertex.map((function(t) {
- return t.y
- }
- ))))
- , o = Math.abs(Math.max.apply(Math, i.vertex.map((function(t) {
- return t.y
- }
- ))))
- , C = Math.ceil(g + A) / t
- , I = Math.ceil(r + o) / e
- , s = C > I ? C : I
- , a = t * s
- , l = e * s;
- return {
- width: a,
- height: l,
- multiple: s,
- left: g / (g + A) * a,
- top: r / (r + o) * l,
- scale: 1 - 2 * n * s / a
- }
- }
- ,
- e.debounce = function(t, e, i, n) {
- void 0 === e && (e = 16);
- var g = null
- , A = []
- , r = 0;
- return function() {
- for (var o = [], C = 0; C < arguments.length; C++)
- o[C] = arguments[C];
- r || n && n(),
- r++,
- A.push(o),
- clearTimeout(g),
- g = setTimeout((function() {
- i ? (t(i(A)),
- A = []) : t.apply(void 0, o),
- r = 0
- }
- ), e)
- }
- }
- ,
- e.throttle = function(t, e) {
- var i = null;
- return function() {
- for (var n = [], g = 0; g < arguments.length; g++)
- n[g] = arguments[g];
- var A = +new Date;
- (A - i > e || !i) && (t.apply(void 0, n),
- i = A)
- }
- }
- ,
- e.getType = function(t) {
- return Object.prototype.toString.call(t).slice(8, -1)
- }
- ,
- e.type = {};
- ["String", "Number", "Boolean", "Undefined", "Null", "Object", "Function", "Array", "Date", "RegExp"].forEach((function(t) {
- return e.type["is" + t] = function(i) {
- return e.getType(i) === t
- }
- }
- )),
- e.convertBase64UrlToBlob = function(t) {
- for (var e = t.split(","), i = e[0].match(/:(.*?);/)[1], n = atob(e[1]), g = n.length, A = new Uint8Array(g); g--; )
- A[g] = n.charCodeAt(g);
- return new Blob([A],{
- type: i
- })
- }
- ,
- e.strEascpeLen = function(t) {
- for (var e = t, i = e.length, n = 0; n < i; n++) {
- ~escape(e.substr(n, 1)).indexOf("%u") && i++
- }
- return i
- }
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__assign || function() {
- return (A = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , r = this && this.__rest || function(t, e) {
- var i = {};
- for (var n in t)
- Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
- if (null != t && "function" == typeof Object.getOwnPropertySymbols) {
- var g = 0;
- for (n = Object.getOwnPropertySymbols(t); g < n.length; g++)
- e.indexOf(n[g]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[g]) && (i[n[g]] = t[n[g]])
- }
- return i
- }
- , o = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- , C = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var I = i(2)
- , s = C(i(32))
- , a = i(0)
- , l = i(3)
- , u = function(t) {
- function e(i) {
- var n = i.minWidth
- , g = void 0 === n ? .1 : n
- , o = i.deleteWidth
- , C = void 0 === o ? .05 : o
- , I = i.show
- , a = void 0 === I || I
- , l = r(i, ["minWidth", "deleteWidth", "show"])
- , u = t.call(this, A(A({}, l), {
- show: a
- })) || this;
- return u.zIndex = 1,
- u.linePoints = u.linePoints.map((function(t) {
- var e = new s.default(A(A({}, t), {
- renderer: u.renderer
- }),u.attachment);
- return e.click = function() {
- return u.changeSelect(!0)
- }
- ,
- e
- }
- )),
- u.minWidth = g,
- u.deleteWidth = C,
- u.real.setAttribute("class", "variable"),
- e.attaArch.get(u.attachment) ? e.attaArch.get(u.attachment).push(u) : e.attaArch.set(u.attachment, [u]),
- u.attachment.update(),
- u
- }
- return g(e, t),
- e.prototype.setAttachment = function(t) {
- if (void 0 === t && (t = this.attachment),
- console.error("set new attach"),
- this.attachment !== t) {
- var i = e.attaArch.get(this.attachment)
- , n = e.attaArch.get(t) || e.attaArch.set(t, []).get(t);
- i.splice(i.indexOf(this), 1),
- n.push(this),
- this.linePoints.forEach((function(e) {
- e.line = t
- }
- )),
- this.attachment = t
- }
- }
- ,
- e.prototype.checkPointBorder = function(t, e) {
- return void 0 === e && (e = this.attachment),
- a.lineDis({
- points: [e.points[0], t]
- }) < .08 || (a.lineDis({
- points: [e.points[1], t]
- }) < .08 || void 0)
- }
- ,
- e.prototype.checkPoint = function(t, e) {
- return void 0 === e && (e = this.attachment),
- !a.isContainPoint(e, t)
- }
- ,
- e.prototype.checkWidth = function(t) {
- return void 0 === t && (t = this.linePoints),
- a.lineDis({
- points: t
- }) < this.minWidth
- }
- ,
- e.prototype.checkPointOverlapAttaArch = function(t) {
- return void 0 === t && (t = e.attaArch.get(this.attachment)),
- !(t.length <= 1) && t.some((function(e) {
- return t.some((function(t) {
- return e !== t && (a.isContainPoint({
- points: t.linePoints
- }, e.linePoints[0]) || a.isContainPoint({
- points: t.linePoints
- }, e.linePoints[1]))
- }
- ))
- }
- ))
- }
- ,
- e.prototype.checkLineAllPoint = function(t, i) {
- return void 0 === t && (t = e.attaArch.get(this.attachment)),
- void 0 === i && (i = this.attachment),
- 0 !== t.length && t.some((function(t) {
- return !a.isContainPoint(i, t.linePoints[0]) || !a.isContainPoint(i, t.linePoints[1])
- }
- ))
- }
- ,
- e.prototype.getLineNewAll = function(t, i) {
- void 0 === t && (t = this.linePoints),
- void 0 === i && (i = this);
- var n = o(e.attaArch.get(this.attachment));
- return n.splice(n.indexOf(i), 1, {
- linePoints: t
- }),
- n
- }
- ,
- e.prototype.qualified = function(t, e) {
- return void 0 === t && (t = this.linePoints),
- void 0 === e && (e = this.attachment),
- !(this.checkPointBorder(t[0], e) || this.checkPointBorder(t[0], e) || this.checkPoint(t[0], e) || this.checkPoint(t[1], e) || this.checkWidth(t))
- }
- ,
- e.prototype.lineChange = function(t, e) {
- var i = this;
- void 0 === t && (t = this.attachment.points[0]),
- void 0 === e && (e = t);
- var n = e.x
- , g = e.y
- , r = this.attachment.points.findIndex((function(e) {
- return e === t
- }
- ))
- , o = {
- points: 0 === r ? [{
- x: n,
- y: g
- }, this.attachment.points[1]] : [this.attachment.points[0], {
- x: n,
- y: g
- }]
- }
- , C = a.lineDis({
- points: [o.points[r], this.linePoints[0]]
- })
- , I = a.getDisPointLinePoints(o, o.points[r], C)
- , l = I[0]
- , u = I[1]
- , c = a.lineDis({
- points: [l, this.linePoints[0]]
- }) > a.lineDis({
- points: [u, this.linePoints[0]]
- }) ? u : l
- , h = a.lineDis({
- points: [o.points[r], this.linePoints[1]]
- })
- , p = a.getDisPointLinePoints(o, o.points[r], h)
- , d = p[0]
- , f = p[1]
- , y = a.lineDis({
- points: [d, this.linePoints[1]]
- }) > a.lineDis({
- points: [f, this.linePoints[1]]
- }) ? f : d
- , v = (a.lineDis({
- points: [this.linePoints[0], c]
- }) < a.lineDis({
- points: [this.linePoints[0], y]
- }) ? [c, y] : [y, c]).map((function(t) {
- var e = s.default.prototype.getLineInsertPoint.call(A(A({}, i.linePoints[0]), {
- line: o
- }), t);
- return a.pointLineDis(i.attachment, e) > .1 ? a.lineDis({
- points: [i.attachment.points[0], e]
- }) < a.lineDis({
- points: [i.attachment.points[1], e]
- }) ? {
- x: i.attachment.points[0].x,
- y: i.attachment.points[0].y
- } : {
- x: i.attachment.points[1].x,
- y: i.attachment.points[1].y
- } : e
- }
- ));
- return {
- line: o,
- points: v
- }
- }
- ,
- e.prototype.pointChange = function(t, e) {
- var i = e.x
- , n = e.y;
- return 0 === this.linePoints.findIndex((function(e) {
- return e === t
- }
- )) ? [{
- x: i,
- y: n
- }, this.linePoints[1]] : [this.linePoints[0], {
- x: i,
- y: n
- }]
- }
- ,
- e.prototype.lineChangeCheck = function(t, e, i) {
- return this.qualified(t, e) && !this.checkLineAllPoint(i, e) && !this.checkPointOverlapAttaArch(i)
- }
- ,
- e.prototype.intercept = function(t, i, n) {
- var g, A = this, r = i.x, o = i.y;
- if (l.type.isUndefined(r) || l.type.isUndefined(o))
- return !0;
- if (g = this.attachment.points.find((function(e) {
- return t.some((function(t) {
- return t === e
- }
- ))
- }
- ))) {
- var C = this.lineChange(g, {
- x: r,
- y: o
- })
- , I = C.points
- , s = (C.line,
- t.filter((function(t) {
- return t instanceof e && t.attachment.id === A.attachment.id
- }
- )));
- return s = Array.from(new Set(s)),
- this.attachment.nextTick((function() {
- if (!A.attachment || !A.attachment.points)
- return A.destroy();
- var t = A.lineChange(g, {
- x: g.x,
- y: g.y
- })
- , e = t.points;
- t.line;
- e.forEach((function(t, e) {
- t && (A.linePoints[e].x = t.x,
- A.linePoints[e].y = t.y)
- }
- )),
- A.nextTick((function() {
- A.linePoints && A.linePoints.length && a.lineDis({
- points: A.linePoints
- }) <= A.deleteWidth && A.destroy()
- }
- ))
- }
- )),
- this.attachment.update(),
- {
- __points: I
- }
- }
- t.findIndex((function(t) {
- return A.linePoints.some((function(e) {
- return e === t
- }
- ))
- }
- ))
- }
- ,
- e.prototype.dragEnd = function() {
- var t = this;
- this.nextTick((function() {
- a.lineDis({
- points: t.linePoints
- }) <= t.deleteWidth && t.destroy()
- }
- ))
- }
- ,
- e.prototype.destroy = function() {
- var i = e.attaArch.get(this.attachment);
- i && (i.splice(i.indexOf(this), 1),
- console.log(this.linePoints[0], this),
- this.linePoints[0] && this.linePoints[0].destroy && this.linePoints[0].destroy(),
- this.linePoints[1] && this.linePoints[1].destroy && this.linePoints[1].destroy(),
- this.attachment = null,
- this.linePoints = null,
- this.update = null,
- t.prototype.destroy.call(this),
- this.attachment.update())
- }
- ,
- e.attaArch = new Map,
- e
- }(I.CADElement);
- e.default = u
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__assign || function() {
- return (A = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , r = this && this.__awaiter || function(t, e, i, n) {
- return new (i || (i = Promise))((function(g, A) {
- function r(t) {
- try {
- C(n.next(t))
- } catch (t) {
- A(t)
- }
- }
- function o(t) {
- try {
- C(n.throw(t))
- } catch (t) {
- A(t)
- }
- }
- function C(t) {
- var e;
- t.done ? g(t.value) : (e = t.value,
- e instanceof i ? e : new i((function(t) {
- t(e)
- }
- ))).then(r, o)
- }
- C((n = n.apply(t, e || [])).next())
- }
- ))
- }
- , o = this && this.__generator || function(t, e) {
- var i, n, g, A, r = {
- label: 0,
- sent: function() {
- if (1 & g[0])
- throw g[1];
- return g[1]
- },
- trys: [],
- ops: []
- };
- return A = {
- next: o(0),
- throw: o(1),
- return: o(2)
- },
- "function" == typeof Symbol && (A[Symbol.iterator] = function() {
- return this
- }
- ),
- A;
- function o(A) {
- return function(o) {
- return function(A) {
- if (i)
- throw new TypeError("Generator is already executing.");
- for (; r; )
- try {
- if (i = 1,
- n && (g = 2 & A[0] ? n.return : A[0] ? n.throw || ((g = n.return) && g.call(n),
- 0) : n.next) && !(g = g.call(n, A[1])).done)
- return g;
- switch (n = 0,
- g && (A = [2 & A[0], g.value]),
- A[0]) {
- case 0:
- case 1:
- g = A;
- break;
- case 4:
- return r.label++,
- {
- value: A[1],
- done: !1
- };
- case 5:
- r.label++,
- n = A[1],
- A = [0];
- continue;
- case 7:
- A = r.ops.pop(),
- r.trys.pop();
- continue;
- default:
- if (!(g = (g = r.trys).length > 0 && g[g.length - 1]) && (6 === A[0] || 2 === A[0])) {
- r = 0;
- continue
- }
- if (3 === A[0] && (!g || A[1] > g[0] && A[1] < g[3])) {
- r.label = A[1];
- break
- }
- if (6 === A[0] && r.label < g[1]) {
- r.label = g[1],
- g = A;
- break
- }
- if (g && r.label < g[2]) {
- r.label = g[2],
- r.ops.push(A);
- break
- }
- g[2] && r.ops.pop(),
- r.trys.pop();
- continue
- }
- A = e.call(t, r)
- } catch (t) {
- A = [6, t],
- n = 0
- } finally {
- i = g = 0
- }
- if (5 & A[0])
- throw A[1];
- return {
- value: A[0] ? A[1] : void 0,
- done: !0
- }
- }([A, o])
- }
- }
- }
- , C = this && this.__rest || function(t, e) {
- var i = {};
- for (var n in t)
- Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
- if (null != t && "function" == typeof Object.getOwnPropertySymbols) {
- var g = 0;
- for (n = Object.getOwnPropertySymbols(t); g < n.length; g++)
- e.indexOf(n[g]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[g]) && (i[n[g]] = t[n[g]])
- }
- return i
- }
- , I = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- , s = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var a = s(i(6))
- , l = i(3)
- , u = i(0)
- , c = function(t) {
- function e(i) {
- var n = i.hover
- , g = C(i, ["hover"])
- , A = this;
- if (!g.renderer)
- throw g;
- return n || (n = {
- fillColor: e.Setting.get(g.renderer).fillColor,
- storkeColor: e.Setting.get(g.renderer).storkeColor
- }),
- (A = t.call(this, g) || this).hover = n,
- A.hover.r = A.hover.r || A.init.r,
- A.real.setAttribute("class", "variable"),
- A.adopt = !1,
- A.disable = !1,
- A.zIndex = 2,
- A
- }
- return g(e, t),
- e.prototype.setHoverStyle = function() {
- this.fillColor = this.hover.fillColor,
- this.strokeWidth = this.hover.r,
- this.storkeColor = this.hover.storkeColor
- }
- ,
- e.prototype.setUnHoverStyle = function() {
- this.fillColor = this.init.fillColor,
- this.strokeWidth = this.init.strokeWidth,
- this.storkeColor = this.init.storkeColor
- }
- ,
- e.prototype.dragStart = function() {
- this.dragStartPoint = {
- x: this.x,
- y: this.y
- }
- }
- ,
- e.prototype.drag = function(t) {
- if (this.disable || 0 === t.x && 0 === t.y)
- return !1;
- this.x = this.dragStartPoint.x + t.x * this.multiple,
- this.y = this.dragStartPoint.y + t.y * this.multiple
- }
- ,
- e.prototype.update = function() {
- var e = this;
- t.prototype.update.call(this),
- this.renderer.processing.lines.filter((function(t) {
- return ~t.ele.points.indexOf(e)
- }
- )).map((function(t) {
- return t.ele
- }
- )).forEach((function(t) {
- t.showAngle = e.hover && e.fillColor === e.hover.fillColor
- }
- ))
- }
- ,
- e.prototype.intercept = function(t, e, i) {
- var n = this
- , g = e.x
- , r = e.y;
- e.select;
- if (l.type.isUndefined(g) || l.type.isUndefined(r))
- return !0;
- if (this.dragStartPoint) {
- for (var o, C = {
- x: g,
- y: r
- }, s = this.renderer.processing.lines.map((function(t) {
- return t.ele
- }
- )), a = s.filter((function(t) {
- return ~t.points.indexOf(n)
- }
- )).map((function(t) {
- var e = t.points.indexOf(n)
- , i = Number(!e)
- , g = s.filter((function(e) {
- return ~e.points.indexOf(t.points[i]) && t !== e
- }
- ))
- , A = I(t.points);
- return A[e] = C,
- I([{
- points: A
- }], g)
- }
- )), c = function(t) {
- var e = a[t];
- if (e.length < 2)
- return "continue";
- var i = e.slice(1).map((function(t) {
- var i = u.getAngle(e[0], t);
- return i > 90 && (i = 180 - i),
- {
- line: t,
- angle: u.getAngle(e[0], t)
- }
- }
- ))
- , n = i.map((function(t) {
- return A(A({}, t), {
- angle: t.angle > 90 ? 180 - t.angle : t.angle
- })
- }
- )).sort((function(t, e) {
- return t.angle - e.angle
- }
- ));
- if (n[0].angle <= 5) {
- var g = n[0].line;
- o = u.getLinePoint(g, o || C)
- }
- var r = i.find((function(t) {
- var e = t.angle;
- return e > 85 && e < 95 && 90 !== e
- }
- ));
- r && (o = u.getVectorPosPoint(u.verticalLine(r.line), r.line.points.find((function(t) {
- return ~e[0].points.indexOf(t)
- }
- )), o || C))
- }, h = 0; h < a.length; h++)
- c(h);
- return o
- }
- }
- ,
- e.prototype.dragEnd = function() {
- return r(this, void 0, void 0, (function() {
- var t, e, n, g, A, r, C = this;
- return o(this, (function(o) {
- switch (o.label) {
- case 0:
- return delete this.dragStartPoint,
- t = i(4).default,
- (e = this).stopDragEnd || e.dragEnding ? [2] : (e.dragEnding = !0,
- (n = e.__join_lines && e.__join_lines.find((function(e) {
- return !(u.lineDis({
- points: e.points
- }) > .1 || t.attaArch.get(e) && t.attaArch.get(e).length)
- }
- ))) ? [4, n.judgeMerge()] : [3, 4]);
- case 1:
- return (g = o.sent()) ? [4, new Promise((function(t) {
- g.adopt = !1,
- n.nextTick((function() {
- g.nextTick((function() {
- n.destroy(),
- n.destoryPoint(g),
- t()
- }
- ))
- }
- ))
- }
- ))] : [3, 3];
- case 2:
- o.sent(),
- o.label = 3;
- case 3:
- return [3, 8];
- case 4:
- A = this.renderer.processing.lines.map((function(t) {
- return t.ele
- }
- )).filter((function(t) {
- return ~t.points.indexOf(C)
- }
- )),
- r = 0,
- o.label = 5;
- case 5:
- return r < A.length ? [4, A[r].judgePoint()] : [3, 8];
- case 6:
- o.sent(),
- o.label = 7;
- case 7:
- return r++,
- [3, 5];
- case 8:
- return e.dragEnding = !1,
- this.renderer.processing.depLines(),
- [2]
- }
- }
- ))
- }
- ))
- }
- ,
- e.Setting = new Map,
- e
- }(a.default);
- e.default = c
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__assign || function() {
- return (A = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , r = this && this.__rest || function(t, e) {
- var i = {};
- for (var n in t)
- Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
- if (null != t && "function" == typeof Object.getOwnPropertySymbols) {
- var g = 0;
- for (n = Object.getOwnPropertySymbols(t); g < n.length; g++)
- e.indexOf(n[g]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[g]) && (i[n[g]] = t[n[g]])
- }
- return i
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var o = i(2)
- , C = i(1)
- , I = 1
- , s = function(t) {
- function e(i) {
- var n = i.strokeWidth
- , g = void 0 === n ? 0 : n
- , o = i.r
- , C = void 0 === o ? 4 : o
- , I = i.r1
- , s = void 0 === I ? 4 : I
- , a = i.fillColor
- , l = i.storkeColor
- , u = r(i, ["strokeWidth", "r", "r1", "fillColor", "storkeColor"])
- , c = this;
- return a = a || e.Setting.get(u.renderer).fillColor,
- l = l || e.Setting.get(u.renderer).storkeColor,
- (c = t.call(this, A({
- storkeColor: l,
- fillColor: a,
- r: C,
- r1: s,
- strokeWidth: g
- }, u)) || this).init = {
- strokeWidth: g,
- r: C,
- r1: s,
- fillColor: a,
- storkeColor: l
- },
- c.update(),
- c
- }
- return g(e, t),
- e.prototype.grentNode = function() {
- var t = document.createElementNS(C.SVGURI, "ellipse");
- return t.setAttribute("_id", (I++).toString()),
- t
- }
- ,
- e.prototype.update = function() {
- var t = this.r * this.multiple
- , e = this.r1 * this.multiple
- , i = this.strokeWidth * this.multiple;
- try {
- this.real.setAttribute("cx", this.x.toString()),
- this.real.setAttribute("cy", this.y.toString()),
- this.real.setAttribute("fill", this.fillColor),
- this.real.setAttribute("rx", t.toString()),
- this.real.setAttribute("ry", e.toString()),
- this.real.setAttribute("stroke-width", i.toString()),
- this.real.setAttribute("stroke", this.storkeColor)
- } catch (t) {
- console.error(this.x)
- }
- }
- ,
- e.prototype.destroy = function() {
- t.prototype.destroy.call(this)
- }
- ,
- e.fillColor = "rgb(183, 18, 15)",
- e.storkeColor = "green",
- e.Setting = new Map,
- e
- }(o.CADElement);
- e.default = s
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__assign || function() {
- return (A = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , r = this && this.__rest || function(t, e) {
- var i = {};
- for (var n in t)
- Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
- if (null != t && "function" == typeof Object.getOwnPropertySymbols) {
- var g = 0;
- for (n = Object.getOwnPropertySymbols(t); g < n.length; g++)
- e.indexOf(n[g]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[g]) && (i[n[g]] = t[n[g]])
- }
- return i
- }
- , o = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- , C = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var I = i(1)
- , s = C(i(5))
- , a = i(2)
- , l = C(i(4))
- , u = i(3)
- , c = i(0)
- , h = function(t) {
- function e(e) {
- var i = e.points
- , n = e.fill
- , g = void 0 === n ? "rgba(0,0,0,0)" : n
- , o = e.stroke
- , C = void 0 === o ? "rgba(255,255,255,0.5)" : o
- , I = e.width
- , a = void 0 === I ? 1 : I
- , l = e.hover
- , u = r(e, ["points", "fill", "stroke", "width", "hover"])
- , h = this
- , p = [i[0], i[1]]
- , d = i.slice(2).map((function(t) {
- return new s.default(A(A({}, t), {
- renderer: u.renderer
- }))
- }
- ))
- , f = {
- fill: g,
- stroke: C,
- width: a
- };
- return l = l || A(A({}, f), {
- fill: "rgba(243, 255, 0, 0.8)",
- strokeBorder: "rgba(243, 255, 0, 0.8)"
- }),
- (h = t.call(this, A(A({
- linePoints: p,
- hover: l,
- otherPoints: d
- }, f), u)) || this).points = h.linePoints.concat(h.otherPoints),
- h.selectLineIndex = -1,
- h.init = f,
- h.cacheVers = [c.lineVector({
- points: [h.points[1], h.points[2]]
- }), c.lineVector({
- points: [h.points[0], h.points[3]]
- })],
- h.__enterHandle = function() {
- h.hasTriggerEvent() || ~h.selectLineIndex && !h.select || Object.keys(h.hover).forEach((function(t) {
- return h[t] = h.hover[t]
- }
- ))
- }
- ,
- h.__leaveHandle = function() {
- h.hasTriggerEvent() || h.select || Object.keys(h.init).forEach((function(t) {
- return h[t] = h.init[t]
- }
- ))
- }
- ,
- h.__lineEnter = function(t) {
- h.hasTriggerEvent() || ~h.selectLineIndex || h.__draging || (h.selectLineIndex = h.lines.indexOf(t.target),
- h.update())
- }
- ,
- h.__lineLeave = function(t) {
- h.hasTriggerEvent() || h.__draging || (h.selectLineIndex = -1,
- h.update())
- }
- ,
- h.__lineClick = function(t) {
- return t.stopPropagation()
- }
- ,
- h
- }
- return g(e, t),
- e.prototype.updateFirstLinePoints = function() {
- this.firstLinePoints = this.attachment.points.map((function(t) {
- return {
- x: t.x,
- y: t.y
- }
- }
- ))
- }
- ,
- e.prototype.grentNode = function() {
- var t = this
- , e = document.createElementNS(I.SVGURI, "g");
- return this.wrapPath = document.createElementNS(I.SVGURI, "path"),
- this.leftLine = document.createElementNS(I.SVGURI, "path"),
- this.rightLine = document.createElementNS(I.SVGURI, "path"),
- this.bottomLeft = document.createElementNS(I.SVGURI, "path"),
- this.topLine = document.createElementNS(I.SVGURI, "path"),
- this.overLine1 = document.createElementNS(I.SVGURI, "path"),
- this.overLine2 = document.createElementNS(I.SVGURI, "path"),
- this.lines = [this.leftLine, this.rightLine, this.topLine, this.overLine1, this.overLine2, this.bottomLeft],
- this.wrapPath.setAttribute("stroke", "rgba(0,0,0,0)"),
- this.nextTick((function() {
- t.points = t.linePoints.concat(t.otherPoints),
- t.addEvent(),
- t.updateThickness(),
- t.updateFirstLinePoints()
- }
- )),
- e.appendChild(this.overLine1),
- e.appendChild(this.overLine2),
- e.appendChild(this.wrapPath),
- e.appendChild(this.leftLine),
- e.appendChild(this.topLine),
- e.appendChild(this.rightLine),
- e.appendChild(this.bottomLeft),
- e
- }
- ,
- e.prototype.update = function() {
- var t = this;
- if (this.points) {
- var e = this.width * this.multiple;
- this.lines.forEach((function(i) {
- i.setAttribute("stroke-width", e.toString()),
- i.setAttribute("stroke-linecap", "round"),
- i.setAttribute("stroke", t.stroke)
- }
- )),
- u.type.isNumber(this.hoverIndex) ? this.lines[this.hoverIndex].setAttribute("stroke", this.hover.strokeBorder) : (this.wrapPath.setAttribute("stroke-width", "0"),
- this.wrapPath.setAttribute("fill", this.fill),
- this.wrapPath.setAttribute("d", "M " + this.points.map((function(t) {
- return t.x + " " + t.y
- }
- )).join(" L "))),
- isNaN(this.points[0].x) || (this.overLine1.setAttribute("d", "M " + this.points[0].x + " " + this.points[0].y + " L " + this.points[2].x + " " + this.points[2].y),
- this.overLine2.setAttribute("d", "M " + this.points[3].x + " " + this.points[3].y + " L " + this.points[1].x + " " + this.points[1].y),
- this.topLine.setAttribute("d", "M " + this.points[3].x + " " + this.points[3].y + " L " + this.points[2].x + " " + this.points[2].y),
- this.leftLine.setAttribute("d", "M " + this.points[0].x + " " + this.points[0].y + " L " + this.points[3].x + " " + this.points[3].y),
- this.rightLine.setAttribute("d", "M " + this.points[2].x + " " + this.points[2].y + " L " + this.points[1].x + " " + this.points[1].y),
- this.bottomLeft.setAttribute("d", "M " + this.points[0].x + " " + this.points[0].y + " L " + this.points[1].x + " " + this.points[1].y),
- ~this.selectLineIndex && this.lines[this.selectLineIndex].setAttribute("stroke", this.hover.strokeBorder),
- this.attachment.update())
- }
- }
- ,
- e.prototype.hasTriggerEvent = function() {
- return a.CADElement.examples.get(this.renderer).some((function(t) {
- return t.__draging
- }
- ))
- }
- ,
- e.prototype.wallSelect = function() {
- var t = this;
- this.select ? Object.keys(this.hover).forEach((function(e) {
- return t[e] = t.hover[e]
- }
- )) : Object.keys(this.init).forEach((function(e) {
- return t[e] = t.init[e]
- }
- ))
- }
- ,
- e.prototype.addEvent = function() {
- var t = this;
- this.wrapPath.addEventListener("mouseenter", this.__enterHandle, !1),
- this.wrapPath.addEventListener("mouseleave", this.__leaveHandle, !1),
- this.lines.forEach((function(e) {
- e.addEventListener("mouseenter", t.__lineEnter, !1),
- e.addEventListener("mouseleave", t.__lineLeave, !1),
- e.addEventListener("click", t.__lineClick, !1)
- }
- ))
- }
- ,
- e.prototype.updateThickness = function(t) {
- void 0 === t && (t = [this.points[0], this.points[3]]),
- this.thickness = c.lineDis({
- points: t
- })
- }
- ,
- e.prototype.checkPeripheral = function(t) {
- return void 0 === t && (t = this.points),
- !0
- }
- ,
- e.prototype.getPeripheral = function(t) {
- void 0 === t && (t = this.points);
- var e = {
- x: this.firstLinePoints[0].x - this.attachment.points[0].x,
- y: this.firstLinePoints[0].y - this.attachment.points[0].y
- }
- , i = {
- x: this.firstLinePoints[1].x - this.attachment.points[1].x,
- y: this.firstLinePoints[1].y - this.attachment.points[1].y
- }
- , n = e.x || e.y ? e : i
- , g = {
- x: t[3].x + n.x,
- y: t[3].y + n.y
- }
- , A = {
- x: t[2].x + n.x,
- y: t[2].y + n.y
- }
- , r = {
- points: [t[0], t[1]]
- }
- , C = c.getDisVerticalLinePoints(r, t[0], this.thickness).sort((function(t, e) {
- return c.lineDis({
- points: [t, g]
- }) - c.lineDis({
- points: [e, g]
- })
- }
- ))[0]
- , I = c.getDisVerticalLinePoints(r, t[1], this.thickness).sort((function(t, e) {
- return c.lineDis({
- points: [t, A]
- }) - c.lineDis({
- points: [e, A]
- })
- }
- ))[0]
- , s = c.getDisPointLinePoints({
- points: [t[0], C]
- }, t[0], this.thickness)
- , a = s[0]
- , l = s[1];
- C = c.lineDis({
- points: [a, t[3]]
- }) > c.lineDis({
- points: [l, t[3]]
- }) ? l : a;
- var u = c.getDisPointLinePoints({
- points: [t[1], I]
- }, t[1], this.thickness)
- , h = u[0]
- , p = u[1]
- , d = null;
- return c.lineDis({
- points: [h, t[2]]
- }) > c.lineDis({
- points: [p, t[2]]
- }) ? (I = p,
- d = h) : (I = h,
- d = p),
- Math.abs(c.lineDis({
- points: [I, C]
- }) - c.lineDis({
- points: [t[0], t[1]]
- })) > .01 && (I = d),
- (t = o(t))[2] = I,
- t[3] = C,
- this.checkPeripheral(t) ? [I, C] : []
- }
- ,
- e.prototype.updatePeripheral = function(t) {
- void 0 === t && (t = this.points);
- var e = this.getPeripheral(t);
- return this.points[2].x = e[0].x,
- this.points[2].y = e[0].y,
- this.points[3].x = e[1].x,
- this.points[3].y = e[1].y,
- this.readyPoints = t.slice(0, 2).concat(e),
- !0
- }
- ,
- e.prototype.intercept = function(e, i, n) {
- var g, r, C, I, s = i.x, a = i.y;
- if (u.type.isUndefined(s) || u.type.isUndefined(a))
- return !0;
- if (!1 === (g = t.prototype.intercept.call(this, e, {
- x: s,
- y: a
- }, n)))
- return g;
- if (r = this.points.findIndex((function(t) {
- return e.some((function(e) {
- return e === t
- }
- ))
- }
- )),
- I = this.attachment.points.findIndex((function(t) {
- return C = e.find((function(e) {
- return e === t
- }
- ))
- }
- )),
- !~r && C) {
- (h = [])[this.points.indexOf(this.linePoints[0])] = g.__points[0],
- h[this.points.indexOf(this.linePoints[1])] = g.__points[1],
- h.push(this.points[2], this.points[3]),
- this.firstLinePoints[I] = C;
- var l = this.getPeripheral(h);
- if (this.cacheVers = [c.lineVector({
- points: [this.points[1], this.points[2]]
- }), c.lineVector({
- points: [this.points[0], this.points[3]]
- })],
- 0 === l.length)
- return !1
- } else {
- var h = o(this.points);
- if (!~r)
- return g;
- if (h[r] = A({}, n[e.indexOf(h[r])]),
- !(r < 2)) {
- var p, d = void 0, f = void 0, y = void 0, v = void 0, m = void 0;
- 2 === r ? (d = {
- points: [this.points[1], this.points[2]]
- },
- f = {
- points: [this.points[0], this.points[3]]
- },
- p = this.points[2],
- y = 2,
- v = 3,
- m = this.cacheVers[1]) : (f = {
- points: [this.points[1], this.points[2]]
- },
- d = {
- points: [this.points[0], this.points[3]]
- },
- p = this.points[3],
- y = 3,
- v = 2,
- m = d,
- m = this.cacheVers[0]);
- var b = c.lineVector(d);
- if (b.x - m.x < .01 && b.y - m.y < .01) {
- var x = c.getLinePoint(d, {
- x: s,
- y: a
- })
- , _ = c.getLinePoint(f, {
- x: s,
- y: a
- })
- , w = f.points[1].x + s - p.x
- , P = f.points[1].y + a - p.y
- , O = c.getLinePoint(f, {
- x: w,
- y: P
- })
- , S = Math.abs(this.moveLineDis - c.lineDis({
- points: [x, _]
- })) > Math.abs(this.moveLineDis - c.lineDis({
- points: [x, O]
- })) ? O : _;
- h[y] = x,
- h[v] = S
- }
- return this.readyPoints = h,
- !0
- }
- if (!this.updatePeripheral(h))
- return !1
- }
- return g
- }
- ,
- e.prototype.dragStart = function(t) {
- var e = this.lines.indexOf(t.target);
- this.__index = e < 3 ? e : -1,
- this.__startPoints = this.points.map((function(t) {
- return {
- x: t.x,
- y: t.y
- }
- }
- ))
- }
- ,
- e.prototype.drag = function(t) {
- var e = t.x * this.multiple
- , i = t.y * this.multiple
- , n = ~this.__index ? [this.points[this.__index]] : this.linePoints
- , g = ~this.__index ? [this.__startPoints[this.__index]] : this.__startPoints;
- if (this.__index < 2)
- n.forEach((function(t, n) {
- t.x = g[n].x + e,
- t.y = g[n].y + i
- }
- ));
- else {
- var A = c.getLinePoint({
- points: [this.points[0], this.points[3]]
- }, {
- x: this.__startPoints[3].x + e,
- y: this.__startPoints[3].y + i
- })
- , r = c.getLinePoint({
- points: [this.points[1], this.points[2]]
- }, {
- x: this.__startPoints[2].x + e,
- y: this.__startPoints[2].y + i
- });
- this.checkPeripheral(this.points.slice(0, 2).map((function(t) {
- return {
- x: t.x,
- y: t.y
- }
- }
- )).concat([r, A])) && (this.points[3].x = A.x,
- this.points[3].y = A.y,
- this.points[2].x = r.x,
- this.points[2].y = r.y)
- }
- }
- ,
- e.prototype.dragEnd = function() {
- delete this.dragStartPoints,
- delete this.__index,
- this.updateThickness(),
- this.__leaveHandle(),
- this.__lineLeave(),
- t.prototype.dragEnd.call(this)
- }
- ,
- e.prototype.delEvent = function() {
- var t = this;
- this.wrapPath.removeEventListener("mouseenter", this.__enterHandle, !1),
- this.wrapPath.removeEventListener("mouseleave", this.__leaveHandle, !1),
- this.lines.forEach((function(e) {
- e.removeEventListener("mouseenter", t.__lineEnter, !1),
- e.removeEventListener("mouseleave", t.__lineLeave, !1),
- e.removeEventListener("click", t.__lineClick, !1)
- }
- ))
- }
- ,
- e.prototype.destroy = function() {
- this.delEvent(),
- t.prototype.destroy.call(this)
- }
- ,
- e
- }(l.default);
- e.default = h
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__assign || function() {
- return (A = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , r = this && this.__rest || function(t, e) {
- var i = {};
- for (var n in t)
- Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
- if (null != t && "function" == typeof Object.getOwnPropertySymbols) {
- var g = 0;
- for (n = Object.getOwnPropertySymbols(t); g < n.length; g++)
- e.indexOf(n[g]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[g]) && (i[n[g]] = t[n[g]])
- }
- return i
- }
- , o = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- , C = this && this.__importStar || function(t) {
- if (t && t.__esModule)
- return t;
- var e = {};
- if (null != t)
- for (var i in t)
- Object.hasOwnProperty.call(t, i) && (e[i] = t[i]);
- return e.default = t,
- e
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var I = i(1)
- , s = o(i(4))
- , a = i(0)
- , l = {
- defaultIcon: C(i(34)),
- darkIcon: C(i(35))
- }
- , u = function(t) {
- function e(e) {
- var i = e.points
- , n = e.fill
- , g = void 0 === n ? "rgba(0,0,0,0)" : n
- , o = e.icon
- , C = void 0 === o ? "defaultIcon" : o
- , I = e.stroke
- , s = void 0 === I ? "rgba(255,255,255,0.5)" : I
- , a = e.outWidth
- , l = void 0 === a ? 1 : a
- , u = e.foorWidth
- , c = void 0 === u ? 6 : u
- , h = e.linecap
- , p = void 0 === h ? "square" : h
- , d = e.foorColor
- , f = void 0 === d ? "rgba(0,0,0,0)" : d
- , y = e.hover
- , v = e.within
- , m = void 0 === v ? 0 : v
- , b = e.start
- , x = void 0 !== b && b
- , _ = r(e, ["points", "fill", "icon", "stroke", "outWidth", "foorWidth", "linecap", "foorColor", "hover", "within", "start"])
- , w = this
- , P = {
- fill: g,
- stroke: s,
- outWidth: l,
- foorWidth: c,
- foorColor: f,
- linecap: p
- };
- return y = y || A(A({}, P), {
- fill: "rgba(243, 255, 0, 0.8)"
- }),
- (w = t.call(this, A(A({
- linePoints: i,
- hover: y,
- within: m,
- start: x,
- icon: C
- }, P), _)) || this).init = P,
- w.showStart = !0,
- w
- }
- return g(e, t),
- e.prototype.grentNode = function() {
- var t = this
- , e = document.createElementNS(I.SVGURI, "g");
- return this.arc = document.createElementNS(I.SVGURI, "path"),
- this.outLine = document.createElementNS(I.SVGURI, "path"),
- this.image = document.createElementNS(I.SVGURI, "image"),
- e.appendChild(this.outLine),
- e.appendChild(this.arc),
- e.appendChild(this.image),
- this.nextTick((function() {
- t.linePoints && (e.appendChild(t.linePoints[0].real),
- e.appendChild(t.linePoints[1].real))
- }
- )),
- e
- }
- ,
- e.prototype.getCalcPoint = function(t) {
- void 0 === t && (t = a.lineDis({
- points: this.linePoints
- }));
- var e = this.linePoints[0];
- return a.getDisVectorPoints(a.verticalLine(this.attachment), e, t)[0]
- }
- ,
- e.prototype.click = function(e) {
- t.prototype.click.call(this, e),
- console.log(this.within)
- }
- ,
- e.prototype.getDrawArgs = function() {
- var t, e, i, n;
- 0 === this.within || 2 === this.within ? (i = (t = this.linePoints)[0],
- n = t[1]) : (n = (e = this.linePoints)[0],
- i = e[1]);
- var g, A = a.lineDis({
- points: this.linePoints
- }), r = a.getDisVerticalLinePoints(this.attachment, i, A), o = r[0], C = r[1], I = {
- x: 0,
- y: 0
- }, s = a.lineDis({
- points: [o, I]
- }) < a.lineDis({
- points: [C, I]
- });
- return [i, n, g = 0 === this.within || 3 === this.within ? s ? o : C : s ? C : o, A, a.isClockWise([i, n, g])]
- }
- ,
- e.prototype.update = function() {
- this.real.style.display = this.show ? "initial" : "none";
- var t = this.getDrawArgs()
- , e = t[0]
- , i = t[1]
- , n = t[2]
- , g = t[3]
- , A = t[4];
- if (isNaN(n.x))
- this.destroy();
- else if (this.ctl = [n],
- this.arc.setAttribute("d", "M " + e.x + " " + e.y + " L " + n.x + " " + n.y + " A " + g + " " + g + " 0 0 " + (A ? "1" : "0") + " " + i.x + " " + i.y + " Z"),
- this.arc.setAttribute("stroke-width", (this.outWidth * this.multiple).toString()),
- this.arc.setAttribute("stroke", this.stroke),
- this.arc.setAttribute("fill", this.fill),
- this.icon !== this.firstIcon && (this.image.href.baseVal = l[this.icon],
- this.firstIcon = this.icon),
- this.outLine.setAttribute("stroke", this.foorColor),
- this.outLine.setAttribute("fill", this.fill),
- this.outLine.setAttribute("stroke-width", (this.foorWidth * this.multiple).toString()),
- this.outLine.setAttribute("stroke-linecap", this.linecap),
- this.outLine.setAttribute("d", "M " + this.linePoints[0].x + " " + this.linePoints[0].y + " L " + this.linePoints[1].x + " " + this.linePoints[1].y),
- this.attachment.update(),
- this.start && this.showStart) {
- var r = a.lineDis({
- points: this.linePoints
- })
- , o = a.lineStretch({
- points: this.linePoints
- }, r / 2).points
- , C = a.lineDis({
- points: o
- });
- if (isNaN(C))
- return;
- var I = 4 * C
- , s = o[1]
- , u = s === o[1] ? o[0] : o[1]
- , c = a.getDisVerticalLinePoints({
- points: this.linePoints
- }, s, I)
- , h = a.lineDis({
- points: [c[0], n]
- }) > a.lineDis({
- points: [c[1], n]
- }) ? c[0] : c[1]
- , p = a.getDisVerticalLinePoints({
- points: this.linePoints
- }, u, I)
- , d = a.lineDis({
- points: [p[0], n]
- }) > a.lineDis({
- points: [p[1], n]
- }) ? p[0] : p[1]
- , f = a.faceCenter([s, h, d, u])
- , y = a.lineDeg({
- points: [s, h]
- }) + 90;
- this.image.setAttribute("width", C.toString()),
- this.image.setAttribute("height", I.toString()),
- this.image.setAttribute("x", (f.x - C / 2).toString()),
- this.image.setAttribute("y", (f.y - I / 2).toString()),
- this.image.setAttribute("transform", "rotate(" + y + ", " + f.x + ", " + f.y + ")"),
- this.image.style.display = "block"
- } else
- this.image.style.display = "none"
- }
- ,
- e.prototype.dragStart = function(t) {
- this.__index = t.target === this.linePoints[0].real ? 0 : t.target === this.linePoints[1].real ? 1 : -1,
- this.__startPoints = this.linePoints.map((function(t) {
- return {
- x: t.x,
- y: t.y
- }
- }
- ))
- }
- ,
- e.prototype.drag = function(t) {
- var e = this
- , i = ~this.__index ? [this.linePoints[this.__index]] : this.linePoints
- , n = ~this.__index ? [this.__startPoints[this.__index]] : this.__startPoints;
- i.forEach((function(i, g) {
- i.x = n[g].x + t.x * e.multiple,
- i.y = n[g].y + t.y * e.multiple
- }
- ))
- }
- ,
- e.prototype.dragEnd = function() {
- delete this.dragStartPoints,
- delete this.__index,
- t.prototype.dragEnd.call(this)
- }
- ,
- e.prototype.setHoverStyle = function() {
- var t = this;
- Object.keys(this.hover).forEach((function(e) {
- return t[e] = t.hover[e]
- }
- ))
- }
- ,
- e.prototype.setUnHoverStyle = function() {
- var t = this;
- Object.keys(this.init).forEach((function(e) {
- return t[e] = t.init[e]
- }
- ))
- }
- ,
- e
- }(s.default);
- e.default = u
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var g = n(i(30))
- , A = {
- t: function(t, e) {
- for (var i = t.split("."), n = g.default; i.length; )
- n = n[i.shift()];
- return n
- }
- };
- e.i18n = A
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__assign || function() {
- return (A = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , r = this && this.__rest || function(t, e) {
- var i = {};
- for (var n in t)
- Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
- if (null != t && "function" == typeof Object.getOwnPropertySymbols) {
- var g = 0;
- for (n = Object.getOwnPropertySymbols(t); g < n.length; g++)
- e.indexOf(n[g]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[g]) && (i[n[g]] = t[n[g]])
- }
- return i
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var o = i(2)
- , C = i(1)
- , I = function(t) {
- function e(i) {
- var n = i.color
- , g = i.width
- , o = i.showAngle
- , C = void 0 !== o && o
- , I = i.linecap
- , s = void 0 === I ? "square" : I
- , a = r(i, ["color", "width", "showAngle", "linecap"])
- , l = this;
- return g = g || e.Setting.get(a.renderer).width,
- n = n || e.Setting.get(a.renderer).color,
- (l = t.call(this, A({
- color: n,
- width: g,
- linecap: s,
- showAngle: C
- }, a)) || this).init = {
- color: n,
- width: g,
- linecap: s
- },
- l
- }
- return g(e, t),
- e.prototype.intercept = function(t, e, i) {
- return !0
- }
- ,
- e.prototype.grentNode = function() {
- return document.createElementNS(C.SVGURI, "path")
- }
- ,
- e.prototype.update = function() {
- var t = this.width * this.multiple;
- this.real.setAttribute("stroke", this.color),
- this.real.setAttribute("stroke-width", t.toString()),
- this.real.setAttribute("stroke-linecap", this.linecap),
- this.real.setAttribute("d", "M " + this.points[0].x + " " + this.points[0].y + " L " + this.points[1].x + " " + this.points[1].y)
- }
- ,
- e.Setting = new Map,
- e
- }(o.CADElement);
- e.default = I
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__assign || function() {
- return (A = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , r = this && this.__rest || function(t, e) {
- var i = {};
- for (var n in t)
- Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
- if (null != t && "function" == typeof Object.getOwnPropertySymbols) {
- var g = 0;
- for (n = Object.getOwnPropertySymbols(t); g < n.length; g++)
- e.indexOf(n[g]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[g]) && (i[n[g]] = t[n[g]])
- }
- return i
- }
- , o = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var C = o(i(12))
- , I = i(1)
- , s = o(i(4))
- , a = i(0)
- , l = function(t) {
- function e(e) {
- var i = e.points
- , n = e.fill
- , g = void 0 === n ? "rgba(0,0,0,0)" : n
- , o = e.seam
- , C = void 0 === o ? "rgba(255,255,255,0)" : o
- , I = e.bgColor
- , s = void 0 === I ? "rgba(255,255,255,0.5)" : I
- , a = e.width
- , l = void 0 === a ? 6 : a
- , u = e.stamWidth
- , c = void 0 === u ? .5 : u
- , h = e.hover
- , p = r(e, ["points", "fill", "seam", "bgColor", "width", "stamWidth", "hover"])
- , d = this
- , f = {
- fill: g,
- seam: C,
- width: l,
- stamWidth: c
- };
- return h = h || A(A({}, f), {
- fill: "rgba(243, 255, 0, 0.8)"
- }),
- (d = t.call(this, A(A({
- linePoints: i,
- bgColor: s,
- hover: h
- }, p), f)) || this).eleHover = !1,
- d
- }
- return g(e, t),
- e.prototype.grentNode = function() {
- var t = this
- , e = document.createElementNS(I.SVGURI, "g");
- return this.nextTick((function() {
- t.outLine = new C.default({
- points: t.linePoints,
- width: t.width,
- color: t.fill,
- renderer: t.renderer
- }),
- t.innerline = new C.default({
- points: t.linePoints,
- width: t.stamWidth,
- color: t.seam,
- renderer: t.renderer
- }),
- t.outLine.click = t.innerline.click = function() {
- return t.changeSelect(!0)
- }
- ,
- e.appendChild(t.outLine.real),
- e.appendChild(t.innerline.real),
- e.appendChild(t.linePoints[0].real),
- e.appendChild(t.linePoints[1].real),
- t.interceptUpdateStyle(),
- t.outLine.update(),
- t.innerline.update()
- }
- )),
- this.clip1 = document.createElementNS(I.SVGURI, "path"),
- this.clip2 = document.createElementNS(I.SVGURI, "path"),
- this.clip3 = document.createElementNS(I.SVGURI, "path"),
- this.clip4 = document.createElementNS(I.SVGURI, "path"),
- e.appendChild(this.clip1),
- e.appendChild(this.clip2),
- e.appendChild(this.clip3),
- e.appendChild(this.clip4),
- e
- }
- ,
- e.prototype.getStyle = function() {
- return this.eleHover || this.select ? this.hover : {
- width: this.width,
- fill: this.fill,
- seam: this.seam,
- stamWidth: this.stamWidth
- }
- }
- ,
- e.prototype.interceptUpdateStyle = function() {
- var t = this
- , e = this.outLine.intercept
- , i = this.innerline.intercept;
- this.outLine.intercept = function(i, n) {
- var g = i[0]
- , A = n.width
- , r = n.color;
- if (g === t.outLine && (A || r)) {
- var o = t.getStyle();
- return {
- width: o.width,
- color: o.fill
- }
- }
- return e.call(t)
- }
- ,
- this.innerline.intercept = function(e, n) {
- var g = e[0]
- , A = n.width
- , r = n.color;
- if (g === t.innerline && (A || r)) {
- var o = t.getStyle();
- return {
- width: o.stamWidth,
- color: o.seam
- }
- }
- return i.call(t)
- }
- }
- ,
- e.prototype.update = function() {
- this.outLine && (this.outLine.width = this.outLine.width + 1e-8,
- this.innerline.width = this.innerline.width + 1e-8);
- var t = a.getDisVerticalLinePoints(this.attachment, this.linePoints[0], .4 * this.width * this.multiple)
- , e = t[0]
- , i = t[1]
- , n = a.getDisVerticalLinePoints(this.attachment, this.linePoints[1], .4 * this.width * this.multiple)
- , g = n[0]
- , A = n[1]
- , r = a.getDisVerticalLinePoints(this.attachment, this.linePoints[0], .1 * this.width * this.multiple)
- , o = r[0]
- , C = r[1]
- , I = a.getDisVerticalLinePoints(this.attachment, this.linePoints[1], .1 * this.width * this.multiple)
- , s = I[0]
- , l = I[1];
- isNaN(e.x) || (this.clip1.setAttribute("stroke-width", this.multiple.toString()),
- this.clip1.setAttribute("d", "M " + e.x + " " + e.y + " L " + g.x + " " + g.y),
- this.clip2.setAttribute("stroke-width", this.multiple.toString()),
- this.clip2.setAttribute("d", "M " + i.x + " " + i.y + " L " + A.x + " " + A.y),
- this.clip3.setAttribute("stroke-width", this.multiple.toString()),
- this.clip3.setAttribute("d", "M " + o.x + " " + o.y + " L " + s.x + " " + s.y),
- this.clip4.setAttribute("stroke-width", this.multiple.toString()),
- this.clip4.setAttribute("d", "M " + C.x + " " + C.y + " L " + l.x + " " + l.y),
- this.clip1.setAttribute("stroke", this.bgColor),
- this.clip2.setAttribute("stroke", this.bgColor),
- this.clip3.setAttribute("stroke", this.bgColor),
- this.clip4.setAttribute("stroke", this.bgColor),
- this.attachment.update())
- }
- ,
- e.prototype.wallSelect = function() {
- this.update && this.update()
- }
- ,
- e.prototype.enter = function() {
- this.eleHover = !0,
- this.update()
- }
- ,
- e.prototype.leave = function() {
- this.eleHover = !1,
- this.update()
- }
- ,
- e.prototype.drag = function(t) {}
- ,
- e
- }(s.default);
- e.default = l
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__assign || function() {
- return (A = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , r = this && this.__rest || function(t, e) {
- var i = {};
- for (var n in t)
- Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
- if (null != t && "function" == typeof Object.getOwnPropertySymbols) {
- var g = 0;
- for (n = Object.getOwnPropertySymbols(t); g < n.length; g++)
- e.indexOf(n[g]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[g]) && (i[n[g]] = t[n[g]])
- }
- return i
- }
- , o = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var C = function(t) {
- function e(e) {
- var i = e.hover
- , n = e.color
- , g = void 0 === n ? "#fff" : n
- , o = e.width
- , C = void 0 === o ? 3 : o
- , I = e.linecap
- , s = r(e, ["hover", "color", "width", "linecap"])
- , a = this
- , l = {
- color: g,
- width: C,
- linecap: I
- };
- return i = i || A(A({}, l), {
- color: "rgba(243, 255, 0, 0.8)"
- }),
- (a = t.call(this, A({
- width: C,
- color: g
- }, s)) || this).hover = i,
- a.init = l,
- a.disable = !1,
- a.real.setAttribute("class", "variable"),
- a
- }
- return g(e, t),
- e.prototype.setHoverStyle = function() {
- var t = this;
- console.log(this.hover),
- Object.keys(this.hover).forEach((function(e) {
- return t[e] = t.hover[e]
- }
- ))
- }
- ,
- e.prototype.setUnHoverStyle = function() {
- var t = this;
- Object.keys(this.init).forEach((function(e) {
- return t[e] = t.init[e]
- }
- ))
- }
- ,
- e.prototype.dragStart = function() {
- this.dragStartPoints = this.points.map((function(t) {
- return {
- x: t.x,
- y: t.y
- }
- }
- ))
- }
- ,
- e.prototype.drag = function(t) {
- var e = this;
- if (this.disable)
- return !1;
- this.points.forEach((function(i, n) {
- i.x = e.dragStartPoints[n].x + t.x * e.multiple,
- i.y = e.dragStartPoints[n].y + t.y * e.multiple
- }
- ))
- }
- ,
- e.prototype.dragEnd = function() {
- delete this.dragStartPoints
- }
- ,
- e
- }(o(i(10)).default);
- e.default = C
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__assign || function() {
- return (A = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , r = this && this.__rest || function(t, e) {
- var i = {};
- for (var n in t)
- Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
- if (null != t && "function" == typeof Object.getOwnPropertySymbols) {
- var g = 0;
- for (n = Object.getOwnPropertySymbols(t); g < n.length; g++)
- e.indexOf(n[g]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[g]) && (i[n[g]] = t[n[g]])
- }
- return i
- }
- , o = (this && this.__spreadArrays,
- this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- );
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var C = i(2)
- , I = o(i(5))
- , s = i(0)
- , a = i(3)
- , l = i(1)
- , u = o(i(12))
- , c = function(t) {
- function e(e) {
- var i = e.minWidth
- , n = void 0 === i ? .1 : i
- , g = e.points
- , o = e.renderer
- , C = e.top
- , a = e.bottom
- , l = e.angle
- , c = void 0 === l ? 0 : l
- , h = e.stroke
- , p = void 0 === h ? "rgba(255,255,255,0.5)" : h
- , d = e.width
- , f = void 0 === d ? 1 : d
- , y = r(e, ["minWidth", "points", "renderer", "top", "bottom", "angle", "stroke", "width"])
- , v = this
- , m = g.map((function(t) {
- return new I.default(A(A({}, t), {
- renderer: o
- }))
- }
- ))
- , b = m.map((function(t, e) {
- return new u.default({
- points: [m[e], m[e === m.length - 1 ? 0 : e + 1]],
- renderer: o,
- width: f,
- color: p
- })
- }
- ));
- (v = t.call(this, A(A({}, y), {
- points: m,
- lines: b,
- renderer: o,
- angle: c,
- stroke: p,
- width: f,
- fill: "rgba(0,0,0,0)"
- })) || this).paths = b,
- v.points = m,
- v.zIndex = 1,
- v.minWidth = n,
- v.stop = !0;
- var x = [];
- return Object.defineProperty(v, "movePoints", {
- get: function() {
- return x
- },
- set: function(t) {
- x = t,
- t && t.length >= 2 ? this.moveLineDis = s.lineDis({
- points: x
- }) : delete this.moveLineDis
- }
- }),
- v.real.setAttribute("class", "variable"),
- Object.defineProperty(v, "top", {
- get: function() {
- return C
- },
- set: function(t) {
- C = t,
- this.wallPos && this.wallPos()
- }
- }),
- Object.defineProperty(v, "bottom", {
- get: function() {
- return a
- },
- set: function(t) {
- a = t,
- this.wallPos && this.wallPos()
- }
- }),
- v
- }
- return g(e, t),
- e.prototype.setHoverStyle = function() {
- this.fill = "rgba(243, 255, 0, 0.8)"
- }
- ,
- e.prototype.setUnHoverStyle = function() {
- this.fill = "rgba(243, 255, 0, 0)"
- }
- ,
- e.prototype.rotate = function(t) {
- var e = this;
- if (t === this.angle)
- return !1;
- var i = s.faceRotate(this.points, t - this.angle);
- return !!this.check(i) && (this.stop = !1,
- this.points.forEach((function(t, e) {
- t.x = i[e].x,
- t.y = i[e].y
- }
- )),
- this.nextTick((function() {
- return e.stop = !0
- }
- )),
- !0)
- }
- ,
- e.prototype.grentNode = function() {
- var t = this
- , e = document.createElementNS(l.SVGURI, "g");
- return this.wrapPath = document.createElementNS(l.SVGURI, "path"),
- e.appendChild(this.wrapPath),
- this.nextTick((function() {
- t.lines.forEach((function(i) {
- i.changeSelect = function(e) {
- e && t.changeSelect(e)
- }
- ,
- i.update(),
- e.appendChild(i.real)
- }
- ))
- }
- )),
- e
- }
- ,
- e.prototype.update = function() {
- var t = this;
- this.wrapPath && (this.wrapPath.setAttribute("stroke-width", (this.width * this.multiple).toString()),
- this.wrapPath.setAttribute("d", "M " + this.points.map((function(t) {
- return t.x + " " + t.y
- }
- )).join(" L ") + " z"),
- this.wrapPath.setAttribute("fill", this.fill),
- this.wrapPath.setAttribute("stroke", this.stroke)),
- this.lines.forEach((function(e) {
- e.real.setAttribute("stroke", t.stroke)
- }
- ))
- }
- ,
- e.prototype.checkWidth = function(t) {
- var e = this;
- return void 0 === t && (t = this.points),
- !t.some((function(i, n) {
- var g = t[n === t.length - 1 ? 0 : n + 1];
- return s.lineDis({
- points: [i, g]
- }) <= e.minWidth
- }
- ))
- }
- ,
- e.prototype.qualified = function(t, e) {
- void 0 === t && (t = this.points),
- void 0 === e && (e = this.room);
- var i = this.renderer.processing.getRoomEles(e);
- return !!s.isFaceContain(i.ground, t) && !i.hole.some((function(e) {
- return s.isFaceIntersect(e, t) || s.isFaceContain(e, t) || s.isFaceContain(t, e)
- }
- ))
- }
- ,
- e.prototype.check = function(t) {
- return void 0 === t && (t = this.points),
- this.checkWidth(t)
- }
- ,
- e.prototype.intercept = function(t, e, i) {
- e.x,
- e.y;
- var n = e.angle;
- return !a.type.isNumber(n) || this.rotate(n)
- }
- ,
- e.prototype.directUpdate = function(t) {
- var e = this;
- t.forEach((function(t, i) {
- e.points[i].__state.direct = !0,
- e.points[i].x = t.x,
- e.points[i].y = t.y,
- e.points[i].__state.direct = !1,
- e.points[i].update()
- }
- )),
- this.lines.forEach((function(t) {
- t.update()
- }
- )),
- this.update(),
- this.wallPos && this.wallPos(),
- this.fromAsync && this.fromAsync()
- }
- ,
- e.prototype.dragStart = function(t) {
- if (this.lines.some((function(e) {
- return e.real === t.target
- }
- ))) {
- var e = this.lines.find((function(e) {
- return e.real === t.target
- }
- ));
- this.moveLineDis = s.lineDis(e)
- } else
- this.initPoints = this.points.map((function(t) {
- return {
- x: t.x,
- y: t.y
- }
- }
- ))
- }
- ,
- e.prototype.drag = function(t) {
- var e = this;
- if (this.initPoints) {
- this.stop = !1;
- var i = this.points.map((function(i, n) {
- return {
- x: e.initPoints[n].x + t.x * e.multiple,
- y: e.initPoints[n].y + t.y * e.multiple
- }
- }
- ));
- setTimeout((function() {
- e.directUpdate(i)
- }
- ))
- }
- }
- ,
- e.prototype.dragEnd = function() {
- var t = this;
- this.nextTick((function() {
- t.stop = !0,
- delete t.moveLineDis
- }
- )),
- delete this.initPoints
- }
- ,
- e.prototype.destroy = function() {
- this.points.forEach((function(t) {
- return t.destroy()
- }
- )),
- this.room = null,
- this.points = null,
- this.update = null,
- t.prototype.destroy.call(this)
- }
- ,
- e
- }(C.CADElement);
- e.default = c
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__assign || function() {
- return (A = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , r = this && this.__awaiter || function(t, e, i, n) {
- return new (i || (i = Promise))((function(g, A) {
- function r(t) {
- try {
- C(n.next(t))
- } catch (t) {
- A(t)
- }
- }
- function o(t) {
- try {
- C(n.throw(t))
- } catch (t) {
- A(t)
- }
- }
- function C(t) {
- var e;
- t.done ? g(t.value) : (e = t.value,
- e instanceof i ? e : new i((function(t) {
- t(e)
- }
- ))).then(r, o)
- }
- C((n = n.apply(t, e || [])).next())
- }
- ))
- }
- , o = this && this.__generator || function(t, e) {
- var i, n, g, A, r = {
- label: 0,
- sent: function() {
- if (1 & g[0])
- throw g[1];
- return g[1]
- },
- trys: [],
- ops: []
- };
- return A = {
- next: o(0),
- throw: o(1),
- return: o(2)
- },
- "function" == typeof Symbol && (A[Symbol.iterator] = function() {
- return this
- }
- ),
- A;
- function o(A) {
- return function(o) {
- return function(A) {
- if (i)
- throw new TypeError("Generator is already executing.");
- for (; r; )
- try {
- if (i = 1,
- n && (g = 2 & A[0] ? n.return : A[0] ? n.throw || ((g = n.return) && g.call(n),
- 0) : n.next) && !(g = g.call(n, A[1])).done)
- return g;
- switch (n = 0,
- g && (A = [2 & A[0], g.value]),
- A[0]) {
- case 0:
- case 1:
- g = A;
- break;
- case 4:
- return r.label++,
- {
- value: A[1],
- done: !1
- };
- case 5:
- r.label++,
- n = A[1],
- A = [0];
- continue;
- case 7:
- A = r.ops.pop(),
- r.trys.pop();
- continue;
- default:
- if (!(g = (g = r.trys).length > 0 && g[g.length - 1]) && (6 === A[0] || 2 === A[0])) {
- r = 0;
- continue
- }
- if (3 === A[0] && (!g || A[1] > g[0] && A[1] < g[3])) {
- r.label = A[1];
- break
- }
- if (6 === A[0] && r.label < g[1]) {
- r.label = g[1],
- g = A;
- break
- }
- if (g && r.label < g[2]) {
- r.label = g[2],
- r.ops.push(A);
- break
- }
- g[2] && r.ops.pop(),
- r.trys.pop();
- continue
- }
- A = e.call(t, r)
- } catch (t) {
- A = [6, t],
- n = 0
- } finally {
- i = g = 0
- }
- if (5 & A[0])
- throw A[1];
- return {
- value: A[0] ? A[1] : void 0,
- done: !0
- }
- }([A, o])
- }
- }
- }
- , C = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- , I = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var s = I(i(33))
- , a = I(i(4))
- , l = I(i(7))
- , u = i(1)
- , c = i(0)
- , h = function(t) {
- function e() {
- return null !== t && t.apply(this, arguments) || this
- }
- return g(e, t),
- e.prototype.setHoverStyle = function() {
- this.color = this.hover.color,
- this.width = this.hover.width,
- this.linecap = this.hover.linecap
- }
- ,
- e.prototype.setUnHoverStyle = function() {
- this.color = this.init.color,
- this.width = this.init.width,
- this.linecap = this.init.linecap
- }
- ,
- e.prototype.dragStart = function() {
- this.clones = [],
- this.bkpoints = this.points.map((function(t) {
- return {
- x: t.x,
- y: t.y
- }
- }
- )),
- this.startPoint = this.renderer.screenToRealPoint({
- x: 0,
- y: 0
- }),
- this.bkverctor = c.lineVector(this)
- }
- ,
- e.prototype.drag = function(t) {
- var e = this.renderer.screenToRealPoint(t);
- this.exterior || this.changePos({
- x: e.x - this.startPoint.x,
- y: e.y - this.startPoint.y
- })
- }
- ,
- e.prototype.dragEnd = function() {
- return r(this, void 0, void 0, (function() {
- var t, e = this;
- return o(this, (function(i) {
- return (t = this.renderer.processing).lines.forEach((function(t) {
- t.ele.__state.direct = !1
- }
- )),
- t.points.forEach((function(t) {
- t.ele.__state.direct = !1
- }
- )),
- setTimeout((function() {
- e.renderer.processing.depLines()
- }
- ), 500),
- [2]
- }
- ))
- }
- ))
- }
- ,
- e.prototype.directUpdate = function(t) {
- this.__state.direct = !0;
- var e = C(this.points);
- e.forEach((function(t) {
- return t.__state.direct = !0
- }
- )),
- t(),
- (e = Array.from(new Set(e.concat(this.points)))).forEach((function(t) {
- return t.__state.direct = !1
- }
- )),
- this.__state.direct = !1,
- e.concat(e).forEach((function(t) {
- return t.update()
- }
- )),
- this.wallLines.filter((function(t) {
- return t.points.some((function(t) {
- return ~e.indexOf(t)
- }
- ))
- }
- )).forEach((function(t) {
- t.update(),
- t.points[0].wallPos && t.points[0].wallPos(),
- t.points[1].wallPos && t.points[1].wallPos(),
- t.wallPos && t.wallPos(),
- t.fromAsync && t.fromAsync(),
- t.updateJoin()
- }
- ))
- }
- ,
- e.prototype.grentNewJoinLine = function(t, e) {
- var i, n = this, g = this.renderer.processing, r = g.points.find((function(e) {
- return e.ele === t
- }
- )), o = g.lines.find((function(t) {
- return t.ele === n
- }
- )), I = g.addPoint(A({
- id: Math.max.apply(Math, g.points.map((function(t) {
- return t.id
- }
- ))) + 1
- }, e));
- g.data.vertex.push({
- id: I.id,
- x: e.x,
- y: e.y
- });
- var s = o.ele
- , a = C(s.points);
- return a[s.points.indexOf(t)] = I.ele,
- s.directUpdate((function() {
- s.points = a,
- s.listenPointDrag(a)
- }
- )),
- s.update(),
- i = g.cad.increase(u.SEFTLINE, {
- id: g.getNewLineId(),
- p1: I.id,
- p2: r.id,
- isOut: s.isOut,
- border: s.border,
- exterior: s.exterior
- }).obj,
- this.wallLines.filter((function(t) {
- return ~t.points.indexOf(n.points[0]) || ~t.points.indexOf(n.points[1])
- }
- )).forEach((function(t) {
- t.update(),
- t.points[0].wallPos && t.points[0].wallPos(),
- t.points[1].wallPos && t.points[1].wallPos(),
- t.wallPos && t.wallPos(),
- t.fromAsync && t.fromAsync()
- }
- )),
- i
- }
- ,
- e.prototype.getPointJoinLines = function(t) {
- for (var e = this, i = this.wallLines.filter((function(i) {
- return ~i.points.indexOf(t) && !(~e.points.indexOf(i.points[0]) && ~e.points.indexOf(i.points[1]))
- }
- )), n = [], g = function(t) {
- n.some((function(e) {
- return ~e.points.indexOf(i[t].points[0]) && ~e.points.indexOf(i[t].points[1])
- }
- )) || n.push(i[t])
- }, A = 0; A < i.length; A++)
- g(A);
- return n
- }
- ,
- e.prototype.updatePoint = function(t, e, i) {
- var n = this.getPointJoinLines(t)
- , g = n[0]
- , r = c.lineVector(this)
- , o = Number(!this.points.indexOf(t))
- , C = this.points[o]
- , I = !1;
- if (g) {
- var s = c.lineVector(g) || g.lineVerctor
- , a = !1;
- isNaN(s.x) && !isNaN(r.x) && (I = !0);
- var l = this.points.indexOf(t)
- , u = n.every((function(t) {
- var e = c.lineVector(t);
- return Math.abs(Math.abs(e.x) - Math.abs(s.x)) < .2 && Math.abs(Math.abs(e.y) - Math.abs(s.y)) < .2
- }
- ))
- , h = Math.abs(Math.abs(s.x) - Math.abs(r.x)) < .2 && Math.abs(Math.abs(s.y) - Math.abs(r.y)) < .2 || n.length > 1 && !u;
- if (!~this.clones.indexOf(l) && (h || I)) {
- if (!I && n.length > 1)
- g = n.find((function(t) {
- var e = c.lineVector(t);
- return e.x - r.x < .1 && e.y - r.y < .1
- }
- )) || n.find((function(t) {
- var e = c.lineVector(t)
- , i = Math.abs(e.x - r.x)
- , n = Math.abs(e.y - r.y);
- return i > .1 && i < .9 || n > .1 && n < .9
- }
- )) || n[0],
- s = g.lineVector || c.lineVector(g);
- var p = A({}, e);
- Math.abs(r.x) > Math.abs(r.y) ? p.x = t.x : p.y = t.y,
- I && (e = p),
- p.x === t.x && p.y === t.y || (g = this.grentNewJoinLine(t, p.x === t.x && p.y === t.y ? e : p),
- a = !0,
- this.clones.push(l),
- t = g.points[Number(!g.points.indexOf(t))],
- s = c.lineVector(g),
- g.lineVerctor = s)
- }
- if (e = c.getVectorPosPoint(s, g.points[0], e),
- g.lineVector = s,
- !a && i && !I && (Math.abs(Math.abs(s.x) - Math.abs(r.x)) < .9 || Math.abs(Math.abs(s.y) - Math.abs(r.y)) < .9)) {
- var d = c.segmentsIntrFine(g, {
- points: [C, {
- x: C.x + 1e4 * this.bkverctor.x,
- y: C.y + 1e4 * this.bkverctor.y
- }]
- });
- d && (e = d)
- }
- } else {
- if (this.getPointJoinLines(C).length) {
- var f = this.points.indexOf(t);
- e = {
- x: this.bkpoints[f].x + this.points[o].x - this.bkpoints[o].x,
- y: this.bkpoints[f].y + this.points[o].y - this.bkpoints[o].y
- }
- }
- g = this
- }
- var y = c.lineVector({
- points: [C, e]
- });
- return !(isNaN(e.x) || isNaN(e.y) || i && (Math.abs(Math.abs(this.bkverctor.x) - Math.abs(y.x)) > .05 || Math.abs(Math.abs(this.bkverctor.y) - Math.abs(y.y)) > .05)) && (t.__state.direct = !0,
- t.x = e.x,
- t.y = e.y,
- t.update(),
- t.__state.direct = !1,
- g)
- }
- ,
- e.prototype.getVerPos = function(t) {
- var e = c.verticalLine(this);
- if (0 === e.x)
- return {
- x: 0,
- y: t.y
- };
- if (0 === e.y)
- return {
- x: t.x,
- y: 0
- };
- var i = {
- points: [{
- x: -100 * e.x,
- y: -100 * e.y
- }, {
- x: 100 * e.x,
- y: 100 * e.y
- }]
- }
- , n = c.pointLineDis(i, t)
- , g = Math.sqrt(Math.pow(t.x, 2) + Math.pow(t.y, 2) - Math.pow(n, 2))
- , A = c.getDisPointLinePoints(i, {
- x: 0,
- y: 0
- }, g)
- , r = A[0]
- , o = A[1];
- return c.lineDis({
- points: [r, t]
- }) > c.lineDis({
- points: [o, t]
- }) ? o : r
- }
- ,
- e.prototype.checkJoinArch = function() {
- var t = a.default.attaArch.get(this);
- if (!t || 0 === t.length)
- return !1;
- var e = t.map((function(t) {
- return [t.linePoints[0].getLineInsertPoint(), t.linePoints[1].getLineInsertPoint()]
- }
- ));
- return t.some((function(t, i) {
- return !(e[i][0] && e[i][1] && t.qualified(e[i])) || t instanceof l.default && 0 === t.getPeripheral(e[i].concat(t.points.slice(2))).length
- }
- ))
- }
- ,
- e.prototype.updateArchs = function() {
- var t = a.default.attaArch.get(this);
- if (t && 0 !== t.length) {
- var e = t.map((function(t) {
- return t.lineChange().points
- }
- ));
- t.forEach((function(t, i) {
- if (t.__state.direct = !0,
- t.linePoints[0].__state.direct = !0,
- t.linePoints[1].__state.direct = !0,
- t.linePoints[0].x = e[i][0].x,
- t.linePoints[0].y = e[i][0].y,
- t.linePoints[1].x = e[i][1].x,
- t.linePoints[1].y = e[i][1].y,
- t.linePoints[0].update(),
- t.linePoints[1].update(),
- t.linePoints[0].__state.direct = !1,
- t.linePoints[1].__state.direct = !1,
- t instanceof l.default) {
- var n = t.getPeripheral();
- t.points[2].__state.direct = !0,
- t.points[3].__state.direct = !0,
- t.points[2].x = n[0].x,
- t.points[2].y = n[0].y,
- t.points[3].x = n[1].x,
- t.points[3].y = n[1].y,
- t.points[2].update(),
- t.points[3].update(),
- t.points[2].__state.direct = !1,
- t.points[3].__state.direct = !1
- }
- t.__state.direct = !1,
- t.dragEnd(),
- t.update()
- }
- ))
- }
- }
- ,
- e.prototype.changePos = function(t) {
- var e = this;
- 0 === t.x && 0 === t.y || (t = this.getVerPos(t)),
- this.directUpdate((function() {
- e.points.map((function(t) {
- return {
- x: t.x,
- y: t.y
- }
- }
- ));
- var i = [0, 1]
- , n = e.getPointJoinLines(e.points[0])
- , g = e.getPointJoinLines(e.points[1])
- , A = (e.points.map((function(t) {
- return {
- x: t.x,
- y: t.y
- }
- }
- )),
- !0);
- if (0 === n.length)
- i = [1, 0];
- else if (0 !== g.length) {
- i = c.getPointCoordDistance(e.bkverctor, c.lineVector(n[0])) > c.getPointCoordDistance(e.bkverctor, c.lineVector(g[0])) ? [0, 1] : [1, 0]
- }
- i.forEach((function(i, n) {
- A && (e.updatePoint(e.points[i], {
- x: e.bkpoints[i].x + t.x,
- y: e.bkpoints[i].y + t.y
- }, !!n) || (A = !1))
- }
- )),
- e.renderer.processing.lines.filter((function(t) {
- return ~t.ele.points.indexOf(e.points[0]) || ~t.ele.points.indexOf(e.points[1])
- }
- )).forEach((function(t) {
- t.ele.updateArchs()
- }
- ))
- }
- ))
- }
- ,
- e.prototype.correct = function() {
- for (var t = this.renderer.processing, e = t.points.map((function(t) {
- return t.ele
- }
- )), i = t.lines.map((function(t) {
- return t.ele
- }
- )), n = i.filter((function(t) {
- return ~e.indexOf(t.points[0]) || ~e.indexOf(t.points[1])
- }
- )), g = function(t, e, i) {
- return ~t.points.indexOf(e) && ~t.points.indexOf(i)
- }, A = function(A) {
- var o = i[A]
- , I = e.find((function(t) {
- return !~o.points.indexOf(t) && (c.lineDis({
- points: [o.points[0], t]
- }) < .02 || c.lineDis({
- points: [o.points[1], t]
- }) < .02)
- }
- ));
- if (!I)
- return "continue";
- var s = 0;
- if (i.some((function(t) {
- return g(t, I, o.points[0])
- }
- )))
- s = 0;
- else {
- if (!i.some((function(t) {
- return g(t, I, o.points[1])
- }
- )))
- return "continue";
- s = 1
- }
- var a = o.points[s];
- return n.filter((function(t) {
- return ~t.points.indexOf(a)
- }
- )).forEach((function(t) {
- var e = t.points.indexOf(a)
- , i = t.points
- , n = C(i);
- n[e] = I,
- t.directUpdate((function() {
- t.points = n,
- t.listenPointDrag(n)
- }
- ))
- }
- )),
- n.filter((function(t) {
- return ~t.points.indexOf(I) && ~t.points.indexOf(a)
- }
- )).forEach((function(e) {
- t.lines.splice(t.lines.findIndex((function(t) {
- return t.ele === e
- }
- )), 1),
- e.destroy()
- }
- )),
- a.destroy(),
- {
- value: r.correct()
- }
- }, r = this, o = 0; o < i.length; o++) {
- var I = A(o);
- if ("object" == typeof I)
- return I.value
- }
- }
- ,
- e
- }(s.default);
- e.default = h
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__assign || function() {
- return (A = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , r = this && this.__rest || function(t, e) {
- var i = {};
- for (var n in t)
- Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
- if (null != t && "function" == typeof Object.getOwnPropertySymbols) {
- var g = 0;
- for (n = Object.getOwnPropertySymbols(t); g < n.length; g++)
- e.indexOf(n[g]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[g]) && (i[n[g]] = t[n[g]])
- }
- return i
- }
- , o = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var C = o(i(8))
- , I = i(1)
- , s = i(0)
- , a = function(t) {
- function e(e) {
- var i = e.points
- , n = e.foorWidth
- , g = void 0 === n ? 6 : n
- , o = e.foorColor
- , C = void 0 === o ? "rgba(255,255,255,0.5)" : o
- , I = e.clipColor
- , s = void 0 === I ? "rgba(0,0,0,1)" : I
- , a = (e.linecap,
- e.within)
- , l = void 0 === a ? 0 : a
- , u = r(e, ["points", "foorWidth", "foorColor", "clipColor", "linecap", "within"])
- , c = this;
- return i[0].fillColor = "rgba(0,0,0,0)",
- i[1].fillColor = "rgba(0,0,0,0)",
- (c = t.call(this, A(A({}, u), {
- points: i,
- foorWidth: g,
- foorColor: C,
- within: l
- })) || this).clipColor = s,
- c
- }
- return g(e, t),
- e.prototype.setHoverStyle = function() {
- this.clipColor = "rgba(243, 255, 0, 0.8)",
- this.foorColor = "rgba(243, 255, 0, 0.8)"
- }
- ,
- e.prototype.setUnHoverStyle = function() {
- this.clipColor = "rgba(0,0,0,1)",
- this.foorColor = "rgba(255,255,255,0.5)"
- }
- ,
- e.prototype.grentNode = function() {
- var t = this
- , e = document.createElementNS(I.SVGURI, "g");
- return this.clip1 = document.createElementNS(I.SVGURI, "path"),
- e.appendChild(this.clip1),
- this.clip2 = document.createElementNS(I.SVGURI, "path"),
- e.appendChild(this.clip2),
- this.path1 = document.createElementNS(I.SVGURI, "path"),
- e.appendChild(this.path1),
- this.path2 = document.createElementNS(I.SVGURI, "path"),
- e.appendChild(this.path2),
- this.left = document.createElementNS(I.SVGURI, "rect"),
- this.left.setAttribute("width", "0.00001"),
- this.left.setAttribute("height", "0.00001"),
- e.appendChild(this.left),
- this.right = document.createElementNS(I.SVGURI, "rect"),
- this.right.setAttribute("width", "0.00001"),
- this.right.setAttribute("height", "0.00001"),
- e.appendChild(this.right),
- this.nextTick((function() {
- e.appendChild(t.linePoints[0].real),
- e.appendChild(t.linePoints[1].real),
- t.linePoints.forEach((function(e) {
- e.changeSelect = function(e) {
- e && t.changeSelect(e)
- }
- }
- ))
- }
- )),
- e
- }
- ,
- e.prototype.update = function() {
- var t, e, i, n, g = this.foorWidth * this.multiple, A = s.lineDis({
- points: this.linePoints
- }), r = 2 * this.multiple, o = .6 * A;
- if (this.within ? (i = (t = this.linePoints)[0],
- n = t[1]) : (n = (e = this.linePoints)[0],
- i = e[1]),
- !isNaN(i.x)) {
- var C = s.getLineDisSelectPoint({
- points: this.linePoints
- }, i, o)
- , I = s.getLineDisSelectPoint({
- points: this.linePoints
- }, i, o - r)
- , a = s.getLineDisSelectPoint({
- points: this.linePoints
- }, n, o)
- , l = s.getLineDisSelectPoint({
- points: this.linePoints
- }, n, o - r)
- , u = s.verticalLine({
- points: this.linePoints
- })
- , c = g / 2
- , h = (g - c) / 2 - 1e-4 * this.multiple
- , p = i.x + u.x * h
- , d = i.y + u.y * h
- , f = C.x + u.x * h
- , y = C.y + u.y * h
- , v = I.x + u.x * h
- , m = I.y + u.y * h
- , b = n.x - u.x * h
- , x = n.y - u.y * h
- , _ = a.x - u.x * h
- , w = a.y - u.y * h
- , P = l.x - u.x * h
- , O = l.y - u.y * h;
- this.path1.setAttribute("stroke", this.foorColor),
- this.path1.setAttribute("stroke-width", c.toString()),
- this.path1.setAttribute("d", "M " + p + " " + d + " L " + f + " " + y),
- this.clip1.setAttribute("stroke", this.clipColor),
- this.clip1.setAttribute("stroke-width", (c - this.bwithin * this.multiple).toString()),
- this.clip1.setAttribute("d", "M " + p + " " + d + " L " + v + " " + m),
- this.path2.setAttribute("stroke", this.foorColor),
- this.path2.setAttribute("stroke-width", c.toString()),
- this.path2.setAttribute("d", "M " + b + " " + x + " L " + _ + " " + w),
- this.clip2.setAttribute("stroke", this.clipColor),
- this.clip2.setAttribute("stroke-width", (c - this.bwithin * this.multiple).toString()),
- this.clip2.setAttribute("d", "M " + b + " " + x + " L " + P + " " + O),
- this.left.setAttribute("x", i.x.toString()),
- this.left.setAttribute("y", i.y.toString()),
- this.left.setAttribute("stroke-width", g.toString()),
- this.left.setAttribute("stroke", "rgba(0,0,0,0)"),
- this.right.setAttribute("x", n.x.toString()),
- this.right.setAttribute("y", n.y.toString()),
- this.right.setAttribute("stroke-width", g.toString()),
- this.right.setAttribute("stroke", "rgba(0,0,0,0)"),
- this.attachment.update()
- }
- }
- ,
- e
- }(C.default);
- e.default = a
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var r = A(i(8))
- , o = i(1)
- , C = i(0)
- , I = function(t) {
- function e(e) {
- return t.call(this, e) || this
- }
- return g(e, t),
- e.prototype.grentNode = function() {
- var t = this
- , e = document.createElementNS(o.SVGURI, "g");
- return this.arc1 = document.createElementNS(o.SVGURI, "path"),
- this.outLine1 = document.createElementNS(o.SVGURI, "path"),
- this.arc2 = document.createElementNS(o.SVGURI, "path"),
- this.outLine2 = document.createElementNS(o.SVGURI, "path"),
- e.appendChild(this.outLine1),
- e.appendChild(this.arc1),
- e.appendChild(this.outLine2),
- e.appendChild(this.arc2),
- this.nextTick((function() {
- e.appendChild(t.linePoints[0].real),
- e.appendChild(t.linePoints[1].real)
- }
- )),
- e
- }
- ,
- e.prototype.update = function() {
- var t;
- this.real.style.display = this.show ? "initial" : "none";
- var e = C.lineCenter({
- points: this.linePoints
- })
- , i = this.getDrawArgs.call({
- linePoints: [this.linePoints[0], e],
- within: 1 === this.within ? 2 : this.within,
- attachment: this.attachment
- })
- , n = i[0]
- , g = i[1]
- , A = i[2]
- , r = i[3]
- , o = i[4];
- isNaN(A.x) ? this.destroy() : (this.arc1.setAttribute("d", "M " + n.x + " " + n.y + " L " + A.x + " " + A.y + " A " + r + " " + r + " 0 0 " + (o ? "1" : "0") + " " + g.x + " " + g.y + " Z"),
- this.arc1.setAttribute("stroke-width", (this.outWidth * this.multiple).toString()),
- this.arc1.setAttribute("stroke", this.stroke),
- this.arc1.setAttribute("fill", this.fill),
- this.outLine1.setAttribute("stroke", this.foorColor),
- this.outLine1.setAttribute("fill", this.fill),
- this.outLine1.setAttribute("stroke-width", (this.foorWidth * this.multiple).toString()),
- this.outLine1.setAttribute("stroke-linecap", this.linecap),
- this.outLine1.setAttribute("d", "M " + this.linePoints[0].x + " " + this.linePoints[0].y + " L " + this.linePoints[1].x + " " + this.linePoints[1].y),
- n = (t = this.getDrawArgs.call({
- linePoints: [this.linePoints[1], e],
- within: 1 === this.within ? 2 : this.within,
- attachment: this.attachment
- }))[0],
- g = t[1],
- A = t[2],
- r = t[3],
- o = t[4],
- isNaN(A.x) ? this.destroy() : (this.arc2.setAttribute("d", "M " + n.x + " " + n.y + " L " + A.x + " " + A.y + " A " + r + " " + r + " 0 0 " + (o ? "1" : "0") + " " + g.x + " " + g.y + " Z"),
- this.arc2.setAttribute("stroke-width", (this.outWidth * this.multiple).toString()),
- this.arc2.setAttribute("stroke", this.stroke),
- this.arc2.setAttribute("fill", this.fill),
- this.outLine2.setAttribute("stroke", this.foorColor),
- this.outLine2.setAttribute("fill", this.fill),
- this.outLine2.setAttribute("stroke-width", (this.foorWidth * this.multiple).toString()),
- this.outLine2.setAttribute("stroke-linecap", this.linecap),
- this.outLine2.setAttribute("d", "M " + this.linePoints[0].x + " " + this.linePoints[0].y + " L " + this.linePoints[1].x + " " + this.linePoints[1].y),
- this.attachment.update()))
- }
- ,
- e
- }(r.default);
- e.default = I
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var r = A(i(13))
- , o = i(1)
- , C = function(t) {
- function e() {
- return null !== t && t.apply(this, arguments) || this
- }
- return g(e, t),
- e.prototype.grentNode = function() {
- var e = t.prototype.grentNode.call(this);
- return this.path1 = document.createElementNS(o.SVGURI, "path"),
- this.path2 = document.createElementNS(o.SVGURI, "path"),
- this.path1.setAttribute("stroke", this.stroke),
- this.path2.setAttribute("stroke", this.stroke),
- e.insertBefore(this.path1, e.childNodes[0]),
- e.insertBefore(this.path2, e.childNodes[0]),
- e
- }
- ,
- e.prototype.update = function() {
- t.prototype.update.call(this),
- this.path1.setAttribute("stroke-width", (this.width * this.multiple).toString()),
- this.path2.setAttribute("stroke-width", (this.width * this.multiple).toString()),
- this.path1.setAttribute("d", "M " + this.points[0].x + " " + this.points[0].y + " L " + this.points[2].x + " " + this.points[2].y),
- this.path2.setAttribute("d", "M " + this.points[1].x + " " + this.points[1].y + " L " + this.points[3].x + " " + this.points[3].y),
- this.path1.setAttribute("stroke", this.stroke),
- this.path2.setAttribute("stroke", this.stroke)
- }
- ,
- e
- }(r.default);
- e.default = C
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var r = A(i(13))
- , o = i(1)
- , C = i(0)
- , I = function(t) {
- function e() {
- return null !== t && t.apply(this, arguments) || this
- }
- return g(e, t),
- e.prototype.grentNode = function() {
- var e = t.prototype.grentNode.call(this);
- return this.g = document.createElementNS(o.SVGURI, "g"),
- this.path1 = document.createElementNS(o.SVGURI, "path"),
- this.path2 = document.createElementNS(o.SVGURI, "path"),
- this.path1.setAttribute("stroke", this.stroke),
- this.path1.setAttribute("fill", "rgba(0,0,0,0)"),
- this.path2.setAttribute("stroke", this.stroke),
- this.path2.setAttribute("fill", "rgba(0,0,0,0)"),
- this.g.appendChild(this.path1),
- this.g.appendChild(this.path2),
- e.insertBefore(this.g, e.children[0]),
- e
- }
- ,
- e.prototype.update = function() {
- t.prototype.update.call(this);
- var e = C.faceCenter(this.points)
- , i = C.lineDis({
- points: [this.points[1], this.points[2]]
- }) / this.multiple
- , n = C.lineDis({
- points: [this.points[2], this.points[3]]
- }) / this.multiple
- , g = (n - 5 * this.width) / n
- , A = (i - 5 * this.width) / i;
- g = g <= 0 ? 1 : g,
- A = A <= 0 ? 1 : A,
- this.g.setAttribute("transform", "translate(" + e.x + "," + e.y + ") scale(" + (g < A ? A : g) + ") translate(" + -e.x + "," + -e.y + ")"),
- this.path1.setAttribute("stroke-width", (this.width * this.multiple / (g < A ? A : g)).toString()),
- this.path1.setAttribute("d", "M " + this.points.map((function(t) {
- return t.x + " " + t.y
- }
- )).join(" L ") + " Z"),
- this.path2.setAttribute("stroke", this.stroke);
- var r = this.points[2]
- , o = {
- points: [this.points[1], this.points[3]]
- }
- , I = C.lineCenter(o)
- , s = C.lineDis({
- points: [I, r]
- }) * (1 / 3)
- , a = C.getDisVerticalLinePoints(o, I, s)
- , l = a[0]
- , u = a[1]
- , c = C.lineDis({
- points: [r, l]
- }) > C.lineDis({
- points: [r, u]
- }) ? u : l;
- C.pointInside(this.points, c) || (c = C.lineCenter(o)),
- this.path2.setAttribute("stroke", this.stroke),
- this.path2.setAttribute("stroke-width", (this.width * this.multiple).toString()),
- this.path2.setAttribute("d", "M " + this.points[1].x + " " + this.points[1].y + " L " + c.x + " " + c.y + " L " + this.points[3].x + " " + this.points[3].y)
- }
- ,
- e
- }(r.default);
- e.default = I
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__assign || function() {
- return (A = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , r = this && this.__rest || function(t, e) {
- var i = {};
- for (var n in t)
- Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
- if (null != t && "function" == typeof Object.getOwnPropertySymbols) {
- var g = 0;
- for (n = Object.getOwnPropertySymbols(t); g < n.length; g++)
- e.indexOf(n[g]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[g]) && (i[n[g]] = t[n[g]])
- }
- return i
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var o = i(2)
- , C = i(1)
- , I = i(9)
- , s = function(t) {
- function e(e) {
- var i = e.pos
- , n = e.renderer
- , g = e.fontSize
- , o = void 0 === g ? 12 : g
- , C = e.color
- , I = void 0 === C ? "#fff" : C
- , s = r(e, ["pos", "renderer", "fontSize", "color"])
- , a = t.call(this, A(A({}, s), {
- x: i.x,
- y: i.y,
- fontSize: o,
- renderer: n,
- color: I
- })) || this;
- return a.zIndex = -1,
- a
- }
- return g(e, t),
- e.prototype.changeSelect = function(e) {
- t.prototype.changeSelect.call(this, e)
- }
- ,
- e.prototype.dragStart = function() {
- this.dragStartPoint = {
- x: this.x,
- y: this.y
- }
- }
- ,
- e.prototype.drag = function(t) {
- this.x = this.dragStartPoint.x + t.x * this.multiple,
- this.y = this.dragStartPoint.y + t.y * this.multiple
- }
- ,
- e.prototype.grentNode = function() {
- var t = this
- , e = document.createElementNS(C.SVGURI, "g");
- return this.titleNode = document.createElementNS(C.SVGURI, "text"),
- this.titleNode.setAttribute("fill", "#fff"),
- this.titleNode.setAttribute("text-anchor", "middle"),
- this.titleNode.setAttribute("dy", ".4em"),
- this.contentNode = document.createElementNS(C.SVGURI, "text"),
- this.contentNode.setAttribute("fill", "#fff"),
- this.contentNode.setAttribute("text-anchor", "middle"),
- this.contentNode.setAttribute("dy", ".4em"),
- e.appendChild(this.titleNode),
- e.appendChild(this.contentNode),
- this.nextTick((function() {
- return t.update()
- }
- )),
- e
- }
- ,
- e.prototype.setHoverStyle = function() {}
- ,
- e.prototype.setUnHoverStyle = function() {}
- ,
- e.prototype.update = function() {
- var t = this.fontSize * this.multiple;
- this.titleNode.setAttribute("x", this.x.toString()),
- this.titleNode.setAttribute("y", this.y.toString()),
- this.titleNode.setAttribute("font-size", t.toString()),
- this.titleNode.style.display = this.show && this.showTitle ? "inherit" : "none",
- this.titleNode.textContent = this.title || I.i18n.t("modules.model.tagging_name_tips"),
- this.contentNode.setAttribute("x", this.x.toString()),
- this.contentNode.setAttribute("y", (this.y + t + t / 5).toString()),
- this.contentNode.setAttribute("font-size", t.toString()),
- this.contentNode.style.display = this.show && this.showContent ? "inherit" : "none",
- this.contentNode.textContent = this.content,
- this.select ? (this.titleNode.setAttribute("fill", "rgb(183, 18, 15)"),
- this.contentNode.setAttribute("fill", "rgb(183, 18, 15)")) : (this.titleNode.setAttribute("fill", this.color),
- this.contentNode.setAttribute("fill", this.color))
- }
- ,
- e.prototype.destroy = function() {
- t.prototype.destroy.call(this)
- }
- ,
- e
- }(o.CADElement);
- e.default = s
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__assign || function() {
- return (A = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , r = this && this.__rest || function(t, e) {
- var i = {};
- for (var n in t)
- Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
- if (null != t && "function" == typeof Object.getOwnPropertySymbols) {
- var g = 0;
- for (n = Object.getOwnPropertySymbols(t); g < n.length; g++)
- e.indexOf(n[g]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[g]) && (i[n[g]] = t[n[g]])
- }
- return i
- }
- , o = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var C = i(1)
- , I = o(i(4))
- , s = i(0)
- , a = function(t) {
- function e(e) {
- var i = e.points
- , n = e.width
- , g = void 0 === n ? 3 : n
- , o = r(e, ["points", "width"]);
- return t.call(this, A({
- linePoints: i,
- fill: "rgba(255,255,255,0.5)",
- width: g
- }, o)) || this
- }
- return g(e, t),
- e.prototype.grentNode = function() {
- var t = this
- , e = document.createElementNS(C.SVGURI, "g");
- return this.clip1 = document.createElementNS(C.SVGURI, "path"),
- this.clip2 = document.createElementNS(C.SVGURI, "path"),
- this.clip3 = document.createElementNS(C.SVGURI, "path"),
- this.clip4 = document.createElementNS(C.SVGURI, "path"),
- this.clip5 = document.createElementNS(C.SVGURI, "path"),
- this.clip1.setAttribute("stroke", this.fill),
- this.clip2.setAttribute("stroke", this.fill),
- this.clip3.setAttribute("stroke", this.fill),
- this.clip4.setAttribute("stroke", this.fill),
- this.clip5.setAttribute("stroke", this.fill),
- e.appendChild(this.clip1),
- e.appendChild(this.clip2),
- e.appendChild(this.clip3),
- e.appendChild(this.clip4),
- e.appendChild(this.clip5),
- this.nextTick((function() {
- e.appendChild(t.linePoints[0].real),
- e.appendChild(t.linePoints[1].real)
- }
- )),
- e
- }
- ,
- e.prototype.setHoverStyle = function() {
- this.fill = "rgba(243, 255, 0, 0.8)"
- }
- ,
- e.prototype.setUnHoverStyle = function() {
- this.fill = "rgba(255,255,255,0.5)"
- }
- ,
- e.prototype.update = function() {
- var t = s.getDisVerticalLinePoints(this.attachment, this.linePoints[0], .4 * this.width * this.multiple)
- , e = t[0]
- , i = t[1]
- , n = s.getDisVerticalLinePoints(this.attachment, this.linePoints[1], .4 * this.width * this.multiple)
- , g = n[0]
- , A = n[1]
- , r = s.getDisVerticalLinePoints(this.attachment, this.linePoints[0], .15 * this.width * this.multiple)
- , o = r[0]
- , C = r[1]
- , I = s.getDisVerticalLinePoints(this.attachment, this.linePoints[1], .15 * this.width * this.multiple)
- , a = I[0]
- , l = I[1]
- , u = s.lineCenter({
- points: [o, a]
- })
- , c = s.lineCenter({
- points: [C, l]
- });
- isNaN(e.x) || (this.clip1.setAttribute("stroke-width", this.multiple.toString()),
- this.clip1.setAttribute("d", "M " + e.x + " " + e.y + " L " + g.x + " " + g.y),
- this.clip2.setAttribute("stroke-width", this.multiple.toString()),
- this.clip2.setAttribute("d", "M " + i.x + " " + i.y + " L " + A.x + " " + A.y),
- this.clip3.setAttribute("stroke-width", this.multiple.toString()),
- this.clip3.setAttribute("d", "M " + o.x + " " + o.y + " L " + a.x + " " + a.y),
- this.clip4.setAttribute("stroke-width", this.multiple.toString()),
- this.clip4.setAttribute("d", "M " + C.x + " " + C.y + " L " + l.x + " " + l.y),
- this.clip5.setAttribute("stroke-width", (6 * this.multiple).toString()),
- this.clip5.setAttribute("d", "M " + u.x + " " + u.y + " L " + c.x + " " + c.y),
- this.clip1.setAttribute("stroke", this.fill),
- this.clip2.setAttribute("stroke", this.fill),
- this.clip3.setAttribute("stroke", this.fill),
- this.clip4.setAttribute("stroke", this.fill),
- this.clip5.setAttribute("stroke", this.fill),
- this.attachment.update())
- }
- ,
- e.prototype.dragStart = function(t) {
- this.move = this.linePoints[0].real === t.target || this.linePoints[1].real === t.target,
- this.dragStartPoints = this.linePoints.map((function(t) {
- return {
- x: t.x,
- y: t.y
- }
- }
- ))
- }
- ,
- e.prototype.drag = function(t) {
- var e = this;
- this.move || this.linePoints.forEach((function(i, n) {
- i.x = e.dragStartPoints[n].x + t.x * e.multiple,
- i.y = e.dragStartPoints[n].y + t.y * e.multiple
- }
- ))
- }
- ,
- e.prototype.dragEnd = function() {
- this.move = !1,
- delete this.dragStartPoints
- }
- ,
- e
- }(I.default);
- e.default = a
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__assign || function() {
- return (A = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , r = this && this.__rest || function(t, e) {
- var i = {};
- for (var n in t)
- Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
- if (null != t && "function" == typeof Object.getOwnPropertySymbols) {
- var g = 0;
- for (n = Object.getOwnPropertySymbols(t); g < n.length; g++)
- e.indexOf(n[g]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[g]) && (i[n[g]] = t[n[g]])
- }
- return i
- }
- , o = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var C = i(1)
- , I = o(i(4))
- , s = i(0)
- , a = function(t) {
- function e(e) {
- var i = e.points
- , n = e.within
- , g = void 0 === n ? 0 : n
- , o = e.width
- , C = void 0 === o ? 1 : o
- , I = r(e, ["points", "within", "width"]);
- return i[0].fillColor = "rgba(0,0,0,0)",
- i[1].fillColor = "rgba(0,0,0,0)",
- t.call(this, A({
- linePoints: i,
- fill: "rgba(243, 255, 0, 0)",
- stroke: "rgba(255,255,255,0.5)",
- within: g,
- width: C
- }, I)) || this
- }
- return g(e, t),
- e.prototype.grentNode = function() {
- var t = this
- , e = document.createElementNS(C.SVGURI, "g");
- return e.innerHTML = '\n <path class="ground-case-out" stroke="' + this.stroke + '" fill="rgba(0,0,0,0)"/>\n <path class="ground-case-in" stroke="' + this.stroke + '" fill="rgba(0,0,0,0)" />\n <rect width="0.00001" height="0.00001" class="ground-case-left" stroke="rgba(255,255,255,0)" />\n <rect width="0.00001" height="0.00001" class="ground-case-right" stroke="rgba(255,255,255,0)" />\n ',
- this.out = e.querySelector(".ground-case-out"),
- this.in = e.querySelector(".ground-case-in"),
- this.left = e.querySelector(".ground-case-left"),
- this.right = e.querySelector(".ground-case-right"),
- this.nextTick((function() {
- e.appendChild(t.linePoints[0].real),
- e.appendChild(t.linePoints[1].real)
- }
- )),
- e
- }
- ,
- e.prototype.setHoverStyle = function() {
- this.fill = "rgba(243, 255, 0, 0.8)"
- }
- ,
- e.prototype.setUnHoverStyle = function() {
- this.fill = "rgba(0,0,0,0)"
- }
- ,
- e.prototype.getOutInPath = function(t, e, i, n, g, A, r) {
- var o = this;
- void 0 === A && (A = 0),
- void 0 === r && (r = 0);
- var C, I = i, a = s.getDisVerticalLinePoints(this.attachment, t, I), l = s.getDisVerticalLinePoints(this.attachment, e, I), u = {
- x: 0,
- y: 0
- }, c = s.lineDis({
- points: [a[0], u]
- }) < s.lineDis({
- points: [a[1], u]
- }), h = this.within ? c ? a[1] : a[0] : c ? a[0] : a[1];
- h ? C = l[a.indexOf(h)] : (C = this.within ? l.find((function(t) {
- return o.rooms.find((function(e) {
- return !s.pointInside(e, t)
- }
- ))
- }
- )) : l.find((function(t) {
- return o.rooms.find((function(e) {
- return s.pointInside(e, t)
- }
- ))
- }
- ))) ? h = a[l.indexOf(C)] : (h = a[0],
- C = l[0]),
- A = A || h,
- r = r || C;
- var p = s.getDisVerticalLinePoints(this.attachment, t, g).sort((function(t, e) {
- return s.lineDis({
- points: [A, t]
- }) - s.lineDis({
- points: [A, e]
- })
- }
- ))[1];
- return [h, C, s.getDisVerticalLinePoints(this.attachment, e, g).sort((function(t, e) {
- return s.lineDis({
- points: [r, t]
- }) - s.lineDis({
- points: [r, e]
- })
- }
- ))[1], p, h]
- }
- ,
- e.prototype.update = function() {
- var t = 3 * this.width * this.multiple
- , e = this.width * this.multiple
- , i = .4 * s.lineDis({
- points: this.linePoints
- });
- i / this.multiple > 30 && (i = 30 * this.multiple);
- var n = this.linePoints[0]
- , g = this.linePoints[1]
- , A = s.getDisPointLinePoints(this.attachment, n, t)
- , r = A[0]
- , o = A[1]
- , C = s.getDisPointLinePoints(this.attachment, g, t)
- , I = C[0]
- , a = C[1];
- if (n = s.lineDis({
- points: [r, g]
- }) > s.lineDis({
- points: [o, g]
- }) ? r : o,
- g = s.lineDis({
- points: [I, n]
- }) > s.lineDis({
- points: [a, n]
- }) ? I : a,
- !isNaN(r.x)) {
- this.left.setAttribute("stroke-width", t.toString()),
- this.left.setAttribute("x", this.linePoints[0].x.toString()),
- this.left.setAttribute("y", this.linePoints[0].y.toString()),
- this.right.setAttribute("stroke-width", t.toString()),
- this.right.setAttribute("x", this.linePoints[1].x.toString()),
- this.right.setAttribute("y", this.linePoints[1].y.toString());
- var l = this.getOutInPath(n, g, t, e, i);
- this.ctl = [l[2], l[3]],
- this.out.setAttribute("fill", this.fill),
- this.out.setAttribute("stroke-width", e.toString()),
- this.out.setAttribute("stroke", this.stroke),
- this.out.setAttribute("d", l.map((function(t, e) {
- return (e ? "L " : "M ") + t.x + " " + t.y
- }
- )).join(" "));
- var u = s.getLineDisSelectPoint({
- points: this.linePoints
- }, n, t)
- , c = s.getLineDisSelectPoint({
- points: this.linePoints
- }, g, t);
- this.in.setAttribute("fill", this.fill),
- this.in.setAttribute("stroke-width", e.toString()),
- this.in.setAttribute("stroke", this.stroke),
- this.in.setAttribute("d", this.getOutInPath(u, c, t, e, i - s.lineDis({
- points: [u, n]
- }), l[0], l[1]).map((function(t, e) {
- return (e ? "L " : "M ") + t.x + " " + t.y
- }
- )).join(" ")),
- this.attachment.update()
- }
- }
- ,
- e.prototype.dragStart = function(t) {
- this.move = this.linePoints[0].real === t.target || this.linePoints[1].real === t.target,
- this.dragStartPoints = this.linePoints.map((function(t) {
- return {
- x: t.x,
- y: t.y
- }
- }
- ))
- }
- ,
- e.prototype.drag = function(t) {
- var e = this;
- this.move || this.linePoints.forEach((function(i, n) {
- i.x = e.dragStartPoints[n].x + t.x * e.multiple,
- i.y = e.dragStartPoints[n].y + t.y * e.multiple
- }
- ))
- }
- ,
- e.prototype.dragEnd = function() {
- this.move = !1,
- delete this.dragStartPoints
- }
- ,
- e
- }(I.default);
- e.default = a
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__assign || function() {
- return (n = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , g = this && this.__awaiter || function(t, e, i, n) {
- return new (i || (i = Promise))((function(g, A) {
- function r(t) {
- try {
- C(n.next(t))
- } catch (t) {
- A(t)
- }
- }
- function o(t) {
- try {
- C(n.throw(t))
- } catch (t) {
- A(t)
- }
- }
- function C(t) {
- var e;
- t.done ? g(t.value) : (e = t.value,
- e instanceof i ? e : new i((function(t) {
- t(e)
- }
- ))).then(r, o)
- }
- C((n = n.apply(t, e || [])).next())
- }
- ))
- }
- , A = this && this.__generator || function(t, e) {
- var i, n, g, A, r = {
- label: 0,
- sent: function() {
- if (1 & g[0])
- throw g[1];
- return g[1]
- },
- trys: [],
- ops: []
- };
- return A = {
- next: o(0),
- throw: o(1),
- return: o(2)
- },
- "function" == typeof Symbol && (A[Symbol.iterator] = function() {
- return this
- }
- ),
- A;
- function o(A) {
- return function(o) {
- return function(A) {
- if (i)
- throw new TypeError("Generator is already executing.");
- for (; r; )
- try {
- if (i = 1,
- n && (g = 2 & A[0] ? n.return : A[0] ? n.throw || ((g = n.return) && g.call(n),
- 0) : n.next) && !(g = g.call(n, A[1])).done)
- return g;
- switch (n = 0,
- g && (A = [2 & A[0], g.value]),
- A[0]) {
- case 0:
- case 1:
- g = A;
- break;
- case 4:
- return r.label++,
- {
- value: A[1],
- done: !1
- };
- case 5:
- r.label++,
- n = A[1],
- A = [0];
- continue;
- case 7:
- A = r.ops.pop(),
- r.trys.pop();
- continue;
- default:
- if (!(g = (g = r.trys).length > 0 && g[g.length - 1]) && (6 === A[0] || 2 === A[0])) {
- r = 0;
- continue
- }
- if (3 === A[0] && (!g || A[1] > g[0] && A[1] < g[3])) {
- r.label = A[1];
- break
- }
- if (6 === A[0] && r.label < g[1]) {
- r.label = g[1],
- g = A;
- break
- }
- if (g && r.label < g[2]) {
- r.label = g[2],
- r.ops.push(A);
- break
- }
- g[2] && r.ops.pop(),
- r.trys.pop();
- continue
- }
- A = e.call(t, r)
- } catch (t) {
- A = [6, t],
- n = 0
- } finally {
- i = g = 0
- }
- if (5 & A[0])
- throw A[1];
- return {
- value: A[0] ? A[1] : void 0,
- done: !0
- }
- }([A, o])
- }
- }
- }
- , r = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- , o = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var C = o(i(49))
- , I = o(i(5))
- , s = o(i(11))
- , a = o(i(8))
- , l = o(i(7))
- , u = o(i(20))
- , c = o(i(15))
- , h = o(i(21))
- , p = o(i(17))
- , d = o(i(18))
- , f = i(3)
- , y = o(i(12))
- , v = o(i(14))
- , m = o(i(16))
- , b = o(i(19))
- , x = o(i(50));
- e.roateDataY = function(t) {
- return [(t = n(n({}, t), {
- vertex: t.vertex.map((function(t) {
- return n(n({}, t), {
- y: -t.y
- })
- }
- )),
- window: r(t.window),
- column: r(t.column),
- door: r(t.door),
- groundCase: r(t.groundCase),
- slideDoor: r(t.slideDoor),
- bayCase: r(t.bayCase),
- tagging: r(t.tagging),
- furnColumn: r(t.furnColumn),
- furnFlue: r(t.furnFlue),
- doubleDoor: r(t.doubleDoor)
- })).window, t.column, t.door, t.slideDoor, t.tagging, t.groundCase, t.bayCase, t.furnColumn, t.furnFlue, t.doubleDoor].forEach((function(t) {
- t.forEach((function(e, i) {
- t[i] = n(n({}, e), {
- pos: e.pos.map((function(t, e) {
- return e % 2 ? -t : t
- }
- ))
- })
- }
- ))
- }
- )),
- t
- }
- ,
- e.attchTransform = function(t) {
- t.getData = function(i) {
- return void 0 === i && (i = !1),
- {
- floors: t.processings.map((function(n) {
- var g = e.roateDataY(n.toData());
- return g.dire = n.direction.angle,
- i && (g = x.default(g, t)),
- g
- }
- ))
- }
- }
- ,
- t.loadData = function(i) {
- i.floors || (i.show = !0,
- i = {
- floors: [i]
- });
- var n = JSON.parse(JSON.stringify(i));
- n.floors.some((function(t) {
- return t.show
- }
- )) || (n.floors[0].show = !0),
- n.floors = n.floors.map((function(t) {
- return e.roateDataY(function(t) {
- t.column = t.column || [],
- t.window = t.window || [],
- t.doubleDoor = t.doubleDoor || [],
- t.door = t.door || [],
- t.groundCase = t.groundCase || [],
- t.bayCase = t.bayCase || [],
- t.slideDoor = t.slideDoor || [],
- t.tagging = t.tagging || [],
- t.furnColumn = t.furnColumn || [],
- t.furnFlue = t.furnFlue || [];
- var e = ["column", "window", "door", "groundCase", "bayCase", "slideDoor", "tagging", "furnColumn", "furnFlue"];
- t["vertex-xy"] && (t.vertex = t["vertex-xy"],
- t.wall = t.segment.map((function(t) {
- return {
- id: t.id,
- p1: t.a,
- p2: t.b,
- border: t.border,
- exterior: t.exterior
- }
- }
- ))),
- t["outdoor-segment"] && (t.wall = t.wall.concat(t["outdoor-segment"].map((function(t) {
- return {
- id: t.id,
- p1: t.a,
- p2: t.b,
- border: t.border,
- exterior: !0
- }
- }
- ))),
- t.vertex = t.vertex.concat(t["outdoor-vertex"]));
- for (var i, n = function(n) {
- var g = t.wall.filter((function(e) {
- return e !== t.wall[n]
- }
- )).find((function(e) {
- var i = e.p1
- , g = e.p2;
- return i === t.wall[n].p1 && g === t.wall[n].p2 || g === t.wall[n].p1 && i === t.wall[n].p2
- }
- ));
- g && (e.forEach((function(e) {
- t[e].forEach((function(e) {
- e.line === t.wall[n].id && (e.line = g.id,
- console.log("update", e))
- }
- ))
- }
- )),
- t.wall.splice(n--, 1)),
- i = n
- }, g = 0; g < t.wall.length; g++)
- n(g),
- g = i;
- return t.vertex = t.vertex.filter((function(e) {
- return t.wall.some((function(t) {
- var i = t.p1
- , n = t.p2;
- return e.id === i || e.id === n
- }
- ))
- }
- )),
- t
- }(t))
- }
- )),
- !0,
- t.processings.forEach((function(t) {
- t.attrs.forEach((function(e) {
- for (; t[e].length; )
- t[e][0].ele.destroy(!0, !0)
- }
- ))
- }
- )),
- n.floors.forEach((function(e) {
- var i = t.processings.find((function(t) {
- return t.id === e.id
- }
- ));
- i || ((i = t.addProcessing()).id = e.id)
- }
- ));
- for (var g, A = function(e) {
- n.floors.some((function(i) {
- var n = i.id;
- return t.processings[e].id === n
- }
- )) || t.delProcessing(t.processings[e--]),
- g = e
- }, r = 0; r < t.processings.length; r++)
- A(r),
- r = g;
- t.processings.forEach((function(t) {
- for (var e, i = function(i) {
- var n = t.render.elements[i];
- [s.default, a.default, c.default, m.default, l.default, v.default, I.default, u.default, b.default, h.default, p.default, d.default].some((function(t) {
- return n instanceof t
- }
- )) && (t.render.remove(n),
- i--),
- e = i
- }, n = 0; n < t.render.elements.length; n++)
- i(n),
- n = e
- }
- )),
- n.floors.forEach((function(e) {
- var i = t.processings.find((function(t) {
- return t.id === e.id
- }
- ));
- e.surplus = [],
- i.toEles(e),
- i.direction.__state.direct = !0,
- i.direction.angle = e.dire || 0,
- i.direction.__state.direct = !1,
- i.direction.update(),
- t.adapt(e, void 0, void 0, n.floors[0])
- }
- )),
- setTimeout((function() {
- return !1
- }
- ), 5e3)
- }
- }
- ,
- e.attchStack = function(t) {
- sessionStorage.clear();
- var e = 0
- , i = new C.default("cad_" + Date.now());
- t.stack = i;
- var n = function(t) {
- void 0 === t && (t = e);
- var n = i.getLength();
- return {
- previous: (1 !== n || 1 !== e) && t > 0,
- next: t < n - 1
- }
- };
- t.clearStack = function() {
- sessionStorage.clear(),
- i.setLength(e = 0)
- }
- ,
- t.getCurrentData = function() {
- return i.get(e - 1)
- }
- ,
- t.preservation = f.debounce((function() {
- if (!t.stoppreservation) {
- var n = t.getData()
- , g = i.getLength() - 1;
- 0 !== g && JSON.stringify(n) === JSON.stringify(i.get(g)) || (i.push(n),
- ++e)
- }
- }
- ), 500);
- var g;
- Date.now();
- t.previous = function() {
- return n().previous ? (--e,
- clearTimeout(g),
- g = setTimeout((function() {
- t.loadData(i.get(e))
- }
- ), 500),
- n()) : n()
- }
- ,
- t.next = function() {
- return n().next ? (++e,
- clearTimeout(g),
- g = setTimeout((function() {
- t.loadData(i.get(e))
- }
- ), 500),
- n()) : n()
- }
- ,
- t.getStackState = n;
- var A = t.destroy;
- t.destroy = function() {
- for (var t = [], e = 0; e < arguments.length; e++)
- t[e] = arguments[e];
- i = null,
- A.apply(this, t)
- }
- }
- ,
- e.autoPreservation = function(t) {
- [I.default, s.default, a.default, l.default, u.default, c.default, h.default, p.default, y.default, d.default, v.default, m.default].forEach((function(e) {
- var i = e.prototype.dragEnd;
- e.prototype.dragEnd = function() {
- for (var e = [], n = 0; n < arguments.length; n++)
- e[n] = arguments[n];
- return g(this, void 0, void 0, (function() {
- return A(this, (function(n) {
- switch (n.label) {
- case 0:
- return i ? [4, i.call.apply(i, r([this], e))] : [3, 2];
- case 1:
- n.sent(),
- n.label = 2;
- case 2:
- return setTimeout((function() {
- t.preservation()
- }
- ), 100),
- [2]
- }
- }
- ))
- }
- ))
- }
- ;
- var n = t.destroy;
- t.destroy = function() {
- for (var t = [], g = 0; g < arguments.length; g++)
- t[g] = arguments[g];
- n.apply(this, t),
- e.prototype.dragEnd = i
- }
- }
- ));
- var e = t.increase;
- t.increase = function() {
- for (var i = [], n = 0; n < arguments.length; n++)
- i[n] = arguments[n];
- var g = e.call.apply(e, r([t], i));
- return g.error || setTimeout((function() {
- t.preservation()
- }
- ), 100),
- g
- }
- ,
- t.preservation()
- }
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var r = i(2)
- , o = i(1)
- , C = i(0)
- , I = function(t, e) {
- return t.contains ? t.contains(e) : Array.from(t.childNodes).some((function(t) {
- return t === e
- }
- ))
- }
- , s = function(t) {
- function e(e) {
- var i = e.local
- , n = e.renderer
- , g = e.active
- , A = void 0 === g ? 0 : g
- , r = e.show
- , o = void 0 === r || r
- , C = t.call(this, {
- local: i,
- renderer: n,
- dialog: 0,
- active: A,
- show: o
- }) || this;
- return C.items = [],
- C.layerClick = function() {
- return C.dialog = 0
- }
- ,
- n.layer.addEventListener("click", C.layerClick),
- C
- }
- return g(e, t),
- e.prototype.grentImage = function(t) {
- var e = document.createElementNS(o.SVGURI, "image");
- return e.href.baseVal = i(54),
- e.setAttribute("x", (-t / 2).toString()),
- e.setAttribute("y", (-t / 2).toString()),
- e.setAttribute("width", t.toString()),
- e.setAttribute("height", t.toString()),
- e
- }
- ,
- e.prototype.grentNode = function() {
- var t = document.createElementNS(o.SVGURI, "g");
- this.path = document.createElementNS(o.SVGURI, "path"),
- this.path.setAttribute("stroke", "rgb(183, 18, 15)"),
- this.path.setAttribute("fill", "transparent");
- var e = document.createElementNS(o.SVGURI, "circle");
- e.setAttribute("fill", "rgb(183, 18, 15)"),
- e.setAttribute("stroke", "#fff");
- var i = document.createElementNS(o.SVGURI, "text");
- return i.setAttribute("fill", "#fff"),
- i.setAttribute("text-anchor", "middle"),
- i.setAttribute("dy", ".4em"),
- this.temp = document.createElementNS(o.SVGURI, "g"),
- this.temp.appendChild(e),
- this.temp.appendChild(i),
- this.temp.style.cursor = "pointer",
- this.dialogLayer = document.createElementNS(o.SVGURI, "g"),
- this.itemsLayout = document.createElementNS(o.SVGURI, "path"),
- this.itemsLayout.setAttribute("fill", "rgba(255,255,255,0.7)"),
- this.dialogLayer.appendChild(this.itemsLayout),
- t.appendChild(this.path),
- t
- }
- ,
- e.prototype.update = function() {
- var t = this
- , e = 9 * this.multiple
- , i = 2 * this.multiple;
- if (this.real.style.display = this.show ? "initial" : "none",
- this.path.setAttribute("stroke-width", (2 * this.multiple).toString()),
- this.local.length > 0)
- this.path.setAttribute("d", "M " + this.local.map((function(t) {
- return t.x + " " + t.y
- }
- )).join(" L "));
- else if (this.path.setAttribute("d", ""),
- this.dialog)
- return this.dialog = 0;
- this.items.forEach((function(e) {
- try {
- t.real.removeChild(e)
- } catch (t) {}
- }
- )),
- this.items = [],
- this.temp.style.display = this.show ? "initial" : "none";
- var n = this.local.length - this.items.length;
- if (n > 0)
- for (var g = 0; g < n; g++) {
- var A = this.temp.cloneNode(!0);
- this.real.appendChild(A),
- this.items.push(A)
- }
- else if (n < 0)
- for (g = 0; g > n; g--) {
- var r = this.items.shift();
- this.real.removeChild(r)
- }
- var o = 0;
- for (g = 0; g < this.local.length; g++) {
- var C = this.items[g].querySelector("circle")
- , I = this.items[g].querySelector("text");
- this.items[g].setAttribute("transform", "translate(" + this.local[g].x + "," + this.local[g].y + ")"),
- this.items[g].style.display = "inherit",
- C.setAttribute("stroke-width", i.toString()),
- C.setAttribute("r", e.toString()),
- I.setAttribute("font-size", (10 * this.multiple).toString()),
- this.local[g].rangn ? (C.setAttribute("fill", "#666666"),
- this.items[g].appendChild(this.grentImage(e + i))) : I.textContent = (++o).toString(),
- this.local[g] === this.active && (I.setAttribute("fill", "rgb(250,250,0)"),
- C.setAttribute("stroke", "rgb(250,250,0)"),
- this.items[g].setAttribute("class", "active"))
- }
- var s = this.calcGroup();
- for (g = 0; g < s.length; g++)
- s[g].body.forEach((function(e) {
- var i = t.local.indexOf(e);
- t.items[i].style.display = "none"
- }
- ));
- this.showDialog(2 * (e + i))
- }
- ,
- e.prototype.showDialog = function(t) {
- var e = this;
- if (0 !== this.dialog) {
- for (var i = 0; i < this.dialogLayer.childNodes.length; i++)
- this.dialogLayer.childNodes[i] !== this.itemsLayout && (this.dialogLayer.removeChild(this.dialogLayer.childNodes[i]),
- i--);
- this.itemsLayout.innerHTML = "";
- var n = 5 * this.multiple
- , g = (t + n) * this.dialog.items.length
- , A = t + 2 * n
- , r = this.dialog.pos.x - g / 2
- , o = this.dialog.pos.y - A - t
- , C = 8 * this.multiple;
- this.itemsLayout.setAttribute("d", "\n M " + r + " " + (o + A) + "\n A " + A / 2 + " " + A / 2 + " 0 1 1 " + r + " " + o + "\n L " + (r + g) + " " + o + "\n A " + A / 2 + " " + A / 2 + " 0 1 1 " + (r + g) + " " + (o + A) + "\n L " + (r + g / 2 + C) + " " + (o + A) + "\n L " + (r + g / 2) + " " + (o + A + C) + "\n L " + (r + g / 2 - C) + " " + (o + A) + "\n L " + r + " " + (o + A) + "\n ");
- var I = function(i, g) {
- i.setAttribute("transform", "translate(" + (r + (t + n) * g) + "," + (o + (t / 2 + n)) + ")"),
- i.style.display = "inline",
- e.dialogLayer.appendChild(i)
- };
- this.dialog.items.forEach((function(t, i) {
- I(e.items[e.local.indexOf(t)], i + 1)
- }
- )),
- I(this.items[this.local.indexOf(this.dialog.pos)].cloneNode(!0), 0)
- }
- }
- ,
- e.prototype.calcGroup = function() {
- var t = this
- , e = 18 * this.multiple
- , i = [];
- return this.local.forEach((function(n) {
- if (!i.find((function(t) {
- return ~t.body.indexOf(n)
- }
- ))) {
- var g = t.local.filter((function(t) {
- return n !== t && C.lineDis({
- points: [n, t]
- }) < e
- }
- ));
- g.length > 0 && i.push({
- head: n,
- body: g
- })
- }
- }
- )),
- i
- }
- ,
- e.prototype.notice = function() {
- 0 !== this.dialog ? this.real.appendChild(this.dialogLayer) : I(this.real, this.dialogLayer) && this.real.removeChild(this.dialogLayer)
- }
- ,
- e.prototype.intercept = function(t, e) {
- var i = this
- , n = e.active;
- if (!n)
- return !0;
- var g = this.calcGroup().find((function(t) {
- var e = t.head
- , i = t.body;
- return e === n || ~i.indexOf(n)
- }
- ));
- if (this.nextTick((function() {
- i.dialog = g ? {
- pos: g.head,
- items: A(g.body)
- } : 0
- }
- )),
- this.active && this.items[this.local.indexOf(this.active)]) {
- var r = this.items[this.local.indexOf(this.active)]
- , o = r.querySelector("circle");
- r.querySelector("text").setAttribute("fill", "#fff"),
- o.setAttribute("stroke", "#fff"),
- r.setAttribute("class", "active")
- }
- return !0
- }
- ,
- e.prototype.setActive = function(t) {
- this.active = t
- }
- ,
- e.prototype.click = function(t) {
- t.stopPropagation();
- for (var e = 0; e < this.items.length; e++)
- if (I(this.items[e], t.target) || t.target === this.items[e]) {
- this.setActive(this.local[e]);
- break
- }
- }
- ,
- e.prototype.destroy = function() {
- this.renderer.layer.removeEventListener("click", this.layerClick)
- }
- ,
- e
- }(r.CADElement);
- e.default = s
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- , g = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- }),
- i(25);
- var A = g(i(26))
- , r = i(39)
- , o = i(40)
- , C = i(46)
- , I = i(48)
- , s = i(22)
- , a = i(51)
- , l = i(52)
- , u = i(53)
- , c = i(55)
- , h = i(56)
- , p = g(i(57))
- , d = i(58)
- , f = g(i(7));
- e.Column = f.default;
- var y = g(i(8));
- e.Door = y.default;
- var v = g(i(11));
- e.Casement = v.default;
- var m = i(2)
- , b = g(i(23))
- , x = g(i(59))
- , _ = g(i(63))
- , w = m.CADElement.prototype.listen;
- m.CADElement.prototype.listen = function() {
- for (var t = this, e = [], i = 0; i < arguments.length; i++)
- e[i] = arguments[i];
- var g = this.render.processing.cad.edits.some((function(e) {
- return t instanceof e
- }
- ));
- (g || this.render.processing.cad.edit || this instanceof b.default) && w.call.apply(w, n([this], e))
- }
- ;
- var P = f.default.prototype.addEvent;
- function O(t) {
- var e = t.data
- , i = t.layer
- , n = t.edit
- , g = void 0 === n || n
- , f = t.padding
- , y = void 0 === f ? 20 : f
- , v = new A.default({
- dom: i,
- padding: y
- });
- return v.edit = g,
- r.attachInsert(v),
- g ? (s.attchTransform(v),
- s.attchStack(v),
- s.autoPreservation(v),
- a.attchDOMTranform(v),
- l.attachDisabled(v),
- p.default(v)) : (s.attchTransform(v),
- a.attchDOMTranform(v)),
- h.attchCustom(v),
- c.attachStyle(v),
- I.attachScreenshot(v),
- C.attachSign(v),
- o.attachGauge(v),
- u.attachRote(v),
- g && (v.openMouseHandle(),
- v.showGauge()),
- d.other(v),
- x.default(v),
- v.loadData(e),
- v.toCanvas = function(t) {
- return _.default(v, t)
- }
- ,
- v
- }
- f.default.prototype.addEvent = function() {
- for (var t = this, e = [], i = 0; i < arguments.length; i++)
- e[i] = arguments[i];
- var g = this.render.processing.cad.edits.some((function(e) {
- return t instanceof e
- }
- ));
- (g || this.render.processing.cad.edit) && P.call.apply(P, n([this], e))
- }
- ,
- e.structureCAD = O,
- e.default = O,
- window.structureCAD = O
- }
- , function(t, e) {
- !function() {
- try {
- if ("undefined" == typeof SVGElement || Boolean(SVGElement.prototype.innerHTML))
- return
- } catch (t) {
- return
- }
- function t(e) {
- switch (e.nodeType) {
- case 1:
- return function(e) {
- var i = "";
- i += "<" + e.tagName,
- e.hasAttributes() && [].forEach.call(e.attributes, (function(t) {
- i += " " + t.name + '="' + t.value + '"'
- }
- ));
- i += ">",
- e.hasChildNodes() && [].forEach.call(e.childNodes, (function(e) {
- i += t(e)
- }
- ));
- return i += "</" + e.tagName + ">"
- }(e);
- case 3:
- return function(t) {
- return t.textContent.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")
- }(e);
- case 8:
- return function(t) {
- return "\x3c!--" + t.nodeValue + "--\x3e"
- }(e)
- }
- }
- Object.defineProperty(SVGElement.prototype, "innerHTML", {
- get: function() {
- var e = "";
- return [].forEach.call(this.childNodes, (function(i) {
- e += t(i)
- }
- )),
- e
- },
- set: function(t) {
- for (; this.firstChild; )
- this.removeChild(this.firstChild);
- try {
- var e = new DOMParser;
- e.async = !1;
- var i = "<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>" + t + "</svg>"
- , n = e.parseFromString(i, "text/xml").documentElement;
- [].forEach.call(n.childNodes, function(t) {
- this.appendChild(this.ownerDocument.importNode(t, !0))
- }
- .bind(this))
- } catch (t) {
- throw new Error("Error parsing markup string")
- }
- }
- }),
- Object.defineProperty(SVGElement.prototype, "innerSVG", {
- get: function() {
- return this.innerHTML
- },
- set: function(t) {
- this.innerHTML = t
- }
- })
- }()
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var g = i(3)
- , A = n(i(27))
- , r = i(2)
- , o = function() {
- function t(t) {
- var e = this
- , i = t.dom
- , n = t.padding
- , g = void 0 === n ? 20 : n;
- this.processings = [],
- Object.defineProperty(this, "processing", {
- get: function() {
- return this.processings.find((function(t) {
- return t.show
- }
- ))
- }
- }),
- this.layer = i,
- this.padding = g,
- this.isDestroy = !1,
- this.resizeHandle = function() {
- return e.processing.data && e.adapt(e.processing.data)
- }
- ,
- this.init()
- }
- return t.prototype.addProcessing = function() {
- var t = new A.default({
- dom: this.layer
- });
- return t.cad = this,
- this.processings.push(t),
- t
- }
- ,
- t.prototype.delProcessing = function(t) {
- t.render.elements.forEach((function(t) {
- return t.destroy()
- }
- )),
- this.processings.splice(this.processings.indexOf(t), 1)
- }
- ,
- t.prototype.adapt = function(t, e, i, n) {
- void 0 === t && (t = this.processing.data);
- var A = this.processings.find((function(e) {
- return e.data.id === t.id
- }
- ));
- e = e || A.render.layer.offsetWidth || parseInt(getComputedStyle(A.render.layer).width) || 100,
- i = i || A.render.layer.offsetHeight || parseInt(getComputedStyle(A.render.layer).height) || 100,
- 0 === t.vertex.length ? A.render.props = g.getMapMultipleWH(e, i, {
- vertex: [{
- x: -15,
- y: -15
- }, {
- x: -15,
- y: 15
- }, {
- x: 15,
- y: -15
- }, {
- x: 15,
- y: 15
- }]
- }, this.padding) : (e && i && (A.render.props = g.getMapMultipleWH(e, i, t, this.padding)),
- A.render.props.scale <= 0 && (A.render.props = {
- width: 0,
- height: 0,
- multiple: 0,
- scale: 1,
- top: 0,
- left: 0
- })),
- A.render.adaptLayer(e, i),
- r.CADElement.update(A.render)
- }
- ,
- t.prototype.init = function() {
- window.addEventListener("resize", this.resizeHandle, !1)
- }
- ,
- t.prototype.destroy = function() {
- for (var t in window.removeEventListener("resize", this.resizeHandle, !1),
- this.processing.destroy(),
- this.processing = null,
- this.isDestroy = !0,
- this)
- "function" == typeof this[t] ? this[t] = function() {}
- : delete this[t]
- }
- ,
- t
- }();
- e.default = o
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__assign || function() {
- return (n = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , g = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- , A = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var r = A(i(28))
- , o = i(31)
- , C = i(36)
- , I = i(37)
- , s = i(38)
- , a = function() {
- function t(t) {
- var e = t.dom;
- this.render = new r.default({
- layer: e,
- processing: this
- }),
- this.id = 1,
- this.points = [],
- this.lines = [],
- this.cases = [],
- this.doors = [],
- this.columns = [],
- this.slideDoors = [],
- this.groundCases = [],
- this.taggings = [],
- this.bayCases = [],
- this.furnColumns = [],
- this.furnFlues = [],
- this.doubleDoors = [],
- this.manageShow()
- }
- return t.prototype.manageShow = function() {
- var t = this
- , e = !1;
- Object.defineProperty(this, "show", {
- get: function() {
- return e
- },
- set: function(i) {
- console.log("---------", e),
- e = i,
- t.render.svg.style.display = e ? "block" : "none"
- }
- })
- }
- ,
- t.prototype.rep = function(t) {
- var e = this;
- this.attrs.forEach((function(i) {
- var n = e[i].findIndex((function(e) {
- return e.ele === t
- }
- ));
- ~n && (t.__id = e[i][n] && e[i][n].id,
- e[i].splice(n, 1))
- }
- )),
- this.render || console.error("掉用 rep"),
- this.render && this.render.remove(t)
- }
- ,
- t.prototype.retrofitElementDestroy = function(t) {
- var e = this
- , i = t.destroy;
- t.__load_destroy || (t.__load_destroy = !0,
- t.destroy = function() {
- for (var n = [], A = 0; A < arguments.length; A++)
- n[A] = arguments[A];
- n[0] ? e.rep(t) : t.nextTick((function() {
- return e.rep(t)
- }
- )),
- i.call.apply(i, g([t], n)),
- t.__load_destroy = !1
- }
- )
- }
- ,
- t.prototype.updateWallPoints = function(t, e, i) {}
- ,
- t.prototype.retrofitElementIntercept = function(t) {}
- ,
- t.prototype.depLines = function() {
- for (var t, e = g(this.lines), i = function(i) {
- var n = e[i].ele
- , g = e.some((function(t) {
- var e = t.ele;
- return n !== e && (n.points[0] === e.points[0] && n.points[1] === e.points[1] || n.points[1] === e.points[0] && n.points[0] === e.points[1])
- }
- ));
- (n.points[0] === n.points[1] || g) && (e[i].ele.destroy(),
- e.splice(i--, 1)),
- t = i
- }, n = 0; n < e.length; n++)
- i(n),
- n = t
- }
- ,
- t.prototype.destroy = function() {
- var t = this
- , e = this.attrs.map((function(e) {
- return t[e]
- }
- ));
- this.data = {
- id: 1,
- show: !0,
- vertex: [],
- wall: [],
- window: [],
- column: [],
- door: [],
- surplus: [],
- slideDoor: [],
- tagging: [],
- groundCase: [],
- bayCase: [],
- doubleDoor: [],
- furnColumn: [],
- furnFlue: [],
- dire: 0
- },
- e.forEach((function(t) {
- for (; t.length; )
- t[0].ele.destroy(!0)
- }
- )),
- this.render.destroy(),
- this.render = null
- }
- ,
- t
- }();
- e._Processing = a,
- e.default = a;
- var l = n(n(n(n({}, o.methods), C.methods), I.methods), s.methods);
- Object.keys(l).forEach((function(t) {
- return a.prototype[t] = l[t]
- }
- ))
- }
- , function(t, e, i) {
- "use strict";
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var n = i(2)
- , g = i(1)
- , A = function() {
- function t(t) {
- var e = this
- , i = t.layer
- , g = t.width
- , A = void 0 === g ? i.offsetWidth : g
- , r = t.height
- , o = void 0 === r ? i.offsetHeight : r
- , C = t.processing;
- this.clickHandle = function() {
- e.elements.forEach((function(t) {
- return t.changeSelect(!1)
- }
- ))
- }
- ,
- n.CADElement.init(this),
- this.props = {
- left: 0,
- top: 0,
- width: A,
- height: o,
- multiple: 1,
- scale: 1
- },
- this.elements = [],
- this.processing = C,
- this.init(i)
- }
- return t.prototype.init = function(t) {
- this.svg = document.createElementNS(g.SVGURI, "svg"),
- this.g = document.createElementNS(g.SVGURI, "g"),
- this.svg.appendChild(this.g),
- this.layer = t,
- this.layer.style.position = "relative",
- this.svg.style.position = "absolute",
- this.svg.style.left = "0",
- this.svg.style.top = "0",
- this.svg.style.right = "0",
- this.svg.style.bottom = "0",
- this.svg.setAttribute("version", "1.0"),
- this.svg.setAttribute("xmlns", "http://www.w3.org/2000/svg"),
- this.svg.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"),
- this.svg.addEventListener("click", this.clickHandle, !1),
- this.layer.appendChild(this.svg)
- }
- ,
- t.prototype.adaptLayer = function(t, e) {
- void 0 === t && (t = this.layer.offsetWidth),
- void 0 === e && (e = this.layer.offsetHeight);
- var i = this.props.width / 2 - this.props.left
- , g = this.props.height / 2 - this.props.top;
- this.g.setAttribute("transform", "\n translate(" + this.props.left + "," + this.props.top + ")\n translate(" + i + "," + g + ")\n scale(" + this.props.scale + "," + this.props.scale + ")\n translate(" + -i + "," + -g + ")\n "),
- this.svg.setAttribute("width", t.toString()),
- this.svg.setAttribute("height", e.toString()),
- this.svg.setAttribute("viewBox", "0 0 " + this.props.width + " " + this.props.height),
- this.realWidth = t,
- this.realHeight = e,
- n.CADElement.update(this)
- }
- ,
- t.prototype.render = function() {
- n.CADElement.update(this)
- }
- ,
- t.prototype.screenToRealPoint = function(t) {
- var e = t.x
- , i = t.y
- , n = this.props.width / 2 - this.props.left
- , g = this.props.height / 2 - this.props.top
- , A = this.props.width / this.props.multiple
- , r = this.props.height / this.props.multiple;
- return 0 == A || 0 == r ? {
- x: n,
- y: g
- } : {
- x: (e * this.props.width / A - this.props.left - n) / this.props.scale + n,
- y: (i * this.props.height / r - this.props.top - g) / this.props.scale + g
- }
- }
- ,
- t.prototype.realPointToScreen = function(t) {
- var e = t.x
- , i = t.y
- , n = this.props.width / 2 - this.props.left
- , g = this.props.height / 2 - this.props.top
- , A = this.props.width / this.props.multiple
- , r = this.props.height / this.props.multiple;
- return {
- x: ((e - n) * this.props.scale + n + this.props.left) * A / this.props.width,
- y: ((i - g) * this.props.scale + g + this.props.top) * r / this.props.height
- }
- }
- ,
- t.prototype.push = function() {
- for (var t = this, e = [], i = 0; i < arguments.length; i++)
- e[i] = arguments[i];
- e.forEach((function(e) {
- var i = t.elements.find((function(t) {
- return t.zIndex > e.zIndex
- }
- ));
- if (i) {
- try {
- t.g.insertBefore(e.real, i.real)
- } catch (i) {
- t.g.appendChild(e.real)
- }
- t.elements.splice(t.elements.indexOf(i), 0, e)
- } else
- t.g.appendChild(e.real),
- t.elements.push(e)
- }
- ))
- }
- ,
- t.prototype.remove = function() {
- for (var t = this, e = [], i = 0; i < arguments.length; i++)
- e[i] = arguments[i];
- e.forEach((function(e) {
- try {
- t.g.removeChild(e.real)
- } catch (t) {}
- ~t.elements.indexOf(e) && t.elements.splice(t.elements.indexOf(e), 1)
- }
- ))
- }
- ,
- t.prototype.destroy = function() {
- this.svg.removeEventListener("click", this.clickHandle, !1),
- this.layer.removeChild(this.svg)
- }
- ,
- t
- }();
- e.default = A
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__assign || function() {
- return (n = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , g = this && this.__awaiter || function(t, e, i, n) {
- return new (i || (i = Promise))((function(g, A) {
- function r(t) {
- try {
- C(n.next(t))
- } catch (t) {
- A(t)
- }
- }
- function o(t) {
- try {
- C(n.throw(t))
- } catch (t) {
- A(t)
- }
- }
- function C(t) {
- var e;
- t.done ? g(t.value) : (e = t.value,
- e instanceof i ? e : new i((function(t) {
- t(e)
- }
- ))).then(r, o)
- }
- C((n = n.apply(t, e || [])).next())
- }
- ))
- }
- , A = this && this.__generator || function(t, e) {
- var i, n, g, A, r = {
- label: 0,
- sent: function() {
- if (1 & g[0])
- throw g[1];
- return g[1]
- },
- trys: [],
- ops: []
- };
- return A = {
- next: o(0),
- throw: o(1),
- return: o(2)
- },
- "function" == typeof Symbol && (A[Symbol.iterator] = function() {
- return this
- }
- ),
- A;
- function o(A) {
- return function(o) {
- return function(A) {
- if (i)
- throw new TypeError("Generator is already executing.");
- for (; r; )
- try {
- if (i = 1,
- n && (g = 2 & A[0] ? n.return : A[0] ? n.throw || ((g = n.return) && g.call(n),
- 0) : n.next) && !(g = g.call(n, A[1])).done)
- return g;
- switch (n = 0,
- g && (A = [2 & A[0], g.value]),
- A[0]) {
- case 0:
- case 1:
- g = A;
- break;
- case 4:
- return r.label++,
- {
- value: A[1],
- done: !1
- };
- case 5:
- r.label++,
- n = A[1],
- A = [0];
- continue;
- case 7:
- A = r.ops.pop(),
- r.trys.pop();
- continue;
- default:
- if (!(g = (g = r.trys).length > 0 && g[g.length - 1]) && (6 === A[0] || 2 === A[0])) {
- r = 0;
- continue
- }
- if (3 === A[0] && (!g || A[1] > g[0] && A[1] < g[3])) {
- r.label = A[1];
- break
- }
- if (6 === A[0] && r.label < g[1]) {
- r.label = g[1],
- g = A;
- break
- }
- if (g && r.label < g[2]) {
- r.label = g[2],
- r.ops.push(A);
- break
- }
- g[2] && r.ops.pop(),
- r.trys.pop();
- continue
- }
- A = e.call(t, r)
- } catch (t) {
- A = [6, t],
- n = 0
- } finally {
- i = g = 0
- }
- if (5 & A[0])
- throw A[1];
- return {
- value: A[0] ? A[1] : void 0,
- done: !0
- }
- }([A, o])
- }
- }
- }
- , r = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var o = i(3)
- , C = function() {
- function t(t, e) {
- var i = this
- , n = e.notice
- , C = e.intercept
- , I = e.childAttr
- , s = e.afferent;
- return this.updateNotices = [],
- this.changeNotices = [],
- this.getSubAll = function() {
- var t = [];
- return i.subscribe.forEach((function(e) {
- t.push.apply(t, e.getSubAll())
- }
- )),
- r(i.subscribe, t)
- }
- ,
- this.data = t,
- this.subscribe = [],
- this.updateKeys = new Set,
- this.attrs = [],
- this.intercept = C,
- this.afferent = s,
- this.notice = n,
- this.direct = !1,
- this.childAttr = I,
- this.deleteUpdateKey = this.deleteUpdateKey.bind(this),
- this.addUpdateKey = this.addUpdateKey.bind(this),
- this.changeNotices = [],
- this.setHandle = o.debounce((function(t) {
- return g(i, void 0, void 0, (function() {
- var e;
- return A(this, (function(i) {
- switch (i.label) {
- case 0:
- return [4, this.setVal.apply(this, t)];
- case 1:
- return e = i.sent(),
- Object.keys(t[4]).forEach(this.deleteUpdateKey),
- this.noticeTick(),
- this.noticeAll(e || {
- args: {}
- }),
- e && this.noticeChange(),
- [2]
- }
- }
- ))
- }
- ))
- }
- ), 0, (function(t) {
- var e = t[0][0]
- , i = e.sub
- , n = e.current
- , g = e.state
- , A = e.childAttr
- , r = {};
- return t.forEach((function(t) {
- var e = t[0]
- , i = e.key
- , n = e.val;
- return r[i] = n
- }
- )),
- [i, n, g, A, r]
- }
- ), (function() {
- i.changeNotices = []
- }
- )),
- this
- }
- return t.prototype.addUpdateKey = function(t) {
- var e = this;
- this.updateKeys.add(t),
- this.subscribe.forEach((function(t) {
- t.updateKeys.has(e) || t.addUpdateKey(e)
- }
- ))
- }
- ,
- t.prototype.deleteUpdateKey = function(t) {
- var e = this;
- this.updateKeys.delete(t),
- 0 === this.updateKeys.size && (this.subscribe.forEach((function(t) {
- t.deleteUpdateKey(e)
- }
- )),
- this.test && this.test())
- }
- ,
- t.prototype.noticeTick = function() {
- if (0 === this.updateKeys.size)
- for (; this.updateNotices.length; )
- this.updateNotices.shift()();
- this.subscribe.forEach((function(t) {
- return t.noticeTick()
- }
- ))
- }
- ,
- t.prototype.noticeChange = function() {
- for (; this.changeNotices.length; )
- this.changeNotices.shift()();
- this.subscribe.forEach((function(t) {
- return t.noticeChange()
- }
- ))
- }
- ,
- t.prototype.nextTick = function(t) {
- var e = this;
- setTimeout((function() {
- 0 === e.updateKeys.size ? t() : (e.updateNotices.push(t),
- setTimeout((function() {
- if (~e.updateNotices.indexOf(t)) {
- e.updateNotices.slice(e.updateNotices.indexOf(t), 1);
- t()
- }
- }
- ), 200))
- }
- ))
- }
- ,
- t.prototype.nextChange = function(t) {
- this.changeNotices.push(t)
- }
- ,
- t.prototype.interceptAll = function(t) {
- return g(this, void 0, void 0, (function() {
- var e, i, n, g, C, I;
- return A(this, (function(A) {
- for (e = [],
- i = [],
- g = r([this], this.getSubAll()),
- C = void 0,
- I = 0; C = g[I]; I++)
- if (i.push(C.afferent),
- C.intercept) {
- if (n = C.intercept(i, t, e),
- e.push(n),
- o.type.isBoolean(n) && !n)
- return [2, !1]
- } else
- e.push(void 0);
- return [2, e]
- }
- ))
- }
- ))
- }
- ,
- t.prototype.noticeAll = function(t) {
- t = n(n({}, t), {
- state: {
- data: this.afferent || this,
- trigger: t.state,
- ret: void 0
- }
- });
- var e = this.notice(t);
- t.state.ret = e;
- for (var i = 0; i < this.subscribe.length; i++)
- this.subscribe[i].noticeAll(t);
- return t
- }
- ,
- t.prototype.bindDataChange = function() {
- var t = this;
- this.__firstBind = !0,
- Object.keys(this.data).forEach((function(e) {
- t.attrs.push(e),
- t.bindItem(t, t, t.data, e, t.childAttr)
- }
- )),
- this.__firstBind = !1
- }
- ,
- t.prototype.getSeftSub = function() {
- return [this, this.subscribe.flatMap((function(t) {
- return t.getSeftSub()
- }
- ))]
- }
- ,
- t.prototype.setVal = function(t, e, i, r, C) {
- return g(this, void 0, void 0, (function() {
- var g, I, s, a = this;
- return A(this, (function(A) {
- switch (A.label) {
- case 0:
- return g = {
- args: C
- },
- !o.type.isUndefined(C.x) && o.type.isUndefined(C.y) ? C.y = this.afferent.y : !o.type.isUndefined(C.y) && o.type.isUndefined(C.x) && (C.x = this.afferent.x),
- [4, t.interceptAll(C)];
- case 1:
- return (I = A.sent()) ? (s = n({}, C),
- I.forEach((function(t) {
- return s = n(n({}, s), t)
- }
- )),
- Object.keys(i).forEach((function(n) {
- s.hasOwnProperty(n) && i[n] !== s[n] && (a.relieveOldSubs(i[n], r),
- i[n] = s[n],
- a.continueListen(t, e, i, n, r, s[n]))
- }
- )),
- [2, g]) : [2, null]
- }
- }
- ))
- }
- ))
- }
- ,
- t.prototype.relieveOldSubs = function(e, i) {
- var n = this;
- o.type.isUndefined(e) || (e instanceof t || i && e[i]instanceof t ? this.relieveOldSub(e, i) : o.type.isArray(e) ? e.forEach((function(t, e) {
- n.relieveOldSub(t, i)
- }
- )) : o.type.isObject(e) && Object.values(e).forEach((function(t) {
- n.relieveOldSub(t, i)
- }
- )))
- }
- ,
- t.prototype.relieveOldSub = function(e, i) {
- e instanceof t ? e.subscribe.splice(e.subscribe.indexOf(this), 1) : i && e[i]instanceof t && e[i].subscribe.splice(e[i].subscribe.indexOf(this), 1)
- }
- ,
- t.prototype.continueListen = function(e, i, n, g, A, r) {
- var C = this;
- o.type.isNull(r) || o.type.isUndefined(r) || (r instanceof t || A && r[A]instanceof t ? ~(r instanceof t ? r : r[A]).subscribe.indexOf(e) || this.bindItem(e, i[g], n, g, A, !0) : o.type.isArray(r) ? r.forEach((function(t, n) {
- C.bindItem(e, i[g], r, n, A, !0)
- }
- )) : o.type.isObject(r) && Object.keys(n[g]).forEach((function(t) {
- C.bindItem(e, i[g], r, t, A, !0)
- }
- )))
- }
- ,
- t.prototype.bindItem = function(e, i, n, g, A, r) {
- void 0 === r && (r = !1),
- n instanceof t ? n.subscribe.push(e) : A && n[g] && n[g][A]instanceof t && n[g][A].subscribe.push(e),
- r || (Object.defineProperty(i, g, {
- get: function() {
- return n[g]
- },
- set: function(t) {
- this.__firstBind || this.direct ? (n[g] = t,
- this.continueListen(e, i, n, g, A, t)) : (this.addUpdateKey(g),
- this.setHandle({
- sub: e,
- current: i,
- state: n,
- key: g,
- childAttr: A,
- val: t
- }))
- }
- }),
- this.continueListen(e, i, n, g, A, n[g]))
- }
- ,
- t
- }();
- e._State = C,
- e.getter = function(t, e) {
- e.attrs.forEach((function(i) {
- Object.defineProperty(t, i, {
- configurable: !0,
- get: function() {
- return e[i]
- }
- })
- }
- ))
- }
- ,
- e.setter = function(t, e) {
- e.attrs.forEach((function(i) {
- Object.defineProperty(t, i, {
- configurable: !0,
- set: function(t) {
- e[i] = t
- }
- })
- }
- ))
- }
- ,
- e.State = C
- }
- , function(t, e, i) {
- "use strict";
- Object.defineProperty(e, "__esModule", {
- value: !0
- }),
- e.default = {
- menu: {
- __name: "菜单",
- music: "背景音乐",
- base: "基础设置",
- information: "场景信息",
- screen: "初始画面",
- hotspot: "添加热点",
- guide: "自动导览",
- sign: "地面Logo",
- walk: "漫游可行",
- model: "3D模型",
- cad: "户型图",
- data: "数据对接",
- custom: "上传下载",
- videos: "添加视频",
- vrhouse: "看房 4Dkankan",
- business: "看店 4Dkankan",
- scene: "场景跳转",
- video: "添加视频",
- decor: "一键换装",
- link: "场景关联"
- },
- modules: {
- __name: "模块",
- base: {
- __name: "基础设置",
- qrcode: "场景二维码",
- qrcode_download: "下载二维码",
- qrcode_tips: "自定义logo",
- scene_link: "场景地址",
- scene_link_copy: "复制链接",
- scene_link_copy_tips: "场景链接复制成功",
- bgm: "背景音乐",
- pano_text: "漫游视角可视",
- mode_2d_text: "平面图可视",
- mode_3d_text: "三维模型可视",
- map_text: "小地图预览可视",
- vr_text: "VR模式可视",
- vr_tips: "请在手机展示页面观看VR效果",
- guide_text: "自动导览可视",
- rule_text: "标尺可视",
- cad_text: "俯视图户型可视",
- measure_text: "测量工具可视",
- measure_tips: "编辑模式下无法使用测距功能,请在展示页面操作",
- turned_vr: "VR功能已{status}",
- turned_map: "小地图功能已{status}",
- turned_cad: "俯视图户型功能已{status}",
- turned_m2d: "平面视角功能已{status}",
- turned_m3d: "三维视角功能已{status}",
- turned_pano: "漫游视角功能已{status}",
- turned_rule: "标尺功能已{status}",
- turned_guide: "自动导览功能已{status}",
- turned_measure: "测距功能已{status}",
- shortcut_copy: "一键复制",
- share_link: "分享链接给好友",
- measure_show_tips: "请在展示页面使用测距功能",
- delete_measure_line: "删除测量线",
- please_click_tips: "'请点击“允许”'",
- vr_fail_app_tips: "浏览器未能检测到转动。请在手机或浏览器设置中开启了运动和方向访问等设置,然后刷新此页面。",
- vr_fail_safari_tips: "浏览器未能检测到转动。为完整体验VR效果,请打开 “设置” > “Safari” > “隐私和安全” 下的 “运动和方向访问” 开关,然后刷新此页面。",
- loading_bottom_text: "四维时代提供技术支持",
- vr_fail_reopen_tips: "运动和方向访问失败。您需要完全关闭此应用,然后再次打开,并允许访问运动与方向",
- add_music_title: "添加背景音乐",
- add_music_tips: "支持MP3、WAV等音频格式,不超过5MB",
- re_add_music: "重新添加",
- re_add_title: "重新添加背景音乐",
- re_add_tips: "新添加的音乐会替换已添加的音乐,<br>确定继续添加吗?",
- re_add_mobile_tips: "重新添加将会覆盖已添加音乐",
- delete_tips: "您确定删除当前音乐吗?",
- delete_title: "删除背景音乐",
- bgm_empty_tips: "请选择背景音乐",
- wechat: "微信",
- friend_circle: "朋友圈"
- },
- information: {
- __name: "场景信息",
- title: "标题",
- title_tips: "请填写标题",
- title_require: "请添加标题({limit}字以内)",
- description: "简介",
- description_tips: "请填写简介",
- link: "添加链接",
- link_text_tips: "请填写链接文本",
- link_href_tips: "请填写链接地址",
- link_text_require: "请填写链接文本",
- link_href_require: "请填写链接地址",
- classify: "分类",
- upload_time: "上传时间",
- record: "未记录",
- shoot_count: "拍摄数量",
- password: "访问密码",
- password_tips: "访问密码",
- password_desc: "设置完密码后,当其他人访问您的场景时,需要输入您设置的密码才能访问。如无需设置点击“公开”即可。",
- password_require: "请输入{limit}位数的密码",
- logo_edit: "编辑页面Logo",
- logo_exit: "退出页面Logo编辑",
- logo_show_bottom: "显示初始Logo",
- logo_style1: "顶部Logo-方",
- logo_style2: "顶部Logo-长",
- logo_delete: "是否删除已上传Logo?"
- },
- screen: {
- __name: "初始画面",
- current: "当前初始视角",
- current_set: "设置为初始画面",
- tips: "移动屏幕,点击保存您的初始画面。"
- },
- hotspot: {
- __name: "添加热点",
- add: "添加热点",
- edit: "编辑热点",
- count: "已添加热点",
- location: "热点定位",
- location_tips: "将热点标记并拖动到合适的位置。",
- location_modify: "修改热点位置",
- location_confirm: "确定热点位置",
- location_desc: "请于左方两个场景区域拖动热点并对准所需标记的位置。",
- style: "选择热点样式",
- style_desc: "选择默认样式,或者手动上传图片自定义样式,上传图片格式PNG/JPG",
- style_name: "样式",
- style_dele: "是否删除该样式?",
- style_manage: "管理",
- style_exit: "退出",
- media_photo: "可添加图片以丰富热点内容",
- media_video: "可上传本地视频,进行更多的展示",
- media_voice: "可上传本地音频内容进行热点讲解",
- media_link: "可添加视频的超链接,视频将在热点里播放",
- title: "标题",
- title_tips: "请填写标题",
- title_require: "请添加标题({limit}字以内)",
- description: "简介",
- description_tips: "请填写简介",
- text_link: "添加链接",
- text_link_text_tips: "请填写链接文本",
- text_link_href_tips: "请填写链接地址",
- text_link_text_require: "链接文本不能为空",
- text_link_href_require: "链接地址不能为空",
- link: "嵌入式链接",
- link_require: "请添加外链",
- photo: "图片",
- voice: "音频",
- video: "视频",
- photo_tips: "支持JPG、PNG等图片格式,不超过{size}MB",
- voice_tips: "支持MP3、WAV等音频格式,不超过{size}MB",
- video_tips: "支持MP4、MOV等视频格式,不超过{size}MB",
- photo_require: "请添加图片",
- voice_require: "请添加音频",
- video_require: "请添加视频",
- m_location_tips1: "将上下分屏热点对准同一个所标记目标",
- m_location_tips2: "确定热点位置,点击下一步编辑内容",
- m_location_up: "上方",
- m_location_left: "左侧",
- m_location_move_tips: "辅助校准位置可能不准确,<br>请检查并拖动到{direction}相同位置",
- set_visible_btn: "设置热点可视",
- save_visible_btn: "保存当前设置",
- save_hotspot_done: "保存热点成功",
- save_hotspot_fail: "保存热点失败",
- delete_hotspot_tips: "是否删除当前热点?",
- delete_hotspot_done: "热点删除成功",
- delete_hotspot_fail: "热点删除失败",
- cant_add_hotspot_tips: "无法添加热点",
- cant_add_hotspot_content: "热点数目已达最大:{limit}",
- link_text_tips: "链接标题",
- link_href_tips: "链接",
- link_text_require: "请填写链接文本",
- link_href_require: "请填写链接地址",
- add_media: "添加多媒体"
- },
- guide: {
- __name: "自动导览",
- route: "导航路线",
- view: "切换视角",
- record: "开始录制",
- record_audio: "录音",
- pause: "暂停",
- stop: "停止",
- end: "结束",
- delete: "删除",
- continue: "继续录制",
- preview: "预览",
- clear: "清空",
- sync: "声画同步",
- sound: "录制音频",
- file: "上传音频",
- file_add: "添加音频",
- tips: "点击开始录制导览",
- start: "开始",
- finish: "完成录制",
- less: "小于",
- replace_tips: "是否重新录制导览?",
- replace_content: "重新录制将覆盖之前的数据",
- sound_open_fail_tips: "麦克风开启失败",
- sound_tips: "麦克风开启失败,是否继续录制?",
- sound_content: "您需要在浏览器的设置中允许此网站使用麦克风,并且添加麦克风设备,然后刷新该页面。",
- upload_sound_done: "上传语音讲解成功",
- upload_sound_fail: "上传语音讲解失败",
- delete_sound_done: "删除语音讲解成功",
- delete_sound_fail: "删除语音讲解失败",
- room_title: "标题",
- room_title_tips: "请输入导览标题",
- room_title_require: "请输入标题",
- room_panel_title: "导览信息",
- room_sound_title: "录制音频",
- delete_video_content: "您当前录制的画面将会被删除",
- delete_file_content: "您当前上传的语音讲解将会被删除",
- delete_sound_content: "已录制配音将会被删除",
- camera_save_success: "镜头保存成功",
- clear_video_tip: "您当前录制的内容将会被清空",
- saving_sound: "正在保存录音",
- save_sound_done: "录音保存成功",
- save_sound_fail: "录音保存失败",
- no_sound_tips: "当前不支持录音<br>可在微信或电脑端录音",
- sound_success_tips: "麦克风开启成功",
- sound_fail_tips: "当前不支持录音<br>公众号信息配置错误",
- wechat_sound_fail_tips: "微信麦克风开启失败",
- open_sound_guide_tips: "可能您若要开启录音,请于微信的设置—隐私—授权管理中开启。且保证录音设备正常",
- sound_cant_open_tips: "此浏览器不支持录音。<br>建议更换其他主流浏览器,体验更佳",
- replace_sound_tips: "是否重新录制?",
- replace_sound_content: "已有语音讲解将会被替换",
- merge_sound_fail: "合并语音讲解失败",
- sound_limit: "录制时长为{time}分钟,当前已经达到上限",
- select_to_record: "请选择对应点位进行本区域的导览录制"
- },
- sign: {
- title: "Logo样式",
- size: "Logo大小",
- style0: "样式一",
- style1: "样式二",
- style2: "样式三",
- style3: "手动上传"
- },
- walk: {
- title: "漫游可行",
- tips1: "通过设置漫游可行,进一步优化在漫游时出现的体验;例如,您在漫游时,出现穿透房间的情况。",
- tips2: "通过点选各个漫游点的连线即可设置漫游点的可行性。",
- save: "保存当前设置",
- hide: "隐藏该点位置",
- show: "显示该点位置",
- pano_tips: "提示:您隐藏了初始画面点位,此操作将使进入场景后无法漫游。"
- },
- model: {
- __name: "3D模型",
- cad: "CAD视角",
- cad_download: "平面图下载",
- view: "切换视角",
- title: "增添结构",
- title_door: "门窗类",
- title_component: "构建类",
- title_other: "其他",
- attribute: "属性",
- door: "门",
- double_door: "门",
- slideDoor: "移门",
- casement: "窗",
- bayCase: "飘窗",
- groundCase: "落地窗",
- column: "柱子",
- furnColumn: "框架柱",
- furnFlue: "烟道",
- point: "点",
- line: "墙",
- tagging: "标注",
- tagging_name_tips: "请输入名称",
- tagging_area_tips: "输入面积,支持小数点后面两位",
- direction: "指南针",
- wallLine: "墙属性",
- widget_delete: "{widget}将被删除",
- panel_btn_default: "恢复默认",
- panel_btn_delete: "删除部件",
- attr_angle: "旋转角度",
- attr_within: "翻转方向",
- attr_ewidth: "宽度",
- attr_eheight: "高度",
- attr_tick: "厚度",
- attr_showTitle: "标注名称",
- attr_showContent: "标注面积",
- attr_top: "顶部",
- attr_bottom: "底部",
- attr_estart: "入户门",
- success: "成功添加{widget}",
- error_location: "当前位置无法添加{widget}",
- error_outdoor: "户外无法添加{widget}",
- error_something: "当前位置点有建筑,无法添加{widget}",
- error_widget: "当前位置不可添加{widget}",
- enter_adjust_floor: "进入地面高度调节模式",
- exit_adjust_floor: "退出地面高度调节模式",
- color_title: "量角器颜色:"
- },
- cad: {
- __name: "户型图",
- name: "户型图",
- no_tip: "不再提示",
- reset: "重置",
- cad_download: "户型图下载",
- cad_download_ing: "下载中…",
- label_tip: "点击右键或Esc键可以退出添加标注。",
- wall_tip: "点击右键或Esc键可以退出画墙。",
- save_undf_tip: "无法保存空户型图。",
- reload_tip: "即将导入由模型生成的户型图,此操作会清空现有户型,是否继续?",
- reset_tip: "此操作会清空现有户型,是否继续?",
- title_door: "门窗",
- title_component: "构建",
- title_wall: "画墙",
- title_other: "标注",
- border_wall: "外墙",
- wall: "内墙",
- attribute: "属性",
- door: "门",
- slideDoor: "移门",
- doubleDoor: "双开门",
- casement: "窗",
- bayCase: "飘窗",
- groundCase: "落地窗",
- column: "柱子",
- furnColumn: "框架柱",
- furnFlue: "烟道",
- point: "点",
- line: "墙",
- tagging: "单个",
- un_data_tip: "无法下载空户型图,请先绘制。",
- taggings: "多个",
- tagging_name_tips: "请输入名称",
- tagging_custom_name_tips: "自定义房间名称",
- tagging_area_tips: "输入面积,支持小数点后面两位",
- direction: "指南针",
- wallLine: "墙属性",
- widget_delete: "{widget}将被删除",
- panel_btn_default: "恢复默认",
- panel_btn_delete: "删除部件",
- attr_angle: "旋转角度",
- attr_within: "翻转方向",
- attr_ewidth: "宽度",
- attr_eheight: "高度",
- attr_tick: "厚度",
- attr_showTitle: "标注名称",
- attr_showContent: "标注面积",
- attr_top: "顶部",
- attr_bottom: "底部",
- attr_estart: "入户门",
- success: "成功添加{widget}",
- error_location: "当前位置无法添加{widget}",
- error_outdoor: "户外无法添加{widget}",
- error_something: "当前位置点有建筑,无法添加{widget}",
- error_widget: "当前位置不可添加{widget}",
- enter_adjust_floor: "进入地面高度调节模式",
- exit_adjust_floor: "退出地面高度调节模式",
- color_title: "量角器颜色:",
- hall_tests: "整套,客厅,走廊,餐厅,起居室,客餐厅,玄关,门厅",
- room_tests: "主卧,儿童房,次卧,客卧,老人房,卧室",
- other_tests: "书房,厨房,卫生间,多功能室,阳台,储物间,步入式衣柜,外景,露台(无顶),影视间,入房花园",
- rotate: "旋转"
- },
- videos: {
- __name: "添加视频",
- tips: "请先点击场景的基准面,确定视频位置",
- panel_title: "视频属性",
- panel_preview: "预览",
- panel_upload: "上传视频",
- panel_upload_tips: "支持MP4视频格式",
- panel_move: "位移",
- panel_zoom: "缩放",
- panel_thickness: "厚度",
- recoverRatio: "恢复原始比例",
- recoverRatioTip: "恢复视频文件原始长宽比"
- },
- custom: {
- model_title: "模型下载",
- uploading: "文件上传中...",
- download: "原始模型下载",
- download_panos: "下载点位图",
- upload: "修改模型上传",
- title1: "模型下载/上传功能教程",
- tips11: "1.下载场景模型的压缩包后,使用三维软件打开解压后文件“mesh.obj”,即可开展编辑;",
- tips12: "2.编辑完成后,建议将模型贴图进行烘焙,烘焙贴图需控制在1.5M以内,同时,保存的obj文件需要控制在3M以内;",
- tips13: "3.完成1、2步骤后,将obj,mtl,贴图打包为zip压缩包上传即可。",
- title2: "注:",
- tips21: "1.请尽量控制文件大小,以免浏览的时候卡顿,影响体验。",
- tips22: "2.请将obj及压缩包的名称保持一致,否则会替换失败。",
- get_image_fail: "获取贴图失败,可能网络状态不佳,请检查您的网络设置并重新尝试。",
- download_model_fail: "模型下载失败",
- reupload_tips: "上传后点击保存并发布生效",
- panoramic_upload: "全景照片上传",
- panoramic_upload_tips: "上传后点击“保存并发布”即生效",
- panoramic_upload_box_tips: "请上传对应点位名称的JPG图片",
- panoramic_download: "全景照片下载",
- panoramic_download_tips: "请勿修改照片名称和格式",
- panoramic: "全景图片",
- ball_video: "球幕视频",
- ball_video_upload_tips: "上传后点击“保存并发布”即生效",
- ball_video_download_tips: "请勿修改视频名称和格式",
- ball_video_upload_box_tips: "球幕视频支持MP4格式,不超过1024M",
- upload_title: "上传文件",
- upload_format_error: "文件格式错误,请重新上传",
- upload_name_error: "文件名称错误,请重新上传",
- upload_success: "上传成功,保存并发布后才能生效",
- upload_code_5017: "上传模型失败,请参照右侧教程",
- upload_code_5018: "zip文件只能有一层目录或无目录",
- upload_code_5019: "必须有且仅有一个obj和mtl文件",
- upload_code_5020: "贴图需控制在1.5M以内,obj文件需要控制在20M以内。",
- upload_code_5012: "数据不正常",
- upload_code_5023: "上传文件格式不正确,只能是jpg或mp4格式",
- download_tips: "下载后名称与格式请勿修改",
- download_fail: "下载失败"
- },
- vrhouse: {
- __name: "VR看房",
- linkto_management: "前往看房管理后台",
- refer: "刷新",
- scene_link: "场景链接"
- },
- business: {
- __name: "商圈模块",
- list_title: "场景热点列表",
- list_unf: "当前场景没有热点",
- add_tip_info: "请在场景中添加热点后,再绑定热点",
- linkto_management: "前往看店管理后台",
- refer: "刷新",
- scene_link: "场景链接",
- explain: "说明",
- shopexplain: {
- 1: "当前商品数据来源于场景绑定的4DKanKan店铺商品数据,如需增加请点击",
- 2: "此处跳转"
- },
- select_style: "选择热点样式",
- join_info: "关联商品信息",
- add_com: "添加商品",
- join_info_show: "关联商品会在热点中展示",
- select_com: "选择商品"
- },
- link: {
- __name: "跳转关联",
- title1: "锁定关联点",
- title2: "编辑关联点",
- title3: "全景图关联",
- list_text: " 已关联场景({l_count}), 全景图({p_count})",
- btn_new_text: "添加关联点",
- btn_add_title: "关联点定位",
- btn_add_text: "确定关联点位置",
- btn_add_desc: "将关联点标记并拖动到合适的位置。",
- btn_edit_text: "修改关联点位置",
- style: "关联点样式",
- style_name: "样式",
- style_desc: "支持自定义图标,建议尺寸为128x128 像素,格式为jpg/png。",
- style_dele: "是否删除该样式?<br />如该样式在其它关联点使用,也将被删除",
- desc_title: "描述",
- desc_tips: "请输入描述内容",
- desc_require: "请输入描述内容",
- type: "选择关联类型",
- type_photo: "支持上传宽高比为2:1的单张全景图片,建议像素不小于6000x3000像素,文件不超过120M。",
- type_photo_require: "请上传全景图",
- type_link: "请输入目标场景链接",
- type_link_tips: "http(s)://",
- type_link_require: "请输入需要跳转的场景链接",
- enter_title: "进入画面",
- enter_require: "请设置进入画面",
- enter_btn_text: "设置进入画面",
- outer_title: "跳出点位置",
- outer_style: "跳出点样式",
- outer_desc: "支持自定义图标,建议尺寸为128x128像素,格式为jpg/png。",
- outer_require: "请设置跳出点位置",
- outer_btn_text: "设置跳出点位置",
- links_title: "选择全景图",
- links_tips: "选择全景图,拖动到左侧画面相应位置,进行跳转设置。",
- links_cancel_tips: "取消关联设置"
- }
- },
- login: {
- __name: "登录",
- title: "提示",
- login: "去登录",
- logon: "登录完毕,继续",
- login_tips: "您没有登录,请于主页登录后再编辑"
- },
- common: {
- __name: "公用",
- on: "打开",
- off: "关闭",
- add: "添加",
- set: "确定",
- ok: "确定",
- save: "保存",
- cancel: "取消",
- complete: "完成",
- edit: "修改",
- giveup: "放弃",
- commit: "提交",
- photo: "图片",
- voice: "音频",
- video: "视频",
- bgm: "音乐",
- crop: "裁剪",
- upload: "上传",
- download: "下载",
- change: "更改",
- unnamed: "未命名",
- publish: "保存并发布",
- publish_text: "保存并发布成功!",
- publish_tips: "是否立刻前往观看您的场景?",
- publish_btn_ok: "立刻前往",
- publish_btn_no: "暂时不去",
- public: "公开",
- private: "加密",
- waiting: "请稍等...",
- audio: "音频",
- second: "秒",
- delete: "删除",
- prev: "上一步",
- next: "下一步",
- meter: "约{meter}米",
- guide: "导览",
- rule: "测量工具",
- roaming: "漫游",
- continue: "继续",
- ensure_delete: "确定删除",
- text_limit: "限制{limit}字内",
- default: "默认",
- custom: "自定义",
- back: "返回",
- will_delete: "将被删除",
- setup: "设置",
- exit: "退出",
- size: "大小",
- music: {
- __name: "背景音乐",
- none: "无",
- cheerfu: "欢快",
- ethereal: "空灵",
- rhythmic: "节奏",
- nostalgic: "怀旧",
- missing: "想念",
- retro: "复古",
- strings: "琴弦",
- happy: "愉快"
- },
- category: {
- __name: "分类",
- museum: "文博",
- estate: "地产",
- eshop: "电商",
- catering: "餐饮",
- home: "家居",
- other: "其他"
- },
- uploads: {
- __name: "文件上传",
- uploading: "上传中",
- uploaded: "已上传",
- wait: "等待上传...",
- error: "上传出错",
- add: "添加文件",
- start: "开始上传",
- file_require: "请添加文件",
- cant_upload: "您的浏览器不支持上传文件",
- not_support: "您选择的不是浏览器支持的{fileType}文件,请重新选择",
- too_large: "文件过大,不能大于{size}MB",
- too_large_reupload_tips: "上传视频过大,请重新上传"
- },
- tips: {
- __name: "提示",
- wait: "请等待..."
- }
- },
- tips: {
- __name: "弹窗、提示",
- title: "提示",
- set_done: "设置成功",
- set_fail: "设置失败",
- save_done: "保存成功",
- save_fail: "保存失败",
- delete: "是否删除?",
- delete_done: "删除成功",
- delete_fail: "删除失败",
- upload_done: "上传成功",
- upload_fail: "上传失败",
- exception: "异常错误",
- network_error: "网络连接失败,请稍后再试",
- file_notfound: "文件不存在",
- scene_notfound: "场景不存在",
- params_notfound: "缺少必要参数",
- camera_notfound: "找不到该场景对应的相机",
- password_error: "密码错误",
- data_error: "数据不正常",
- auth_deny: "无权操作该场景",
- clear: "是否清空?",
- upload_pic_fail: "上传图片失败",
- wait: "请稍后...",
- house_type_save_fail: "户型保存失败"
- },
- show: {
- __name: "展示页面",
- on: "开启",
- off: "关闭",
- measure: "测距工具",
- measure_start: "起点",
- measure_end: "终点",
- measure_button: "确定{status}",
- location_up: "上方",
- location_left: "左侧",
- location_start_tips: "请先在{direction}点击",
- location_end_tips: "起点确定完毕,请定位终点",
- vr: "VR模式",
- share: "分享",
- music: "{status}音乐",
- password_tips: "密码",
- password_require: "请输入密码"
- },
- components: {
- user_guid: {
- __name: "用户引导",
- title: "操作提示",
- pano: "行走<br />点击任意方向移动",
- rotate: "旋转视角<br />左右滑动屏幕,旋转视觉",
- zoom: "缩放<br />双指滑动放大或缩小视图",
- set: "我知道了"
- }
- }
- }
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__assign || function() {
- return (n = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , g = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- , A = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var r = A(i(5))
- , o = A(i(14))
- , C = A(i(11))
- , I = A(i(8))
- , s = A(i(15))
- , a = A(i(7))
- , l = A(i(16))
- , u = A(i(17))
- , c = A(i(18))
- , h = A(i(19))
- , p = A(i(20))
- , d = A(i(21));
- e.methods = {
- addPoint: function(t) {
- var e = t.id
- , i = t.x
- , n = t.y
- , g = {
- id: e,
- ele: new r.default({
- x: i,
- y: n,
- renderer: this.render
- })
- };
- return this.points.push(g),
- this.generateElement(g.ele),
- g
- },
- addLine: function(t) {
- var e = t.id
- , i = t.p1
- , n = t.p2
- , g = t.border
- , A = t.exterior
- , r = t.isOut
- , C = {
- id: e,
- ele: new o.default({
- border: g,
- exterior: A,
- points: [this.points.find((function(t) {
- return t.id === i
- }
- )).ele, this.points.find((function(t) {
- return t.id === n
- }
- )).ele],
- renderer: this.render,
- isOut: r
- }),
- border: g,
- isOut: r,
- exterior: A
- };
- return this.lines.push(C),
- this.generateElement(C.ele),
- A && (C.ele.points.forEach((function(t) {
- return t.real.setAttribute("pointer-events", "none")
- }
- )),
- C.ele.zIndex = -1),
- C
- },
- addCase: function(t) {
- var e = t.pos
- , i = t.line
- , n = t.top
- , g = void 0 === n ? null : n
- , A = t.bottom
- , r = void 0 === A ? null : A
- , o = {
- ele: new C.default({
- renderer: this.render,
- attachment: this.lines.find((function(t) {
- return t.id === i
- }
- )).ele,
- points: [{
- x: e[0],
- y: e[1]
- }, {
- x: e[2],
- y: e[3]
- }],
- top: g,
- bottom: r
- })
- };
- return this.cases.push(o),
- this.generateElement(o.ele),
- o
- },
- addDoor: function(t) {
- var e = t.pos
- , i = t.line
- , n = t.top
- , g = void 0 === n ? null : n
- , A = t.bottom
- , r = void 0 === A ? null : A
- , o = t.within
- , C = t.show
- , s = t.start
- , a = {
- ele: new I.default({
- show: C,
- renderer: this.render,
- attachment: this.lines.find((function(t) {
- return t.id === i
- }
- )).ele,
- points: [{
- x: e[0],
- y: e[1]
- }, {
- x: e[2],
- y: e[3]
- }],
- top: g,
- bottom: r,
- within: o,
- start: s
- })
- };
- return this.doors.push(a),
- this.generateElement(a.ele),
- a
- },
- adddDoubleDoor: function(t) {
- var e = t.pos
- , i = t.line
- , n = t.top
- , g = void 0 === n ? null : n
- , A = t.bottom
- , r = void 0 === A ? null : A
- , o = t.within
- , C = t.show
- , I = t.start
- , s = {
- ele: new l.default({
- show: C,
- renderer: this.render,
- attachment: this.lines.find((function(t) {
- return t.id === i
- }
- )).ele,
- points: [{
- x: e[0],
- y: e[1]
- }, {
- x: e[2],
- y: e[3]
- }],
- top: g,
- bottom: r,
- within: o,
- start: I
- })
- };
- return this.doubleDoors.push(s),
- this.generateElement(s.ele),
- s
- },
- addSlideDoor: function(t) {
- var e = t.pos
- , i = t.line
- , n = t.top
- , g = void 0 === n ? null : n
- , A = t.bottom
- , r = void 0 === A ? null : A
- , o = t.within
- , C = void 0 === o ? 0 : o
- , I = {
- ele: new s.default({
- within: C,
- bwithin: 1.5,
- renderer: this.render,
- attachment: this.lines.find((function(t) {
- return t.id === i
- }
- )).ele,
- points: [{
- x: e[0],
- y: e[1]
- }, {
- x: e[2],
- y: e[3]
- }],
- top: g,
- bottom: r
- })
- };
- return this.slideDoors.push(I),
- this.generateElement(I.ele),
- I
- },
- addBayCase: function(t) {
- var e = t.pos
- , i = t.line
- , n = t.top
- , g = void 0 === n ? null : n
- , A = t.bottom
- , r = void 0 === A ? null : A
- , o = t.within
- , C = {
- ele: new d.default({
- renderer: this.render,
- attachment: this.lines.find((function(t) {
- return t.id === i
- }
- )).ele,
- points: [{
- x: e[0],
- y: e[1]
- }, {
- x: e[2],
- y: e[3]
- }],
- top: g,
- bottom: r,
- within: o
- })
- };
- return this.bayCases.push(C),
- this.generateElement(C.ele),
- C
- },
- addGroundCase: function(t) {
- var e = t.pos
- , i = t.line
- , n = t.top
- , g = void 0 === n ? null : n
- , A = t.bottom
- , r = void 0 === A ? null : A
- , o = {
- ele: new p.default({
- renderer: this.render,
- attachment: this.lines.find((function(t) {
- return t.id === i
- }
- )).ele,
- points: [{
- x: e[0],
- y: e[1]
- }, {
- x: e[2],
- y: e[3]
- }],
- top: g,
- bottom: r
- })
- };
- return this.groundCases.push(o),
- this.generateElement(o.ele),
- o
- },
- addColumn: function(t) {
- var e = t.pos
- , i = t.line
- , n = {
- ele: new a.default({
- renderer: this.render,
- attachment: this.lines.find((function(t) {
- return t.id === i
- }
- )).ele,
- points: [{
- x: e[0],
- y: e[1]
- }, {
- x: e[2],
- y: e[3]
- }, {
- x: e[6],
- y: e[7]
- }, {
- x: e[4],
- y: e[5]
- }]
- })
- };
- return this.columns.push(n),
- this.generateElement(n.ele),
- n
- },
- addFurnColumn: function(t) {
- var e = t.pos
- , i = t.angle
- , n = {
- ele: new u.default({
- points: [{
- x: e[0],
- y: e[1]
- }, {
- x: e[2],
- y: e[3]
- }, {
- x: e[4],
- y: e[5]
- }, {
- x: e[6],
- y: e[7]
- }],
- renderer: this.render,
- angle: i
- })
- };
- return this.furnColumns.push(n),
- this.generateElement(n.ele),
- n
- },
- addRoom: function(t) {
- for (var e, i, g = this, A = t.points.map((function(t) {
- return g.addPoint(n(n({}, t), {
- id: g.getNewPointId()
- }))
- }
- )), r = [], o = 0; o < A.length - 1; o++)
- r.push(this.addLine({
- id: this.getNewLineId(),
- p1: A[o].id,
- p2: A[o + 1].id,
- isOut: !1,
- border: !1
- }));
- return r.forEach((function(t) {
- return t.ele.update()
- }
- )),
- (e = this.data.vertex).push.apply(e, A.map((function(t) {
- return {
- id: t.id,
- x: t.ele.x,
- y: t.ele.y
- }
- }
- ))),
- (i = this.data.wall).push.apply(i, r.map((function(t) {
- return t.id
- }
- ))),
- r
- },
- addFurnFlue: function(t) {
- var e = t.pos
- , i = t.angle
- , n = {
- ele: new c.default({
- points: [{
- x: e[0],
- y: e[1]
- }, {
- x: e[2],
- y: e[3]
- }, {
- x: e[4],
- y: e[5]
- }, {
- x: e[6],
- y: e[7]
- }],
- renderer: this.render,
- angle: i
- })
- };
- return this.furnFlues.push(n),
- this.generateElement(n.ele),
- n
- },
- addTagging: function(t) {
- var e = t.pos
- , i = t.title
- , n = t.content
- , g = t.show
- , A = void 0 === g || g
- , r = t.showTitle
- , o = t.showContent
- , C = {
- ele: new h.default({
- show: A,
- pos: {
- x: e[0],
- y: e[1]
- },
- title: i,
- content: n,
- renderer: this.render,
- showTitle: r,
- showContent: o
- })
- };
- return this.taggings.push(C),
- this.generateElement(C.ele),
- C
- },
- generateElement: function(t) {
- this.render.push(t),
- this.retrofitElementDestroy(t),
- t instanceof o.default && this.retrofitElementIntercept(t)
- },
- generateElements: function() {
- var t = this;
- g(this.lines.map((function(t) {
- return t.ele
- }
- )), this.points.map((function(t) {
- return t.ele
- }
- )), this.cases.map((function(t) {
- return t.ele
- }
- )), this.doors.map((function(t) {
- return t.ele
- }
- )), this.columns.map((function(t) {
- return t.ele
- }
- ))).forEach((function(e) {
- return t.generateElement(e)
- }
- ))
- },
- toEles: function(t) {
- var e, i = this, n = t.vertex, g = t.wall, A = t.window, r = t.door, o = t.column, C = t.slideDoor, I = t.tagging, s = t.groundCase, a = t.bayCase, l = t.furnColumn, u = t.furnFlue, c = t.doubleDoor;
- this.data = t,
- n.forEach((function(t) {
- return i.addPoint(t)
- }
- )),
- g.forEach((function(t) {
- var e = t.p1
- , n = t.p2
- , g = t.id
- , A = t.border
- , r = t.exterior;
- i.addLine({
- p1: e,
- p2: n,
- id: g,
- border: A,
- exterior: r,
- isOut: !1
- })
- }
- )),
- e = [A, r, o, C, s, a, c].map((function(t) {
- return t.forEach((function(t) {
- var e = g.find((function(e) {
- var i = e.id;
- return t.line === i
- }
- ));
- if (e) {
- var n = e.p1
- , A = e.p2
- , r = i.lines.find((function(t) {
- t.id;
- var e = t.ele.points.map((function(t) {
- return i.points.find((function(e) {
- return e.ele === t
- }
- )).id
- }
- ));
- return ~e.indexOf(n) && ~e.indexOf(A)
- }
- ));
- t.line = r.id
- } else
- t.line = 0
- }
- )),
- t = t.filter((function(t) {
- return !t.pos.some((function(t) {
- return null === t
- }
- ))
- }
- ))
- }
- )),
- A = e[0],
- r = e[1],
- o = e[2],
- C = e[3],
- s = e[4],
- a = e[5],
- c = e[6],
- A.forEach((function(t) {
- return 0 !== t.line && i.addCase(t)
- }
- )),
- r.forEach((function(t) {
- return 0 !== t.line && i.addDoor(t)
- }
- )),
- o.forEach((function(t) {
- return 0 !== t.line && i.addColumn(t)
- }
- )),
- C.forEach((function(t) {
- return 0 !== t.line && i.addSlideDoor(t)
- }
- )),
- s.forEach((function(t) {
- return 0 !== t.line && i.addGroundCase(t)
- }
- )),
- a.forEach((function(t) {
- return 0 !== t.line && i.addBayCase(t)
- }
- )),
- I.forEach((function(t) {
- return i.addTagging(t)
- }
- )),
- c.forEach((function(t) {
- return i.adddDoubleDoor(t)
- }
- )),
- l.forEach((function(t) {
- i.addFurnColumn(t)
- }
- )),
- u.forEach((function(t) {
- i.addFurnFlue(t)
- }
- )),
- this.referElements(),
- this.id = t.id,
- this.show = t.show
- },
- referElements: function() {
- var t = this;
- g(this.lines, this.points, this.cases, this.doors, this.columns).forEach((function(e) {
- var i = e.ele;
- t.render.g.removeChild(i.real),
- t.render.elements.splice(t.render.elements.indexOf(i), 1)
- }
- )),
- this.generateElements()
- }
- },
- e.methods.attrs = ["cases", "doors", "slideDoors", "doubleDoors", "columns", "lines", "points", "groundCases", "taggings", "bayCases", "furnColumns", "furnFlues"]
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var r = A(i(5))
- , o = i(3)
- , C = i(0)
- , I = function(t) {
- function e(e, i) {
- var n = t.call(this, e) || this;
- return n.line = i,
- n
- }
- return g(e, t),
- e.prototype.getLineInsertPoint = function(t) {
- void 0 === t && (t = this);
- var e = C.getLinePoint(this.line, t);
- return e
- }
- ,
- e.prototype.intercept = function(t, e) {
- var i = e.x
- , n = e.y;
- return !(!o.type.isUndefined(i) && !o.type.isUndefined(n)) || this.getLineInsertPoint({
- x: i,
- y: n
- })
- }
- ,
- e
- }(r.default);
- e.default = I
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__assign || function() {
- return (A = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , r = this && this.__awaiter || function(t, e, i, n) {
- return new (i || (i = Promise))((function(g, A) {
- function r(t) {
- try {
- C(n.next(t))
- } catch (t) {
- A(t)
- }
- }
- function o(t) {
- try {
- C(n.throw(t))
- } catch (t) {
- A(t)
- }
- }
- function C(t) {
- var e;
- t.done ? g(t.value) : (e = t.value,
- e instanceof i ? e : new i((function(t) {
- t(e)
- }
- ))).then(r, o)
- }
- C((n = n.apply(t, e || [])).next())
- }
- ))
- }
- , o = this && this.__generator || function(t, e) {
- var i, n, g, A, r = {
- label: 0,
- sent: function() {
- if (1 & g[0])
- throw g[1];
- return g[1]
- },
- trys: [],
- ops: []
- };
- return A = {
- next: o(0),
- throw: o(1),
- return: o(2)
- },
- "function" == typeof Symbol && (A[Symbol.iterator] = function() {
- return this
- }
- ),
- A;
- function o(A) {
- return function(o) {
- return function(A) {
- if (i)
- throw new TypeError("Generator is already executing.");
- for (; r; )
- try {
- if (i = 1,
- n && (g = 2 & A[0] ? n.return : A[0] ? n.throw || ((g = n.return) && g.call(n),
- 0) : n.next) && !(g = g.call(n, A[1])).done)
- return g;
- switch (n = 0,
- g && (A = [2 & A[0], g.value]),
- A[0]) {
- case 0:
- case 1:
- g = A;
- break;
- case 4:
- return r.label++,
- {
- value: A[1],
- done: !1
- };
- case 5:
- r.label++,
- n = A[1],
- A = [0];
- continue;
- case 7:
- A = r.ops.pop(),
- r.trys.pop();
- continue;
- default:
- if (!(g = (g = r.trys).length > 0 && g[g.length - 1]) && (6 === A[0] || 2 === A[0])) {
- r = 0;
- continue
- }
- if (3 === A[0] && (!g || A[1] > g[0] && A[1] < g[3])) {
- r.label = A[1];
- break
- }
- if (6 === A[0] && r.label < g[1]) {
- r.label = g[1],
- g = A;
- break
- }
- if (g && r.label < g[2]) {
- r.label = g[2],
- r.ops.push(A);
- break
- }
- g[2] && r.ops.pop(),
- r.trys.pop();
- continue
- }
- A = e.call(t, r)
- } catch (t) {
- A = [6, t],
- n = 0
- } finally {
- i = g = 0
- }
- if (5 & A[0])
- throw A[1];
- return {
- value: A[0] ? A[1] : void 0,
- done: !0
- }
- }([A, o])
- }
- }
- }
- , C = this && this.__rest || function(t, e) {
- var i = {};
- for (var n in t)
- Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
- if (null != t && "function" == typeof Object.getOwnPropertySymbols) {
- var g = 0;
- for (n = Object.getOwnPropertySymbols(t); g < n.length; g++)
- e.indexOf(n[g]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[g]) && (i[n[g]] = t[n[g]])
- }
- return i
- }
- , I = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- , s = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var a = s(i(10))
- , l = i(0)
- , u = (i(3),
- s(i(4)))
- , c = i(1)
- , h = function(t) {
- function e(e) {
- var i = e.isOut
- , n = e.hover
- , g = e.width
- , r = void 0 === g ? 3 : g
- , o = e.border
- , I = void 0 !== o && o
- , s = e.exterior
- , a = C(e, ["isOut", "hover", "width", "border", "exterior"])
- , l = t.call(this, A(A({}, a), {
- width: r
- })) || this;
- return l.hover = n || A(A({}, l.init), {
- color: "rgba(243, 255, 0, 0.8)"
- }),
- l.isOut = i,
- l.adopt = !1,
- l.border = I,
- l.exterior = s,
- l.listenPointDrag(),
- Object.defineProperty(l, "wallLines", {
- get: function() {
- return a.renderer.processing.lines.map((function(t) {
- return t.ele
- }
- ))
- }
- }),
- l
- }
- return g(e, t),
- e.prototype.setHoverStyle = function() {
- this.color = this.hover.color,
- this.width = this.hover.width,
- this.linecap = this.hover.linecap
- }
- ,
- e.prototype.setUnHoverStyle = function() {
- this.color = this.init.color,
- this.width = this.init.width,
- this.linecap = this.init.linecap
- }
- ,
- e.prototype.destoryPoint = function(t) {
- return r(this, void 0, void 0, (function() {
- return o(this, (function(e) {
- return t.destroy(),
- [2]
- }
- ))
- }
- ))
- }
- ,
- e.prototype.listenPointDrag = function(t) {
- var e = this;
- void 0 === t && (t = this.points),
- t.forEach((function(t) {
- t.__join_lines ? ~t.__join_lines.indexOf(e) || t.__join_lines.push(e) : t.__join_lines = [e]
- }
- ))
- }
- ,
- e.prototype.getDelRetain = function() {
- return {
- delIndex: 0,
- retainIndex: 1
- }
- }
- ,
- e.prototype.judgeMerge = function() {
- return r(this, void 0, void 0, (function() {
- var t, i, n, g, A, r = this;
- return o(this, (function(o) {
- switch (o.label) {
- case 0:
- if (this.points[0] === this.points[1] || l.lineDis({
- points: this.points
- }) > e.minWidth || u.default.attaArch.get(this) && u.default.attaArch.get(this).length)
- return [2];
- t = this.wallLines;
- try {
- g = this.getDelRetain(),
- i = g.delIndex,
- n = g.retainIndex
- } catch (t) {
- return [2]
- }
- return A = this.points[n],
- [4, Promise.all(t.map((function(t) {
- var e;
- if (t !== r && ~(e = t.points.indexOf(r.points[i])))
- return new Promise((function(g) {
- t.nextTick((function() {
- var A = I(t.points);
- A[e] = r.points[n],
- A[i] === A[n] ? t.destroy() : (t.renderer.processing.updateWallPoints(t, t.points, A),
- t.points = A,
- t.listenPointDrag(A),
- t.update(),
- t.nextTick((function() {
- return t.updateJoin()
- }
- ))),
- g()
- }
- ))
- }
- ))
- }
- )))];
- case 1:
- return o.sent(),
- this.points[i].x = this.points[n].x,
- this.points[i].y = this.points[n].y,
- this.points[i].adopt = !0,
- setTimeout((function() {
- r.wallLines.some((function(t) {
- return ~t.points.indexOf(A)
- }
- )) || r.points[n].destroy()
- }
- ), 500),
- [2, this.points[i]]
- }
- }
- ))
- }
- ))
- }
- ,
- e.prototype.judgePoint = function() {
- return r(this, void 0, void 0, (function() {
- var t, e, i, n = this;
- return o(this, (function(g) {
- switch (g.label) {
- case 0:
- t = function(t) {
- var i, g, A, r, C;
- return o(this, (function(s) {
- switch (s.label) {
- case 0:
- if (i = e.points[t],
- !e.renderer.processing.points.some((function(t) {
- return t.ele === i
- }
- )))
- return [2, "continue"];
- g = e.renderer.processing,
- A = I(e.wallLines).filter((function(t) {
- return t !== n && !t.exterior
- }
- )),
- .1,
- A = A.filter((function(t) {
- return l.pointLineDis(t, i) <= .1
- }
- )),
- r = function(t) {
- var e, r, C, I;
- return o(this, (function(o) {
- switch (o.label) {
- case 0:
- return e = A[t],
- r = g.lines.filter((function(t) {
- var i = t.ele;
- return ~i.points.indexOf(e.points[0]) && i.points.indexOf(e.points[1])
- }
- )).map((function(t) {
- return t.ele
- }
- )),
- C = [],
- r.forEach((function(t) {
- return C = C.concat(u.default.attaArch.get(t) || [])
- }
- )),
- I = l.getLinePoint(e, i),
- C.find((function(t) {
- return l.pointLineDis({
- points: t.linePoints
- }, I) < .001
- }
- )) ? [3, 5] : [3, 1];
- case 1:
- if (!(l.pointLineDis(e, I) < .1))
- return [3, 5];
- i.x = I.x,
- i.y = I.y,
- o.label = 2;
- case 2:
- return o.trys.push([2, 4, , 5]),
- [4, new Promise((function(t, A) {
- i.nextTick((function() {
- n.renderer.processing.points.some((function(t) {
- return t.ele === i
- }
- )) || A();
- var r = g.lineInsertPoint(e, i)
- , o = r.promis;
- if (!r.ret)
- return t();
- o.then((function() {
- i.x = I.x,
- i.y = I.y,
- i.wallPos && i.wallPos(),
- t()
- }
- )),
- e.wallPos && e.wallPos()
- }
- ))
- }
- ))];
- case 3:
- return o.sent(),
- [3, 5];
- case 4:
- return o.sent(),
- [2, "break"];
- case 5:
- return [2]
- }
- }
- ))
- }
- ,
- C = 0,
- s.label = 1;
- case 1:
- return C < A.length ? [5, r(C)] : [3, 4];
- case 2:
- if ("break" === s.sent())
- return [3, 4];
- s.label = 3;
- case 3:
- return C++,
- [3, 1];
- case 4:
- return [2]
- }
- }
- ))
- }
- ,
- e = this,
- i = 0,
- g.label = 1;
- case 1:
- return i < this.points.length ? [5, t(i)] : [3, 4];
- case 2:
- g.sent(),
- g.label = 3;
- case 3:
- return i++,
- [3, 1];
- case 4:
- return [2]
- }
- }
- ))
- }
- ))
- }
- ,
- e.prototype.updateJoin = function() {
- var t = this
- , e = this.wallLines;
- this.points[0].__join_lines = e.filter((function(e) {
- return ~e.points.indexOf(t.points[0])
- }
- )),
- this.points[1].__join_lines = e.filter((function(e) {
- return ~e.points.indexOf(t.points[1])
- }
- ))
- }
- ,
- e.prototype.removeJoin = function(t) {
- void 0 === t && (t = this);
- var e = t.points[0].__join_lines
- , i = t.points[1].__join_lines;
- e.splice(e.indexOf(t), 1),
- i.splice(i.indexOf(t), 1)
- }
- ,
- e.prototype.checkCross = function(t) {
- var e = this;
- void 0 === t && (t = this.points);
- var i = this.renderer.processing;
- return this.wallLines.filter((function(t) {
- return ~t.points.indexOf(e.points[0]) || ~t.points.indexOf(e.points[1])
- }
- )).some((function(n) {
- var g = n.points.indexOf(e.points[0])
- , A = n.points.indexOf(e.points[1])
- , r = I(n.points);
- return ~g && (r[g] = t[0]),
- ~A && (r[A] = t[1]),
- e.wallLines.some((function(g) {
- if (!~g.points.indexOf(n.points[0]) && !~g.points.indexOf(n.points[1])) {
- var A = l.segmentsIntr(g, {
- points: r
- });
- if (!A)
- return !1;
- if (0 !== l.lineDis({
- points: [r[0], A]
- }) && 0 !== l.lineDis({
- points: [r[1], A]
- }) && 0 !== l.lineDis({
- points: [g.points[0], A]
- }) && 0 !== l.lineDis({
- points: [g.points[1], A]
- }))
- return !0;
- var o = i.getRoomsByLine(n);
- o = (o = o.length ? o : i.getHolesByLine(n))[0].ground || o[0].pos;
- var C = i.getRoomsByLine(g);
- return o !== (C = (C = C.length ? C : i.getHolesByLine(g))[0].ground || C[0].pos) && (o = o.map((function(n) {
- var g = i.points.find((function(t) {
- var e = t.id;
- return n === e
- }
- )).ele;
- return g === e.points[0] ? t[0] : g === e.points[1] ? t[1] : g
- }
- )),
- C = C.map((function(n) {
- var g = i.points.find((function(t) {
- var e = t.id;
- return n === e
- }
- )).ele;
- return g === e.points[0] ? t[0] : g === e.points[1] ? t[1] : g
- }
- )),
- l.isFaceIntersect(o, C))
- }
- }
- ))
- }
- ))
- }
- ,
- e.prototype.intercept = function(t, e, i) {
- e.x,
- e.y,
- e.points;
- return !0
- }
- ,
- e.prototype.grentNode = function() {
- var e = document.createElementNS(c.SVGURI, "g");
- return this.origin = t.prototype.grentNode.call(this),
- this.ground = document.createElementNS(c.SVGURI, "g"),
- this.temp = document.createElementNS(c.SVGURI, "g"),
- e.appendChild(this.ground),
- e.appendChild(this.origin),
- e.appendChild(this.temp),
- this.temp.setAttribute("pointer-events", "none"),
- e
- }
- ,
- e.prototype.update = function() {
- var t = this
- , e = u.default.attaArch.get(this)
- , i = this.multiple * this.width * (this.border ? 2 : 1.333);
- this.origin.setAttribute("stroke-width", i.toString()),
- this.origin.setAttribute("stroke-linecap", this.linecap);
- try {
- this.origin.setAttribute("d", "M " + this.points[0].x + " " + this.points[0].y + " L " + this.points[1].x + " " + this.points[1].y)
- } catch (t) {}
- if (this.exterior ? (this.origin.setAttribute("stroke", this.color === this.hover.color ? this.color : "#5e5e5e"),
- this.origin.setAttribute("stroke-dasharray", 10 * this.multiple + ", " + 10 * this.multiple)) : this.origin.setAttribute("stroke", this.color),
- !this.exterior && e && e.length > 0) {
- this.origin.setAttribute("stroke", "rgba(0,0,0,0)");
- for (var n = [], g = function(t) {
- if (n.some((function(e) {
- return e.some((function(i) {
- return i === e[t]
- }
- ))
- }
- )))
- return "continue";
- var i = e.filter((function(i) {
- return i.linePoints && i.linePoints.length && (l.pointLineDis({
- points: e[t].linePoints
- }, i.linePoints[0]) < .1 || l.pointLineDis({
- points: e[t].linePoints
- }, i.linePoints[1]) < .1)
- }
- ));
- i.length && n.push(i)
- }, A = 0; A < e.length; A++)
- g(A);
- var r = [];
- n.forEach((function(e) {
- var i = e.reduce((function(t, e) {
- return t.concat(e.linePoints)
- }
- ), []).sort((function(e, i) {
- return l.lineDis({
- points: [e, t.points[0]]
- }) - l.lineDis({
- points: [i, t.points[0]]
- })
- }
- ))
- , n = [];
- l.pointLineDis(t, i[0]) < .1 && n.push(i[0]),
- l.pointLineDis(t, i[i.length - 1]) < .1 && n.push(i[i.length - 1]),
- n.length && r.push(n)
- }
- )),
- r = r.sort((function(e, i) {
- return l.lineDis({
- points: [e[0], t.points[0]]
- }) - l.lineDis({
- points: [i[0], t.points[0]]
- })
- }
- )),
- this.ground.innerHTML = "";
- var o = "";
- for (A = 1; A < r.length; A++) {
- var C = r[A - 1][r[A - 1].length - 1]
- , I = r[A][0];
- o += '<path \n stroke="' + (this.exterior && "rgba(243, 255, 0, 0.8)" !== this.color ? "rgb(150,150,150)" : this.color) + '" \n stroke-width="' + i + '" \n stroke-linecap="butt" \n d="M ' + C.x + " " + C.y + " L " + I.x + " " + I.y + '"></path>'
- }
- if (r.length && 2 === r[0].length && (o = '<path \n stroke="' + (this.exterior && "rgba(243, 255, 0, 0.8)" !== this.color ? "rgb(150,150,150)" : this.color) + '" \n stroke-width="' + i + '" \n stroke-linecap="butt" \n d="M ' + this.points[0].x + " " + this.points[0].y + " L " + r[0][0].x + " " + r[0][0].y + '"></path>' + o),
- r.length && 2 === r[r.length - 1].length && (o = o + '<path \n stroke="' + (this.exterior && "rgba(243, 255, 0, 0.8)" !== this.color ? "rgb(150,150,150)" : this.color) + '" \n stroke-width="' + i + '" \n stroke-linecap="butt" \n d="M ' + r[r.length - 1][1].x + " " + r[r.length - 1][1].y + " L " + this.points[1].x + " " + this.points[1].y + '"></path>'),
- 1 === r.length && 1 === r[0].length) {
- var s = e.find((function(t) {
- return ~t.linePoints.indexOf(r[0][0])
- }
- ))
- , a = s.linePoints[Number(!s.linePoints.indexOf(r[0][0]))];
- C = l.lineDis({
- points: [a, this.points[0]]
- }) > l.lineDis({
- points: [a, this.points[1]]
- }) ? this.points[0] : this.points[1];
- o += '<path \n stroke="' + (this.exterior && "rgba(243, 255, 0, 0.8)" !== this.color ? "rgb(150,150,150)" : this.color) + '" \n stroke-width="' + i + '" \n stroke-linecap="butt" \n d="M ' + C.x + " " + C.y + " L " + r[0][0].x + " " + r[0][0].y + '"></path>'
- }
- 0 === r.length && (o += '<path \n stroke="' + (this.exterior && "rgba(243, 255, 0, 0.8)" !== this.color ? "rgb(150,150,150)" : this.color) + '" \n stroke-width="' + i + '" \n stroke-linecap="butt" \n d="M ' + this.points[0].x + " " + this.points[0].y + " L " + this.points[1].x + " " + this.points[1].y + '"></path>'),
- this.ground.innerHTML = o
- } else
- this.ground.innerHTML = "";
- if (this.temp.innerHTML = "",
- this.showAngle || this.color === this.hover.color) {
- var h = this.renderer.processing.lines.filter((function(e) {
- return e.ele !== t && (~e.ele.points.indexOf(t.points[0]) || ~e.ele.points.indexOf(t.points[1]))
- }
- )).map((function(t) {
- return t.ele
- }
- ));
- if (0 !== h.length) {
- var p = this.renderer.screenToRealPoint({
- x: 20,
- y: 0
- }).x - this.renderer.screenToRealPoint({
- x: 0,
- y: 0
- }).x;
- h.forEach((function(e) {
- var i = l.getAngle(e, t)
- , n = ~e.points.indexOf(t.points[0]) ? t.points[0] : t.points[1]
- , g = l.getLineDisSelectPoint(e, n, p)
- , A = l.getLineDisSelectPoint(t, n, p)
- , r = l.lineCenter({
- points: [g, A]
- });
- if (!isNaN(r.x) && !isNaN(i) && i > 10 && i < 170) {
- i = (i = Math.round(i)) >= 89 && i <= 91 ? 90 : i;
- var o = document.createElementNS(c.SVGURI, "text");
- o.setAttribute("fill", "#fff"),
- o.setAttribute("text-anchor", "middle"),
- o.setAttribute("dominant-baseline", "middle"),
- o.setAttribute("x", r.x.toString()),
- o.setAttribute("y", r.y.toString()),
- o.setAttribute("font-size", (9 * t.multiple).toString()),
- o.textContent = parseInt(i + "").toString() + "°",
- t.temp.appendChild(o)
- }
- }
- ))
- }
- }
- }
- ,
- e.prototype.destroy = function() {
- var e = this
- , i = this.wallLines;
- i.splice(i.indexOf(this), 1);
- var n = u.default.attaArch.get(this);
- if (n) {
- n = I(n);
- var g = i.find((function(t) {
- return t.points[0] === e.points[0] && t.points[1] === e.points[1] || t.points[1] === e.points[0] && t.points[0] === e.points[1]
- }
- ));
- n.forEach((function(t) {
- g ? t.setAttachment(g) : t.destroy()
- }
- ))
- }
- this.nextTick((function() {
- i.filter((function(t) {
- return ~t.points.indexOf(e.points[0]) || ~t.points.indexOf(e.points[1])
- }
- )).forEach((function(t) {
- return t.updateJoin()
- }
- ))
- }
- )),
- t.prototype.destroy.call(this),
- this.removeJoin(),
- i.some((function(t) {
- return ~t.points.indexOf(e.points[0])
- }
- )) || this.points[0].destroy(),
- i.some((function(t) {
- return ~t.points.indexOf(e.points[1])
- }
- )) || this.points[1].destroy()
- }
- ,
- e.minWidth = .1,
- e
- }(a.default);
- e.default = h
- }
- , function(t, e) {
- t.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAACECAYAAAAeNUIyAAAIPklEQVR4Xs2bZw8cNRCGXxN67y0gOqKDEIgiOkLwO/jAr0SiCRCRIggEEiAEUEivJIFUGPRsxqe9u123K8JSPiS3az87Mx6PXzvBzC6XdC6E8I/W3Mxsg6RLgpldKckknV0niANcKilECGwACBY5v2qDmNnFWAAAxupDrAVkFmAIYqUgQwBjECsBGQNIQSwVxAEIwsE2GxOzDy0crCkLxMFyENEi50MI52pnjZkxA/iTbCUQsQPySPH0LQXIxUSzaxyAXNDlgVyrsUTsi4Q26poaC9TExNCHDIK0ANS6ow/DrJkKVjNjCrIgFbmg3xnuuKLlRe+ks4gDEAMtzYCAvlvNWnrwhW+Rd892Ly8BpIV/Uj5MvsBBLmvpreGdqfplyoxrsshcATXnyxWDDFZwgwG1ItcAcCaE8O+s+0ajeskWGQXoklUqqJYEki2is/N7QZCkBSZrR8n0agTB98QAIMmWtUR8uxIEAOqPuSAcoimG8Mx6kSQSWuo9vvx0iQWq3DG1fJqlQIpdMLWK5vw19PuIa6pcsDDEgGuqXbAUCAchNigF/qmJgeKM2eKm1neqZkfrILn3qKzYnGDOojmd67Dmd7sw0zYA8aCko5KOLOLXmsF7gX2jpOuBeFQSVjgcQjhU21nr82Z2iyQgLooQsa/Dkg6t0jXugpsl3TTJmG6J+HcscsStsvQY6QHcgAXGIPh3Bj8aQjjQauqx98zsNmKgD8Czs+7ov78017gFbpWEBeZaCqKzyKIx4gAEIQCDeSkFEV1zLISwv9U1Zna7u2A0MeYg4tgE68GaWeMWiDGQ/IZSCFZJQIqmby8GCMLs0lAK0SU5SbhmX841ZnanpGtLAHKzY2wsgvXAkGu82CEGAChuNZaInWIRQKZixAGYhteVWiCVrEq+YMo1ZobfN0q6uhYguuMBF0lKBp99plt9JWGBa1o66LYGZgY9U2lU9k103im+/WODSpCzkvZHpQYQIpp6cV0NYXZvCOFkX6kB5A5JrQJYDTzW2xNC+LuLif6bZnaVu2aVstHpzgUOMAfRZaQLZ2K4JiuM13y6P4sFdocQTvXfHVNqVgFCEP4RQjgzC59SagBh1nBkuWjjy/eFEHDFXMspNai9JKFFXMOX44I5C0wyZu4T/fD2rkYQvnxX7pwku8x6sOISFiYsU9r+chcQC8lWBNEDwTUlmZUYwAVFR1bFEA4CwN0JENI4AMyC4rP3KggHIZGRWWddA8BJd0HxWdlgssr5rweCa/qZFQDWgiqAZggHYY3BNUxf1gBiICsXVueJnFX84BVrnKqpxIszZg5gmb9XB+YyB59kTDNDIzjeElCLArk7r6O8e4t5LemXmrm9BACqOFSijUC85xubHZJ+WweIbw/uk0SR3d2pAaKbdZJ+d4sUpdsWa/gZ6v2S7unfqYkQ9IkcsEvST6uwiMfAw5JYlaeUmj5E/LidknYuM1gd4CG3wJQR++6YtS4W2ZEqRkrd4TUJAKT6uZaCIEZ2S9q+iEVcrH3M65FRpWbIHX1aLPJjC4gH4eNeq44aLmWJ/kt7PFgHC9Wh3n0P84gk9KpkK4XANehW35dUS26Bp1wwzS4NpRDxSyLIaN1oZqyqz4zJhbWBOWZCRFaCtdtH9puZIQ8QhIN65ViHtZaImRUh/rsQwsQifiPl6Val5t0WdQX9W9K35BEHeLZRKOmuszwnCdW9pQFCLrm3VizrDXYQCOSAJ2r96J0wayjtWzUN5KatUakhoJhSrbpTixWPe1yd6Cs1TZHdMrrH0zakIt4fUmpaXVPKw8z6IafUoF3hmipVtpDgmM+oqRwzptQAwsJTlXQSIATwwbEkl1NqcA3V+KKNLIsLmpSaZbgGxZekNroCZ1c4V3xZD2otElde1plkCZCF6BaLC7IiIDWZda/HwKhWFX1cBOEgZNYn/TwrFSNYgGm4tbQ+LYbogXCsPWYRAKjCKAezWlW1JeILvmIyfWdBYmEMQNXmqcoSPRBihITGQVusMZiGuKAKYC5t1yQDD1YKWY6bKPvYtVVLRQtBeIzEG+rcLCtW62Y/tskdNRYrefb/AWFmrA+/hhCQgdfavKq7j/LuAyAkfT5Uxq+KygFeljSBiALJF7HaWdXgHtBUcS9FoSRaIo7JOfhHIYQTq4IwM6b0G/1N8iwEYyOifbYKEDOjWnt1VqcYgoggxMify7KIS5XEAId8U20Mgocoxz4OIbA3WKiZGdeZcMHkWlO/wxQEz7EifhpCYI/Q1NwCr6d0ihwEAxOsuIYtX1UzM85FmAXJYqgEgoEBwDXFIA7wmi9wSfhSiBgjn4QQKFyTze/VvVlQhXX91EDwPGUbCW30Xo2ZcRDDLCAfFLVaCDpl2mKRORAzQyp+RRL1aHFrgaBzpi2ZdXJ10mMAF7BXqWpAvN+oL7Cv/MJFEgTzF2st4KTngXjbJf8qen+YNQaxlWODmtPj/lg74p0aQLics84ih5Wb4vjDqNSwxWNh4arCuho7NJLgkb5SQ0S/4xZZNQhiG4E9eKcGv+Ia0u0qXIMLiCGy72STPDeQmSGMkGwGzyYWNBGHOZtmF8QxpQaLMOc5JlpW2y7pq9o7NYBQAwCyiGs4V/tZ0pdjm+TcnRry/wuu2LZaZJukzalKPvuFfn7F9CUh1TSCcIukr3Ob5CwEo/oZBgsTIJOjxAQR+9KtboHsJrkIwkHII89L4lwz1YgBLLClVCgphnAQ7tQQI6g1Qw2ATX5MVbxLr4LogbBiYpG+azD7N26BYgD6rIZwEKYv5yTRIgy62ZWabAzMmrAJwkEQSDhuIlixAFcfmv4nxH+8RMcvoX23QgAAAABJRU5ErkJggg=="
- }
- , function(t, e) {
- t.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAACECAYAAAAeNUIyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABphJREFUeNrsW2tTHEUU7enZAXYD4bkICCKaqNFUtPxiaUzUWH73H2sV5bt8lkETX2VFQiCoRBNY1rDrXHK6qtPOo++dnsEPuVUdyOzM9Nl7b3ffc7qJlVJjaRuiNW1x2kZ1+g+1EVxoGgD1qzUuRLjQaghAC/1Rv0pbH9CFpAEgLfQTmQvauaFuIP8BkAWiTiCZAFRBRwYI2f2AOZBpuuDBUB5pWV8o9wblAYR+/iMAkJQBKPNEVY94AfAFYb+0VcO9x7NW4nlvZM2qAw8PRL4gdOA4J4wv5Z2YZc/ZySpef2K8MGI+54ZmRPgesmFkrWaR0CvDis/2I2dZjVRzdgxgOBwemcQ8ogtNA0C/D40OunDYQIX1EICsIWo8MmwKQN48UVdohvD0ke9kFTo0BsCAO2OGCo0JwUA6bVcFkhsC7tohBULfvFey2LEWMC6QAed+zirqm6yFSRhiKR+UADEhYIVOUk/kuXogTWItzHo3NOwQhLSoQh3xAP3wJMSADBBa/U8sqZAbVY36TaiiegoXeicAYCZtCwTisbS18cF+gyDm0jZLid2yUHXxc7fmoaYtAJnzxDQ+1DUDmC6arEyc5moC0QUAXcbAtOWqUKGhd867HvCZtqfhER0AAHlgSrJ2aADpVgRhPBBJCbHJEbLbzNBoDP+pUKsoNzQmByZDLuURPDLvef8CPOC1unL0icjK7p2c0MQAcLruombKml1dAOSpiSYqK+OReefaInKAXeDEeDAWAGkjnH0AmBBWWP0YulNbqDfRhs04nhcBSNu2eZBetKSa3XghzXwrLe/u2ujH4dYmNl7I+zepfqEa03XhKcxyozUCoApu2xRQWYXuvbTdUjIx3dcDt9wKLmuI7sNVoYFQEt5I20HWUMuzDkIzFgDAATzQ4/KO/UChIXq4VVTNR55zwbISCOfo+IYq2MLKGh1FQBYsauBjJsn7oWhgz+eFTg5s+d7PnWpJ/15R+Tt7QwD4TZWIZZJw2DaKmbWdAeAuPOa9jSll5SbbD3NygL2PWmVroYXQJBjOmxKpKIRI0sJ6I+Ymj5Qa12ZUc4c3ssI5S5XUq6io9lSz52qozzNpO0u/PIsynnjEXw0BoX7XIFW1DBrDsOj/d2pWakbQ55rKOVPzBG6Ia8yBM+gncuNiAzEcMrRHCMDZtK26k6QLwmbhCXLkKACAMeTeCpcGLgN51eGbAMCShJVHAEKj5ZqSHfChJHwBtWolaWAFYbuueKovrSnP+chNvtP2Il6YMDxwTnlKkb7xjlBj0s+rJWUbFT0vqRy5sKpSoxBbAvK9ytbBSR54ngNAKpJ04Wq3zmwjCae4L9SCtSICkBct4kwAXuaIZXZJEcN1HYFHOpZAdo4rllm2axas00xiY4dgTvgs2Z9p29CokjfS9rdQRJPOqLQkbKTl3b2oamYL7fe0fUc8JU+pOV8zkF14vlCpuQpX1WF7NoAy8jOOMR/KIzQN3M6a5Mq4aAehmQkAYgceECk1GwFC80ceAA4XHceomRGEYBsh6IWQBjoAwtkl3AKAw1A0cB/jeo+ZhId1SAOnSooVAnAT5aCXVCRVasySPZcBYBMAvGVHKSs/QLbvOQB2uABCKDUd1J2TGAXXJRV5CJEkARgxbXyk1Lh2HkPvJOy4dKBYvouCps7NljwAr6XtginNnsRI+VA9UGXrtgnIVKs2+YkAhCj8e8J609doSL9pk2Q3MYnqXVKCrWZPo6r+dZel6xxd4pLyPHbAMCoFLqftcV8aSECuBCzv6IzOW3lCiS7hnBcrMCvXA7NSQryEJJoVAljE892qrHxBCGQRHiitxjQjppcZdWaXk9yctaMLjyx4aFxXODoFdwEj175RAGQVHmMNb8kqOglXz2XkwEXJYhhDceGCaaPTO5jinwawccGXuh8j2SRUz+wak2cuCNUesp9jcIR5uJFbc44iYSX76KY4XtdYutdxoUmj+mXdVWrIE+8o/6NtVWwTJUPmmRpKuLeRdHX8TRiFgI4yvG9IclahS8TmA1C5OuwXVG89H/LTxtK7HBAAEeRPXJJcxkXbmKaXK4aGtrB+SNtHWSS5jHccwHW/VvQA8dPPili675kamg3XBEn4ddq+LKISHGlgFAXqmvL/i6lv0/Z5GUnm0EBKpo/T9qNnDnwDD3ixdMmZmleg1uQB+FQ9EGS9z9RwxfE+hhmBf8YJDX3rrzgAqtQTfWT7NScHvkAY2Ju5VcZ/glpkDR74SQm2tSkc/wowABSuxDvxNYq7AAAAAElFTkSuQmCC"
- }
- , function(t, e, i) {
- "use strict";
- Object.defineProperty(e, "__esModule", {
- value: !0
- }),
- e.methods = {
- getRoomEles: function(t) {
- var e = this;
- return {
- ground: t.ground.map((function(t) {
- return e.points.find((function(e) {
- return e.id === t
- }
- )).ele
- }
- )),
- hole: t.hole.map((function(t) {
- return t.pos.map((function(t) {
- return e.points.find((function(e) {
- return e.id === t
- }
- )).ele
- }
- ))
- }
- ))
- }
- }
- }
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__assign || function() {
- return (n = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , g = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var A = function(t, e) {
- return void 0 === e && (e = 2),
- Number(t.toFixed(e))
- };
- e.methods = {
- baseArchToData: function(t) {
- return {
- line: this.getLineId(t.attachment),
- pos: [A(t.linePoints[0].x), A(t.linePoints[0].y), A(t.linePoints[1].x), A(t.linePoints[1].y)],
- top: t.top,
- bottom: t.bottom
- }
- },
- roomArchToData: function(t) {
- return {
- pos: [A(t.points[0].x), A(t.points[0].y), A(t.points[1].x), A(t.points[1].y), A(t.points[2].x), A(t.points[2].y), A(t.points[3].x), A(t.points[3].y)],
- top: t.top,
- bottom: t.bottom,
- angle: t.angle
- }
- },
- pointToData: function(t) {
- var e = t.ele;
- return {
- id: t.id,
- x: A(e.x),
- y: A(e.y)
- }
- },
- lineToData: function(t) {
- var e = t.ele
- , i = t.id
- , n = t.border;
- return {
- id: i,
- p1: this.getPointId(e.points[0]),
- p2: this.getPointId(e.points[1]),
- border: n,
- exterior: e.exterior
- }
- },
- doorToData: function(t) {
- var e = t.ele
- , i = this.baseArchToData(e);
- return i.within = e.within,
- i.show = e.show,
- i.ctl = [e.ctl[0].x, -e.ctl[0].y],
- i.start = e.start,
- i
- },
- DoubleDoorToData: function(t) {
- var e = t.ele
- , i = this.baseArchToData(e);
- return i.within = e.within,
- i.show = e.show,
- i
- },
- slideDoorToData: function(t) {
- var e = t.ele
- , i = this.baseArchToData(e);
- return i.within = e.within,
- i.show = e.show,
- i
- },
- caseToData: function(t) {
- var e = t.ele;
- return this.baseArchToData(e)
- },
- groundCaseToData: function(t) {
- var e = t.ele;
- return this.baseArchToData(e)
- },
- BayCaseToData: function(t) {
- var e = t.ele
- , i = this.baseArchToData(e);
- return i.within = e.within,
- i.ctl = [e.ctl[0].x, -e.ctl[0].y, e.ctl[1].x, -e.ctl[1].y],
- i
- },
- columnToData: function(t) {
- var e = t.ele
- , i = this.baseArchToData(e);
- return n(n({}, i), {
- pos: g(i.pos, [A(e.points[3].x), A(e.points[3].y), A(e.points[2].x), A(e.points[2].y)])
- })
- },
- taggingToData: function(t) {
- var e = t.ele;
- return {
- pos: [e.x, e.y],
- title: e.title,
- content: e.content,
- showTitle: e.showTitle,
- showContent: e.showContent
- }
- },
- furnColumnToData: function(t) {
- var e = t.ele;
- return this.roomArchToData(e)
- },
- furnFlueToData: function(t) {
- var e = t.ele;
- return this.roomArchToData(e)
- },
- getNewPointId: function() {
- return 0 === this.points.length ? 1 : Math.max.apply(Math, this.points.map((function(t) {
- return t.id
- }
- ))) + 1
- },
- getNewLineId: function() {
- return 0 === this.lines.length ? 1 : Math.max.apply(Math, this.lines.map((function(t) {
- return t.id
- }
- ))) + 1
- },
- getLineId: function(t) {
- var e = this.lines.find((function(e) {
- return e.ele === t
- }
- ));
- return e ? e.id : 0
- },
- getPointId: function(t) {
- return this.points.find((function(e) {
- return e.ele === t
- }
- )).id
- },
- toData: function() {
- var t = this
- , e = this.points.map((function(e) {
- return t.pointToData(e)
- }
- ))
- , i = this.columns.map((function(e) {
- return t.columnToData(e)
- }
- ))
- , n = this.cases.map((function(e) {
- return t.caseToData(e)
- }
- ))
- , g = this.doors.map((function(e) {
- return t.doorToData(e)
- }
- ))
- , A = this.slideDoors.map((function(e) {
- return t.slideDoorToData(e)
- }
- ))
- , r = this.groundCases.map((function(e) {
- return t.groundCaseToData(e)
- }
- ))
- , o = this.taggings.map((function(e) {
- return t.taggingToData(e)
- }
- ))
- , C = this.bayCases.map((function(e) {
- return t.BayCaseToData(e)
- }
- ))
- , I = this.doubleDoors.map((function(e) {
- return t.DoubleDoorToData(e)
- }
- ))
- , s = this.furnColumns.map((function(e) {
- return t.furnColumnToData(e)
- }
- ))
- , a = this.furnFlues.map((function(e) {
- return t.furnFlueToData(e)
- }
- ))
- , l = [];
- return this.lines.forEach((function(e) {
- try {
- l.push(t.lineToData(e))
- } catch (t) {}
- }
- )),
- {
- id: this.id,
- show: this.show,
- vertex: e,
- wall: l,
- window: n,
- door: g,
- column: i,
- surplus: this.data.surplus,
- slideDoor: A,
- groundCase: r,
- tagging: o,
- doubleDoor: I,
- bayCase: C,
- furnColumn: s,
- furnFlue: a,
- dire: this.data.dire
- }
- }
- }
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- , g = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var A = g(i(4))
- , r = i(0)
- , o = i(1);
- e.methods = {
- lineInsertPoint: function(t, e) {
- var i = this
- , g = []
- , C = []
- , I = this
- , s = I.points.find((function(t) {
- return t.ele === e
- }
- ));
- return s ? (I.lines.forEach((function(a) {
- var l = a.ele;
- a.border;
- if (~l.points.indexOf(t.points[0]) && ~l.points.indexOf(t.points[1]) && !I.lines.some((function(t) {
- var i = t.ele;
- return ~i.points.indexOf(e) && ~i.points.indexOf(l.points[0])
- }
- ))) {
- var u = A.default.attaArch.get(l);
- i.cad.increase;
- var c = {
- ele: i.cad.increase(o.SEFTLINE, {
- id: i.getNewLineId(),
- p1: I.getPointId(l.points[0]),
- p2: s.id,
- border: l.border,
- exterior: l.exterior,
- isOut: l.isOut
- }).obj
- };
- C.push(c),
- c.ele.update();
- var h = [s.ele, l.points[1]];
- l.points = h,
- l.listenPointDrag([s.ele, l.points[1]]),
- g.push(new Promise((function(t) {
- l.nextTick((function() {
- l.updateJoin(),
- c.ele.updateJoin(),
- u && n(u).forEach((function(t) {
- r.pointLineDis(c.ele, t.linePoints[0]) < .1 && r.pointLineDis(c.ele, t.linePoints[1]) < .1 && t.setAttachment(c.ele)
- }
- )),
- setTimeout(t, 200)
- }
- ))
- }
- )))
- }
- }
- )),
- {
- lines: C,
- promis: Promise.all(g),
- ret: !0
- }) : {
- ret: !1
- }
- }
- }
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__assign || function() {
- return (n = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , g = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- , A = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var r = A(i(4))
- , o = A(i(13))
- , C = i(3)
- , I = i(0)
- , s = i(1)
- , a = i(9)
- , l = [s.TAGGING, s.LINE, s.SEFTLINE]
- , u = [s.POINT, s.DOOR, s.COLUMN, s.CASEMENT, s.ARCH, s.SLIDEDOOR, s.GROUNDCASE, s.BAYCASE, s.DOUBLEDOOR]
- , c = [s.FURNCOLUMN, s.FURNFLUE];
- e.attachInsert = function(t) {
- var e, i = function(e, i) {
- var n = t.processing
- , g = n.lines.map((function(t) {
- return t.ele
- }
- )).filter((function(t) {
- return !t.exterior
- }
- )).map((function(t) {
- return {
- dis: I.pointLineDis(t, e),
- line: t
- }
- }
- )).sort((function(t, e) {
- return t.dis - e.dis
- }
- )).find((function(t) {
- return I.pointLineDis(t.line, I.getLinePoint(t.line, {
- x: e.x
- })) < .1 || I.pointLineDis(t.line, I.getLinePoint(t.line, {
- y: e.y
- })) < .1
- }
- ));
- if (!g)
- return {
- error: !0,
- msg: a.i18n.t("modules.model.error_location", {
- widget: s.ARCH[i]
- }),
- obj: null
- };
- var A = g.line
- , o = (n.lines.find((function(t) {
- return t.ele === A
- }
- )),
- r.default.attaArch.get(A),
- I.getLinePoint(A, e));
- if (i === s.POINT)
- return I.pointLineDis(g.line, o) > .1 ? {
- error: !0,
- msg: a.i18n.t("modules.model.error_location", {
- widget: ""
- }),
- obj: null
- } : [A, o];
- var l = function(t, e, i) {
- var n = I.getDisPointLinePoints(t, e, i / 2);
- return [n[0], n[1]]
- }(A, o, s.DEFAULT[i].width);
- return C.type.isArray(l) ? [A, l, e] : {
- error: !0,
- msg: l
- }
- }, A = ((e = {})[s.POINT] = function(e, i) {
- var g = t.processing;
- g.insertModel = !0;
- var A = g.addPoint(n({
- id: g.getNewPointId()
- }, i));
- g.data.vertex.push({
- id: A.id,
- x: A.ele.x,
- y: A.ele.y
- });
- var r = g.lineInsertPoint(e, A.ele)
- , o = r.lines
- , C = r.promis;
- if (r.ret)
- return C.then((function() {
- return g.insertModel = !1
- }
- )),
- o.map((function(t) {
- return t.ele
- }
- ))
- }
- ,
- e[s.DOOR] = function(e, i, n, g, A) {
- var r = t.processing;
- return r.addDoor({
- pos: [i[0].x, i[0].y, i[1].x, i[1].y],
- line: r.getLineId(e),
- start: !1,
- within: 0
- }).ele
- }
- ,
- e[s.DOUBLEDOOR] = function(e, i, n, g, A) {
- var r = t.processing;
- return r.adddDoubleDoor({
- pos: [i[0].x, i[0].y, i[1].x, i[1].y],
- line: r.getLineId(e),
- start: !1,
- within: 0
- }).ele
- }
- ,
- e[s.SLIDEDOOR] = function(e, i, n, g, A) {
- var r = t.processing;
- return r.addSlideDoor({
- within: 0,
- pos: [i[0].x, i[0].y, i[1].x, i[1].y],
- line: r.getLineId(e)
- }).ele
- }
- ,
- e[s.GROUNDCASE] = function(e, i, n, g, A) {
- var r = t.processing;
- return r.addGroundCase({
- pos: [i[0].x, i[0].y, i[1].x, i[1].y],
- line: r.getLineId(e)
- }).ele
- }
- ,
- e[s.BAYCASE] = function(e, i, n, g, A) {
- var r = t.processing;
- return r.addBayCase({
- pos: [i[0].x, i[0].y, i[1].x, i[1].y],
- line: r.getLineId(e),
- within: 0
- }).ele
- }
- ,
- e[s.CASEMENT] = function(e, i, n, g, A) {
- var r = t.processing;
- return r.addCase({
- pos: [i[0].x, i[0].y, i[1].x, i[1].y],
- line: r.getLineId(e)
- }).ele
- }
- ,
- e[s.COLUMN] = function(e, i, n) {
- var g = t.processing
- , A = I.getDisVerticalLinePoints(e, i[0], s.DEFAULT[s.COLUMN].width)
- , r = (A[0],
- A[1]);
- if (!r)
- return a.i18n.t("modules.model.error_widget", {
- widget: a.i18n.t("modules.model.column")
- });
- var o = I.getDisVerticalLinePoints(e, i[1], s.DEFAULT[s.COLUMN].tick)
- , C = o[0]
- , l = o[1]
- , u = I.lineDis({
- points: [C, r]
- }) > I.lineDis({
- points: [l, r]
- }) ? l : C;
- return g.addColumn({
- pos: [i[0].x, i[0].y, i[1].x, i[1].y, r.x, r.y, u.x, u.y],
- line: g.getLineId(e)
- }).ele
- }
- ,
- e[s.TAGGING] = function(e) {
- return t.processing.addTagging({
- pos: [e.x, e.y],
- title: "",
- content: "",
- showTitle: !0,
- showContent: !0
- }).ele
- }
- ,
- e[s.FURNCOLUMN] = function(e, i, n, g) {
- return t.processing.addFurnColumn({
- pos: e,
- angle: 0
- }).ele
- }
- ,
- e[s.FURNFLUE] = function(e, i, n, g) {
- return t.processing.addFurnFlue({
- pos: e,
- angle: 0
- }).ele
- }
- ,
- e[s.LINE] = function(e) {
- t.processing;
- var i = s.DEFAULT[s.LINE].width
- , n = {
- points: [{
- x: e.x - i / 2,
- y: e.y
- }, {
- x: e.x + i / 2,
- y: e.y
- }]
- }
- , g = t.processing.lines.some((function(t) {
- var e = t.ele;
- return I.segmentsIntr(e, n)
- }
- ));
- return g && (n = {
- points: [{
- x: e.x - i / 2,
- y: e.y
- }, {
- x: e.x + i / 2,
- y: e.y
- }]
- },
- g = t.processing.lines.some((function(t) {
- var e = t.ele;
- return I.segmentsIntr(e, n)
- }
- ))) ? a.i18n.t("modules.model.error_widget", {
- widget: a.i18n.t("modules.model.line")
- }) : t.processing.furnColumns.concat(t.processing.furnFlues).map((function(t) {
- return t.ele
- }
- )).every((function(t) {
- return !I.isFaceIntersect(n.points, t.points) && !I.isFaceContain(n.points, t.points) && !I.isFaceContain(t.points, n.points)
- }
- )) ? t.processing.addRoom(n)[0].ele : a.i18n.t("modules.model.error_widget", {
- widget: a.i18n.t("modules.model.line")
- })
- }
- ,
- e[s.SEFTLINE] = function(e) {
- return t.processing.addLine(e).ele
- }
- ,
- e);
- t.increase = function(e, r, I, h, p) {
- void 0 === I && (I = null),
- void 0 === h && (h = null),
- void 0 === p && (p = !1);
- var d = t.processing.render;
- if (A[e]) {
- var f, y = p ? d.screenToRealPoint(r) : r;
- if (~u.indexOf(e) || ~c.indexOf(e)) {
- var v = ~c.indexOf(e) ? function(e, i) {
- var g = t.processing
- , A = s.DEFAULT[i].width / 2
- , r = s.DEFAULT[i].tick / 2
- , C = [{
- x: e.x - A,
- y: e.y + r
- }, {
- x: e.x + A,
- y: e.y + r
- }, {
- x: e.x + A,
- y: e.y - r
- }, {
- x: e.x - A,
- y: e.y - r
- }]
- , I = (n(n({}, o.default.prototype), {
- renderer: g.render,
- minWidth: .1
- }),
- []);
- return C.forEach((function(t) {
- I.push(t.x),
- I.push(t.y)
- }
- )),
- [I]
- }(y, e) : i(y, e);
- if (!C.type.isArray(v))
- return v;
- var m = A[e].apply(A, g(v, [I, h]));
- if ("string" == typeof m)
- return {
- error: !0,
- msg: m,
- obj: null
- };
- f = m
- } else if (~l.indexOf(e) && "string" == typeof (f = A[e](y)))
- return {
- error: !0,
- msg: f,
- obj: null
- };
- return t.preservation && t.preservation(),
- {
- error: !1,
- msg: a.i18n.t("modules.model.success", {
- widget: s.ARCH[e]
- }),
- obj: f
- }
- }
- }
- ;
- var h = t.destroy;
- t.destroy = function() {
- for (var e = [], i = 0; i < arguments.length; i++)
- e[i] = arguments[i];
- var n = t.processing;
- n.render;
- n = null,
- h.apply(this, e)
- }
- }
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- , g = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var A = g(i(41))
- , r = g(i(42));
- e.attachGauge = function(t) {
- var e = {
- processings: [],
- setGaugeAttrs: [],
- showGauge: [],
- setGaugeModel: [],
- hideGauge: [],
- showDire: [],
- hideDire: [],
- setDireAttrs: [],
- setAngle: []
- }
- , i = t.delProcessing;
- t.delProcessing = function(g) {
- for (var A = [], r = 1; r < arguments.length; r++)
- A[r - 1] = arguments[r];
- var o = e.processings.indexOf(g);
- return console.error("-------", o),
- ~o && Object.keys(e).forEach((function(t) {
- e[t].splice(o, 1)
- }
- )),
- i.call.apply(i, n([t, g], A))
- }
- ;
- var g = t.addProcessing;
- t.addProcessing = function() {
- for (var i = [], C = 0; C < arguments.length; C++)
- i[C] = arguments[C];
- var I, s = g.call.apply(g, n([t], i));
- e.processings.push(s);
- var a = s.lines
- , l = a.push
- , u = s.points
- , c = u.push
- , h = function(t) {
- t.__label_intercept = t.intercept,
- t.intercept = function() {
- for (var e = [], i = 0; i < arguments.length; i++)
- e[i] = arguments[i];
- return I.update(),
- t.__label_intercept.apply(t, e)
- }
- }
- , p = function(t) {
- t.__label_intercept = t.drag,
- t.drag = function() {
- for (var e = [], i = 0; i < arguments.length; i++)
- e[i] = arguments[i];
- return I.update(),
- t.__label_intercept.apply(t, e)
- }
- };
- e.setGaugeAttrs.push((function(t) {
- I.__state.direct = !0,
- Object.keys(t).forEach((function(e) {
- I[e] = t[e]
- }
- )),
- I.__state.direct = !1,
- I.update()
- }
- ));
- var d = function() {
- I || (I = new A.default({
- processing: s
- }),
- t.gauge = I),
- a.push = function() {
- for (var t = [], e = 0; e < arguments.length; e++)
- t[e] = arguments[e];
- var i = l.apply(a, t);
- return I.update(),
- t.forEach((function(t) {
- var e = t.ele;
- return p(e)
- }
- )),
- i
- }
- ,
- u.forEach((function(t) {
- var e = t.ele;
- return h(e)
- }
- )),
- a.forEach((function(t) {
- var e = t.ele;
- return p(e)
- }
- )),
- u.push = function() {
- for (var t = [], e = 0; e < arguments.length; e++)
- t[e] = arguments[e];
- return t.forEach((function(t) {
- var e = t.ele;
- return h(e)
- }
- )),
- c.apply(u, t)
- }
- ,
- s.render.push(I)
- };
- e.showGauge.push(d),
- o && d(),
- e.setGaugeModel.push((function(t) {
- return I ? (I.surround = 1 === t,
- new Promise((function(t) {
- return I.nextTick(t)
- }
- ))) : new Promise((function(t) {
- return t(void 0)
- }
- ))
- }
- )),
- e.hideGauge.push((function() {
- a.push = l,
- u.push = c,
- u.forEach((function(t) {
- var e = t.ele;
- return e.intercept = e.__label_intercept
- }
- )),
- s.render.remove(I)
- }
- ));
- var f = new r.default({
- angle: 0,
- renderer: s.render
- });
- return s.direction = f,
- e.showDire.push((function() {
- f.show = !0,
- s.render.push(f)
- }
- )),
- e.hideDire.push((function() {
- f.show = !1,
- s.render.remove(f)
- }
- )),
- e.setDireAttrs.push((function(t) {
- return Object.keys(t).forEach((function(e) {
- f[e] = t[e]
- }
- )),
- new Promise((function(t) {
- return f.nextTick(t)
- }
- ))
- }
- )),
- s
- }
- ,
- t.setGaugeAttrs = function(t) {
- return console.error(e.setGaugeAttrs),
- Promise.all(e.setGaugeAttrs.map((function(e) {
- return e(t)
- }
- )))
- }
- ;
- var o = !1;
- t.showGauge = function() {
- o || (o = !0,
- e.showGauge.forEach((function(t) {
- return t()
- }
- )))
- }
- ,
- t.setGaugeModel = function(t) {
- return Promise.all(e.setGaugeModel.map((function(e) {
- return e(t)
- }
- )))
- }
- ,
- t.hideGauge = function() {
- o && (o = !0,
- e.hideGauge.forEach((function(t) {
- return t()
- }
- )))
- }
- ;
- var C = t.destroy;
- t.destroy = function() {
- for (var e = [], i = 0; i < arguments.length; i++)
- e[i] = arguments[i];
- t.hideGauge(),
- o = !1,
- C.apply(this, e)
- }
- ,
- t.showDire = function() {
- e.showDire.forEach((function(t) {
- return t()
- }
- ))
- }
- ,
- t.hideDire = function() {
- e.hideDire.forEach((function(t) {
- return t()
- }
- ))
- }
- ,
- t.setDireAttrs = function(t) {
- return Promise.all(e.setDireAttrs.map((function(e) {
- return e(t)
- }
- )))
- }
- ,
- t.setAngle = function(e) {
- t.processing.data.dire = e,
- t.processing.direction.angle = e
- }
- }
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__assign || function() {
- return (A = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , r = this && this.__rest || function(t, e) {
- var i = {};
- for (var n in t)
- Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
- if (null != t && "function" == typeof Object.getOwnPropertySymbols) {
- var g = 0;
- for (n = Object.getOwnPropertySymbols(t); g < n.length; g++)
- e.indexOf(n[g]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[g]) && (i[n[g]] = t[n[g]])
- }
- return i
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var o = i(2)
- , C = i(1)
- , I = i(0)
- , s = 0
- , a = function(t, e, i, n, g, A, r, o, a) {
- var l = document.createElementNS(C.SVGURI, "g")
- , u = {
- points: [t, e]
- }
- , c = "lineBoth" + s++
- , h = I.getDisVerticalLinePoints(u, t, n)
- , p = h[0]
- , d = h[1]
- , f = I.getDisVerticalLinePoints(u, e, n)
- , y = f[0]
- , v = f[1]
- , m = document.createElementNS(C.SVGURI, "path");
- l.appendChild(m),
- m.setAttribute("stroke", a),
- m.setAttribute("stroke-width", i.toString()),
- "top" === o || "right" === o ? m.setAttribute("d", "M " + p.x + " " + p.y + " L " + y.x + " " + y.y) : m.setAttribute("d", "M " + d.x + " " + d.y + " L " + v.x + " " + v.y),
- m.setAttribute("id", c);
- var b = m.cloneNode(!0);
- b.setAttribute("d", "M " + p.x + " " + p.y + " L " + d.x + " " + d.y),
- l.appendChild(b),
- (b = m.cloneNode(!0)).setAttribute("d", "M " + y.x + " " + y.y + " L " + v.x + " " + v.y),
- l.appendChild(b);
- var x = A.toString().length / 2.5 * g
- , _ = A / 2 - x
- , w = document.createElementNS(C.SVGURI, "text");
- w.setAttribute("x", _.toString()),
- w.setAttribute("y", "0"),
- w.setAttribute("style", "fill: " + a + "; font-size: " + g + "px");
- var P = document.createElementNS(C.SVGURI, "textPath");
- P.setAttributeNS(C.SVGPATH, "xlink:href", "#" + c),
- P.appendChild(document.createTextNode(A + "m")),
- w.appendChild(P);
- var O = I.lineVector({
- points: [t, e]
- })
- , S = document.createElementNS(C.SVGURI, "path");
- S.setAttribute("stroke", a),
- S.setAttribute("stroke-width", i.toString()),
- O.x > O.y ? S.setAttribute("d", "M " + t.x + " " + t.y + " L " + (e.x - _ - 2 * x - r) + " " + e.y) : S.setAttribute("d", "M " + t.x + " " + t.y + " L " + e.x + " " + (e.y - _ - 2 * x - r));
- var E = S.cloneNode(!0);
- return O.x > O.y ? E.setAttribute("d", "M " + (e.x - _ + r) + " " + t.y + " L " + e.x + " " + e.y) : E.setAttribute("d", "M " + t.x + " " + (e.y - _ + r) + " L " + e.x + " " + e.y),
- l.appendChild(E),
- l.appendChild(S),
- m.style.display = "none",
- l.appendChild(w),
- l
- }
- , l = function(t) {
- function e(e) {
- var i = e.processing
- , n = e.padding
- , g = void 0 === n ? 10 : n
- , o = e.spacing
- , C = void 0 === o ? 4 : o
- , I = e.minPX
- , s = void 0 === I ? 50 : I
- , a = e.width
- , l = void 0 === a ? 1 : a
- , u = e.showBottom
- , c = void 0 === u || u
- , h = e.showTop
- , p = void 0 === h || h
- , d = e.showLeft
- , f = void 0 === d || d
- , y = e.showRight
- , v = void 0 === y || y
- , m = e.surround
- , b = void 0 !== m && m
- , x = e.stroke
- , _ = void 0 === x ? "#fff" : x
- , w = r(e, ["processing", "padding", "spacing", "minPX", "width", "showBottom", "showTop", "showLeft", "showRight", "surround", "stroke"])
- , P = t.call(this, A({
- renderer: i.render,
- minPX: s,
- width: l,
- showBottom: c,
- showTop: p,
- showLeft: f,
- showRight: v,
- surround: b,
- stroke: _
- }, w)) || this;
- return P.padding = g,
- P.spacing = C,
- P.processing = i,
- Object.defineProperty(P, "points", {
- get: function() {
- return this.processing.points
- }
- }),
- P.update(),
- P
- }
- return g(e, t),
- e.prototype.grentNode = function() {
- this.top = document.createElementNS(C.SVGURI, "g"),
- this.left = document.createElementNS(C.SVGURI, "g"),
- this.right = document.createElementNS(C.SVGURI, "g"),
- this.bottom = document.createElementNS(C.SVGURI, "g");
- var t = document.createElementNS(C.SVGURI, "g");
- return t.appendChild(this.top),
- t.appendChild(this.left),
- t.appendChild(this.right),
- t.appendChild(this.bottom),
- t
- }
- ,
- e.prototype.calcSplit = function() {
- var t = this.processing.render
- , e = this.minPX
- , i = I.lineDis({
- points: [t.screenToRealPoint({
- x: 0,
- y: 0
- }), t.screenToRealPoint({
- x: e,
- y: 0
- })]
- })
- , n = I.lineDis({
- points: [t.screenToRealPoint({
- x: 0,
- y: 0
- }), t.screenToRealPoint({
- x: 0,
- y: e
- })]
- })
- , g = this.points.map((function(t) {
- return t.ele
- }
- ))
- , r = []
- , o = []
- , C = []
- , s = []
- , a = function(t, e, r) {
- var o, C;
- g.sort(e),
- g.forEach((function(e) {
- return 0 === t.length || e[r] > t[t.length - 1] ? t.push(e[r]) : e[r] < t[0] && t.unshift(e[r])
- }
- ));
- for (var s = "x" === r ? i : n, a = {
- x: 0,
- y: 0
- }, l = 0; l < t.length - 2; l++) {
- var u = A(A({}, a), ((o = {})[r] = t[l],
- o))
- , c = A(A({}, a), ((C = {})[r] = t[l + 1],
- C));
- I.lineDis({
- points: [u, c]
- }) < s && (t.splice(l + 1, 1),
- l--)
- }
- t.length > 2 && t.splice(t.length - 2, 2, t[t.length - 1])
- };
- return a(r, (function(t, e) {
- return t.x - e.x ? t.x - e.x : e.y - t.y
- }
- ), "y"),
- a(C, (function(t, e) {
- return e.x - t.x ? e.x - t.x : e.y - t.y
- }
- ), "y"),
- a(o, (function(t, e) {
- return t.y - e.y ? t.y - e.y : e.x - t.x
- }
- ), "x"),
- a(s, (function(t, e) {
- return e.y - t.y ? e.y - t.y : e.x - t.x
- }
- ), "x"),
- {
- left: r,
- top: o,
- right: C,
- bottom: s
- }
- }
- ,
- e.prototype.update = function() {
- var t = this;
- if (0 !== this.points.length && 0 !== this.processing.render.props.width) {
- var e = this.processing.render
- , i = 10 * this.width * this.multiple
- , n = this.calcSplit()
- , g = n.left
- , A = n.right
- , r = n.top
- , o = n.bottom
- , C = e.screenToRealPoint({
- x: this.padding,
- y: this.padding
- })
- , I = e.screenToRealPoint({
- x: e.props.width / e.props.multiple - this.padding,
- y: e.props.height / e.props.multiple - this.padding
- });
- if (this.surround) {
- var s = this.points.map((function(t) {
- return t.ele.x
- }
- ))
- , l = this.points.map((function(t) {
- return t.ele.y
- }
- ))
- , u = Math.max.apply(Math, s)
- , c = Math.min.apply(Math, s)
- , h = Math.max.apply(Math, l)
- , p = Math.min.apply(Math, l);
- Math.abs(C.x - c) < Math.abs(C.y - p) && Math.abs(I.x - u) - Math.abs(I.y - h) ? (I = {
- x: I.x,
- y: h + Math.abs(C.x - c)
- },
- C = {
- x: C.x,
- y: p - Math.abs(C.x - c)
- }) : (I = {
- x: u + Math.abs(C.y - h),
- y: I.y
- },
- C = {
- x: c - Math.abs(C.y - p),
- y: I.y
- })
- }
- var d = function(e, n, g, A) {
- for (var r = 0; r < e.length - 1; r++) {
- var o = 0 === r ? e[r] : e[r] + t.spacing / 2 * t.multiple
- , C = r + 1 === e.length ? e[r + 1] : e[r + 1] - t.spacing / 2 * t.multiple;
- g(a(n(o), n(C), t.width * t.multiple, 4 * t.width * t.multiple, i, Number(Math.abs(e[r + 1] - e[r]).toFixed(2)), 10 * t.multiple, A, t.stroke))
- }
- };
- [this.left, this.top, this.right, this.bottom].forEach((function(t) {
- for (; t.childNodes.length; )
- t.removeChild(t.childNodes[0])
- }
- )),
- this.showLeft && d(g, (function(t) {
- return {
- x: C.x,
- y: t
- }
- }
- ), (function(e) {
- return t.left.appendChild(e)
- }
- ), "left"),
- this.showBottom && d(o, (function(t) {
- return {
- x: t,
- y: I.y
- }
- }
- ), (function(e) {
- return t.bottom.appendChild(e)
- }
- ), "bottom"),
- this.showTop && d(r, (function(t) {
- return {
- x: t,
- y: C.y
- }
- }
- ), (function(e) {
- e.querySelector("text").setAttribute("transform", "translate(0, " + i / 1.2 + ")"),
- t.top.appendChild(e)
- }
- ), "top"),
- this.showRight && d(A, (function(t) {
- return {
- x: I.x,
- y: t
- }
- }
- ), (function(e) {
- e.querySelector("text").setAttribute("transform", "translate(-" + i / 1.2 + ", 0)"),
- t.right.appendChild(e)
- }
- ), "right")
- }
- }
- ,
- e
- }(o.CADElement);
- e.default = l
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__assign || function() {
- return (A = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , r = this && this.__rest || function(t, e) {
- var i = {};
- for (var n in t)
- Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
- if (null != t && "function" == typeof Object.getOwnPropertySymbols) {
- var g = 0;
- for (n = Object.getOwnPropertySymbols(t); g < n.length; g++)
- e.indexOf(n[g]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[g]) && (i[n[g]] = t[n[g]])
- }
- return i
- }
- , o = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var C = i(2)
- , I = i(1)
- , s = i(0)
- , a = o(i(43))
- , l = o(i(44))
- , u = o(i(45))
- , c = {
- defaultIcon: l.default,
- darkIcon: u.default
- }
- , h = function(t) {
- function e(e) {
- var i = e.fontSize
- , n = void 0 === i ? 8 : i
- , g = e.r
- , o = void 0 === g ? 50 : g
- , C = e.icon
- , I = void 0 === C ? "defaultIcon" : C
- , s = e.border
- , a = void 0 === s ? 3 : s
- , l = e.right
- , u = void 0 === l ? 20 : l
- , c = e.top
- , h = void 0 === c ? 20 : c
- , p = e.ArgDire
- , d = void 0 === p ? 15 : p
- , f = e.simple
- , y = void 0 !== f && f
- , v = e.angle
- , m = void 0 === v ? 0 : v
- , b = r(e, ["fontSize", "r", "icon", "border", "right", "top", "ArgDire", "simple", "angle"]);
- return t.call(this, A({
- fontSize: n,
- r: o,
- border: a,
- right: u,
- top: h,
- ArgDire: d,
- simple: y,
- icon: I,
- angle: m
- }, b)) || this
- }
- return g(e, t),
- e.prototype.grentNode = function() {
- var t = document.createElementNS(I.SVGURI, "g");
- this.dire = document.createElementNS(I.SVGURI, "image"),
- this.bg = document.createElementNS(I.SVGURI, "image"),
- this.bg.href.baseVal = a.default,
- this.inner = document.createElementNS(I.SVGURI, "circle"),
- this.inner.setAttribute("fill", "rgba(41,41,41,1)");
- var e = document.createElementNS(I.SVGURI, "text");
- return e.setAttribute("fill", "#fff"),
- e.setAttribute("text-anchor", "middle"),
- this.topText = e.cloneNode(!0),
- this.rightText = e.cloneNode(!0),
- this.leftText = e.cloneNode(!0),
- this.bottomText = e.cloneNode(!0),
- this.topText.textContent = "N",
- this.topText.setAttribute("fill", "#00A0E9"),
- this.rightText.textContent = "E",
- this.leftText.textContent = "W",
- this.bottomText.textContent = "S",
- this.bottomText.setAttribute("fill", "#D84141"),
- this.arc = document.createElementNS(I.SVGURI, "path"),
- this.arc.setAttribute("fill", "rgba(255,255,255,0.3)"),
- t.appendChild(this.inner),
- t.appendChild(this.arc),
- t.appendChild(this.bg),
- t.appendChild(this.dire),
- t.appendChild(this.topText),
- t.appendChild(this.rightText),
- t.appendChild(this.bottomText),
- t.appendChild(this.leftText),
- t
- }
- ,
- e.prototype.intercept = function() {
- return !0
- }
- ,
- e.prototype.update = function() {
- var t = this.r / 2 + this.border + this.right
- , e = this.r / 2 + this.border + this.top
- , i = this.renderer
- , n = this.fontSize * this.multiple
- , g = this.border * this.multiple
- , A = i.screenToRealPoint({
- x: i.props.width / i.props.multiple - e,
- y: t
- });
- if (!isNaN(A.x) && !isNaN(A.y)) {
- var r = this.r * this.multiple
- , o = (n + 3 * g + r) / 2;
- this.inner.setAttribute("r", o.toString()),
- this.inner.setAttribute("cx", A.x.toString()),
- this.inner.setAttribute("cy", A.y.toString()),
- this.icon !== this.firstIcon && (this.dire.href.baseVal = c[this.icon],
- this.firstIcon = this.icon),
- this.dire.setAttribute("x", (A.x - r / 2).toString()),
- this.dire.setAttribute("y", (A.y - r / 2).toString()),
- this.dire.setAttribute("width", r.toString()),
- this.dire.setAttribute("height", r.toString()),
- this.bg.setAttribute("x", (A.x - r / 2).toString()),
- this.bg.setAttribute("y", (A.y - r / 2).toString()),
- this.bg.setAttribute("width", r.toString()),
- this.bg.setAttribute("height", r.toString()),
- this.topText.setAttribute("x", A.x.toString()),
- this.topText.setAttribute("y", (A.y - r / 2 - n / 2 + g).toString()),
- this.topText.setAttribute("font-size", n.toString()),
- this.rightText.setAttribute("x", (A.x + r / 2 + g).toString()),
- this.rightText.setAttribute("y", (A.y + n / 2).toString()),
- this.rightText.setAttribute("font-size", n.toString()),
- this.bottomText.setAttribute("x", A.x.toString()),
- this.bottomText.setAttribute("y", (A.y + r / 2 + n).toString()),
- this.bottomText.setAttribute("font-size", n.toString()),
- this.leftText.setAttribute("x", (A.x - r / 2 - n + g).toString()),
- this.leftText.setAttribute("y", (A.y + g).toString()),
- this.leftText.setAttribute("font-size", n.toString());
- var C = this.ArgDire * this.multiple
- , I = {
- points: [A, {
- x: A.x - C,
- y: A.y - r / 2 - n - g
- }]
- }
- , a = {
- points: [A, {
- x: A.x + C,
- y: A.y - r / 2 - n - g
- }]
- }
- , l = s.getDisPointLinePoints(I, I.points[0], o)
- , u = l[0]
- , h = l[1]
- , p = s.getDisPointLinePoints(a, a.points[0], o)
- , d = p[0]
- , f = p[1]
- , y = s.lineDis({
- points: [I.points[1], u]
- }) > s.lineDis({
- points: [I.points[1], h]
- }) ? h : u
- , v = s.lineDis({
- points: [a.points[1], d]
- }) > s.lineDis({
- points: [a.points[1], f]
- }) ? f : d;
- this.arc.setAttribute("d", "M " + A.x + " " + A.y + " L " + y.x + " " + y.y + " A " + o + " " + o + " 0 0 1 " + v.x + " " + v.y + " Z"),
- this.real.setAttribute("transform", "rotate(" + (this.angle || 0) + " " + A.x + " " + A.y + ")"),
- this.simple ? (this.leftText.style.display = "none",
- this.rightText.style.display = "none",
- this.bg.style.display = "none",
- this.inner.style.display = "none",
- this.arc.style.display = "none") : (this.leftText.style.display = "inherit",
- this.rightText.style.display = "inherit",
- this.bg.style.display = "inherit",
- this.inner.style.display = "inherit",
- this.arc.style.display = "inherit")
- }
- }
- ,
- e
- }(C.CADElement);
- e.default = h
- }
- , function(t, e, i) {
- "use strict";
- Object.defineProperty(e, "__esModule", {
- value: !0
- }),
- e.default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAA57mlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxMzggNzkuMTU5ODI0LCAyMDE2LzA5LzE0LTAxOjA5OjAxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgICAgICAgICB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICAgICAgICAgIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPHhtcDpDcmVhdG9yVG9vbD5BZG9iZSBQaG90b3Nob3AgQ0MgMjAxNyAoV2luZG93cyk8L3htcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhtcDpDcmVhdGVEYXRlPjIwMTktMDQtMDJUMTg6MDg6MDQrMDg6MDA8L3htcDpDcmVhdGVEYXRlPgogICAgICAgICA8eG1wOk1ldGFkYXRhRGF0ZT4yMDE5LTA0LTAyVDE4OjA4OjA0KzA4OjAwPC94bXA6TWV0YWRhdGFEYXRlPgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxOS0wNC0wMlQxODowODowNCswODowMDwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXBNTTpJbnN0YW5jZUlEPnhtcC5paWQ6ZmNiZDY2ZjMtNWIwZC01MjQ2LWI2YWItZjYyNGJjMzIyYTcyPC94bXBNTTpJbnN0YW5jZUlEPgogICAgICAgICA8eG1wTU06RG9jdW1lbnRJRD5hZG9iZTpkb2NpZDpwaG90b3Nob3A6MzEzMmMzMmMtNTUyZi0xMWU5LWEwMGUtZTdmMzVhMTA0MmVkPC94bXBNTTpEb2N1bWVudElEPgogICAgICAgICA8eG1wTU06T3JpZ2luYWxEb2N1bWVudElEPnhtcC5kaWQ6NzJjOGU4ZjctNWJlZC1mZDQyLTlhYTQtNGYxZDQ0MDE5OTRjPC94bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ+CiAgICAgICAgIDx4bXBNTTpIaXN0b3J5PgogICAgICAgICAgICA8cmRmOlNlcT4KICAgICAgICAgICAgICAgPHJkZjpsaSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+Y3JlYXRlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOjcyYzhlOGY3LTViZWQtZmQ0Mi05YWE0LTRmMWQ0NDAxOTk0Yzwvc3RFdnQ6aW5zdGFuY2VJRD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OndoZW4+MjAxOS0wNC0wMlQxODowODowNCswODowMDwvc3RFdnQ6d2hlbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnNvZnR3YXJlQWdlbnQ+QWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpPC9zdEV2dDpzb2Z0d2FyZUFnZW50PgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgICAgPHJkZjpsaSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+c2F2ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0Omluc3RhbmNlSUQ+eG1wLmlpZDpmY2JkNjZmMy01YjBkLTUyNDYtYjZhYi1mNjI0YmMzMjJhNzI8L3N0RXZ0Omluc3RhbmNlSUQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDp3aGVuPjIwMTktMDQtMDJUMTg6MDg6MDQrMDg6MDA8L3N0RXZ0OndoZW4+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpzb2Z0d2FyZUFnZW50PkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE3IChXaW5kb3dzKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmNoYW5nZWQ+Lzwvc3RFdnQ6Y2hhbmdlZD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgIDwvcmRmOlNlcT4KICAgICAgICAgPC94bXBNTTpIaXN0b3J5PgogICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3BuZzwvZGM6Zm9ybWF0PgogICAgICAgICA8cGhvdG9zaG9wOkNvbG9yTW9kZT4zPC9waG90b3Nob3A6Q29sb3JNb2RlPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpYUmVzb2x1dGlvbj43MjAwMDAvMTAwMDA8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOllSZXNvbHV0aW9uPjcyMDAwMC8xMDAwMDwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6UmVzb2x1dGlvblVuaXQ+MjwvdGlmZjpSZXNvbHV0aW9uVW5pdD4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT42NTUzNTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MTAwPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjEwMDwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIAo8P3hwYWNrZXQgZW5kPSJ3Ij8+GZD5AAAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAGxklEQVR42uxdTWhVRxT+ThKTkrh4gQQRJCgGN49kUxqCuCq4cWFAhUZCRHFRoUR0ZcSdXRjcKGbVjUhLwJJWSRYuFApCSImlKEYXSpQoKJQKzaaiVfm6yFGCmZn3cnPffffnfBACd+beOed8b+acO/fMDJADkDxG8lgedGlCPvBFTvRAAwxGiMEIMUIMRogRknBoO0uyMcJ9jSRnjZDahOjdEe7rzlJ435CiHtBN8lagyjyAngiP7tF7fe3eItlthKzGEwDbSW5NihBta7u2bYSshIgQwASAIU+V+wB6Izy6V+91YQjAhLZdTJCcJtniKdtB8pGnrJPkgqfsBMkTnrIFkp2eskckd3jKWkhOF6GHvAJw0tNLHgNYItnnKPsbQCvJtjWQ3wagVe/9vKwPwJK26cJJlTX3hJwGMEJys6f8RwDDnrKHAMpraKus97gwrG25iNwMYERlzTchIvIXgEsAznmq/AxgP8kNMTh2p0PXZx/Qtlw4B+CSypp9QkiWSA4GqlwAsNMzNL0C8AeAPR7H7iLkg/65CHE59D0A7mhbrqFsp8ro02+QZClLjruV5AOSBwN1BvTtWxxl+0lOOq53kRx2XG8m2ey4Pkyyy3F9kuR+x3VRmQYCch9U3VqzFk1tI/mMZH+gzk2SQ54I56WLrBjkEn12i6NsiOTNwL39qtO2rIa4u0g+d/1KtbxMctEVOdVySHA9m2SbylL23NOluuzK+nvHIZL3SG70lI+TPJsCOc+SHPeUbVQdDmXB4KVK4ynJMZJTrtlaku0kj6ZAj6Mk2x3XG1X2sSr8ZikNhAyqk9sWqNNA8jrJ8xns4edV9oYK/vJBhcgyUaEPqrPbFXprJnmX5JEMkXFEZW6r4CefhSLKegnfr07vUKDOFpIzGSJkhuSWCv7xeSiSrLcCXer8xkJdPOvQIXhMde1Ku7Ab1QleX8tEYIbIaFPdpnyRYxqFblRneDfU5TNIxhbV6XyU7/u1Emqa5GWSm6p0ijM5ImSmmqCE5Ca10XQSQrWQHCX5guQp1xxSUaFzaqfUNqO+D3G1anwzySskH4cm4wpExoDa4krgW08igvTpDOlN3zxQzokoq+6zrs8J9RJKdKZ0Ueem2gtARLvquqi6xzIzHcu7gohQRCaw/Mn0HwD7CtA59qmuZRFJNnNFk9gEhvWMIN1xPvAWyackv/elzRicdtuhNntaISsz0sO3kjyjuUxzJL8j2WFmX2WnDrXNnNrqTCAbM9bIalw/hU7pN/CWApPQojaYUpuM1yXiIrlB4+9JFaRUQDJKqvuk2mJDahxXkZ22DdYGQxKQCl1xFsurj+b17z6AeVfyssFpv04sZ0/26v8eAO9FZGdUQhqxvCSs57MHt2I5ifkjSb+JyPOCG78LwNcrbFQG8HrlD1n/FkTkQyRCAo23aYMfifpTRH4qOCHDAL5cYfiHIvKvjRMGg8FgSCzs1Y2/1rPf1AcAP4jIfwV36s0AvgWwnmyUN7bXicFgMBgMeYmyIkYUNnWy2iaxTJ00VWikmsnFewBu228btzXk7QUwCKBMMt7JRZK/ayM2/R6t16x5+t1gMCTVPS3JIQY0rFOQT2lAAF4UNQ1Ida9fGpAjUe6AJcrxQKKJcpZKWrWdap9KasnWke1Wm2RrW46wfqdfl72BdQ332TRsJpOArkdV11jX4jfE+AsY0umUdgDXCvDDv6a6PoxzSVtcEZct+qz3ok9bFr3KHvVZFm0bBwRtk/zGAba1Rsq21qhScNt8JkVC2/ZMKRLWNjBLkZC2xV+KBLdNMNOyCaZtE5uybWJtI+VP9Voz8YHOthpPFxm2GX+KyLDjKlJEhh3okjJCgkceqQEf+6ar1YkOOK4fJnnRcX2E5Ijj+kWShz0/hilP230qW3OFyLImQ2pN3qZFZElErgaqnAQwKyJ3HMp2APgKwA3Hfb1wn9rZCPdSsnm4D6O8AaDPlaShMs3Cc7Sf1rkqIkuZIaRC79kE4Dj8R9J9A+BXEXnnKAuea+shpMdh0HcAftG2XDgN4Hg1M9p5mAe6THI0UD4XGMpeeiIy50mfGjm9DAxNcwE5RkleTto+9ZgA7IDnSDpNMSp5hrJOAK/XsuZC6752Hb2qbZQCaU0XVNZ8EyIie0XkrafYe/pmhOEqOGwpvKeKishbEdlbhB7ifT+Ant7sqRI69TmE0CnTEwCG0pRzlqZvFtsBPBGRxaR6iLb1RNs2Qj4zzoKI7A5UqcWQBRHZLSILRsja8R5AFMMt6L2ZQFNWBI26Lk8XWGZmTZ/tdWKEGIwQI8RghOQETTnR401eCPl/AKBc4r28/8mlAAAAAElFTkSuQmCC"
- }
- , function(t, e, i) {
- "use strict";
- Object.defineProperty(e, "__esModule", {
- value: !0
- }),
- e.default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAA57mlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxMzggNzkuMTU5ODI0LCAyMDE2LzA5LzE0LTAxOjA5OjAxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgICAgICAgICB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICAgICAgICAgIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPHhtcDpDcmVhdG9yVG9vbD5BZG9iZSBQaG90b3Nob3AgQ0MgMjAxNyAoV2luZG93cyk8L3htcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhtcDpDcmVhdGVEYXRlPjIwMTktMDQtMDJUMTg6MDg6MTErMDg6MDA8L3htcDpDcmVhdGVEYXRlPgogICAgICAgICA8eG1wOk1ldGFkYXRhRGF0ZT4yMDE5LTA0LTAyVDE4OjA4OjExKzA4OjAwPC94bXA6TWV0YWRhdGFEYXRlPgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxOS0wNC0wMlQxODowODoxMSswODowMDwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXBNTTpJbnN0YW5jZUlEPnhtcC5paWQ6YjliYTljZjQtZGJkMy0zNzQ2LWFiYzItMTY3OWU5MDE0ZTIxPC94bXBNTTpJbnN0YW5jZUlEPgogICAgICAgICA8eG1wTU06RG9jdW1lbnRJRD5hZG9iZTpkb2NpZDpwaG90b3Nob3A6MzY3NTdiNWMtNTUyZi0xMWU5LWEwMGUtZTdmMzVhMTA0MmVkPC94bXBNTTpEb2N1bWVudElEPgogICAgICAgICA8eG1wTU06T3JpZ2luYWxEb2N1bWVudElEPnhtcC5kaWQ6ZTA5YzJmMmYtOGM5Zi1mZTQwLTgyMTEtMGNjZmY2ZDFmNzZkPC94bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ+CiAgICAgICAgIDx4bXBNTTpIaXN0b3J5PgogICAgICAgICAgICA8cmRmOlNlcT4KICAgICAgICAgICAgICAgPHJkZjpsaSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+Y3JlYXRlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOmUwOWMyZjJmLThjOWYtZmU0MC04MjExLTBjY2ZmNmQxZjc2ZDwvc3RFdnQ6aW5zdGFuY2VJRD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OndoZW4+MjAxOS0wNC0wMlQxODowODoxMSswODowMDwvc3RFdnQ6d2hlbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnNvZnR3YXJlQWdlbnQ+QWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpPC9zdEV2dDpzb2Z0d2FyZUFnZW50PgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgICAgPHJkZjpsaSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+c2F2ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0Omluc3RhbmNlSUQ+eG1wLmlpZDpiOWJhOWNmNC1kYmQzLTM3NDYtYWJjMi0xNjc5ZTkwMTRlMjE8L3N0RXZ0Omluc3RhbmNlSUQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDp3aGVuPjIwMTktMDQtMDJUMTg6MDg6MTErMDg6MDA8L3N0RXZ0OndoZW4+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpzb2Z0d2FyZUFnZW50PkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE3IChXaW5kb3dzKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmNoYW5nZWQ+Lzwvc3RFdnQ6Y2hhbmdlZD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgIDwvcmRmOlNlcT4KICAgICAgICAgPC94bXBNTTpIaXN0b3J5PgogICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3BuZzwvZGM6Zm9ybWF0PgogICAgICAgICA8cGhvdG9zaG9wOkNvbG9yTW9kZT4zPC9waG90b3Nob3A6Q29sb3JNb2RlPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpYUmVzb2x1dGlvbj43MjAwMDAvMTAwMDA8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOllSZXNvbHV0aW9uPjcyMDAwMC8xMDAwMDwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6UmVzb2x1dGlvblVuaXQ+MjwvdGlmZjpSZXNvbHV0aW9uVW5pdD4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT42NTUzNTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MTAwPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjEwMDwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIAo8P3hwYWNrZXQgZW5kPSJ3Ij8+hSv1CAAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAADBUlEQVR42uycO2/UQBRGz10tCggkBAqyiKCCCkRPBw00IChAYgON/wb/xg1hFwpooEsFRSToEFSk42UeQilQhII8FDFSErxmH17bd/mOFMnZ9YwyOfY39ng8FkJAtIeO/gUSIiREQoSESIiQEAkREiIhQkKEhEiIkBAJERIiIUJCJERIiJAQCRES4p2uhz/SzMp3SNLzAMTRWtluHuagdefkwLoFGLDmvSHm4agpPUOStAO8y387QRxlns+QeehDLgDH85+L6tTbEVdF24qs2iMrSfcBKXAk/+Q7EBFHW4qsZri0Qwb59mVFVnMsF3zWU2Q1EVlJegD4DBza880P4BhxtKnIqpcrBTIADgJXFVntiCv3seUzspL0MPAJ2D+kyM/8amtDkVUP10pkACwA1xVZ9XFnhH1uK7LqiKwkXQQ+8u+B0V/AEnH0RZE1W24y2ih1F7ihyGr26sp9bPmKrCRdYnuo3UYsGoCTxNF7Rdbszg4bx6W3exJvQiYZXnclxE9kJekp4O2EVZwmjtYVWc115m47d09Ceg2VlZC/SNJzwNkpajiT1yEhLYgrV7HlYl7W0YXOcjZlh9wx6wF3JaQCvvUWswqqyTy01UtkDSqo44GEVMf9CupYkZDqbgxfAa+nqOJNXoeEVEi/obL1Hnxehk5CCFMNnZiZhk4qlrIOvJig6Mu8rO7UW3K11ffUQFcPqEIIEz2gMjM9oJqRmA/AszGKPP8jQ5HVjnuSFW+NczcNKIQw1jQgM9M0oBnL+QqsjrDr6k4ZiqzZcm8e48plZOXRM9JkazPTZOuaBG0AT0t2ebJXhiKr2autvtdGuX2lLYRQ+kqbmemVtpolbQKPC756VCRDkdVcbPU9N8j1wgEhhMKFA8xMCwc0JGqL3c/KHw6Tociqj8GQbUVW3ZGVx9Cu5ZnMzPXyTO4XMDOzLIQw2N60zHt75mVFucGctMNHZP1PaFVSCRESIiFCQiRESIiECAmRECEhQkIkREiIhAgJkRAhIRIiJERIiIQICXHP7wEAHiDp1oKzlp8AAAAASUVORK5CYII="
- }
- , function(t, e, i) {
- "use strict";
- Object.defineProperty(e, "__esModule", {
- value: !0
- }),
- e.default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAwFJREFUeNrsnc1r1EAYhzNLpYqCKMpiqyc9KeLVm170ouhBwa1e/B88+d/k4rr1Az+wHpSCooeC3kRP9mbUsYIIioqy6zvuCEXTdD8mmbzL88AkaTIzbPpsfpNNk63p9XoJ1IcGvwKEAEIQAghBCCAEIYAQhABCACEIAYQgBBCCEEAIQgAhgBCEAEK0M6XhRRpjiiuk9vCf+cXmUlE1DfegTU3IG+uc8yZlSfuOGA3vmsIjJLUudt/4n3bLUdLVfIRMwhhyRMouX44yqNcjrvKWiazKIyu1G2RqpWzzaz5JaUps/SSy4nBslYzELx8nsuIxl7OuRWTFiKzUbpLpBylb/tnyVcpOia1vRFa1nMiR4dgs5SSRVY+4Uh9bOiMrtVtl+l7KxjWa/PBnW5+JrGo4VSDDMS3lNJFVHRcGqHOeyKoislK7Q6bvkvUvjP6SMiOxtUJklcvZZLCr1K7OGSIr7tmV+tjSFVmpnUn6l9rNgE3dzu2R2MqIrPKODjOMS22fSbQJGeXyuioheiIrtXtl8fWIXeyT2FomsuIN5moHd01CWpHaIuQ/UntQpgfG6GG/7wMhNYgrVbGl4r6s7dONue6YA3LDGBdblxES4kVeOtQN0E03aWVEViDmA/RxjTEkHFcD9NFGSCBslr2Q2csxunjl+0BIQDqR2iKkhNhqIyR8bC3L7NkITZ/7tgipydlWR9MOahPiYmuYT4g9hJQbW29l9mSIJk+lTYaQ+gzubW07p1HIjaR/i896uDo3EVJ+bH2U2eIAVRel7gpCquHKJMaVZiF3pXwv2O5utr6DkOpiy93Vfr+gyoKvg5CanG11tO6UZiELUr7krHePtN1DSPWx5Z4hvJ2z6ZbfhpCaxFZH8w5pF/Iw6X9ZwF/c8gOExIst940Nq/9Wft2vQ0hE5tdYVskkfF/W46T/iJvjEULix1a3OTvrjgzjlhFSv9hSjeF/4TKoA0IQAghBCCAEIYAQhABCACEIAYQgBBCCEEAIQgAhgBCEAEIQAkH5LcAAKoHVGsvfGGUAAAAASUVORK5CYII="
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- , g = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var A = g(i(47))
- , r = i(3);
- e.attachSign = function(t) {
- var e = {
- border: 2,
- r: 5
- }
- , i = t.addProcessing;
- t.addProcessing = function() {
- for (var g = [], r = 0; r < arguments.length; r++)
- g[r] = arguments[r];
- var o = i.call.apply(i, n([t], g));
- A.default.Setting.set(o.render, e);
- var C = new A.default({
- pos: {
- x: 0,
- y: 0
- },
- dire: 0,
- renderer: o.render
- });
- return C.zIndex = 1,
- o.render.push(C),
- o.sign = C,
- o
- }
- ,
- t.setSign = function(e, i) {
- var n = t.processing.sign;
- r.type.isNumber(i) && (n.dire = i),
- n.pos = e
- }
- ,
- t.hideSign = function() {
- var e = t.processing.sign;
- return e.show = !1,
- new Promise((function(t) {
- return e.nextTick(t)
- }
- ))
- }
- ,
- t.showSign = function() {
- var e = t.processing.sign;
- return e.show = !0,
- new Promise((function(t) {
- return e.nextTick(t)
- }
- ))
- }
- ,
- t.setDefaultSignStyle = function(i) {
- var n = t.processing.sign;
- i.border && (e.border = i.border,
- n.border = i.border),
- i.r && (e.r = i.r,
- n.r = i.r),
- i.color && (n.color = i.color)
- }
- }
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- ), A = this && this.__assign || function() {
- return (A = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , r = this && this.__rest || function(t, e) {
- var i = {};
- for (var n in t)
- Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
- if (null != t && "function" == typeof Object.getOwnPropertySymbols) {
- var g = 0;
- for (n = Object.getOwnPropertySymbols(t); g < n.length; g++)
- e.indexOf(n[g]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[g]) && (i[n[g]] = t[n[g]])
- }
- return i
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var o = i(2)
- , C = i(1)
- , I = 0
- , s = function(t) {
- function e(i) {
- var n = i.border
- , g = i.r
- , o = i.show
- , C = void 0 === o || o
- , s = i.color
- , a = void 0 === s ? "rgb(183, 18, 15)" : s
- , l = r(i, ["border", "r", "show", "color"]);
- return n = n || e.Setting.get(l.renderer).border,
- g = g || e.Setting.get(l.renderer).r,
- I++,
- t.call(this, A({
- border: n,
- r: g,
- show: C,
- color: a
- }, l)) || this
- }
- return g(e, t),
- e.prototype.grentNode = function() {
- var t = document.createElementNS(C.SVGURI, "g");
- this.inner = document.createElementNS(C.SVGURI, "circle"),
- this.inner.setAttribute("stroke", "#fff"),
- this.arc = document.createElementNS(C.SVGURI, "path"),
- this.arc.setAttribute("fill", "url(#orange_red" + I + ")");
- var e = document.createElementNS(C.SVGURI, "defs")
- , i = document.createElementNS(C.SVGURI, "linearGradient");
- i.setAttribute("id", "orange_red" + I),
- i.setAttribute("x1", "0%"),
- i.setAttribute("y1", "0%"),
- i.setAttribute("x2", "100%"),
- i.setAttribute("y2", "100%");
- var n = document.createElementNS(C.SVGURI, "stop");
- n.setAttribute("offset", "0%");
- var g = document.createElementNS(C.SVGURI, "stop");
- return g.setAttribute("offset", "100%"),
- i.appendChild(n),
- i.appendChild(g),
- e.appendChild(i),
- t.appendChild(this.arc),
- t.appendChild(this.inner),
- t.appendChild(e),
- t.setAttribute("class", "sign"),
- this.$stop1 = n,
- this.$stop2 = g,
- t
- }
- ,
- e.prototype.update = function() {
- this.inner.setAttribute("fill", this.color),
- this.$stop1.setAttribute("style", "stop-color:" + this.color + "; stop-opacity:1"),
- this.$stop2.setAttribute("style", "stop-color:" + this.color + "; stop-opacity:0.4"),
- this.inner.setAttribute("r", (this.r * this.multiple).toString()),
- this.inner.setAttribute("stroke-width", (this.border * this.multiple).toString()),
- this.inner.setAttribute("cx", this.pos.x.toString()),
- this.inner.setAttribute("cy", this.pos.y.toString());
- var t = .4 * this.r * this.multiple
- , e = 1.6 * this.r * this.multiple
- , i = 2.8 * this.r * this.multiple;
- this.arc.setAttribute("d", "\n M " + this.pos.x + " " + (this.pos.y - t) + " \n L " + (this.pos.x + i) + " " + (this.pos.y - e) + " \n L " + (this.pos.x + i) + " " + (this.pos.y + e) + " \n L " + this.pos.x + " " + (this.pos.y + t) + " Z\n "),
- this.real.setAttribute("transform", "rotate(" + this.dire + " " + this.pos.x + " " + this.pos.y + ")"),
- this.real.style.display = this.show ? "inherit" : "none"
- }
- ,
- e.Setting = new Map,
- e
- }(o.CADElement);
- e.default = s
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__assign || function() {
- return (n = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , g = this && this.__awaiter || function(t, e, i, n) {
- return new (i || (i = Promise))((function(g, A) {
- function r(t) {
- try {
- C(n.next(t))
- } catch (t) {
- A(t)
- }
- }
- function o(t) {
- try {
- C(n.throw(t))
- } catch (t) {
- A(t)
- }
- }
- function C(t) {
- var e;
- t.done ? g(t.value) : (e = t.value,
- e instanceof i ? e : new i((function(t) {
- t(e)
- }
- ))).then(r, o)
- }
- C((n = n.apply(t, e || [])).next())
- }
- ))
- }
- , A = this && this.__generator || function(t, e) {
- var i, n, g, A, r = {
- label: 0,
- sent: function() {
- if (1 & g[0])
- throw g[1];
- return g[1]
- },
- trys: [],
- ops: []
- };
- return A = {
- next: o(0),
- throw: o(1),
- return: o(2)
- },
- "function" == typeof Symbol && (A[Symbol.iterator] = function() {
- return this
- }
- ),
- A;
- function o(A) {
- return function(o) {
- return function(A) {
- if (i)
- throw new TypeError("Generator is already executing.");
- for (; r; )
- try {
- if (i = 1,
- n && (g = 2 & A[0] ? n.return : A[0] ? n.throw || ((g = n.return) && g.call(n),
- 0) : n.next) && !(g = g.call(n, A[1])).done)
- return g;
- switch (n = 0,
- g && (A = [2 & A[0], g.value]),
- A[0]) {
- case 0:
- case 1:
- g = A;
- break;
- case 4:
- return r.label++,
- {
- value: A[1],
- done: !1
- };
- case 5:
- r.label++,
- n = A[1],
- A = [0];
- continue;
- case 7:
- A = r.ops.pop(),
- r.trys.pop();
- continue;
- default:
- if (!(g = (g = r.trys).length > 0 && g[g.length - 1]) && (6 === A[0] || 2 === A[0])) {
- r = 0;
- continue
- }
- if (3 === A[0] && (!g || A[1] > g[0] && A[1] < g[3])) {
- r.label = A[1];
- break
- }
- if (6 === A[0] && r.label < g[1]) {
- r.label = g[1],
- g = A;
- break
- }
- if (g && r.label < g[2]) {
- r.label = g[2],
- r.ops.push(A);
- break
- }
- g[2] && r.ops.pop(),
- r.trys.pop();
- continue
- }
- A = e.call(t, r)
- } catch (t) {
- A = [6, t],
- n = 0
- } finally {
- i = g = 0
- }
- if (5 & A[0])
- throw A[1];
- return {
- value: A[0] ? A[1] : void 0,
- done: !0
- }
- }([A, o])
- }
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var r = i(3);
- e.attachScreenshot = function(t) {
- t.screenshot = function(e) {
- var i = e.width
- , o = void 0 === i ? 2048 : i
- , C = e.height
- , I = void 0 === C ? 2048 : C
- , s = e.bgColor
- , a = void 0 === s ? "rgba(0,0,0,0)" : s
- , l = e.data
- , u = e.spadding
- , c = e.format
- , h = void 0 === c ? "image/png" : c;
- return g(void 0, void 0, void 0, (function() {
- var e, i, C, s, c, p, d, f;
- return A(this, (function(y) {
- return e = t.processing.render,
- i = n({}, e.props),
- C = new Image,
- s = document.createElement("canvas"),
- c = s.getContext("2d"),
- p = t.processing.points.map((function(t) {
- return t.ele.x
- }
- )),
- d = t.processing.points.map((function(t) {
- return t.ele.y
- }
- )),
- f = t.padding,
- t.padding = u,
- t.adapt(l, o, I),
- s.width = o,
- s.height = I,
- c.fillStyle = a,
- c.fillRect(0, 0, s.width, s.height),
- [2, new Promise((function(n, a) {
- return g(void 0, void 0, void 0, (function() {
- return A(this, (function(l) {
- return C.onload = function() {
- return g(void 0, void 0, void 0, (function() {
- var g;
- return A(this, (function(A) {
- return c.drawImage(C, 0, 0),
- g = {
- file: r.convertBase64UrlToBlob(s.toDataURL(h)),
- width: o,
- height: I,
- left: t.processing.render.realPointToScreen({
- x: Math.min.apply(Math, p),
- y: 0
- }).x,
- top: t.processing.render.realPointToScreen({
- x: 0,
- y: Math.min.apply(Math, d)
- }).y,
- bottom: I - t.processing.render.realPointToScreen({
- x: 0,
- y: Math.max.apply(Math, d)
- }).y,
- right: o - t.processing.render.realPointToScreen({
- x: Math.max.apply(Math, p),
- y: 0
- }).x,
- bound: {
- left: Math.min.apply(Math, p),
- top: Math.min.apply(Math, d),
- bottom: Math.max.apply(Math, d),
- right: Math.max.apply(Math, p)
- }
- },
- e.props = i,
- t.padding = f,
- e.adaptLayer(),
- n(g),
- [2]
- }
- ))
- }
- ))
- }
- ,
- C.onerror = function(n) {
- e.props = i,
- t.padding = f,
- e.adaptLayer(),
- a(n)
- }
- ,
- C.src = "data:image/svg+xml;base64," + window.btoa(unescape(encodeURIComponent(e.svg.outerHTML))),
- [2]
- }
- ))
- }
- ))
- }
- ))]
- }
- ))
- }
- ))
- }
- }
- }
- , function(t, e, i) {
- "use strict";
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var n = function() {
- function t(t) {
- this.length = t + "__length",
- this.index = t + "__index",
- this.name = t,
- this.keys = [],
- this.init()
- }
- return t.prototype.init = function() {
- sessionStorage.setItem(this.length, "0")
- }
- ,
- t.prototype.getKey = function(t) {
- return this.name + "__" + t
- }
- ,
- t.prototype.getData = function() {
- return sessionStorage.getItem(this.index)
- }
- ,
- t.prototype.getLength = function() {
- return Number(sessionStorage.getItem(this.length))
- }
- ,
- t.prototype.setLength = function(t) {
- sessionStorage.setItem(this.length, t)
- }
- ,
- t.prototype.push = function(t) {
- var e = this.getLength()
- , i = this.getKey(this.getLength());
- return sessionStorage.setItem(i, JSON.stringify(t)),
- this.keys.push(i),
- this.setLength(e + 1),
- t
- }
- ,
- t.prototype.pop = function() {
- var t = this.getLength()
- , e = this.get(t - 1);
- return this.setLength(t - 1),
- e
- }
- ,
- t.prototype.get = function(t) {
- var e = this.getKey(t);
- return JSON.parse(sessionStorage.getItem(e))
- }
- ,
- t.prototype.clear = function() {
- this.setLength(0),
- this.keys.forEach((function(t) {
- return sessionStorage.removeItem(t)
- }
- )),
- this.keys = [this.length]
- }
- ,
- t
- }();
- e.default = n
- }
- , function(t, e, i) {
- "use strict";
- i.r(e),
- i.d(e, "default", (function() {
- return r
- }
- ));
- var n = i(6)
- , g = i.n(n)
- , A = i(0);
- function r(t, e) {
- let i = Date.now()
- , n = []
- , r = []
- , o = [];
- function C(t, e, i, g, A, o, I) {
- for (let s = 0; s < t.length; ++s) {
- if (A.indexOf(s) > -1 || o.indexOf(I) > -1)
- continue;
- let a = t[s]
- , l = a.p1.id
- , u = a.p2.id;
- if (I == l || I == u) {
- let c = JSON.parse(JSON.stringify(i))
- , h = JSON.parse(JSON.stringify(g))
- , p = JSON.parse(JSON.stringify(A))
- , d = JSON.parse(JSON.stringify(o))
- , f = I;
- h.push(a.id),
- c.push(I),
- p.push(s),
- d.push(I),
- f == l ? f = u : f == u && (f = l),
- e == f ? (r.push(c),
- n.push(h)) : C(t, e, c, h, p, d, f)
- }
- }
- }
- function I(t, e, i, n) {
- let g = [];
- for (let t = 0; t < n.length; ++t) {
- let e = n[t];
- g.push(e)
- }
- let A = !0;
- for (var r = 0; r < i.length; ++r) {
- if (e.indexOf(t[r]) > -1) {
- A = !1;
- continue
- }
- let i = t[r];
- var C = i.p1
- , I = i.p2
- , a = {
- x: (C.x + I.x) / 2,
- y: (C.y + I.y) / 2
- };
- if (!(s(C, g) && s(I, g) && s(a, g)))
- return !1
- }
- if (A) {
- let i = [];
- return i.push(e[0]),
- i.push(e[e.length - 1]),
- i.push(t[0]),
- i.push(t[t.length - 1]),
- o.push(i),
- !1
- }
- return !0
- }
- function s(t, e) {
- for (var i = 0; i < e.length; ++i) {
- if (a(t, e[i]))
- return !0
- }
- return !!function(t, e) {
- for (var i = t.x, n = t.y, g = !1, A = 0, r = e.length - 1; A < e.length; r = A++) {
- var o = e[A]
- , C = e[r]
- , I = o.x
- , s = o.y
- , a = C.x
- , l = C.y;
- s > n != l > n && i < (a - I) * (n - s) / (l - s) + I && (g = !g)
- }
- return g
- }(t, e)
- }
- function a(t, e) {
- return t.x == e.x && t.y == e.y
- }
- let l = t.wall.map(e=>({
- p1: t.vertex.find(({id: t})=>e.p1 === t),
- p2: t.vertex.find(({id: t})=>e.p2 === t),
- id: e.id
- }));
- function u(t, e, i) {
- return (t.x * e.y + e.x * i.y + i.x * t.y - e.x * t.y - i.x * e.y - t.x * i.y) / 2
- }
- !function(t) {
- for (let e = 0; e < t.length; ++e) {
- let i = []
- , n = []
- , g = []
- , A = t[e]
- , r = A.p1.id
- , o = A.p2.id;
- n.push(o),
- g.push(A.id);
- let I = null;
- t.splice(e, 1);
- for (let e = 0; e < t.length; ++e) {
- let A = t[e];
- if (r == A.p1.id || r == A.p2.id) {
- let s = JSON.parse(JSON.stringify(n))
- , a = JSON.parse(JSON.stringify(g))
- , l = []
- , u = JSON.parse(JSON.stringify(i))
- , c = r;
- s.push(r),
- a.push(A.id),
- l.push(e),
- I = c == A.p1.id ? A.p2.id : A.p1.id,
- u.push(c),
- C(t, o, s, a, l, u, I)
- }
- }
- }
- }(JSON.parse(JSON.stringify(l))),
- r = r.map(e=>e.map(e=>t.vertex.find(({id: t})=>e === t))),
- n = n.map(t=>t.map(t=>l.find(({id: e})=>t === e))),
- function() {
- for (var t = 0; t < r.length; ++t)
- for (var e = t + 1; e < r.length; ++e)
- if (I(n[t], n[e], r[t], r[e]))
- r.splice(e, 1),
- n.splice(e, 1),
- --e;
- else if (I(n[e], n[t], r[e], r[t])) {
- r.splice(t, 1),
- n.splice(t, 1),
- --t,
- --e;
- break
- }
- }(),
- function() {
- let t = [];
- for (let e = 0; e < o.length; ++e) {
- let i = o[e]
- , g = [];
- g[0] = null,
- g[1] = null;
- for (let t = 0; t < n.length && (i[0] == n[t][0] && i[1] == n[t][n[t].length - 1] ? g[0] = t : i[2] == n[t][0] && i[3] == n[t][n[t].length - 1] && (g[1] = t),
- null == g[0] || null == g[1]); ++t)
- ;
- null != g[0] && null != g[1] && t.push(g)
- }
- o = t
- }(),
- r = r.sort((t,e)=>Number(!Object(A.isFaceContain)(t, e))),
- t.room = n.map((t,e)=>({
- wall: t.map(({id: t})=>t),
- ground: r[e]
- })),
- test_debugger && (window.testCenterPoints && e.processing.render.remove(...window.testCenterPoints),
- window.testCenterPoints = r.map(t=>{
- let i = function(t) {
- for (var e = 0, i = 0, n = 0, g = t[1], A = 2; A < t.length; A++) {
- var r = t[A]
- , o = u(t[0], g, r);
- n += o,
- e += (t[0].x + g.x + r.x) * o,
- i += (t[0].y + g.y + r.y) * o,
- g = r
- }
- return {
- x: e / n / 3,
- y: i / n / 3
- }
- }(t.map(t=>({
- ...t,
- y: -t.y
- })))
- , n = "rgba(" + Math.floor(255 * Math.random()) + "," + Math.floor(255 * Math.random()) + "," + Math.floor(255 * Math.random()) + ",0.8)"
- , A = new g.a({
- fillColor: n,
- storkeColor: n,
- x: i.x,
- y: i.y,
- renderer: e.processing.render
- });
- return e.processing.render.push(A),
- A
- }
- ),
- window.testCenterPoints.forEach((i,g)=>{
- let A = {
- pointEles: t.room[g].ground.map(t=>e.processing.points.find(({id: e})=>e === t.id).ele.real),
- lineEles: n[g].map(t=>e.processing.lines.find(({id: e})=>e === t.id).ele.real),
- center: i.real,
- pointData: r[g],
- lineData: n[g]
- };
- console.log(A)
- }
- ));
- let c = Date.now();
- return console.warn("计算完毕,耗时" + (c - i)),
- t
- }
- }
- , function(t, e, i) {
- "use strict";
- Object.defineProperty(e, "__esModule", {
- value: !0
- }),
- e.attchDOMTranform = function(t) {
- var e = function(e) {
- var i = t.processing.render;
- if (e.target === i.svg) {
- var n = i.props.left
- , g = i.props.top
- , A = function(A) {
- i.props.left = n - (e.pageX - A.pageX) * i.props.multiple,
- i.props.top = g - (e.pageY - A.pageY) * i.props.multiple,
- i.adaptLayer(),
- t.propsChange && t.propsChange(),
- A.preventDefault()
- }
- , r = function() {
- document.documentElement.removeEventListener("mousemove", A, !1),
- document.documentElement.removeEventListener("mouseup", r, !1)
- };
- document.documentElement.addEventListener("mousemove", A, !1),
- document.documentElement.addEventListener("mouseup", r, !1),
- e.preventDefault()
- }
- }
- , i = function(e) {
- var i = t.processing.render
- , n = e.wheelDelta ? window.opera ? -e.wheelDelta / 120 : e.wheelDelta / 120 : e.detail ? -e.detail / 3 : 0
- , g = i.props.scale + (n > 0 ? .08 : -.08);
- g > .1 && (i.props.scale = g,
- i.adaptLayer(),
- t.propsChange && t.propsChange())
- };
- t.openMouseHandle = function() {
- var n = t.layer;
- n.addEventListener("mousedown", e, !1),
- n.addEventListener("mousewheel", i, !1)
- }
- ,
- t.closeMouseHandle = function() {
- var n = t.layer;
- n.removeEventListener("mousedown", e, !1),
- n.removeEventListener("mousewheel", i, !1)
- }
- ;
- var n = t.destroy;
- t.destroy = function() {
- for (var e = [], i = 0; i < arguments.length; i++)
- e[i] = arguments[i];
- t.closeMouseHandle(),
- n.apply(this, e)
- }
- }
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var g = i(2)
- , A = n(i(4))
- , r = n(i(7));
- e.attachDisabled = function(t) {
- var e = ["increase", "getStackState", "preservation", "previous", "next", "closeMouseHandle", "showGauge", "hideGauge"]
- , i = [];
- t.forbidden = function() {
- i.length !== e.length && (t.hideGauge(),
- t.closeMouseHandle(),
- g.CADElement.examples.get(t.processing.render).forEach((function(t) {
- return t.unEvent()
- }
- )),
- A.default.attaArch.forEach((function(t) {
- t.forEach((function(t) {
- t instanceof r.default && t.delEvent()
- }
- ))
- }
- )),
- e.forEach((function(e) {
- i.push(t[e]),
- delete t[e]
- }
- )))
- }
- ,
- t.available = function() {
- i.length === e.length && (e.forEach((function(e, n) {
- return t[e] = i[n]
- }
- )),
- i = [],
- g.CADElement.examples.get(t.processing.render).forEach((function(t) {
- return t.listen()
- }
- )),
- A.default.attaArch.forEach((function(t) {
- t.forEach((function(t) {
- return t instanceof r.default && t.addEvent()
- }
- ))
- }
- )),
- t.showGauge(),
- t.openMouseHandle())
- }
- }
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__assign || function() {
- return (n = Object.assign || function(t) {
- for (var e, i = 1, n = arguments.length; i < n; i++)
- for (var g in e = arguments[i])
- Object.prototype.hasOwnProperty.call(e, g) && (t[g] = e[g]);
- return t
- }
- ).apply(this, arguments)
- }
- , g = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- , A = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var r = A(i(23));
- e.attachRote = function(t) {
- var e = t.addProcessing;
- t.addProcessing = function() {
- for (var i = [], n = 0; n < arguments.length; n++)
- i[n] = arguments[n];
- var A = e.call.apply(e, g([t], i))
- , o = new r.default({
- renderer: A.render,
- local: []
- });
- return o.zIndex = 2,
- A.render.push(o),
- o.setActive = function(e) {
- t.activeRoute(o.local.indexOf(e))
- }
- ,
- A
- }
- ,
- t.showRotes = function() {
- var e = t.processing.rote;
- return e.show = !0,
- new Promise((function(t) {
- return e.nextTick(t)
- }
- ))
- }
- ,
- t.hideRotes = function() {
- var e = t.processing.rote;
- return e.show = !1,
- new Promise((function(t) {
- return e.nextTick(t)
- }
- ))
- }
- ,
- t.setRoutes = function(e) {
- var i = t.processing.rote;
- e = e.map((function(t, i) {
- if (t.rangn) {
- var g = function(t) {
- var i = e.slice(0, t).reverse().find((function(t) {
- return !t.rangn
- }
- ));
- return i || e.slice(t).find((function(t) {
- return !t.rangn
- }
- ))
- }(i);
- if (g)
- return n(n({}, g), {
- rangn: !0
- })
- }
- return n({}, t)
- }
- )),
- t.clearRoutes((function() {
- i.local = g(e)
- }
- ))
- }
- ,
- t.pushRoute = function(e) {
- t.clearRoutes((function() {
- setTimeout((function() {}
- ), 100)
- }
- ))
- }
- ,
- t.activeRoute = function(e) {
- var i = t.processing.rote;
- i.nextTick((function() {
- i.active = i.local[e]
- }
- ))
- }
- ,
- t.popRoute = function(e) {
- var i = t.processing.rote;
- i.local.splice(e, 1),
- i.nextTick((function() {
- return i.local = g(i.local)
- }
- ))
- }
- ,
- t.clearRoutes = function(e) {
- var i = t.processing.rote;
- i.local = [],
- i.dialog = 0,
- i.nextTick((function() {
- return e && e()
- }
- ))
- }
- }
- }
- , function(t, e) {
- t.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAt1BMVEVHcEz///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+6urrFxcXR0dHY2NjX19fDw8P////Hx8fg4ODj4+PQ0NDCwsLGxsb///////////////+Zk85TAAAAPHRSTlMAAgQiHSZ5yO+B2fPfw70siHVCZ337ODSO0YM7rJLjzVINSDDpcBkUXfljCAQ4lcV6BgpEkKlgQ0CZ3FCcXUtcAAAAAWJLR0QB/wIt3gAAAAd0SU1FB+MFHgsMLLYaoF4AAADtSURBVBjTbVCJcoIwFNxQuSIWEYMoUOSQo/S0p+37/+9qIraNnb7JZDK7m012gfNhBvsXuZjoiNpNyyZHR5jp8qk3m17+avw5Jx4swqWITsgq9sR6aWKySVL7eDfKrkQeKPtt7BdUAlVcC3vXKLLdWQ0yT55IdO3oa246hqK/hoGwd4GB3dze3T88MgTjfyKR74Gn55fXt3fAsaRQrn0uqsINB2XR9cVRKYkDpQmDiviRwRjTAJwOkmUoqcF3IcyL13mLAXZ6Eqqpy4CcBVbk/wjBeC0il7p0Bq1NmyqZkSjRwaaFISN9/i0d2hNf1CoSHV2Lm8sAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTktMDUtMzBUMTE6MTI6NDQrMDg6MDCJUf45AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE5LTA1LTMwVDExOjEyOjQ0KzA4OjAw+AxGhQAAAABJRU5ErkJggg=="
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- , g = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var A = g(i(5))
- , r = g(i(6))
- , o = g(i(10));
- e.attachStyle = function(t) {
- var e = {
- fillColor: "rgb(183, 18, 15)",
- storkeColor: "green"
- }
- , i = {
- fillColor: "rgba(245, 255, 0, 0.7)",
- storkeColor: "rgba(245, 255, 255, 0.3)"
- };
- t.setDefaultPointStyle = function(n) {
- n.storkeColor && (e.storkeColor = n.storkeColor),
- n.fillColor && (e.fillColor = n.fillColor),
- n.hoverStorkeColor && (i.storkeColor = n.hoverStorkeColor),
- n.hoverFillColor && (i.fillColor = n.hoverFillColor),
- setTimeout((function() {
- t.loadData(t.getData())
- }
- ), 100)
- }
- ;
- var g = {
- width: 3,
- color: "rgb(255,255,255)"
- }
- , C = t.addProcessing;
- t.addProcessing = function() {
- for (var I = [], s = 0; s < arguments.length; s++)
- I[s] = arguments[s];
- var a = C.call.apply(C, n([t], I));
- return r.default.Setting.set(a.render, e),
- A.default.Setting.set(a.render, i),
- o.default.Setting.set(a.render, g),
- a
- }
- ,
- t.setDefaultLineStyle = function(e) {
- e.width && (g.width = e.width),
- e.color && (g.color = e.color),
- setTimeout((function() {
- t.loadData(t.getData())
- }
- ), 100)
- }
- }
- }
- , function(t, e, i) {
- "use strict";
- Object.defineProperty(e, "__esModule", {
- value: !0
- }),
- e.attchCustom = function(t) {
- t.edits = []
- }
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var g = i(0);
- function A(t, e) {
- var i = e.addCase
- , A = e.addDoor
- , r = e.addColumn
- , o = e.addLine
- , C = e.addSlideDoor
- , I = e.addBayCase
- , s = e.addGroundCase
- , a = e.addFurnColumn
- , l = e.addFurnFlue
- , u = e.adddDoubleDoor
- , c = function(t) {
- Object.defineProperties(t, {
- ewidth: {
- get: function() {
- return Number(g.lineDis({
- points: t.linePoints
- }).toFixed(2))
- },
- set: function(e) {
- if (!(e <= 0 || e === t.ewidth)) {
- var i = g.lineCenter({
- points: t.linePoints
- })
- , n = g.getDisPointLinePoints(t.attachment, i, e / 2)
- , A = n[0]
- , r = n[1];
- g.lineDis({
- points: [t.linePoints[0], A]
- }) > g.lineDis({
- points: [t.linePoints[0], r]
- }) ? (t.linePoints[0].x = r.x,
- t.linePoints[0].y = r.y,
- t.linePoints[1].x = A.x,
- t.linePoints[1].y = A.y) : (t.linePoints[0].x = A.x,
- t.linePoints[0].y = A.y,
- t.linePoints[1].x = r.x,
- t.linePoints[1].y = r.y)
- }
- }
- },
- maxWidth: {
- get: function() {
- var e = [t.attachment]
- , i = []
- , n = []
- , A = function(e, i, n) {
- var A = e.linePoints || e.points;
- return {
- dis: g.lineDis({
- points: [t.linePoints[i], A[n]]
- }),
- point: A[n]
- }
- };
- e.forEach((function(e) {
- e !== t && (i.push(A(e, 0, 0)),
- i.push(A(e, 0, 1)),
- n.push(A(e, 1, 0)),
- n.push(A(e, 1, 1)))
- }
- )),
- i.sort((function(t, e) {
- return t.dis - e.dis
- }
- )),
- n.sort((function(t, e) {
- return t.dis - e.dis
- }
- ));
- var r = i[0].dis > n[0].dis ? [t.linePoints[1], n[0].point] : [t.linePoints[0], i[0].point];
- return Number((2 * g.lineDis({
- points: r
- }) + g.lineDis({
- points: t.linePoints
- })).toFixed(2))
- }
- },
- minWidth: {
- get: function() {
- return 0
- }
- }
- })
- }
- , h = function(e) {
- Object.defineProperties(e, {
- estart: {
- get: function() {
- return e.start
- },
- set: function(i) {
- i && t.processing.doors.forEach((function(t) {
- t.ele.start = !1
- }
- )),
- e.start = i,
- t.preservation()
- }
- }
- })
- }
- , p = function(t) {
- Object.defineProperties(t, {
- tick: {
- get: function() {
- return Math.max(Number(g.lineDis({
- points: [t.points[0], t.points[3]]
- }).toFixed(2)), Number(g.lineDis({
- points: [t.points[1], t.points[2]]
- }).toFixed(2)))
- },
- set: function(e) {
- e <= 0 || e === t.oldVal || (t.oldVal = e,
- t.thickness = e,
- t.updatePeripheral())
- }
- },
- maxTick: {
- get: function() {
- return 10
- }
- },
- minTick: {
- get: function() {
- return 0
- }
- }
- })
- };
- e.addCase = function() {
- for (var t = [], e = 0; e < arguments.length; e++)
- t[e] = arguments[e];
- var g = i.call.apply(i, n([this], t));
- return c(g.ele),
- g
- }
- ,
- e.addBayCase = function() {
- for (var t = [], e = 0; e < arguments.length; e++)
- t[e] = arguments[e];
- var i = I.call.apply(I, n([this], t));
- return c(i.ele),
- i
- }
- ,
- e.addGroundCase = function() {
- for (var t = [], e = 0; e < arguments.length; e++)
- t[e] = arguments[e];
- var i = s.call.apply(s, n([this], t));
- return c(i.ele),
- i
- }
- ,
- e.addDoor = function() {
- for (var t = [], e = 0; e < arguments.length; e++)
- t[e] = arguments[e];
- var i = A.call.apply(A, n([this], t));
- return c(i.ele),
- h(i.ele),
- i
- }
- ,
- e.addSlideDoor = function() {
- for (var t = [], e = 0; e < arguments.length; e++)
- t[e] = arguments[e];
- var i = C.call.apply(C, n([this], t));
- return c(i.ele),
- i
- }
- ,
- e.adddDoubleDoor = function() {
- for (var t = [], e = 0; e < arguments.length; e++)
- t[e] = arguments[e];
- var i = u.call.apply(u, n([this], t));
- return c(i.ele),
- i
- }
- ,
- e.addColumn = function() {
- for (var t = [], e = 0; e < arguments.length; e++)
- t[e] = arguments[e];
- var i = r.call.apply(r, n([this], t));
- return c(i.ele),
- p(i.ele),
- i
- }
- ,
- e.addLine = function() {
- for (var t = [], e = 0; e < arguments.length; e++)
- t[e] = arguments[e];
- var i = o.call.apply(o, n([this], t));
- return i
- }
- ;
- var d = function(t) {
- Object.defineProperties(t, {
- ewidth: {
- get: function() {
- return Number(g.lineDis({
- points: [t.points[0], t.points[1]]
- }).toFixed(2))
- },
- set: function(e) {
- if (!(e <= 0 || e === t.ewidth)) {
- var i = g.lineStretch({
- points: [t.points[0], t.points[1]]
- }, e)
- , n = g.lineStretch({
- points: [t.points[2], t.points[3]]
- }, e)
- , A = i.points.concat(n.points);
- t.check(A) && t.directUpdate(A)
- }
- }
- },
- maxWidth: {
- get: function() {
- return 10
- }
- },
- minWidth: {
- get: function() {
- return 0
- }
- }
- })
- }
- , f = function(t) {
- Object.defineProperties(t, {
- tick: {
- get: function() {
- return Number(g.lineDis({
- points: [t.points[1], t.points[2]]
- }).toFixed(2))
- },
- set: function(e) {
- if (!(e <= 0 || e === t.tick)) {
- var i = g.lineStretch({
- points: [t.points[0], t.points[3]]
- }, e)
- , n = g.lineStretch({
- points: [t.points[1], t.points[2]]
- }, e)
- , A = [i.points[0], n.points[0], n.points[1], i.points[1]];
- t.check(A) && t.directUpdate(A)
- }
- }
- },
- maxTick: {
- get: function() {
- return 10
- }
- },
- minTick: {
- get: function() {
- return 0
- }
- }
- })
- }
- , y = function(t) {
- Object.defineProperties(t, {
- maxAngle: {
- get: function() {
- return 360
- }
- },
- minAngle: {
- get: function() {
- return 0
- }
- }
- })
- };
- e.addFurnColumn = function() {
- for (var t = [], e = 0; e < arguments.length; e++)
- t[e] = arguments[e];
- var i = a.call.apply(a, n([this], t));
- return d(i.ele),
- f(i.ele),
- y(i.ele),
- i
- }
- ,
- e.addFurnFlue = function() {
- for (var t = [], e = 0; e < arguments.length; e++)
- t[e] = arguments[e];
- var i = l.call.apply(l, n([this], t));
- return d(i.ele),
- f(i.ele),
- y(i.ele),
- i
- }
- }
- e.default = function(t) {
- var e = t.addProcessing;
- t.addProcessing = function() {
- for (var i = [], g = 0; g < arguments.length; g++)
- i[g] = arguments[g];
- var r = e.call.apply(e, n([t], i));
- return A(t, r),
- r
- }
- }
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- }),
- e.other = function(t) {
- var e = !1
- , i = t.addProcessing;
- t.addProcessing = function() {
- for (var g = [], A = 0; A < arguments.length; A++)
- g[A] = arguments[A];
- var r = i.call.apply(i, n([t], g))
- , o = r.addTagging;
- return r.addTagging = function(t) {
- return t.show = e,
- o.call(r, t)
- }
- ,
- r
- }
- ,
- t.hideLabel = function() {
- e = !1,
- t.processings.forEach((function(t) {
- t.taggings.forEach((function(t) {
- return t.ele.show = e
- }
- ))
- }
- ))
- }
- ,
- t.showLabel = function() {
- e = !0,
- t.processings.forEach((function(t) {
- t.taggings.forEach((function(t) {
- return t.ele.show = e
- }
- ))
- }
- ))
- }
- }
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__awaiter || function(t, e, i, n) {
- return new (i || (i = Promise))((function(g, A) {
- function r(t) {
- try {
- C(n.next(t))
- } catch (t) {
- A(t)
- }
- }
- function o(t) {
- try {
- C(n.throw(t))
- } catch (t) {
- A(t)
- }
- }
- function C(t) {
- var e;
- t.done ? g(t.value) : (e = t.value,
- e instanceof i ? e : new i((function(t) {
- t(e)
- }
- ))).then(r, o)
- }
- C((n = n.apply(t, e || [])).next())
- }
- ))
- }
- , g = this && this.__generator || function(t, e) {
- var i, n, g, A, r = {
- label: 0,
- sent: function() {
- if (1 & g[0])
- throw g[1];
- return g[1]
- },
- trys: [],
- ops: []
- };
- return A = {
- next: o(0),
- throw: o(1),
- return: o(2)
- },
- "function" == typeof Symbol && (A[Symbol.iterator] = function() {
- return this
- }
- ),
- A;
- function o(A) {
- return function(o) {
- return function(A) {
- if (i)
- throw new TypeError("Generator is already executing.");
- for (; r; )
- try {
- if (i = 1,
- n && (g = 2 & A[0] ? n.return : A[0] ? n.throw || ((g = n.return) && g.call(n),
- 0) : n.next) && !(g = g.call(n, A[1])).done)
- return g;
- switch (n = 0,
- g && (A = [2 & A[0], g.value]),
- A[0]) {
- case 0:
- case 1:
- g = A;
- break;
- case 4:
- return r.label++,
- {
- value: A[1],
- done: !1
- };
- case 5:
- r.label++,
- n = A[1],
- A = [0];
- continue;
- case 7:
- A = r.ops.pop(),
- r.trys.pop();
- continue;
- default:
- if (!(g = (g = r.trys).length > 0 && g[g.length - 1]) && (6 === A[0] || 2 === A[0])) {
- r = 0;
- continue
- }
- if (3 === A[0] && (!g || A[1] > g[0] && A[1] < g[3])) {
- r.label = A[1];
- break
- }
- if (6 === A[0] && r.label < g[1]) {
- r.label = g[1],
- g = A;
- break
- }
- if (g && r.label < g[2]) {
- r.label = g[2],
- r.ops.push(A);
- break
- }
- g[2] && r.ops.pop(),
- r.trys.pop();
- continue
- }
- A = e.call(t, r)
- } catch (t) {
- A = [6, t],
- n = 0
- } finally {
- i = g = 0
- }
- if (5 & A[0])
- throw A[1];
- return {
- value: A[0] ? A[1] : void 0,
- done: !0
- }
- }([A, o])
- }
- }
- }
- , A = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- , r = this && this.__importDefault || function(t) {
- return t && t.__esModule ? t : {
- default: t
- }
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var o = i(22)
- , C = i(2)
- , I = r(i(60))
- , s = r(i(62))
- , a = i(0)
- , l = function(t, e) {
- var i = t.processing
- , n = i.doors
- , g = i.slideDoors
- , r = i.groundCases
- , o = i.cases
- , C = i.points
- , I = i.taggings
- , s = i.bayCases
- , a = A(i.furnFlues, i.furnColumns, i.columns)
- , l = A(i.lines)
- , u = A(o, n);
- I.forEach((function(t) {
- var i = 3 * e;
- t.ele.fontSize = i < 12 ? 12 : i
- }
- )),
- a.forEach((function(t) {
- t.ele.width = .33 * e
- }
- )),
- g.forEach((function(t) {
- t.ele.foorWidth = 2 * e / (t.ele.attachment.border ? 1 : 2),
- t.ele.bwithin = e / 2 / (t.ele.attachment.border ? 1 : 2)
- }
- )),
- o.forEach((function(t) {
- t.ele.width = 4 * e / 2 / (t.ele.attachment.border ? 1 : 1.5),
- t.ele.stamWidth = .1 * e / (t.ele.attachment.border ? 1 : 2),
- t.ele.outLine.width = t.ele.width,
- t.ele.outLine.color = t.ele.fill,
- t.ele.innerline.width = t.ele.stamWidth,
- t.ele.innerline.color = t.ele.seam,
- t.ele.innerline.update()
- }
- )),
- l.forEach((function(t) {
- t.ele.width = e
- }
- )),
- s.forEach((function(t) {
- t.ele.width = .33 * e / (t.ele.attachment.border ? 1 : 2)
- }
- )),
- r.forEach((function(t) {
- t.ele.width = e / 2 * (t.ele.attachment.border ? 1 : 2)
- }
- )),
- n.forEach((function(t) {
- t.ele.foorWidth = 2 * e / (t.ele.attachment.border ? 1 : 2),
- t.ele.outWidth = .33 * e / (t.ele.attachment.border ? 1 : 2)
- }
- )),
- C.forEach((function(t) {
- t.ele.r1 = e + 1,
- t.ele.r = e + 1
- }
- )),
- u.forEach((function(t) {
- t.ele.linePoints[0].r1 = e + 1,
- t.ele.linePoints[0].r = e + 1,
- t.ele.linePoints[1].r1 = e + 1,
- t.ele.linePoints[1].r = e + 1
- }
- )),
- t.setDireAttrs({
- fontSize: 2.6 * e,
- r: 16.6 * e,
- border: e,
- right: 6.3 * e,
- top: 6.3 * e,
- ArgDire: 5 * e
- })
- };
- e.default = function(t) {
- var e = t.screenshot;
- t.screenshot = function(i) {
- var A = void 0 === i ? {} : i
- , r = A.width
- , u = void 0 === r ? 2880 : r
- , c = A.height
- , h = void 0 === c ? 1620 : c
- , p = A.primaryColor
- , d = void 0 === p ? "#fff" : p
- , f = A.archColor
- , y = void 0 === f ? "rgba(0,0,0,0)" : f
- , v = A.bgColor
- , m = void 0 === v ? "rgba(0,0,0,0)" : v
- , b = A.textColor
- , x = void 0 === b ? "#fff" : b
- , _ = A.archBorder
- , w = void 0 === _ ? d : _
- , P = A.data
- , O = void 0 === P ? t.getData(!0, !0) : P
- , S = A.padding
- , E = void 0 === S ? 450 : S
- , D = A.showGauge
- , k = void 0 === D || D
- , M = A.lineWidth
- , L = void 0 === M ? 10 : M
- , N = A.spliceGauge
- , j = void 0 !== N && N
- , R = A.showDire
- , G = void 0 !== R && R
- , T = A.showTags
- , V = void 0 === T || T
- , U = A.showDoorStart
- , W = void 0 === U || U
- , Z = A.showMapping
- , B = void 0 !== Z && Z
- , Q = A.format
- , F = void 0 === Q ? "image/png" : Q
- , H = A.errreturn
- , J = void 0 !== H && H;
- return n(void 0, void 0, void 0, (function() {
- var i, n, A, r, c, p, f, v, b, _, P, S, D, M, N, R, T, U, Z, Q, H;
- return g(this, (function(g) {
- switch (g.label) {
- case 0:
- return O = o.roateDataY(O.floors.find((function(t) {
- return t.show
- }
- ))),
- i = t.processing.lines[0] ? t.processing.lines[0].ele.width : 3,
- t.processing.render.layer.style.opacity = "0",
- n = [],
- A = [],
- C.CADElement.examples.get(t.processing.render).forEach((function(t) {
- A.push(new Promise((function(e) {
- return t.nextTick(e)
- }
- )))
- }
- )),
- [4, Promise.all(A)];
- case 1:
- for (g.sent(),
- C.CADElement.examples.get(t.processing.render).forEach((function(t) {
- t.__state.direct = !0,
- t.changeSelect(!1)
- }
- )),
- B && (r = [],
- s.default(O).map((function(t) {
- return t
- }
- )).sort((function(t, e) {
- return a.isFaceContain(t, e) ? 1 : -1
- }
- )).forEach((function(e, i) {
- var g = t.processing.taggings.find((function(t) {
- return a.pointInside(e, t.ele) && !~r.indexOf(t)
- }
- ))
- , A = new I.default({
- points: e,
- label: g ? g.ele.title : "",
- show: !0,
- renderer: t.processing.render
- });
- A.zIndex = -i - 3,
- A.update(),
- t.processing.render.push(A),
- n.push(A),
- r.push(g)
- }
- ))),
- (c = [{
- key: "stroke",
- attr: ["doors", "columns", "bayCases", "furnColumns", "furnFlues", "doubleDoors"],
- oldVals: [],
- newColor: w
- }, {
- key: "fill",
- attr: ["groundCases"],
- oldVals: [],
- newColor: w
- }, {
- key: "seam",
- attr: ["cases"],
- oldVals: [],
- newColor: d
- }, {
- key: "bgColor",
- attr: ["cases"],
- oldVals: [],
- newColor: d
- }, {
- key: "color",
- attr: ["lines"],
- oldVals: [],
- newColor: d
- }, {
- key: "icon",
- attr: ["doors"],
- oldVals: [],
- newColor: d
- }, {
- key: "fill",
- attr: ["cases", "doors", "columns", "bayCases", "furnColumns", "furnFlues", "slideDoors", "doubleDoors"],
- oldVals: [],
- newColor: y
- }, {
- key: "foorColor",
- attr: ["slideDoors"],
- oldVals: [],
- newColor: w
- }, {
- key: "clipColor",
- attr: ["slideDoors"],
- oldVals: [],
- newColor: y
- }, {
- key: "color",
- attr: ["taggings"],
- oldVals: [],
- newColor: x
- }]).forEach((function(e) {
- var i = e.key
- , n = e.attr
- , g = e.oldVals
- , A = e.newColor;
- n.forEach((function(e) {
- g.push(t.processing[e].map((function(t) {
- return t.ele[i]
- }
- ))),
- t.processing[e].forEach((function(t) {
- var e = t.ele;
- e[i] = "icon" === i ? "#fff" !== A ? "darkIcon" : "defaultIcon" : A
- }
- ))
- }
- ))
- }
- )),
- p = t.processing.direction,
- f = p.show,
- !p.show && G ? t.showDire() : G || t.hideDire(),
- v = t.processing.taggings[0] && t.processing.taggings[0].ele.show,
- t.processing.taggings.forEach((function(t) {
- return t.ele.show = V
- }
- )),
- b = t.processing.points[0].ele.fillColor,
- _ = t.processing.lines[0].ele.init.color,
- t.processing.points.forEach((function(t) {
- t.ele.fillColor = "rgba(0,0,0,0)"
- }
- )),
- P = [].concat(t.processing.doors).concat(t.processing.groundCases).concat(t.processing.cases).concat(t.processing.doubleDoors),
- Z = 0; Z < P.length; Z++)
- (Q = P[Z].ele.points || P[Z].ele.linePoints) && Q.forEach((function(t) {
- return t.fillColor = "rgba(0,0,0,0)"
- }
- ));
- t.setGaugeModel(1),
- S = p.icon,
- t.setDireAttrs({
- simple: !0,
- icon: "#fff" !== d ? "darkIcon" : "defaultIcon"
- }),
- D = t.processing.doors.map((function(t) {
- return t.ele.showStart
- }
- )),
- t.processing.doors.forEach((function(t) {
- return t.ele.showStart = W
- }
- )),
- M = t.gauge && t.gauge.stroke,
- t.gauge && t.gauge.minPX,
- k && (N = {
- width: L / 2,
- showTop: !1,
- showRight: !1,
- padding: 3.3 * L,
- stroke: d
- },
- j ? (N.minPX = 12 * L,
- console.log("---", N.minPX)) : N.minPX = Math.max(u, h),
- t.setGaugeAttrs(N)),
- l(t, L),
- C.CADElement.examples.get(t.processing.render).forEach((function(t) {
- return t.update()
- }
- )),
- g.label = 2;
- case 2:
- return g.trys.push([2, 4, , 5]),
- [4, e.call(this, {
- width: u,
- height: h,
- bgColor: m,
- data: O,
- spadding: E,
- showGauge: k,
- lineWidth: L,
- format: F
- })];
- case 3:
- return R = g.sent(),
- [3, 5];
- case 4:
- return U = g.sent(),
- J ? [2, U] : (T = U,
- [3, 5]);
- case 5:
- for (k && t.setGaugeAttrs({
- minPX: 50,
- width: 1,
- showTop: !0,
- showRight: !0,
- padding: 10,
- stroke: M
- }),
- t.setDireAttrs({
- simple: !1,
- icon: S
- }),
- Z = 0; Z < P.length; Z++)
- (Q = P[Z].ele.points || P[Z].ele.linePoints) && Q.map((function(t) {
- return t.fillColor = b
- }
- ));
- if (l(t, i),
- t.setGaugeModel(0),
- t.processing.points.forEach((function(t) {
- return t.ele.fillColor = b
- }
- )),
- t.processing.lines.forEach((function(t) {
- return t.ele.color = _
- }
- )),
- (H = t.processing.render).remove.apply(H, n),
- f ? t.showDire() : t.hideDire(),
- v ? t.processing.taggings.forEach((function(t) {
- return t.ele.show = !0
- }
- )) : t.processing.taggings.forEach((function(t) {
- return t.ele.show = !1
- }
- )),
- t.processing.doors.forEach((function(t, e) {
- t.ele.showStart = D[e]
- }
- )),
- t.processing.render.layer.style.opacity = "1",
- c.forEach((function(e) {
- var i = e.key
- , n = e.attr
- , g = e.oldVals;
- n.forEach((function(e, n) {
- t.processing[e].forEach((function(t, e) {
- t.ele[i] = g[n][e]
- }
- ))
- }
- ))
- }
- )),
- C.CADElement.examples.get(t.processing.render).forEach((function(t) {
- t.__state.direct = !1,
- t.update()
- }
- )),
- T)
- throw T;
- return [2, R]
- }
- }
- ))
- }
- ))
- }
- }
- }
- , function(t, e, i) {
- "use strict";
- var n, g = this && this.__extends || (n = function(t, e) {
- return (n = Object.setPrototypeOf || {
- __proto__: []
- }instanceof Array && function(t, e) {
- t.__proto__ = e
- }
- || function(t, e) {
- for (var i in e)
- e.hasOwnProperty(i) && (t[i] = e[i])
- }
- )(t, e)
- }
- ,
- function(t, e) {
- function i() {
- this.constructor = t
- }
- n(t, e),
- t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
- new i)
- }
- );
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var A = i(2)
- , r = i(1)
- , o = i(61)
- , C = 0
- , I = function(t) {
- function e(e) {
- return t.call(this, e) || this
- }
- return g(e, t),
- e.prototype.grentNode = function() {
- var t = "pattern-" + ++C
- , e = document.createElementNS(r.SVGURI, "g");
- return this.path = document.createElementNS(r.SVGURI, "path"),
- this.pattern = document.createElementNS(r.SVGURI, "pattern"),
- this.maping = document.createElementNS(r.SVGURI, "image"),
- this.pattern.append(this.maping),
- this.pattern.setAttribute("id", t),
- this.pattern.setAttribute("patternUnits", "userSpaceOnUse"),
- this.path.setAttribute("fill", "url(#" + t + ")"),
- e.appendChild(this.path),
- e.appendChild(this.pattern),
- e
- }
- ,
- e.prototype.update = function() {
- var t = "M" + this.points.map((function(t) {
- return " " + t.x + " " + t.y + " "
- }
- )).join("L") + "z"
- , e = this.renderer.screenToRealPoint({
- x: 30,
- y: 30
- })
- , i = this.renderer.screenToRealPoint({
- x: 0,
- y: 0
- })
- , n = Math.abs(e.x - i.x)
- , g = Math.abs(e.y - i.y);
- this.icon && this.icon === this.firstIcon || (this.icon = o.getMaping(this.label),
- this.maping.href.baseVal = this.icon,
- this.firstIcon = this.icon),
- this.maping.setAttribute("width", n.toString()),
- this.maping.setAttribute("height", g.toString()),
- this.pattern.setAttribute("width", n.toString()),
- this.pattern.setAttribute("height", g.toString()),
- this.path.setAttribute("d", t)
- }
- ,
- e
- }(A.CADElement);
- e.default = I
- }
- , function(t, e, i) {
- "use strict";
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- var n = i(9)
- , g = [{
- name: "hall",
- img: "data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/7gAOQWRvYmUAZMAAAAAB/9sAhAAGBAQEBQQGBQUGCQYFBgkLCAYGCAsMCgoLCgoMEAwMDAwMDBAMDg8QDw4MExMUFBMTHBsbGxwfHx8fHx8fHx8fAQcHBw0MDRgQEBgaFREVGh8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx//wAARCAAgACADAREAAhEBAxEB/8QAWQABAQEBAAAAAAAAAAAAAAAAAgADCAEBAQEBAAAAAAAAAAAAAAAAAAECAxABAAICAgMAAAAAAAAAAAAAAQACESExQVFxAxEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8A6L+ihirm3U4tsrci68+4VV5U349wNfmqYs4t3CDfSwBZFDMoqoKZgOm0kFfawBYBHEoqgq4gOmkkC+gpmpi3UDK3IO/PuFVeUNePcDX5iGbGbdwj/9k="
- }, {
- name: "room",
- img: "data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/7gAOQWRvYmUAZMAAAAAB/9sAhAAGBAQEBQQGBQUGCQYFBgkLCAYGCAsMCgoLCgoMEAwMDAwMDBAMDg8QDw4MExMUFBMTHBsbGxwfHx8fHx8fHx8fAQcHBw0MDRgQEBgaFREVGh8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx//wAARCAAgACADAREAAhEBAxEB/8QAXAABAQEAAAAAAAAAAAAAAAAAAgAGAQEBAQAAAAAAAAAAAAAAAAAAAQYQAQABBAEEAwAAAAAAAAAAAAECABEhEgNRYYGRwSIUEQEBAAAAAAAAAAAAAAAAAAAAEf/aAAwDAQACEQMRAD8A1rHnJu3Lsq/UnIfRWTrTlyfo1vBx1ZL8VKRcf6NbzcdSSfFKQSPOzNeXVE+rOS+mrRTVZusnLbJbwXqBCamU72b1FSmrle9m9AYKMHWRkvkt5L1UUxGZtIy2wW8NqBAamF7Xb1FSGrhO129AYCsDaTkvgt5bVUTLnZu3Fqi/YhJfZVgXJ+jW0DHRinzUhVx/o1tMx0Ir80hRJc5M14tlT7MJD7asH//Z"
- }, {
- name: "other",
- img: "data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/7gAOQWRvYmUAZMAAAAAB/9sAhAAGBAQEBQQGBQUGCQYFBgkLCAYGCAsMCgoLCgoMEAwMDAwMDBAMDg8QDw4MExMUFBMTHBsbGxwfHx8fHx8fHx8fAQcHBw0MDRgQEBgaFREVGh8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx//wAARCAAgACADAREAAhEBAxEB/8QAUwABAQEAAAAAAAAAAAAAAAAAAQAHAQEBAAAAAAAAAAAAAAAAAAAAAxAAAwADAQAAAAAAAAAAAAAAAAERIUGBIhEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8A31P00yAK6BV0Bb9JICxamAbl4Bbl4A4tbAsWJAG7OgW7OgOLGgJL02wCOgUdAWvSaA//2Q=="
- }]
- , A = [{
- texts: n.i18n.t("modules.cad.hall_tests").split(","),
- mapping: "hall"
- }, {
- texts: n.i18n.t("modules.cad.room_tests").split(","),
- mapping: "room"
- }, {
- texts: n.i18n.t("modules.cad.other_tests").split(","),
- mapping: "other"
- }];
- e.labelTexts = A.reduce((function(t, e) {
- return t.concat(e.texts)
- }
- ), []),
- e.getMaping = function(t) {
- var e = A.find((function(e) {
- return ~e.texts.indexOf(t)
- }
- ));
- return g.find((function(t) {
- return t.name === (e ? e.mapping : "other")
- }
- )).img
- }
- }
- , function(t, e, i) {
- "use strict";
- i.r(e),
- i.d(e, "default", (function() {
- return r
- }
- ));
- var n = i(6)
- , g = i.n(n)
- , A = i(0);
- function r(t, e) {
- t = function(t, e) {
- let i = t.wall
- , n = t.vertex;
- for (let t = 0; t < n.length; t++) {
- let e = n[t];
- n.filter(t=>t !== e && (t.x === e.x && t.y === e.y || Object(A.lineDis)({
- points: [t, e]
- }) < .1)).forEach(t=>{
- i.forEach(i=>{
- i.p1 === t.id && (i.p1 = e.id),
- i.p2 === t.id && (i.p2 = e.id)
- }
- ),
- ~n.indexOf(t) && n.splice(n.indexOf(t), 1)
- }
- )
- }
- for (let e = 0; e < i.length; e++) {
- let n = i[e];
- n.p1 === n.p2 && (["case", "door", "slideDoor", "column", "groundCase", "bayCase"].forEach(e=>{
- for (let i = 0; i < t[e] && t[e].length; i++) {
- t[e][i].line === n.id && t[e].splice(i--, 1)
- }
- }
- ),
- i.splice(e--, 1))
- }
- for (let t = 0; t < i.length; t++) {
- let e = i[t]
- , g = n.find(({id: e})=>e === i[t].p1)
- , r = n.find(({id: e})=>e === i[t].p2)
- , o = {
- points: [g, r]
- }
- , C = 0;
- for (C = t + 1; C < i.length; C++) {
- let t = i[C];
- if (t === e)
- continue;
- let I = n.find(({id: t})=>t === i[C].p1)
- , s = n.find(({id: t})=>t === i[C].p2);
- if (g === I || g === s || r === I || r === s)
- continue;
- let a = {
- points: [I, s]
- }
- , l = Object(A.segmentsIntr)(o, a);
- if (Object(A.lineDis)({
- points: [g, l]
- }) < .1 || Object(A.lineDis)({
- points: [r, l]
- }) < .1 || Object(A.lineDis)({
- points: [I, l]
- }) < .1 || Object(A.lineDis)({
- points: [s, l]
- }) < .1)
- continue;
- if (!l)
- continue;
- let u = Math.max(...n.map(({id: t})=>t)) + 1
- , c = Math.max(...i.map(({id: t})=>t));
- n.push({
- ...l,
- id: u
- }),
- i.splice(i.indexOf(e), 1, {
- p1: g.id,
- p2: u,
- id: ++c
- }, {
- p1: r.id,
- p2: u,
- id: ++c
- }),
- i.splice(i.indexOf(t), 1, {
- p1: I.id,
- p2: u,
- id: ++c
- }, {
- p1: s.id,
- p2: u,
- id: ++c
- });
- break
- }
- C !== i.length && t--
- }
- return t
- }(t);
- let i = Date.now();
- console.log("开始计算房间");
- let n = []
- , r = []
- , o = [];
- function C(t, e, i, g, A, o, I) {
- for (let s = 0; s < t.length; ++s) {
- if (A.indexOf(s) > -1 || o.indexOf(I) > -1)
- continue;
- let a = t[s]
- , l = a.p1.id
- , u = a.p2.id;
- if (I == l || I == u) {
- let c = JSON.parse(JSON.stringify(i))
- , h = JSON.parse(JSON.stringify(g))
- , p = JSON.parse(JSON.stringify(A))
- , d = JSON.parse(JSON.stringify(o))
- , f = I;
- h.push(a.id),
- c.push(I),
- p.push(s),
- d.push(I),
- f == l ? f = u : f == u && (f = l),
- e == f ? (r.push(c),
- n.push(h)) : C(t, e, c, h, p, d, f)
- }
- }
- }
- function I(t, e, i, n) {
- let g = [];
- for (let t = 0; t < n.length; ++t) {
- let e = n[t];
- g.push(e)
- }
- let A = !0;
- for (var r = 0; r < i.length; ++r) {
- if (e.indexOf(t[r]) > -1) {
- A = !1;
- continue
- }
- let i = t[r];
- var C = i.p1
- , I = i.p2
- , a = {
- x: (C.x + I.x) / 2,
- y: (C.y + I.y) / 2
- };
- if (!(s(C, g) && s(I, g) && s(a, g)))
- return !1
- }
- if (A) {
- let i = [];
- return i.push(e[0]),
- i.push(e[e.length - 1]),
- i.push(t[0]),
- i.push(t[t.length - 1]),
- o.push(i),
- !1
- }
- return !0
- }
- function s(t, e) {
- for (var i = 0; i < e.length; ++i) {
- if (a(t, e[i]))
- return !0
- }
- return !!function(t, e) {
- for (var i = t.x, n = t.y, g = !1, A = 0, r = e.length - 1; A < e.length; r = A++) {
- var o = e[A]
- , C = e[r]
- , I = o.x
- , s = o.y
- , a = C.x
- , l = C.y;
- s > n != l > n && i < (a - I) * (n - s) / (l - s) + I && (g = !g)
- }
- return g
- }(t, e)
- }
- function a(t, e) {
- return t.x == e.x && t.y == e.y
- }
- let l = t.wall.map(e=>({
- p1: t.vertex.find(({id: t})=>e.p1 === t),
- p2: t.vertex.find(({id: t})=>e.p2 === t),
- id: e.id
- }));
- function u(t, e, i) {
- return (t.x * e.y + e.x * i.y + i.x * t.y - e.x * t.y - i.x * e.y - t.x * i.y) / 2
- }
- !function(t) {
- for (let e = 0; e < t.length; ++e) {
- let i = []
- , n = []
- , g = []
- , A = [];
- for (let t = 0; t <= e; ++t)
- i.push(t);
- let r = t[e]
- , o = r.p1.id
- , I = r.p2.id;
- g.push(I),
- A.push(r.id);
- let s = null;
- for (let r = e + 1; r < t.length; ++r) {
- let e = t[r];
- if (o == e.p1.id || o == e.p2.id) {
- let a = JSON.parse(JSON.stringify(g))
- , l = JSON.parse(JSON.stringify(A))
- , u = JSON.parse(JSON.stringify(i))
- , c = JSON.parse(JSON.stringify(n))
- , h = o;
- a.push(o),
- l.push(e.id),
- u.push(r),
- s = h == e.p1.id ? e.p2.id : e.p1.id,
- c.push(h),
- C(t, I, a, l, u, c, s)
- }
- }
- }
- }(l),
- r = r.map(e=>e.map(e=>t.vertex.find(({id: t})=>e === t))),
- n = n.map(t=>t.map(t=>l.find(({id: e})=>t === e))),
- function() {
- for (var t = 0; t < r.length; ++t)
- for (var e = t + 1; e < r.length; ++e)
- if (I(n[t], n[e], r[t], r[e]))
- r.splice(e, 1),
- n.splice(e, 1),
- --e;
- else if (I(n[e], n[t], r[e], r[t])) {
- r.splice(t, 1),
- n.splice(t, 1),
- --t,
- --e;
- break
- }
- }(),
- function() {
- let t = [];
- for (let e = 0; e < o.length; ++e) {
- let i = o[e]
- , g = [];
- g[0] = null,
- g[1] = null;
- for (let t = 0; t < n.length && (i[0] == n[t][0] && i[1] == n[t][n[t].length - 1] ? g[0] = t : i[2] == n[t][0] && i[3] == n[t][n[t].length - 1] && (g[1] = t),
- null == g[0] || null == g[1]); ++t)
- ;
- null != g[0] && null != g[1] && t.push(g)
- }
- o = t
- }(),
- t.room = n.map((t,e)=>({
- wall: t.map(({id: t})=>t),
- ground: r[e]
- }));
- let c = Date.now();
- return console.warn("计算完毕,耗时" + (c - i)),
- e && (window.testCenterPoints && e.processing.render.remove(...window.testCenterPoints),
- window.testCenterPoints = r.map(t=>{
- let i = function(t) {
- for (var e = 0, i = 0, n = 0, g = t[1], A = 2; A < t.length; A++) {
- var r = t[A]
- , o = u(t[0], g, r);
- n += o,
- e += (t[0].x + g.x + r.x) * o,
- i += (t[0].y + g.y + r.y) * o,
- g = r
- }
- return {
- x: e / n / 3,
- y: i / n / 3
- }
- }(t.map(t=>({
- ...t,
- y: -t.y
- })))
- , n = "rgba(" + Math.floor(255 * Math.random()) + "," + Math.floor(255 * Math.random()) + "," + Math.floor(255 * Math.random()) + ",0.8)"
- , A = new g.a({
- fillColor: n,
- storkeColor: n,
- x: i.x,
- y: i.y,
- renderer: e.processing.render
- });
- return e.processing.render.push(A),
- A
- }
- ),
- window.testCenterPoints.forEach((i,g)=>{
- t.room[g].ground.map(t=>e.processing.points.find(({id: e})=>e === t.id).ele.real),
- n[g].map(t=>e.processing.lines.find(({id: e})=>e === t.id).ele.real),
- i.real,
- r[g],
- n[g];
- console.log(r[g], r[g])
- }
- )),
- r
- }
- }
- , function(t, e, i) {
- "use strict";
- var n = this && this.__awaiter || function(t, e, i, n) {
- return new (i || (i = Promise))((function(g, A) {
- function r(t) {
- try {
- C(n.next(t))
- } catch (t) {
- A(t)
- }
- }
- function o(t) {
- try {
- C(n.throw(t))
- } catch (t) {
- A(t)
- }
- }
- function C(t) {
- var e;
- t.done ? g(t.value) : (e = t.value,
- e instanceof i ? e : new i((function(t) {
- t(e)
- }
- ))).then(r, o)
- }
- C((n = n.apply(t, e || [])).next())
- }
- ))
- }
- , g = this && this.__generator || function(t, e) {
- var i, n, g, A, r = {
- label: 0,
- sent: function() {
- if (1 & g[0])
- throw g[1];
- return g[1]
- },
- trys: [],
- ops: []
- };
- return A = {
- next: o(0),
- throw: o(1),
- return: o(2)
- },
- "function" == typeof Symbol && (A[Symbol.iterator] = function() {
- return this
- }
- ),
- A;
- function o(A) {
- return function(o) {
- return function(A) {
- if (i)
- throw new TypeError("Generator is already executing.");
- for (; r; )
- try {
- if (i = 1,
- n && (g = 2 & A[0] ? n.return : A[0] ? n.throw || ((g = n.return) && g.call(n),
- 0) : n.next) && !(g = g.call(n, A[1])).done)
- return g;
- switch (n = 0,
- g && (A = [2 & A[0], g.value]),
- A[0]) {
- case 0:
- case 1:
- g = A;
- break;
- case 4:
- return r.label++,
- {
- value: A[1],
- done: !1
- };
- case 5:
- r.label++,
- n = A[1],
- A = [0];
- continue;
- case 7:
- A = r.ops.pop(),
- r.trys.pop();
- continue;
- default:
- if (!(g = (g = r.trys).length > 0 && g[g.length - 1]) && (6 === A[0] || 2 === A[0])) {
- r = 0;
- continue
- }
- if (3 === A[0] && (!g || A[1] > g[0] && A[1] < g[3])) {
- r.label = A[1];
- break
- }
- if (6 === A[0] && r.label < g[1]) {
- r.label = g[1],
- g = A;
- break
- }
- if (g && r.label < g[2]) {
- r.label = g[2],
- r.ops.push(A);
- break
- }
- g[2] && r.ops.pop(),
- r.trys.pop();
- continue
- }
- A = e.call(t, r)
- } catch (t) {
- A = [6, t],
- n = 0
- } finally {
- i = g = 0
- }
- if (5 & A[0])
- throw A[1];
- return {
- value: A[0] ? A[1] : void 0,
- done: !0
- }
- }([A, o])
- }
- }
- }
- , A = this && this.__spreadArrays || function() {
- for (var t = 0, e = 0, i = arguments.length; e < i; e++)
- t += arguments[e].length;
- var n = Array(t)
- , g = 0;
- for (e = 0; e < i; e++)
- for (var A = arguments[e], r = 0, o = A.length; r < o; r++,
- g++)
- n[g] = A[r];
- return n
- }
- ;
- Object.defineProperty(e, "__esModule", {
- value: !0
- });
- e.default = function(t, e) {
- return n(void 0, void 0, void 0, (function() {
- var i, n, r, o, C, I, s, a, l, u;
- return g(this, (function(g) {
- switch (g.label) {
- case 0:
- return i = 3,
- n = t.processing.render.layer,
- r = t.processing.render.g,
- o = (t.processing.render.layer.offsetWidth || parseInt(getComputedStyle(t.processing.render.layer).width)) * i,
- C = (t.processing.render.layer.offsetHeight || parseInt(getComputedStyle(t.processing.render.layer).height)) * i,
- n.style.visibility = "hidden",
- t.processing.doors.forEach((function(t) {
- t.ele.showStart = !1
- }
- )),
- (I = A(t.processing.points, t.processing.lines, t.processing.doors, t.processing.columns, t.processing.cases, t.processing.bayCases, t.processing.slideDoors, t.processing.groundCases, t.processing.furnFlues, t.processing.furnColumns)).length ? [4, Promise.all(I.map((function(t) {
- var e = t.ele;
- return new Promise((function(t) {
- return e.nextTick(t)
- }
- ))
- }
- )))] : [2];
- case 1:
- return g.sent(),
- s = n.querySelector(".sign"),
- [4, t.hideSign()];
- case 2:
- g.sent(),
- g.label = 3;
- case 3:
- return g.trys.push([3, 5, , 6]),
- [4, t.screenshot({
- width: o,
- height: C,
- bgColor: "rgba(0,0,0,0)",
- padding: t.padding * i,
- showGauge: !1,
- lineWidth: 2,
- showDire: !1,
- showTags: !1,
- showDoorStart: !1,
- errreturn: !0
- })];
- case 4:
- for (a = g.sent().file,
- n.style.backgroundImage = "url(" + URL.createObjectURL(a) + ")",
- l = 0; l < r.children.length; l++)
- r.children[l] !== s && r.removeChild(r.children[l--]);
- return [3, 6];
- case 5:
- return u = g.sent(),
- console.error(u),
- t.padding = t.padding * i,
- t.processing.render.layer.style.transformOrigin = "left top",
- t.processing.render.layer.style.transform = "scale(" + 1 / i + ")",
- t.setDefaultSignStyle({
- r: 5 * i
- }),
- t.adapt(t.processing.data, o, C),
- [3, 6];
- case 6:
- return s.style.display = "block",
- n.style.visibility = "visible",
- [4, t.showSign()];
- case 7:
- return g.sent(),
- e && e(),
- [2]
- }
- }
- ))
- }
- ))
- }
- }
- ]);
|