hiprint.bundle.js 413 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566
  1. /**
  2. * jQuery Hiprint 2.5.4
  3. *
  4. * Copyright (c) 2016-2021 www.hinnn.com. All rights reserved.
  5. *
  6. * Licensed under the LGPL or commercial licenses
  7. * To use it on other terms please contact us: hinnn.com@gmail.com
  8. *
  9. */
  10. "use strict";
  11. function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return !!right[Symbol.hasInstance](left); } else { return left instanceof right; } }
  12. function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  13. var hiprint = function (t) {
  14. var e = {};
  15. function n(i) {
  16. if (e[i]) return e[i].exports;
  17. var o = e[i] = {
  18. i: i,
  19. l: !1,
  20. exports: {}
  21. };
  22. return t[i].call(o.exports, o, o.exports, n), o.l = !0, o.exports;
  23. }
  24. return n.m = t, n.c = e, n.d = function (t, e, i) {
  25. n.o(t, e) || Object.defineProperty(t, e, {
  26. enumerable: !0,
  27. get: i
  28. });
  29. }, n.r = function (t) {
  30. "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {
  31. value: "Module"
  32. }), Object.defineProperty(t, "__esModule", {
  33. value: !0
  34. });
  35. }, n.t = function (t, e) {
  36. if (1 & e && (t = n(t)), 8 & e) return t;
  37. if (4 & e && "object" == _typeof(t) && t && t.__esModule) return t;
  38. var i = Object.create(null);
  39. if (n.r(i), Object.defineProperty(i, "default", {
  40. enumerable: !0,
  41. value: t
  42. }), 2 & e && "string" != typeof t) for (var o in t) {
  43. n.d(i, o, function (e) {
  44. return t[e];
  45. }.bind(null, o));
  46. }
  47. return i;
  48. }, n.n = function (t) {
  49. var e = t && t.__esModule ? function () {
  50. return t.default;
  51. } : function () {
  52. return t;
  53. };
  54. return n.d(e, "a", e), e;
  55. }, n.o = function (t, e) {
  56. return Object.prototype.hasOwnProperty.call(t, e);
  57. }, n.p = "/", n(n.s = 21);
  58. }([function (t, e, n) {
  59. "use strict";
  60. var i;
  61. n.d(e, "a", function () {
  62. return hinnn;
  63. }), window.hinnn = {}, hinnn.event = (i = {}, {
  64. on: function on(t, e) {
  65. i[t] || (i[t] = []), i[t].push(e);
  66. },
  67. id: 0,
  68. off: function off(t, e) {
  69. var n = i[t];
  70. if (n) {
  71. for (var o = -1, r = 0; r < n.length; r++) {
  72. if (n[r] === e) {
  73. o = r;
  74. break;
  75. }
  76. }
  77. o < 0 || i[t].splice(o, 1);
  78. }
  79. },
  80. trigger: function trigger(t) {
  81. var e = i[t];
  82. if (e && e.length) for (var n = Array.prototype.slice.call(arguments, 1), o = 0; o < e.length; o++) {
  83. e[o].apply(this, n);
  84. }
  85. },
  86. clear: function clear(t) {
  87. i[t] = [];
  88. },
  89. getId: function getId() {
  90. return this.id += 1, this.id;
  91. },
  92. getNameWithId: function getNameWithId(t) {
  93. return t + "-" + this.getId();
  94. }
  95. }), hinnn.form = {
  96. serialize: function serialize(t) {
  97. var e = $(t).serializeArray(),
  98. n = {};
  99. return $.each(e, function () {
  100. n[this.name] ? "[object Array]" == Object.prototype.toString.call(n[this.name]) ? n[this.name].push(this.value) : n[this.name] = [n[this.name], this.value] : n[this.name] = this.value;
  101. }), n;
  102. }
  103. }, hinnn.pt = {
  104. toPx: function toPx(t) {
  105. return t * (this.getDpi() / 72);
  106. },
  107. dpi: 0,
  108. getDpi: function getDpi() {
  109. if (!this.dpi) {
  110. var _t2 = document.createElement("DIV");
  111. _t2.style.cssText = "width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden", document.body.appendChild(_t2), this.dpi = _t2.offsetHeight;
  112. }
  113. return this.dpi;
  114. }
  115. }, hinnn.px = {
  116. toPt: function toPt(t) {
  117. return t * (72 / this.getDpi());
  118. },
  119. dpi: 0,
  120. getDpi: function getDpi() {
  121. if (!this.dpi) {
  122. var _t3 = document.createElement("DIV");
  123. _t3.style.cssText = "width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden", document.body.appendChild(_t3), this.dpi = _t3.offsetHeight;
  124. }
  125. return this.dpi;
  126. }
  127. }, hinnn.mm = {
  128. toPt: function toPt(t) {
  129. return 72 / 25.4 * t;
  130. },
  131. toPx: function toPx(t) {
  132. return hinnn.pt.toPx(hinnn.mm.toPt(t));
  133. }
  134. }, hinnn.throttle = function (t, e, n) {
  135. var i,
  136. o,
  137. r,
  138. a = null,
  139. p = 0;
  140. n || (n = {});
  141. var s = function s() {
  142. p = !1 === n.leading ? 0 : _.now(), a = null, r = t.apply(i, o), a || (i = o = null);
  143. };
  144. return function () {
  145. var l = _.now();
  146. p || !1 !== n.leading || (p = l);
  147. var u = e - (l - p);
  148. return i = this, o = arguments, u <= 0 || u > e ? (a && (clearTimeout(a), a = null), p = l, r = t.apply(i, o), a || (i = o = null)) : a || !1 === n.trailing || (a = setTimeout(s, u)), r;
  149. };
  150. }, hinnn.debounce = function (t, e, n) {
  151. var i,
  152. o,
  153. r,
  154. a,
  155. p,
  156. s = function s() {
  157. var l = _.now() - a;
  158. l < e && l >= 0 ? i = setTimeout(s, e - l) : (i = null, n || (p = t.apply(r, o), i || (r = o = null)));
  159. };
  160. return function () {
  161. r = this, o = arguments, a = _.now();
  162. var l = n && !i;
  163. return i || (i = setTimeout(s, e)), l && (p = t.apply(r, o), r = o = null), p;
  164. };
  165. }, hinnn.toUtf8 = function (t) {
  166. var e, n, i, o;
  167. for (e = "", i = t.length, n = 0; n < i; n++) {
  168. (o = t.charCodeAt(n)) >= 1 && o <= 127 ? e += t.charAt(n) : o > 2047 ? (e += String.fromCharCode(224 | o >> 12 & 15), e += String.fromCharCode(128 | o >> 6 & 63), e += String.fromCharCode(128 | o >> 0 & 63)) : (e += String.fromCharCode(192 | o >> 6 & 31), e += String.fromCharCode(128 | o >> 0 & 63));
  169. }
  170. return e;
  171. }, hinnn.groupBy = function (t, e, n) {
  172. var i = {};
  173. return t.forEach(function (t) {
  174. var o = JSON.stringify(n(t));
  175. i[o] || (i[o] = {
  176. rows: []
  177. }, e.forEach(function (e) {
  178. i[o][e] = t[e];
  179. })), i[o].rows.push(t);
  180. }), Object.keys(i).map(function (t) {
  181. return i[t];
  182. });
  183. }, hinnn.orderBy = function (t, e) {
  184. if (t.length <= 1) return t;
  185. var n = Math.floor(t.length / 2),
  186. i = t.splice(n, 1)[0],
  187. o = [],
  188. r = [];
  189. var _iteratorNormalCompletion = true;
  190. var _didIteratorError = false;
  191. var _iteratorError = undefined;
  192. try {
  193. for (var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
  194. var _n = _step.value;
  195. e(_n) < e(i) ? o.push(_n) : r.push(_n);
  196. }
  197. } catch (err) {
  198. _didIteratorError = true;
  199. _iteratorError = err;
  200. } finally {
  201. try {
  202. if (!_iteratorNormalCompletion && _iterator.return != null) {
  203. _iterator.return();
  204. }
  205. } finally {
  206. if (_didIteratorError) {
  207. throw _iteratorError;
  208. }
  209. }
  210. }
  211. return this.orderBy(o, e).concat([i], this.orderBy(r, e));
  212. }, hinnn.dateFormat = function (t, e) {
  213. if (t) try {
  214. var o = "string" == typeof t ? new Date(t) : t;
  215. var n = {
  216. "M+": o.getMonth() + 1,
  217. "d+": o.getDate(),
  218. "H+": o.getHours(),
  219. "m+": o.getMinutes(),
  220. "s+": o.getSeconds(),
  221. "q+": Math.floor((o.getMonth() + 3) / 3),
  222. S: o.getMilliseconds()
  223. };
  224. for (var i in /(y+)/.test(e) && (e = e.replace(RegExp.$1, (o.getFullYear() + "").substr(4 - RegExp.$1.length))), n) {
  225. new RegExp("(" + i + ")").test(e) && (e = e.replace(RegExp.$1, 1 == RegExp.$1.length ? n[i] : ("00" + n[i]).substr(("" + n[i]).length)));
  226. }
  227. return e;
  228. } catch (t) {
  229. return console.log(t), "";
  230. }
  231. return "";
  232. };
  233. }, function (t, e, n) {
  234. "use strict";
  235. n.d(e, "a", function () {
  236. return o;
  237. });
  238. var i = n(9),
  239. o = function () {
  240. function t() {
  241. this.providers = [], this.movingDistance = 1.5, this.paperHeightTrim = 1, this.text = {
  242. supportOptions: [{
  243. name: "title",
  244. hidden: !1,
  245. title: ""
  246. }, {
  247. name: "field",
  248. hidden: !1
  249. }, {
  250. name: "testData",
  251. hidden: !1
  252. }, {
  253. name: "dataType",
  254. hidden: !1
  255. }, {
  256. name: "fontFamily",
  257. hidden: !1
  258. }, {
  259. name: "fontSize",
  260. hidden: !1
  261. }, {
  262. name: "fontWeight",
  263. hidden: !1
  264. }, {
  265. name: "letterSpacing",
  266. hidden: !1
  267. }, {
  268. name: "color",
  269. hidden: !1
  270. }, {
  271. name: "textDecoration",
  272. hidden: !1
  273. }, {
  274. name: "textAlign",
  275. hidden: !1
  276. }, {
  277. name: "textContentVerticalAlign",
  278. hidden: !1
  279. }, {
  280. name: "lineHeight",
  281. hidden: !1
  282. }, {
  283. name: "textType",
  284. hidden: !1
  285. }, {
  286. name: "barcodeMode",
  287. hidden: !1
  288. }, {
  289. name: "hideTitle",
  290. hidden: !1
  291. }, {
  292. name: "showInPage",
  293. hidden: !1
  294. }, {
  295. name: "unShowInPage",
  296. hidden: !1
  297. }, {
  298. name: "fixed",
  299. hidden: !1
  300. }, {
  301. name: "axis",
  302. hidden: !1
  303. }, {
  304. name: "transform",
  305. hidden: !1
  306. }, {
  307. name: "optionsGroup",
  308. hidden: !1
  309. }, {
  310. name: "borderLeft",
  311. hidden: !1
  312. }, {
  313. name: "borderTop",
  314. hidden: !1
  315. }, {
  316. name: "borderRight",
  317. hidden: !1
  318. }, {
  319. name: "borderBottom",
  320. hidden: !1
  321. }, {
  322. name: "borderWidth",
  323. hidden: !1
  324. }, {
  325. name: "borderColor",
  326. hidden: !1
  327. }, {
  328. name: "contentPaddingLeft",
  329. hidden: !1
  330. }, {
  331. name: "contentPaddingTop",
  332. hidden: !1
  333. }, {
  334. name: "contentPaddingRight",
  335. hidden: !1
  336. }, {
  337. name: "contentPaddingBottom",
  338. hidden: !1
  339. }, {
  340. name: "backgroundColor",
  341. hidden: !1
  342. }, {
  343. name: "formatter",
  344. hidden: !1
  345. }, {
  346. name: "styler",
  347. hidden: !1
  348. }],
  349. default: {
  350. fontFamily: void 0,
  351. fontSize: void 0,
  352. fontWeight: "",
  353. letterSpacing: void 0,
  354. textAlign: void 0,
  355. textType: "text",
  356. hideTitle: !1,
  357. height: 9.75,
  358. lineHeight: void 0,
  359. width: 120
  360. }
  361. }, this.image = {
  362. supportOptions: [{
  363. name: "field",
  364. hidden: !1
  365. }, {
  366. name: "src",
  367. hidden: !1
  368. }, {
  369. name: "showInPage",
  370. hidden: !1
  371. }, {
  372. name: "fixed",
  373. hidden: !1
  374. }, {
  375. name: "axis",
  376. hidden: !1
  377. }, {
  378. name: "transform",
  379. hidden: !1
  380. }, {
  381. name: "formatter",
  382. hidden: !1
  383. }, {
  384. name: "styler",
  385. hidden: !1
  386. }],
  387. default: {}
  388. }, this.longText = {
  389. supportOptions: [{
  390. name: "title",
  391. hidden: !1
  392. }, {
  393. name: "field",
  394. hidden: !1
  395. }, {
  396. name: "testData",
  397. hidden: !1
  398. }, {
  399. name: "fontFamily",
  400. hidden: !1
  401. }, {
  402. name: "fontSize",
  403. hidden: !1
  404. }, {
  405. name: "fontWeight",
  406. hidden: !1
  407. }, {
  408. name: "letterSpacing",
  409. hidden: !1
  410. }, {
  411. name: "textAlign",
  412. hidden: !1
  413. }, {
  414. name: "lineHeight",
  415. hidden: !1
  416. }, {
  417. name: "color",
  418. hidden: !1
  419. }, {
  420. name: "hideTitle",
  421. hidden: !1
  422. }, {
  423. name: "longTextIndent",
  424. hidden: !1
  425. }, {
  426. name: "leftSpaceRemoved",
  427. hidden: !1
  428. }, {
  429. name: "showInPage",
  430. hidden: !1
  431. }, {
  432. name: "unShowInPage",
  433. hidden: !1
  434. }, {
  435. name: "fixed",
  436. hidden: !1
  437. }, {
  438. name: "axis",
  439. hidden: !1
  440. }, {
  441. name: "lHeight",
  442. hidden: !1
  443. }, {
  444. name: "transform",
  445. hidden: !1
  446. }, {
  447. name: "optionsGroup",
  448. hidden: !1
  449. }, {
  450. name: "borderLeft",
  451. hidden: !1
  452. }, {
  453. name: "borderTop",
  454. hidden: !1
  455. }, {
  456. name: "borderRight",
  457. hidden: !1
  458. }, {
  459. name: "borderBottom",
  460. hidden: !1
  461. }, {
  462. name: "borderWidth",
  463. hidden: !1
  464. }, {
  465. name: "borderColor",
  466. hidden: !1
  467. }, {
  468. name: "contentPaddingLeft",
  469. hidden: !1
  470. }, {
  471. name: "contentPaddingTop",
  472. hidden: !1
  473. }, {
  474. name: "contentPaddingRight",
  475. hidden: !1
  476. }, {
  477. name: "contentPaddingBottom",
  478. hidden: !1
  479. }, {
  480. name: "backgroundColor",
  481. hidden: !1
  482. }, {
  483. name: "formatter",
  484. hidden: !1
  485. }, {
  486. name: "styler",
  487. hidden: !1
  488. }],
  489. default: {
  490. fontFamily: void 0,
  491. fontSize: void 0,
  492. fontWeight: "",
  493. letterSpacing: void 0,
  494. textAlign: void 0,
  495. hideTitle: !1,
  496. height: 42,
  497. lineHeight: void 0,
  498. width: 550
  499. }
  500. }, this.table = {
  501. supportOptions: [{
  502. name: "field",
  503. hidden: !1
  504. }, {
  505. name: "fontFamily",
  506. hidden: !1
  507. }, {
  508. name: "fontSize",
  509. hidden: !1
  510. }, {
  511. name: "lineHeight",
  512. hidden: !1
  513. }, {
  514. name: "textAlign",
  515. hidden: !1
  516. }, {
  517. name: "gridColumns",
  518. hidden: !1
  519. }, {
  520. name: "gridColumnsGutter",
  521. hidden: !1
  522. }, {
  523. name: "tableBorder",
  524. hidden: !1
  525. }, {
  526. name: "tableHeaderBorder",
  527. hidden: !1
  528. }, {
  529. name: "tableHeaderCellBorder",
  530. hidden: !1
  531. }, {
  532. name: "tableHeaderRowHeight",
  533. hidden: !1
  534. }, {
  535. name: "tableHeaderBackground",
  536. hidden: !1
  537. }, {
  538. name: "tableHeaderFontSize",
  539. hidden: !1
  540. }, {
  541. name: "tableHeaderFontWeight",
  542. hidden: !1
  543. }, {
  544. name: "tableBodyRowHeight",
  545. hidden: !1
  546. }, {
  547. name: "tableBodyRowBorder",
  548. hidden: !1
  549. }, {
  550. name: "tableBodyCellBorder",
  551. hidden: !1
  552. }, {
  553. name: "axis",
  554. hidden: !1
  555. }, {
  556. name: "lHeight",
  557. hidden: !1
  558. }, {
  559. name: "autoCompletion",
  560. hidden: !1
  561. }, {
  562. name: "columns",
  563. hidden: !1
  564. }, {
  565. name: "styler",
  566. hidden: !1
  567. }, {
  568. name: "rowStyler",
  569. hidden: !1
  570. }, {
  571. name: "tableFooterRepeat",
  572. hidden: !1
  573. }, {
  574. name: "footerFormatter",
  575. hidden: !1
  576. }, {
  577. name: "gridColumnsFooterFormatter",
  578. hidden: !1
  579. }],
  580. default: {
  581. fontFamily: void 0,
  582. fontSize: void 0,
  583. fontWeight: "",
  584. textAlign: void 0,
  585. tableBorder: void 0,
  586. tableHeaderBorder: void 0,
  587. tableHeaderCellBorder: void 0,
  588. tableHeaderBackground: void 0,
  589. tableHeaderRowHeight: void 0,
  590. tableHeaderFontWeight: void 0,
  591. tableBodyCellBorder: void 0,
  592. tableBodyRowHeight: void 0,
  593. letterSpacing: "",
  594. lineHeight: void 0,
  595. width: 550
  596. }
  597. }, this.tableCustom = {
  598. supportOptions: [{
  599. name: "field",
  600. hidden: !1
  601. }, {
  602. name: "fontFamily",
  603. hidden: !1
  604. }, {
  605. name: "fontSize",
  606. hidden: !1
  607. }, {
  608. name: "textAlign",
  609. hidden: !1
  610. }, {
  611. name: "tableBorder",
  612. hidden: !1
  613. }, {
  614. name: "tableHeaderBorder",
  615. hidden: !1
  616. }, {
  617. name: "tableHeaderCellBorder",
  618. hidden: !1
  619. }, {
  620. name: "tableHeaderRowHeight",
  621. hidden: !1
  622. }, {
  623. name: "tableHeaderFontSize",
  624. hidden: !1
  625. }, {
  626. name: "tableHeaderFontWeight",
  627. hidden: !1
  628. }, {
  629. name: "tableHeaderBackground",
  630. hidden: !1
  631. }, {
  632. name: "tableBodyRowHeight",
  633. hidden: !1
  634. }, {
  635. name: "tableBodyRowBorder",
  636. hidden: !1
  637. }, {
  638. name: "tableBodyCellBorder",
  639. hidden: !1
  640. }, {
  641. name: "axis",
  642. hidden: !1
  643. }, {
  644. name: "lHeight",
  645. hidden: !1
  646. }, {
  647. name: "autoCompletion",
  648. hidden: !1
  649. }, {
  650. name: "tableFooterRepeat",
  651. hidden: !1
  652. }],
  653. default: {
  654. fontFamily: void 0,
  655. fontSize: void 0,
  656. fontWeight: "",
  657. textAlign: void 0,
  658. tableBorder: void 0,
  659. tableHeaderBorder: void 0,
  660. tableHeaderCellBorder: void 0,
  661. tableHeaderBackground: void 0,
  662. tableHeaderRowHeight: void 0,
  663. tableHeaderFontWeight: void 0,
  664. tableBodyCellBorder: void 0,
  665. tableBodyRowHeight: void 0,
  666. letterSpacing: "",
  667. lineHeight: void 0,
  668. width: 550
  669. }
  670. }, this.hline = {
  671. supportOptions: [{
  672. name: "borderColor",
  673. hidden: !1
  674. }, {
  675. name: "borderWidth",
  676. hidden: !1
  677. }, {
  678. name: "showInPage",
  679. hidden: !1
  680. }, {
  681. name: "fixed",
  682. hidden: !1
  683. }, {
  684. name: "axis",
  685. hidden: !1
  686. }, {
  687. name: "transform",
  688. hidden: !1
  689. }, {
  690. name: "borderStyle",
  691. hidden: !1
  692. }],
  693. default: {
  694. borderWidth: .75,
  695. height: 9,
  696. width: 90
  697. }
  698. }, this.vline = {
  699. supportOptions: [{
  700. name: "borderColor",
  701. hidden: !1
  702. }, {
  703. name: "borderWidth",
  704. hidden: !1
  705. }, {
  706. name: "showInPage",
  707. hidden: !1
  708. }, {
  709. name: "fixed",
  710. hidden: !1
  711. }, {
  712. name: "axis",
  713. hidden: !1
  714. }, {
  715. name: "transform",
  716. hidden: !1
  717. }, {
  718. name: "borderStyle",
  719. hidden: !1
  720. }],
  721. default: {
  722. borderWidth: void 0,
  723. height: 90,
  724. width: 9
  725. }
  726. }, this.rect = {
  727. supportOptions: [{
  728. name: "borderColor",
  729. hidden: !1
  730. }, {
  731. name: "borderWidth",
  732. hidden: !1
  733. }, {
  734. name: "showInPage",
  735. hidden: !1
  736. }, {
  737. name: "fixed",
  738. hidden: !1
  739. }, {
  740. name: "axis",
  741. hidden: !1
  742. }, {
  743. name: "transform",
  744. hidden: !1
  745. }, {
  746. name: "borderStyle",
  747. hidden: !1
  748. }],
  749. default: {
  750. borderWidth: void 0,
  751. height: 90,
  752. width: 90
  753. }
  754. }, this.oval = {
  755. supportOptions: [{
  756. name: "borderColor",
  757. hidden: !1
  758. }, {
  759. name: "borderWidth",
  760. hidden: !1
  761. }, {
  762. name: "showInPage",
  763. hidden: !1
  764. }, {
  765. name: "fixed",
  766. hidden: !1
  767. }, {
  768. name: "axis",
  769. hidden: !1
  770. }, {
  771. name: "transform",
  772. hidden: !1
  773. }, {
  774. name: "borderStyle",
  775. hidden: !1
  776. }],
  777. default: {
  778. borderWidth: void 0,
  779. height: 90,
  780. width: 90
  781. }
  782. }, this.html = {
  783. supportOptions: [{
  784. name: "showInPage",
  785. hidden: !1
  786. }, {
  787. name: "unShowInPage",
  788. hidden: !1
  789. }, {
  790. name: "fixed",
  791. hidden: !1
  792. }, {
  793. name: "axis",
  794. hidden: !1
  795. }, {
  796. name: "formatter",
  797. hidden: !1
  798. }],
  799. default: {
  800. height: 90,
  801. width: 90
  802. }
  803. }, this.tableColumn = {
  804. supportOptions: [{
  805. name: "title",
  806. hidden: !1
  807. }, {
  808. name: "align",
  809. hidden: !1
  810. }, {
  811. name: "halign",
  812. hidden: !1
  813. }, {
  814. name: "vAlign",
  815. hidden: !1
  816. }, {
  817. name: "paddingLeft",
  818. hidden: !1
  819. }, {
  820. name: "paddingRight",
  821. hidden: !1
  822. }, {
  823. name: "formatter2",
  824. hidden: !1
  825. }, {
  826. name: "styler2",
  827. hidden: !1
  828. }],
  829. default: {
  830. height: 90,
  831. width: 90
  832. }
  833. };
  834. }
  835. return t.prototype.init = function (t) {
  836. t && $.extend(this, t);
  837. }, Object.defineProperty(t, "instance", {
  838. get: function get() {
  839. return t._instance || (t._instance = new t(), window.HIPRINT_CONFIG && $.extend(t._instance, HIPRINT_CONFIG), t._instance.optionItems && t._instance.optionItems.forEach(function (t) {
  840. i.a.registerItem(t);
  841. })), t._instance;
  842. },
  843. enumerable: !0,
  844. configurable: !0
  845. }), t;
  846. }();
  847. }, function (t, e, n) {
  848. "use strict";
  849. var i = function () {
  850. function t(t) {
  851. this.printElement = t;
  852. }
  853. return t.prototype.updatePosition = function (t, e) {
  854. this.left = t, this.top = e;
  855. }, t;
  856. }();
  857. n.d(e, "a", function () {
  858. return o;
  859. });
  860. var o = function () {
  861. function t() {
  862. this.printTemplateContainer = {}, this.A1 = {
  863. width: 841,
  864. height: 594
  865. }, this.A2 = {
  866. width: 420,
  867. height: 594
  868. }, this.A3 = {
  869. width: 420,
  870. height: 297
  871. }, this.A4 = {
  872. width: 210,
  873. height: 297
  874. }, this.A5 = {
  875. width: 210,
  876. height: 148
  877. }, this.A6 = {
  878. width: 105,
  879. height: 148
  880. }, this.A7 = {
  881. width: 105,
  882. height: 74
  883. }, this.A8 = {
  884. width: 52,
  885. height: 74
  886. }, this.B1 = {
  887. width: 1e3,
  888. height: 707
  889. }, this.B2 = {
  890. width: 500,
  891. height: 707
  892. }, this.B3 = {
  893. width: 500,
  894. height: 353
  895. }, this.B4 = {
  896. width: 250,
  897. height: 353
  898. }, this.B5 = {
  899. width: 250,
  900. height: 176
  901. }, this.B6 = {
  902. width: 125,
  903. height: 176
  904. }, this.B7 = {
  905. width: 125,
  906. height: 88
  907. }, this.B8 = {
  908. width: 62,
  909. height: 88
  910. }, this.dragLengthCNum = function (t, e) {
  911. var n = .75 * t;
  912. return e && (e = e), Math.round(n / e) * e;
  913. };
  914. }
  915. return Object.defineProperty(t, "instance", {
  916. get: function get() {
  917. return this._instance || (this._instance = new t()), this._instance;
  918. },
  919. enumerable: !0,
  920. configurable: !0
  921. }), t.prototype.getDragingPrintElement = function () {
  922. return t.instance.dragingPrintElement;
  923. }, t.prototype.setDragingPrintElement = function (e) {
  924. t.instance.dragingPrintElement = new i(e);
  925. }, t.prototype.guid = function () {
  926. return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (t) {
  927. var e = 16 * Math.random() | 0;
  928. return ("x" == t ? e : 3 & e | 8).toString(16);
  929. });
  930. }, t.prototype.imageToBase64 = function (t) {
  931. if (-1 == $(t).attr("src").indexOf("base64")) try {
  932. var e = document.createElement("canvas"),
  933. n = new Image();
  934. n.src = t.attr("src"), e.width = n.width, e.height = n.height, e.getContext("2d").drawImage(n, 0, 0), t.attr("src", e.toDataURL("image/png"));
  935. } catch (e) {
  936. try {
  937. this.xhrLoadImage(t);
  938. } catch (t) {
  939. console.log(t);
  940. }
  941. }
  942. }, t.prototype.xhrLoadImage = function (t) { }, t.prototype.transformImg = function (t) {
  943. var e = this;
  944. t.map(function (t, n) {
  945. e.imageToBase64($(n));
  946. });
  947. }, t.prototype.getPrintTemplateById = function (e) {
  948. return t.instance.printTemplateContainer[e];
  949. }, t.prototype.setPrintTemplateById = function (e, n) {
  950. return t.instance.printTemplateContainer[e] = n;
  951. }, t;
  952. }();
  953. }, function (t, e, n) {
  954. "use strict";
  955. var i = function () {
  956. return function () { };
  957. }();
  958. n.d(e, "a", function () {
  959. return o;
  960. });
  961. var o = function () {
  962. function t(t) {
  963. t = t || {}, this.left = t.left, this.top = t.top, this.topInDesign = this.top, this.height = t.height, this.width = t.width, this.init(t);
  964. }
  965. return t.prototype.setDefault = function (t) {
  966. this.defaultOptions = t, this.initSize();
  967. }, t.prototype.initSize = function () {
  968. this.width || this.setWidth(this.defaultOptions.width), this.height || this.setHeight(this.defaultOptions.height);
  969. }, t.prototype.initSizeByHtml = function (t, e) {
  970. this.width || this.setWidth(t), this.height || this.setHeight(e);
  971. }, t.prototype.getLeft = function () {
  972. return this.left;
  973. }, t.prototype.displayLeft = function () {
  974. return this.left + "pt";
  975. }, t.prototype.setLeft = function (t) {
  976. null != t && (this.left = t);
  977. }, t.prototype.getTop = function () {
  978. return this.top;
  979. }, t.prototype.getTopInDesign = function () {
  980. return this.topInDesign;
  981. }, t.prototype.displayTop = function () {
  982. return this.top + "pt";
  983. }, t.prototype.setTop = function (t) {
  984. null != t && (this.top = t);
  985. }, t.prototype.copyDesignTopFromTop = function () {
  986. this.topInDesign = this.top;
  987. }, t.prototype.getHeight = function () {
  988. return this.height;
  989. }, t.prototype.displayHeight = function () {
  990. return this.height + "pt";
  991. }, t.prototype.setHeight = function (t) {
  992. null != t && (this.height = t);
  993. }, t.prototype.getWidth = function () {
  994. return this.width;
  995. }, t.prototype.displayWidth = function () {
  996. return this.width + "pt";
  997. }, t.prototype.setWidth = function (t) {
  998. null != t && (this.width = t);
  999. }, t.prototype.getValueFromOptionsOrDefault = function (t) {
  1000. return null == this[t] ? this.defaultOptions[t] : this[t];
  1001. }, t.prototype.getPrintElementOptionEntity = function () {
  1002. var t = new i(),
  1003. e = this;
  1004. return Object.keys(this).filter(function (t) {
  1005. return "topInDesign" != t;
  1006. }).forEach(function (n) {
  1007. if ("number" != typeof e[n] && "string" != typeof e[n] && _typeof(e[n]) != _typeof(!0) || (t[n] = e[n]), "style" == n) {
  1008. t.style = {};
  1009. var i = e[n];
  1010. if (i) Object.keys(i).forEach(function (e) {
  1011. "number" != typeof i[e] && "string" != typeof i[e] || (t.style[e] = i[e]);
  1012. });
  1013. }
  1014. }), t;
  1015. }, t.prototype.init = function (t) {
  1016. var e = this;
  1017. t && Object.keys(t).forEach(function (n) {
  1018. e[n] = t[n];
  1019. });
  1020. }, t;
  1021. }();
  1022. }, function (module, __webpack_exports__, __webpack_require__) {
  1023. "use strict";
  1024. __webpack_require__.d(__webpack_exports__, "a", function () {
  1025. return BasePrintElement;
  1026. });
  1027. var _entity_PrintElementEntity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17),
  1028. _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1),
  1029. _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9),
  1030. _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6),
  1031. _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0),
  1032. _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8),
  1033. _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2),
  1034. BasePrintElement = function () {
  1035. function BasePrintElement(t) {
  1036. this.printElementType = t, this.id = _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.guid();
  1037. }
  1038. return BasePrintElement.prototype.getConfigOptionsByName = function (t) {
  1039. return _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance[t];
  1040. }, BasePrintElement.prototype.getProxyTarget = function (t) {
  1041. t && this.SetProxyTargetOption(t);
  1042. var e = this.getData(),
  1043. n = this.createTarget(this.getTitle(), e);
  1044. return this.updateTargetSize(n), this.css(n, e), n;
  1045. }, BasePrintElement.prototype.SetProxyTargetOption = function (t) {
  1046. this.options.getPrintElementOptionEntity();
  1047. $.extend(this.options, t);
  1048. }, BasePrintElement.prototype.showInPage = function (t, e) {
  1049. var n = this.options.showInPage,
  1050. i = this.options.unShowInPage;
  1051. if (n) {
  1052. if ("first" == n) return 0 == t;
  1053. if (t == e - 1 && "last" == i) return !1;
  1054. if ("odd" == n) return (0 != t || "first" != i) && t % 2 == 0;
  1055. if ("even" == n) return t % 2 == 1;
  1056. if ("last" == n) return t == e - 1;
  1057. }
  1058. return (0 != t || "first" != i) && (t != e - 1 || "last" != i);
  1059. }, BasePrintElement.prototype.setTemplateId = function (t) {
  1060. this.templateId = t;
  1061. }, BasePrintElement.prototype.setPanel = function (t) {
  1062. this.panel = t;
  1063. }, BasePrintElement.prototype.getField = function () {
  1064. return this.options.field || this.printElementType.field;
  1065. }, BasePrintElement.prototype.getTitle = function () {
  1066. return this.printElementType.title;
  1067. }, BasePrintElement.prototype.updateSizeAndPositionOptions = function (t, e, n, i) {
  1068. this.options.setLeft(t), this.options.setTop(e), this.options.copyDesignTopFromTop(), this.options.setWidth(n), this.options.setHeight(i), _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.event.trigger("hiprintTemplateDataChanged_" + this.templateId);
  1069. }, BasePrintElement.prototype.initSizeByHtml = function (t) {
  1070. if (t && t.length) {
  1071. this.createTempContainer();
  1072. var e = t.clone();
  1073. this.getTempContainer().append(e), this.options.initSizeByHtml(parseInt(_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.px.toPt(e.width()).toString()), parseInt(_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.px.toPt(e.height()).toString())), this.removeTempContainer();
  1074. }
  1075. }, BasePrintElement.prototype.updateTargetSize = function (t) {
  1076. t.css("width", this.options.displayWidth()), t.css("height", this.options.displayHeight());
  1077. }, BasePrintElement.prototype.updateTargetWidth = function (t) {
  1078. t.css("width", this.options.displayWidth());
  1079. }, BasePrintElement.prototype.getDesignTarget = function (t) {
  1080. var e = this;
  1081. return this.designTarget = this.getHtml(t)[0].target, this.designPaper = t, this.designTarget.click(function () {
  1082. _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.event.trigger(e.getPrintElementSelectEventKey(), {
  1083. printElement: e
  1084. });
  1085. }), this.designTarget;
  1086. }, BasePrintElement.prototype.getPrintElementSelectEventKey = function () {
  1087. return "PrintElementSelectEventKey_" + this.templateId;
  1088. }, BasePrintElement.prototype.design = function (t, e) {
  1089. var n = this;
  1090. this.designTarget.hidraggable({
  1091. axis: n.options.axis && t && t.axisEnabled ? n.options.axis : void 0,
  1092. onDrag: function onDrag(t, i, o) {
  1093. n.updateSizeAndPositionOptions(i, o), n.createLineOfPosition(e);
  1094. },
  1095. moveUnit: "pt",
  1096. minMove: _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance,
  1097. onBeforeDrag: function onBeforeDrag(t) {
  1098. _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !0, n.designTarget.focus(), n.createLineOfPosition(e);
  1099. },
  1100. onStopDrag: function onStopDrag(t) {
  1101. _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !1, n.removeLineOfPosition();
  1102. }
  1103. }), this.designTarget.hireizeable({
  1104. showPoints: n.getReizeableShowPoints(),
  1105. onBeforeResize: function onBeforeResize() {
  1106. _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !0;
  1107. },
  1108. onResize: function onResize(t, i, o, r, a) {
  1109. n.onResize(t, i, o, r, a), n.createLineOfPosition(e);
  1110. },
  1111. onStopResize: function onStopResize() {
  1112. _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !1, n.removeLineOfPosition();
  1113. }
  1114. }), this.bingCopyEvent(this.designTarget), this.bingKeyboardMoveEvent(this.designTarget, e);
  1115. }, BasePrintElement.prototype.getPrintElementEntity = function (t) {
  1116. return t ? new _entity_PrintElementEntity__WEBPACK_IMPORTED_MODULE_0__.a(void 0, this.options.getPrintElementOptionEntity(), this.printElementType.getPrintElementTypeEntity()) : new _entity_PrintElementEntity__WEBPACK_IMPORTED_MODULE_0__.a(this.printElementType.tid, this.options.getPrintElementOptionEntity());
  1117. }, BasePrintElement.prototype.submitOption = function () {
  1118. var t = this;
  1119. this.getPrintElementOptionItems().forEach(function (e) {
  1120. var n = e.getValue();
  1121. n && "object" == _typeof(n) ? Object.keys(n).forEach(function (e) {
  1122. t.options[e] = n[e];
  1123. }) : t.options[e.name] = n;
  1124. }), this.updateDesignViewFromOptions(), _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.event.trigger("hiprintTemplateDataChanged_" + this.templateId);
  1125. }, BasePrintElement.prototype.getReizeableShowPoints = function () {
  1126. return ["s", "e"];
  1127. }, BasePrintElement.prototype.onResize = function (t, e, n, i, o) {
  1128. this.updateSizeAndPositionOptions(o, i, n, e);
  1129. }, BasePrintElement.prototype.getOrderIndex = function () {
  1130. return this.options.getTop();
  1131. }, BasePrintElement.prototype.getHtml = function (t, e, n) {
  1132. var i = 0;
  1133. this.setCurrenttemplateData(e);
  1134. var o = [],
  1135. r = this.getBeginPrintTopInPaperByReferenceElement(t),
  1136. a = t.getPaperFooter(i);
  1137. this.isHeaderOrFooter() || this.isFixed() || r > a && (o.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
  1138. target: void 0,
  1139. printLine: void 0
  1140. })), r = r - a + t.paperHeader, i++, a = t.getPaperFooter(i));
  1141. var p = this.getData(e),
  1142. s = this.createTarget(this.getTitle(), p, n);
  1143. return this.updateTargetSize(s), this.css(s, p), s.css("position", "absolute"), s.css("left", this.options.displayLeft()), s.css("top", r + "pt"), o.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
  1144. target: s,
  1145. printLine: r + this.options.getHeight()
  1146. })), o;
  1147. }, BasePrintElement.prototype.getHtml2 = function (t, e, n) {
  1148. var i = 0;
  1149. this.setCurrenttemplateData(e);
  1150. var o = [],
  1151. r = this.getBeginPrintTopInPaperByReferenceElement(t),
  1152. a = t.getPaperFooter(i);
  1153. this.isHeaderOrFooter() || this.isFixed() || (r > a && (o.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
  1154. target: void 0,
  1155. printLine: void 0
  1156. })), r = r - a + t.paperHeader, i++, a = t.getPaperFooter(i)), r <= a && r + this.options.getHeight() > a && (o.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
  1157. target: void 0,
  1158. printLine: void 0
  1159. })), r = t.paperHeader, i++, a = t.getPaperFooter(i)));
  1160. var p = this.getData(e),
  1161. s = this.createTarget(this.getTitle(), p);
  1162. return this.updateTargetSize(s), this.css(s, p), s.css("position", "absolute"), s.css("left", this.options.displayLeft()), s.css("top", r + "pt"), o.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
  1163. target: s,
  1164. printLine: r + this.options.getHeight(),
  1165. referenceElement: new _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_5__.a({
  1166. top: this.options.getTop(),
  1167. left: this.options.getLeft(),
  1168. height: this.options.getHeight(),
  1169. width: this.options.getWidth(),
  1170. beginPrintPaperIndex: t.index,
  1171. bottomInLastPaper: r + this.options.getHeight(),
  1172. printTopInPaper: r
  1173. })
  1174. })), o;
  1175. }, BasePrintElement.prototype.getBeginPrintTopInPaperByReferenceElement = function (t) {
  1176. var e = this.options.getTop();
  1177. return this.isHeaderOrFooter() || this.isFixed() ? e : t.referenceElement.isPositionLeftOrRight(e) ? t.referenceElement.printTopInPaper + (e - t.referenceElement.top) : t.referenceElement.bottomInLastPaper + (e - (t.referenceElement.top + t.referenceElement.height));
  1178. }, BasePrintElement.prototype.css = function (t, e) {
  1179. var n = this,
  1180. i = [],
  1181. o = this.getConfigOptions();
  1182. if (o) {
  1183. var r = o.supportOptions;
  1184. r && r.forEach(function (e) {
  1185. var o = _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__.a.getItem(e.name);
  1186. if (o && o.css) {
  1187. var r = o.css(t, n.options.getValueFromOptionsOrDefault(e.name));
  1188. r && i.push(r);
  1189. }
  1190. });
  1191. }
  1192. this.stylerCss(t, e);
  1193. }, BasePrintElement.prototype.stylerCss = function (t, e) {
  1194. var n = this.getStyler();
  1195. if (n) {
  1196. var i = n(e, this.options, t, this._currenttemplateData);
  1197. if (i) Object.keys(i).forEach(function (e) {
  1198. t.css(e, i[e]);
  1199. });
  1200. }
  1201. }, BasePrintElement.prototype.getData = function (t) {
  1202. return t ? t[this.getField()] || "" : this.printElementType.getData();
  1203. }, BasePrintElement.prototype.getPrintElementOptionItems = function () {
  1204. if (this._printElementOptionItems) return this._printElementOptionItems;
  1205. var t = [],
  1206. e = this.getConfigOptions();
  1207. if (e) {
  1208. var n = e.supportOptions;
  1209. n && n.filter(function (t) {
  1210. return !t.hidden;
  1211. }).forEach(function (e) {
  1212. var n = _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__.a.getItem(e.name);
  1213. t.push(n);
  1214. });
  1215. }
  1216. return this._printElementOptionItems = this.filterOptionItems(t.concat()), this._printElementOptionItems;
  1217. }, BasePrintElement.prototype.getPrintElementOptionItemsByName = function (t) {
  1218. var e = [],
  1219. n = this.getConfigOptionsByName(t);
  1220. if (n) {
  1221. var i = n.supportOptions;
  1222. i && i.filter(function (t) {
  1223. return !t.hidden;
  1224. }).forEach(function (t) {
  1225. var n = _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__.a.getItem(t.name);
  1226. e.push(n);
  1227. });
  1228. }
  1229. return e.concat();
  1230. }, BasePrintElement.prototype.filterOptionItems = function (t) {
  1231. return this.printElementType.field ? t.filter(function (t) {
  1232. return "field" != t.name;
  1233. }) : t;
  1234. }, BasePrintElement.prototype.createTempContainer = function () {
  1235. this.removeTempContainer(), $("body").append($('<div class="hiprint_temp_Container hiprint-printPaper" style="overflow:hidden;height: 0px;box-sizing: border-box;"></div>'));
  1236. }, BasePrintElement.prototype.removeTempContainer = function () {
  1237. $(".hiprint_temp_Container").remove();
  1238. }, BasePrintElement.prototype.getTempContainer = function () {
  1239. return $(".hiprint_temp_Container");
  1240. }, BasePrintElement.prototype.isHeaderOrFooter = function () {
  1241. return this.options.getTopInDesign() < this.panel.paperHeader || this.options.getTopInDesign() >= this.panel.paperFooter;
  1242. }, BasePrintElement.prototype.delete = function () {
  1243. this.designTarget && this.designTarget.remove();
  1244. }, BasePrintElement.prototype.setCurrenttemplateData = function (t) {
  1245. this._currenttemplateData = t;
  1246. }, BasePrintElement.prototype.isFixed = function () {
  1247. return this.options.fixed;
  1248. }, BasePrintElement.prototype.onRendered = function (t, e) {
  1249. this.printElementType && this.printElementType.onRendered && this.printElementType.onRendered(e, this.options, t.getTarget());
  1250. }, BasePrintElement.prototype.createLineOfPosition = function (t) {
  1251. var e = $(".toplineOfPosition" + this.id),
  1252. n = $(".leftlineOfPosition" + this.id),
  1253. i = $(".rightlineOfPosition" + this.id),
  1254. o = $(".bottomlineOfPosition" + this.id);
  1255. if (e.length ? e.css("top", this.options.displayTop()) : ((e = $('<div class="toplineOfPosition' + this.id + '" style="border:0;border-top:1px dashed rgb(169, 169, 169);position: absolute; width: 100%;"></div>')).css("top", this.options.displayTop()), e.css("width", t.displayWidth()), this.designTarget.parents(".hiprint-printPaper-content").append(e)), n.length) n.css("left", this.options.displayLeft()); else {
  1256. var r = $('<div class="leftlineOfPosition' + this.id + '" style="border:0;border-left:1px dashed rgb(169, 169, 169);position: absolute;height: 100%;"></div>');
  1257. r.css("left", this.options.displayLeft()), r.css("height", t.displayHeight()), this.designTarget.parents(".hiprint-printPaper-content").append(r);
  1258. }
  1259. if (i.length) i.css("left", this.options.getLeft() + this.options.getWidth() + "pt"); else {
  1260. var a = $('<div class="rightlineOfPosition' + this.id + '" style="border:0;border-left:1px dashed rgb(169, 169, 169);position: absolute;height: 100%;"></div>');
  1261. a.css("left", this.options.getLeft() + this.options.getWidth() + "pt"), a.css("height", t.displayHeight()), this.designTarget.parents(".hiprint-printPaper-content").append(a);
  1262. }
  1263. if (o.length) o.css("top", this.options.getTop() + this.options.getHeight() + "pt"); else {
  1264. var p = $('<div class="bottomlineOfPosition' + this.id + '" style="border:0;border-top:1px dashed rgb(169, 169, 169);position: absolute;width: 100%;"></div>');
  1265. p.css("top", this.options.getTop() + this.options.getHeight() + "pt"), p.css("width", t.displayWidth()), this.designTarget.parents(".hiprint-printPaper-content").append(p);
  1266. }
  1267. }, BasePrintElement.prototype.removeLineOfPosition = function () {
  1268. $(".toplineOfPosition" + this.id).remove(), $(".leftlineOfPosition" + this.id).remove(), $(".rightlineOfPosition" + this.id).remove(), $(".bottomlineOfPosition" + this.id).remove();
  1269. }, BasePrintElement.prototype.getFields = function () {
  1270. var t = this.printElementType.getFields();
  1271. return t || (t = _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.getPrintTemplateById(this.templateId).getFields());
  1272. }, BasePrintElement.prototype.bingCopyEvent = function (t) { }, BasePrintElement.prototype.getFormatter = function () {
  1273. var formatter = void 0;
  1274. if (this.printElementType.formatter && (formatter = this.printElementType.formatter), this.options.formatter) try {
  1275. var s = "formatter=" + this.options.formatter;
  1276. eval(s);
  1277. } catch (t) {
  1278. console.log(t);
  1279. }
  1280. return formatter;
  1281. }, BasePrintElement.prototype.getStyler = function () {
  1282. var fnstyler = void 0;
  1283. if (this.printElementType.styler && (fnstyler = this.printElementType.styler), this.options.styler) try {
  1284. var s = "fnstyler=" + this.options.styler;
  1285. eval(s);
  1286. } catch (t) {
  1287. console.log(t);
  1288. }
  1289. return fnstyler;
  1290. }, BasePrintElement.prototype.bingKeyboardMoveEvent = function (t, e) {
  1291. var n = this,
  1292. i = void 0,
  1293. o = void 0;
  1294. t.attr("tabindex", "1"), t.keydown(function (r) {
  1295. switch (r.keyCode) {
  1296. case 37:
  1297. i = n.options.getLeft(), n.updateSizeAndPositionOptions(i - _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance), t.css("left", n.options.displayLeft()), n.createLineOfPosition(e), r.preventDefault();
  1298. break;
  1299. case 38:
  1300. o = n.options.getTop(), n.updateSizeAndPositionOptions(void 0, o - _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance), t.css("top", n.options.displayTop()), n.createLineOfPosition(e), r.preventDefault();
  1301. break;
  1302. case 39:
  1303. i = n.options.getLeft(), n.updateSizeAndPositionOptions(i + _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance), t.css("left", n.options.displayLeft()), n.createLineOfPosition(e), r.preventDefault();
  1304. break;
  1305. case 40:
  1306. o = n.options.getTop(), n.updateSizeAndPositionOptions(void 0, o + _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance), t.css("top", n.options.displayTop()), n.createLineOfPosition(e), r.preventDefault();
  1307. }
  1308. });
  1309. }, BasePrintElement.prototype.inRect = function (t) {
  1310. var e = this.designTarget.offset().left,
  1311. n = this.designTarget.offset().top;
  1312. return t.minX < e && t.minY < n && t.maxX > e && t.maxY > n;
  1313. }, BasePrintElement.prototype.multipleSelect = function (t) {
  1314. t ? this.designTarget.addClass("multipleSelect") : this.designTarget.removeClass("multipleSelect");
  1315. }, BasePrintElement.prototype.updatePositionByMultipleSelect = function (t, e) {
  1316. this.updateSizeAndPositionOptions(t + this.options.getLeft(), e + this.options.getTop()), this.designTarget.css("left", this.options.displayLeft()), this.designTarget.css("top", this.options.displayTop());
  1317. }, BasePrintElement;
  1318. }();
  1319. }, function (t, e, n) {
  1320. "use strict";
  1321. var i = function () {
  1322. function t() { }
  1323. return t.prototype.init = function (t) {
  1324. this.target = $('<input type="text" class="hitable-editor-text" value="" />'), t.getTarget().append(this.target), this.target.focus();
  1325. }, t.prototype.getValue = function () {
  1326. return this.target.val();
  1327. }, t.prototype.setValue = function (t) {
  1328. this.target.val(t);
  1329. }, t.prototype.destroy = function () {
  1330. this.target.remove();
  1331. }, t;
  1332. }(),
  1333. o = function () {
  1334. function t() {
  1335. this.text = new i();
  1336. }
  1337. return Object.defineProperty(t, "Instance", {
  1338. get: function get() {
  1339. return t._instance || (t._instance = new t()), t._instance;
  1340. },
  1341. enumerable: !0,
  1342. configurable: !0
  1343. }), t;
  1344. }(),
  1345. r = function () {
  1346. function t() { }
  1347. return Object.defineProperty(t, "Instance", {
  1348. get: function get() {
  1349. return o._instance || (t._instance = new t()), t._instance;
  1350. },
  1351. enumerable: !0,
  1352. configurable: !0
  1353. }), t.prototype.createEditor = function (t) {
  1354. return $.extend({}, o.Instance[t]);
  1355. }, t;
  1356. }(),
  1357. a = n(10),
  1358. p = n(14),
  1359. s = n(11),
  1360. l = function () {
  1361. function t() { }
  1362. return t.prototype.init = function (t, e) {
  1363. var n = this;
  1364. this.tableOptions = e, this.title = t.title, this.field = t.field, t.getTarget().unbind("dblclick.hitable").bind("dblclick.hitable", function () {
  1365. t.isEditing = !0, n.beginEdit(t);
  1366. });
  1367. }, t.prototype.getDisplayHtml = function () {
  1368. return this.title;
  1369. }, t.prototype.beginEdit = function (t) {
  1370. var e = this;
  1371. this.editor = r.Instance.createEditor("text"), t.getTarget().html(""), this.editor.init(t), (this.title || this.field) && (this.tableOptions.options.isEnableEditField ? this.editor.setValue((this.title || "") + "#" + (this.field || "")) : this.editor.setValue(this.title || "")), $(this.editor.target).keydown(function (n) {
  1372. 13 == n.keyCode && e.endEdit(t);
  1373. }), $(this.editor.target).blur(function (n) {
  1374. e.endEdit(t);
  1375. }), this.tableOptions.editingCell && this.tableOptions.editingCell.id != t.id && this.tableOptions.editingCell.innerElement.endEdit(this.tableOptions.editingCell), this.tableOptions.editingCell = t;
  1376. }, t.prototype.endEdit = function (t) {
  1377. var e = this.editor.getValue();
  1378. if (e) {
  1379. if (this.tableOptions.options.isEnableEditField) {
  1380. var n = e.split("#");
  1381. t.title = this.title = n[0], n.length > 0 && (t.field = this.field = n[1]);
  1382. } else t.title = this.title = e;
  1383. } else this.tableOptions.options.isEnableEditField ? (t.title = this.title = "", t.field = this.field = "") : t.title = this.title = "";
  1384. this.editor.destroy(), t.getTarget().html(this.title);
  1385. }, t;
  1386. }(),
  1387. u = function () {
  1388. return function (t) {
  1389. this.title = t.title, this.field = t.field, this.width = t.width, this.align = t.align, this.halign = t.halign, this.vAlign = t.vAlign, this.colspan = t.colspan, this.rowspan = t.rowspan, this.checked = t.checked, this.columnId = t.columnId, this.formatter2 = t.formatter2, this.styler2 = t.styler2;
  1390. };
  1391. }(),
  1392. d = function () {
  1393. function t() {
  1394. this.id = s.a.createId();
  1395. }
  1396. return t.prototype.init = function (t, e, n, i) {
  1397. this.isHead = i, this.rowId = n, this.isEditing = !1;
  1398. var o = /^[0-9]*$/;
  1399. this.target = t, this.tableOptions = e;
  1400. var r = this.target.attr("colspan");
  1401. this.colspan = o.test(r) ? parseInt(r) : 1;
  1402. var a = this.target.attr("rowspan");
  1403. this.rowspan = o.test(a) ? parseInt(a) : 1, this.initEvent(), this.isHead && this.initInnerEelement();
  1404. }, t.prototype.beginEdit = function () {
  1405. if (!this.isEditing && this.tableOptions.isEnableEdit && this.tableOptions.onBeforEdit(this)) {
  1406. var t = this.getValue();
  1407. this.editor = r.Instance.createEditor("text"), this.isEditing = !0, this.tableOptions.editingCell = this, this.target.html(""), this.editor.init(this), this.editor.setValue(t);
  1408. }
  1409. }, t.prototype.endEdit = function () {
  1410. this.isEditing = !1;
  1411. var t = this.editor.getValue();
  1412. this.editor.destroy(), this.target.html(t);
  1413. }, t.prototype.getTarget = function () {
  1414. return this.target;
  1415. }, t.prototype.getValue = function () {
  1416. return this.target.html();
  1417. }, t.prototype.setValue = function (t) { }, t.prototype.initInnerEelement = function () {
  1418. this.innerElement = new l(), this.innerElement.init(this, this.tableOptions);
  1419. }, t.prototype.initEvent = function () { }, t.prototype.isXYinCell = function (t, e) {
  1420. var n = new a.b({
  1421. x: t,
  1422. y: e,
  1423. height: 0,
  1424. width: 0
  1425. });
  1426. return this.isOverlap(n);
  1427. }, t.prototype.getTableRect = function () {
  1428. return new a.b({
  1429. x: this.target.offset().left,
  1430. y: this.target.offset().top,
  1431. height: this.target[0].offsetHeight,
  1432. width: this.target[0].offsetWidth
  1433. });
  1434. }, t.prototype.isOverlap = function (t) {
  1435. var e = this.getTableRect();
  1436. return t.x + t.width > e.x && e.x + e.width > t.x && t.y + t.height > e.y && e.y + e.height > t.y;
  1437. }, t.prototype.isInRect = function (t) {
  1438. var e = t.rect,
  1439. n = this.getTableRect();
  1440. if (e.x + e.width > n.x && n.x + n.width > e.x && e.y + e.height > n.y && n.y + n.height > e.y) {
  1441. var i = p.a.mergeRect(e, n);
  1442. return JSON.stringify(e) == JSON.stringify(i) || (t.changed = !0, t.rect = i, !0);
  1443. }
  1444. return !1;
  1445. }, t.prototype.isSelected = function () {
  1446. return this.target.hasClass("selected");
  1447. }, t.prototype.select = function () {
  1448. this.target.addClass("selected");
  1449. }, t.prototype.isHeader = function () {
  1450. return !1;
  1451. }, t.prototype.setAlign = function (t) {
  1452. this.align = t, t ? this.target.css("text-align", t) : this.target[0].style.textAlign = "";
  1453. }, t.prototype.setVAlign = function (t) {
  1454. this.vAlign = t, t ? this.target.css("vertical-align", t) : this.target[0].style.verticalAlign = "";
  1455. }, t.prototype.getEntity = function () {
  1456. return new u(this);
  1457. }, t;
  1458. }();
  1459. n.d(e, "a", function () {
  1460. return f;
  1461. });
  1462. var _c,
  1463. h = (_c = function c(t, e) {
  1464. return (_c = Object.setPrototypeOf || _instanceof({
  1465. __proto__: []
  1466. }, Array) && function (t, e) {
  1467. t.__proto__ = e;
  1468. } || function (t, e) {
  1469. for (var n in e) {
  1470. e.hasOwnProperty(n) && (t[n] = e[n]);
  1471. }
  1472. })(t, e);
  1473. }, function (t, e) {
  1474. function n() {
  1475. this.constructor = t;
  1476. }
  1477. _c(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n());
  1478. }),
  1479. f = function (t) {
  1480. function e(e) {
  1481. var n = this;
  1482. return e = e || {}, (n = t.call(this) || this).width = e.width ? parseFloat(e.width.toString()) : 100, n.title = e.title, n.descTitle = e.descTitle, n.field = e.field, n.fixed = e.fixed, n.rowspan = e.rowspan ? parseInt(e.rowspan) : 1, n.colspan = e.colspan ? parseInt(e.colspan) : 1, n.align = e.align, n.halign = e.halign, n.vAlign = e.vAlign, n.formatter = e.formatter, n.styler = e.styler, n.formatter2 = e.formatter2, n.styler2 = e.styler2, n.checkbox = e.checkbox, n.checked = 0 != e.checked, n.columnId = e.columnId || e.field, n;
  1483. }
  1484. return h(e, t), e.prototype.css = function (t) { }, e;
  1485. }(d);
  1486. }, function (t, e, n) {
  1487. "use strict";
  1488. n.d(e, "a", function () {
  1489. return i;
  1490. });
  1491. var i = function () {
  1492. return function (t) {
  1493. this.printLine = t.printLine, this.target = t.target, this.referenceElement = t.referenceElement;
  1494. };
  1495. }();
  1496. }, function (module, __webpack_exports__, __webpack_require__) {
  1497. "use strict";
  1498. __webpack_require__.d(__webpack_exports__, "a", function () {
  1499. return TableExcelHelper;
  1500. });
  1501. var _ReconsitutionTableColumns__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19),
  1502. _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0),
  1503. TableExcelHelper = function () {
  1504. function TableExcelHelper() { }
  1505. return TableExcelHelper.createTableHead = function (t, e) {
  1506. for (var n = TableExcelHelper.reconsitutionTableColumnTree(t), i = $("<thead></thead>"), o = TableExcelHelper.getColumnsWidth(n, e), r = function r(t) {
  1507. var e = $("<tr></tr>");
  1508. n[t].forEach(function (t) {
  1509. var n = $("<td></td>");
  1510. t.id && n.attr("id", t.id), t.columnId && n.attr("column-id", t.columnId), (t.align || t.halign) && n.css("text-align", t.halign || t.align), t.vAlign && n.css("vertical-align", t.vAlign), t.colspan > 1 && n.attr("colspan", t.colspan), t.rowspan > 1 && n.attr("rowspan", t.rowspan), n.html(t.title), o[t.id] ? (t.hasWidth = !0, t.targetWidth = o[t.id], n.attr("haswidth", "haswidth"), n.css("width", o[t.id] + "pt")) : t.hasWidth = !1, e.append(n);
  1511. }), i.append(e);
  1512. }, a = 0; a < n.totalLayer; a++) {
  1513. r(a);
  1514. }
  1515. return TableExcelHelper.syncTargetWidthToOption(t), i;
  1516. }, TableExcelHelper.createTableFooter = function (t, e, n, i, o, r) {
  1517. var a = $("<tfoot></tfoot>"),
  1518. p = this.getFooterFormatter(n, i);
  1519. return p && a.append(p(n, e, o, r)), a;
  1520. }, TableExcelHelper.createTableRow = function (t, e, n, i) {
  1521. var o = TableExcelHelper.reconsitutionTableColumnTree(t),
  1522. r = $("<tbody></tbody>");
  1523. (e || (e = []), i.groupFields.length) ? _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_1__.a.groupBy(e, i.groupFields, function (t) {
  1524. var e = {};
  1525. return i.groupFields.forEach(function (n) {
  1526. return e[n] = t[n];
  1527. }), e;
  1528. }).forEach(function (t) {
  1529. if (i.groupFormatter) {
  1530. var e = $("<tr><td colspan=" + o.colspan + "></td></tr>");
  1531. e.find("td").append(i.groupFormatter(t, n)), r.append(e);
  1532. }
  1533. if (t.rows.forEach(function (t) {
  1534. var e = TableExcelHelper.createRowTarget(o, t, n, i);
  1535. r.append(e);
  1536. }), i.groupFooterFormatter) {
  1537. var a = $("<tr><td colspan=" + o.colspan + "></td></tr>");
  1538. a.find("td").append(i.groupFooterFormatter(t, n)), r.append(a);
  1539. }
  1540. }) : e.forEach(function (t) {
  1541. var e = TableExcelHelper.createRowTarget(o, t, n, i);
  1542. r.append(e);
  1543. });
  1544. return r;
  1545. }, TableExcelHelper.createRowTarget = function (t, e, n, i) {
  1546. var o = $("<tr></tr>");
  1547. o.data("rowData", e), t.rowColumns.forEach(function (t, i) {
  1548. var r = $("<td></td>");
  1549. t.field && r.attr("field", t.field), t.align && r.css("text-align", t.align), t.vAlign && r.css("vertical-align", t.vAlign);
  1550. var a = TableExcelHelper.getColumnFormatter(t),
  1551. p = a ? a(e[t.field], e, i, n) : e[t.field];
  1552. r.html(p);
  1553. var s = TableExcelHelper.getColumnStyler(t);
  1554. if (s) {
  1555. var l = s(e[t.field], e, i, n);
  1556. if (l) Object.keys(l).forEach(function (t) {
  1557. r.css(t, l[t]);
  1558. });
  1559. }
  1560. o.append(r);
  1561. });
  1562. var r = TableExcelHelper.getRowStyler(n, i);
  1563. if (r) {
  1564. var a = r(e, n);
  1565. if (a) Object.keys(a).forEach(function (t) {
  1566. o.css(t, a[t]);
  1567. });
  1568. }
  1569. return o;
  1570. }, TableExcelHelper.createEmptyRowTarget = function (t) {
  1571. var e = TableExcelHelper.reconsitutionTableColumnTree(t),
  1572. n = $("<tr></tr>");
  1573. return e.rowColumns.forEach(function (t, e) {
  1574. var i = $("<td></td>");
  1575. t.field && i.attr("field", t.field), t.align && i.css("text-align", t.align), t.vAlign && i.css("vertical-align", t.vAlign), n.append(i);
  1576. }), n;
  1577. }, TableExcelHelper.getColumnsWidth = function (t, e) {
  1578. var n = {},
  1579. i = TableExcelHelper.allAutoWidth(t),
  1580. o = TableExcelHelper.allFixedWidth(t);
  1581. return t.rowColumns.forEach(function (t) {
  1582. if (t.fixed) n[t.id] = t.width; else {
  1583. var r = e - o,
  1584. a = t.width / i * (r > 0 ? r : 0);
  1585. n[t.id] = a;
  1586. }
  1587. }), n;
  1588. }, TableExcelHelper.resizeTableCellWidth = function (t, e, n) {
  1589. var i = TableExcelHelper.reconsitutionTableColumnTree(e),
  1590. o = TableExcelHelper.getColumnsWidth(i, n);
  1591. t.find("thead tr td[haswidth]").map(function (t, e) {
  1592. var n = $(e).attr("id"),
  1593. i = o[n];
  1594. $(e).css("width", i + "pt");
  1595. });
  1596. }, TableExcelHelper.allAutoWidth = function (t) {
  1597. var e = 0;
  1598. return t.rowColumns.forEach(function (t) {
  1599. e += t.fixed ? 0 : t.width;
  1600. }), e;
  1601. }, TableExcelHelper.allFixedWidth = function (t) {
  1602. var e = 0;
  1603. return t.rowColumns.forEach(function (t) {
  1604. e += t.fixed ? t.width : 0;
  1605. }), e;
  1606. }, TableExcelHelper.reconsitutionTableColumnTree = function (t, e, n) {
  1607. var i = e || new _ReconsitutionTableColumns__WEBPACK_IMPORTED_MODULE_0__.a();
  1608. i.colspan = 0;
  1609. for (var o = function o(e) {
  1610. i.totalLayer = e + 1, i[e] = t[e].columns, 0 == e && t[e].columns.forEach(function (t) {
  1611. 0 == e && (i.colspan += t.colspan);
  1612. });
  1613. }, r = 0; r < t.length; r++) {
  1614. o(r);
  1615. }
  1616. return i.rowColumns = TableExcelHelper.getOrderdColumns(i), i;
  1617. }, TableExcelHelper.syncTargetWidthToOption = function (t) {
  1618. t.forEach(function (t) {
  1619. t.columns.forEach(function (t) {
  1620. t.hasWidth && (t.width = t.targetWidth);
  1621. });
  1622. });
  1623. }, TableExcelHelper.getFooterFormatter = function (options, tablePrintElementType) {
  1624. var footerFormatter = void 0;
  1625. if (tablePrintElementType.footerFormatter && (footerFormatter = tablePrintElementType.footerFormatter), options.footerFormatter) try {
  1626. var s = "footerFormatter=" + options.footerFormatter;
  1627. eval(s);
  1628. } catch (t) {
  1629. console.log(t);
  1630. }
  1631. return footerFormatter;
  1632. }, TableExcelHelper.getRowStyler = function (options, tablePrintElementType) {
  1633. var rowStyler = void 0;
  1634. if (tablePrintElementType.rowStyler && (rowStyler = tablePrintElementType.rowStyler), options.rowStyler) try {
  1635. var s = "rowStyler=" + options.rowStyler;
  1636. eval(s);
  1637. } catch (t) {
  1638. console.log(t);
  1639. }
  1640. return rowStyler;
  1641. }, TableExcelHelper.getColumnStyler = function (column) {
  1642. var styler = void 0;
  1643. if (column.styler && (styler = column.styler), column.styler2) try {
  1644. var s = "styler=" + column.styler2;
  1645. eval(s);
  1646. } catch (t) {
  1647. console.log(t);
  1648. }
  1649. return styler;
  1650. }, TableExcelHelper.getColumnFormatter = function (column) {
  1651. var formatter = void 0;
  1652. if (column.formatter && (formatter = column.formatter), column.formatter2) try {
  1653. var s = "formatter=" + column.formatter2;
  1654. eval(s);
  1655. } catch (t) {
  1656. console.log(t);
  1657. }
  1658. return formatter;
  1659. }, TableExcelHelper.getOrderdColumns = function (t) {
  1660. for (var e = {}, n = function n(_n2) {
  1661. t[_n2].forEach(function (t) {
  1662. for (var i = 0; i < t.rowspan; i++) {
  1663. e[_n2 + i] = e[_n2 + i] ? e[_n2 + i] : [], e[_n2 + i].push(t);
  1664. }
  1665. });
  1666. }, i = 0; i < t.totalLayer; i++) {
  1667. n(i);
  1668. }
  1669. return e[t.totalLayer - 1];
  1670. }, TableExcelHelper;
  1671. }();
  1672. }, function (t, e, n) {
  1673. "use strict";
  1674. n.d(e, "a", function () {
  1675. return i;
  1676. });
  1677. var i = function () {
  1678. function t(t) {
  1679. this.top = t.top, this.left = t.left, this.height = t.height, this.width = t.width, this.bottomInLastPaper = t.bottomInLastPaper, this.beginPrintPaperIndex = t.beginPrintPaperIndex, this.printTopInPaper = t.printTopInPaper, this.endPrintPaperIndex = t.endPrintPaperIndex;
  1680. }
  1681. return t.prototype.isPositionLeftOrRight = function (t) {
  1682. return this.top <= t && this.top + this.height > t;
  1683. }, t;
  1684. }();
  1685. }, function (t, e, n) {
  1686. "use strict";
  1687. var i = function () {
  1688. function t() {
  1689. this.name = "lineHeight";
  1690. }
  1691. return t.prototype.css = function (t, e) {
  1692. if (t && t.length) {
  1693. if (e) return t.css("line-height", e + "pt"), "line-height:" + e + "pt";
  1694. t[0].style.lineHeight = "";
  1695. }
  1696. return null;
  1697. }, t.prototype.createTarget = function () {
  1698. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 字体行高\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n <option value="22.5" >22.5pt</option>\n <option value="23.25" >23.25pt</option>\n <option value="24" >24pt</option>\n <option value="24.75" >24.75pt</option>\n <option value="25.5" >25.5pt</option>\n <option value="26.25" >26.25pt</option>\n <option value="27" >27pt</option>\n <option value="27.75" >27.75pt</option>\n <option value="28.5" >28.5pt</option>\n <option value="29.25" >29.25pt</option>\n <option value="30" >30pt</option>\n <option value="30.75" >30.75pt</option>\n <option value="31.5" >31.5pt</option>\n <option value="32.25" >32.25pt</option>\n <option value="33" >33pt</option>\n <option value="33.75" >33.75pt</option>\n <option value="34.5" >34.5pt</option>\n <option value="35.25" >35.25pt</option>\n <option value="36" >36pt</option>\n </select>\n </div>\n </div>'), this.target;
  1699. }, t.prototype.getValue = function () {
  1700. var t = this.target.find("select").val();
  1701. if (t) return parseFloat(t.toString());
  1702. }, t.prototype.setValue = function (t) {
  1703. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  1704. this.target.find("select").val(t);
  1705. }, t.prototype.destroy = function () {
  1706. this.target.remove();
  1707. }, t;
  1708. }(),
  1709. o = function () {
  1710. function t() {
  1711. this.name = "fontFamily";
  1712. }
  1713. return t.prototype.createTarget = function () {
  1714. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 字体\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="SimSun" >宋体</option>\n <option value="Microsoft YaHei" >微软雅黑</option>\n </select>\n </div>\n </div>'), this.target;
  1715. }, t.prototype.css = function (t, e) {
  1716. if (t && t.length) {
  1717. if (e) return t.css("font-family", e), "font-family:" + e;
  1718. t[0].style.fontFamily = "";
  1719. }
  1720. return null;
  1721. }, t.prototype.getValue = function () {
  1722. var t = this.target.find("select").val();
  1723. if (t) return t.toString();
  1724. }, t.prototype.setValue = function (t) {
  1725. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  1726. this.target.find("select").val(t);
  1727. }, t.prototype.destroy = function () {
  1728. this.target.remove();
  1729. }, t;
  1730. }(),
  1731. r = function () {
  1732. function t() {
  1733. this.name = "fontSize";
  1734. }
  1735. return t.prototype.css = function (t, e) {
  1736. if (t && t.length) {
  1737. if (e) return t.css("font-size", e + "pt"), "font-size:" + e + "pt";
  1738. t[0].style.fontSize = "";
  1739. }
  1740. return null;
  1741. }, t.prototype.createTarget = function () {
  1742. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 字体大小\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n </select>\n </div>\n </div>'), this.target;
  1743. }, t.prototype.getValue = function () {
  1744. var t = this.target.find("select").val();
  1745. if (t) return parseFloat(t.toString());
  1746. }, t.prototype.setValue = function (t) {
  1747. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  1748. this.target.find("select").val(t);
  1749. }, t.prototype.destroy = function () {
  1750. this.target.remove();
  1751. }, t;
  1752. }(),
  1753. a = function () {
  1754. function t() {
  1755. this.name = "fontWeight";
  1756. }
  1757. return t.prototype.css = function (t, e) {
  1758. if (t && t.length) {
  1759. if (e) return t.css("font-weight", e), "font-weight:" + e;
  1760. t[0].style.fontWeight = "";
  1761. }
  1762. return null;
  1763. }, t.prototype.createTarget = function () {
  1764. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 字体粗细\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="lighter" >更细</option>\n <option value="bold" >粗体</option>\n <option value="bolder" >粗体+</option>\n <option value="100" >100</option>\n <option value="200" >200</option>\n <option value="300" >300</option>\n <option value="400" >400</option>\n <option value="500" >500</option>\n <option value="600" >600</option>\n <option value="700" >700</option>\n <option value="800" >800</option>\n <option value="900" >900</option>\n </select>\n </div>\n </div>'), this.target;
  1765. }, t.prototype.getValue = function () {
  1766. var t = this.target.find("select").val();
  1767. if (t) return t.toString();
  1768. }, t.prototype.setValue = function (t) {
  1769. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  1770. this.target.find("select").val(t);
  1771. }, t.prototype.destroy = function () {
  1772. this.target.remove();
  1773. }, t;
  1774. }(),
  1775. p = function () {
  1776. function t() {
  1777. this.name = "letterSpacing";
  1778. }
  1779. return t.prototype.css = function (t, e) {
  1780. if (t && t.length) {
  1781. if (e) return t.css("letter-spacing", e + "pt"), "letter-spacing:" + e + "pt";
  1782. t[0].style.letterSpacing = "";
  1783. }
  1784. return null;
  1785. }, t.prototype.createTarget = function () {
  1786. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 字间距\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="0.75" >0.75pt</option>\n <option value="1.5" >1.5pt</option>\n <option value="2.25" >2.25pt</option>\n <option value="3" >3pt</option>\n <option value="3.75" >3.75pt</option>\n <option value="4.5" >4.5pt</option>\n <option value="5.25" >5.25pt</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n </select>\n </div>\n </div>'), this.target;
  1787. }, t.prototype.getValue = function () {
  1788. var t = this.target.find("select").val();
  1789. if (t) return parseFloat(t.toString());
  1790. }, t.prototype.setValue = function (t) {
  1791. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  1792. this.target.find("select").val(t);
  1793. }, t.prototype.destroy = function () {
  1794. this.target.remove();
  1795. }, t;
  1796. }(),
  1797. s = function () {
  1798. function t() {
  1799. this.name = "textAlign";
  1800. }
  1801. return t.prototype.css = function (t, e) {
  1802. if (t && t.length) {
  1803. if (e) return t.css("text-align", e), "justify" == e ? (t.css("text-align-last", "justify"), t.css("text-justify", "distribute-all-lines")) : (t[0].style.textAlignLast = "", t[0].style.textJustify = ""), "text-align:" + e;
  1804. t[0].style.textAlign = "", t[0].style.textAlignLast = "", t[0].style.textJustify = "";
  1805. }
  1806. return null;
  1807. }, t.prototype.createTarget = function () {
  1808. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 左右对齐\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="" >居左</option>\n <option value="center" >居中</option>\n <option value="right" >居右</option>\n <option value="justify" >两端对齐</option>\n </select>\n </div>\n </div>'), this.target;
  1809. }, t.prototype.getValue = function () {
  1810. var t = this.target.find("select").val();
  1811. if (t) return t.toString();
  1812. }, t.prototype.setValue = function (t) {
  1813. this.target.find("select").val(t);
  1814. }, t.prototype.destroy = function () {
  1815. this.target.remove();
  1816. }, t;
  1817. }(),
  1818. l = function () {
  1819. function t() {
  1820. this.name = "hideTitle";
  1821. }
  1822. return t.prototype.createTarget = function () {
  1823. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 标题显示隐藏\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="false" >显示</option>\n <option value="true" >隐藏</option>\n </select>\n </div>\n </div>'), this.target;
  1824. }, t.prototype.getValue = function () {
  1825. if ("true" == this.target.find("select").val()) return !0;
  1826. }, t.prototype.setValue = function (t) {
  1827. this.target.find("select").val((null == t ? "" : t).toString());
  1828. }, t.prototype.destroy = function () {
  1829. this.target.remove();
  1830. }, t;
  1831. }(),
  1832. u = function () {
  1833. function t() {
  1834. this.name = "tableBorder";
  1835. }
  1836. return t.prototype.css = function (t, e) {
  1837. if (t.find("table").length) {
  1838. if ("border" == e) return t.find("table").css("border", "1px solid"), "border:1px solid";
  1839. "noBorder" == e ? t.find("table").css("border", "0px solid") : t.find("table")[0].style.border = "";
  1840. }
  1841. return null;
  1842. }, t.prototype.createTarget = function () {
  1843. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表格边框\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="border" >有边框</option>\n <option value="noBorder" >无边框</option>\n </select>\n </div>\n </div>'), this.target;
  1844. }, t.prototype.getValue = function () {
  1845. var t = this.target.find("select").val();
  1846. if (t) return t.toString();
  1847. }, t.prototype.setValue = function (t) {
  1848. this.target.find("select").val(t);
  1849. }, t.prototype.destroy = function () {
  1850. this.target.remove();
  1851. }, t;
  1852. }(),
  1853. d = function () {
  1854. function t() {
  1855. this.name = "tableHeaderBorder";
  1856. }
  1857. return t.prototype.css = function (t, e) {
  1858. if (t.find("thead tr").length) {
  1859. if ("border" == e) return t.find("thead tr").css("border", "1px solid"), "border:1pt solid";
  1860. "noBorder" == e ? t.find("thead tr").css("border", "0px solid") : "topBorder" == e ? (t.find("thead tr").css("border", "0px solid"), t.find("thead tr").css("border-top", "1px solid")) : "bottomBorder" == e ? (t.find("thead tr").css("border", "0px solid"), t.find("thead tr").css("border-bottom", "1px solid")) : "topBottomBorder" == e ? (t.find("thead tr").css("border", "0px solid"), t.find("thead tr").css("border-top", "1px solid"), t.find("thead tr").css("border-bottom", "1px solid")) : t.find("thead tr").map(function (t, e) {
  1861. e.style.border = "";
  1862. });
  1863. }
  1864. return null;
  1865. }, t.prototype.createTarget = function () {
  1866. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表头边框\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option> \n <option value="border" >有边框</option>\n <option value="noBorder" >无边框</option>\n <option value="topBorder" >上边框</option>\n <option value="bottomBorder" >下边框</option>\n <option value="topBottomBorder" >上下边框</option>\n </select>\n </div>\n </div>'), this.target;
  1867. }, t.prototype.getValue = function () {
  1868. var t = this.target.find("select").val();
  1869. if (t) return t.toString();
  1870. }, t.prototype.setValue = function (t) {
  1871. this.target.find("select").val(t);
  1872. }, t.prototype.destroy = function () {
  1873. this.target.remove();
  1874. }, t;
  1875. }(),
  1876. c = function () {
  1877. function t() {
  1878. this.name = "tableHeaderCellBorder";
  1879. }
  1880. return t.prototype.css = function (t, e) {
  1881. if (t.find("thead tr td").length) {
  1882. if ("border" == e) return t.find("thead tr td").css("border", "1px solid"), "border:1px solid";
  1883. "noBorder" == e ? t.find("thead tr td").css("border", "0px solid") : t.find("thead tr td").map(function (t, e) {
  1884. e.style.border = "";
  1885. });
  1886. }
  1887. return null;
  1888. }, t.prototype.createTarget = function () {
  1889. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表头单元格边框\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option> \n <option value="border" >有边框</option>\n <option value="noBorder" >无边框</option>\n \n </select>\n </div>\n </div>'), this.target;
  1890. }, t.prototype.getValue = function () {
  1891. var t = this.target.find("select").val();
  1892. if (t) return t.toString();
  1893. }, t.prototype.setValue = function (t) {
  1894. this.target.find("select").val(t);
  1895. }, t.prototype.destroy = function () {
  1896. this.target.remove();
  1897. }, t;
  1898. }(),
  1899. h = function () {
  1900. function t() {
  1901. this.name = "tableHeaderRowHeight";
  1902. }
  1903. return t.prototype.css = function (t, e) {
  1904. if (t.find("thead tr td").length) {
  1905. if (e) return t.find("thead tr td:not([rowspan])").css("height", e + "pt"), "height:" + e + "pt";
  1906. t.find("thead tr td").map(function (t, e) {
  1907. e.style.height = "";
  1908. });
  1909. }
  1910. return null;
  1911. }, t.prototype.createTarget = function () {
  1912. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表头行高\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n \n <option value="" >默认</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n <option value="22.5" >22.5pt</option>\n <option value="23.25" >23.25pt</option>\n <option value="24" >24pt</option>\n <option value="24.75" >24.75pt</option>\n <option value="25.5" >25.5pt</option>\n <option value="26.25" >26.25pt</option>\n <option value="27" >27pt</option>\n <option value="27.75" >27.75pt</option>\n <option value="28.5" >28.5pt</option>\n <option value="29.25" >29.25pt</option>\n <option value="30" >30pt</option>\n <option value="30.75" >30.75pt</option>\n <option value="31.5" >31.5pt</option>\n <option value="32.25" >32.25pt</option>\n <option value="33" >33pt</option>\n <option value="33.75" >33.75pt</option>\n <option value="34.5" >34.5pt</option>\n <option value="35.25" >35.25pt</option>\n <option value="36" >36pt</option>\n </select>\n </div>\n </div>'), this.target;
  1913. }, t.prototype.getValue = function () {
  1914. var t = this.target.find("select").val();
  1915. if (t) return parseFloat(t.toString());
  1916. }, t.prototype.setValue = function (t) {
  1917. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  1918. this.target.find("select").val(t);
  1919. }, t.prototype.destroy = function () {
  1920. this.target.remove();
  1921. }, t;
  1922. }(),
  1923. f = function () {
  1924. function t() {
  1925. this.name = "tableHeaderFontSize";
  1926. }
  1927. return t.prototype.css = function (t, e) {
  1928. if (t.find("thead").length) {
  1929. if (e) return t.find("thead").css("font-size", e + "pt"), "font-size:" + e + "pt";
  1930. t.find("thead").map(function (t, e) {
  1931. e.style.fontSize = "";
  1932. });
  1933. }
  1934. return null;
  1935. }, t.prototype.createTarget = function () {
  1936. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表头字体大小\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n </select>\n </div>\n </div>'), this.target;
  1937. }, t.prototype.getValue = function () {
  1938. var t = this.target.find("select").val();
  1939. if (t) return parseFloat(t.toString());
  1940. }, t.prototype.setValue = function (t) {
  1941. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  1942. this.target.find("select").val(t);
  1943. }, t.prototype.destroy = function () {
  1944. this.target.remove();
  1945. }, t;
  1946. }(),
  1947. g = function () {
  1948. function t() {
  1949. this.name = "tableHeaderFontWeight";
  1950. }
  1951. return t.prototype.css = function (t, e) {
  1952. if (t.find("thead").length) {
  1953. if (e) return t.find("thead tr td").css("font-weight", e), "font-weight:" + e;
  1954. t.find("thead tr td").map(function (t, e) {
  1955. e.style.fontWeight = "";
  1956. });
  1957. }
  1958. return null;
  1959. }, t.prototype.createTarget = function () {
  1960. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表头字体粗细\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit"> \n <option value="" >默认</option>\n <option value="lighter" >更细</option>\n <option value="bold" >粗体</option>\n <option value="bolder" >粗体+</option>\n <option value="100" >100</option>\n <option value="200" >200</option>\n <option value="300" >300</option>\n <option value="400" >400</option>\n <option value="500" >500</option>\n <option value="600" >600</option>\n <option value="700" >700</option>\n <option value="800" >800</option>\n <option value="900" >900</option>\n </select>\n </div>\n </div>'), this.target;
  1961. }, t.prototype.getValue = function () {
  1962. var t = this.target.find("select").val();
  1963. if (t) return t;
  1964. }, t.prototype.setValue = function (t) {
  1965. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  1966. this.target.find("select").val(t);
  1967. }, t.prototype.destroy = function () {
  1968. this.target.remove();
  1969. }, t;
  1970. }(),
  1971. m = function () {
  1972. function t() {
  1973. this.name = "tableBodyCellBorder";
  1974. }
  1975. return t.prototype.css = function (t, e) {
  1976. if (t.find("tbody tr td").length) {
  1977. if ("border" == e) return t.find("tbody tr td").css("border", "1px solid"), "border:1px solid";
  1978. "noBorder" == e ? t.find("tbody tr td").css("border", "0px solid") : t.find("tbody tr td").map(function (t, e) {
  1979. e.style.border = "";
  1980. });
  1981. }
  1982. return null;
  1983. }, t.prototype.createTarget = function () {
  1984. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表体单元格\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="border" >有边框</option>\n <option value="noBorder" >无边框</option>\n </select>\n </div>\n </div>'), this.target;
  1985. }, t.prototype.getValue = function () {
  1986. var t = this.target.find("select").val();
  1987. if (t) return t.toString();
  1988. }, t.prototype.setValue = function (t) {
  1989. this.target.find("select").val(t);
  1990. }, t.prototype.destroy = function () {
  1991. this.target.remove();
  1992. }, t;
  1993. }(),
  1994. v = function () {
  1995. function t() {
  1996. this.name = "tableBodyRowHeight";
  1997. }
  1998. return t.prototype.css = function (t, e) {
  1999. if (t.find("tbody tr td").length) {
  2000. if (e) return t.find("tbody tr td:not([rowspan])").css("height", e + "pt"), "height:" + e + "pt";
  2001. t.find("tbody tr td").map(function (t, e) {
  2002. e.style.height = "";
  2003. });
  2004. }
  2005. return null;
  2006. }, t.prototype.createTarget = function () {
  2007. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表体行高\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n <option value="22.5" >22.5pt</option>\n <option value="23.25" >23.25pt</option>\n <option value="24" >24pt</option>\n <option value="24.75" >24.75pt</option>\n <option value="25.5" >25.5pt</option>\n <option value="26.25" >26.25pt</option>\n <option value="27" >27pt</option>\n <option value="27.75" >27.75pt</option>\n <option value="28.5" >28.5pt</option>\n <option value="29.25" >29.25pt</option>\n <option value="30" >30pt</option>\n <option value="30.75" >30.75pt</option>\n <option value="31.5" >31.5pt</option>\n <option value="32.25" >32.25pt</option>\n <option value="33" >33pt</option>\n <option value="33.75" >33.75pt</option>\n <option value="34.5" >34.5pt</option>\n <option value="35.25" >35.25pt</option>\n <option value="36" >36pt</option>\n </select>\n </div>\n </div>'), this.target;
  2008. }, t.prototype.getValue = function () {
  2009. var t = this.target.find("select").val();
  2010. if (t) return parseFloat(t.toString());
  2011. }, t.prototype.setValue = function (t) {
  2012. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2013. this.target.find("select").val(t);
  2014. }, t.prototype.destroy = function () {
  2015. this.target.remove();
  2016. }, t;
  2017. }(),
  2018. y = function () {
  2019. function t() {
  2020. this.name = "tableHeaderBackground";
  2021. }
  2022. return t.prototype.css = function (t, e) {
  2023. if (t.find("thead").length) {
  2024. if (e) return t.find("thead").css("background", e), "background:" + e;
  2025. t.find("thead").map(function (t, e) {
  2026. e.style.background = "";
  2027. });
  2028. }
  2029. return null;
  2030. }, t.prototype.createTarget = function () {
  2031. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表头背景\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" class="auto-submit" />\n </div>\n </div>'), this.target;
  2032. }, t.prototype.getValue = function () {
  2033. var t = this.target.find("input").val();
  2034. if (t) return t.toString();
  2035. }, t.prototype.setValue = function (t) {
  2036. this.target.find("input").minicolors({
  2037. defaultValue: t || "",
  2038. theme: "bootstrap"
  2039. }), this.target.find("input").val(t);
  2040. }, t.prototype.destroy = function () {
  2041. this.target.remove();
  2042. }, t;
  2043. }(),
  2044. b = function () {
  2045. function t() {
  2046. this.name = "borderWidth";
  2047. }
  2048. return t.prototype.createTarget = function () {
  2049. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 边框大小\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="0.75" >0.75pt</option>\n <option value="1.5" >1.5pt</option>\n <option value="2.25" >2.25pt</option>\n <option value="3" >3pt</option>\n <option value="3.75" >3.75pt</option>\n <option value="4.5" >4.5pt</option>\n <option value="5.25" >5.25pt</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n </select>\n </div>\n </div>'), this.target;
  2050. }, t.prototype.css = function (t, e) {
  2051. if (t && t.length) {
  2052. if (e) return t.css("border-width", e + "pt"), "border-width:" + e + "pt";
  2053. t[0].style.borderWidth = "";
  2054. }
  2055. return null;
  2056. }, t.prototype.getValue = function () {
  2057. var t = this.target.find("select").val();
  2058. if (t) return t.toString();
  2059. }, t.prototype.setValue = function (t) {
  2060. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2061. this.target.find("select").val(t);
  2062. }, t.prototype.destroy = function () {
  2063. this.target.remove();
  2064. }, t;
  2065. }(),
  2066. E = function () {
  2067. function t() {
  2068. this.name = "barcodeMode";
  2069. }
  2070. return t.prototype.createTarget = function () {
  2071. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 条形码格式\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="CODE128A" >CODE128A</option>\n <option value="CODE128B" >CODE128B</option>\n <option value="CODE128C" >CODE128C</option>\n <option value="CODE39" >CODE39</option>\n <option value="EAN-13" >EAN-13</option>\n <option value="EAN-8" >EAN-8</option>\n <option value="EAN-5" >EAN-5</option>\n <option value="EAN-2" >EAN-2</option>\n <option value="UPC(A)" >UPC(A)</option>\n <option value="ITF" >ITF</option>\n <option value="ITF-14" >ITF-14</option>\n <option value="MSI" >MSI</option>\n <option value="MSI10" >MSI10</option>\n <option value="MSI11" >MSI11</option>\n <option value="MSI1010" >MSI1010</option>\n <option value="MSI1110" >MSI1110</option>\n <option value="Pharmacode" >Pharmacode</option>\n </select>\n </div>\n </div>'), this.target;
  2072. }, t.prototype.getValue = function () {
  2073. var t = this.target.find("select").val();
  2074. return t || void 0;
  2075. }, t.prototype.setValue = function (t) {
  2076. this.target.find("select").val(t);
  2077. }, t.prototype.destroy = function () {
  2078. this.target.remove();
  2079. }, t;
  2080. }(),
  2081. T = function () {
  2082. function t() {
  2083. this.name = "color";
  2084. }
  2085. return t.prototype.css = function (t, e) {
  2086. if (t && t.length) {
  2087. if (e) return t.css("color", e), "color:" + e;
  2088. t[0].style.color = "";
  2089. }
  2090. return null;
  2091. }, t.prototype.createTarget = function () {
  2092. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 字体颜色\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" class="auto-submit"/>\n </div>\n </div>'), this.target;
  2093. }, t.prototype.getValue = function () {
  2094. var t = this.target.find("input").val();
  2095. if (t) return t.toString();
  2096. }, t.prototype.setValue = function (t) {
  2097. this.target.find("input").minicolors({
  2098. defaultValue: t || "",
  2099. theme: "bootstrap"
  2100. }), this.target.find("input").val(t);
  2101. }, t.prototype.destroy = function () {
  2102. this.target.remove();
  2103. }, t;
  2104. }(),
  2105. P = function () {
  2106. function t() {
  2107. this.name = "textDecoration";
  2108. }
  2109. return t.prototype.createTarget = function () {
  2110. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 文本修饰\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="underline" >下划线。</option>\n <option value="overline" >上划线</option>\n <option value="line-through" >穿梭线</option>\n \n </select>\n </div>\n </div>'), this.target;
  2111. }, t.prototype.css = function (t, e) {
  2112. if (t && t.length) {
  2113. if (e) return t.css("text-decoration", e), "text-decoration:" + e;
  2114. t[0].style.textDecoration = "";
  2115. }
  2116. return null;
  2117. }, t.prototype.getValue = function () {
  2118. var t = this.target.find("select").val();
  2119. if (t) return t.toString();
  2120. }, t.prototype.setValue = function (t) {
  2121. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2122. this.target.find("select").val(t);
  2123. }, t.prototype.destroy = function () {
  2124. this.target.remove();
  2125. }, t;
  2126. }(),
  2127. _ = function () {
  2128. function t() {
  2129. this.name = "field";
  2130. }
  2131. return t.prototype.createTarget = function (t) {
  2132. var e = void 0;
  2133. if (t && (e = t.getFields()), e) {
  2134. this.isSelect = !0;
  2135. var n = ' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 字段名\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >请选择字段</option>';
  2136. e.forEach(function (t, e) {
  2137. n += ' <option value="' + (t.field || "") + '" >' + (t.text || "") + "</option>";
  2138. }), n += " </select>\n </div>\n </div>", this.target = $(n);
  2139. } else {
  2140. this.isSelect = !1;
  2141. this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 字段名\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="请输入字段名" class="auto-submit">\n </div>\n </div>');
  2142. }
  2143. return this.target;
  2144. }, t.prototype.getValue = function () {
  2145. return (this.isSelect ? this.target.find("select").val() : this.target.find("input").val()) || void 0;
  2146. }, t.prototype.setValue = function (t) {
  2147. this.isSelect ? t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"), this.target.find("select").val(t)) : this.target.find("input").val(t);
  2148. }, t.prototype.destroy = function () {
  2149. this.target.remove();
  2150. }, t;
  2151. }(),
  2152. w = function () {
  2153. function t() {
  2154. this.name = "title";
  2155. }
  2156. return t.prototype.createTarget = function () {
  2157. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 标题\n </div>\n <div class="hiprint-option-item-field">\n <textarea style="height:50px;" placeholder="请输入标题" class="auto-submit"></textarea>\n </div>\n </div>'), this.target;
  2158. }, t.prototype.getValue = function () {
  2159. var t = this.target.find("textarea").val();
  2160. if (t) return t;
  2161. }, t.prototype.setValue = function (t) {
  2162. this.target.find("textarea").val(t);
  2163. }, t.prototype.destroy = function () {
  2164. this.target.remove();
  2165. }, t;
  2166. }(),
  2167. x = function () {
  2168. function t() {
  2169. this.name = "testData";
  2170. }
  2171. return t.prototype.createTarget = function () {
  2172. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 测试数据\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="仅字段名称存在时有效" class="auto-submit" >\n </div>\n </div>'), this.target;
  2173. }, t.prototype.getValue = function () {
  2174. var t = this.target.find("input").val();
  2175. if (t) return t.toString();
  2176. }, t.prototype.setValue = function (t) {
  2177. this.target.find("input").val(t);
  2178. }, t.prototype.destroy = function () {
  2179. this.target.remove();
  2180. }, t;
  2181. }(),
  2182. C = function () {
  2183. function t() {
  2184. this.name = "src";
  2185. }
  2186. return t.prototype.createTarget = function () {
  2187. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 图片地址\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="请输入图片地址" class="auto-submit">\n </div>\n </div>'), this.target;
  2188. }, t.prototype.getValue = function () {
  2189. var t = this.target.find("input").val();
  2190. if (t) return t.toString();
  2191. }, t.prototype.setValue = function (t) {
  2192. this.target.find("input").val(t);
  2193. }, t.prototype.destroy = function () {
  2194. this.target.remove();
  2195. }, t;
  2196. }(),
  2197. O = function () {
  2198. function t() {
  2199. this.name = "borderColor";
  2200. }
  2201. return t.prototype.css = function (t, e) {
  2202. if (t && t.length) {
  2203. if (e) return t.css("border-color", e), "border-color:" + e;
  2204. t[0].style.borderColor = "";
  2205. }
  2206. return null;
  2207. }, t.prototype.createTarget = function () {
  2208. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 边框颜色\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" class="auto-submit" />\n </div>\n </div>'), this.target;
  2209. }, t.prototype.getValue = function () {
  2210. var t = this.target.find("input").val();
  2211. if (t) return t.toString();
  2212. }, t.prototype.setValue = function (t) {
  2213. this.target.find("input").minicolors({
  2214. defaultValue: t || "",
  2215. theme: "bootstrap"
  2216. }), this.target.find("input").val(t);
  2217. }, t.prototype.destroy = function () {
  2218. this.target.remove();
  2219. }, t;
  2220. }(),
  2221. H = function () {
  2222. function t() {
  2223. this.name = "paperNumberFormat";
  2224. }
  2225. return t.prototype.createTarget = function () {
  2226. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 页码格式\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="paperNo-paperCount" class="auto-submit">\n </div>\n </div>'), this.target;
  2227. }, t.prototype.getValue = function () {
  2228. var t = this.target.find("input").val();
  2229. if (t) return t.toString();
  2230. }, t.prototype.setValue = function (t) {
  2231. this.target.find("input").val(t);
  2232. }, t.prototype.destroy = function () {
  2233. this.target.remove();
  2234. }, t;
  2235. }(),
  2236. D = function () {
  2237. function t() {
  2238. this.name = "paperNumberDisabled";
  2239. }
  2240. return t.prototype.createTarget = function () {
  2241. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 启用/禁用\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="false" >启用</option>\n <option value="true" >禁用</option>\n </select>\n </div>\n </div>'), this.target;
  2242. }, t.prototype.getValue = function () {
  2243. if ("true" == this.target.find("select").val()) return !0;
  2244. }, t.prototype.setValue = function (t) {
  2245. this.target.find("select").val(t);
  2246. }, t.prototype.destroy = function () {
  2247. this.target.remove();
  2248. }, t;
  2249. }(),
  2250. I = function () {
  2251. function t() {
  2252. this.name = "longTextIndent";
  2253. }
  2254. return t.prototype.css = function (t, e) {
  2255. return null;
  2256. }, t.prototype.createTarget = function () {
  2257. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 每行缩进\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n <option value="22.5" >22.5pt</option>\n <option value="23.25" >23.25pt</option>\n <option value="24" >24pt</option>\n <option value="24.75" >24.75pt</option>\n <option value="25.5" >25.5pt</option>\n <option value="26.25" >26.25pt</option>\n <option value="27" >27pt</option>\n <option value="27.75" >27.75pt</option>\n <option value="28.5" >28.5pt</option>\n <option value="29.25" >29.25pt</option>\n <option value="30" >30pt</option>\n <option value="30.75" >30.75pt</option>\n <option value="31.5" >31.5pt</option>\n <option value="32.25" >32.25pt</option>\n <option value="33" >33pt</option>\n <option value="33.75" >33.75pt</option>\n <option value="34.5" >34.5pt</option>\n <option value="35.25" >35.25pt</option>\n <option value="36" >36pt</option>\n </select>\n </div>\n </div>'), this.target;
  2258. }, t.prototype.getValue = function () {
  2259. var t = this.target.find("select").val();
  2260. if (t) return parseFloat(t.toString());
  2261. }, t.prototype.setValue = function (t) {
  2262. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2263. this.target.find("select").val(t);
  2264. }, t.prototype.destroy = function () {
  2265. this.target.remove();
  2266. }, t;
  2267. }(),
  2268. R = function () {
  2269. function t() {
  2270. this.name = "showInPage";
  2271. }
  2272. return t.prototype.createTarget = function () {
  2273. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 显示规则\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="first" >首页</option>\n <option value="odd" >奇数页</option>\n <option value="even" >偶数页</option>\n <option value="last" >尾页</option>\n </select>\n </div>\n </div>'), this.target;
  2274. }, t.prototype.getValue = function () {
  2275. var t = this.target.find("select").val();
  2276. if (t) return t.toString();
  2277. }, t.prototype.setValue = function (t) {
  2278. this.target.find("select").val(t);
  2279. }, t.prototype.destroy = function () {
  2280. this.target.remove();
  2281. }, t;
  2282. }(),
  2283. M = function () {
  2284. function t() {
  2285. this.name = "panelPaperRule";
  2286. }
  2287. return t.prototype.createTarget = function () {
  2288. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 打印规则\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="odd" >保持奇数</option>\n <option value="even" >保持偶数</option>\n </select>\n </div>\n </div>'), this.target;
  2289. }, t.prototype.getValue = function () {
  2290. var t = this.target.find("select").val();
  2291. if (t) return t.toString();
  2292. }, t.prototype.setValue = function (t) {
  2293. this.target.find("select").val(t);
  2294. }, t.prototype.destroy = function () {
  2295. this.target.remove();
  2296. }, t;
  2297. }(),
  2298. S = function () {
  2299. function t() {
  2300. this.name = "leftSpaceRemoved";
  2301. }
  2302. return t.prototype.createTarget = function () {
  2303. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 移除段落左侧空白\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="true" >移除</option>\n <option value="false" >不移除</option>\n </select>\n </div>\n </div>'), this.target;
  2304. }, t.prototype.getValue = function () {
  2305. if ("false" == this.target.find("select").val()) return !1;
  2306. }, t.prototype.setValue = function (t) {
  2307. this.target.find("select").val((null == t ? "" : t).toString());
  2308. }, t.prototype.destroy = function () {
  2309. this.target.remove();
  2310. }, t;
  2311. }(),
  2312. B = function () {
  2313. function t() {
  2314. this.name = "firstPaperFooter";
  2315. }
  2316. return t.prototype.createTarget = function () {
  2317. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 首页页尾\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="首页页尾" class="auto-submit">\n </div>\n </div>'), this.target;
  2318. }, t.prototype.getValue = function () {
  2319. var t = this.target.find("input").val();
  2320. if (t) return parseFloat(t.toString());
  2321. }, t.prototype.setValue = function (t) {
  2322. this.target.find("input").val(t);
  2323. }, t.prototype.destroy = function () {
  2324. this.target.remove();
  2325. }, t;
  2326. }(),
  2327. F = function () {
  2328. function t() {
  2329. this.name = "lastPaperFooter";
  2330. }
  2331. return t.prototype.createTarget = function () {
  2332. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 尾页页尾\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="尾页页尾" class="auto-submit">\n </div>\n </div>'), this.target;
  2333. }, t.prototype.getValue = function () {
  2334. var t = this.target.find("input").val();
  2335. if (t) return parseFloat(t.toString());
  2336. }, t.prototype.setValue = function (t) {
  2337. this.target.find("input").val(t);
  2338. }, t.prototype.destroy = function () {
  2339. this.target.remove();
  2340. }, t;
  2341. }(),
  2342. L = function () {
  2343. function t() {
  2344. this.name = "evenPaperFooter";
  2345. }
  2346. return t.prototype.createTarget = function () {
  2347. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 偶数页页尾\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="偶数页页尾" class="auto-submit">\n </div>\n </div>'), this.target;
  2348. }, t.prototype.getValue = function () {
  2349. var t = this.target.find("input").val();
  2350. if (t) return parseFloat(t.toString());
  2351. }, t.prototype.setValue = function (t) {
  2352. this.target.find("input").val(t);
  2353. }, t.prototype.destroy = function () {
  2354. this.target.remove();
  2355. }, t;
  2356. }(),
  2357. A = function () {
  2358. function t() {
  2359. this.name = "oddPaperFooter";
  2360. }
  2361. return t.prototype.createTarget = function () {
  2362. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 奇数页页尾\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="奇数页页尾" class="auto-submit" >\n </div>\n </div>'), this.target;
  2363. }, t.prototype.getValue = function () {
  2364. var t = this.target.find("input").val();
  2365. if (t) return parseFloat(t.toString());
  2366. }, t.prototype.setValue = function (t) {
  2367. this.target.find("input").val(t);
  2368. }, t.prototype.destroy = function () {
  2369. this.target.remove();
  2370. }, t;
  2371. }(),
  2372. z = function () {
  2373. function t() {
  2374. this.name = "fixed";
  2375. }
  2376. return t.prototype.createTarget = function () {
  2377. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 位置固定\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="false" >否</option>\n <option value="true" >是</option>\n </select>\n </div>\n </div>'), this.target;
  2378. }, t.prototype.getValue = function () {
  2379. if ("true" == this.target.find("select").val()) return !0;
  2380. }, t.prototype.setValue = function (t) {
  2381. this.target.find("select").val((null == t ? "" : t).toString());
  2382. }, t.prototype.destroy = function () {
  2383. this.target.remove();
  2384. }, t;
  2385. }(),
  2386. k = function () {
  2387. function t() {
  2388. this.name = "axis";
  2389. }
  2390. return t.prototype.createTarget = function () {
  2391. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 拖动方向\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="v" >横向</option>\n <option value="h" >竖向</option>\n </select>\n </div>\n </div>'), this.target;
  2392. }, t.prototype.getValue = function () {
  2393. var t = this.target.find("select").val();
  2394. return t || void 0;
  2395. }, t.prototype.setValue = function (t) {
  2396. this.target.find("select").val(t);
  2397. }, t.prototype.destroy = function () {
  2398. this.target.remove();
  2399. }, t;
  2400. }(),
  2401. N = function () {
  2402. function t() {
  2403. this.name = "leftOffset";
  2404. }
  2405. return t.prototype.createTarget = function () {
  2406. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 左偏移\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="偏移量pt" class="auto-submit" >\n </div>\n </div>'), this.target;
  2407. }, t.prototype.getValue = function () {
  2408. var t = this.target.find("input").val();
  2409. if (t) return parseFloat(t.toString());
  2410. }, t.prototype.setValue = function (t) {
  2411. this.target.find("input").val(t);
  2412. }, t.prototype.destroy = function () {
  2413. this.target.remove();
  2414. }, t;
  2415. }(),
  2416. V = function () {
  2417. function t() {
  2418. this.name = "lHeight";
  2419. }
  2420. return t.prototype.createTarget = function () {
  2421. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 最低高度\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="文本过短或为空时的高度" class="auto-submit">\n </div>\n </div>'), this.target;
  2422. }, t.prototype.getValue = function () {
  2423. var t = this.target.find("input").val();
  2424. if (t) return parseFloat(t.toString());
  2425. }, t.prototype.setValue = function (t) {
  2426. this.target.find("input").val(t);
  2427. }, t.prototype.destroy = function () {
  2428. this.target.remove();
  2429. }, t;
  2430. }(),
  2431. W = function () {
  2432. function t() {
  2433. this.name = "unShowInPage";
  2434. }
  2435. return t.prototype.createTarget = function () {
  2436. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 隐藏规则\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="first" >首页</option>\n <option value="last" >尾页</option>\n </select>\n </div>\n </div>'), this.target;
  2437. }, t.prototype.getValue = function () {
  2438. var t = this.target.find("select").val();
  2439. if (t) return t;
  2440. }, t.prototype.setValue = function (t) {
  2441. this.target.find("select").val(t);
  2442. }, t.prototype.destroy = function () {
  2443. this.target.remove();
  2444. }, t;
  2445. }(),
  2446. j = function () {
  2447. function t() {
  2448. this.name = "tableBodyRowBorder";
  2449. }
  2450. return t.prototype.css = function (t, e) {
  2451. if (t.find("tbody tr").length) {
  2452. if ("border" == e) return t.find("tbody tr").css("border", "1px solid"), "border:1pt solid";
  2453. "noBorder" == e ? t.find("tbody tr").css("border", "0px solid") : "topBorder" == e ? (t.find("tbody tr").css("border", "0px solid"), t.find("tbody tr").css("border-top", "1px solid")) : "bottomBorder" == e ? (t.find("tbody tr").css("border", "0px solid"), t.find("tbody tr").css("border-bottom", "1px solid")) : "topBottomBorder" == e ? (t.find("tbody tr").css("border", "0px solid"), t.find("tbody tr").css("border-top", "1px solid"), t.find("tbody tr").css("border-bottom", "1px solid")) : t.find("tbody tr").map(function (t, e) {
  2454. e.style.border = "";
  2455. });
  2456. }
  2457. return null;
  2458. }, t.prototype.createTarget = function () {
  2459. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表体行边框\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option> \n <option value="border" >有边框</option>\n <option value="noBorder" >无边框</option>\n <option value="topBorder" >上边框</option>\n <option value="bottomBorder" >下边框</option>\n <option value="topBottomBorder" >上下边框</option>\n </select>\n </div>\n </div>'), this.target;
  2460. }, t.prototype.getValue = function () {
  2461. var t = this.target.find("select").val();
  2462. if (t) return t.toString();
  2463. }, t.prototype.setValue = function (t) {
  2464. this.target.find("select").val(t);
  2465. }, t.prototype.destroy = function () {
  2466. this.target.remove();
  2467. }, t;
  2468. }(),
  2469. U = function () {
  2470. function t() {
  2471. this.name = "transform";
  2472. }
  2473. return t.prototype.css = function (t, e) {
  2474. if (t && t.length) {
  2475. var n = t.find(".hiprint-printElement-content");
  2476. if (e) return n.css("transform", "rotate(" + e + "deg)"), n.css("-ms-transform", "rotate(" + e + "deg)"), n.css("-moz-transform", "rotate(" + e + "deg)"), n.css("-webkit-transform", "rotate(" + e + "deg)"), n.css("-o-transform", "rotate(" + e + "deg)"), "transform:rotate(" + e + "deg)";
  2477. n.length && (n[0].style.transform = "");
  2478. }
  2479. return null;
  2480. }, t.prototype.createTarget = function () {
  2481. return this.target = $('<div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 旋转角度\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" class="auto-submit"/>\n </div>\n </div>'), this.target;
  2482. }, t.prototype.getValue = function () {
  2483. var t = this.target.find("input").val();
  2484. if (t) return parseFloat(t.toString());
  2485. }, t.prototype.setValue = function (t) {
  2486. this.target.find("input").val(t);
  2487. }, t.prototype.destroy = function () {
  2488. this.target.remove();
  2489. }, t;
  2490. }(),
  2491. K = function () {
  2492. function t() {
  2493. this.name = "optionsGroup";
  2494. }
  2495. return t.prototype.createTarget = function () {
  2496. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 边框设置\n </div>\n \n </div>'), this.target;
  2497. }, t.prototype.getValue = function () { }, t.prototype.setValue = function (t) { }, t.prototype.destroy = function () {
  2498. this.target.remove();
  2499. }, t;
  2500. }(),
  2501. G = function () {
  2502. function t() {
  2503. this.name = "borderTop";
  2504. }
  2505. return t.prototype.css = function (t, e) {
  2506. if (t && t.length) {
  2507. if (e) return t.css("border-top-style", e), "border-top:1px";
  2508. t[0].style.borderTopStyle = "", t[0].style.borderTopWidth = "";
  2509. }
  2510. return null;
  2511. }, t.prototype.createTarget = function () {
  2512. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 上边框\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >否</option>\n <option value="solid" >实线</option>\n <option value="dotted" >虚线</option>\n </select>\n </div>\n </div>'), this.target;
  2513. }, t.prototype.getValue = function () {
  2514. var t = this.target.find("select").val();
  2515. if (t) return t;
  2516. }, t.prototype.setValue = function (t) {
  2517. this.target.find("select").val(t);
  2518. }, t.prototype.destroy = function () {
  2519. this.target.remove();
  2520. }, t;
  2521. }(),
  2522. q = function () {
  2523. function t() {
  2524. this.name = "borderLeft";
  2525. }
  2526. return t.prototype.css = function (t, e) {
  2527. if (t && t.length) {
  2528. if (e) return t.css("border-left-style", e), "border-left:1px";
  2529. t[0].style.borderLeftStyle = "", t[0].style.borderLeftWidth = "";
  2530. }
  2531. return null;
  2532. }, t.prototype.createTarget = function () {
  2533. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 左边框\n </div>\n <div class="hiprint-option-item-field">\n <select>\n <option value="" >否</option>\n <option value="solid" >实线</option>\n <option value="dotted" >虚线</option>\n </select>\n </div>\n </div>'), this.target;
  2534. }, t.prototype.getValue = function () {
  2535. var t = this.target.find("select").val();
  2536. if (t) return t;
  2537. }, t.prototype.setValue = function (t) {
  2538. this.target.find("select").val(t);
  2539. }, t.prototype.destroy = function () {
  2540. this.target.remove();
  2541. }, t;
  2542. }(),
  2543. X = function () {
  2544. function t() {
  2545. this.name = "borderRight";
  2546. }
  2547. return t.prototype.css = function (t, e) {
  2548. if (t && t.length) {
  2549. if (e) return t.css("border-right-style", e), "border-right:1px";
  2550. t[0].style.borderRightStyle = "", t[0].style.borderRightWidth = "";
  2551. }
  2552. return null;
  2553. }, t.prototype.createTarget = function () {
  2554. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 右边框\n </div>\n <div class="hiprint-option-item-field">\n <select>\n <option value="" >否</option>\n <option value="solid" >实线</option>\n <option value="dotted" >虚线</option>\n </select>\n </div>\n </div>'), this.target;
  2555. }, t.prototype.getValue = function () {
  2556. var t = this.target.find("select").val();
  2557. if (t) return t;
  2558. }, t.prototype.setValue = function (t) {
  2559. this.target.find("select").val(t);
  2560. }, t.prototype.destroy = function () {
  2561. this.target.remove();
  2562. }, t;
  2563. }(),
  2564. Y = function () {
  2565. function t() {
  2566. this.name = "borderBottom";
  2567. }
  2568. return t.prototype.css = function (t, e) {
  2569. if (t && t.length) {
  2570. if (e) return t.css("border-bottom-style", e), "border-bottom-style:1px solid";
  2571. t[0].style.borderBottomStyle = "", t[0].style.borderBottomWidth = "";
  2572. }
  2573. return null;
  2574. }, t.prototype.createTarget = function () {
  2575. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 下边框\n </div>\n <div class="hiprint-option-item-field">\n <select>\n <option value="" >否</option>\n <option value="solid" >实线</option>\n <option value="dotted" >虚线</option>\n </select>\n </div>\n </div>'), this.target;
  2576. }, t.prototype.getValue = function () {
  2577. var t = this.target.find("select").val();
  2578. if (t) return t;
  2579. }, t.prototype.setValue = function (t) {
  2580. this.target.find("select").val(t);
  2581. }, t.prototype.destroy = function () {
  2582. this.target.remove();
  2583. }, t;
  2584. }(),
  2585. J = function () {
  2586. function t() {
  2587. this.name = "contentPaddingLeft";
  2588. }
  2589. return t.prototype.css = function (t, e) {
  2590. var n = t.find(".hiprint-printElement-content");
  2591. if (n && n.length) {
  2592. if (e) return n.css("padding-left", e + "pt"), "padding-left";
  2593. n[0].style.paddingLeft = "";
  2594. }
  2595. return null;
  2596. }, t.prototype.createTarget = function () {
  2597. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 左内边距\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="0.75" >0.75pt</option>\n <option value="1.5" >1.5pt</option>\n <option value="2.25" >2.25pt</option>\n <option value="3" >3pt</option>\n <option value="3.75" >3.75pt</option>\n <option value="4.5" >4.5pt</option>\n <option value="5.25" >5.25pt</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n </select>\n </div>\n </div>'), this.target;
  2598. }, t.prototype.getValue = function () {
  2599. var t = this.target.find("select").val();
  2600. if (t) return parseFloat(t.toString());
  2601. }, t.prototype.setValue = function (t) {
  2602. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2603. this.target.find("select").val(t);
  2604. }, t.prototype.destroy = function () {
  2605. this.target.remove();
  2606. }, t;
  2607. }(),
  2608. Q = function () {
  2609. function t() {
  2610. this.name = "contentPaddingTop";
  2611. }
  2612. return t.prototype.css = function (t, e) {
  2613. var n = t.find(".hiprint-printElement-content");
  2614. if (n && n.length) {
  2615. if (e) return n.css("padding-top", e + "pt"), "padding-top";
  2616. n[0].style.paddingTop = "";
  2617. }
  2618. return null;
  2619. }, t.prototype.createTarget = function () {
  2620. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 上内边距\n </div>\n <div class="hiprint-option-item-field">\n <select>\n <option value="" >默认</option>\n <option value="0.75" >0.75pt</option>\n <option value="1.5" >1.5pt</option>\n <option value="2.25" >2.25pt</option>\n <option value="3" >3pt</option>\n <option value="3.75" >3.75pt</option>\n <option value="4.5" >4.5pt</option>\n <option value="5.25" >5.25pt</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n </select>\n </div>\n </div>'), this.target;
  2621. }, t.prototype.getValue = function () {
  2622. var t = this.target.find("select").val();
  2623. if (t) return parseFloat(t.toString());
  2624. }, t.prototype.setValue = function (t) {
  2625. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2626. this.target.find("select").val(t);
  2627. }, t.prototype.destroy = function () {
  2628. this.target.remove();
  2629. }, t;
  2630. }(),
  2631. Z = function () {
  2632. function t() {
  2633. this.name = "contentPaddingRight";
  2634. }
  2635. return t.prototype.css = function (t, e) {
  2636. var n = t.find(".hiprint-printElement-content");
  2637. if (n && n.length) {
  2638. if (e) return n.css("padding-right", e + "pt"), "padding-right";
  2639. n[0].style.paddingRight = "";
  2640. }
  2641. return null;
  2642. }, t.prototype.createTarget = function () {
  2643. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 右内边距\n </div>\n <div class="hiprint-option-item-field">\n <select>\n <option value="" >默认</option>\n <option value="0.75" >0.75pt</option>\n <option value="1.5" >1.5pt</option>\n <option value="2.25" >2.25pt</option>\n <option value="3" >3pt</option>\n <option value="3.75" >3.75pt</option>\n <option value="4.5" >4.5pt</option>\n <option value="5.25" >5.25pt</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n </select>\n </div>\n </div>'), this.target;
  2644. }, t.prototype.getValue = function () {
  2645. var t = this.target.find("select").val();
  2646. if (t) return parseFloat(t.toString());
  2647. }, t.prototype.setValue = function (t) {
  2648. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2649. this.target.find("select").val(t);
  2650. }, t.prototype.destroy = function () {
  2651. this.target.remove();
  2652. }, t;
  2653. }(),
  2654. tt = function () {
  2655. function t() {
  2656. this.name = "contentPaddingBottom";
  2657. }
  2658. return t.prototype.css = function (t, e) {
  2659. var n = t.find(".hiprint-printElement-content");
  2660. if (n && n.length) {
  2661. if (e) return n.css("padding-bottom", e + "pt"), "padding-bottom";
  2662. n[0].style.paddingBottom = "";
  2663. }
  2664. return null;
  2665. }, t.prototype.createTarget = function () {
  2666. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 下内边距\n </div>\n <div class="hiprint-option-item-field">\n <select>\n <option value="" >默认</option>\n <option value="0.75" >0.75pt</option>\n <option value="1.5" >1.5pt</option>\n <option value="2.25" >2.25pt</option>\n <option value="3" >3pt</option>\n <option value="3.75" >3.75pt</option>\n <option value="4.5" >4.5pt</option>\n <option value="5.25" >5.25pt</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n </select>\n </div>\n </div>'), this.target;
  2667. }, t.prototype.getValue = function () {
  2668. var t = this.target.find("select").val();
  2669. if (t) return parseFloat(t.toString());
  2670. }, t.prototype.setValue = function (t) {
  2671. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2672. this.target.find("select").val(t);
  2673. }, t.prototype.destroy = function () {
  2674. this.target.remove();
  2675. }, t;
  2676. }(),
  2677. et = function () {
  2678. function t() {
  2679. this.name = "borderStyle";
  2680. }
  2681. return t.prototype.css = function (t, e) {
  2682. if (t && t.length) {
  2683. if (e) return t.css("border-style", e), "border-style:1px";
  2684. t[0].style.borderStyle = "";
  2685. }
  2686. return null;
  2687. }, t.prototype.createTarget = function () {
  2688. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 边框样式\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="solid" >实线</option>\n <option value="dotted" >虚线</option>\n </select>\n </div>\n </div>'), this.target;
  2689. }, t.prototype.getValue = function () {
  2690. var t = this.target.find("select").val();
  2691. if (t) return t;
  2692. }, t.prototype.setValue = function (t) {
  2693. this.target.find("select").val(t);
  2694. }, t.prototype.destroy = function () {
  2695. this.target.remove();
  2696. }, t;
  2697. }(),
  2698. nt = function () {
  2699. function t() {
  2700. this.name = "backgroundColor";
  2701. }
  2702. return t.prototype.css = function (t, e) {
  2703. if (t && t.length) {
  2704. if (e) return t.css("background-color", e), "background-color:" + e;
  2705. t[0].style.backgroundColor = "";
  2706. }
  2707. return null;
  2708. }, t.prototype.createTarget = function () {
  2709. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 背景颜色\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" class="auto-submit"/>\n </div>\n </div>'), this.target;
  2710. }, t.prototype.getValue = function () {
  2711. var t = this.target.find("input").val();
  2712. if (t) return t.toString();
  2713. }, t.prototype.setValue = function (t) {
  2714. this.target.find("input").minicolors({
  2715. defaultValue: t || "",
  2716. theme: "bootstrap"
  2717. }), this.target.find("input").val(t);
  2718. }, t.prototype.destroy = function () {
  2719. this.target.remove();
  2720. }, t;
  2721. }(),
  2722. it = function () {
  2723. function t() {
  2724. this.name = "orient";
  2725. }
  2726. return t.prototype.createTarget = function () {
  2727. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 纸张方向(仅自定义纸质有效)\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="1" >纵向</option>\n <option value="2" >横向</option>\n </select>\n </div>\n </div>'), this.target;
  2728. }, t.prototype.getValue = function () {
  2729. var t = this.target.find("select").val();
  2730. if (t) return parseFloat(t.toString());
  2731. }, t.prototype.setValue = function (t) {
  2732. this.target.find("select").val(t);
  2733. }, t.prototype.destroy = function () {
  2734. this.target.remove();
  2735. }, t;
  2736. }(),
  2737. ot = function () {
  2738. function t() {
  2739. this.name = "textContentVerticalAlign";
  2740. }
  2741. return t.prototype.createTarget = function () {
  2742. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 上下对齐\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="middle" >垂直居中</option>\n <option value="bottom" >底部</option>\n \n </select>\n </div>\n </div>'), this.target;
  2743. }, t.prototype.css = function (t, e) {
  2744. if (t && t.length) {
  2745. if (e) return "middle" === e && t.addClass("hiprint-text-content-middle"), "bottom" === e && t.addClass("hiprint-text-content-bottom"), "";
  2746. t.removeClass("hiprint-text-content-middle"), t.removeClass("hiprint-text-content-bottom");
  2747. }
  2748. return null;
  2749. }, t.prototype.getValue = function () {
  2750. var t = this.target.find("select").val();
  2751. if (t) return t.toString();
  2752. }, t.prototype.setValue = function (t) {
  2753. this.target.find("select").val(t);
  2754. }, t.prototype.destroy = function () {
  2755. this.target.remove();
  2756. }, t;
  2757. }(),
  2758. rt = n(5),
  2759. at = function () {
  2760. function t() {
  2761. this.name = "columns";
  2762. }
  2763. return t.prototype.createTarget = function () {
  2764. $('<div class="indicator"></div>').appendTo("body");
  2765. return " </ul>\n </div>\n </div>", this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div>\n <ul class="hiprint-option-table-selected-columns"> </ul>\n </div>\n </div>'), this.target;
  2766. }, t.prototype.getValue = function () {
  2767. return this.buildData();
  2768. }, t.prototype.setValue = function (t, e, n) {
  2769. var i = this,
  2770. o = this;
  2771. this.value = t, this.options = e, this.printElementType = n;
  2772. var r = n.columns[0].filter(function (e) {
  2773. return 0 == t[0].columns.filter(function (t) {
  2774. return e.columnId == t.columnId;
  2775. }).length;
  2776. }).map(function (t) {
  2777. var e = new rt.a(t);
  2778. return e.checked = !1, e;
  2779. });
  2780. this.allColumns = t[0].columns.concat(r), t && 1 == t.length && (this.target.find("ul").html(this.allColumns.map(function (t, e) {
  2781. return '<li class="hiprint-option-table-selected-item"> <div class="hi-pretty p-default">\n ' + (t.checked ? '<input type="checkbox" checked column-id="' + (t.columnId || "") + '" />' : '<input type="checkbox" column-id="' + (t.columnId || "") + '" />') + '\n <div class="state">\n <label></label>\n </div>\n </div><span class="column-title">' + (t.title || t.descTitle || "") + "</span></li>";
  2782. }).join("")), this.target.find("input").change(function () {
  2783. i.submit();
  2784. }), this.printElementType.columnDisplayIndexEditable && this.target.find("li").hidraggable({
  2785. revert: !0,
  2786. handle: ".column-title",
  2787. moveUnit: "pt",
  2788. deltaX: 0,
  2789. deltaY: 0
  2790. }).hidroppable({
  2791. onDragOver: function onDragOver(t, e) {
  2792. $(this).css("border-bottom-color", "red");
  2793. },
  2794. onDragLeave: function onDragLeave(t, e) {
  2795. $(this).css("border-bottom-color", "");
  2796. },
  2797. onDrop: function onDrop(t, e) {
  2798. $(e).insertAfter(this), $(this).css("border-bottom-color", ""), o.submit();
  2799. }
  2800. }));
  2801. }, t.prototype.buildData = function () {
  2802. var t = this,
  2803. e = [];
  2804. return this.allColumns.filter(function (t) {
  2805. t.checked = !1;
  2806. }), (this.printElementType.columnDisplayEditable ? this.target.find("input:checked") : this.target.find("input")).map(function (n, i) {
  2807. var o = $(i).attr("column-id"),
  2808. r = t.options.makeColumnObj();
  2809. if (r[o]) r[o].checked = !0, e.push(r[o]); else {
  2810. var a = t.printElementType.getColumnByColumnId(o);
  2811. if (a) {
  2812. var p = new rt.a(a);
  2813. p.checked = !0, e.push(p);
  2814. }
  2815. }
  2816. }), this.value[0].columns = e, this.value;
  2817. }, t.prototype.destroy = function () {
  2818. this.target.remove();
  2819. }, t;
  2820. }(),
  2821. pt = function () {
  2822. function t() {
  2823. this.name = "textType";
  2824. }
  2825. return t.prototype.createTarget = function () {
  2826. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 打印类型\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="" >文本</option>\n <option value="barcode" >条形码</option>\n <option value="qrcode" >二维码</option>\n </select>\n </div>\n </div>'), this.target;
  2827. }, t.prototype.getValue = function () {
  2828. var t = this.target.find("select").val();
  2829. if (t) return t;
  2830. }, t.prototype.setValue = function (t) {
  2831. this.target.find("select").val(t);
  2832. }, t.prototype.destroy = function () {
  2833. this.target.remove();
  2834. }, t;
  2835. }(),
  2836. st = function () {
  2837. function t() {
  2838. this.name = "topOffset";
  2839. }
  2840. return t.prototype.createTarget = function () {
  2841. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 顶部偏移\n </div>\n <div class="hiprint-option-item-field">\n <input type="text" placeholder="偏移量pt" class="auto-submit">\n </div>\n </div>'), this.target;
  2842. }, t.prototype.getValue = function () {
  2843. var t = this.target.find("input").val();
  2844. if (t) return parseFloat(t.toString());
  2845. }, t.prototype.setValue = function (t) {
  2846. this.target.find("input").val(t);
  2847. }, t.prototype.destroy = function () {
  2848. this.target.remove();
  2849. }, t;
  2850. }(),
  2851. lt = function () {
  2852. function t() {
  2853. this.name = "gridColumns";
  2854. }
  2855. return t.prototype.createTarget = function () {
  2856. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 一行多组\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="2" >一行二列</option>\n <option value="3" >一行三列</option>\n <option value="4" >一行四列</option>\n </select>\n </div>\n </div>'), this.target;
  2857. }, t.prototype.getValue = function () {
  2858. var t = this.target.find("select").val();
  2859. if (t) return parseFloat(t.toString());
  2860. }, t.prototype.setValue = function (t) {
  2861. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2862. this.target.find("select").val(t);
  2863. }, t.prototype.destroy = function () {
  2864. this.target.remove();
  2865. }, t;
  2866. }(),
  2867. ut = function () {
  2868. function t() {
  2869. this.name = "gridColumnsGutter";
  2870. }
  2871. return t.prototype.createTarget = function () {
  2872. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 一行多组间隔\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="1.5" >1.5pt</option>\n <option value="2.25" >2.25pt</option>\n <option value="3" >3pt</option>\n <option value="3.75" >3.75pt</option>\n <option value="4.5" >4.5pt</option>\n <option value="5.25" >5.25pt</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.25" >7.25pt</option>\n <option value="8.5" >8.5pt</option>\n <option value="9" >9pt</option>\n </select>\n </div>\n </div>'), this.target;
  2873. }, t.prototype.getValue = function () {
  2874. var t = this.target.find("select").val();
  2875. if (t) return parseFloat(t.toString());
  2876. }, t.prototype.css = function (t, e) {
  2877. if (t && t.length) {
  2878. if (e) return t.find(".table-grid-row").css("margin-left", "-" + e + "pt").css("margin-right", "-" + e + "pt"), t.find(".tableGridColumnsGutterRow").css("padding-left", e + "pt").css("padding-right", e + "pt"), null;
  2879. t.find(".table-grid-row").map(function (t, e) {
  2880. e.style.marginLeft = "", e.style.marginRight = "";
  2881. }), t.find(".tableGridColumnsGutterRow").map(function (t, e) {
  2882. e.style.paddingLeft = "", e.style.paddingRight = "";
  2883. });
  2884. }
  2885. return null;
  2886. }, t.prototype.setValue = function (t) {
  2887. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2888. this.target.find("select").val(t);
  2889. }, t.prototype.destroy = function () {
  2890. this.target.remove();
  2891. }, t;
  2892. }(),
  2893. dt = function () {
  2894. function t() {
  2895. this.name = "paddingLeft";
  2896. }
  2897. return t.prototype.css = function (t, e) {
  2898. var n = t;
  2899. if (n && n.length) {
  2900. if (e) return n.css("padding-left", e + "pt"), "padding-left";
  2901. n[0].style.paddingLeft = "";
  2902. }
  2903. return null;
  2904. }, t.prototype.createTarget = function () {
  2905. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 左内边距\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="0.75" >0.75pt</option>\n <option value="1.5" >1.5pt</option>\n <option value="2.25" >2.25pt</option>\n <option value="3" >3pt</option>\n <option value="3.75" >3.75pt</option>\n <option value="4.5" >4.5pt</option>\n <option value="5.25" >5.25pt</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n </select>\n </div>\n </div>'), this.target;
  2906. }, t.prototype.getValue = function () {
  2907. var t = this.target.find("select").val();
  2908. if (t) return parseFloat(t.toString());
  2909. }, t.prototype.setValue = function (t) {
  2910. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2911. this.target.find("select").val(t);
  2912. }, t.prototype.destroy = function () {
  2913. this.target.remove();
  2914. }, t;
  2915. }(),
  2916. ct = function () {
  2917. function t() {
  2918. this.name = "paddingRight";
  2919. }
  2920. return t.prototype.css = function (t, e) {
  2921. var n = t;
  2922. if (n && n.length) {
  2923. if (e) return n.css("padding-right", e + "pt"), "padding-right";
  2924. n[0].style.paddingRight = "";
  2925. }
  2926. return null;
  2927. }, t.prototype.createTarget = function () {
  2928. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 右内边距\n </div>\n <div class="hiprint-option-item-field">\n <select>\n <option value="" >默认</option>\n <option value="0.75" >0.75pt</option>\n <option value="1.5" >1.5pt</option>\n <option value="2.25" >2.25pt</option>\n <option value="3" >3pt</option>\n <option value="3.75" >3.75pt</option>\n <option value="4.5" >4.5pt</option>\n <option value="5.25" >5.25pt</option>\n <option value="6" >6pt</option>\n <option value="6.75" >6.75pt</option>\n <option value="7.5" >7.5pt</option>\n <option value="8.25" >8.25pt</option>\n <option value="9" >9pt</option>\n <option value="9.75" >9.75pt</option>\n <option value="10.5" >10.5pt</option>\n <option value="11.25" >11.25pt</option>\n <option value="12" >12pt</option>\n <option value="12.75" >12.75pt</option>\n <option value="13.5" >13.5pt</option>\n <option value="14.25" >14.25pt</option>\n <option value="15" >15pt</option>\n <option value="15.75" >15.75pt</option>\n <option value="16.5" >16.5pt</option>\n <option value="17.25" >17.25pt</option>\n <option value="18" >18pt</option>\n <option value="18.75" >18.75pt</option>\n <option value="19.5" >19.5pt</option>\n <option value="20.25" >20.25pt</option>\n <option value="21" >21pt</option>\n <option value="21.75" >21.75pt</option>\n </select>\n </div>\n </div>'), this.target;
  2929. }, t.prototype.getValue = function () {
  2930. var t = this.target.find("select").val();
  2931. if (t) return parseFloat(t.toString());
  2932. }, t.prototype.setValue = function (t) {
  2933. t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('<option value="' + t + '" >' + t + "</option>"));
  2934. this.target.find("select").val(t);
  2935. }, t.prototype.destroy = function () {
  2936. this.target.remove();
  2937. }, t;
  2938. }(),
  2939. ht = function () {
  2940. function t() {
  2941. this.name = "dataType";
  2942. }
  2943. return t.prototype.createTarget = function () {
  2944. var t = this;
  2945. return this.target = $('\n <div class="hiprint-option-item-row">\n <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 数据类型\n </div>\n <div class="hiprint-option-item-field">\n <select class="hiprint-option-item-datatype">\n <option value="" >默认</option>\n <option value="datetime" >日期时间</option>\n <option value="boolean" >布尔</option>\n </select>\n </div>\n </div>\n <div class="hiprint-option-item ">\n <div class="hiprint-option-item-label ">\n 格式\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit hiprint-option-item-datatype-select-format">\n <option value="" >默认</option>\n \n </select>\n <input class="auto-submit hiprint-option-item-datatype-input-format" type="text" data-type="boolean" placeholder="true:false">\n </div>\n </div>\n </div>\n '), $(this.target.find(".hiprint-option-item-datatype")).change(function () {
  2946. var e = $(t.target.find(".hiprint-option-item-datatype")).val();
  2947. t.loadFormatSelectByDataType(e), t.submit(t.getValue());
  2948. }), this.target;
  2949. }, t.prototype.getValue = function () {
  2950. var t = this.target.find(".hiprint-option-item-datatype").val();
  2951. if (t) {
  2952. var e = this.target.find(".hiprint-option-item-datatype-format").val();
  2953. return {
  2954. dataType: t,
  2955. format: e || void 0
  2956. };
  2957. }
  2958. return {
  2959. dataType: void 0,
  2960. format: void 0
  2961. };
  2962. }, t.prototype.setValue = function (t, e) {
  2963. this.target.find(".hiprint-option-item-datatype").val(e.dataType || ""), this.loadFormatSelectByDataType(e.dataType), this.target.find(".hiprint-option-item-datatype-format").val(e.format || "");
  2964. }, t.prototype.destroy = function () {
  2965. this.target.remove();
  2966. }, t.prototype.loadFormatSelectByDataType = function (t) {
  2967. "boolean" === t ? (this.target.find(".hiprint-option-item-datatype-select-format").removeClass("hiprint-option-item-datatype-format").hide().val(""), this.target.find(".hiprint-option-item-datatype-input-format").addClass("hiprint-option-item-datatype-format").show()) : "datetime" === t ? (this.target.find(".hiprint-option-item-datatype-select-format").addClass("hiprint-option-item-datatype-format").show(), this.target.find(".hiprint-option-item-datatype-input-format").removeClass("hiprint-option-item-datatype-format").hide().val(""), this.target.find(".hiprint-option-item-datatype-select-format").html('\n <option value="" >默认</option>\n <option value="M/d" >M/d</option>\n <option value="MM/dd" >MM/dd</option>\n <option value="yy/M/d" >yy/M/d</option>\n <option value="yy/MM/dd" >yy/MM/dd</option>\n <option value="yyyy/M/d" >yyyy/M/d</option>\n <option value="yyyy/MM/dd" >yyyy/MM/dd</option>\n <option value="yy/M/d H:m" >yy/M/d H:m</option>\n <option value="yy/M/d H:m:s" >yy/M/d H:m:s</option>\n <option value="yy/M/d HH:mm" >yy/M/d HH:mm</option>\n <option value="yy/M/d HH:mm:ss" >yy/M/d HH:mm:ss</option>\n <option value="yy/MM/dd H:m" >yy/MM/dd H:m</option>\n <option value="yy/MM/dd H:m:s" >yy/MM/dd H:m:s</option>\n <option value="yy/MM/dd HH:mm" >yy/MM/dd HH:mm</option>\n <option value="yy/MM/dd HH:mm:ss" >yy/MM/dd HH:mm:ss</option>\n <option value="yyyy/M/d H:m" >yyyy/M/dd H:m</option>\n <option value="yyyy/M/d H:m:s" >yyyy/M/d H:m:s</option>\n <option value="yyyy/M/d HH:mm" >yyyy/M/d HH:mm</option>\n <option value="yyyy/M/d HH:mm:ss" >yyyy/M/d HH:mm:ss</option>\n <option value="yyyy/MM/dd H:m" >yyyy/MM/dd H:m</option>\n <option value="yyyy/MM/dd H:m:s" >yyyy/MM/dd H:m:s</option>\n <option value="yyyy/MM/dd HH:mm" >yyyy/MM/dd HH:mm</option>\n <option value="yyyy/MM/dd HH:mm:ss" >yyyy/MM/dd HH:mm:ss</option>\n\n <option value="M-d" >M-d</option>\n <option value="MM-dd" >MM-dd</option>\n <option value="yy-M-d" >yy-M-d</option>\n <option value="yy-MM-dd" >yy-MM-dd</option>\n <option value="yyyy-M-d" >yyyy-M-d</option>\n <option value="yyyy-MM-dd" >yyyy-MM-dd</option>\n <option value="yy-M-d H:m" >yy-M-d H:m</option>\n <option value="yy-M-d H:m:s" >yy-M-d H:m:s</option>\n <option value="yy-M-d HH:mm" >yy-M-d HH:mm</option>\n <option value="yy-M-d HH:mm:ss" >yy-M-d HH:mm:ss</option>\n <option value="yy-MM-dd H:m" >yy-MM-dd H:m</option>\n <option value="yy-MM-dd H:m:s" >yy-MM-dd H:m:s</option>\n <option value="yy-MM-dd HH:mm" >yy-MM-dd HH:mm</option>\n <option value="yy-MM-dd HH:mm:ss" >yy-MM-dd HH:mm:ss</option>\n <option value="yyyy-M-d H:m" >yyyy-M-d H:m</option>\n <option value="yyyy-M-d H:m:s" >yyyy-M-d H:m:s</option>\n <option value="yyyy-M-d HH:mm" >yyyy-M-d HH:mm</option>\n <option value="yyyy-M-d HH:mm:ss" >yyyy-M-d HH:mm:ss</option>\n <option value="yyyy-MM-dd H:m" >yyyy-MM-dd H:m</option>\n <option value="yyyy-MM-dd H:m:s" >yyyy-MM-dd H:m:s</option>\n <option value="yyyy-MM-dd HH:mm" >yyyy-MM-dd HH:mm</option>\n <option value="yyyy-MM-dd HH:mm:ss" >yyyy-MM-dd HH:mm:ss</option>\n ')) : (this.target.find(".hiprint-option-item-datatype-select-format").show(), this.target.find(".hiprint-option-item-datatype-input-format").hide().val(""), this.target.find(".hiprint-option-item-datatype-format").html('\n <option value="" >默认</option>\n '));
  2968. }, t;
  2969. }(),
  2970. ft = function () {
  2971. function t() {
  2972. this.name = "formatter";
  2973. }
  2974. return t.prototype.createTarget = function () {
  2975. var t = ' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 格式化函数\n </div>\n <div class="hiprint-option-item-field">\n <textarea style="height:80px;" placeholder="' + (this.placeholder || "") + '" class="auto-submit"></textarea>\n </div>\n </div>';
  2976. return this.target = $(t), this.target;
  2977. }, t.prototype.getValue = function () {
  2978. var t = this.target.find("textarea").val();
  2979. if (t) return t;
  2980. }, t.prototype.setValue = function (t) {
  2981. this.target.find("textarea").val(t);
  2982. }, t.prototype.destroy = function () {
  2983. this.target.remove();
  2984. }, t;
  2985. }(),
  2986. gt = function () {
  2987. function t() {
  2988. this.name = "styler";
  2989. }
  2990. return t.prototype.createTarget = function () {
  2991. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 样式函数\n </div>\n <div class="hiprint-option-item-field">\n <textarea style="height:80px;" placeholder="function(value, options, target,templateData){}" class="auto-submit"></textarea>\n </div>\n </div>'), this.target;
  2992. }, t.prototype.getValue = function () {
  2993. var t = this.target.find("textarea").val();
  2994. if (t) return t;
  2995. }, t.prototype.setValue = function (t) {
  2996. this.target.find("textarea").val(t);
  2997. }, t.prototype.destroy = function () {
  2998. this.target.remove();
  2999. }, t;
  3000. }(),
  3001. mt = function () {
  3002. function t() {
  3003. this.name = "footerFormatter";
  3004. }
  3005. return t.prototype.createTarget = function () {
  3006. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 表格脚函数\n </div>\n <div class="hiprint-option-item-field">\n <textarea style="height:80px;" placeholder="function(options,rows,data){ return \'<tr></tr>\' }; }" class="auto-submit"></textarea>\n </div>\n </div>'), this.target;
  3007. }, t.prototype.getValue = function () {
  3008. var t = this.target.find("textarea").val();
  3009. if (t) return t;
  3010. }, t.prototype.setValue = function (t) {
  3011. this.target.find("textarea").val(t);
  3012. }, t.prototype.destroy = function () {
  3013. this.target.remove();
  3014. }, t;
  3015. }(),
  3016. vt = function () {
  3017. function t() {
  3018. this.name = "gridColumnsFooterFormatter";
  3019. }
  3020. return t.prototype.createTarget = function () {
  3021. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 多组表格脚函数\n </div>\n <div class="hiprint-option-item-field">\n <textarea style="height:80px;" placeholder="function(options,rows,data){ return \'\' }; }" class="auto-submit"></textarea>\n </div>\n </div>'), this.target;
  3022. }, t.prototype.getValue = function () {
  3023. var t = this.target.find("textarea").val();
  3024. if (t) return t;
  3025. }, t.prototype.setValue = function (t) {
  3026. this.target.find("textarea").val(t);
  3027. }, t.prototype.destroy = function () {
  3028. this.target.remove();
  3029. }, t;
  3030. }(),
  3031. yt = function () {
  3032. function t() {
  3033. this.name = "rowStyler";
  3034. }
  3035. return t.prototype.createTarget = function () {
  3036. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 行样式函数\n </div>\n <div class="hiprint-option-item-field">\n <textarea style="height:80px;" placeholder="请输入标题" class="auto-submit"></textarea>\n </div>\n </div>'), this.target;
  3037. }, t.prototype.getValue = function () {
  3038. var t = this.target.find("textarea").val();
  3039. if (t) return t;
  3040. }, t.prototype.setValue = function (t) {
  3041. this.target.find("textarea").val(t);
  3042. }, t.prototype.destroy = function () {
  3043. this.target.remove();
  3044. }, t;
  3045. }(),
  3046. bt = function () {
  3047. function t() {
  3048. this.name = "align";
  3049. }
  3050. return t.prototype.createTarget = function () {
  3051. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 单元格左右对齐\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="left" >居左</option>\n <option value="center" >居中</option>\n <option value="right" >居右</option>\n <option value="justify" >两端对齐</option>\n </select>\n </div>\n </div>'), this.target;
  3052. }, t.prototype.getValue = function () {
  3053. var t = this.target.find("select").val();
  3054. if (t) return t.toString();
  3055. }, t.prototype.setValue = function (t) {
  3056. this.target.find("select").val(t);
  3057. }, t.prototype.destroy = function () {
  3058. this.target.remove();
  3059. }, t;
  3060. }(),
  3061. Et = function () {
  3062. function t() {
  3063. this.name = "vAlign";
  3064. }
  3065. return t.prototype.createTarget = function () {
  3066. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 单元格上下对齐\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="top" >上</option>\n <option value="middle" >中</option>\n <option value="bottom" >居右</option>\n \n </select>\n </div>\n </div>'), this.target;
  3067. }, t.prototype.getValue = function () {
  3068. var t = this.target.find("select").val();
  3069. if (t) return t.toString();
  3070. }, t.prototype.setValue = function (t) {
  3071. this.target.find("select").val(t);
  3072. }, t.prototype.destroy = function () {
  3073. this.target.remove();
  3074. }, t;
  3075. }(),
  3076. Tt = function () {
  3077. function t() {
  3078. this.name = "halign";
  3079. }
  3080. return t.prototype.createTarget = function () {
  3081. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表格头单元格左右对齐\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="left" >居左</option>\n <option value="center" >居中</option>\n <option value="right" >居右</option>\n <option value="justify" >两端对齐</option>\n </select>\n </div>\n </div>'), this.target;
  3082. }, t.prototype.getValue = function () {
  3083. var t = this.target.find("select").val();
  3084. if (t) return t.toString();
  3085. }, t.prototype.setValue = function (t) {
  3086. this.target.find("select").val(t);
  3087. }, t.prototype.destroy = function () {
  3088. this.target.remove();
  3089. }, t;
  3090. }(),
  3091. Pt = function () {
  3092. function t() {
  3093. this.name = "styler2";
  3094. }
  3095. return t.prototype.createTarget = function () {
  3096. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 单元格样式函数\n </div>\n <div class="hiprint-option-item-field">\n <textarea style="height:80px;" placeholder="function(value,row,index,options){ return {color:\'red\' }; }" class="auto-submit"></textarea>\n </div>\n </div>'), this.target;
  3097. }, t.prototype.getValue = function () {
  3098. var t = this.target.find("textarea").val();
  3099. if (t) return t;
  3100. }, t.prototype.setValue = function (t) {
  3101. this.target.find("textarea").val(t);
  3102. }, t.prototype.destroy = function () {
  3103. this.target.remove();
  3104. }, t;
  3105. }(),
  3106. _t = function () {
  3107. function t() {
  3108. this.name = "formatter2";
  3109. }
  3110. return t.prototype.createTarget = function () {
  3111. return this.target = $(' <div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label">\n 单元格格式化函数\n </div>\n <div class="hiprint-option-item-field">\n <textarea style="height:80px;" placeholder="function(value,row,index,options){ return \'\'; }" class="auto-submit"></textarea>\n </div>\n </div>'), this.target;
  3112. }, t.prototype.getValue = function () {
  3113. var t = this.target.find("textarea").val();
  3114. if (t) return t;
  3115. }, t.prototype.setValue = function (t) {
  3116. this.target.find("textarea").val(t);
  3117. }, t.prototype.destroy = function () {
  3118. this.target.remove();
  3119. }, t;
  3120. }(),
  3121. wt = function () {
  3122. function t() {
  3123. this.name = "autoCompletion";
  3124. }
  3125. return t.prototype.createTarget = function () {
  3126. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 自动补全\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="true" >是</option>\n <option value="false" >否</option>\n </select>\n </div>\n </div>'), this.target;
  3127. }, t.prototype.getValue = function () {
  3128. if ("true" == this.target.find("select").val()) return !0;
  3129. }, t.prototype.setValue = function (t) {
  3130. this.target.find("select").val((null == t ? "" : t).toString());
  3131. }, t.prototype.destroy = function () {
  3132. this.target.remove();
  3133. }, t;
  3134. }(),
  3135. xt = function () {
  3136. function t() {
  3137. this.name = "tableFooterRepeat";
  3138. }
  3139. return t.prototype.createTarget = function () {
  3140. return this.target = $(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 表格脚显示\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit">\n <option value="" >默认</option>\n <option value="no" >不显示</option>\n <option value="page" >每页显示</option>\n <option value="last" >最后显示</option>\n </select>\n </div>\n </div>'), this.target;
  3141. }, t.prototype.getValue = function () {
  3142. var t = this.target.find("select").val();
  3143. if (t) return t.toString();
  3144. }, t.prototype.setValue = function (t) {
  3145. this.target.find("select").val(t);
  3146. }, t.prototype.destroy = function () {
  3147. this.target.remove();
  3148. }, t;
  3149. }();
  3150. n.d(e, "a", function () {
  3151. return Ct;
  3152. });
  3153. var Ct = function () {
  3154. function t() { }
  3155. return t.init = function () {
  3156. t.printElementOptionItems || (t.printElementOptionItems = {}, t._printElementOptionItems.forEach(function (e) {
  3157. t.printElementOptionItems[e.name] = e;
  3158. }));
  3159. }, t.registerItem = function (e) {
  3160. if (!e.name) throw new Error("styleItem must have name");
  3161. t.init(), t.printElementOptionItems[e.name] = e;
  3162. }, t.getItem = function (e) {
  3163. return t.init(), t.printElementOptionItems[e];
  3164. }, t._printElementOptionItems = [new o(), new r(), new a(), new p(), new i(), new s(), new l(), new pt(), new u(), new d(), new c(), new h(), new f(), new g(), new m(), new v(), new y(), new b(), new E(), new T(), new P(), new _(), new w(), new x(), new C(), new O(), new H(), new D(), new I(), new R(), new M(), new S(), new B(), new F(), new L(), new A(), new z(), new k(), new st(), new N(), new V(), new W(), new j(), new U(), new K(), new G(), new q(), new X(), new Y(), new Q(), new J(), new Z(), new tt(), new et(), new nt(), new it(), new ot(), new at(), new lt(), new ut(), new dt(), new ct(), new ht(), new ft(), new gt(), new mt(), new vt(), new yt(), new bt(), new Tt(), new Et(), new Pt(), new _t(), new wt(), new xt()], t;
  3165. }();
  3166. }, function (t, e, n) {
  3167. "use strict";
  3168. n.d(e, "a", function () {
  3169. return o;
  3170. }), n.d(e, "b", function () {
  3171. return r;
  3172. });
  3173. var i = n(14),
  3174. o = function () {
  3175. function t(t, e) {
  3176. this.selectedCells = [], this.rows = t, this.tableTatget = e;
  3177. }
  3178. return t.prototype.clear = function () {
  3179. this.tableTatget.find("td").removeClass("selected");
  3180. }, t.prototype.setSingleSelect = function (t) {
  3181. this.startCell = t, this.selectedCells = [];
  3182. }, t.prototype.getSingleSelect = function () {
  3183. if (this.selectedCells.length) {
  3184. if (1 == this.selectedCells.length) return 1 == this.selectedCells[0].length ? this.selectedCells[0][0] : void 0;
  3185. if (this.selectedCells.length > 1) return;
  3186. }
  3187. return this.startCell;
  3188. }, t.prototype.singleSelectByXY = function (t, e) {
  3189. var n = this.getCellByXY(t, e);
  3190. n && (this.clear(), n && (n.cell.select(), this.startCell = n, this.selectedCells = []));
  3191. }, t.prototype.multipleSelectByXY = function (t, e) {
  3192. this.clear();
  3193. var n = [];
  3194. if (this.startCell) {
  3195. var o = this.getCellByXY(t, e);
  3196. if (o) {
  3197. var r = i.a.mergeRect(this.startCell.cell.getTableRect(), o.cell.getTableRect());
  3198. this.selectByRect(new a(r), n);
  3199. }
  3200. }
  3201. this.selectedCells = n;
  3202. }, t.prototype.selectByRect = function (t, e) {
  3203. this.rows.forEach(function (n, i) {
  3204. var o = [];
  3205. n.columns.forEach(function (e) {
  3206. e.isInRect(t) && (o.push(new p(i, e)), e.select());
  3207. }), o.length && e.push(o);
  3208. }), t.changed && (t.changed = !1, e.splice(0, e.length), this.selectByRect(t, e));
  3209. }, t.prototype.getSelectedCells = function () {
  3210. return this.selectedCells;
  3211. }, t.prototype.getCellByXY = function (t, e) {
  3212. var n;
  3213. return this.rows.forEach(function (i, o) {
  3214. var r = i.columns.filter(function (n) {
  3215. return n.isXYinCell(t, e);
  3216. });
  3217. r.length && (n = new p(o, r[0]));
  3218. }), n;
  3219. }, t;
  3220. }(),
  3221. r = function () {
  3222. return function (t) {
  3223. this.x = t.x, this.y = t.y, this.height = t.height, this.width = t.width;
  3224. };
  3225. }(),
  3226. a = function () {
  3227. return function (t) {
  3228. this.rect = t;
  3229. };
  3230. }(),
  3231. p = function () {
  3232. return function (t, e) {
  3233. this.rowIndex = t, this.cell = e;
  3234. };
  3235. }();
  3236. }, function (t, e, n) {
  3237. "use strict";
  3238. n.d(e, "a", function () {
  3239. return i;
  3240. });
  3241. var i = function () {
  3242. function t() { }
  3243. return t.createId = function () {
  3244. return this.id += 1, this.id;
  3245. }, t.id = 1, t;
  3246. }();
  3247. }, function (t, e, n) {
  3248. "use strict";
  3249. n.d(e, "a", function () {
  3250. return p;
  3251. });
  3252. var _i,
  3253. o = n(5),
  3254. r = n(13),
  3255. a = (_i = function i(t, e) {
  3256. return (_i = Object.setPrototypeOf || _instanceof({
  3257. __proto__: []
  3258. }, Array) && function (t, e) {
  3259. t.__proto__ = e;
  3260. } || function (t, e) {
  3261. for (var n in e) {
  3262. e.hasOwnProperty(n) && (t[n] = e[n]);
  3263. }
  3264. })(t, e);
  3265. }, function (t, e) {
  3266. function n() {
  3267. this.constructor = t;
  3268. }
  3269. _i(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n());
  3270. }),
  3271. p = function (t) {
  3272. function e(e) {
  3273. var n = t.call(this) || this;
  3274. (n.columns = [], e && e.constructor === Array) ? (e || []).forEach(function (t) {
  3275. n.columns.push(new o.a(t));
  3276. }) : e.columns && (e.columns || []).forEach(function (t) {
  3277. n.columns.push(new o.a(t));
  3278. });
  3279. return n;
  3280. }
  3281. return a(e, t), e.prototype.getPrintElementOptionEntity = function () {
  3282. var t = [];
  3283. return this.columns.forEach(function (e) {
  3284. t.push(e.getEntity());
  3285. }), t;
  3286. }, e;
  3287. }(r.a);
  3288. }, function (t, e, n) {
  3289. "use strict";
  3290. n.d(e, "a", function () {
  3291. return r;
  3292. });
  3293. var i = n(11),
  3294. o = n(5),
  3295. r = function () {
  3296. function t() {
  3297. this.id = i.a.createId();
  3298. }
  3299. return t.prototype.init = function (t, e, n) {
  3300. this.isHead = n, this.target = e || $("<tr></tr>"), this.tableOptions = t, this.initCells(this.columns);
  3301. }, t.prototype.getTarget = function () {
  3302. return this.target;
  3303. }, t.prototype.initCells = function (t) {
  3304. var e = this;
  3305. t ? t.forEach(function (t, n) {
  3306. t.init(e.target.find("td:eq(" + n + ")"), e.tableOptions, e.id, e.isHead);
  3307. }) : (this.columns = [], this.target.find("td").map(function (t, n) {
  3308. var i = new o.a();
  3309. i.init($(n), e.tableOptions, e.id, e.isHead), e.columns.push(i);
  3310. }));
  3311. }, t.prototype.removeCell = function (t) {
  3312. var e = this.columns.indexOf(t);
  3313. this.columns[e].getTarget().remove(), this.columns.splice(e, 1);
  3314. }, t.prototype.createTableCell = function (t, e) {
  3315. var n = new o.a();
  3316. return n.init($("<td></td>"), this.tableOptions, this.id, this.isHead), t > 1 && (n.getTarget().attr("rowspan", t), n.rowspan = t), e > 1 && (n.getTarget().attr("colspan", e), n.colspan = e), n;
  3317. }, t.prototype.insertToTargetCellLeft = function (t, e) {
  3318. var n = this.columns.indexOf(t);
  3319. t.getTarget().before(e.getTarget()), this.columns.splice(n, 0, e);
  3320. }, t.prototype.insertToTargetCellRight = function (t, e) {
  3321. var n = this.columns.indexOf(t);
  3322. this.columns[n].getTarget().after(e.getTarget()), this.columns.splice(n + 1, 0, e);
  3323. }, t.prototype.insertCellToFirst = function (t) {
  3324. this.target.prepend(t.getTarget()), this.columns.splice(0, 0, t);
  3325. }, t.prototype.insertCellToLast = function (t) {
  3326. this.columns.push(t), this.target.append(t.getTarget());
  3327. }, t.prototype.getPrintElementOptionEntity = function () {
  3328. var t = [];
  3329. return this.columns.forEach(function (e) {
  3330. t.push(e.getEntity());
  3331. }), t;
  3332. }, t;
  3333. }();
  3334. }, function (t, e, n) {
  3335. "use strict";
  3336. n.d(e, "a", function () {
  3337. return o;
  3338. });
  3339. var i = n(10),
  3340. o = function () {
  3341. function t() { }
  3342. return t.mergeRect = function (t, e) {
  3343. var n = Math.min(t.x, e.x),
  3344. o = Math.min(t.y, e.y);
  3345. return new i.b({
  3346. x: n,
  3347. y: o,
  3348. height: Math.max(t.y + t.height, e.y + e.height) - o,
  3349. width: Math.max(t.x + t.width, e.x + e.width) - n
  3350. });
  3351. }, t.Rect = function (t, e, n, i) {
  3352. return {
  3353. minX: t < n ? t : n,
  3354. minY: e < i ? e : i,
  3355. maxX: t < n ? n : t,
  3356. maxY: e < i ? i : e
  3357. };
  3358. }, t;
  3359. }();
  3360. }, function (module, __webpack_exports__, __webpack_require__) {
  3361. "use strict";
  3362. __webpack_require__.d(__webpack_exports__, "a", function () {
  3363. return TablePrintElement;
  3364. });
  3365. var _BasePrintElement__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4),
  3366. _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1),
  3367. _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6),
  3368. _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0),
  3369. _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8),
  3370. _option_TablePrintElementOption__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18),
  3371. _table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7),
  3372. _hitable_HiTale__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(16),
  3373. _table_GridColumnsStructure__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(20),
  3374. _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2),
  3375. __extends = (_extendStatics = function extendStatics(t, e) {
  3376. return (_extendStatics = Object.setPrototypeOf || _instanceof({
  3377. __proto__: []
  3378. }, Array) && function (t, e) {
  3379. t.__proto__ = e;
  3380. } || function (t, e) {
  3381. for (var n in e) {
  3382. e.hasOwnProperty(n) && (t[n] = e[n]);
  3383. }
  3384. })(t, e);
  3385. }, function (t, e) {
  3386. function n() {
  3387. this.constructor = t;
  3388. }
  3389. _extendStatics(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n());
  3390. }),
  3391. _extendStatics,
  3392. TablePrintElement = function (_super) {
  3393. function TablePrintElement(t, e) {
  3394. var n = _super.call(this, t) || this;
  3395. return n.gridColumnsFooterCss = "hiprint-gridColumnsFooter", n.tableGridRowCss = "table-grid-row", n.options = new _option_TablePrintElementOption__WEBPACK_IMPORTED_MODULE_5__.a(e, n.printElementType), n.options.setDefault(new _option_TablePrintElementOption__WEBPACK_IMPORTED_MODULE_5__.a(_HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.table.default).getPrintElementOptionEntity()), n;
  3396. }
  3397. return __extends(TablePrintElement, _super), TablePrintElement.prototype.getColumns = function () {
  3398. return this.options.columns;
  3399. }, TablePrintElement.prototype.getColumnByColumnId = function (t) {
  3400. return this.options.getColumnByColumnId(t);
  3401. }, TablePrintElement.prototype.updateDesignViewFromOptions = function () {
  3402. if (this.designTarget) {
  3403. this.css(this.designTarget, this.getData());
  3404. var t = this.designTarget.find(".hiprint-printElement-table-content"),
  3405. e = this.getHtml(this.designPaper);
  3406. t.html(""), t.append(e[0].target.find(".table-grid-row")), this.printElementType.editable && this.setHitable(), this.setColumnsOptions();
  3407. }
  3408. }, TablePrintElement.prototype.css = function (t, e) {
  3409. if ((this.getField() || !this.options.content) && !this.printElementType.formatter) return _super.prototype.css.call(this, t, e);
  3410. }, TablePrintElement.prototype.getDesignTarget = function (t) {
  3411. return this.designTarget = this.getHtml(t)[0].target, this.designPaper = t, this.designTarget.find("td").hidroppable({
  3412. accept: ".rn-draggable-item",
  3413. onDrop: function onDrop(t, e) { },
  3414. onDragEnter: function onDragEnter(t, e) {
  3415. $(e).removeClass("rn-draggable-item");
  3416. },
  3417. onDragLeave: function onDragLeave(t, e) {
  3418. $(e).addClass("rn-draggable-item");
  3419. }
  3420. }), this.designTarget;
  3421. }, TablePrintElement.prototype.getConfigOptions = function () {
  3422. return _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.table;
  3423. }, TablePrintElement.prototype.createTarget = function (t, e, n) {
  3424. for (var i = $('<div class="hiprint-printElement hiprint-printElement-table" style="position: absolute;"><div class="hiprint-printElement-table-handle"></div><div class="hiprint-printElement-table-content" style="height:100%;width:100%"></span></div>'), o = this.createGridColumnsStructure(n), r = 0; r < o.gridColumns; r++) {
  3425. o.getByIndex(r).append(this.getTableHtml(e, n));
  3426. }
  3427. return i.find(".hiprint-printElement-table-content").append(o.target), i;
  3428. }, TablePrintElement.prototype.createGridColumnsStructure = function (t) {
  3429. for (var e = $('<div class="hi-grid-row table-grid-row"></div>'), n = 0; n < this.options.getGridColumns(); n++) {
  3430. var i = $('<div class="tableGridColumnsGutterRow hi-grid-col" style="width:' + 100 / this.options.getGridColumns() + '%;"></div>');
  3431. e.append(i);
  3432. }
  3433. var o = this.getGridColumnsFooterFormatter();
  3434. if (o) {
  3435. var r = $('<div class="hiprint-gridColumnsFooter"></div>');
  3436. r.append(o(this.options, this.getData(t), t, [])), e.append(r);
  3437. }
  3438. return new _table_GridColumnsStructure__WEBPACK_IMPORTED_MODULE_8__.a(this.options.getGridColumns(), e);
  3439. }, TablePrintElement.prototype.createtempEmptyRowsTargetStructure = function (t) {
  3440. if (this.getField()) return this.createTarget(this.printElementType.title, []);
  3441. var e = this.createTarget(this.printElementType.title, []).clone();
  3442. return e.find(".hiprint-printElement-tableTarget tbody tr").remove(), e;
  3443. }, TablePrintElement.prototype.getTableHtml = function (t, e) {
  3444. var n, i;
  3445. if (!this.getField() && this.options.content) return (n = $("<div></div>")).append(this.options.content), (i = n.find("table")).addClass("hiprint-printElement-tableTarget"), i;
  3446. if (this.printElementType.formatter) return (n = $("<div></div>")).append(this.printElementType.formatter(t)), (i = n.find("table")).addClass("hiprint-printElement-tableTarget"), i;
  3447. var o = $('<table class="hiprint-printElement-tableTarget" style="border-collapse: collapse;"></table>');
  3448. return o.append(_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableHead(this.getColumns(), this.options.getWidth() / this.options.getGridColumns())), o.append(_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableRow(this.getColumns(), t, this.options, this.printElementType)), this.getFooterFormatter() && ("no" == this.options.tableFooterRepeat || ("last" == this.options.tableFooterRepeat ? o.find("tbody").append(_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableFooter(this.printElementType.columns, t, this.options, this.printElementType, e, t).html()) : o.append(_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableFooter(this.printElementType.columns, t, this.options, this.printElementType, e, [])))), o;
  3449. }, TablePrintElement.prototype.getEmptyRowTarget = function () {
  3450. return _table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createEmptyRowTarget(this.getColumns());
  3451. }, TablePrintElement.prototype.getHtml = function (t, e) {
  3452. this.createTempContainer();
  3453. var n = this.getPaperHtmlResult(t, e);
  3454. return this.removeTempContainer(), n;
  3455. }, TablePrintElement.prototype.getPaperHtmlResult = function (t, e) {
  3456. var n = [],
  3457. i = this.getData(e),
  3458. o = this.getTableHtml(i, e),
  3459. r = this.createtempEmptyRowsTargetStructure(e);
  3460. e ? this.updateTargetWidth(r) : this.updateTargetSize(r), this.css(r, i), this.css(o, i), this.getTempContainer().html(""), this.getTempContainer().append(r);
  3461. for (var a, p = this.getBeginPrintTopInPaperByReferenceElement(t), s = 0, l = !1; !l;) {
  3462. var u = 0,
  3463. d = t.getPaperFooter(s);
  3464. 0 == s && p > d && (p = p - d + t.paperHeader, n.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_2__.a({
  3465. target: void 0,
  3466. printLine: void 0
  3467. })), u = t.getContentHeight(s) - (p - t.paperHeader), s++, d = t.getPaperFooter(s));
  3468. var c = n.length > 0 ? n[n.length - 1].target : void 0,
  3469. h = this.getRowsInSpecificHeight(e, u > 0 ? u : 0 == s ? d - p : t.getContentHeight(s), r, o, s, c);
  3470. l = h.isEnd;
  3471. var f = void 0;
  3472. h.target && (h.target.css("left", this.options.displayLeft()), h.target[0].height = ""), 0 == s || u > 0 ? (h.target && (a = p, h.target.css("top", p + "pt")), f = l && null != this.options.lHeight ? p + (h.height > this.options.lHeight ? h.height : this.options.lHeight) : p + h.height) : (h.target && (a = t.paperHeader, h.target.css("top", t.paperHeader + "pt")), f = t.paperHeader + h.height), n.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_2__.a({
  3473. target: h.target,
  3474. printLine: f,
  3475. referenceElement: new _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_4__.a({
  3476. top: this.options.getTop(),
  3477. left: this.options.getLeft(),
  3478. height: this.options.getHeight(),
  3479. width: this.options.getWidth(),
  3480. beginPrintPaperIndex: t.index,
  3481. bottomInLastPaper: f,
  3482. printTopInPaper: a
  3483. })
  3484. })), s++;
  3485. }
  3486. return n;
  3487. }, TablePrintElement.prototype.getRowsInSpecificHeight = function (t, e, n, i, o, r) {
  3488. var a = i.find("tbody"),
  3489. p = _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.pt.toPx(e);
  3490. n.find(".hiprint-printElement-tableTarget tbody").html("");
  3491. var s = n.outerHeight();
  3492. if (s > p) return {
  3493. target: void 0,
  3494. length: 0,
  3495. height: 0,
  3496. isEnd: !1
  3497. };
  3498. for (var l = [], u = 0; u < this.options.getGridColumns(); u++) {
  3499. for (var d = n.find(".hiprint-printElement-tableTarget:eq(" + u + ")"), c = void 0, h = []; ;) {
  3500. console.log(u);
  3501. if (s <= p) if (0 == a.find("tr").length) c = {
  3502. height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(s),
  3503. isEnd: !0
  3504. }, t && this.options.autoCompletion && (this.autoCompletion(p, d), s = n.outerHeight()); else {
  3505. var f = a.find("tr:lt(1)");
  3506. d.find("tbody").append(f);
  3507. var g = f.data("rowData");
  3508. l.push(g), h.push(g), (s = n.outerHeight()) > p && (a.prepend(f), l.pop(), h.pop(), s = n.outerHeight(), c = {
  3509. height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(s),
  3510. isEnd: !1
  3511. });
  3512. }
  3513. if (c) {
  3514. if (this.getFooterFormatter()) d.find("tfoot").length && d.find("tfoot").html(_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableFooter(this.printElementType.columns, this.getData(t), this.options, this.printElementType, t, h).html());
  3515. break;
  3516. }
  3517. }
  3518. }
  3519. var m = n.find(".hiprint-printElement-tableTarget tbody tr").length,
  3520. v = this.getGridColumnsFooterFormatter();
  3521. return v && n.find(this.gridColumnsFooterCss).html(v(this.options, this.getData(t), t, l)), 0 == a.find("tr").length ? 0 == m && r ? {
  3522. target: void 0,
  3523. length: 0,
  3524. height: 0,
  3525. isEnd: !0
  3526. } : {
  3527. target: n.clone(),
  3528. length: m,
  3529. height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(s),
  3530. isEnd: !0
  3531. } : {
  3532. target: n.clone(),
  3533. length: m,
  3534. height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(s),
  3535. isEnd: !1
  3536. };
  3537. }, TablePrintElement.prototype.autoCompletion = function (t, e) {
  3538. for (var n, i = this.getEmptyRowTarget(), o = e.outerHeight(); t > o;) {
  3539. n = i.clone(), e.find("tbody").append(n), o = e.outerHeight();
  3540. }
  3541. n && n.remove();
  3542. }, TablePrintElement.prototype.getData = function (t) {
  3543. if (!t) return [{}];
  3544. var e = t[this.getField()];
  3545. return e ? JSON.parse(JSON.stringify(e)) : [];
  3546. }, TablePrintElement.prototype.onResize = function (t, e, n, i, o) {
  3547. _super.prototype.updateSizeAndPositionOptions.call(this, o, i, n, e), _table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.resizeTableCellWidth(this.designTarget, this.getColumns(), this.options.getWidth());
  3548. }, TablePrintElement.prototype.getReizeableShowPoints = function () {
  3549. return ["s", "e"];
  3550. }, TablePrintElement.prototype.design = function (t, e) {
  3551. var n = this;
  3552. this.designTarget.hidraggable({
  3553. handle: this.designTarget.find(".hiprint-printElement-table-handle"),
  3554. axis: n.options.axis && t && t.axisEnabled ? n.options.axis : void 0,
  3555. onDrag: function onDrag(t, i, o) {
  3556. n.updateSizeAndPositionOptions(i, o), n.createLineOfPosition(e);
  3557. },
  3558. moveUnit: "pt",
  3559. minMove: _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance,
  3560. onBeforeDrag: function onBeforeDrag(t) {
  3561. _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !0, n.createLineOfPosition(e);
  3562. },
  3563. onStopDrag: function onStopDrag(t) {
  3564. _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !1, n.removeLineOfPosition();
  3565. }
  3566. }), this.printElementType.editable && this.setHitable(), this.setColumnsOptions(), this.designTarget.hireizeable({
  3567. showPoints: n.getReizeableShowPoints(),
  3568. noContainer: !0,
  3569. onBeforeResize: function onBeforeResize() {
  3570. _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !0;
  3571. },
  3572. onResize: function onResize(t, i, o, r, a) {
  3573. n.onResize(t, i, o, r, a), n.hitable && n.hitable.updateColumnGrips(), n.createLineOfPosition(e);
  3574. },
  3575. onStopResize: function onStopResize() {
  3576. _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !1, n.removeLineOfPosition();
  3577. }
  3578. }), this.bingKeyboardMoveEvent(this.designTarget, e);
  3579. }, TablePrintElement.prototype.setHitable = function () {
  3580. var t = this;
  3581. this.hitable = new _hitable_HiTale__WEBPACK_IMPORTED_MODULE_7__.a({
  3582. table: this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)"),
  3583. rows: this.getColumns(),
  3584. resizeRow: !1,
  3585. resizeColumn: !0,
  3586. trs: this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("tbody tr"),
  3587. handle: this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("thead"),
  3588. isEnableEdit: this.printElementType.editable,
  3589. columnDisplayEditable: this.printElementType.columnDisplayEditable,
  3590. columnDisplayIndexEditable: this.printElementType.columnDisplayIndexEditable,
  3591. columnResizable: this.printElementType.columnResizable,
  3592. columnAlignEditable: this.printElementType.columnAlignEditable,
  3593. isEnableEditText: this.printElementType.columnTitleEditable,
  3594. isEnableEditField: !1,
  3595. isEnableContextMenu: !0,
  3596. isEnableInsertRow: !1,
  3597. isEnableDeleteRow: !1,
  3598. isEnableInsertColumn: !1,
  3599. isEnableDeleteColumn: !1,
  3600. isEnableMergeCell: !1
  3601. }), _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.on("updateTable" + this.hitable.id, function () {
  3602. t.updateDesignViewFromOptions();
  3603. });
  3604. }, TablePrintElement.prototype.setColumnsOptions = function () {
  3605. var t = this;
  3606. this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("thead td").bind("click.hiprint", function (e) {
  3607. var n = $(e.target).attr("column-id"),
  3608. i = t.getColumnByColumnId(n);
  3609. if (i) {
  3610. var o = t.getPrintElementOptionItemsByName("tableColumn");
  3611. _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.trigger(t.getPrintElementSelectEventKey(), {
  3612. printElement: t,
  3613. customOptionsInput: [{
  3614. title: i.title + "-列属性",
  3615. optionItems: o,
  3616. options: i,
  3617. callback: function callback(t) {
  3618. o.forEach(function (t) {
  3619. var e = t.getValue();
  3620. i[t.name] = e;
  3621. });
  3622. }
  3623. }]
  3624. });
  3625. } else _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.trigger(t.getPrintElementSelectEventKey(), {
  3626. printElement: t
  3627. });
  3628. });
  3629. }, TablePrintElement.prototype.filterOptionItems = function (t) {
  3630. var e = _super.prototype.filterOptionItems.call(this, t);
  3631. return this.printElementType.editable && 1 == this.options.columns.length ? e : t.filter(function (t) {
  3632. return "columns" != t.name;
  3633. });
  3634. }, TablePrintElement.prototype.getFooterFormatter = function () {
  3635. var footerFormatter = void 0;
  3636. if (this.printElementType.footerFormatter && (footerFormatter = this.printElementType.footerFormatter), this.options.footerFormatter) try {
  3637. var s = "footerFormatter=" + this.options.footerFormatter;
  3638. eval(s);
  3639. } catch (t) {
  3640. console.log(t);
  3641. }
  3642. return footerFormatter;
  3643. }, TablePrintElement.prototype.getGridColumnsFooterFormatter = function () {
  3644. var gridColumnsFooterFormatter = void 0;
  3645. if (this.printElementType.gridColumnsFooterFormatter && (gridColumnsFooterFormatter = this.printElementType.gridColumnsFooterFormatter), this.options.gridColumnsFooterFormatter) try {
  3646. var s = "gridColumnsFooterFormatter=" + this.options.gridColumnsFooterFormatter;
  3647. eval(s);
  3648. } catch (t) {
  3649. console.log(t);
  3650. }
  3651. return gridColumnsFooterFormatter;
  3652. }, TablePrintElement;
  3653. }(_BasePrintElement__WEBPACK_IMPORTED_MODULE_0__.a);
  3654. }, function (t, e, n) {
  3655. "use strict";
  3656. var i = function () {
  3657. return function (t) {
  3658. this.table = t.table, this.isEnableEdit = t.isEnableEdit, this.trs = t.trs, this.resizeRow = t.resizeRow, this.resizeColumn = t.resizeColumn, this.isEnableEditField = t.isEnableEditField, this.isEnableContextMenu = t.isEnableContextMenu, this.isEnableEditField = t.isEnableEditField, this.isEnableInsertRow = t.isEnableInsertRow, this.isEnableDeleteRow = t.isEnableDeleteRow, this.isEnableInsertColumn = t.isEnableInsertColumn, this.isEnableDeleteColumn = t.isEnableDeleteColumn, this.isEnableMergeCell = t.isEnableMergeCell, this.columnResizable = t.columnResizable, this.columnAlignEditable = t.columnAlignEditable;
  3659. };
  3660. }(),
  3661. o = function () {
  3662. function t(t) {
  3663. this.options = new i(t);
  3664. }
  3665. return t.prototype.enableEidt = function () {
  3666. this.options.isEnableEdit;
  3667. }, t.prototype.disableEdit = function () {
  3668. this.options.isEnableEdit;
  3669. }, t.prototype.isEnableEdit = function () {
  3670. return this.options.isEnableEdit;
  3671. }, t;
  3672. }(),
  3673. r = n(0),
  3674. a = function () {
  3675. return function (t) {
  3676. this.cell = t.cell, this.link = t.link, this.linkType = t.linkType, this.bottom = t.bottom, this.rightMost = t.rightMost, this.rowLevel = t.rowLevel, this.columnLevel = t.columnLevel, this.indexInTableGridRow = t.indexInTableGridRow, this.indexInTableGridColumn = t.indexInTableGridColumn;
  3677. };
  3678. }(),
  3679. p = n(10),
  3680. s = function () {
  3681. function t() { }
  3682. return t.getLeftTableCell = function (t, e) {
  3683. var n;
  3684. return t.forEach(function (t, i) {
  3685. t.cell && i < e && (n = t.cell);
  3686. }), n;
  3687. }, t.getIndex = function (t, e) {
  3688. var n;
  3689. return t.forEach(function (t, i) {
  3690. t.cell && t.cell.id == e && (n = i);
  3691. }), n;
  3692. }, t;
  3693. }(),
  3694. l = n(13),
  3695. u = n(11),
  3696. d = function () {
  3697. return function (t, e) {
  3698. this.target = t, this.grips = e;
  3699. };
  3700. }(),
  3701. c = function () {
  3702. return function (t) {
  3703. this.target = t;
  3704. };
  3705. }(),
  3706. h = function () {
  3707. return function () {
  3708. this.rowColumns = [];
  3709. };
  3710. }(),
  3711. f = function () {
  3712. function t() { }
  3713. return t.getColumnsWidth = function (e, n) {
  3714. var i = {},
  3715. o = t.allAutoWidth(e);
  3716. return e.rowColumns.forEach(function (t) {
  3717. var e = n - 0,
  3718. r = t.width / o * (e > 0 ? e : 0);
  3719. i[t.id] = r;
  3720. }), i;
  3721. }, t.resizeTableCellWeight = function (t) {
  3722. t.forEach(function (t) {
  3723. t.columns.forEach(function (t) {
  3724. t.hasWidth && $(t.getTarget()).css("width", t.width + "pt");
  3725. });
  3726. });
  3727. }, t.allAutoWidth = function (t) {
  3728. var e = 0;
  3729. return t.rowColumns.forEach(function (t) {
  3730. e += t.width;
  3731. }), e;
  3732. }, t.reconsitutionTableColumnTree = function (t, e, n) {
  3733. for (var i = e || new h(), o = function o(e) {
  3734. i.totalLayer = e + 1, i[e] = t[e].columns, i.rowColumns = i.rowColumns.concat(i[e].filter(function (n) {
  3735. return n.rowspan == t.length - e;
  3736. }));
  3737. }, r = 0; r < t.length; r++) {
  3738. o(r);
  3739. }
  3740. return i;
  3741. }, t;
  3742. }(),
  3743. g = n(2),
  3744. m = function () {
  3745. function t(t) {
  3746. this.signature = "HiTresizer", this.hitable = t, this.rows = t.rows, this.target = t.target;
  3747. }
  3748. return t.prototype.init = function () {
  3749. this.addResizeRowAndColumn(), this.hitable.optionsCoat.options.resizeColumn && this.createColumnGrips(), this.hitable.optionsCoat.options.resizeRow && this.createRowGrips();
  3750. }, t.prototype.resizeTableCellWidth = function () {
  3751. f.resizeTableCellWeight(this.rows);
  3752. }, t.prototype.addResizeRowAndColumn = function () { }, t.prototype.createColumnGrips = function () {
  3753. var t = this,
  3754. e = this,
  3755. n = [],
  3756. i = $('<div class="columngrips"/>');
  3757. i.width(this.target.width()), this.rows.forEach(function (o) {
  3758. o.columns.forEach(function (o, a) {
  3759. if (o.getTarget().attr("haswidth")) {
  3760. var p = $('<div class="columngrip"><div class="gripResizer"></div></div>');
  3761. i.append(p);
  3762. var s = new c(p);
  3763. n.length > 0 && (n[n.length - 1].nextGrip = s), n.push(s), t.syncGrips(o, s), $(p).hidraggable({
  3764. axis: "h",
  3765. onDrag: function onDrag(t, e, n) { },
  3766. moveUnit: "pt",
  3767. minMove: 1,
  3768. onBeforeDrag: function onBeforeDrag(t) {
  3769. if (g.a.instance.draging = !0, !s.nextGrip) return !1;
  3770. e.dragingGrip = s, e.dragingGrip.left = parseFloat(e.dragingGrip.target.css("left").replace("px", "")), s.target.addClass("columngripDraging");
  3771. },
  3772. onStopDrag: function onStopDrag(n) {
  3773. g.a.instance.draging = !1;
  3774. var i = parseFloat(e.dragingGrip.target.css("left").replace("px", "")),
  3775. o = r.a.px.toPt(i - e.dragingGrip.left);
  3776. s.cell.width = s.cell.width + o, s.nextGrip.cell.width = s.nextGrip.cell.width - o, t.resizeTableCellWidth(), s.target.removeClass("columngripDraging"), e.updateColumnGrips();
  3777. }
  3778. });
  3779. }
  3780. });
  3781. }), this.target.before(i), this.cgripContariner = new d(i, n);
  3782. }, t.prototype.updateColumnGrips = function () {
  3783. this.cgripContariner && (this.cgripContariner.target.remove(), this.createColumnGrips());
  3784. }, t.prototype.updateRowGrips = function () {
  3785. this.rgripContariner && (this.rgripContariner.target.remove(), this.createRowGrips());
  3786. }, t.prototype.createRowGrips = function () {
  3787. var t = this,
  3788. e = this,
  3789. n = [],
  3790. i = $('<div class="rowgrips"/>');
  3791. this.rows.forEach(function (o, a) {
  3792. var p = $('<div class="rowgrip"><div class="gripResizer"></div></div>');
  3793. i.append(p);
  3794. var s = new c(p);
  3795. n.push(s), a > 0 && a < t.rows.length && $(p).hidraggable({
  3796. axis: "v",
  3797. onDrag: function onDrag(t, e, n) { },
  3798. moveUnit: "pt",
  3799. minMove: 1,
  3800. onBeforeDrag: function onBeforeDrag(t) {
  3801. e.dragingGrip = s, e.dragingGrip.top = parseFloat(e.dragingGrip.target.css("top").replace("px", "")), s.target.addClass("rowgripDraging");
  3802. },
  3803. onStopDrag: function onStopDrag(t) {
  3804. var n = parseFloat(e.dragingGrip.target.css("top").replace("px", "")),
  3805. i = r.a.px.toPt(n - e.dragingGrip.top + e.rows[a].columns[0].getTarget().height());
  3806. e.rows[a].columns[0].getTarget().css("height", i + "pt"), e.syncRowGrips(), s.target.removeClass("rowgripDraging");
  3807. }
  3808. });
  3809. }), this.target.before(i), this.rgripContariner = new d(i, n), this.syncRowGrips();
  3810. }, t.prototype.syncGrips = function (t, e) {
  3811. var n = t.getTarget();
  3812. e.cell = t, e.target.css({
  3813. left: n.offset().left - this.target.offset().left + n.outerWidth(!1),
  3814. height: 30
  3815. });
  3816. }, t.prototype.syncRowGrips = function () {
  3817. var t = this;
  3818. this.rgripContariner.target.height(this.target.height()), this.rows.forEach(function (e, n) {
  3819. var i = e.columns[0].getTarget();
  3820. t.rgripContariner.grips[n].target.css({
  3821. top: i.offset().top - t.target.offset().top + i.outerHeight(!1),
  3822. width: 30
  3823. });
  3824. });
  3825. }, t.prototype.addResizerHeadRow = function () {
  3826. this.target.find("thead").prepend();
  3827. }, t;
  3828. }(),
  3829. v = function () {
  3830. function t() { }
  3831. return t.prototype.init = function () { }, t.prototype.updateRowGrips = function () { }, t.prototype.updateColumnGrips = function () { }, t;
  3832. }();
  3833. n.d(e, "a", function () {
  3834. return y;
  3835. });
  3836. var y = function () {
  3837. function t(t) {
  3838. this.id = u.a.createId(), this.optionsCoat = new o(t), this.handle = t.handle, this.target = t.table, this.initRows(t.rows), this.init(t), this.tableCellSelector = new p.a(this.rows, this.target), this.resizer = this.optionsCoat.options.columnResizable ? new m(this) : new v(), this.resizer.init();
  3839. }
  3840. return t.prototype.insertRow = function (t, e, n) {
  3841. var i = e || this.tableCellSelector.getSingleSelect(),
  3842. o = i.cell,
  3843. a = this.rows[i.rowIndex],
  3844. p = i.rowIndex,
  3845. s = this.getCellGrid(),
  3846. u = new l.a();
  3847. if (u.init(this.optionsCoat, void 0, a.isHead), n && u.getTarget().addClass(n), "above" == t) s[p].forEach(function (t) {
  3848. var e = t.link ? t.link : t.cell,
  3849. n = e.width / e.colspan;
  3850. if (0 == t.columnLevel) {
  3851. var i = u.createTableCell();
  3852. i.width = n, u.insertCellToLast(i);
  3853. } else {
  3854. if ("column" == t.linkType) {
  3855. var o = t.link.getTarget();
  3856. t.link.rowspan += 1, o.attr("rowspan", t.link.rowspan);
  3857. }
  3858. t.linkType;
  3859. }
  3860. }), this.rows.splice(p, 0, u), a.getTarget().before(u.getTarget()), r.a.event.trigger("newRow" + this.id, u); else {
  3861. var d = p + o.rowspan - 1;
  3862. s[d].forEach(function (t) {
  3863. var e = t.link ? t.link : t.cell,
  3864. n = e.width / e.colspan;
  3865. if (t.bottom) {
  3866. var i = u.createTableCell();
  3867. i.width = n, u.insertCellToLast(i);
  3868. } else {
  3869. if (t.cell) {
  3870. var o = t.cell.getTarget();
  3871. t.cell.rowspan += 1, o.attr("rowspan", t.cell.rowspan);
  3872. }
  3873. if ("column" == t.linkType) {
  3874. o = t.link.getTarget();
  3875. t.link.rowspan += 1, o.attr("rowspan", t.link.rowspan);
  3876. }
  3877. }
  3878. }), this.rows.splice(d + 1, 0, u), this.rows[d].getTarget().after(u.getTarget()), r.a.event.trigger("newRow" + this.id, u);
  3879. }
  3880. }, t.prototype.insertColumn = function (t, e, n, i) {
  3881. var o = this,
  3882. a = this.rows.concat(this.trRows),
  3883. p = e || this.tableCellSelector.getSingleSelect(),
  3884. s = p.cell,
  3885. l = p.rowIndex,
  3886. u = this.getCellGrid(a),
  3887. d = u[l].filter(function (t) {
  3888. return t.cell && t.cell.id == s.id || t.link && t.link.id == s.id;
  3889. });
  3890. if ("left" == t) {
  3891. var c = d[0].indexInTableGridRow;
  3892. u.forEach(function (t, e) {
  3893. var p = t[c],
  3894. s = t.filter(function (t, e) {
  3895. return e >= c && t.cell;
  3896. });
  3897. if (0 == p.rowLevel) {
  3898. var l = a[e],
  3899. u = a[e].createTableCell();
  3900. n && u.getTarget().addClass(n), null != i && (u.width = i), s.length ? l.insertToTargetCellLeft(s[0].cell, u) : l.insertCellToLast(u), r.a.event.trigger("newCell" + o.id, u);
  3901. } else if ("row" == p.linkType) {
  3902. var d = p.link.getTarget();
  3903. p.link.colspan += 1, d.attr("colspan", p.link.colspan);
  3904. }
  3905. });
  3906. } else {
  3907. var h = d[d.length - 1].indexInTableGridRow;
  3908. u.forEach(function (t, e) {
  3909. var p = t[h],
  3910. s = t.filter(function (t, e) {
  3911. return e <= h && t.cell;
  3912. });
  3913. if (p.rightMost) {
  3914. var l = a[e],
  3915. u = l.createTableCell();
  3916. n && u.getTarget().addClass(n), null != i && (u.width = i), s.length ? l.insertToTargetCellRight(s[s.length - 1].cell, u) : l.insertCellToFirst(u), r.a.event.trigger("newCell" + o.id, u);
  3917. } else {
  3918. var d = p.link || p.cell;
  3919. if ("row" == p.linkType) {
  3920. var c = d.getTarget();
  3921. d.colspan += 1, c.attr("colspan", d.colspan);
  3922. }
  3923. if (p.cell) {
  3924. c = d.getTarget();
  3925. d.colspan += 1, c.attr("colspan", d.colspan);
  3926. }
  3927. }
  3928. });
  3929. }
  3930. }, t.prototype.deleteRow = function () {
  3931. var t = this,
  3932. e = this.tableCellSelector.getSingleSelect(),
  3933. n = (e.cell, this.rows[e.rowIndex], e.rowIndex),
  3934. i = this.getCellGrid(),
  3935. o = this.rows[n];
  3936. i[n].forEach(function (e, r) {
  3937. if (e.cell) {
  3938. if (1 == e.cell.rowspan) o.removeCell(e.cell); else {
  3939. o.removeCell(e.cell);
  3940. var a = i[n + 1].filter(function (t, e) {
  3941. return t.cell && e > r;
  3942. }),
  3943. p = t.rows[n + 1],
  3944. s = p.createTableCell(e.cell.rowspan - 1, e.cell.colspan);
  3945. a.length ? p.insertToTargetCellLeft(a[0].cell, s) : p.insertCellToLast(s);
  3946. }
  3947. } else if ("column" == e.linkType) {
  3948. var l = e.link;
  3949. l.rowspan -= 1, l.getTarget().attr("rowspan", l.rowspan);
  3950. }
  3951. }), o.getTarget().remove(), this.rows.splice(n, 1);
  3952. }, t.prototype.deleteColums = function () {
  3953. var t = this.rows.concat(this.trRows),
  3954. e = this.tableCellSelector.getSingleSelect(),
  3955. n = e.cell,
  3956. i = e.rowIndex,
  3957. o = this.getCellGrid(t),
  3958. r = o[i].filter(function (t) {
  3959. return t.cell && t.cell.id == n.id || t.link && t.link.id == n.id;
  3960. })[0].indexInTableGridRow;
  3961. o.forEach(function (e, n) {
  3962. var i = e[r];
  3963. i.cell ? 1 == i.cell.colspan ? t[n].removeCell(i.cell) : (i.cell.colspan -= 1, i.cell.getTarget().attr("colspan", i.cell.colspan)) : "row" == i.linkType && (i.link.colspan -= 1, i.link.getTarget().attr("colspan", i.link.colspan));
  3964. });
  3965. }, t.prototype.mergeCell = function () {
  3966. var t = this,
  3967. e = this.tableCellSelector.getSelectedCells();
  3968. if (0 != e.length) {
  3969. var n = e[0][0].cell;
  3970. e.forEach(function (i, o) {
  3971. i.forEach(function (i, r) {
  3972. 0 == o ? 0 != r && (n.colspan += i.cell.colspan, t.rows[i.rowIndex].removeCell(i.cell)) : t.rows[i.rowIndex].removeCell(i.cell), 0 == r && e[0][0].rowIndex + n.rowspan - 1 < i.rowIndex && (n.rowspan += i.cell.rowspan);
  3973. });
  3974. }), n.getTarget().attr("colspan", n.colspan), n.getTarget().attr("rowspan", n.rowspan), this.tableCellSelector.setSingleSelect(e[0][0]);
  3975. }
  3976. }, t.prototype.splitCell = function () {
  3977. var t = this.tableCellSelector.getSingleSelect(),
  3978. e = this.getCellGrid(),
  3979. n = s.getIndex(e[t.rowIndex], t.cell.id);
  3980. if (t) {
  3981. for (var i = t.rowIndex; i < t.rowIndex + t.cell.rowspan; i++) {
  3982. for (var o = this.rows[i], r = i == t.rowIndex ? t.cell : s.getLeftTableCell(e[i], n), a = 0; a < t.cell.colspan; a++) {
  3983. i == t.rowIndex && 0 == a || (r ? o.insertToTargetCellRight(r, o.createTableCell()) : o.insertCellToFirst(o.createTableCell()));
  3984. }
  3985. }
  3986. t.cell.rowspan = 1, t.cell.colspan = 1, t.cell.getTarget().attr("colspan", t.cell.colspan), t.cell.getTarget().attr("rowspan", t.cell.rowspan);
  3987. }
  3988. }, t.prototype.init = function (t) {
  3989. var e = this;
  3990. $(this.target).addClass("hitable"), this.optionsCoat.onBeforEdit = function (n) {
  3991. if (e.optionsCoat.options.onBeforEdit && !1 === t.onBeforEdit(n)) return !1;
  3992. return e.optionsCoat.editingCell && e.optionsCoat.editingCell.endEdit(), !0;
  3993. }, $(this.target).mousedown(function (t) {
  3994. e.optionsCoat.isLeftMouseButtonDown = !0;
  3995. }), $(this.target).mouseup(function (t) {
  3996. e.optionsCoat.isLeftMouseButtonDown = !1;
  3997. }), this.initContext(), this.target.on("mousemove", function (t) {
  3998. 1 === t.buttons && e.tableCellSelector.multipleSelectByXY(t.pageX, t.pageY);
  3999. }).on("mousedown", function (t) {
  4000. 1 === t.buttons && e.tableCellSelector.singleSelectByXY(t.pageX, t.pageY);
  4001. });
  4002. }, t.prototype.initRows = function (t) {
  4003. var e = this;
  4004. if (this.trRows = [], t) {
  4005. this.rows = t, t.forEach(function (t, n) {
  4006. t.init(e.optionsCoat, e.target.find("tr:eq(" + n + ")"), !0);
  4007. });
  4008. var n = this.optionsCoat.options.trs;
  4009. n && this.initRowsByTrs(n).forEach(function (t) {
  4010. e.trRows.push(t);
  4011. });
  4012. } else this.rows = this.initRowsByTrs(this.target.find("tr"));
  4013. }, t.prototype.initRowsByTrs = function (t) {
  4014. var e = this;
  4015. return t.map(function (t, n) {
  4016. var i = new l.a();
  4017. return i.init(e.optionsCoat, $(n)), i;
  4018. }).get();
  4019. }, t.prototype.enableEidt = function () {
  4020. this.optionsCoat.enableEidt();
  4021. }, t.prototype.disableEdit = function () {
  4022. this.optionsCoat.disableEdit();
  4023. }, t.prototype.getCellGrid = function (t) {
  4024. var e = t || this.rows,
  4025. n = this.getColumnStep(),
  4026. i = new Array();
  4027. return e.forEach(function (t, e) {
  4028. t.columns.forEach(function (t, o) {
  4029. for (var r = 0; r < t.colspan; r++) {
  4030. for (var p = 0, s = !1; p < n && !s;) {
  4031. if (i[e] = i[e] || [], i[e][p]); else {
  4032. i[e][p] = new a({
  4033. cell: 0 == r ? t : void 0,
  4034. link: 0 != r ? t : void 0,
  4035. linkType: r > 0 ? "row" : void 0,
  4036. rightMost: r == t.colspan - 1 || void 0,
  4037. bottom: 0 == t.rowspan - 1,
  4038. rowLevel: r,
  4039. columnLevel: 0,
  4040. indexInTableGridRow: p,
  4041. indexInTableGridColumn: e
  4042. });
  4043. for (var l = e + 1, u = 1; u < t.rowspan; u++) {
  4044. i[l] = i[l] || [], i[l][p] = new a({
  4045. cell: void 0,
  4046. link: t,
  4047. linkType: r > 0 ? "rowColumn" : "column",
  4048. rightMost: r == t.colspan - 1 || void 0,
  4049. bottom: u == t.rowspan - 1,
  4050. rowLevel: r,
  4051. columnLevel: u,
  4052. indexInTableGridRow: p,
  4053. indexInTableGridColumn: l
  4054. }), l += 1;
  4055. }
  4056. s = !0;
  4057. }
  4058. p++;
  4059. }
  4060. }
  4061. });
  4062. }), i;
  4063. }, t.prototype.setAlign = function (t) {
  4064. var e = this.tableCellSelector.getSingleSelect();
  4065. e && e.cell.setAlign(t);
  4066. }, t.prototype.setVAlign = function (t) {
  4067. var e = this.tableCellSelector.getSingleSelect();
  4068. e && e.cell.setVAlign(t);
  4069. }, t.prototype.getColumnStep = function (t) {
  4070. var e = 0;
  4071. return this.rows.length && this.rows[t || 0].columns.forEach(function (t) {
  4072. e += t.colspan;
  4073. }), e;
  4074. }, t.prototype.initContext = function () {
  4075. var t = this;
  4076. if (!this.optionsCoat.options.isEnableContextMenu) return !1;
  4077. $(this.handle).hicontextMenu({
  4078. menus: [{
  4079. text: "在上方插入行",
  4080. enabled: this.optionsCoat.options.isEnableInsertRow,
  4081. disable: function disable() {
  4082. return !t.tableCellSelector.getSingleSelect();
  4083. },
  4084. callback: function callback() {
  4085. t.insertRow("above"), t.resizer.updateRowGrips(), r.a.event.trigger("updateTable" + t.id);
  4086. }
  4087. }, {
  4088. text: "在下方插入行",
  4089. borderBottom: !0,
  4090. enabled: this.optionsCoat.options.isEnableInsertRow,
  4091. disable: function disable() {
  4092. return !t.tableCellSelector.getSingleSelect();
  4093. },
  4094. callback: function callback() {
  4095. t.insertRow("below"), t.resizer.updateRowGrips(), r.a.event.trigger("updateTable" + t.id);
  4096. }
  4097. }, {
  4098. text: "向左方插入列",
  4099. enabled: this.optionsCoat.options.isEnableInsertColumn,
  4100. disable: function disable() {
  4101. return !t.tableCellSelector.getSingleSelect();
  4102. },
  4103. callback: function callback() {
  4104. t.insertColumn("left"), t.resizer.updateColumnGrips(), r.a.event.trigger("updateTable" + t.id);
  4105. }
  4106. }, {
  4107. text: "向右方插入列",
  4108. enabled: this.optionsCoat.options.isEnableInsertColumn,
  4109. disable: function disable() {
  4110. return !t.tableCellSelector.getSingleSelect();
  4111. },
  4112. borderBottom: !0,
  4113. callback: function callback() {
  4114. t.insertColumn("right"), t.resizer.updateColumnGrips(), r.a.event.trigger("updateTable" + t.id);
  4115. }
  4116. }, {
  4117. text: "删除行",
  4118. enabled: this.optionsCoat.options.isEnableDeleteRow,
  4119. disable: function disable() {
  4120. return !t.tableCellSelector.getSingleSelect();
  4121. },
  4122. callback: function callback() {
  4123. t.deleteRow(), t.resizer.updateRowGrips(), r.a.event.trigger("updateTable" + t.id);
  4124. }
  4125. }, {
  4126. text: "删除列",
  4127. borderBottom: !0,
  4128. enabled: this.optionsCoat.options.isEnableDeleteColumn,
  4129. disable: function disable() {
  4130. return !t.tableCellSelector.getSingleSelect();
  4131. },
  4132. callback: function callback() {
  4133. t.deleteColums(), t.resizer.updateColumnGrips(), r.a.event.trigger("updateTable" + t.id);
  4134. }
  4135. }, {
  4136. text: "对齐",
  4137. borderBottom: !0,
  4138. enabled: this.optionsCoat.options.columnAlignEditable,
  4139. menus: [{
  4140. text: "左",
  4141. callback: function callback() {
  4142. t.setAlign("left");
  4143. }
  4144. }, {
  4145. text: "左右居中",
  4146. callback: function callback() {
  4147. t.setAlign("center");
  4148. }
  4149. }, {
  4150. text: "右",
  4151. callback: function callback() {
  4152. t.setAlign("right");
  4153. }
  4154. }, {
  4155. text: "默认",
  4156. borderBottom: !0,
  4157. callback: function callback() {
  4158. t.setAlign("");
  4159. }
  4160. }, {
  4161. text: "上",
  4162. callback: function callback() {
  4163. t.setVAlign("top");
  4164. }
  4165. }, {
  4166. text: "垂直居中",
  4167. callback: function callback() {
  4168. t.setVAlign("middle");
  4169. }
  4170. }, {
  4171. text: "下",
  4172. callback: function callback() {
  4173. t.setVAlign("bottom");
  4174. }
  4175. }, {
  4176. text: "默认",
  4177. callback: function callback() {
  4178. t.setVAlign("");
  4179. }
  4180. }]
  4181. }, {
  4182. text: "合并单元格",
  4183. enabled: this.optionsCoat.options.isEnableMergeCell,
  4184. disable: function disable() {
  4185. return t.tableCellSelector.getSingleSelect();
  4186. },
  4187. callback: function callback() {
  4188. t.mergeCell(), r.a.event.trigger("updateTable" + t.id);
  4189. }
  4190. }, {
  4191. text: "解开单元格",
  4192. enabled: this.optionsCoat.options.isEnableMergeCell,
  4193. disable: function disable() {
  4194. var e = t.tableCellSelector.getSingleSelect();
  4195. return !e || 1 == e.cell.rowspan && 1 == e.cell.colspan;
  4196. },
  4197. callback: function callback() {
  4198. t.splitCell(), r.a.event.trigger("updateTable" + t.id);
  4199. }
  4200. }].filter(function (t) {
  4201. return t.enabled;
  4202. })
  4203. });
  4204. }, t.prototype.getTableWidth = function () {
  4205. return r.a.px.toPt(this.target.outerWidth(!1));
  4206. }, t.prototype.updateColumnGrips = function () {
  4207. this.resizer.updateColumnGrips();
  4208. }, t.prototype.updateRowGrips = function () {
  4209. this.resizer.updateRowGrips();
  4210. }, t;
  4211. }();
  4212. }, function (t, e, n) {
  4213. "use strict";
  4214. n.d(e, "a", function () {
  4215. return i;
  4216. });
  4217. var i = function () {
  4218. return function (t, e, n) {
  4219. this.tid = t, this.options = e, this.printElementType = n;
  4220. };
  4221. }();
  4222. }, function (t, e, n) {
  4223. "use strict";
  4224. var i = n(3),
  4225. o = n(12),
  4226. r = (function () { }(), function () {
  4227. return function (t) {
  4228. this.width = t.width, this.title = t.title, this.columnId = t.columnId, this.fixed = !1, this.rowspan = t.rowspan || 1, this.colspan = t.colspan || 1, this.align = t.align, this.halign = t.halign, this.vAlign = t.vAlign, this.formatter2 = t.formatter2, this.styler2 = t.styler2;
  4229. };
  4230. }()),
  4231. a = n(5);
  4232. n.d(e, "a", function () {
  4233. return l;
  4234. });
  4235. var _p,
  4236. s = (_p = function p(t, e) {
  4237. return (_p = Object.setPrototypeOf || _instanceof({
  4238. __proto__: []
  4239. }, Array) && function (t, e) {
  4240. t.__proto__ = e;
  4241. } || function (t, e) {
  4242. for (var n in e) {
  4243. e.hasOwnProperty(n) && (t[n] = e[n]);
  4244. }
  4245. })(t, e);
  4246. }, function (t, e) {
  4247. function n() {
  4248. this.constructor = t;
  4249. }
  4250. _p(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n());
  4251. }),
  4252. l = function (t) {
  4253. function e(e, n) {
  4254. var i = this;
  4255. (e = e || {}, (i = t.call(this, e) || this).lHeight = e.lHeight, i.autoCompletion = e.autoCompletion, i.tableFooterRepeat = e.tableFooterRepeat, n) && (i.columns = [], n.editable && e.columns && e.columns.length ? e.columns.forEach(function (t) {
  4256. var e = [];
  4257. t.forEach(function (t) {
  4258. var i = new r(t),
  4259. o = n.getColumnByColumnId(i.columnId),
  4260. p = o ? $.extend(o, i) : new a.a(i);
  4261. p.checked = !0, e.push(p);
  4262. }), i.columns.push(new o.a(e));
  4263. }) : n.columns.forEach(function (t) {
  4264. i.columns.push(new o.a(t.filter(function (t) {
  4265. return t.checked;
  4266. })));
  4267. }));
  4268. return i;
  4269. }
  4270. return s(e, t), e.prototype.getColumnByColumnId = function (t) {
  4271. return this.makeColumnObj()[t];
  4272. }, e.prototype.makeColumnObj = function () {
  4273. var t = {};
  4274. return this.columns && this.columns.forEach(function (e) {
  4275. e.columns.forEach(function (e) {
  4276. e.columnId && (t[e.columnId] = e);
  4277. });
  4278. }), t;
  4279. }, e.prototype.getGridColumns = function () {
  4280. return this.gridColumns || 1;
  4281. }, e.prototype.getPrintElementOptionEntity = function () {
  4282. var e = t.prototype.getPrintElementOptionEntity.call(this);
  4283. return this.columns && (e.columns = [], this.columns.forEach(function (t) {
  4284. var n = t.getPrintElementOptionEntity().filter(function (t) {
  4285. return t.checked;
  4286. }).map(function (t) {
  4287. return new r(t);
  4288. });
  4289. e.columns.push(n);
  4290. })), e;
  4291. }, e;
  4292. }(i.a);
  4293. }, function (t, e, n) {
  4294. "use strict";
  4295. n.d(e, "a", function () {
  4296. return i;
  4297. });
  4298. var i = function () {
  4299. return function () {
  4300. this.rowColumns = [];
  4301. };
  4302. }();
  4303. }, function (t, e, n) {
  4304. "use strict";
  4305. n.d(e, "a", function () {
  4306. return i;
  4307. });
  4308. var i = function () {
  4309. function t(t, e) {
  4310. this.gridColumns = t, this.target = e;
  4311. }
  4312. return t.prototype.getByIndex = function (t) {
  4313. return this.target.find(".hi-grid-col:eq(" + t + ")");
  4314. }, t;
  4315. }();
  4316. }, function (t, e, n) {
  4317. t.exports = n(33);
  4318. }, function (t, e) {
  4319. !function (t) {
  4320. function e(e) {
  4321. var n = t.data(e.data.target, "hidraggable"),
  4322. i = n.options,
  4323. o = n.proxy,
  4324. r = e.data,
  4325. a = r.startLeft + e.pageX - r.startX,
  4326. p = r.startTop + e.pageY - r.startY;
  4327. o && (o.parent()[0] == document.body ? (a = null != i.deltaX && null != i.deltaX ? e.pageX + i.deltaX : e.pageX - e.data.offsetWidth, p = null != i.deltaY && null != i.deltaY ? e.pageY + i.deltaY : e.pageY - e.data.offsetHeight) : (null != i.deltaX && null != i.deltaX && (a += e.data.offsetWidth + i.deltaX), null != i.deltaY && null != i.deltaY && (p += e.data.offsetHeight + i.deltaY))), e.data.parent != document.body && (a += t(e.data.parent).scrollLeft(), p += t(e.data.parent).scrollTop()), "h" == i.axis ? r.left = a : "v" == i.axis ? r.top = p : (r.left = a, r.top = p);
  4328. }
  4329. function n(e) {
  4330. var n = t.data(e.data.target, "hidraggable"),
  4331. i = n.options,
  4332. o = n.proxy;
  4333. o || (o = t(e.data.target)), o.css({
  4334. left: t.fn.dragLengthC(e.data.left, i),
  4335. top: t.fn.dragLengthC(e.data.top, i)
  4336. }), t("body").css("cursor", i.cursor);
  4337. }
  4338. function i(i) {
  4339. t.fn.hidraggable.isDragging = !0;
  4340. var o = t.data(i.data.target, "hidraggable"),
  4341. r = o.options,
  4342. a = t(".hidroppable").filter(function () {
  4343. return i.data.target != this;
  4344. }).filter(function () {
  4345. var e = t.data(this, "hidroppable").options.accept;
  4346. return !e || t(e).filter(function () {
  4347. return this == i.data.target;
  4348. }).length > 0;
  4349. });
  4350. o.hidroppables = a;
  4351. var p = o.proxy;
  4352. return p || (r.proxy ? (p = "clone" == r.proxy ? t(i.data.target).clone().insertAfter(i.data.target) : r.proxy.call(i.data.target, i.data.target), o.proxy = p) : p = t(i.data.target)), p.css("position", "absolute"), e(i), n(i), r.onStartDrag.call(i.data.target, i), !1;
  4353. }
  4354. function o(i) {
  4355. var o = t.data(i.data.target, "hidraggable");
  4356. e(i), 0 != o.options.onDrag.call(i.data.target, i, t.fn.dragLengthCNum(i.data.left, o.options), t.fn.dragLengthCNum(i.data.top, o.options)) && n(i);
  4357. var r = i.data.target;
  4358. return o.hidroppables.each(function () {
  4359. var e = t(this);
  4360. if (!e.hidroppable("options").disabled) {
  4361. var n = e.offset();
  4362. i.pageX > n.left && i.pageX < n.left + e.outerWidth() && i.pageY > n.top && i.pageY < n.top + e.outerHeight() ? (this.entered || (t(this).trigger("_dragenter", [r]), this.entered = !0), t(this).trigger("_dragover", [r])) : this.entered && (t(this).trigger("_dragleave", [r]), this.entered = !1);
  4363. }
  4364. }), !1;
  4365. }
  4366. function r(e) {
  4367. t.fn.hidraggable.isDragging = !1, o(e);
  4368. var n,
  4369. i,
  4370. r = t.data(e.data.target, "hidraggable"),
  4371. a = r.proxy,
  4372. p = r.options;
  4373. p.revert ? 1 == l() ? t(e.data.target).css({
  4374. position: e.data.startPosition,
  4375. left: e.data.startLeft,
  4376. top: e.data.startTop
  4377. }) : a ? (a.parent()[0] == document.body ? (n = e.data.startX - e.data.offsetWidth, i = e.data.startY - e.data.offsetHeight) : (n = e.data.startLeft, i = e.data.startTop), a.animate({
  4378. left: n,
  4379. top: i
  4380. }, function () {
  4381. s();
  4382. })) : t(e.data.target).animate({
  4383. left: e.data.startLeft,
  4384. top: e.data.startTop
  4385. }, function () {
  4386. t(e.data.target).css("position", e.data.startPosition);
  4387. }) : (t(e.data.target).css({
  4388. position: "absolute",
  4389. left: t.fn.dragLengthC(e.data.left, p),
  4390. top: t.fn.dragLengthC(e.data.top, p)
  4391. }), l());
  4392. function s() {
  4393. a && a.remove(), r.proxy = null;
  4394. }
  4395. function l() {
  4396. var n = !1;
  4397. return r.hidroppables.each(function () {
  4398. var i = t(this);
  4399. if (!i.hidroppable("options").disabled) {
  4400. var o = i.offset();
  4401. return e.pageX > o.left && e.pageX < o.left + i.outerWidth() && e.pageY > o.top && e.pageY < o.top + i.outerHeight() ? (p.revert && t(e.data.target).css({
  4402. position: e.data.startPosition,
  4403. left: e.data.startLeft,
  4404. top: e.data.startTop
  4405. }), t(this).trigger("_drop", [e.data.target]), s(), n = !0, this.entered = !1, !1) : void 0;
  4406. }
  4407. }), n || p.revert || s(), n;
  4408. }
  4409. return p.onStopDrag.call(e.data.target, e), t(document).unbind(".hidraggable"), setTimeout(function () {
  4410. t("body").css("cursor", "");
  4411. }, 100), !1;
  4412. }
  4413. t.fn.hidraggable = function (e, n) {
  4414. return "string" == typeof e ? t.fn.hidraggable.methods[e](this, n) : this.each(function () {
  4415. var n,
  4416. a = t.data(this, "hidraggable");
  4417. a ? (a.handle.unbind(".hidraggable"), n = t.extend(a.options, e)) : n = t.extend({}, t.fn.hidraggable.defaults, t.fn.hidraggable.parseOptions(this), e || {});
  4418. var p = n.handle ? "string" == typeof n.handle ? t(n.handle, this) : n.handle : t(this);
  4419. function s(e) {
  4420. var n = t.data(e.data.target, "hidraggable"),
  4421. i = n.handle,
  4422. o = t(i).offset(),
  4423. r = t(i).outerWidth(),
  4424. a = t(i).outerHeight(),
  4425. p = e.pageY - o.top,
  4426. s = o.left + r - e.pageX,
  4427. l = o.top + a - e.pageY,
  4428. u = e.pageX - o.left;
  4429. return Math.min(p, s, l, u) > n.options.edge;
  4430. }
  4431. t.data(this, "hidraggable", {
  4432. options: n,
  4433. handle: p
  4434. }), n.disabled ? t(this).css("cursor", "") : p.unbind(".hidraggable").bind("mousemove.hidraggable", {
  4435. target: this
  4436. }, function (e) {
  4437. if (!t.fn.hidraggable.isDragging) {
  4438. var n = t.data(e.data.target, "hidraggable").options;
  4439. s(e) ? t(this).css("cursor", n.cursor) : t(this).css("cursor", "");
  4440. }
  4441. }).bind("mouseleave.hidraggable", {
  4442. target: this
  4443. }, function (e) {
  4444. t(this).css("cursor", "");
  4445. }).bind("mousedown.hidraggable", {
  4446. target: this
  4447. }, function (e) {
  4448. if (0 != s(e)) {
  4449. t(this).css("cursor", "");
  4450. var n = t(e.data.target).position(),
  4451. a = t(e.data.target).offset(),
  4452. p = {
  4453. startPosition: t(e.data.target).css("position"),
  4454. startLeft: n.left,
  4455. startTop: n.top,
  4456. left: n.left,
  4457. top: n.top,
  4458. startX: e.pageX,
  4459. startY: e.pageY,
  4460. offsetWidth: e.pageX - a.left,
  4461. offsetHeight: e.pageY - a.top,
  4462. target: e.data.target,
  4463. parent: t(e.data.target).parent()[0]
  4464. };
  4465. t.extend(e.data, p), 0 != t.data(e.data.target, "hidraggable").options.onBeforeDrag.call(e.data.target, e) && (t(document).bind("mousedown.hidraggable", e.data, i), t(document).bind("mousemove.hidraggable", e.data, o), t(document).bind("mouseup.hidraggable", e.data, r));
  4466. }
  4467. });
  4468. });
  4469. }, t.fn.hidraggable.methods = {
  4470. options: function options(e) {
  4471. return t.data(e[0], "hidraggable").options;
  4472. },
  4473. proxy: function proxy(e) {
  4474. return t.data(e[0], "hidraggable").proxy;
  4475. },
  4476. enable: function enable(e) {
  4477. return e.each(function () {
  4478. t(this).hidraggable({
  4479. disabled: !1
  4480. });
  4481. });
  4482. },
  4483. disable: function disable(e) {
  4484. return e.each(function () {
  4485. t(this).hidraggable({
  4486. disabled: !0
  4487. });
  4488. });
  4489. }
  4490. }, t.fn.hidraggable.parseOptions = function (e) {
  4491. var n = t(e);
  4492. return t.extend({}, t.hiprintparser.parseOptions(e, ["cursor", "handle", "axis", {
  4493. revert: "boolean",
  4494. deltaX: "number",
  4495. deltaY: "number",
  4496. edge: "number"
  4497. }]), {
  4498. disabled: !!n.attr("disabled") || void 0
  4499. });
  4500. }, t.fn.hidraggable.defaults = {
  4501. proxy: null,
  4502. revert: !1,
  4503. cursor: "move",
  4504. deltaX: null,
  4505. deltaY: null,
  4506. handle: null,
  4507. disabled: !1,
  4508. edge: 0,
  4509. axis: null,
  4510. onBeforeDrag: function onBeforeDrag(t) { },
  4511. onStartDrag: function onStartDrag(t) { },
  4512. onDrag: function onDrag(t) { },
  4513. onStopDrag: function onStopDrag(t) { }
  4514. }, t.fn.hidraggable.isDragging = !1;
  4515. }(jQuery);
  4516. }, function (t, e) {
  4517. !function (t) {
  4518. t.fn.hidroppable = function (e, n) {
  4519. return "string" == typeof e ? t.fn.hidroppable.methods[e](this, n) : (e = e || {}, this.each(function () {
  4520. var n,
  4521. i = t.data(this, "hidroppable");
  4522. i ? t.extend(i.options, e) : (t(n = this).addClass("hidroppable"), t(n).bind("_dragenter", function (e, i) {
  4523. t.data(n, "hidroppable").options.onDragEnter.apply(n, [e, i]);
  4524. }), t(n).bind("_dragleave", function (e, i) {
  4525. t.data(n, "hidroppable").options.onDragLeave.apply(n, [e, i]);
  4526. }), t(n).bind("_dragover", function (e, i) {
  4527. t.data(n, "hidroppable").options.onDragOver.apply(n, [e, i]);
  4528. }), t(n).bind("_drop", function (e, i) {
  4529. t.data(n, "hidroppable").options.onDrop.apply(n, [e, i]);
  4530. }), t.data(this, "hidroppable", {
  4531. options: t.extend({}, t.fn.hidroppable.defaults, t.fn.hidroppable.parseOptions(this), e)
  4532. }));
  4533. }));
  4534. }, t.fn.hidroppable.methods = {
  4535. options: function options(e) {
  4536. return t.data(e[0], "hidroppable").options;
  4537. },
  4538. enable: function enable(e) {
  4539. return e.each(function () {
  4540. t(this).hidroppable({
  4541. disabled: !1
  4542. });
  4543. });
  4544. },
  4545. disable: function disable(e) {
  4546. return e.each(function () {
  4547. t(this).hidroppable({
  4548. disabled: !0
  4549. });
  4550. });
  4551. }
  4552. }, t.fn.hidroppable.parseOptions = function (e) {
  4553. var n = t(e);
  4554. return t.extend({}, t.hiprintparser.parseOptions(e, ["accept"]), {
  4555. disabled: !!n.attr("disabled") || void 0
  4556. });
  4557. }, t.fn.hidroppable.defaults = {
  4558. accept: null,
  4559. disabled: !1,
  4560. onDragEnter: function onDragEnter(t, e) { },
  4561. onDragOver: function onDragOver(t, e) { },
  4562. onDragLeave: function onDragLeave(t, e) { },
  4563. onDrop: function onDrop(t, e) { }
  4564. };
  4565. }(jQuery);
  4566. }, function (t, e) {
  4567. var n;
  4568. (n = jQuery).hiprintparser = {
  4569. parseOptions: function parseOptions(t, e) {
  4570. var i = n(t),
  4571. o = {},
  4572. r = n.trim(i.attr("data-options"));
  4573. if (r && ("{" != r.substring(0, 1) && (r = "{" + r + "}"), o = new Function("return " + r)()), e) {
  4574. for (var a = {}, p = 0; p < e.length; p++) {
  4575. var s = e[p];
  4576. if ("string" == typeof s) a[s] = "width" == s || "height" == s || "left" == s || "top" == s ? parseInt(t.style[s]) || void 0 : i.attr(s); else for (var l in s) {
  4577. var u = s[l];
  4578. "boolean" == u ? a[l] = i.attr(l) ? "true" == i.attr(l) : void 0 : "number" == u && (a[l] = "0" == i.attr(l) ? 0 : parseFloat(i.attr(l)) || void 0);
  4579. }
  4580. }
  4581. n.extend(o, a);
  4582. }
  4583. return o;
  4584. }
  4585. }, n.fn.dragLengthC = function (t, e) {
  4586. return "pt" == e.moveUnit ? n.fn.dragLengthCNum(t, e) + "pt" : n.fn.dragLengthCNum(t, e);
  4587. }, n.fn.dragLengthCNum = function (t, e) {
  4588. var n = 3;
  4589. if ("pt" == e.moveUnit) {
  4590. var i = .75 * t;
  4591. return e.minMove && (n = e.minMove), Math.round(i / n) * n;
  4592. }
  4593. return Math.round(i / n) * n;
  4594. };
  4595. }, function (t, e) {
  4596. var n, i, o;
  4597. n = jQuery, i = {
  4598. maxPanelIndex: 0
  4599. }, (o = function o(t) {
  4600. this.options = n.data(t.target, "hireizeable").options, this.init(t.target);
  4601. }).prototype = {
  4602. numHandlerText: function numHandlerText(t) {
  4603. return this.numHandler(t) + "pt";
  4604. },
  4605. numHandler: function numHandler(t) {
  4606. var e = 1.5,
  4607. n = .75 * t;
  4608. return this.options.minResize && (e = this.options.minResize), Math.round(n / e) * e;
  4609. },
  4610. init: function init(t) {
  4611. this.initResizeBox(t);
  4612. },
  4613. initResizeBox: function initResizeBox(t) {
  4614. var e = this;
  4615. n(t).each(function () {
  4616. var o;
  4617. i.maxPanelIndex += 1, e.options.noContainer ? o = n(t) : (o = n("<div panelIndex=" + i.maxPanelIndex + ' class="resize-panel"></div>')).css({
  4618. width: "100%",
  4619. height: "100%",
  4620. top: 0,
  4621. left: 0,
  4622. position: "absolute",
  4623. "background-color": "rgba(0,0,0,0.5)",
  4624. cursor: "move",
  4625. display: "none"
  4626. }), e.appendHandler(o, n(this));
  4627. var r = {
  4628. name: "n",
  4629. target: n('<div class="n resizebtn" style="cursor: n-resize;top: -12px;margin-left: -4px;left: 50%;"></div>')
  4630. },
  4631. a = {
  4632. name: "s",
  4633. target: n('<div class="s resizebtn" style="cursor: s-resize;bottom: -12px;margin-left: -4px;left: 50%;"></div>')
  4634. },
  4635. p = {
  4636. name: "w",
  4637. target: n('<div class="w resizebtn" style="cursor: w-resize;left: -12px;margin-top: -4px;top: 50%;"></div>')
  4638. },
  4639. s = {
  4640. name: "e",
  4641. target: n('<div class="e resizebtn" style="cursor: e-resize; top: 50%; margin-top:-4px;right: -12px;"></div>')
  4642. },
  4643. l = {
  4644. name: "ne",
  4645. target: n('<div class="ne resizebtn" style="cursor: ne-resize;top: -12px;right: -12px;"></div>')
  4646. },
  4647. u = {
  4648. name: "nw",
  4649. target: n('<div class="nw resizebtn" style=" cursor: nw-resize;top: -12px;left:-12px;"></div>')
  4650. },
  4651. d = {
  4652. name: "se",
  4653. target: n('<div class="se resizebtn" style="cursor: se-resize;bottom:-12px;right: -12px;"></div>')
  4654. },
  4655. c = {
  4656. name: "sw",
  4657. target: n('<div class="sw resizebtn" style="cursor: sw-resize;bottom: -12px;left: -12px;"></div>')
  4658. },
  4659. h = function h() {
  4660. var t = [],
  4661. i = e.options.showPoints;
  4662. return n.each([r, a, p, s, l, u, d, c], function (e, o) {
  4663. n.inArray(o.name, i) > -1 && t.push(o.target);
  4664. }), t;
  4665. };
  4666. e.addHandlerCss(h()), e.appendHandler(h(), o), e.bindResizeEvent(o, n(this));
  4667. var f = n(this);
  4668. n(o).on("mousedown", ".resizebtn", function () {
  4669. f.addClass("resizeing");
  4670. }), n(".easyui-droppable").on("mouseup", function () {
  4671. f.removeClass("resizeing");
  4672. }), e.bindTrigger(n(this));
  4673. }), e.bindHidePanel();
  4674. },
  4675. addHandlerCss: function addHandlerCss(t) {
  4676. for (var e = 0; e < t.length; e++) {
  4677. t[e].css({
  4678. position: "absolute",
  4679. width: "8px",
  4680. height: "8px",
  4681. background: "#ff6600",
  4682. "border-radius": "50%"
  4683. });
  4684. }
  4685. },
  4686. appendHandler: function appendHandler(t, e) {
  4687. for (var n = 0; n < t.length; n++) {
  4688. e.append(t[n]);
  4689. }
  4690. },
  4691. triggerResize: function triggerResize(t) {
  4692. t.siblings().children("div[panelindex]").css({
  4693. display: "none"
  4694. }), t.children("div[panelindex]").css({
  4695. display: "block"
  4696. });
  4697. },
  4698. bindResizeEvent: function bindResizeEvent(t, e) {
  4699. var i = this,
  4700. o = 0,
  4701. r = 0,
  4702. a = t.width(),
  4703. p = t.height(),
  4704. s = t.offset().left,
  4705. l = t.offset().top,
  4706. u = i.options.noContainer ? n(e) : t.parent(),
  4707. d = !1;
  4708. t.on("mousedown", ".e", function (e) {
  4709. o = e.pageX, a = t.width(), d = !0;
  4710. });
  4711. var c = !1;
  4712. t.on("mousedown", ".s", function (e) {
  4713. r = e.pageY, p = t.height(), c = !0;
  4714. });
  4715. var h = !1;
  4716. t.on("mousedown", ".w", function (e) {
  4717. o = e.pageX, a = t.width(), h = !0, s = u.offset().left;
  4718. });
  4719. var f = !1;
  4720. t.on("mousedown", ".n", function (e) {
  4721. r = e.pageY, p = t.height(), f = !0, l = u.offset().top;
  4722. });
  4723. var g = !1;
  4724. t.on("mousedown", ".ne", function (e) {
  4725. o = e.pageX, r = e.pageY, a = t.width(), p = t.height(), g = !0, l = u.offset().top;
  4726. });
  4727. var m = !1;
  4728. t.on("mousedown", ".nw", function (e) {
  4729. o = e.pageX, r = e.pageY, a = t.width(), p = t.height(), l = u.offset().top, s = u.offset().left, m = !0;
  4730. });
  4731. var v = !1;
  4732. t.on("mousedown", ".se", function (e) {
  4733. o = e.pageX, r = e.pageY, a = t.width(), p = t.height(), v = !0;
  4734. });
  4735. var y = !1;
  4736. t.on("mousedown", ".sw", function (e) {
  4737. o = e.pageX, r = e.pageY, a = t.width(), p = t.height(), y = !0, s = u.offset().left;
  4738. });
  4739. var b = !1;
  4740. t.on("mousedown", function (t) {
  4741. i.options.onBeforeResize(), o = t.pageX, r = t.pageY, l = u.offset().top, s = u.offset().left, b = !1;
  4742. }), n(i.options.stage).on("mousemove", function (e) {
  4743. if (d) {
  4744. var n = e.pageX - o;
  4745. t.css({
  4746. width: "100%"
  4747. }), u.css({
  4748. width: i.numHandlerText(a + n)
  4749. }), i.options.onResize(e, void 0, i.numHandler(a + n), void 0, void 0);
  4750. } else if (c) {
  4751. var E = e.pageY - r;
  4752. t.css({
  4753. height: "100%"
  4754. }), u.css({
  4755. height: i.numHandlerText(p + E)
  4756. }), i.options.onResize(e, i.numHandler(p + E), void 0, void 0, void 0);
  4757. } else h ? (n = e.pageX - o, t.css({
  4758. width: "100%"
  4759. }), u.css({
  4760. width: i.numHandlerText(a - n),
  4761. left: i.numHandlerText(i.options.noDrag ? void 0 : i.numHandler(s + n))
  4762. }), i.options.onResize(e, void 0, i.numHandler(a - n), void 0, i.options.noDrag ? void 0 : i.numHandler(s + n))) : f ? (E = e.pageY - r, t.css({
  4763. height: "100%"
  4764. }), u.css({
  4765. height: i.numHandlerText(p - E),
  4766. top: i.numHandlerText(i.options.noDrag ? void 0 : l + E)
  4767. }), i.options.onResize(e, i.numHandler(p - E), void 0, i.options.noDrag ? void 0 : i.numHandler(l + E), void 0)) : g ? (n = e.pageX - o, E = e.pageY - r, t.css({
  4768. height: "100%",
  4769. width: "100%"
  4770. }), u.css({
  4771. height: i.numHandlerText(p - E),
  4772. top: i.numHandlerText(i.options.noDrag ? void 0 : l + E),
  4773. width: i.numHandlerText(a + n)
  4774. }), i.options.onResize(e, i.numHandler(p - E), i.numHandler(a + n), i.options.noDrag ? void 0 : i.numHandler(l + E), void 0)) : m ? (n = e.pageX - o, E = e.pageY - r, t.css({
  4775. height: "100%",
  4776. width: "100%"
  4777. }), u.css({
  4778. height: i.numHandlerText(p - E),
  4779. top: i.numHandlerText(i.options.noDrag ? void 0 : l + E),
  4780. width: i.numHandlerText(a - n),
  4781. left: i.numHandlerText(i.options.noDrag ? void 0 : s + n)
  4782. }), i.options.onResize(e, i.numHandler(p - E), i.numHandler(a - n), i.options.noDrag ? void 0 : i.numHandler(l + E), i.options.noDrag ? void 0 : i.numHandler(s + n))) : v ? (n = e.pageX - o, E = e.pageY - r, t.css({
  4783. width: "100%",
  4784. height: "100%"
  4785. }), u.css({
  4786. width: i.numHandlerText(a + n),
  4787. height: i.numHandlerText(p + E)
  4788. }), i.options.onResize(e, i.numHandler(p + E), i.numHandler(a + n), void 0, void 0)) : y ? (n = e.pageX - o, E = e.pageY - r, t.css({
  4789. width: "100%",
  4790. height: "100%"
  4791. }), u.css({
  4792. width: i.numHandlerText(a - n),
  4793. left: i.numHandlerText(i.options.noDrag ? void 0 : s + n),
  4794. height: i.numHandlerText(p + E)
  4795. }), i.options.onResize(e, i.numHandler(p + E), i.numHandler(a - n), i.numHandler(otundefinedop), i.options.noDrag ? void 0 : i.numHandler(s + n))) : b && (n = e.pageX - o, E = e.pageY - r, u.css({
  4796. left: i.numHandlerText(i.options.noDrag ? void 0 : s + n),
  4797. top: i.numHandlerText(i.options.noDrag ? void 0 : l + E)
  4798. }), i.options.onResize(e, void 0, void 0, i.options.noDrag ? void 0 : i.numHandler(l + E), i.options.noDrag ? void 0 : i.numHandler(s + n)));
  4799. }).on("mouseup", function (t) {
  4800. d = !1, c = !1, h = !1, f = !1, g = !1, m = !1, y = !1, v = !1, b = !1, i.options.onStopResize();
  4801. });
  4802. },
  4803. bindTrigger: function bindTrigger(t) {
  4804. var e = this;
  4805. t.on("click", function (n) {
  4806. n.stopPropagation(), e.triggerResize(t);
  4807. });
  4808. },
  4809. bindHidePanel: function bindHidePanel(t) {
  4810. if (i.maxPanelIndex < 2) {
  4811. var e = this.options.stage;
  4812. n(e).bind("click", function (t) {
  4813. t.stopPropagation(), n("div[panelindex]").css({
  4814. display: "none"
  4815. });
  4816. });
  4817. }
  4818. }
  4819. }, n.fn.extend({
  4820. hireizeable: function hireizeable(t) {
  4821. return this.each(function () {
  4822. var e,
  4823. i = n.data(this, "hireizeable");
  4824. e = i ? n.extend(i.options, _1f) : n.extend({}, n.fn.hireizeable.defaults, t || {}), n.data(this, "hireizeable", {
  4825. options: e
  4826. }), new o({
  4827. target: this,
  4828. onResize: function onResize(t, e, n, i, o) { },
  4829. onStopResize: function onStopResize(t, e, n, i, o) { }
  4830. });
  4831. });
  4832. }
  4833. }), n.fn.hireizeable.defaults = {
  4834. stage: document,
  4835. reizeUnit: "pt",
  4836. minResize: 1.5,
  4837. showPoints: ["s", "e"],
  4838. noContainer: !1,
  4839. onBeforeResize: function onBeforeResize(t, e, n, i, o) { },
  4840. onResize: function onResize(t, e, n, i, o) { },
  4841. onStopResize: function onStopResize(t, e, n, i, o) { },
  4842. noDrag: !1
  4843. };
  4844. }, function (t, e) {
  4845. var n, i;
  4846. jQuery, n = "connected", i = "reconnecting", window.hiwebSocket = {
  4847. opened: !1,
  4848. name: "webSockets",
  4849. reconnectTimeout: 6e4,
  4850. reconnectWindowSetTimeout: null,
  4851. reconnectDelay: 2e3,
  4852. supportsKeepAlive: function supportsKeepAlive() {
  4853. return !0;
  4854. },
  4855. hasIo: function hasIo(t) {
  4856. return window.io;
  4857. },
  4858. send: function send(t) {
  4859. try {
  4860. this.socket.emit("news", t);
  4861. } catch (e) {
  4862. console.log("send data error:" + (t || "") + JSON.stringify(e));
  4863. }
  4864. },
  4865. getPrinterList: function getPrinterList() {
  4866. return this.printerList;
  4867. },
  4868. start: function start() {
  4869. var _this = this;
  4870. var t = this;
  4871. window.WebSocket ? this.socket || (this.socket = io("http://localhost:17521", {
  4872. reconnectionAttempts: 5
  4873. }), this.socket.on("connect", function (e) {
  4874. t.opened = !0, console.log("Websocket opened."), _this.socket.on("successs", function (t) {
  4875. hinnn.event.trigger("printSuccess_" + t.templateId, t);
  4876. }), _this.socket.on("error", function (t) {
  4877. hinnn.event.trigger("printError_" + t.templateId, t);
  4878. }), _this.socket.on("printerList", function (e) {
  4879. t.printerList = e;
  4880. }), t.state = n;
  4881. }), this.socket.on("disconnect", function () {
  4882. t.opened = !1;
  4883. })) : console.log("WebSocket start fail");
  4884. },
  4885. reconnect: function reconnect() {
  4886. this.state !== n && this.state !== i || (this.stop(), this.ensureReconnectingState() && (console.log("Websocket reconnecting."), this.start()));
  4887. },
  4888. stop: function stop() {
  4889. this.socket && (console.log("Closing the Websocket."), this.socket.close(), this.socket = null);
  4890. },
  4891. ensureReconnectingState: function ensureReconnectingState() {
  4892. return this.state = i, this.state === i;
  4893. }
  4894. };
  4895. }, function (t, e, n) {
  4896. var i = n(28);
  4897. "string" == typeof i && (i = [[t.i, i, ""]]);
  4898. var o = {
  4899. hmr: !0,
  4900. transform: void 0,
  4901. insertInto: void 0
  4902. };
  4903. n(30)(i, o);
  4904. i.locals && (t.exports = i.locals);
  4905. }, function (t, e, n) {
  4906. (t.exports = n(29)(!1)).push([t.i, ".hicontextmenu {\r\n\tposition: absolute;\r\n\tdisplay: inline-block;\r\n\twidth: 215px;\r\n\tpadding: 0 0;\r\n\tmargin: 0;\r\n\tfont-family: inherit;\r\n\tfont-size: inherit;\r\n\tlist-style-type: none;\r\n\tlist-style: none;\r\n\tbackground: #fff;\r\n\tborder: 1px solid #bebebe;\r\n\tborder-radius: 2px;\r\n\tfont-size: 13px;\r\n}\r\n\r\n.hicontextmenuroot .hicontextmenuitem {\r\n\tposition: relative;\r\n\t-webkit-box-sizing: content-box;\r\n\t-moz-box-sizing: content-box;\r\n\tbox-sizing: content-box;\r\n\tpadding: .2em 12px;\r\n\tcolor: #2f2f2f;\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\ttext-decoration: none;\r\n\r\n\tuser-select: none;\r\n\tbackground-color: #fff;\r\n\r\n}\r\n\r\n.hicontextmenuroot>.hicontextmenuitem:hover,\r\n.hicontextmenuroot .hicontextmenuitem > a:hover {\r\n\tbackground-color: #f3f3f3;\r\n}\r\n\r\n.hicontextmenuroot .hicontextmenuitem>a {\r\n\ttext-decoration: none;\r\n\tcolor: #363636;\r\n\tline-height: 22px;\r\n\r\n}\r\n\r\n.hicontextmenuroot .hicontextsubmenu>ul {\r\n\tdisplay: none;\r\n\tposition: absolute;\r\n\r\n}\r\n\r\n.hicontextmenuroot .hicontextsubmenu:hover>ul {\r\n\tdisplay: block;\r\n\tleft: 100%;\r\n\ttop: -1px;\r\n\tmargin-left: 0px;\r\n}\r\n\r\n.hicontextmenuroot .borderBottom {\r\n\tborder-bottom: 1px solid #efe6e6;\r\n}\r\n\r\n.hicontextmenuroot .disable> a {\r\n \r\n color: #ccc;\r\n \r\n}\r\n.hicontextmenuroot>.disable:hover,\r\n.hicontextmenuroot .disable> a:hover {\r\n\tbackground-color:#fff;\r\n}", ""]);
  4907. }, function (t, e, n) {
  4908. "use strict";
  4909. t.exports = function (t) {
  4910. var e = [];
  4911. return e.toString = function () {
  4912. return this.map(function (e) {
  4913. var n = function (t, e) {
  4914. var n = t[1] || "",
  4915. i = t[3];
  4916. if (!i) return n;
  4917. if (e && "function" == typeof btoa) {
  4918. var o = (a = i, "/*# sourceMappingURL=data:application/json;charset=utf-8;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(a)))) + " */"),
  4919. r = i.sources.map(function (t) {
  4920. return "/*# sourceURL=" + i.sourceRoot + t + " */";
  4921. });
  4922. return [n].concat(r).concat([o]).join("\n");
  4923. }
  4924. var a;
  4925. return [n].join("\n");
  4926. }(e, t);
  4927. return e[2] ? "@media " + e[2] + "{" + n + "}" : n;
  4928. }).join("");
  4929. }, e.i = function (t, n) {
  4930. "string" == typeof t && (t = [[null, t, ""]]);
  4931. for (var i = {}, o = 0; o < this.length; o++) {
  4932. var r = this[o][0];
  4933. null != r && (i[r] = !0);
  4934. }
  4935. for (o = 0; o < t.length; o++) {
  4936. var a = t[o];
  4937. null != a[0] && i[a[0]] || (n && !a[2] ? a[2] = n : n && (a[2] = "(" + a[2] + ") and (" + n + ")"), e.push(a));
  4938. }
  4939. }, e;
  4940. };
  4941. }, function (t, e, n) {
  4942. var i,
  4943. o,
  4944. r = {},
  4945. a = (i = function i() {
  4946. return window && document && document.all && !window.atob;
  4947. }, function () {
  4948. return void 0 === o && (o = i.apply(this, arguments)), o;
  4949. }),
  4950. p = function (t) {
  4951. var e = {};
  4952. return function (t, n) {
  4953. if ("function" == typeof t) return t();
  4954. if (void 0 === e[t]) {
  4955. var i = function (t, e) {
  4956. return e ? e.querySelector(t) : document.querySelector(t);
  4957. }.call(this, t, n);
  4958. if (window.HTMLIFrameElement && _instanceof(i, window.HTMLIFrameElement)) try {
  4959. i = i.contentDocument.head;
  4960. } catch (t) {
  4961. i = null;
  4962. }
  4963. e[t] = i;
  4964. }
  4965. return e[t];
  4966. };
  4967. }(),
  4968. s = null,
  4969. l = 0,
  4970. u = [],
  4971. d = n(31);
  4972. function c(t, e) {
  4973. for (var n = 0; n < t.length; n++) {
  4974. var i = t[n],
  4975. o = r[i.id];
  4976. if (o) {
  4977. o.refs++;
  4978. for (var a = 0; a < o.parts.length; a++) {
  4979. o.parts[a](i.parts[a]);
  4980. }
  4981. for (; a < i.parts.length; a++) {
  4982. o.parts.push(y(i.parts[a], e));
  4983. }
  4984. } else {
  4985. var p = [];
  4986. for (a = 0; a < i.parts.length; a++) {
  4987. p.push(y(i.parts[a], e));
  4988. }
  4989. r[i.id] = {
  4990. id: i.id,
  4991. refs: 1,
  4992. parts: p
  4993. };
  4994. }
  4995. }
  4996. }
  4997. function h(t, e) {
  4998. for (var n = [], i = {}, o = 0; o < t.length; o++) {
  4999. var r = t[o],
  5000. a = e.base ? r[0] + e.base : r[0],
  5001. p = {
  5002. css: r[1],
  5003. media: r[2],
  5004. sourceMap: r[3]
  5005. };
  5006. i[a] ? i[a].parts.push(p) : n.push(i[a] = {
  5007. id: a,
  5008. parts: [p]
  5009. });
  5010. }
  5011. return n;
  5012. }
  5013. function f(t, e) {
  5014. var n = p(t.insertInto);
  5015. if (!n) throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
  5016. var i = u[u.length - 1];
  5017. if ("top" === t.insertAt) i ? i.nextSibling ? n.insertBefore(e, i.nextSibling) : n.appendChild(e) : n.insertBefore(e, n.firstChild), u.push(e); else if ("bottom" === t.insertAt) n.appendChild(e); else {
  5018. if ("object" != _typeof(t.insertAt) || !t.insertAt.before) throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
  5019. var o = p(t.insertAt.before, n);
  5020. n.insertBefore(e, o);
  5021. }
  5022. }
  5023. function g(t) {
  5024. if (null === t.parentNode) return !1;
  5025. t.parentNode.removeChild(t);
  5026. var e = u.indexOf(t);
  5027. e >= 0 && u.splice(e, 1);
  5028. }
  5029. function m(t) {
  5030. var e = document.createElement("style");
  5031. if (void 0 === t.attrs.type && (t.attrs.type = "text/css"), void 0 === t.attrs.nonce) {
  5032. var i = function () {
  5033. 0;
  5034. return n.nc;
  5035. }();
  5036. i && (t.attrs.nonce = i);
  5037. }
  5038. return v(e, t.attrs), f(t, e), e;
  5039. }
  5040. function v(t, e) {
  5041. Object.keys(e).forEach(function (n) {
  5042. t.setAttribute(n, e[n]);
  5043. });
  5044. }
  5045. function y(t, e) {
  5046. var n, i, o, r;
  5047. if (e.transform && t.css) {
  5048. if (!(r = "function" == typeof e.transform ? e.transform(t.css) : e.transform.default(t.css))) return function () { };
  5049. t.css = r;
  5050. }
  5051. if (e.singleton) {
  5052. var a = l++;
  5053. n = s || (s = m(e)), i = T.bind(null, n, a, !1), o = T.bind(null, n, a, !0);
  5054. } else t.sourceMap && "function" == typeof URL && "function" == typeof URL.createObjectURL && "function" == typeof URL.revokeObjectURL && "function" == typeof Blob && "function" == typeof btoa ? (n = function (t) {
  5055. var e = document.createElement("link");
  5056. return void 0 === t.attrs.type && (t.attrs.type = "text/css"), t.attrs.rel = "stylesheet", v(e, t.attrs), f(t, e), e;
  5057. }(e), i = function (t, e, n) {
  5058. var i = n.css,
  5059. o = n.sourceMap,
  5060. r = void 0 === e.convertToAbsoluteUrls && o;
  5061. (e.convertToAbsoluteUrls || r) && (i = d(i));
  5062. o && (i += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(o)))) + " */");
  5063. var a = new Blob([i], {
  5064. type: "text/css"
  5065. }),
  5066. p = t.href;
  5067. t.href = URL.createObjectURL(a), p && URL.revokeObjectURL(p);
  5068. }.bind(null, n, e), o = function o() {
  5069. g(n), n.href && URL.revokeObjectURL(n.href);
  5070. }) : (n = m(e), i = function (t, e) {
  5071. var n = e.css,
  5072. i = e.media;
  5073. i && t.setAttribute("media", i);
  5074. if (t.styleSheet) t.styleSheet.cssText = n; else {
  5075. for (; t.firstChild;) {
  5076. t.removeChild(t.firstChild);
  5077. }
  5078. t.appendChild(document.createTextNode(n));
  5079. }
  5080. }.bind(null, n), o = function o() {
  5081. g(n);
  5082. });
  5083. return i(t), function (e) {
  5084. if (e) {
  5085. if (e.css === t.css && e.media === t.media && e.sourceMap === t.sourceMap) return;
  5086. i(t = e);
  5087. } else o();
  5088. };
  5089. }
  5090. t.exports = function (t, e) {
  5091. if ("undefined" != typeof DEBUG && DEBUG && "object" != (typeof document === "undefined" ? "undefined" : _typeof(document))) throw new Error("The style-loader cannot be used in a non-browser environment");
  5092. (e = e || {}).attrs = "object" == _typeof(e.attrs) ? e.attrs : {}, e.singleton || "boolean" == typeof e.singleton || (e.singleton = a()), e.insertInto || (e.insertInto = "head"), e.insertAt || (e.insertAt = "bottom");
  5093. var n = h(t, e);
  5094. return c(n, e), function (t) {
  5095. for (var i = [], o = 0; o < n.length; o++) {
  5096. var a = n[o];
  5097. (p = r[a.id]).refs--, i.push(p);
  5098. }
  5099. t && c(h(t, e), e);
  5100. for (o = 0; o < i.length; o++) {
  5101. var p;
  5102. if (0 === (p = i[o]).refs) {
  5103. for (var s = 0; s < p.parts.length; s++) {
  5104. p.parts[s]();
  5105. }
  5106. delete r[p.id];
  5107. }
  5108. }
  5109. };
  5110. };
  5111. var b,
  5112. E = (b = [], function (t, e) {
  5113. return b[t] = e, b.filter(Boolean).join("\n");
  5114. });
  5115. function T(t, e, n, i) {
  5116. var o = n ? "" : i.css;
  5117. if (t.styleSheet) t.styleSheet.cssText = E(e, o); else {
  5118. var r = document.createTextNode(o),
  5119. a = t.childNodes;
  5120. a[e] && t.removeChild(a[e]), a.length ? t.insertBefore(r, a[e]) : t.appendChild(r);
  5121. }
  5122. }
  5123. }, function (t, e) {
  5124. t.exports = function (t) {
  5125. var e = "undefined" != typeof window && window.location;
  5126. if (!e) throw new Error("fixUrls requires window.location");
  5127. if (!t || "string" != typeof t) return t;
  5128. var n = e.protocol + "//" + e.host,
  5129. i = n + e.pathname.replace(/\/[^\/]*$/, "/");
  5130. return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function (t, e) {
  5131. var o,
  5132. r = e.trim().replace(/^"(.*)"$/, function (t, e) {
  5133. return e;
  5134. }).replace(/^'(.*)'$/, function (t, e) {
  5135. return e;
  5136. });
  5137. return /^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r) ? t : (o = 0 === r.indexOf("//") ? r : 0 === r.indexOf("/") ? n + r : i + r.replace(/^\.\//, ""), "url(" + JSON.stringify(o) + ")");
  5138. });
  5139. };
  5140. }, function (t, e) {
  5141. var n, i;
  5142. window, document, n = jQuery, (i = function i(t, e) {
  5143. this.init(t, e);
  5144. }).prototype = {
  5145. init: function init(t, e) {
  5146. this.ele = t, this.defaults = {
  5147. menu: [{
  5148. text: "text",
  5149. menus: [{}, {}],
  5150. callback: function callback() { }
  5151. }],
  5152. target: function target(t) { },
  5153. width: 100,
  5154. itemHeight: 28,
  5155. bgColor: "#fff",
  5156. color: "#333",
  5157. fontSize: 14,
  5158. hoverBgColor: "#f5f5f5"
  5159. }, this.opts = n.extend(!0, {}, this.defaults, e), this.random = new Date().getTime() + parseInt(1e3 * Math.random()), this.eventBind();
  5160. },
  5161. renderMenu: function renderMenu(t, e) {
  5162. var n = this,
  5163. i = e;
  5164. if (t && t.length) {
  5165. var o = $('<ul class="hicontextmenu" ></ul>');
  5166. i || (i = o).addClass("hicontextmenuroot"), $.each(t, function (t, e) {
  5167. var i = !!e.disable && e.disable(),
  5168. r = $('<li class="hicontextmenuitem"><a href="javascript:void(0);"><span>' + (e.text || "") + "</span></a></li>");
  5169. i && r.addClass("disable"), e.borderBottom && r.addClass("borderBottom"), e.menus && (r.addClass("hicontextsubmenu"), n.renderMenu(e.menus, r)), e.callback && r.click(function (t) {
  5170. $(this).hasClass("disable") ? t.stopPropagation() : ($(".hicontextmenuroot").remove(), e.callback(), t.stopPropagation());
  5171. }), o.append(r);
  5172. }), e && e.append(o);
  5173. }
  5174. e || $("body").append(i).find(".hicontextmenuroot").hide();
  5175. },
  5176. setPosition: function setPosition(t) {
  5177. $(".hicontextmenuroot").css({
  5178. left: t.pageX + 2,
  5179. top: t.pageY + 2
  5180. }).show();
  5181. },
  5182. eventBind: function eventBind() {
  5183. var t = this;
  5184. this.ele.on("contextmenu", function (e) {
  5185. $(".hicontextmenuroot").remove(), e.preventDefault(), t.renderMenu(t.opts.menus), t.setPosition(e), t.opts.target && "function" == typeof t.opts.target && t.opts.target(n(this));
  5186. }), n("body").on("click", function () {
  5187. n(".hicontextmenuroot").remove();
  5188. });
  5189. }
  5190. }, n.fn.hicontextMenu = function (t) {
  5191. return new i(this, t), this;
  5192. };
  5193. }, function (t, e, n) {
  5194. "use strict";
  5195. n.r(e);
  5196. n(22), n(23), n(24), n(25);
  5197. var i,
  5198. o = n(0);
  5199. n(26);
  5200. window.hiLocalStorage = (i = window.localStorage || null, {
  5201. saveLocalData: function saveLocalData(t, e) {
  5202. return !(!i || !e || (i.setItem(t, e), 0));
  5203. },
  5204. getLocalData: function getLocalData(t) {
  5205. return i ? i.getItem(t) : null;
  5206. },
  5207. removeItem: function removeItem(t) {
  5208. i && i.removeItem(t);
  5209. }
  5210. });
  5211. n(27), n(32);
  5212. var _r,
  5213. a = function () {
  5214. function t() {
  5215. this.allElementTypes = [];
  5216. }
  5217. return Object.defineProperty(t, "instance", {
  5218. get: function get() {
  5219. return t._instance || (t._instance = new t()), t._instance;
  5220. },
  5221. enumerable: !0,
  5222. configurable: !0
  5223. }), t.prototype.addPrintElementTypes = function (t, e) {
  5224. var n = this;
  5225. this[t] ? this[t] = this[t].concat(e) : this[t] = e, e.forEach(function (t) {
  5226. n.allElementTypes = n.allElementTypes.concat(t.printElementTypes);
  5227. });
  5228. }, t.prototype.getElementTypeGroups = function (t) {
  5229. return this[this.formatterModule(t)] || [];
  5230. }, t.prototype.getElementType = function (t) {
  5231. var e = this.allElementTypes.filter(function (e) {
  5232. return e.tid == t;
  5233. });
  5234. if (e.length > 0) return e[0];
  5235. }, t.prototype.formatterModule = function (t) {
  5236. return t || "_default";
  5237. }, t;
  5238. }(),
  5239. p = n(1),
  5240. s = n(2),
  5241. l = function () {
  5242. function t() { }
  5243. return t.prototype.createPrintElementTypeHtml = function (t, e) {
  5244. var n = $('<ul class="hiprint-printElement-type"></ul>');
  5245. return e.forEach(function (t) {
  5246. var e = $("<li></li>");
  5247. e.append('<span class="title">' + t.name + "</span>");
  5248. var i = $("<ul></ul>");
  5249. e.append(i), t.printElementTypes.forEach(function (t) {
  5250. i.append('<li><a class="ep-draggable-item" tid="' + t.tid + '"> ' + t.getText() + " </a></li>");
  5251. }), n.append(e);
  5252. }), $(t).append(n), n.find(".ep-draggable-item");
  5253. }, t;
  5254. }(),
  5255. u = n(5),
  5256. d = n(15),
  5257. c = function () {
  5258. return function (t) {
  5259. this.field = t.field, this.title = t.title, this.type = t.type, this.columns = t.columns;
  5260. };
  5261. }(),
  5262. h = function () {
  5263. function t(t) {
  5264. var e = this;
  5265. this.text = t.text, this.field = t.field, this.fields = t.fields, this.title = t.title, this.tid = t.tid, this.data = t.data, this.styler = t.styler, this.formatter = t.formatter, this.type = t.type, this.options = t.options, this.editable = t.editable, this.columnDisplayEditable = t.columnDisplayEditable, this.columnDisplayIndexEditable = t.columnDisplayIndexEditable, this.columnTitleEditable = t.columnTitleEditable, this.columnResizable = t.columnResizable, this.columnAlignEditable = t.columnAlignEditable, this.columns = [], (t.columns || []).forEach(function (t, n) {
  5266. e.columns.push(e.createTableColumnArray(t));
  5267. }), this.rowStyler = t.rowStyler, this.striped = t.striped, this.groupFields = t.groupFields || [], this.groupFormatter = t.groupFormatter, this.groupFooterFormatter = t.groupFooterFormatter, this.footerFormatter = t.footerFormatter, this.gridColumnsFooterFormatter = t.gridColumnsFooterFormatter, this.columnObj = this.makeColumnObj();
  5268. }
  5269. return t.prototype.getText = function () {
  5270. return this.text || this.title || "";
  5271. }, t.prototype.createPrintElement = function (t) {
  5272. var e = this;
  5273. return this.columns && 0 == this.columns.length && (t.columns || []).forEach(function (t, n) {
  5274. e.columns.push(e.createTableColumnArray(t));
  5275. }), new d.a(this, t);
  5276. }, t.prototype.getData = function () {
  5277. return [{}];
  5278. }, t.prototype.createTableColumnArray = function (t) {
  5279. var e = [];
  5280. return t.forEach(function (t, n) {
  5281. e.push(new u.a(t));
  5282. }), e;
  5283. }, t.prototype.getPrintElementTypeEntity = function () {
  5284. return new c({
  5285. title: this.title,
  5286. type: this.type
  5287. });
  5288. }, t.prototype.getFields = function () {
  5289. return this.fields;
  5290. }, t.prototype.getOptions = function () {
  5291. return this.options || {};
  5292. }, t.prototype.getColumnByColumnId = function (t) {
  5293. return this.columnObj[t];
  5294. }, t.prototype.makeColumnObj = function () {
  5295. var t = {};
  5296. return this.columns && this.columns.forEach(function (e) {
  5297. e.forEach(function (e) {
  5298. e.columnId && (t[e.columnId] = e);
  5299. });
  5300. }), t;
  5301. }, t;
  5302. }(),
  5303. f = n(4),
  5304. g = n(3),
  5305. m = (_r = function r(t, e) {
  5306. return (_r = Object.setPrototypeOf || _instanceof({
  5307. __proto__: []
  5308. }, Array) && function (t, e) {
  5309. t.__proto__ = e;
  5310. } || function (t, e) {
  5311. for (var n in e) {
  5312. e.hasOwnProperty(n) && (t[n] = e[n]);
  5313. }
  5314. })(t, e);
  5315. }, function (t, e) {
  5316. function n() {
  5317. this.constructor = t;
  5318. }
  5319. _r(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n());
  5320. }),
  5321. v = function (t) {
  5322. function e(e, n) {
  5323. var i = t.call(this, e) || this;
  5324. return i.options = new g.a(n), i.options.setDefault(new g.a(p.a.instance.image.default).getPrintElementOptionEntity()), i;
  5325. }
  5326. return m(e, t), e.prototype.getReizeableShowPoints = function () {
  5327. return ["se"];
  5328. }, e.prototype.getData = function (t) {
  5329. var e = "";
  5330. t ? e = this.getField() ? t[this.getField()] || "" : this.options.src || this.printElementType.getData() : e = this.options.src || this.printElementType.getData();
  5331. var n = this.getFormatter();
  5332. return n && (e = n(e, this.options, this._currenttemplateData)), e || "";
  5333. }, e.prototype.createTarget = function (t, e) {
  5334. var n = $('<div class="hiprint-printElement hiprint-printElement-image" style="position: absolute;"><div class="hiprint-printElement-image-content" style="height:100%;width:100%"></div></div>');
  5335. return this.updateTargetImage(n, t, e), n;
  5336. }, e.prototype.initSizeByHtml = function (e) {
  5337. t.prototype.initSizeByHtml.call(this, e), this.css(e, this.getData());
  5338. }, e.prototype.getConfigOptions = function () {
  5339. return p.a.instance.image;
  5340. }, e.prototype.updateDesignViewFromOptions = function () {
  5341. this.designTarget && (this.css(this.designTarget, this.getData()), this.updateTargetImage(this.designTarget, this.getTitle(), this.getData()));
  5342. }, e.prototype.updateTargetImage = function (t, e, n) {
  5343. var i = t.find(".hiprint-printElement-image-content");
  5344. i.find("img").length ? i.find("img").attr("src", n) : i.html('<img style="width:100%;height:100%;" src="' + n + '">');
  5345. }, e.prototype.getHtml = function (t, e, n) {
  5346. return this.getHtml2(t, e, n);
  5347. }, e;
  5348. }(f.a),
  5349. y = function () {
  5350. var _t4 = function t(e, n) {
  5351. return (_t4 = Object.setPrototypeOf || _instanceof({
  5352. __proto__: []
  5353. }, Array) && function (t, e) {
  5354. t.__proto__ = e;
  5355. } || function (t, e) {
  5356. for (var n in e) {
  5357. e.hasOwnProperty(n) && (t[n] = e[n]);
  5358. }
  5359. })(e, n);
  5360. };
  5361. return function (e, n) {
  5362. function i() {
  5363. this.constructor = e;
  5364. }
  5365. _t4(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  5366. };
  5367. }(),
  5368. b = function (t) {
  5369. function e(e) {
  5370. var n = this;
  5371. return e = e || {}, (n = t.call(this, e) || this).leftSpaceRemoved = e.leftSpaceRemoved, n;
  5372. }
  5373. return y(e, t), e.prototype.getHideTitle = function () {
  5374. return null == this.hideTitle ? this.defaultOptions.hideTitle : this.hideTitle;
  5375. }, e;
  5376. }(g.a),
  5377. E = n(8),
  5378. T = function () {
  5379. function t(t, e, n, i, r, a, p, s, l, u, d) {
  5380. this.defaultPaperNumberFormat = "paperNo-paperCount", this.printLine = 0, this.templateId = t, this.width = o.a.mm.toPt(e), this.height = o.a.mm.toPt(n), this.mmwidth = e, this.mmheight = n, this.paperHeader = i, this.paperFooter = r, this.contentHeight = r - i, this.createTarget(), this.index = u, this.paperNumberLeft = a || parseInt((this.width - 30).toString()), this.paperNumberTop = p || parseInt((this.height - 22).toString()), this.paperNumberDisabled = s, this.paperNumberFormat = l, this.referenceElement = d ? $.extend({}, d) : new E.a({
  5381. top: 0,
  5382. left: 0,
  5383. height: 0,
  5384. width: 0,
  5385. bottomInLastPaper: 0,
  5386. beginPrintPaperIndex: 0,
  5387. printTopInPaper: 0,
  5388. endPrintPaperIndex: 0
  5389. });
  5390. }
  5391. return t.prototype.subscribePaperBaseInfoChanged = function (t) {
  5392. this.onPaperBaseInfoChanged = t;
  5393. }, t.prototype.triggerOnPaperBaseInfoChanged = function () {
  5394. this.onPaperBaseInfoChanged && this.onPaperBaseInfoChanged({
  5395. paperHeader: this.paperHeader,
  5396. paperFooter: this.paperFooter,
  5397. paperNumberLeft: this.paperNumberLeft,
  5398. paperNumberTop: this.paperNumberTop,
  5399. paperNumberDisabled: this.paperNumberDisabled,
  5400. paperNumberFormat: this.paperNumberFormat
  5401. });
  5402. }, t.prototype.setFooter = function (t, e, n, i) {
  5403. this.firstPaperFooter = t, this.evenPaperFooter = e, this.oddPaperFooter = n, this.lastPaperFooter = i;
  5404. }, t.prototype.setOffset = function (t, e) {
  5405. this.setLeftOffset(t), this.setTopOffset(e);
  5406. }, t.prototype.setLeftOffset = function (t) {
  5407. t ? this.paperContentTarget.css("left", t + "pt") : this.paperContentTarget[0].style.left = "";
  5408. }, t.prototype.setTopOffset = function (t) {
  5409. t ? this.paperContentTarget.css("top", t + "pt") : this.paperContentTarget[0].style.top = "";
  5410. }, t.prototype.createTarget = function () {
  5411. this.target = $('<div class="hiprint-printPaper"><div class="hiprint-printPaper-content"></div></div>'), this.paperContentTarget = this.target.find(".hiprint-printPaper-content"), this.target.css("width", this.mmwidth + "mm"), this.target.css("height", this.mmheight - p.a.instance.paperHeightTrim + "mm"), this.target.attr("original-height", this.mmheight);
  5412. }, t.prototype.createHeaderLine = function () {
  5413. var t = this;
  5414. this.headerLinetarget = $('<div class="hiprint-headerLine" style="position: absolute;width: 100%;border-top: 1px dashed #c9bebe;height: 7pt;"></div>'), this.headerLinetarget.css("top", (this.paperHeader || -1) + "pt"), 0 == this.paperHeader && this.headerLinetarget.addClass("hideheaderLinetarget"), this.paperContentTarget.append(this.headerLinetarget), this.dragHeadLineOrFootLine(this.headerLinetarget, function (e, n) {
  5415. t.paperHeader = n, t.triggerOnPaperBaseInfoChanged();
  5416. });
  5417. }, t.prototype.createFooterLine = function () {
  5418. var t = this;
  5419. this.footerLinetarget = $('<div class="hiprint-footerLine" style="position: absolute;width: 100%;border-top: 1px dashed #c9bebe;height: 7pt;"></div>'), this.footerLinetarget.css("top", parseInt(this.paperFooter.toString()) + "pt"), this.paperFooter == this.height && (this.footerLinetarget.css("top", this.mmheight - p.a.instance.paperHeightTrim + "mm"), this.footerLinetarget.addClass("hidefooterLinetarget")), this.paperContentTarget.append(this.footerLinetarget), this.dragHeadLineOrFootLine(this.footerLinetarget, function (e, n) {
  5420. t.paperFooter = n, t.triggerOnPaperBaseInfoChanged();
  5421. });
  5422. }, t.prototype.createPaperNumber = function (t) {
  5423. var e = this,
  5424. n = this.target.find(".hiprint-paperNumber");
  5425. if (n.length) return n.html(t), n;
  5426. var i = $('<span class="hiprint-paperNumber" style="position: absolute">' + t + "</span>");
  5427. return i.css("top", this.paperNumberTop + "pt"), i.css("left", this.paperNumberLeft + "pt"), this.paperContentTarget.append(i), this.dragHeadLineOrFootLine(i, function (t, n) {
  5428. e.paperNumberTop = n, e.paperNumberLeft = t, e.triggerOnPaperBaseInfoChanged();
  5429. }, !0), i;
  5430. }, t.prototype.getTarget = function () {
  5431. return this.target;
  5432. }, t.prototype.append = function (t) {
  5433. this.paperContentTarget.append(t);
  5434. }, t.prototype.updateReferenceElement = function (t) {
  5435. t && (this.referenceElement = t);
  5436. }, t.prototype.updatePrintLine = function (t) {
  5437. t >= this.printLine && (this.printLine = t);
  5438. }, t.prototype.design = function (t) {
  5439. var e = this;
  5440. this.createHeaderLine(), this.createFooterLine(), this.target.addClass("design"), this.paperNumberTarget = this.createPaperNumber(this.formatPaperNumber(1, 1)), this.createRuler(), this.resetPaperNumber(this.paperNumberTarget), $(this.paperNumberTarget).bind("dblclick.hiprint", function () {
  5441. null == e.paperNumberDisabled && (e.paperNumberDisabled = !1), e.paperNumberDisabled = !e.paperNumberDisabled, e.resetPaperNumber(e.paperNumberTarget), e.triggerOnPaperBaseInfoChanged();
  5442. }), $(this.paperNumberTarget).bind("click.hiprint", function () {
  5443. o.a.event.trigger("BuildCustomOptionSettingEventKey_" + e.templateId, {
  5444. options: {
  5445. paperNumberFormat: e.paperNumberFormat,
  5446. paperNumberDisabled: e.paperNumberDisabled
  5447. },
  5448. callback: function callback(t) {
  5449. e.paperNumberDisabled = !!t.paperNumberDisabled || void 0, e.paperNumberFormat = t.paperNumberFormat ? t.paperNumberFormat : void 0, e.createPaperNumber(e.formatPaperNumber(1, 1)), e.resetPaperNumber(e.paperNumberTarget), e.triggerOnPaperBaseInfoChanged();
  5450. }
  5451. });
  5452. });
  5453. }, t.prototype.resetPaperNumber = function (t) {
  5454. this.paperNumberDisabled ? t.addClass("hiprint-paperNumber-disabled") : t.removeClass("hiprint-paperNumber-disabled");
  5455. }, t.prototype.updatePaperNumber = function (t, e, n) {
  5456. var i = this.createPaperNumber(this.formatPaperNumber(t, e));
  5457. this.paperNumberDisabled ? i.hide() : n && this.index % 2 == 1 && (i[0].style.left = "", i.css("right", this.paperNumberLeft + "pt"));
  5458. }, t.prototype.formatPaperNumber = function (t, e) {
  5459. return (this.paperNumberFormat ? this.paperNumberFormat : this.defaultPaperNumberFormat).replace("paperNo", t.toString()).replace("paperCount", e.toString());
  5460. }, t.prototype.dragHeadLineOrFootLine = function (t, e, n) {
  5461. var i = this;
  5462. t.hidraggable({
  5463. axis: n ? void 0 : "v",
  5464. onDrag: function onDrag(t, n, i) {
  5465. e(n, i);
  5466. },
  5467. moveUnit: "pt",
  5468. minMove: p.a.instance.movingDistance,
  5469. onBeforeDrag: function onBeforeDrag(t) {
  5470. s.a.instance.draging = !0;
  5471. },
  5472. onStopDrag: function onStopDrag(t) {
  5473. s.a.instance.draging = !1, i.footerLinetarget.removeClass("hidefooterLinetarget"), i.headerLinetarget.removeClass("hideheaderLinetarget");
  5474. }
  5475. });
  5476. }, t.prototype.resize = function (t, e) {
  5477. this.width = o.a.mm.toPt(t), this.height = o.a.mm.toPt(e), this.mmwidth = t, this.mmheight = e, this.target.css("width", t + "mm"), this.target.css("height", e - p.a.instance.paperHeightTrim + "mm"), this.target.attr("original-height", this.mmheight), this.paperFooter = this.height, this.footerLinetarget.css("top", this.height + "pt"), this.contentHeight = this.paperFooter - this.paperHeader, this.paperNumberLeft = parseInt((this.width - 30).toString()), this.paperNumberTop = parseInt((this.height - 22).toString()), this.paperNumberTarget.css("top", this.paperNumberTop + "pt"), this.paperNumberTarget.css("left", this.paperNumberLeft + "pt"), this.triggerOnPaperBaseInfoChanged();
  5478. }, t.prototype.getPaperFooter = function (t) {
  5479. var e = this.index + t;
  5480. return 0 == e ? this.firstPaperFooter ? this.firstPaperFooter : this.oddPaperFooter ? this.oddPaperFooter : this.paperFooter : e % 2 == 0 ? this.oddPaperFooter ? this.oddPaperFooter : this.paperFooter : e % 2 == 1 ? this.evenPaperFooter ? this.evenPaperFooter : this.paperFooter : void 0;
  5481. }, t.prototype.getContentHeight = function (t) {
  5482. return this.getPaperFooter(t) - this.paperHeader;
  5483. }, t.prototype.createRuler = function () {
  5484. this.target.append('<div class="hiprint_rul_wrapper">\n <img class="h_img" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAAAPCAYAAAC891QNAAAKxklEQVR4Xu1dPezlQxQ92yE6opGIaOg2QeWjUVjRSCg24qMgQtBItHazq5XoJBtBgYiCROGz0CBRiGRVdKISoRNKcmIudyfze+/tvL27v/Oc1+yX3/ife2buOXPv/OYdAXASwCnof4xjXRyaD/NREQHPq4qozo9pPuZjV/Gk+aiI6vyY5mM+dhVPmo+KqM6PaT7mY1fxpPmoiOr8mOZjPnYVT5qPiqjOj2k+5mNX8aT5qIjq/JjmYz52FU+aj4qozo9pPuZjV/Gk+aiI6vyY5mM+dhVPmo+KqE6OeQTAXwD4q/rHONbFoPkwHxUR8LyqiOr8mOZjPnYVT5qPiqjOj2k+5mNX8aT5qIjq/JjmYz52FU+aj4qozo9pPuZjV/Gk+aiI6vyY5mM+dhVPmo+KqM6PaT7mY1fxpPmoiOr8mOZjPnYVT5qPiqjOj2k+5mNX8aT5qIjq5JhuoE8GrvAxL5DC4E4MbT4mglb4iPkoDO7E0OZjImiFj5iPwuBODG0+JoJW+Ij5KAzuxNDmYyJohY+Yj8LgTgxtPiaCVviI+SgM7sTQ5mMiaIWPmI/C4E4MbT4mglb4iPkoDO7E0OZjImiFj5iPwuBODG0+JoJW+Ij5KAzu+Q6dG+gPAXgLwBkAzwH483wHu8T/fZ5YtwO4HsDbAK5qvx4DcAeAry7xz7ntfx84go9PAfD3/BCPEo4rALwM4Mk0r/h3ajjihgbOpacBvARAFUfMK84nrofvRfkIHGcBHAfwqyCOmwC8C+BoW98PA/hEEAfXxwsATgNQzlfE0eug6jrnlNqmg2vW/CU9Jy7+3D82Lb+xrSH+PfPAD9sE9iL/+y6+hOuemqjIB+fYly2m4a8UccS0yHNLEUf2u+Hl71+xt99lfZwA8KLo+ghd5PwKbbxHkI/Is/QqyvlqtB9UWOe77AcVcfwG4HIAzwN4BQD/rIgj78+V1kc/r7gnUdTzHgfnUe8V1eeVkp5vyldKet7jYP2H+1w1Pe9xXJ1qD8r5alQXXfs637UuqoiDfQM1Pd/Gh8r6GOG4WVDPRziiH6W0P982r1T0fBsOFT0f4eC+Q03PRziuE9TzbfNq9fXEaKDTTEVjkMW2KE5f5FrzXv+7KMRFwSqLHvGwURgY13w4gDjIB3l4NTVBGBw1HPmrAe5rHNwqjIPifWc7YBLrRGlekY8nALzfClW5wKCEI+crYmAiZlFaeX0EL4o4Mh807PzwAJMaHz0OYlDNu9t08HUAj7XDQGvU/JGeM2/FgawwVzzs91Hj6d7273sZiQv88JIvCT38qTUP3gHwoBgfbPrHh40pziNytGYvucQHcURzjc3arIcq64N8sNHJJsgHjZh86E8JRy6UEMNlgvkqr4/ghc0pxfURfHwL4BEAH4rykXGweKKQd3fZDyro+QjHN63w83M6KL729THC8XvTDCU9H+GInKWk50s41PR8aX2o6fmmfMUXWFT0fNP6UNLzTXwo6fk2HCp6vktdVEHPRzi47eBLIUp6PsLBnMs9oJKej3DECwVKer6EQ03Pl9aHmp5vyldKer5pfSjp+SY+lPR8G47V63k00Lmgo/jcF+AucD25bLilN1miwE4h6ZuHZT/MHgP3VzTEz09+2ChQxMFmzrWt8fyUKA6ui1sAXAngTQCKOPKJn3gb6lFBPpivuC54s4EyjhCQnHNV81W8ofZee1tQEUfWwXh7+xrB9RHzKr+B3vPxHYDbWsN5jZq/yxvoNIvx5tofrbHD3LymA3KbcNAmMPah7Wv2YJtwxNp/pt0EooqD/vCXhoE3mijiyDcC8BApG1SKOJiveJjs7vbGsyqO2ArE3oNFYEU+iIM+/oF20wf/rIgjdDAKo58J6SBjvrQfVNLzjIP72fzGmtL66HGo6nmPQ1XPexyqep5xcD3EjQBqet7nK1U9H61zRT3vcajq+UgHFfV8U11USc8zjv4NdCU973Go6nmPQ1XPexyqep5x5BsB1PS8z1eqej5a54p63uNQ1fORDkrouRvoe3S6ix6NQjWLCnzb7ot2vatiQyqfMFFvSDHBftyKhqoN9EPh49Aanflgj+I6H725rdp4jje3WVjnlaI3uIFepHSbh/0/NNCpiZxvfCtSqdCQD2YEi9EEUWpIZRxxiISNc35UG+iHwodyo7NfH/mAUhyYobdXOrjUv7mtvM75hhQ/XwN4Q6SBvm0/qFJw73GQB8UG+giHop6PcGROVNZ5j0NVzw+VD1U9H/GhqOc9DlU9H61zRT0Pn75UF1XR8x4HbzBR1PMRDkU9H+FQ1PMeBw9Qs+6ruD8nln5PqFgvyTiivivR6ATQv5g6qv3w1j6l/Xnmg7/nja/xUpGKbx+tcxk9P8Qr3PtkFUZR6Ypqvil8CsBr6TtdFXEcypXIxBHf2875xZNjkbCU5tWh8DFqoCvywfwbVyvx6xr4UVzn5ONxACcB8ISl8tXnIejBg+JV9KM30Pt5pXRFXL/5yNc7q1zh3vsSYrqr3dbAf1O5anvJX4VxV7gSeWl9vNUWP281eVbkSv1D5aMvuKvOK/ITX9fAt21V1zkP+nyeNujKfOR8q6CDu+wHVXH0DXT+ee1XuI/4UNTzTfNKSc+XcKjp+SHzoajnIz4U9XyEQ1HPl/hQ0/Nd6nAKej7C0TfQFfR8hIPNKLX9+aZ5paTnSzjU9PyQ+egb6Ar7waV8pbY/H+Hgi15q+/MlPmT0PBro/JVFaSaoM+1q5Py2KgH1JzjW/HdRcCee3Pzk96byOqy1Y2NDiqcwjkY3RxRHnlcsSh8TxhGFHn7/I9eI4rw6JD4iX6nPq3yanTnW8+rS5ef8FQehg6p85Mbakg7yIFBoPgtcvAZ9jdqY9TxyGDe4/P4lrpmzTSePtwNna/UqGccJAKdTw5baqMhHXh/x8yviyE110kKfqIjjUPg4FBycV/mGGeYmz6uLqzM578YekGs8fr92PnbdDyri4PrIb6zxDSNFHIp6vm1eqej5CIeinh8yH4p6vjSv1PT8kOeVop7vWodbuw6OcCjq+QiHop5vm1cqer40r6KmpbQ/31SnVuZDUc+X5pWanh/yOpfS89xAT71aqWZ5/NxrLZr75/tvZpkjrYMonrueu9aFHAGv3zUfnHO+cr5yvnK+WuMhIOcm5ybnJucm56aLe3jGedd513nXedd513nX9WfXr1y/+kcLvBYcA8+DPdeCG+h7BtCJyMm47U0sSBYkC5LzqQt2Lti5YOeCnQt2LtjZE9oT2hPaE9oT2hPaE9oT2hPaE9oT2hPaE9oT2hPaE9oTintCN9CdyJ3IncidyMUTuQ/y+CCPD/L8u4hdpHCRwkUKe1t7W3tbe1t7Wzeu3LiyJ7QntCe0J7QntCe0J7QntCe0J7QntCfcyxO6gW5DaUNpQ2lDaUNpQ2lDaUNpQ7mXofRBHh/k8UEeH+RJdsqaYk2xprjO4DqD6wyuM7jO4DqD6wz2hPaE9oT2hPaE9oTSntANdCcxJzEnMekk5qaNmzZu2rhp46bNOdU5FylcpHCRwv7e/t7+3v7ejSs3rty4sie0J7QntCe0J7QntCe0J7QntCe0J9zDE7qBbjNlM2UzZTNlM2UzZTNlM7WHmfJBHh/k8UEeH+TxQR4f5DnXTsK6al1148q1FtdaXGtxrcW1FtdaXGuxJ7QntCe0J7QnFPaEfwNdvyoPYn5mCwAAAABJRU5ErkJggg==" />\n <img class="v_img" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAAAPCAYAAAC891QNAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAiHSURBVHhe7Z29q21HGYevplLTKSL4UQQkwUYQG1EUtBGba5qkyEeX+NGI9irof2ClvTaCtoqgoEkISAIpTZMiJBCCQsCvSq7vc88emExm7XO2++Tc+S2fB17WmnftzZ3ffWf2b601a+9za8Kdw7bHnDkwZw7MmQNz5sCcOTBnDsyZA3PmwJw5MGcOzJkDc+bAnDkwZw7MmYPlc+897IiIiIiIiIiIiIiIiIiIiPxf4wK6iIiIiIiIiIiIiIiIiIhI4QK6iIiIiIiIiIiIiIiIiIhI4QK6iIiIiIiIiIiIiIiIiIhI4QK6iIiIiIiIiIiIiIiIiIhIkbCA/vmKOxW/rfggieKxCvJJzHTQJl6qeJBEADMd7JOjLinMdDxd8b6L3Rj2XI+96IDbFSlzHPZcj59WkGO74nynT62P7f96poNj5FeGMY+/EQ363I+h1XXM6tHmAvF9EkWiDrZp42prfox9th43w551AP1/6mL3LtbjZtia57SJ1vdkHX09mq5VrwdnOug7/sexRqIO6tD63fw8UQdb2unjivkxzulEHXupx150AP3v/TxRx17q0XyQaPM9WUdfD/b716zGTAd9H/08UUfrM9H8PFEHW9rp42rm59bjZtizDqD/vZ9bj5tha57TJtp8T9bR1+Md64OzBfT3HLY99yr3/oovV3yo4scVX62YvW7GdfflnNyWDuKhit9VvFox45x/97pzMx2PH/Y59kBFG2wjN9G/q+a2dPys4l8V/aQZuYn+XTW393qwz+s/XLF1IXXdfTknN9PRXoeGv17sTrnuvpyTu2xcfboitR5fqHimgtd/s+LfFTOuuy+n5D5TQR/pP3P4YxVb4+oyzu3LyKm5r1U8eojvkRiYvXfGdfSl55TcWA/q0Grwg4o/HPavwin/7si5uVHHJw9b2knjaqaDmyTPVrST4Nl7Z5zbl5FTcnuuR9PxnYonK2bvnXFuX0ZOyc3mObB982J3+t4Z5/Zl5JTcZePq2xWz9844ty8jp+RGHb0Pcvy5w/YqnPLvjpybO6ajn+fEyteDW/Ojh9cRaTpmfk4k6djyDyJNx8zPCevxdt6N3DEdvZ8TafMc2PZ+TiSPq+bnRJKOLT8nUnW0eZ5wH25rfvSk6hj9PFHHzD9SdYx+bj1uLndMR/Pz1HkObJuf72Fc4eeJOmZ+nq6Dvrd5/o71wdW/gY6gNyr+VsHiE4tQiWzpwEi+W/HDiq2FnJU4Vg/6z2Dj2OrMdPy64hsVH6/4VUWqjkZ6PRLZ0tFMI6EWcFk9/l5BfnVmOjBFThg5kW9PJq8GfXyhgjn8jwoMPXF+8LTePyu4CUK/7z/k0hjrQZs5zYkUF+ecKCYw6uhPZtHwi4vd5Rl13FeB1/FwzNcrOJbAXuvR60hi1EEbuJn7l4vdCC6rxyuH7eqMOvDBj1b8vmLVb6fNmOmY+fnq14Nb82MkUcfMz9N0bPlHmo4tP7ceN8MxHT2J8xxGP0+vR/PzNB1bfp6oY+v6nNeseh9ua37MSNMx83NI0rHlH5Ck49j1ufV49zmmYyRJB22YXZ8n16O/Pk/Scez6PE3H6OfT9UH/Bvq9g8FFYY59CzIBBtYTFasuRp3KFyv+dLEbCSeN1IIFQn6WInHBCnodKTdKt+DEMXlMASeLPJX1fMUvK1Y0wqvAIu6PKnjyDLNMH1tyb+AhDJ7e7S/O03irghsMzOk9zANOhDmnevluKw/qwcUTT7nie+NP3qXQ6/gJiWC4uE0eU0A98GzmOR7e3/hJ4/WKz1Xwiyb8usle2Mv1YKqO0c8Tdcz8PHlc9X6eWo/Rz9N1ND9PHVejn6fWY/Tz1HqMfp6qY2Qv90VTdYx+nqhj5ufJ46r389R6jH6erqP5eeq4Gv08tR6jn6fWY/TzVB1bvG19cPUFdCb4RyqYJHz4tp9pAH4OJKUoMx2frfhzBfD3Gzi2OjMdn6j4TQVPl6SwNa74KQcW1lJuls50sLDJT07QfrEi4SJkqx4PV/AtYj6UeRJodWY62O8NPoGZDk4WOZnHHB+p4NjqbI0r4MESFtNXHFf0CX9ofXytYkvHyj7IZ88HKvAI+s0DC+3z6OcV/QM+K+sY6/Gfw5Zv1nNhe7uikaSD9qcqvlIxfj6l6YBvVXDC3pOmg4snzkF4Ur/pgiQdzHMegEMHDyulfF7N6rH18FtaPb5UgXfj4XzDq5Gko39oL8kHRx0zP+f46teDs/kBnBu2m7yJOmZ+nlqP0c9TdUDv56k6Rj9P1DHz89R6jH6eWo/RzxN1zPw8UcfMzxPui87mB/R+nqhj5uep9Rj9PHlc9X6eqmP080QdMz9Prcfo56n1GP08UcfMzxN1bN1vT1sfvAtmztM+TPh2MsUAI9/g+OqMOgj2ybUbWok6GHTtD/C3BZFUHdyAa2MMEnW0NpE8rjjx5WdA0nXQd9pE+1mTRB0E++TajepEHf3n1arjatbHUQdwjHxjNR3Q5nH/kz70uemC1XXM6sE2rR7HxhXR+p6qo+030nT07fRxhUek66Df9J820XwvsR5safefw4k66C/tvXzuNh39WGuvSdBBv5kXHINUHWxpp9ejjSuC/WQdbR8SdfTt9HE1+nmijr7PBJpS68GWdvPzVB178cFRR/8atrQTdND33s9TdbClnV6P0c+TdbR9SNTRt9PH1ejniTrod/MKon1upekAtrSbn6fq2IsPznS088XGajr+Z/YiRB1roY61UMdaqGMt1LEW6lgLdayFOtZCHWuhjrVQx1qoYy3UsRbqWAt1rIU61kIda6GOtVDHWtzxb6CLiIiIiIiIiIiIiIiIiIgU9x22e+CPh2066lgLdayFOtZCHWuhjrVQx1qoYy3UsRbqWAt1rIU61kIda6GOtVDHWqhjLdSxFupYC3WshTqW4dat/wKB2hwSL8nDjQAAAABJRU5ErkJggg==" />\n </div>');
  5485. }, t.prototype.displayHeight = function () {
  5486. return this.mmheight - p.a.instance.paperHeightTrim + "mm";
  5487. }, t.prototype.displayWidth = function () {
  5488. return this.mmwidth + "mm";
  5489. }, t.prototype.getPanelTarget = function () {
  5490. return this.target.parent(".hiprint-printPanel ");
  5491. }, t;
  5492. }(),
  5493. P = n(6),
  5494. _ = function () {
  5495. var _t5 = function t(e, n) {
  5496. return (_t5 = Object.setPrototypeOf || _instanceof({
  5497. __proto__: []
  5498. }, Array) && function (t, e) {
  5499. t.__proto__ = e;
  5500. } || function (t, e) {
  5501. for (var n in e) {
  5502. e.hasOwnProperty(n) && (t[n] = e[n]);
  5503. }
  5504. })(e, n);
  5505. };
  5506. return function (e, n) {
  5507. function i() {
  5508. this.constructor = e;
  5509. }
  5510. _t5(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  5511. };
  5512. }(),
  5513. w = function (t) {
  5514. function e(e, n) {
  5515. var i = t.call(this, e) || this;
  5516. return i.options = new b(n), i.options.setDefault(new b(p.a.instance.longText.default).getPrintElementOptionEntity()), i;
  5517. }
  5518. return _(e, t), e.prototype.getDesignTarget = function (e) {
  5519. var n = t.prototype.getDesignTarget.call(this, e);
  5520. return n.find(".hiprint-printElement-longText-content").css("border", "1px dashed #cebcbc"), n;
  5521. }, e.prototype.getProxyTarget = function (t) {
  5522. t && this.SetProxyTargetOption(t);
  5523. var e = this.getData(),
  5524. n = this.createTarget(this.printElementType.getText(!0), e);
  5525. return this.updateTargetSize(n), this.css(n, e), n;
  5526. }, e.prototype.updateDesignViewFromOptions = function () {
  5527. if (this.designTarget) {
  5528. var t = this.getData(),
  5529. e = this.getHtml(this.designPaper)[0].target;
  5530. this.designTarget.find(".hiprint-printElement-longText-content").html(e.find(".hiprint-printElement-longText-content").html()), this.css(this.designTarget, t);
  5531. }
  5532. }, e.prototype.getConfigOptions = function () {
  5533. return p.a.instance.longText;
  5534. }, e.prototype.getTitle = function () {
  5535. return this.options.title || this.printElementType.title;
  5536. }, e.prototype.getData = function (t) {
  5537. return t ? t[this.getField()] || "" : this.options.testData || this.printElementType.getData() || "";
  5538. }, e.prototype.updateTargetText = function (t, e, n) {
  5539. var i = t.find(".hiprint-printElement-longText-content"),
  5540. o = this.getText(e, n);
  5541. i.html(o);
  5542. }, e.prototype.createTarget = function (t, e) {
  5543. var n = $('<div class="hiprint-printElement hiprint-printElement-longText" style="position: absolute;"><div class="hiprint-printElement-longText-content hiprint-printElement-content" style="height:100%;width:100%"></div></div>');
  5544. return this.updateTargetText(n, t, e), n;
  5545. }, e.prototype.getText = function (t, e) {
  5546. var n = this.getFormatter();
  5547. e && (e = 0 != this.options.leftSpaceRemoved ? e.toString().replace(/^\s*/, "") : e);
  5548. return (this.getField() ? (this.options.getHideTitle() ? "" : t ? t + ":" : "") + (n ? n(t, e, this.options, this._currenttemplateData) : e) : n ? n(t, t, this.options, this._currenttemplateData) : t || "") || "";
  5549. }, e.prototype.getHtml = function (t, e) {
  5550. this.setCurrenttemplateData(e), this.createTempContainer();
  5551. var n = this.getPaperHtmlResult(t, e);
  5552. return this.removeTempContainer(), n;
  5553. }, e.prototype.getHeightByData = function (t) {
  5554. this.createTempContainer();
  5555. var e = this.getPaperHtmlResult(new T("", 1e3, 1e3, 0, 25e3, 0, 0, !0, void 0, 0, void 0), {}, t);
  5556. return this.removeTempContainer(), e[0].referenceElement.bottomInLastPaper - e[0].referenceElement.printTopInPaper;
  5557. }, e.prototype.getLongTextIndent = function () {
  5558. return this.options.longTextIndent ? '<span class="long-text-indent" style="margin-left:' + this.options.longTextIndent + 'pt"></span>' : '<span class="long-text-indent"></span>';
  5559. }, e.prototype.getPaperHtmlResult = function (t, e, n) {
  5560. var i = this,
  5561. o = [],
  5562. r = 0,
  5563. a = n || this.getData(e),
  5564. p = this.getText(this.getTitle(), a),
  5565. s = this.createTarget(this.getTitle(), this.options.testData || "");
  5566. this.css(s, a), e ? this.updateTargetWidth(s) : this.updateTargetSize(s), this.getTempContainer().html(""), this.getTempContainer().append(s);
  5567. var l = [this.getLongTextIndent()],
  5568. u = p.split(new RegExp("\r|\n", "g"));
  5569. if (u.forEach(function (t, e) {
  5570. var n = 0 != i.options.leftSpaceRemoved ? (t || "").toString().replace(/^\s*/, "") : t;
  5571. l = l.concat(n.split("")), e < u.length - 1 && l.push("<br/>" + i.getLongTextIndent());
  5572. }), 0 == l.length && (l = [""]), this.isHeaderOrFooter() || this.isFixed() || !e) return (f = this.getStringBySpecificHeight(l, 25e3, s)).target.css("left", this.options.displayLeft()), f.target.css("top", this.options.displayTop()), f.target[0].height = "", o.push(new P.a({
  5573. target: f.target,
  5574. printLine: this.options.displayTop() + f.height,
  5575. referenceElement: new E.a({
  5576. top: this.options.getTop(),
  5577. left: this.options.getLeft(),
  5578. height: this.options.getHeight(),
  5579. width: this.options.getWidth(),
  5580. beginPrintPaperIndex: t.index,
  5581. bottomInLastPaper: this.options.getTop() + f.height,
  5582. printTopInPaper: this.options.getTop()
  5583. })
  5584. })), o;
  5585. for (var d = this.getBeginPrintTopInPaperByReferenceElement(t); l.length > 0;) {
  5586. var c = 0,
  5587. h = t.getPaperFooter(r);
  5588. 0 == r && d > h && (d = d - h + t.paperHeader, o.push(new P.a({
  5589. target: void 0,
  5590. printLine: void 0
  5591. })), r++, c = t.getContentHeight(r) - (d - t.paperHeader), h = t.getPaperFooter(r));
  5592. var f = this.getStringBySpecificHeight(l, c > 0 ? c : 0 == r ? h - d : t.getContentHeight(r), s);
  5593. l.splice(0, f.length);
  5594. var g = void 0,
  5595. m = void 0;
  5596. f.target.css("left", this.options.displayLeft()), f.target[0].height = "", 0 == r || c > 0 ? (m = d, f.target.css("top", m + "pt"), g = l.length > 0 ? d + f.height : null != this.options.lHeight ? d + (f.height > this.options.lHeight ? f.height : this.options.lHeight) : d + f.height) : (m = t.paperHeader, f.target.css("top", m + "pt"), g = m + f.height), o.push(new P.a({
  5597. target: f.target,
  5598. printLine: g,
  5599. referenceElement: new E.a({
  5600. top: this.options.getTop(),
  5601. left: this.options.getLeft(),
  5602. height: this.options.getHeight(),
  5603. width: this.options.getWidth(),
  5604. beginPrintPaperIndex: t.index,
  5605. bottomInLastPaper: g,
  5606. printTopInPaper: m
  5607. })
  5608. })), r++;
  5609. }
  5610. return o;
  5611. }, e.prototype.getStringBySpecificHeight = function (t, e, n) {
  5612. var i = o.a.pt.toPx(e),
  5613. r = this.IsPaginationIndex(t, t.length - 1, i, n);
  5614. return r.IsPagination ? r : this.BinarySearch(t, 0, t.length - 1, i, n);
  5615. }, e.prototype.BinarySearch = function (t, e, n, i, o) {
  5616. var r = Math.floor((e + n) / 2);
  5617. if (e > n) return o.find(".hiprint-printElement-longText-content").html(""), {
  5618. IsPagination: !0,
  5619. height: 0,
  5620. length: 0,
  5621. target: o.clone()
  5622. };
  5623. var a = this.IsPaginationIndex(t, r, i, o);
  5624. return a.IsPagination ? a : "l" == a.move ? this.BinarySearch(t, e, r - 1, i, o) : this.BinarySearch(t, r + 1, n, i, o);
  5625. }, e.prototype.IsPaginationIndex = function (t, e, n, i) {
  5626. i.find(".hiprint-printElement-longText-content").html(t.slice(0, e + 2).join(""));
  5627. var r = i.height();
  5628. i.find(".hiprint-printElement-longText-content").html(t.slice(0, e + 1).join(""));
  5629. var a = i.height();
  5630. return e >= t.length - 1 && a < n ? {
  5631. IsPagination: !0,
  5632. height: o.a.px.toPt(a),
  5633. length: t.length,
  5634. target: i.clone()
  5635. } : a <= n && r >= n ? {
  5636. IsPagination: !0,
  5637. height: a,
  5638. length: e + 1,
  5639. target: i.clone()
  5640. } : a >= n ? {
  5641. IsPagination: !1,
  5642. move: "l"
  5643. } : r <= n ? {
  5644. IsPagination: !1,
  5645. move: "r"
  5646. } : {
  5647. IsPagination: !0,
  5648. result: 1
  5649. };
  5650. }, e;
  5651. }(f.a),
  5652. x = function () {
  5653. function t() { }
  5654. return t.replaceEnterAndNewline = function (t, e) {
  5655. return t.replace(new RegExp("\r|\n|/g", "g"), e);
  5656. }, t.replaceTab = function (t, e) {
  5657. return t.replace(new RegExp("\t/g", "g"), e);
  5658. }, t.replaceEnterAndNewlineAndTab = function (t, e) {
  5659. return t.replace(new RegExp("\r|\n|\t|/g", "g"), e);
  5660. }, t;
  5661. }(),
  5662. C = function () {
  5663. var _t6 = function t(e, n) {
  5664. return (_t6 = Object.setPrototypeOf || _instanceof({
  5665. __proto__: []
  5666. }, Array) && function (t, e) {
  5667. t.__proto__ = e;
  5668. } || function (t, e) {
  5669. for (var n in e) {
  5670. e.hasOwnProperty(n) && (t[n] = e[n]);
  5671. }
  5672. })(e, n);
  5673. };
  5674. return function (e, n) {
  5675. function i() {
  5676. this.constructor = e;
  5677. }
  5678. _t6(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  5679. };
  5680. }(),
  5681. O = function (t) {
  5682. function e(e) {
  5683. var n = t.call(this, e) || this;
  5684. return n.title && (n.title = x.replaceEnterAndNewlineAndTab(n.title, "")), n;
  5685. }
  5686. return C(e, t), e.prototype.getHideTitle = function () {
  5687. return null == this.hideTitle ? this.defaultOptions.hideTitle : this.hideTitle;
  5688. }, e.prototype.getTextType = function () {
  5689. return (null == this.textType ? this.defaultOptions.textType : this.textType) || "text";
  5690. }, e.prototype.getFontSize = function () {
  5691. return (null == this.fontSize ? this.defaultOptions.fontSize : this.fontSize) || 9;
  5692. }, e.prototype.getbarcodeMode = function () {
  5693. return (null == this.barcodeMode ? this.defaultOptions.barcodeMode : this.barcodeMode) || "CODE128";
  5694. }, e;
  5695. }(g.a),
  5696. H = function () {
  5697. var _t7 = function t(e, n) {
  5698. return (_t7 = Object.setPrototypeOf || _instanceof({
  5699. __proto__: []
  5700. }, Array) && function (t, e) {
  5701. t.__proto__ = e;
  5702. } || function (t, e) {
  5703. for (var n in e) {
  5704. e.hasOwnProperty(n) && (t[n] = e[n]);
  5705. }
  5706. })(e, n);
  5707. };
  5708. return function (e, n) {
  5709. function i() {
  5710. this.constructor = e;
  5711. }
  5712. _t7(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  5713. };
  5714. }(),
  5715. D = function (t) {
  5716. function e(e, n) {
  5717. var i = t.call(this, e) || this;
  5718. return i.options = new O(n), i.options.setDefault(new O(p.a.instance.text.default).getPrintElementOptionEntity()), i;
  5719. }
  5720. return H(e, t), e.prototype.getDesignTarget = function (e) {
  5721. return t.prototype.getDesignTarget.call(this, e);
  5722. }, e.prototype.getProxyTarget = function (t) {
  5723. t && this.SetProxyTargetOption(t);
  5724. var e = this.getData(),
  5725. n = this.createTarget(this.printElementType.getText(!0), e);
  5726. return this.updateTargetSize(n), this.css(n, e), n;
  5727. }, e.prototype.updateDesignViewFromOptions = function () {
  5728. if (this.designTarget) {
  5729. var t = this.getData();
  5730. this.css(this.designTarget, t), this.updateTargetText(this.designTarget, this.getTitle(), t);
  5731. }
  5732. }, e.prototype.getConfigOptions = function () {
  5733. return p.a.instance.text;
  5734. }, e.prototype.getTitle = function () {
  5735. var t = this.options.title || this.printElementType.title || "";
  5736. return t && (t = x.replaceEnterAndNewlineAndTab(t, "")), t;
  5737. }, e.prototype.getData = function (t) {
  5738. var e = void 0;
  5739. if (e = t ? t[this.getField()] || "" : this.options.testData || this.printElementType.getData() || "", this.options.format) {
  5740. if ("datetime" == this.options.dataType) return o.a.dateFormat(e, this.options.format);
  5741. if ("boolen" == this.options.dataType) {
  5742. var n = this.options.format.split(":");
  5743. if (n.length > 0) return !0 === e || "true" === e ? n[0] : n[1];
  5744. }
  5745. }
  5746. return e;
  5747. }, e.prototype.updateTargetText = function (t, e, n, i) {
  5748. var r = this.getFormatter(),
  5749. a = t.find(".hiprint-printElement-text-content"),
  5750. p = "";
  5751. p = this.getField() ? (this.options.getHideTitle() ? "" : e ? e + ":" : "") + (r ? r(e, n, this.options, this._currenttemplateData, t) : n) : n = r ? r(e, e, this.options, this._currenttemplateData, t) : e;
  5752. var s = this.options.getTextType();
  5753. if ("text" == s) a.html(p); else {
  5754. if ("barcode" == s) {
  5755. a.html('<svg width="100%" display="block" height="100%" class="hibarcode_imgcode" preserveAspectRatio="none slice"></svg ><div class="hibarcode_displayValue"></div>');
  5756. try {
  5757. n ? (JsBarcode(a.find(".hibarcode_imgcode")[0], n, {
  5758. format: this.options.getbarcodeMode(),
  5759. width: 1,
  5760. textMargin: -1,
  5761. lineColor: this.options.color || "#000000",
  5762. margin: 0,
  5763. height: parseInt(o.a.pt.toPx(this.options.getHeight() || 10).toString()),
  5764. displayValue: !1
  5765. }), a.find(".hibarcode_imgcode").attr("height", "100%"), a.find(".hibarcode_imgcode").attr("width", "100%"), this.options.hideTitle || a.find(".hibarcode_displayValue").html(n)) : a.html("");
  5766. } catch (t) {
  5767. console.log(t), a.html("此格式不支持该文本");
  5768. }
  5769. }
  5770. if ("qrcode" == s) {
  5771. a.html("");
  5772. try {
  5773. if (n) {
  5774. var l = parseInt(o.a.pt.toPx(this.options.getWidth() || 20)),
  5775. u = parseInt(o.a.pt.toPx(this.options.getHeight() || 20));
  5776. new QRCode(a[0], {
  5777. width: l,
  5778. height: u,
  5779. colorDark: this.options.color || "#000000",
  5780. useSVG: !0
  5781. }).makeCode(n);
  5782. }
  5783. } catch (t) {
  5784. console.log(t), a.html("二维码生成失败");
  5785. }
  5786. }
  5787. }
  5788. }, e.prototype.onResize = function (e, n, i, o, r) {
  5789. t.prototype.onResize.call(this, e, n, i, o, r);
  5790. "barcode" != this.options.getTextType() && "qrcode" != this.options.getTextType() || this.updateTargetText(this.designTarget, this.getTitle(), this.getData());
  5791. }, e.prototype.createTarget = function (t, e, n) {
  5792. var i = $('<div tabindex="1" class="hiprint-printElement hiprint-printElement-text" style="position: absolute;"><div class="hiprint-printElement-text-content hiprint-printElement-content" style="height:100%;width:100%"></div></div>');
  5793. return this.updateTargetText(i, t, e, n), i;
  5794. }, e.prototype.getHtml = function (t, e, n) {
  5795. return this.getHtml2(t, e, n);
  5796. }, e;
  5797. }(f.a),
  5798. I = function () {
  5799. var _t8 = function t(e, n) {
  5800. return (_t8 = Object.setPrototypeOf || _instanceof({
  5801. __proto__: []
  5802. }, Array) && function (t, e) {
  5803. t.__proto__ = e;
  5804. } || function (t, e) {
  5805. for (var n in e) {
  5806. e.hasOwnProperty(n) && (t[n] = e[n]);
  5807. }
  5808. })(e, n);
  5809. };
  5810. return function (e, n) {
  5811. function i() {
  5812. this.constructor = e;
  5813. }
  5814. _t8(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  5815. };
  5816. }(),
  5817. R = function (t) {
  5818. function e(e) {
  5819. return t.call(this, e) || this;
  5820. }
  5821. return I(e, t), e;
  5822. }(g.a),
  5823. M = function () {
  5824. var _t9 = function t(e, n) {
  5825. return (_t9 = Object.setPrototypeOf || _instanceof({
  5826. __proto__: []
  5827. }, Array) && function (t, e) {
  5828. t.__proto__ = e;
  5829. } || function (t, e) {
  5830. for (var n in e) {
  5831. e.hasOwnProperty(n) && (t[n] = e[n]);
  5832. }
  5833. })(e, n);
  5834. };
  5835. return function (e, n) {
  5836. function i() {
  5837. this.constructor = e;
  5838. }
  5839. _t9(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  5840. };
  5841. }(),
  5842. S = function (t) {
  5843. function e(e, n) {
  5844. var i = t.call(this, e) || this;
  5845. return i.options = new R(n), i.options.setDefault(new R(p.a.instance.html.default).getPrintElementOptionEntity()), i;
  5846. }
  5847. return M(e, t), e.prototype.updateDesignViewFromOptions = function () {
  5848. if (this.designTarget) {
  5849. var t = this.getData();
  5850. this.css(this.designTarget, t), this.updateTargetHtml();
  5851. }
  5852. }, e.prototype.updateTargetHtml = function () {
  5853. var t = this.getFormatter();
  5854. if (t) {
  5855. var e = t(this.getData(), this.options, this._currenttemplateData);
  5856. this.designTarget.find(".hiprint-printElement-html-content").html(e);
  5857. }
  5858. }, e.prototype.getConfigOptions = function () {
  5859. return p.a.instance.html;
  5860. }, e.prototype.createTarget = function (t, e) {
  5861. var n = $('<div class="hiprint-printElement hiprint-printElement-html" style="position: absolute;"><div class="hiprint-printElement-html-content" style="height:100%;width:100%"></div></div>'),
  5862. i = this.getFormatter();
  5863. if (i) {
  5864. var o = i(this.getData(), this.options, this._currenttemplateData);
  5865. n.find(".hiprint-printElement-html-content").append(o);
  5866. } else this.options.content && n.find(".hiprint-printElement-html-content").append(this.options.content);
  5867. return n;
  5868. }, e.prototype.getHtml = function (t, e, n) {
  5869. return this.getHtml2(t, e, n);
  5870. }, e;
  5871. }(f.a),
  5872. B = function () {
  5873. var _t10 = function t(e, n) {
  5874. return (_t10 = Object.setPrototypeOf || _instanceof({
  5875. __proto__: []
  5876. }, Array) && function (t, e) {
  5877. t.__proto__ = e;
  5878. } || function (t, e) {
  5879. for (var n in e) {
  5880. e.hasOwnProperty(n) && (t[n] = e[n]);
  5881. }
  5882. })(e, n);
  5883. };
  5884. return function (e, n) {
  5885. function i() {
  5886. this.constructor = e;
  5887. }
  5888. _t10(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  5889. };
  5890. }(),
  5891. F = function (t) {
  5892. function e(e, n) {
  5893. var i = t.call(this, e) || this;
  5894. return i.options = new g.a(n), i.options.setDefault(new g.a(p.a.instance.vline.default).getPrintElementOptionEntity()), i;
  5895. }
  5896. return B(e, t), e.prototype.updateDesignViewFromOptions = function () {
  5897. if (this.designTarget) {
  5898. var t = this.getData();
  5899. this.css(this.designTarget, t);
  5900. }
  5901. }, e.prototype.getConfigOptions = function () {
  5902. return p.a.instance.hline;
  5903. }, e.prototype.createTarget = function (t, e) {
  5904. return $('<div class="hiprint-printElement hiprint-printElement-vline" style="border-left:1px solid;position: absolute;"></div>');
  5905. }, e.prototype.getReizeableShowPoints = function () {
  5906. return ["s"];
  5907. }, e.prototype.getHtml = function (t, e, n) {
  5908. return this.getHtml2(t, e, n);
  5909. }, e;
  5910. }(f.a),
  5911. L = function () {
  5912. var _t11 = function t(e, n) {
  5913. return (_t11 = Object.setPrototypeOf || _instanceof({
  5914. __proto__: []
  5915. }, Array) && function (t, e) {
  5916. t.__proto__ = e;
  5917. } || function (t, e) {
  5918. for (var n in e) {
  5919. e.hasOwnProperty(n) && (t[n] = e[n]);
  5920. }
  5921. })(e, n);
  5922. };
  5923. return function (e, n) {
  5924. function i() {
  5925. this.constructor = e;
  5926. }
  5927. _t11(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  5928. };
  5929. }(),
  5930. A = function (t) {
  5931. function e(e, n) {
  5932. var i = t.call(this, e) || this;
  5933. return i.options = new g.a(n), i.options.setDefault(new g.a(p.a.instance.hline.default).getPrintElementOptionEntity()), i;
  5934. }
  5935. return L(e, t), e.prototype.updateDesignViewFromOptions = function () {
  5936. if (this.designTarget) {
  5937. var t = this.getData();
  5938. this.css(this.designTarget, t);
  5939. }
  5940. }, e.prototype.getConfigOptions = function () {
  5941. return p.a.instance.hline;
  5942. }, e.prototype.createTarget = function (t, e) {
  5943. return $('<div class="hiprint-printElement hiprint-printElement-hline" style="border-top:1px solid;position: absolute;"></div>');
  5944. }, e.prototype.getReizeableShowPoints = function () {
  5945. return ["e"];
  5946. }, e;
  5947. }(f.a),
  5948. z = function () {
  5949. var _t12 = function t(e, n) {
  5950. return (_t12 = Object.setPrototypeOf || _instanceof({
  5951. __proto__: []
  5952. }, Array) && function (t, e) {
  5953. t.__proto__ = e;
  5954. } || function (t, e) {
  5955. for (var n in e) {
  5956. e.hasOwnProperty(n) && (t[n] = e[n]);
  5957. }
  5958. })(e, n);
  5959. };
  5960. return function (e, n) {
  5961. function i() {
  5962. this.constructor = e;
  5963. }
  5964. _t12(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  5965. };
  5966. }(),
  5967. k = function (t) {
  5968. function e(e, n) {
  5969. var i = t.call(this, e) || this;
  5970. return i.options = new g.a(n), i.options.setDefault(new g.a(p.a.instance.rect.default).getPrintElementOptionEntity()), i;
  5971. }
  5972. return z(e, t), e.prototype.updateDesignViewFromOptions = function () {
  5973. if (this.designTarget) {
  5974. var t = this.getData();
  5975. this.css(this.designTarget, t);
  5976. }
  5977. }, e.prototype.getConfigOptions = function () {
  5978. return p.a.instance.hline;
  5979. }, e.prototype.createTarget = function (t, e) {
  5980. return $('<div class="hiprint-printElement hiprint-printElement-rect" style="border:1px solid;position: absolute;"></div>');
  5981. }, e.prototype.getHtml = function (t, e, n) {
  5982. return this.getHtml2(t, e, n);
  5983. }, e;
  5984. }(f.a),
  5985. N = function () {
  5986. var _t13 = function t(e, n) {
  5987. return (_t13 = Object.setPrototypeOf || _instanceof({
  5988. __proto__: []
  5989. }, Array) && function (t, e) {
  5990. t.__proto__ = e;
  5991. } || function (t, e) {
  5992. for (var n in e) {
  5993. e.hasOwnProperty(n) && (t[n] = e[n]);
  5994. }
  5995. })(e, n);
  5996. };
  5997. return function (e, n) {
  5998. function i() {
  5999. this.constructor = e;
  6000. }
  6001. _t13(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  6002. };
  6003. }(),
  6004. V = function (t) {
  6005. function e(e, n) {
  6006. var i = t.call(this, e) || this;
  6007. return i.options = new g.a(n), i.options.setDefault(new g.a(p.a.instance.oval.default).getPrintElementOptionEntity()), i;
  6008. }
  6009. return N(e, t), e.prototype.updateDesignViewFromOptions = function () {
  6010. if (this.designTarget) {
  6011. var t = this.getData();
  6012. this.css(this.designTarget, t);
  6013. }
  6014. }, e.prototype.getConfigOptions = function () {
  6015. return p.a.instance.hline;
  6016. }, e.prototype.createTarget = function (t, e) {
  6017. return $('<div class="hiprint-printElement hiprint-printElement-oval" style="border:1px solid;position: absolute;border-radius: 50%;"></div>');
  6018. }, e.prototype.getHtml = function (t, e, n) {
  6019. return this.getHtml2(t, e, n);
  6020. }, e;
  6021. }(f.a),
  6022. W = function () {
  6023. function t() { }
  6024. return t.createPrintElement = function (t, e) {
  6025. return "text" == t.type ? new D(t, e) : "image" == t.type ? new v(t, e) : "longText" == t.type ? new w(t, e) : "table" == t.type ? new d.a(t, e) : "html" == t.type ? new S(t, e) : "vline" == t.type ? new F(t, e) : "hline" == t.type ? new A(t, e) : "rect" == t.type ? new k(t, e) : "oval" == t.type ? new V(t, e) : void 0;
  6026. }, t;
  6027. }(),
  6028. j = function () {
  6029. function t(t) {
  6030. this.field = t.field, this.fields = t.fields, this.title = t.title, this.text = t.text, this.tid = t.tid, this.data = t.data, this.styler = t.styler, this.formatter = t.formatter, this.type = t.type, this.onRendered = t.onRendered, this.options = t.options;
  6031. }
  6032. return t.prototype.getText = function (t) {
  6033. return t ? this.title || this.text || "" : this.text || this.title || "";
  6034. }, t.prototype.getData = function () {
  6035. return this.data;
  6036. }, t.prototype.createPrintElement = function (t) {
  6037. var e = {};
  6038. return $.extend(e, t || {}), W.createPrintElement(this, e);
  6039. }, t.prototype.getPrintElementTypeEntity = function () {
  6040. return new c({
  6041. title: this.title,
  6042. type: this.type
  6043. });
  6044. }, t.prototype.getFields = function () {
  6045. return this.fields;
  6046. }, t.prototype.getOptions = function () {
  6047. return this.options || {};
  6048. }, t;
  6049. }(),
  6050. U = n(16),
  6051. K = n(12),
  6052. G = function () {
  6053. var _t14 = function t(e, n) {
  6054. return (_t14 = Object.setPrototypeOf || _instanceof({
  6055. __proto__: []
  6056. }, Array) && function (t, e) {
  6057. t.__proto__ = e;
  6058. } || function (t, e) {
  6059. for (var n in e) {
  6060. e.hasOwnProperty(n) && (t[n] = e[n]);
  6061. }
  6062. })(e, n);
  6063. };
  6064. return function (e, n) {
  6065. function i() {
  6066. this.constructor = e;
  6067. }
  6068. _t14(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  6069. };
  6070. }(),
  6071. q = function (t) {
  6072. function e(e) {
  6073. var n = t.call(this, e) || this;
  6074. (e = e || {}).columns ? (n.columns = [], e.columns.forEach(function (t) {
  6075. n.columns.push(new K.a(t));
  6076. })) : n.columns = [new K.a({
  6077. columns: [new u.a({
  6078. width: 100
  6079. }), new u.a({
  6080. width: 100
  6081. })]
  6082. })];
  6083. return n.lHeight = e.lHeight, n.autoCompletion = e.autoCompletion, n.tableFooterRepeat = e.tableFooterRepeat, n;
  6084. }
  6085. return G(e, t), e.prototype.getPrintElementOptionEntity = function () {
  6086. var e = t.prototype.getPrintElementOptionEntity.call(this);
  6087. return e.columns = [], this.columns.forEach(function (t) {
  6088. e.columns.push(t.getPrintElementOptionEntity());
  6089. }), e;
  6090. }, e;
  6091. }(g.a),
  6092. X = n(7),
  6093. Y = function () {
  6094. var _t15 = function t(e, n) {
  6095. return (_t15 = Object.setPrototypeOf || _instanceof({
  6096. __proto__: []
  6097. }, Array) && function (t, e) {
  6098. t.__proto__ = e;
  6099. } || function (t, e) {
  6100. for (var n in e) {
  6101. e.hasOwnProperty(n) && (t[n] = e[n]);
  6102. }
  6103. })(e, n);
  6104. };
  6105. return function (e, n) {
  6106. function i() {
  6107. this.constructor = e;
  6108. }
  6109. _t15(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  6110. };
  6111. }(),
  6112. J = function (t) {
  6113. function e(e, n) {
  6114. var i = t.call(this, e) || this;
  6115. return i.options = new q(n), i.options.setDefault(new q(p.a.instance.tableCustom.default).getPrintElementOptionEntity()), i.columns = i.options.columns, i;
  6116. }
  6117. return Y(e, t), e.prototype.updateDesignViewFromOptions = function () {
  6118. if (this.designTarget) {
  6119. this.css(this.designTarget, this.getData());
  6120. var t = this.designTarget.find(".hiprint-printElement-table-content"),
  6121. e = this.getHtml(this.designPaper);
  6122. t.html(""), t.append(e[0].target.find(".hiprint-printElement-tableTarget")), this.setHiReizeable();
  6123. }
  6124. }, e.prototype.getDesignTarget = function (t) {
  6125. var e = this;
  6126. return this.designTarget = this.getHtml(t)[0].target, this.designPaper = t, this.designTarget.click(function () {
  6127. o.a.event.trigger(e.getPrintElementSelectEventKey(), {
  6128. printElement: e
  6129. });
  6130. }), this.designTarget.find("td").hidroppable({
  6131. accept: ".rn-draggable-item",
  6132. onDrop: function onDrop(t, e) { },
  6133. onDragEnter: function onDragEnter(t, e) {
  6134. $(e).removeClass("rn-draggable-item");
  6135. },
  6136. onDragLeave: function onDragLeave(t, e) {
  6137. $(e).addClass("rn-draggable-item");
  6138. }
  6139. }), this.designTarget;
  6140. }, e.prototype.getConfigOptions = function () {
  6141. return p.a.instance.tableCustom;
  6142. }, e.prototype.createTarget = function (t, e, n) {
  6143. var i = $('<div class="hiprint-printElement hiprint-printElement-table" style="position: absolute;"><div class="hiprint-printElement-table-handle"></div><div class="hiprint-printElement-table-content" style="height:100%;width:100%"></span></div>');
  6144. return i.find(".hiprint-printElement-table-content").append(this.getTableHtml(e, n)), i;
  6145. }, e.prototype.getTableHtml = function (t, e) {
  6146. var n = $('<table class="hiprint-printElement-tableTarget" style="border-collapse: collapse;width:100%;"></table>');
  6147. return n.append(X.a.createTableHead(this.columns, this.options.getWidth())), n.append(X.a.createTableRow(this.columns, t, this.options, this.printElementType)), this.printElementType.footerFormatter && ("no" == this.options.tableFooterRepeat || ("last" == this.options.tableFooterRepeat ? n.find("tbody").append(X.a.createTableFooter(this.printElementType.columns, t, this.options, this.printElementType, e, t).html()) : n.append(X.a.createTableFooter(this.printElementType.columns, t, this.options, this.printElementType, e, [])))), n;
  6148. }, e.prototype.getHtml = function (t, e) {
  6149. this.setCurrenttemplateData(e), this.createTempContainer();
  6150. var n = this.getPaperHtmlResult(t, e);
  6151. return this.removeTempContainer(), n;
  6152. }, e.prototype.getPaperHtmlResult = function (t, e) {
  6153. var n = [],
  6154. i = this.getData(e),
  6155. o = this.getTableHtml(i, e),
  6156. r = this.createTarget(this.printElementType.title, [], e);
  6157. e ? this.updateTargetWidth(r) : this.updateTargetSize(r), this.css(r, i), this.css(o, i), this.getTempContainer().html(""), this.getTempContainer().append(r);
  6158. for (var a, p = this.getBeginPrintTopInPaperByReferenceElement(t), s = 0, l = !1; !l;) {
  6159. var u = 0,
  6160. d = t.getPaperFooter(s);
  6161. 0 == s && p > d && (p = p - d + t.paperHeader, n.push(new P.a({
  6162. target: void 0,
  6163. printLine: void 0
  6164. })), s++, u = t.getContentHeight(s) - (p - t.paperHeader), d = t.getPaperFooter(s));
  6165. var c = n.length > 0 ? n[n.length - 1].target : void 0,
  6166. h = this.getRowsInSpecificHeight(u > 0 ? u : 0 == s ? d - p : t.getContentHeight(s), r, o, s, c, e);
  6167. l = h.isEnd;
  6168. var f = void 0;
  6169. h.target && (h.target.css("left", this.options.displayLeft()), h.target[0].height = ""), 0 == s || u > 0 ? (h.target && (a = p, h.target.css("top", p + "pt")), f = l && null != this.options.lHeight ? p + (h.height > this.options.lHeight ? h.height : this.options.lHeight) : p + h.height) : (h.target && (a = t.paperHeader, h.target.css("top", t.paperHeader + "pt")), f = t.paperHeader + h.height), n.push(new P.a({
  6170. target: h.target,
  6171. printLine: f,
  6172. referenceElement: new E.a({
  6173. top: this.options.getTop(),
  6174. left: this.options.getLeft(),
  6175. height: this.options.getHeight(),
  6176. width: this.options.getWidth(),
  6177. beginPrintPaperIndex: t.index,
  6178. bottomInLastPaper: f,
  6179. printTopInPaper: a
  6180. })
  6181. })), s++;
  6182. }
  6183. return n;
  6184. }, e.prototype.getRowsInSpecificHeight = function (t, e, n, i, r, a) {
  6185. var p = void 0,
  6186. s = n.find("tbody"),
  6187. l = o.a.pt.toPx(t);
  6188. e.find("tbody").html("");
  6189. for (var u = e.outerHeight(), d = []; ;) {
  6190. if (u <= l) {
  6191. if (0 == s.find("tr").length) {
  6192. a && this.options.autoCompletion && (this.autoCompletion(l, e), u = e.outerHeight()), p = {
  6193. target: e.clone(),
  6194. length: e.find("tbody tr").length,
  6195. height: o.a.px.toPt(u),
  6196. isEnd: !0
  6197. }, 0 == e.find("tbody tr").length && r && (p = {
  6198. target: void 0,
  6199. length: 0,
  6200. height: 0,
  6201. isEnd: !0
  6202. });
  6203. } else {
  6204. var c = s.find("tr:lt(1)");
  6205. e.find("tbody").append(c), u = e.outerHeight();
  6206. var h = c.data("rowData");
  6207. d.push(h), u > l && (s.prepend(c), d.pop(), u = e.outerHeight(), p = {
  6208. target: e.clone(),
  6209. length: e.find("tbody tr").length,
  6210. height: o.a.px.toPt(u),
  6211. isEnd: !1
  6212. });
  6213. }
  6214. } else p = {
  6215. target: void 0,
  6216. length: 0,
  6217. height: 0,
  6218. isEnd: !1
  6219. };
  6220. if (p) {
  6221. this.printElementType.footerFormatter && e.find("tfoot") && p.target.find("tfoot").html(X.a.createTableFooter(this.printElementType.columns, this.getData(a), this.options, this.printElementType, a, d).html());
  6222. break;
  6223. }
  6224. }
  6225. return p;
  6226. }, e.prototype.getData = function (t) {
  6227. if (!t) return [{}];
  6228. var e = t[this.getField()];
  6229. return e ? JSON.parse(JSON.stringify(e)) : [];
  6230. }, e.prototype.autoCompletion = function (t, e) {
  6231. for (var n, i = this.getEmptyRowTarget(), o = e.outerHeight(); t > o;) {
  6232. n = i.clone(), e.find("tbody").append(n), o = e.outerHeight();
  6233. }
  6234. n && n.remove();
  6235. }, e.prototype.getEmptyRowTarget = function () {
  6236. return X.a.createEmptyRowTarget(this.columns);
  6237. }, e.prototype.onResize = function (e, n, i, o, r) {
  6238. t.prototype.updateSizeAndPositionOptions.call(this, r, o, i, n), X.a.resizeTableCellWidth(this.designTarget, this.columns, this.options.getWidth());
  6239. }, e.prototype.getReizeableShowPoints = function () {
  6240. return ["s", "e"];
  6241. }, e.prototype.design = function (t, e) {
  6242. var n = this;
  6243. this.designTarget.hidraggable({
  6244. handle: this.designTarget.find(".hiprint-printElement-table-handle"),
  6245. axis: n.options.axis && t && t.axisEnabled ? n.options.axis : void 0,
  6246. onDrag: function onDrag(t, i, o) {
  6247. n.updateSizeAndPositionOptions(i, o), n.createLineOfPosition(e);
  6248. },
  6249. moveUnit: "pt",
  6250. minMove: p.a.instance.movingDistance,
  6251. onBeforeDrag: function onBeforeDrag(t) {
  6252. s.a.instance.draging = !0, n.createLineOfPosition(e);
  6253. },
  6254. onStopDrag: function onStopDrag(t) {
  6255. s.a.instance.draging = !1, n.removeLineOfPosition();
  6256. }
  6257. }), this.setHiReizeable(), this.designTarget.hireizeable({
  6258. showPoints: n.getReizeableShowPoints(),
  6259. noContainer: !0,
  6260. onBeforeResize: function onBeforeResize() {
  6261. s.a.instance.draging = !0;
  6262. },
  6263. onResize: function onResize(t, i, o, r, a) {
  6264. n.onResize(t, i, o, r, a), n.hitable.updateColumnGrips(), n.createLineOfPosition(e);
  6265. },
  6266. onStopResize: function onStopResize() {
  6267. s.a.instance.draging = !1, n.removeLineOfPosition();
  6268. }
  6269. }), this.bingKeyboardMoveEvent(this.designTarget, e);
  6270. }, e.prototype.setHiReizeable = function () {
  6271. var t = this;
  6272. this.hitable = new U.a({
  6273. table: this.designTarget.find("table"),
  6274. rows: this.columns,
  6275. resizeRow: !1,
  6276. resizeColumn: !0,
  6277. trs: $(this.designTarget).find("tbody tr"),
  6278. handle: this.designTarget.find("table thead"),
  6279. columnDisplayEditable: !0,
  6280. columnDisplayIndexEditable: !0,
  6281. columnResizable: !0,
  6282. columnAlignEditable: !0,
  6283. isEnableEdit: !0,
  6284. isEnableEditText: !0,
  6285. isEnableEditField: !0,
  6286. isEnableContextMenu: !0,
  6287. isEnableInsertRow: !0,
  6288. isEnableDeleteRow: !0,
  6289. isEnableInsertColumn: !0,
  6290. isEnableDeleteColumn: !0,
  6291. isEnableMergeCell: !0
  6292. }), o.a.event.on("updateTable" + this.hitable.id, function () {
  6293. t.updateDesignViewFromOptions();
  6294. });
  6295. }, e;
  6296. }(f.a),
  6297. Q = function () {
  6298. var _t16 = function t(e, n) {
  6299. return (_t16 = Object.setPrototypeOf || _instanceof({
  6300. __proto__: []
  6301. }, Array) && function (t, e) {
  6302. t.__proto__ = e;
  6303. } || function (t, e) {
  6304. for (var n in e) {
  6305. e.hasOwnProperty(n) && (t[n] = e[n]);
  6306. }
  6307. })(e, n);
  6308. };
  6309. return function (e, n) {
  6310. function i() {
  6311. this.constructor = e;
  6312. }
  6313. _t16(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  6314. };
  6315. }(),
  6316. Z = function (t) {
  6317. function e(e) {
  6318. return t.call(this, e) || this;
  6319. }
  6320. return Q(e, t), e.prototype.createPrintElement = function (t) {
  6321. return new J(this, t);
  6322. }, e;
  6323. }(h),
  6324. tt = function () {
  6325. var _t17 = function t(e, n) {
  6326. return (_t17 = Object.setPrototypeOf || _instanceof({
  6327. __proto__: []
  6328. }, Array) && function (t, e) {
  6329. t.__proto__ = e;
  6330. } || function (t, e) {
  6331. for (var n in e) {
  6332. e.hasOwnProperty(n) && (t[n] = e[n]);
  6333. }
  6334. })(e, n);
  6335. };
  6336. return function (e, n) {
  6337. function i() {
  6338. this.constructor = e;
  6339. }
  6340. _t17(e, n), e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i());
  6341. };
  6342. }(),
  6343. et = function (t) {
  6344. function e(e) {
  6345. return t.call(this, e) || this;
  6346. }
  6347. return tt(e, t), e.prototype.createPrintElement = function (t) {
  6348. var e = {};
  6349. return $.extend(e, t || {}), W.createPrintElement(this, e);
  6350. }, e.prototype.getPrintElementTypeEntity = function () {
  6351. return new c({
  6352. title: this.title,
  6353. type: this.type
  6354. });
  6355. }, e;
  6356. }(j),
  6357. nt = function () {
  6358. function t() { }
  6359. return t.createPrintElementType = function (t) {
  6360. return t.type = t.type || "text", "text" == t.type ? new et(t) : "table" == t.type ? new h(t) : "tableCustom" == t.type ? new Z(t) : new j(t);
  6361. }, t;
  6362. }(),
  6363. it = function () {
  6364. function t() { }
  6365. return t.getElementTypeGroups = function (e) {
  6366. var n = t.formatterModule(e);
  6367. return a.instance[n] || [];
  6368. }, t.getElementType = function (t, e) {
  6369. if (t) return a.instance.getElementType(t);
  6370. nt.createPrintElementType({
  6371. type: e
  6372. });
  6373. }, t.build = function (e, n) {
  6374. var i = t.formatterModule(n),
  6375. o = new l().createPrintElementTypeHtml(e, this.getElementTypeGroups(i));
  6376. this.enableDrag(o);
  6377. }, t.buildByHtml = function (t) {
  6378. this.enableDrag(t);
  6379. }, t.enableDrag = function (e) {
  6380. e.hidraggable({
  6381. revert: !0,
  6382. proxy: function proxy(t) {
  6383. var e = s.a.instance.getDragingPrintElement(),
  6384. n = e.printElement.getProxyTarget(e.printElement.printElementType.getOptions());
  6385. return n.appendTo("body"), n.css("z-index", "9999"), n;
  6386. },
  6387. moveUnit: "pt",
  6388. minMove: 4,
  6389. onBeforeDrag: function onBeforeDrag(e) {
  6390. s.a.instance.draging = !0;
  6391. var n = t.getElementType($(e.data.target).attr("tid"), $(e.data.target).attr("ptype"));
  6392. return s.a.instance.setDragingPrintElement(n.createPrintElement()), !0;
  6393. },
  6394. onDrag: function onDrag(t, e, n) {
  6395. s.a.instance.getDragingPrintElement().updatePosition(e, n);
  6396. },
  6397. onStopDrag: function onStopDrag(t) {
  6398. s.a.instance.draging = !1;
  6399. }
  6400. });
  6401. }, t.formatterModule = function (t) {
  6402. return t || "_default";
  6403. }, t;
  6404. }(),
  6405. ot = function () {
  6406. return function (t, e) {
  6407. var n = this;
  6408. this.name = t, this.printElementTypes = [], e.forEach(function (t) {
  6409. n.printElementTypes.push(nt.createPrintElementType(t));
  6410. });
  6411. };
  6412. }(),
  6413. rt = function () {
  6414. return function (t) {
  6415. if (this.index = t.index, this.paperType = t.paperType, this.paperType) {
  6416. var e = s.a.instance[this.paperType];
  6417. t.height ? (this.height = t.height, this.width = t.width) : (this.height = e.height, this.width = e.width);
  6418. } else this.height = t.height, this.width = t.width;
  6419. this.paperHeader = t.paperHeader || 0, this.paperFooter = t.paperFooter || o.a.mm.toPt(this.height), this.printElements = t.printElements || [], this.paperNumberLeft = t.paperNumberLeft, this.paperNumberTop = t.paperNumberTop, this.paperNumberDisabled = t.paperNumberDisabled, this.paperNumberFormat = t.paperNumberFormat, this.panelPaperRule = t.panelPaperRule, this.rotate = t.rotate || void 0, this.firstPaperFooter = t.firstPaperFooter, this.evenPaperFooter = t.evenPaperFooter, this.oddPaperFooter = t.oddPaperFooter, this.lastPaperFooter = t.lastPaperFooter, this.topOffset = t.topOffset, this.fontFamily = t.fontFamily, this.leftOffset = t.leftOffset, this.orient = t.orient;
  6420. };
  6421. }(),
  6422. at = function () {
  6423. function t(t, e, n, i) {
  6424. this.startX = this.minX = t, this.startY = this.minY = e, this.maxX = t, this.maxY = e, this.lastLeft = n, this.lastTop = i;
  6425. }
  6426. return t.prototype.updateRect = function (t, e) {
  6427. this.minX = this.startX < t ? this.startX : t, this.minY = this.startY < e ? this.startY : e, this.maxX = this.startX < t ? t : this.startX, this.maxY = this.startY < e ? e : this.startY;
  6428. }, t.prototype.updatePositionByMultipleSelect = function (t, e) {
  6429. null != t && (this.lastLeft = this.lastLeft + t), null != e && (this.lastTop = this.lastTop + e), this.target.css({
  6430. left: this.lastLeft + "pt",
  6431. top: this.lastTop + "pt"
  6432. });
  6433. }, t;
  6434. }(),
  6435. pt = function () {
  6436. function t(t, e) {
  6437. this.templateId = e, this.index = t.index, this.width = t.width, this.height = t.height, this.paperType = t.paperType, this.paperHeader = t.paperHeader, this.paperFooter = t.paperFooter, this.initPrintElements(t.printElements), this.paperNumberLeft = t.paperNumberLeft, this.paperNumberTop = t.paperNumberTop, this.paperNumberDisabled = t.paperNumberDisabled, this.paperNumberFormat = t.paperNumberFormat, this.panelPaperRule = t.panelPaperRule, this.firstPaperFooter = t.firstPaperFooter, this.evenPaperFooter = t.evenPaperFooter, this.oddPaperFooter = t.oddPaperFooter, this.lastPaperFooter = t.lastPaperFooter, this.topOffset = t.topOffset, this.leftOffset = t.leftOffset, this.fontFamily = t.fontFamily, this.orient = t.orient, this.target = this.createTarget(), this.rotate = t.rotate;
  6438. }
  6439. return t.prototype.design = function (t) {
  6440. var e = this;
  6441. this.orderPrintElements(), this.designPaper = this.createNewPage(0), this.target.html(""), this.target.append(this.designPaper.getTarget()), this.droppablePaper(this.designPaper), this.designPaper.design(t), this.designPaper.subscribePaperBaseInfoChanged(function (t) {
  6442. e.paperHeader = t.paperHeader, e.paperFooter = t.paperFooter, e.paperNumberLeft = t.paperNumberLeft, e.paperNumberTop = t.paperNumberTop, e.paperNumberDisabled = t.paperNumberDisabled, e.paperNumberFormat = t.paperNumberFormat;
  6443. }), this.printElements.forEach(function (n) {
  6444. e.appendDesignPrintElement(e.designPaper, n), n.design(t, e.designPaper);
  6445. }), this.target.bind("click.hiprint", function (t) {
  6446. o.a.event.trigger("BuildCustomOptionSettingEventKey_" + e.templateId, {
  6447. options: {
  6448. panelPaperRule: e.panelPaperRule,
  6449. firstPaperFooter: e.firstPaperFooter,
  6450. evenPaperFooter: e.evenPaperFooter,
  6451. oddPaperFooter: e.oddPaperFooter,
  6452. lastPaperFooter: e.lastPaperFooter,
  6453. leftOffset: e.leftOffset,
  6454. topOffset: e.topOffset,
  6455. fontFamily: e.fontFamily,
  6456. orient: e.orient,
  6457. paperNumberFormat: e.paperNumberFormat
  6458. },
  6459. callback: function callback(t) {
  6460. e.panelPaperRule = t.panelPaperRule, e.firstPaperFooter = t.firstPaperFooter, e.evenPaperFooter = t.evenPaperFooter, e.oddPaperFooter = t.oddPaperFooter, e.lastPaperFooter = t.lastPaperFooter, e.leftOffset = t.leftOffset, e.topOffset = t.topOffset, e.fontFamily = t.fontFamily, e.orient = t.orient, e.paperNumberFormat = t.paperNumberFormat, e.designPaper.setOffset(e.leftOffset, e.topOffset), e.css(e.target);
  6461. }
  6462. });
  6463. }), this.bindBatchMoveElement();
  6464. }, t.prototype.css = function (t) {
  6465. this.fontFamily && t.css("fontFamily", this.fontFamily);
  6466. }, t.prototype.getHtml = function (t, e, n, i, o) {
  6467. var r = this;
  6468. this.orderPrintElements();
  6469. var a,
  6470. p = n || [],
  6471. s = i || this,
  6472. l = void 0;
  6473. if (i ? (l = p[p.length - 1], a = l.getPanelTarget(), l.updateReferenceElement(new E.a({
  6474. top: this.paperHeader,
  6475. left: 0,
  6476. height: 0,
  6477. width: 0,
  6478. bottomInLastPaper: l.referenceElement.bottomInLastPaper,
  6479. beginPrintPaperIndex: p.length - 1,
  6480. printTopInPaper: l.referenceElement.bottomInLastPaper,
  6481. endPrintPaperIndex: p.length - 1
  6482. }))) : (a = s.createTarget(), l = s.createNewPage(p.length), p.push(l), a.append(l.getTarget())), this.printElements.filter(function (t) {
  6483. return !t.isFixed() && !t.isHeaderOrFooter();
  6484. }).forEach(function (e) {
  6485. var n = [],
  6486. i = p[p.length - 1];
  6487. i.referenceElement.isPositionLeftOrRight(e.options.getTop()) ? (l = p[i.referenceElement.beginPrintPaperIndex], n = e.getHtml(l, t)) : (l = p[i.referenceElement.endPrintPaperIndex], n = e.getHtml(l, t)), n.forEach(function (t, i) {
  6488. t.referenceElement && (t.referenceElement.endPrintPaperIndex = t.referenceElement.beginPrintPaperIndex + n.length - 1), i > 0 && (l.index < p.length - 1 ? l = p[l.index + 1] : (l = s.createNewPage(p.length, l.referenceElement), p.push(l)), a.append(l.getTarget())), t.target && (l.append(t.target), l.updatePrintLine(t.printLine), e.onRendered(l, t.target)), i == n.length - 1 && t.referenceElement && l.updateReferenceElement(t.referenceElement);
  6489. });
  6490. }), o && o.templates.forEach(function (t, e) {
  6491. var i = t.data || {},
  6492. o = t.options || {};
  6493. t.template.printPanels.forEach(function (t) {
  6494. t.getHtml(i, o, n, r);
  6495. });
  6496. }), !i) {
  6497. if (this.lastPaperFooter) p[p.length - 1].printLine > this.lastPaperFooter && (l = s.createNewPage(p.length, l.referenceElement), p.push(l), a.append(l.getTarget()));
  6498. this.panelPaperRule && ("odd" == this.panelPaperRule && p.length % 2 == 0 && (l = s.createNewPage(p.length, l.referenceElement), p.push(l), a.append(l.getTarget())), "even" == this.panelPaperRule && p.length % 2 == 1 && (l = s.createNewPage(p.length, l.referenceElement), p.push(l), a.append(l.getTarget()))), p.forEach(function (n) {
  6499. n.updatePaperNumber(n.index + 1, p.length, e.paperNumberToggleInEven), r.fillPaperHeaderAndFooter(n, t, p.length), e && (null != e.leftOffset && n.setLeftOffset(e.leftOffset), null != e.topOffset && n.setTopOffset(e.topOffset));
  6500. }), a.prepend(this.getPrintStyle());
  6501. }
  6502. return a;
  6503. }, t.prototype.resize = function (t, e, n, i) {
  6504. this.width = e, this.height = n, this.paperType = t, this.rotate = i, this.designPaper.resize(e, n);
  6505. }, t.prototype.rotatePaper = function () {
  6506. null == this.rotate && (this.rotate = !1), this.rotate = !this.rotate, this.resize(this.paperType, this.height, this.width, this.rotate);
  6507. }, t.prototype.getTarget = function () {
  6508. return this.target;
  6509. }, t.prototype.enable = function () {
  6510. this.target.removeClass("hipanel-disable");
  6511. }, t.prototype.disable = function () {
  6512. this.target.addClass("hipanel-disable");
  6513. }, t.prototype.getPanelEntity = function (t) {
  6514. var e = [];
  6515. return this.printElements.forEach(function (n) {
  6516. e.push(n.getPrintElementEntity(t));
  6517. }), new rt({
  6518. index: this.index,
  6519. width: this.width,
  6520. height: this.height,
  6521. paperType: this.paperType,
  6522. paperHeader: this.paperHeader,
  6523. paperFooter: this.paperFooter,
  6524. paperNumberDisabled: !!this.paperNumberDisabled || void 0,
  6525. paperNumberFormat: this.paperNumberFormat ? this.paperNumberFormat : void 0,
  6526. panelPaperRule: this.panelPaperRule ? this.panelPaperRule : void 0,
  6527. paperNumberLeft: this.paperNumberLeft,
  6528. paperNumberTop: this.paperNumberTop,
  6529. printElements: e,
  6530. rotate: this.rotate,
  6531. firstPaperFooter: this.firstPaperFooter,
  6532. evenPaperFooter: this.evenPaperFooter,
  6533. oddPaperFooter: this.oddPaperFooter,
  6534. lastPaperFooter: this.lastPaperFooter,
  6535. topOffset: this.topOffset,
  6536. fontFamily: this.fontFamily,
  6537. orient: this.orient,
  6538. leftOffset: this.leftOffset
  6539. });
  6540. }, t.prototype.createTarget = function () {
  6541. var t = $('<div class="hiprint-printPanel panel-index-' + this.index + '"></div>');
  6542. return this.css(t), t;
  6543. }, t.prototype.droppablePaper = function (t) {
  6544. var e = this;
  6545. t.getTarget().hidroppable({
  6546. accept: ".ep-draggable-item",
  6547. onDrop: function onDrop(n, i) {
  6548. var r = s.a.instance.getDragingPrintElement(),
  6549. a = r.printElement;
  6550. a.updateSizeAndPositionOptions(e.mathroundToporleft(r.left - o.a.px.toPt(e.target.offset().left)), e.mathroundToporleft(r.top - o.a.px.toPt(e.target.offset().top))), a.setTemplateId(e.templateId), a.setPanel(e), e.appendDesignPrintElement(e.designPaper, a, !0), e.printElements.push(a), a.design(void 0, t);
  6551. }
  6552. });
  6553. }, t.prototype.initPrintElements = function (t) {
  6554. var e = this;
  6555. this.printElements = [], t && t.forEach(function (n) {
  6556. var i;
  6557. if (i = n.printElementType ? nt.createPrintElementType(n.printElementType) : a.instance.getElementType(n.tid)) {
  6558. var o = i.createPrintElement(n.options);
  6559. o.setTemplateId(e.templateId), o.setPanel(e), e.printElements.push(o);
  6560. } else console.log("miss " + JSON.stringify(t));
  6561. });
  6562. }, t.prototype.mathroundToporleft = function (t) {
  6563. var e = p.a.instance.movingDistance;
  6564. return Math.round(t / e) * e;
  6565. }, t.prototype.appendDesignPrintElement = function (t, e, n) {
  6566. e.setCurrenttemplateData(void 0);
  6567. var i = e.getDesignTarget(t);
  6568. i.addClass("design"), n && e.initSizeByHtml(i), t.append(i);
  6569. }, t.prototype.createNewPage = function (t, e) {
  6570. var n = new T(this.templateId, this.width, this.height, this.paperHeader, this.paperFooter, this.paperNumberLeft, this.paperNumberTop, this.paperNumberDisabled, this.paperNumberFormat, t, e);
  6571. return n.setFooter(this.firstPaperFooter, this.evenPaperFooter, this.oddPaperFooter, this.lastPaperFooter), n.setOffset(this.leftOffset, this.topOffset), n;
  6572. }, t.prototype.orderPrintElements = function () {
  6573. this.printElements = o.a.orderBy(this.printElements, function (t) {
  6574. return t.options.getLeft();
  6575. }), this.printElements = o.a.orderBy(this.printElements, function (t) {
  6576. return t.options.getTop();
  6577. });
  6578. }, t.prototype.fillPaperHeaderAndFooter = function (t, e, n) {
  6579. this.printElements.filter(function (t) {
  6580. return t.isFixed() || t.isHeaderOrFooter();
  6581. }).forEach(function (i) {
  6582. if (i.isFixed(), i.showInPage(t.index, n)) {
  6583. var o = i.getHtml(t, e);
  6584. o.length && t.append(o[0].target);
  6585. }
  6586. });
  6587. }, t.prototype.clear = function () {
  6588. this.printElements.forEach(function (t) {
  6589. t.designTarget && t.designTarget.length && t.designTarget.remove();
  6590. }), this.printElements = [];
  6591. }, t.prototype.insertPrintElementToPanel = function (t) {
  6592. var e = this.getPrintElementTypeByEntity(t);
  6593. if (e) {
  6594. var n = e.createPrintElement(t.options);
  6595. n.setTemplateId(this.templateId), n.setPanel(this), this.printElements.push(n);
  6596. }
  6597. }, t.prototype.addPrintText = function (t) {
  6598. t.printElementType = t.printElementType || {}, t.printElementType.type = "text", this.insertPrintElementToPanel(t);
  6599. }, t.prototype.addPrintHtml = function (t) {
  6600. t.printElementType = t.printElementType || {}, t.printElementType.type = "html", this.insertPrintElementToPanel(t);
  6601. }, t.prototype.addPrintTable = function (t) {
  6602. if (t.printElementType = t.printElementType || {}, t.printElementType.type = "table", t.options && t.options.columns) {
  6603. var e = $.extend({}, t.options.columns);
  6604. t.printElementType.columns = e.columns, e.columns = void 0;
  6605. }
  6606. this.insertPrintElementToPanel(t);
  6607. }, t.prototype.addPrintImage = function (t) {
  6608. t.printElementType = t.printElementType || {}, t.printElementType.type = "image", this.insertPrintElementToPanel(t);
  6609. }, t.prototype.addPrintLongText = function (t) {
  6610. t.printElementType = t.printElementType || {}, t.printElementType.type = "longText", this.insertPrintElementToPanel(t);
  6611. }, t.prototype.addPrintVline = function (t) {
  6612. t.printElementType = t.printElementType || {}, t.printElementType.type = "vline", this.insertPrintElementToPanel(t);
  6613. }, t.prototype.addPrintHline = function (t) {
  6614. t.printElementType = t.printElementType || {}, t.printElementType.type = "hline", this.insertPrintElementToPanel(t);
  6615. }, t.prototype.addPrintRect = function (t) {
  6616. t.printElementType = t.printElementType || {}, t.printElementType.type = "rect", this.insertPrintElementToPanel(t);
  6617. }, t.prototype.addPrintOval = function (t) {
  6618. t.printElementType = t.printElementType || {}, t.printElementType.type = "oval", this.insertPrintElementToPanel(t);
  6619. }, t.prototype.getPrintElementTypeByEntity = function (t) {
  6620. var e;
  6621. return (e = t.tid ? a.instance.getElementType(t.tid) : nt.createPrintElementType(t.printElementType)) || console.log("miss " + JSON.stringify(t)), e;
  6622. }, t.prototype.getPrintStyle = function () {
  6623. return " <style printStyle>\n @page\n {\n border:0;\n padding:0cm;\n margin:0cm;\n " + this.getPrintSizeStyle() + "\n }\n </style>\n ";
  6624. }, t.prototype.getPrintSizeStyle = function () {
  6625. return this.paperType ? "size:" + this.paperType + " " + (this.height > this.width ? "portrait" : "landscape") + ";" : "size:" + this.width + "mm " + this.height + "mm " + (this.orient ? 1 == this.orient ? "portrait" : "landscape" : "") + ";";
  6626. }, t.prototype.deletePrintElement = function (t) {
  6627. var e = this;
  6628. this.printElements.filter(function (n, i) {
  6629. n.id == t.id && (t.delete(), e.printElements.splice(i, 1));
  6630. });
  6631. }, t.prototype.getElementByTid = function (t) {
  6632. return this.printElements.filter(function (e) {
  6633. return e.printElementType.tid === t;
  6634. }).map(function (t, e) {
  6635. return t;
  6636. });
  6637. }, t.prototype.getElementByName = function (t) {
  6638. return this.printElements.filter(function (e) {
  6639. return e.options.name === t;
  6640. }).map(function (t, e) {
  6641. return t;
  6642. });
  6643. }, t.prototype.getFieldsInPanel = function () {
  6644. var t = [];
  6645. return this.printElements.forEach(function (e) {
  6646. e.options && e.options.field ? t.push(e.options.field) : e.printElementType.field && t.push(e.printElementType.field);
  6647. }), t;
  6648. }, t.prototype.bindBatchMoveElement = function () {
  6649. var t = this;
  6650. this.designPaper.getTarget().on("mousemove", function (e) {
  6651. s.a.instance.draging || 1 === e.buttons && (t.mouseRect.updateRect(e.pageX, e.pageY), t.updateRectPanel(t.mouseRect));
  6652. }).on("mousedown", function (e) {
  6653. s.a.instance.draging || (t.mouseRect && t.mouseRect.target && t.mouseRect.target.remove(), 1 === e.buttons && (t.mouseRect = new at(e.pageX, e.pageY, s.a.instance.dragLengthCNum(e.pageX - t.designPaper.getTarget().offset().left, p.a.instance.movingDistance), s.a.instance.dragLengthCNum(e.pageY - t.designPaper.getTarget().offset().top, p.a.instance.movingDistance))));
  6654. });
  6655. }, t.prototype.getElementInRect = function (t) {
  6656. var e = [];
  6657. return this.printElements.forEach(function (n) {
  6658. n.inRect(t) && e.push(n);
  6659. }), e;
  6660. }, t.prototype.updateRectPanel = function (t) {
  6661. var e = this,
  6662. n = this.designPaper.getTarget();
  6663. this.mouseRect.target || (this.mouseRect.target = $('<div tabindex="1" style="z-index:2;position: absolute;opacity:0.2;border: 1px dashed #000;background-color:#31676f;"><span></span></div>'), n.find(".hiprint-printPaper-content").append(this.mouseRect.target), this.mouseRect.target.focus(), this.bingKeyboardMoveEvent(this.mouseRect.target), this.mouseRect.target.hidraggable({
  6664. onDrag: function onDrag(t, n, i) {
  6665. e.mouseRect.lastLeft = e.mouseRect.lastLeft ? e.mouseRect.lastLeft : n, e.mouseRect.lastTop = e.mouseRect.lastTop ? e.mouseRect.lastTop : i, (e.mouseRect.mouseRectSelectedElement || []).forEach(function (t) {
  6666. t.updatePositionByMultipleSelect(n - e.mouseRect.lastLeft, i - e.mouseRect.lastTop);
  6667. }), e.mouseRect.lastLeft = n, e.mouseRect.lastTop = i;
  6668. },
  6669. moveUnit: "pt",
  6670. minMove: p.a.instance.movingDistance,
  6671. onBeforeDrag: function onBeforeDrag(t) {
  6672. e.mouseRect.target.focus(), s.a.instance.draging = !0, e.mouseRect.mouseRectSelectedElement || (e.mouseRect.mouseRectSelectedElement = e.getElementInRect(e.mouseRect));
  6673. },
  6674. onStopDrag: function onStopDrag(t) {
  6675. s.a.instance.draging = !1;
  6676. }
  6677. })), this.mouseRect.target.css({
  6678. height: t.maxY - t.minY + "px",
  6679. width: t.maxX - t.minX + "px",
  6680. left: t.lastLeft + "pt",
  6681. top: t.lastTop + "pt"
  6682. });
  6683. }, t.prototype.bingKeyboardMoveEvent = function (t) {
  6684. var e = this;
  6685. t.attr("tabindex", "1"), t.keydown(function (t) {
  6686. e.mouseRect.mouseRectSelectedElement || (e.mouseRect.mouseRectSelectedElement = e.getElementInRect(e.mouseRect));
  6687. var n = e.mouseRect.mouseRectSelectedElement || [];
  6688. switch (t.keyCode) {
  6689. case 37:
  6690. e.mouseRect.updatePositionByMultipleSelect(0 - p.a.instance.movingDistance, 0), n.forEach(function (t) {
  6691. t.updatePositionByMultipleSelect(0 - p.a.instance.movingDistance, 0);
  6692. }), t.preventDefault();
  6693. break;
  6694. case 38:
  6695. e.mouseRect.updatePositionByMultipleSelect(0, 0 - p.a.instance.movingDistance), n.forEach(function (t) {
  6696. t.updatePositionByMultipleSelect(0, 0 - p.a.instance.movingDistance);
  6697. }), t.preventDefault();
  6698. break;
  6699. case 39:
  6700. e.mouseRect.updatePositionByMultipleSelect(p.a.instance.movingDistance, 0), n.forEach(function (t) {
  6701. t.updatePositionByMultipleSelect(p.a.instance.movingDistance, 0);
  6702. }), t.preventDefault();
  6703. break;
  6704. case 40:
  6705. e.mouseRect.updatePositionByMultipleSelect(0, p.a.instance.movingDistance), n.forEach(function (t) {
  6706. t.updatePositionByMultipleSelect(0, p.a.instance.movingDistance);
  6707. }), t.preventDefault();
  6708. }
  6709. });
  6710. }, t;
  6711. }(),
  6712. st = function () {
  6713. return function (t) {
  6714. if (t) if (t.panels) {
  6715. this.panels = [];
  6716. for (var e = 0; e < t.panels.length; e++) {
  6717. this.panels.push(new rt(t.panels[e]));
  6718. }
  6719. } else this.panels = [];
  6720. };
  6721. }(),
  6722. lt = n(9),
  6723. ut = function () {
  6724. function t(t, e) {
  6725. var n = this;
  6726. this.printElementOptionSettingPanel = {}, this.printTemplate = t, this.settingContainer = $(e), o.a.event.on(t.getPrintElementSelectEventKey(), function (t) {
  6727. n.buildSetting(t);
  6728. }), o.a.event.on(t.getBuildCustomOptionSettingEventKey(), function (t) {
  6729. n.buildSettingByCustomOptions(t);
  6730. });
  6731. }
  6732. return t.prototype.init = function () { }, t.prototype.buildSetting = function (t) {
  6733. var e = this,
  6734. n = this,
  6735. i = t.printElement,
  6736. o = t.customOptionsInput;
  6737. this.lastPrintElement && this.lastPrintElement.getPrintElementOptionItems().forEach(function (t) {
  6738. t.destroy();
  6739. });
  6740. this.lastPrintElement = void 0, this.settingContainer.html("");
  6741. var r = $('<div class="hiprint-option-items"></div>');
  6742. i.getPrintElementOptionItems().forEach(function (t) {
  6743. t.submit = function (t) {
  6744. i.submitOption();
  6745. };
  6746. var n = t.createTarget(i, i.options, i.printElementType);
  6747. e.printElementOptionSettingPanel[t.name] = n, r.append(n), t.setValue(i.options[t.name], i.options, i.printElementType);
  6748. });
  6749. var a = $('<button class="hiprint-option-item-settingBtn hiprint-option-item-submitBtn"\n type="button">确定</button>'),
  6750. p = $('<button class="hiprint-option-item-settingBtn hiprint-option-item-deleteBtn"\n type="button">删除</button>');
  6751. r.append(a), r.append(p), a.bind("click.submitOption", function () {
  6752. i.submitOption();
  6753. }), p.bind("click.deleteBtn", function () {
  6754. n.printTemplate.deletePrintElement(i);
  6755. }), r.find(".auto-submit").change(function (t) {
  6756. i.submitOption();
  6757. }), r.find(".auto-submit:input").bind("keydown.submitOption", function (t) {
  6758. 13 == t.keyCode && i.submitOption();
  6759. }), this.settingContainer.append(r), o && o.forEach(function (t) {
  6760. var n = t.callback;
  6761. t.callback = function (t) {
  6762. n && (n(t), i.submitOption());
  6763. }, e.buildSettingByCustomOptions(t, e.settingContainer);
  6764. }), this.lastPrintElement = i;
  6765. }, t.prototype.buildSettingByCustomOptions = function (t, e) {
  6766. var n = this;
  6767. this.lastPrintElement && this.lastPrintElement.getPrintElementOptionItems().forEach(function (t) {
  6768. t.destroy();
  6769. });
  6770. this.lastPrintElement = void 0;
  6771. var i = e || this.settingContainer;
  6772. e || this.settingContainer.html("");
  6773. var o = [];
  6774. t.optionItems ? o = t.optionItems : Object.keys(t.options).forEach(function (t) {
  6775. var e = lt.a.getItem(t);
  6776. e && o.push(e);
  6777. });
  6778. var r = $('<div class="hiprint-option-items"></div>');
  6779. t.title && r.append('<div class="hiprint-option-item hiprint-option-item-row">\n <div class="hiprint-option-item-label hiprint-option-title">\n ' + t.title + "\n </div>\n </div>"), o.forEach(function (e) {
  6780. e.submit = function (e) {
  6781. t.callback(n.getValueByOptionItems(o));
  6782. }, r.append(e.createTarget(void 0, t.options, void 0)), e.setValue(t.options[e.name], t.options, void 0);
  6783. });
  6784. var a = $('<button class="hiprint-option-item-settingBtn hiprint-option-item-submitBtn"\n type="button">确定</button>');
  6785. r.append(a), a.bind("click.submitOption", function () {
  6786. t.callback(n.getValueByOptionItems(o));
  6787. }), r.find(".auto-submit").change(function (e) {
  6788. t.callback(n.getValueByOptionItems(o));
  6789. }), r.find(".auto-submit:input").bind("keydown.submitOption", function (e) {
  6790. 13 == e.keyCode && t.callback(n.getValueByOptionItems(o));
  6791. }), i.append(r);
  6792. }, t.prototype.getValueByOptionItems = function (t) {
  6793. var e = {};
  6794. return t.forEach(function (t) {
  6795. e[t.name] = t.getValue();
  6796. }), e;
  6797. }, t;
  6798. }(),
  6799. dt = function () {
  6800. function t(t, e) {
  6801. this.paginationContainer = t, this.jqPaginationContainer = $(this.paginationContainer), this.template = e;
  6802. }
  6803. return t.prototype.buildPagination = function (t) {
  6804. var e = this.template.getPaneltotal(),
  6805. n = this;
  6806. this.jqPaginationContainer.html("");
  6807. for (var i = $('<ul class="hiprint-pagination"></ul>'), o = function o() {
  6808. var t = r,
  6809. e = $("<li><span>" + (t + 1) + '</span><a href="javascript:void(0);">x</a></li>');
  6810. e.find("span").click(function () {
  6811. n.template.selectPanel(t), e.removeClass("selected"), $(this).parent("li").addClass("selected");
  6812. }), e.find("a").click(function () {
  6813. n.template.deletePanel(t), n.buildPagination();
  6814. }), i.append(e);
  6815. }, r = 0; r < e; r++) {
  6816. o();
  6817. }
  6818. var a = $("<li><span>+</span></li>");
  6819. i.append(a), this.jqPaginationContainer.append(i), a.click(function () {
  6820. n.template.addPrintPanel(void 0, !0), n.buildPagination();
  6821. });
  6822. }, t;
  6823. }(),
  6824. ct = function () {
  6825. function t(t) {
  6826. var e = this;
  6827. this.tempimageBase64 = {}, this.id = s.a.instance.guid(), s.a.instance.setPrintTemplateById(this.id, this);
  6828. var n = t || {};
  6829. this.printPanels = [];
  6830. var i = new st(n.template || []);
  6831. n.template && i.panels.forEach(function (t) {
  6832. e.printPanels.push(new pt(t, e.id));
  6833. }), n.fields && (this.fields = n.fields), n.settingContainer && new ut(this, n.settingContainer), n.paginationContainer && (this.printPaginationCreator = new dt(n.paginationContainer, this), this.printPaginationCreator.buildPagination()), this.initAutoSave();
  6834. }
  6835. return t.prototype.design = function (t, e) {
  6836. var n = this;
  6837. if (e || (e = {}), 0 == this.printPanels.length) {
  6838. var i = this.createDefaultPanel();
  6839. this.printPanels.push(i);
  6840. }
  6841. if (!t) throw new Error("options.container can not be empty");
  6842. this.createContainer(t), this.printPanels.forEach(function (t, i) {
  6843. n.container.append(t.getTarget()), i > 0 && t.disable(), t.design(e);
  6844. }), this.selectPanel(0);
  6845. }, t.prototype.getSimpleHtml = function (t, e) {
  6846. var n = this;
  6847. e || (e = {});
  6848. var i = $('<div class="hiprint-printTemplate"></div>');
  6849. t && t.constructor === Array ? t.forEach(function (t) {
  6850. t && n.printPanels.forEach(function (n, o) {
  6851. i.append(n.getHtml(t, e));
  6852. });
  6853. }) : this.printPanels.forEach(function (n, o) {
  6854. i.append(n.getHtml(t, e));
  6855. });
  6856. return e && e.imgToBase64 && this.transformImg(i.find("img")), i;
  6857. }, t.prototype.getHtml = function (t, e) {
  6858. return t || (t = {}), this.getSimpleHtml(t, e);
  6859. }, t.prototype.getJointHtml = function (t, e, n) {
  6860. var i = $('<div class="hiprint-printTemplate"></div>'),
  6861. o = [];
  6862. return this.printPanels.forEach(function (r, a) {
  6863. i.append(r.getHtml(t, e, o, void 0, n));
  6864. }), i;
  6865. }, t.prototype.setPaper = function (t, e) {
  6866. if (/^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/.test(t)) this.editingPanel.resize(void 0, parseFloat(t), parseFloat(e), !1); else {
  6867. var n = s.a.instance[t];
  6868. if (!n) throw new Error("not found pagetype:" + (t || ""));
  6869. this.editingPanel.resize(t, n.width, n.height, !1);
  6870. }
  6871. }, t.prototype.rotatePaper = function () {
  6872. this.editingPanel.rotatePaper();
  6873. }, t.prototype.addPrintPanel = function (t, e) {
  6874. var n = t ? new pt(new rt(t), this.id) : this.createDefaultPanel();
  6875. return t && (t.index = this.printPanels.length), e && (this.container.append(n.getTarget()), n.design()), this.printPanels.push(n), e && this.selectPanel(n.index), n;
  6876. }, t.prototype.selectPanel = function (t) {
  6877. var e = this;
  6878. this.printPanels.forEach(function (n, i) {
  6879. t == i ? (n.enable(), e.editingPanel = n) : n.disable();
  6880. });
  6881. }, t.prototype.deletePanel = function (t) {
  6882. this.printPanels[t].clear(), this.printPanels[t].getTarget().remove(), this.printPanels.splice(t, 1);
  6883. }, t.prototype.getPaneltotal = function () {
  6884. return this.printPanels.length;
  6885. }, t.prototype.createDefaultPanel = function () {
  6886. return new pt(new rt({
  6887. index: this.printPanels.length,
  6888. paperType: "A4"
  6889. }), this.id);
  6890. }, t.prototype.createContainer = function (t) {
  6891. t ? (this.container = $(t), this.container.addClass("hiprint-printTemplate")) : this.container = $('<div class="hiprint-printTemplate"></div>');
  6892. }, t.prototype.getJsonTid = function () {
  6893. var t = [];
  6894. return this.printPanels.forEach(function (e) {
  6895. e.getPanelEntity().printElements.length && t.push(e.getPanelEntity());
  6896. }), new st({
  6897. panels: t
  6898. });
  6899. }, t.prototype.getJson = function () {
  6900. var t = [];
  6901. return this.printPanels.forEach(function (e) {
  6902. t.push(e.getPanelEntity(!0));
  6903. }), new st({
  6904. panels: t
  6905. });
  6906. }, t.prototype.getPrintElementSelectEventKey = function () {
  6907. return "PrintElementSelectEventKey_" + this.id;
  6908. }, t.prototype.getBuildCustomOptionSettingEventKey = function () {
  6909. return "BuildCustomOptionSettingEventKey_" + this.id;
  6910. }, t.prototype.clear = function () {
  6911. this.printPanels.forEach(function (t) {
  6912. if (t.clear(), t.index > 0) {
  6913. var e = t.getTarget();
  6914. e && e.length && e.remove();
  6915. }
  6916. }), this.printPanels = [this.printPanels[0]], this.printPaginationCreator && this.printPaginationCreator.buildPagination();
  6917. }, t.prototype.getPaperType = function (t) {
  6918. return null == t && (t = 0), this.printPanels[0].paperType;
  6919. }, t.prototype.getOrient = function (t) {
  6920. return null == t && (t = 0), this.printPanels[t].height > this.printPanels[t].width ? 1 : 2;
  6921. }, t.prototype.getPrintStyle = function (t) {
  6922. return this.printPanels[t].getPrintStyle();
  6923. }, t.prototype.print = function (t, e) {
  6924. t || (t = {}), this.getHtml(t, e).hiwprint();
  6925. }, t.prototype.print2 = function (t, e) {
  6926. if (t || (t = {}), e || (e = {}), this.clientIsOpened()) {
  6927. var n = this,
  6928. i = 0,
  6929. o = {},
  6930. r = $("link[media=print]").length > 0 ? $("link[media=print]") : $("link");
  6931. r.each(function (a, p) {
  6932. var s = new XMLHttpRequest();
  6933. s.open("GET", $(p).attr("href")), s.onreadystatechange = function () {
  6934. if (4 === s.readyState && 200 === s.status && (o[a + ""] = '<style rel="stylesheet" type="text/css">' + s.responseText + "</style>", ++i == r.length)) {
  6935. for (var p = "", l = 0; l < r.length; l++) {
  6936. p += o[l + ""];
  6937. }
  6938. n.sentToClient(p, t, e);
  6939. }
  6940. }, s.send();
  6941. });
  6942. } else alert("连接客户端失败");
  6943. }, t.prototype.imageToBase64 = function (t) {
  6944. var e = $(t).attr("src");
  6945. if (-1 == e.indexOf("base64")) try {
  6946. if (!this.tempimageBase64[e]) {
  6947. var n = document.createElement("canvas"),
  6948. i = new Image();
  6949. i.src = t.attr("src"), n.width = i.width, n.height = i.height, n.getContext("2d").drawImage(i, 0, 0), e && (this.tempimageBase64[e] = n.toDataURL("image/png"));
  6950. }
  6951. t.attr("src", this.tempimageBase64[e]);
  6952. } catch (e) {
  6953. try {
  6954. this.xhrLoadImage(t);
  6955. } catch (t) {
  6956. console.log(t);
  6957. }
  6958. }
  6959. }, t.prototype.xhrLoadImage = function (t) { }, t.prototype.sentToClient = function (t, e, n) {
  6960. e || (e = {});
  6961. var i = $.extend({}, n || {});
  6962. i.imgToBase64 = !0;
  6963. var o = t + this.getHtml(e, i)[0].outerHTML;
  6964. i.id = s.a.instance.guid(), i.html = o, i.templateId = this.id, hiwebSocket.send(i);
  6965. }, t.prototype.printByHtml = function (t) {
  6966. $(t).hiwprint();
  6967. }, t.prototype.printByHtml2 = function (t, e) {
  6968. if (e || (e = {}), this.clientIsOpened()) {
  6969. var n = this,
  6970. i = 0,
  6971. o = {},
  6972. r = $("link[media=print]").length > 0 ? $("link[media=print]") : $("link");
  6973. r.each(function (a, p) {
  6974. var l = new XMLHttpRequest();
  6975. l.open("GET", $(p).attr("href")), l.onreadystatechange = function () {
  6976. if (4 === l.readyState && 200 === l.status && (o[a + ""] = '<style rel="stylesheet" type="text/css">' + l.responseText + "</style>", ++i == r.length)) {
  6977. for (var p = "", u = 0; u < r.length; u++) {
  6978. p += o[u + ""];
  6979. }
  6980. var d = p + $(t)[0].outerHTML,
  6981. c = $.extend({}, e || {});
  6982. c.id = s.a.instance.guid(), c.html = d, c.templateId = n.id, hiwebSocket.send(c);
  6983. }
  6984. }, l.send();
  6985. });
  6986. } else alert("连接客户端失败");
  6987. }, t.prototype.deletePrintElement = function (t) {
  6988. this.printPanels.forEach(function (e) {
  6989. e.deletePrintElement(t);
  6990. });
  6991. }, t.prototype.transformImg = function (t) {
  6992. var e = this;
  6993. t.map(function (t, n) {
  6994. e.imageToBase64($(n));
  6995. });
  6996. }, t.prototype.toPdf = function (t, e, n) {
  6997. var i = this;
  6998. if (this.printPanels.length) {
  6999. var r = o.a.mm.toPt(this.printPanels[0].width),
  7000. a = o.a.mm.toPt(this.printPanels[0].height),
  7001. p = $.extend({
  7002. scale: 2,
  7003. width: o.a.pt.toPx(r),
  7004. x: 0,
  7005. y: 0,
  7006. useCORS: !0
  7007. }, n || {}),
  7008. s = new jsPDF({
  7009. orientation: 1 == this.getOrient(0) ? "portrait" : "landscape",
  7010. unit: "pt",
  7011. format: this.printPanels[0].paperType ? this.printPanels[0].paperType.toLocaleLowerCase() : [r, a]
  7012. }),
  7013. l = this.getHtml(t, n);
  7014. this.createTempContainer();
  7015. var u = this.getTempContainer();
  7016. this.svg2canvas(l), u.html(l[0]);
  7017. var d = u.find(".hiprint-printPanel .hiprint-printPaper").length;
  7018. $(l).css("position:fixed"), html2canvas(l[0], p).then(function (t) {
  7019. var n = t.getContext("2d");
  7020. n.mozImageSmoothingEnabled = !1, n.webkitImageSmoothingEnabled = !1, n.msImageSmoothingEnabled = !1, n.imageSmoothingEnabled = !1;
  7021. for (var o = t.toDataURL("image/jpeg"), p = 0; p < d; p++) {
  7022. s.addImage(o, "JPEG", 0, 0 - p * a, r, d * a), p < d - 1 && s.addPage();
  7023. }
  7024. i.removeTempContainer(), e.indexOf(".pdf") > -1 ? s.save(e) : s.save(e + ".pdf");
  7025. });
  7026. }
  7027. }, t.prototype.createTempContainer = function () {
  7028. this.removeTempContainer(), $("body").prepend($('<div class="hiprint_temp_Container" style="overflow:hidden;height: 0px;box-sizing: border-box;"></div>'));
  7029. }, t.prototype.removeTempContainer = function () {
  7030. $(".hiprint_temp_Container").remove();
  7031. }, t.prototype.getTempContainer = function () {
  7032. return $(".hiprint_temp_Container");
  7033. }, t.prototype.svg2canvas = function (t) {
  7034. t.find("svg").each(function (t, e) {
  7035. var n = e.parentNode,
  7036. i = document.createElement("canvas"),
  7037. o = new XMLSerializer().serializeToString(e);
  7038. canvg(i, o), $(e).before(i), n.removeChild(e), $(i).css("width", "100%"), $(i).css("height", "100%");
  7039. });
  7040. }, t.prototype.on = function (t, e) {
  7041. o.a.event.on(t + "_" + this.id, e);
  7042. }, t.prototype.clientIsOpened = function () {
  7043. return hiwebSocket.opened;
  7044. }, t.prototype.getPrinterList = function () {
  7045. var t = hiwebSocket.getPrinterList();
  7046. return t || [];
  7047. }, t.prototype.getElementByTid = function (t, e) {
  7048. return null == e && (e = 0), this.printPanels[e].getElementByTid(t);
  7049. }, t.prototype.getElementByName = function (t, e) {
  7050. return null == e && (e = 0), this.printPanels[e].getElementByName(t);
  7051. }, t.prototype.getPanel = function (t) {
  7052. return null == t && (t = 0), this.printPanels[t];
  7053. }, t.prototype.loadAllImages = function (t, e, n) {
  7054. var i = this;
  7055. null == n && (n = 0);
  7056. for (var o = t[0].getElementsByTagName("img"), r = !0, a = 0; a < o.length; a++) {
  7057. var p = o[a];
  7058. p.src && p.src !== window.location.href && -1 == p.src.indexOf("base64") && (p && void 0 !== p.naturalWidth && 0 !== p.naturalWidth && p.complete || (r = !1));
  7059. }
  7060. n++, !r && n < 10 ? setTimeout(function () {
  7061. i.loadAllImages(t, e, n);
  7062. }, 500) : e();
  7063. }, t.prototype.setFields = function (t) {
  7064. this.fields = t;
  7065. }, t.prototype.getFields = function () {
  7066. return this.fields;
  7067. }, t.prototype.getFieldsInPanel = function () {
  7068. var t = [];
  7069. return this.printPanels.forEach(function (e) {
  7070. t = t.concat(e.getFieldsInPanel());
  7071. }), t;
  7072. }, t.prototype.initAutoSave = function () {
  7073. var t = this;
  7074. this.autoSave && o.a.event.on("hiprintTemplateDataChanged_" + this.id, function () {
  7075. hiLocalStorage.saveLocalData(t.autoSaveKey || "hiprintAutoSave", JSON.stringify(1 == t.autoSaveMode ? t.getJson() : t.getJsonTid()));
  7076. });
  7077. }, t;
  7078. }();
  7079. function ht(t) {
  7080. this.getHtml(t).hiwprint();
  7081. }
  7082. function ft(t, e, n) {
  7083. $.extend({}, t || {}).imgToBase64 = !0;
  7084. var i = new ct({});
  7085. i.on("printSuccess", e), i.on("printError", n), i.printByHtml2(this.getHtml(t), t.options);
  7086. }
  7087. function gt(t) {
  7088. var e = void 0;
  7089. return t && t.templates.forEach(function (n, i) {
  7090. var o = $.extend({}, n.options || {});
  7091. t.imgToBase64 && (o.imgToBase64 = !0), e ? e.append(n.template.getHtml(n.data, o).html()) : e = n.template.getHtml(n.data, o);
  7092. }), e;
  7093. }
  7094. function mt(t) {
  7095. p.a.instance.init(t), p.a.instance.providers.forEach(function (t) {
  7096. t.addElementTypes(a.instance);
  7097. });
  7098. }
  7099. n.d(e, "init", function () {
  7100. return mt;
  7101. }), n.d(e, "PrintElementTypeManager", function () {
  7102. return it;
  7103. }), n.d(e, "PrintElementTypeGroup", function () {
  7104. return ot;
  7105. }), n.d(e, "PrintTemplate", function () {
  7106. return ct;
  7107. }), n.d(e, "print", function () {
  7108. return ht;
  7109. }), n.d(e, "print2", function () {
  7110. return ft;
  7111. }), n.d(e, "getHtml", function () {
  7112. return gt;
  7113. }), $(document).ready(function () {
  7114. hiwebSocket.hasIo() && hiwebSocket.start();
  7115. });
  7116. }]);